super-time-tracker-ui 0.1.38 → 0.1.40
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.
- package/README.md +88 -88
- package/bin/stt-ui.js +220 -220
- package/dist/standalone/next-output/BUILD_ID +1 -1
- package/dist/standalone/next-output/build-manifest.json +5 -5
- package/dist/standalone/next-output/server/app/_global-error/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/_global-error/page.js +1 -1
- package/dist/standalone/next-output/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_global-error.html +1 -1
- package/dist/standalone/next-output/server/app/_global-error.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/_not-found/page.js +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/api/auth/signout/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/auth/signout/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/note/delete/route.js +2 -2
- package/dist/standalone/next-output/server/app/api/note/delete/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/note/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/note/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/import/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/merge-on-load/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/pull/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js +1 -1
- package/dist/standalone/next-output/server/app/api/sync/push/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/auth/callback/route.js +1 -1
- package/dist/standalone/next-output/server/app/auth/callback/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/favicon.ico/route.js +1 -1
- package/dist/standalone/next-output/server/app/favicon.ico/route.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/login/page.js +1 -1
- package/dist/standalone/next-output/server/app/login/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/offline/page.js +1 -1
- package/dist/standalone/next-output/server/app/offline/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/offline/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/page/react-loadable-manifest.json +1 -1
- package/dist/standalone/next-output/server/app/page.js +1 -1
- package/dist/standalone/next-output/server/app/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/pomodoro/page.js +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/register/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/register/page.js +1 -1
- package/dist/standalone/next-output/server/app/register/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/register/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/reporting/page.js +1 -1
- package/dist/standalone/next-output/server/app/reporting/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/reporting/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/search/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/search/page.js +1 -1
- package/dist/standalone/next-output/server/app/search/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/search/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/ai-suggestions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/cloud-sync/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/data/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/data/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/display/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/display/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/goals/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/goals/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/notifications/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/notifications/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/pomodoro/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/quick-actions/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/settings/tags/page.js +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/settings/tags/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/sheets/page.js +1 -1
- package/dist/standalone/next-output/server/app/sheets/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/sheets/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/app/today/page/build-manifest.json +2 -2
- package/dist/standalone/next-output/server/app/today/page.js +1 -1
- package/dist/standalone/next-output/server/app/today/page.js.nft.json +1 -1
- package/dist/standalone/next-output/server/app/today/page_client-reference-manifest.js +1 -1
- package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0_l72r2.js +1 -1
- package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0a439d6.js +1 -1
- package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0b8a-p3.js +1 -1
- package/dist/standalone/next-output/server/chunks/0prs_next_dist_esm_build_templates_app-route_0e-v8-t.js +1 -1
- package/dist/standalone/next-output/server/chunks/[externals]__11vad82._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0sqmaqd._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0-taz6n._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00~g.6x._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__057h~1v._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06666_b._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06h__d_._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06r8z50._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__06wq380._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_b50~5._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0eruj62._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0fc0f.7._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g2.yrs._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0g4.zxh._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0hasizg._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jlfmb8._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m-c-3t._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mft_cy._.js +78 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0m~u8g4._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nx-vwn._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0o-u0o6._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0pzvh8l._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0rl2w7-._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wdwx.8._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0wj1pxh._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0y.-jfw._.js +3 -0
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0yqw7pu._.js +1 -1
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0~22xdv._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_00h8h72._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_01k5l~6._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_01m8bky._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_08yfru9._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0a9455x._.js +3 -0
- package/dist/standalone/next-output/server/chunks/_0glc6qw._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0k9xfs_._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0qc0j~f._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0s9bykd._.js +1 -1
- package/dist/standalone/next-output/server/chunks/_0ykasjm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/0prs_next_dist_0gm.sou._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0xgtqus._.js → [root-of-the-server]__03~l7zo._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__07dg5mm._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__08n6l..._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0f0-17f._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0i8nvpz._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0kp4i1o._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{[root-of-the-server]__0kehl40._.js → [root-of-the-server]__0mvoac~._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0q5n4_f._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0s2z7s7._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0t9jvpg._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__0ta228.._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__11yff~n._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/[root-of-the-server]__13lfzik._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{_0y1l.fp._.js → _0_glxov._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/{_0j8zmg6._.js → _0mb-jfk._.js} +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_0n~tafj._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/{_11_k_h_._.js → _0yg7mcz._.js} +2 -2
- package/dist/standalone/next-output/server/chunks/ssr/_10n.q--._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/_119e_ui._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_0isp.qn._.js +3 -0
- package/dist/standalone/next-output/server/chunks/ssr/components_entry-list_tsx_02.v.ur._.js +1 -1
- package/dist/standalone/next-output/server/chunks/ssr/components_reporting-view_tsx_0-0ofcv._.js +1 -1
- package/dist/standalone/next-output/server/functions-config-manifest.json +11 -1
- package/dist/standalone/next-output/server/middleware-build-manifest.js +5 -5
- package/dist/standalone/next-output/server/middleware-manifest.json +2 -30
- package/dist/standalone/next-output/server/middleware.js +5 -0
- package/dist/standalone/next-output/server/pages/500.html +1 -1
- package/dist/standalone/next-output/static/chunks/0076tj~a2_nqt.css +3 -0
- package/dist/standalone/next-output/static/chunks/01.p8x7rwa_da.js +1 -0
- package/dist/standalone/next-output/static/chunks/01e9mu0.nm5zq.js +1 -0
- package/dist/standalone/next-output/static/chunks/01op4gs840x6z.js +1 -0
- package/dist/standalone/next-output/static/chunks/05q3gfx1e8sea.js +2 -0
- package/dist/standalone/next-output/static/chunks/{0o1-l.q7jp8h9.js → 073j7j4i1_blt.js} +1 -1
- package/dist/standalone/next-output/static/chunks/07fpf9v1uq4kz.js +1 -0
- package/dist/standalone/next-output/static/chunks/{0tunlsiqaj8k7.js → 0_ofg6_dn.8-1.js} +1 -1
- package/dist/standalone/next-output/static/chunks/{0d1bw0ondgg09.js → 0fxgcr1q998_k.js} +1 -1
- package/dist/standalone/next-output/static/chunks/0slg_rix2tzz_.js +1 -0
- package/dist/standalone/next-output/static/chunks/{turbopack-0f5lhej4rg9kr.js → turbopack-0qr4v3fex9a4_.js} +1 -1
- package/dist/standalone/package.json +1 -1
- package/dist/standalone/public/icons/site.webmanifest +19 -1
- package/dist/standalone/public/manifest.webmanifest +30 -30
- package/dist/standalone/public/sw.js +74 -73
- package/package.json +1 -1
- package/dist/standalone/next-output/server/chunks/[externals]_next_dist_0arv.vj._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0.8v_6p._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__00xx75-._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__07wrb8~._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0_ar6en._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0jvridy._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0mp257.._.js +0 -3
- package/dist/standalone/next-output/server/chunks/[root-of-the-server]__0nhm~x6._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_0z9uwpr._.js +0 -3
- package/dist/standalone/next-output/server/chunks/_128edjo._.js +0 -3
- package/dist/standalone/next-output/server/chunks/ssr/components_tracker-app_tsx_0qs9.7y._.js +0 -3
- package/dist/standalone/next-output/server/edge/chunks/0iv-_next_dist_esm_build_templates_edge-wrapper_0tu5gg3.js +0 -3
- package/dist/standalone/next-output/server/edge/chunks/0prs_next_dist_esm_build_templates_edge-wrapper_0qnghjz.js +0 -3
- package/dist/standalone/next-output/server/edge/chunks/[root-of-the-server]__0864en3._.js +0 -69
- package/dist/standalone/next-output/static/chunks/0bkrh0v8rs7jg.js +0 -1
- package/dist/standalone/next-output/static/chunks/0dx.1c1lmm455.css +0 -3
- package/dist/standalone/next-output/static/chunks/0f4rt.2~sppbn.js +0 -1
- package/dist/standalone/next-output/static/chunks/0lj1_~cxf~l6t.js +0 -1
- package/dist/standalone/next-output/static/chunks/0p4cjapdzyl6k.js +0 -2
- package/dist/standalone/next-output/static/chunks/0yhbka048dolq.js +0 -1
- package/dist/standalone/next-output/static/chunks/11cm.4cgwu.ci.js +0 -1
- /package/dist/standalone/next-output/static/{R6aA3g-k0tEi2kMtSB2-e → i7qPdm2jbeXagyWgWaWeK}/_buildManifest.js +0 -0
- /package/dist/standalone/next-output/static/{R6aA3g-k0tEi2kMtSB2-e → i7qPdm2jbeXagyWgWaWeK}/_clientMiddlewareManifest.js +0 -0
- /package/dist/standalone/next-output/static/{R6aA3g-k0tEi2kMtSB2-e → i7qPdm2jbeXagyWgWaWeK}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22373,66295,e=>{"use strict";let t=["help","check-in","check-out","edit-entry","add-note","pomodoro","previous-sheet","next-sheet"],r={help:"?","check-in":"c","check-out":"o","edit-entry":"e","add-note":"n",pomodoro:"p","previous-sheet":"[","next-sheet":"]"};e.s(["topbar_quick_action_ids",0,["today","search","sheets","reporting","pomodoro","manage-tags","sync-settings"],"tracker_shortcut_action_ids",0,t,"tracker_shortcut_defaults",0,r],22373);let s=/^[\w\[\]\?]$/;e.s(["parse_tracker_shortcut_map",0,function(e){let n={...r};try{let i=JSON.parse(e);if(null===i||"object"!=typeof i||Array.isArray(i))return n;let a={...r};for(let e of t){let t=i[e];"string"==typeof t&&1===t.length&&s.test(t)&&(a[e]=t.toLowerCase())}return a}catch{return n}}],66295)},31106,(e,t,r)=>{var s={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],s=t[1];return(r+s)*3/4-s},t.toByteArray=function(e){var t,r,i=l(e),a=i[0],o=i[1],h=new n((a+o)*3/4-o),u=0,c=o>0?a-4:a;for(r=0;r<c;r+=4)t=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],h[u++]=t>>16&255,h[u++]=t>>8&255,h[u++]=255&t;return 2===o&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,h[u++]=255&t),1===o&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,h[u++]=t>>8&255,h[u++]=255&t),h},t.fromByteArray=function(e){for(var t,s=e.length,n=s%3,i=[],a=0,o=s-n;a<o;a+=16383)i.push(function(e,t,s){for(var n,i=[],a=t;a<s;a+=3)n=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return i.join("")}(e,a,a+16383>o?o:a+16383));return 1===n?i.push(r[(t=e[s-1])>>2]+r[t<<4&63]+"=="):2===n&&i.push(r[(t=(e[s-2]<<8)+e[s-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],s=[],n="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=i.length;a<o;++a)r[a]=i[a],s[i.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var s=r===t?0:4-r%4;return[r,s]}s[45]=62,s[95]=63},72:function(e,t,r){"use strict";var s=r(675),n=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var s=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);var i=0|f(s,n),l=a(i),h=l.write(s,n);return h!==i&&(l=l.slice(0,h)),l}if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return function(e,t,r){var s;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(s=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),s}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return o.from(u,t,r);var p=function(e){if(o.isBuffer(e)){var t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return h(e),a(e<0?0:0|d(e))}function c(e){for(var t=e.length<0?0:0|d(e.length),r=a(t),s=0;s<t;s+=1)r[s]=255&e[s];return r}t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!o.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(h(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)};function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(e).length;default:if(n)return s?-1:T(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n,i,a,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var s=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>s)&&(r=s);for(var n="",i=t;i<r;++i)n+=P[e[i]];return n}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var n=t;n<r;++n)s+=String.fromCharCode(127&e[n]);return s}(this,t,r);case"latin1":case"binary":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var n=t;n<r;++n)s+=String.fromCharCode(e[n]);return s}(this,t,r);case"base64":return n=this,i=t,a=r,0===i&&a===n.length?s.fromByteArray(n):s.fromByteArray(n.slice(i,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var s=e.slice(t,r),n="",i=0;i<s.length;i+=2)n+=String.fromCharCode(s[i]+256*s[i+1]);return n}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var s=e[t];e[t]=e[r],e[r]=s}function y(e,t,r,s,n){var i;if(0===e.length)return -1;if("string"==typeof r?(s=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(n)return -1;else r=e.length-1;else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=o.from(t,s)),o.isBuffer(t))return 0===t.length?-1:m(e,t,r,s,n);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return m(e,[t],r,s,n)}throw TypeError("val must be string, number or Buffer")}function m(e,t,r,s,n){var i,a=1,o=e.length,l=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return -1;a=2,o/=2,l/=2,r/=2}function h(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var u=-1;for(i=r;i<o;i++)if(h(e,i)===h(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else -1!==u&&(i-=i-u),u=-1}else for(r+l>o&&(r=o-l),i=r;i>=0;i--){for(var c=!0,d=0;d<l;d++)if(h(e,i+d)!==h(t,d)){c=!1;break}if(c)return i}return -1}o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,s=t.length,n=0,i=Math.min(r,s);n<i;++n)if(e[n]!==t[n]){r=e[n],s=t[n];break}return r<s?-1:+(s<r)},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,s=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var i=e[r];if(C(i,Uint8Array)&&(i=o.from(i)),!o.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(s,n),n+=i.length}return s},o.byteLength=f,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(o.prototype[i]=o.prototype.inspect),o.prototype.compare=function(e,t,r,s,n){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),t<0||r>e.length||s<0||n>this.length)throw RangeError("out of range index");if(s>=n&&t>=r)return 0;if(s>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,s>>>=0,n>>>=0,this===e)return 0;for(var i=n-s,a=r-t,l=Math.min(i,a),h=this.slice(s,n),u=e.slice(t,r),c=0;c<l;++c)if(h[c]!==u[c]){i=h[c],a=u[c];break}return i<a?-1:+(a<i)},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)};function b(e,t,r){r=Math.min(e.length,r);for(var s=[],n=t;n<r;){var i,a,o,l,h=e[n],u=null,c=h>239?4:h>223?3:h>191?2:1;if(n+c<=r)switch(c){case 1:h<128&&(u=h);break;case 2:(192&(i=e[n+1]))==128&&(l=(31&h)<<6|63&i)>127&&(u=l);break;case 3:i=e[n+1],a=e[n+2],(192&i)==128&&(192&a)==128&&(l=(15&h)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[n+1],a=e[n+2],o=e[n+3],(192&i)==128&&(192&a)==128&&(192&o)==128&&(l=(15&h)<<18|(63&i)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,s.push(u>>>10&1023|55296),u=56320|1023&u),s.push(u),n+=c}var d=s,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var p="",g=0;g<f;)p+=String.fromCharCode.apply(String,d.slice(g,g+=4096));return p}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function v(e,t,r,s,n,i){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw RangeError('"value" argument is out of bounds');if(r+s>e.length)throw RangeError("Index out of range")}function _(e,t,r,s,n,i){if(r+s>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,s,i){return t*=1,r>>>=0,i||_(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,s,23,4),r+4}function S(e,t,r,s,i){return t*=1,r>>>=0,i||_(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,s,52,8),r+8}o.prototype.write=function(e,t,r,s){if(void 0===t)s="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)s=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,i,a,o,l,h,u,c,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var f=!1;;)switch(s){case"hex":return function(e,t,r,s){r=Number(r)||0;var n=e.length-r;s?(s=Number(s))>n&&(s=n):s=n;var i=t.length;s>i/2&&(s=i/2);for(var a=0;a<s;++a){var o,l=parseInt(t.substr(2*a,2),16);if((o=l)!=o)break;e[r+a]=l}return a}(this,e,t,r);case"utf8":case"utf-8":return n=t,i=r,O(T(e,this.length-n),this,n,i);case"ascii":return a=t,o=r,O(A(e),this,a,o);case"latin1":case"binary":return function(e,t,r,s){return O(A(t),e,r,s)}(this,e,t,r);case"base64":return l=t,h=r,O(R(e),this,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,c=r,O(function(e,t){for(var r,s,n=[],i=0;i<e.length&&!((t-=2)<0);++i)s=(r=e.charCodeAt(i))>>8,n.push(r%256),n.push(s);return n}(e,this.length-u),this,u,c);default:if(f)throw TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),f=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var s=this.subarray(e,t);return Object.setPrototypeOf(s,o.prototype),s},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e],n=1,i=0;++i<t&&(n*=256);)s+=this[e+i]*n;return s},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e+--t],n=1;t>0&&(n*=256);)s+=this[e+--t]*n;return s},o.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e],n=1,i=0;++i<t&&(n*=256);)s+=this[e+i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=t,n=1,i=this[e+--s];s>0&&(n*=256);)i+=this[e+--s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,s){if(e*=1,t>>>=0,!s){var n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}var i=0,a=1,o=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeIntBE=function(e,t,r,s){if(e*=1,t>>>=0,!s){var n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}var i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,s){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<r&&(s=r),s===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-r&&(s=e.length-t+r);var n=s-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,s);else if(this===e&&r<t&&t<s)for(var i=n-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,s),t);return n},o.prototype.fill=function(e,t,r,s){if("string"==typeof e){if("string"==typeof t?(s=t,t=0,r=this.length):"string"==typeof r&&(s=r,r=this.length),void 0!==s&&"string"!=typeof s)throw TypeError("encoding must be a string");if("string"==typeof s&&!o.isEncoding(s))throw TypeError("Unknown encoding: "+s);if(1===e.length){var n,i=e.charCodeAt(0);("utf8"===s&&i<128||"latin1"===s)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{var a=o.isBuffer(e)?e:o.from(e,s),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=a[n%l]}return this};var E=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,s=e.length,n=null,i=[],a=0;a<s;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319||a+1===s){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function A(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function R(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,s){for(var n=0;n<s&&!(n+r>=t.length)&&!(n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var P=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var s=16*r,n=0;n<16;++n)t[s+n]=e[r]+e[n];return t}()},783:function(e,t){t.read=function(e,t,r,s,n){var i,a,o=8*n-s-1,l=(1<<o)-1,h=l>>1,u=-7,c=r?n-1:0,d=r?-1:1,f=e[t+c];for(c+=d,i=f&(1<<-u)-1,f>>=-u,u+=o;u>0;i=256*i+e[t+c],c+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=s;u>0;a=256*a+e[t+c],c+=d,u-=8);if(0===i)i=1-h;else{if(i===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,s),i-=h}return(f?-1:1)*a*Math.pow(2,i-s)},t.write=function(e,t,r,s,n,i){var a,o,l,h=8*i-n-1,u=(1<<h)-1,c=u>>1,d=5960464477539062e-23*(23===n),f=s?0:i-1,p=s?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=d/l:t+=d*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,n),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;e[r+f]=255&o,f+=p,o/=256,n-=8);for(a=a<<n|o,h+=n;h>0;e[r+f]=255&a,f+=p,a/=256,h-=8);e[r+f-p]|=128*g}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}},a=!0;try{s[e](r,r.exports,i),a=!1}finally{a&&delete n[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.2_7d7ddfdd25bda7360fc181e5027d31b3/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},22792,(e,t,r)=>{"use strict";let s;Object.defineProperty(r,"__esModule",{value:!0}),r.parseCookie=c,r.parse=c,r.stringifyCookie=function(e,t){let r=t?.encode||encodeURIComponent,s=[];for(let t of Object.keys(e)){let a=e[t];if(void 0===a)continue;if(!n.test(t))throw TypeError(`cookie name is invalid: ${t}`);let o=r(a);if(!i.test(o))throw TypeError(`cookie val is invalid: ${a}`);s.push(`${t}=${o}`)}return s.join("; ")},r.stringifySetCookie=d,r.serialize=d,r.parseSetCookie=function(e,t){let r=t?.decode||y,s=e.length,n=f(e,0,s),i=p(e,0,n),a=-1===i?{name:"",value:r(g(e,0,n))}:{name:g(e,0,i),value:r(g(e,i+1,n))},o=n+1;for(;o<s;){let t=f(e,o,s),r=p(e,o,t),n=-1===r?g(e,o,t):g(e,o,r),i=-1===r?void 0:g(e,r+1,t);switch(n.toLowerCase()){case"httponly":a.httpOnly=!0;break;case"secure":a.secure=!0;break;case"partitioned":a.partitioned=!0;break;case"domain":a.domain=i;break;case"path":a.path=i;break;case"max-age":i&&l.test(i)&&(a.maxAge=Number(i));break;case"expires":if(!i)break;let h=new Date(i);Number.isFinite(h.valueOf())&&(a.expires=h);break;case"priority":if(!i)break;let u=i.toLowerCase();("low"===u||"medium"===u||"high"===u)&&(a.priority=u);break;case"samesite":if(!i)break;let c=i.toLowerCase();("lax"===c||"strict"===c||"none"===c)&&(a.sameSite=c)}o=t+1}return a},r.stringifySetCookie=d,r.serialize=d;let n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,i=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,l=/^-?\d+$/,h=Object.prototype.toString,u=((s=function(){}).prototype=Object.create(null),s);function c(e,t){let r=new u,s=e.length;if(s<2)return r;let n=t?.decode||y,i=0;do{let t=p(e,i,s);if(-1===t)break;let a=f(e,i,s);if(t>a){i=e.lastIndexOf(";",t-1)+1;continue}let o=g(e,i,t);void 0===r[o]&&(r[o]=n(g(e,t+1,a))),i=a+1}while(i<s)return r}function d(e,t,r){let s="object"==typeof e?e:{...r,name:e,value:String(t)},l=("object"==typeof t?t:r)?.encode||encodeURIComponent;if(!n.test(s.name))throw TypeError(`argument name is invalid: ${s.name}`);let u=s.value?l(s.value):"";if(!i.test(u))throw TypeError(`argument val is invalid: ${s.value}`);let c=s.name+"="+u;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw TypeError(`option maxAge is invalid: ${s.maxAge}`);c+="; Max-Age="+s.maxAge}if(s.domain){if(!a.test(s.domain))throw TypeError(`option domain is invalid: ${s.domain}`);c+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError(`option path is invalid: ${s.path}`);c+="; Path="+s.path}if(s.expires){var d;if(d=s.expires,"[object Date]"!==h.call(d)||!Number.isFinite(s.expires.valueOf()))throw TypeError(`option expires is invalid: ${s.expires}`);c+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(c+="; HttpOnly"),s.secure&&(c+="; Secure"),s.partitioned&&(c+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${s.priority}`)}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${s.sameSite}`)}return c}function f(e,t,r){let s=e.indexOf(";",t);return -1===s?r:s}function p(e,t,r){let s=e.indexOf("=",t);return s<r?s:-1}function g(e,t,r){let s=t,n=r;do{let t=e.charCodeAt(s);if(32!==t&&9!==t)break}while(++s<n)for(;n>s;){let t=e.charCodeAt(n-1);if(32!==t&&9!==t)break;n--}return e.slice(s,n)}function y(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},83105,e=>{"use strict";let t,r,s;class n extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class i extends n{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class a extends n{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class o extends n{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}function l(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,s=Object.getOwnPropertySymbols(e);n<s.length;n++)0>t.indexOf(s[n])&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(r[s[n]]=e[s[n]]);return r}(b=w||(w={})).Any="any",b.ApNortheast1="ap-northeast-1",b.ApNortheast2="ap-northeast-2",b.ApSouth1="ap-south-1",b.ApSoutheast1="ap-southeast-1",b.ApSoutheast2="ap-southeast-2",b.CaCentral1="ca-central-1",b.EuCentral1="eu-central-1",b.EuWest1="eu-west-1",b.EuWest2="eu-west-2",b.EuWest3="eu-west-3",b.SaEast1="sa-east-1",b.UsEast1="us-east-1",b.UsWest1="us-west-1",b.UsWest2="us-west-2";"function"==typeof SuppressedError&&SuppressedError;class h{constructor(e,{headers:t={},customFetch:r,region:s=w.Any}={}){this.url=e,this.headers=t,this.region=s,this.fetch=(e=>e?(...t)=>e(...t):(...e)=>fetch(...e))(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){var t,r,s,n;return t=this,r=arguments,s=void 0,n=function*(e,t={}){var r;let s,n;try{let l,{headers:h,method:u,body:c,signal:d,timeout:f}=t,p={},{region:g}=t;g||(g=this.region);let y=new URL(`${this.url}/${e}`);g&&"any"!==g&&(p["x-region"]=g,y.searchParams.set("forceFunctionRegion",g)),c&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?"u">typeof Blob&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",l=c):"string"==typeof c?(p["Content-Type"]="text/plain",l=c):"u">typeof FormData&&c instanceof FormData?l=c:(p["Content-Type"]="application/json",l=JSON.stringify(c)):l=!c||"string"==typeof c||"u">typeof Blob&&c instanceof Blob||c instanceof ArrayBuffer||"u">typeof FormData&&c instanceof FormData?c:JSON.stringify(c);let m=d;f&&(n=new AbortController,s=setTimeout(()=>n.abort(),f),d?(m=n.signal,d.addEventListener("abort",()=>n.abort())):m=n.signal);let b=yield this.fetch(y.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),h),body:l,signal:m}).catch(e=>{throw new i(e)}),w=b.headers.get("x-relay-error");if(w&&"true"===w)throw new a(b);if(!b.ok)throw new o(b);let v=(null!=(r=b.headers.get("Content-Type"))?r:"text/plain").split(";")[0].trim();return{data:"application/json"===v?yield b.json():"application/octet-stream"===v||"application/pdf"===v?yield b.blob():"text/event-stream"===v?b:"multipart/form-data"===v?yield b.formData():yield b.text(),error:null,response:b}}catch(e){return{data:null,error:e,response:e instanceof o||e instanceof a?e.context:void 0}}finally{s&&clearTimeout(s)}},new(s||(s=Promise))(function(e,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function o(e){try{l(n.throw(e))}catch(e){i(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof s?r:new s(function(e){e(r)})).then(a,o)}l((n=n.apply(t,r||[])).next())})}}let u=e=>Math.min(1e3*2**e,3e4),c=[520,503],d=["GET","HEAD","OPTIONS"];var f,p,g,y,m,b,w,v,_,k,S,E,T=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function A(e,t){return new Promise(r=>{if(null==t?void 0:t.aborted)return void r();let s=setTimeout(()=>{null==t||t.removeEventListener("abort",n),r()},e);function n(){clearTimeout(s),r()}null==t||t.addEventListener("abort",n)})}var R=class{constructor(e){var t,r,s,n,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!=(t=e.shouldThrowOnError)&&t,this.signal=e.signal,this.isMaybeSingle=null!=(r=e.isMaybeSingle)&&r,this.shouldStripNulls=null!=(s=e.shouldStripNulls)&&s,this.urlLengthLimit=null!=(n=e.urlLengthLimit)?n:8e3,this.retryEnabled=null==(i=e.retry)||i,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if("text/csv"===this.headers.get("Accept"))throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){let e=this.headers.get("Accept");"application/vnd.pgrst.object+json"===e?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):e&&"application/json"!==e||this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let s=this.fetch,n=(async()=>{let e=0;for(;;){var t,n,i,a,o;let l,h=new Headers(r.headers);e>0&&h.set("X-Retry-Count",String(e));try{l=await s(r.url.toString(),{method:r.method,headers:h,body:JSON.stringify(r.body,(e,t)=>"bigint"==typeof t?t.toString():t),signal:r.signal})}catch(t){if((null==t?void 0:t.name)==="AbortError"||(null==t?void 0:t.code)==="ABORT_ERR"||!d.includes(r.method))throw t;if(r.retryEnabled&&e<3){let t=u(e);e++,await A(t,r.signal);continue}throw t}if(t=r.method,n=l.status,i=e,r.retryEnabled&&!(i>=3)&&d.includes(t)&&c.includes(n)&&1){let t=null!=(a=null==(o=l.headers)?void 0:o.get("Retry-After"))?a:null,s=null!==t?1e3*Math.max(0,parseInt(t,10)||0):u(e);await l.text(),e++,await A(s,r.signal);continue}return await r.processResponse(l)}})();return this.shouldThrowOnError||(n=n.catch(e=>{var t,r,s,n,i,a;let o="",l="",h="",u=null==e?void 0:e.cause;if(u){let t=null!=(r=null==u?void 0:u.message)?r:"",a=null!=(s=null==u?void 0:u.code)?s:"";o=`${null!=(n=null==e?void 0:e.name)?n:"FetchError"}: ${null==e?void 0:e.message}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,22373,66295,e=>{"use strict";let t=["help","check-in","check-out","edit-entry","add-note","pomodoro","previous-sheet","next-sheet","zen-mode"],r={help:"?","check-in":"c","check-out":"o","edit-entry":"e","add-note":"n",pomodoro:"p","previous-sheet":"[","next-sheet":"]","zen-mode":"z"};e.s(["topbar_quick_action_ids",0,["today","search","sheets","reporting","pomodoro","manage-tags","sync-settings"],"tracker_shortcut_action_ids",0,t,"tracker_shortcut_defaults",0,r],22373);let s=/^[\w\[\]\?]$/;e.s(["parse_tracker_shortcut_map",0,function(e){let n={...r};try{let i=JSON.parse(e);if(null===i||"object"!=typeof i||Array.isArray(i))return n;let a={...r};for(let e of t){let t=i[e];"string"==typeof t&&1===t.length&&s.test(t)&&(a[e]=t.toLowerCase())}return a}catch{return n}}],66295)},31106,(e,t,r)=>{var s={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],s=t[1];return(r+s)*3/4-s},t.toByteArray=function(e){var t,r,i=l(e),a=i[0],o=i[1],h=new n((a+o)*3/4-o),u=0,c=o>0?a-4:a;for(r=0;r<c;r+=4)t=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],h[u++]=t>>16&255,h[u++]=t>>8&255,h[u++]=255&t;return 2===o&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,h[u++]=255&t),1===o&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,h[u++]=t>>8&255,h[u++]=255&t),h},t.fromByteArray=function(e){for(var t,s=e.length,n=s%3,i=[],a=0,o=s-n;a<o;a+=16383)i.push(function(e,t,s){for(var n,i=[],a=t;a<s;a+=3)n=(e[a]<<16&0xff0000)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(r[n>>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return i.join("")}(e,a,a+16383>o?o:a+16383));return 1===n?i.push(r[(t=e[s-1])>>2]+r[t<<4&63]+"=="):2===n&&i.push(r[(t=(e[s-2]<<8)+e[s-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],s=[],n="u">typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,o=i.length;a<o;++a)r[a]=i[a],s[i.charCodeAt(a)]=a;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var s=r===t?0:4-r%4;return[r,s]}s[45]=62,s[95]=63},72:function(e,t,r){"use strict";var s=r(675),n=r(783),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function a(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var s=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!o.isEncoding(n))throw TypeError("Unknown encoding: "+n);var i=0|f(s,n),l=a(i),h=l.write(s,n);return h!==i&&(l=l.slice(0,h)),l}if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return function(e,t,r){var s;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(s=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),o.prototype),s}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return o.from(u,t,r);var p=function(e){if(o.isBuffer(e)){var t=0|d(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(p)return p;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return h(e),a(e<0?0:0|d(e))}function c(e){for(var t=e.length<0?0:0|d(e.length),r=a(t),s=0;s<t;s+=1)r[s]=255&e[s];return r}t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!o.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return(h(e),e<=0)?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)};function d(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,s=arguments.length>2&&!0===arguments[2];if(!s&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return T(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(e).length;default:if(n)return s?-1:T(e).length;t=(""+t).toLowerCase(),n=!0}}function p(e,t,r){var n,i,a,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var s=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>s)&&(r=s);for(var n="",i=t;i<r;++i)n+=P[e[i]];return n}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var n=t;n<r;++n)s+=String.fromCharCode(127&e[n]);return s}(this,t,r);case"latin1":case"binary":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var n=t;n<r;++n)s+=String.fromCharCode(e[n]);return s}(this,t,r);case"base64":return n=this,i=t,a=r,0===i&&a===n.length?s.fromByteArray(n):s.fromByteArray(n.slice(i,a));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var s=e.slice(t,r),n="",i=0;i<s.length;i+=2)n+=String.fromCharCode(s[i]+256*s[i+1]);return n}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){var s=e[t];e[t]=e[r],e[r]=s}function y(e,t,r,s,n){var i;if(0===e.length)return -1;if("string"==typeof r?(s=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(i=r*=1)!=i&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(n)return -1;else r=e.length-1;else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=o.from(t,s)),o.isBuffer(t))return 0===t.length?-1:m(e,t,r,s,n);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return m(e,[t],r,s,n)}throw TypeError("val must be string, number or Buffer")}function m(e,t,r,s,n){var i,a=1,o=e.length,l=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return -1;a=2,o/=2,l/=2,r/=2}function h(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(n){var u=-1;for(i=r;i<o;i++)if(h(e,i)===h(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else -1!==u&&(i-=i-u),u=-1}else for(r+l>o&&(r=o-l),i=r;i>=0;i--){for(var c=!0,d=0;d<l;d++)if(h(e,i+d)!==h(t,d)){c=!1;break}if(c)return i}return -1}o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,s=t.length,n=0,i=Math.min(r,s);n<i;++n)if(e[n]!==t[n]){r=e[n],s=t[n];break}return r<s?-1:+(s<r)},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,s=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var i=e[r];if(C(i,Uint8Array)&&(i=o.from(i)),!o.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');i.copy(s,n),n+=i.length}return s},o.byteLength=f,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):p.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(o.prototype[i]=o.prototype.inspect),o.prototype.compare=function(e,t,r,s,n){if(C(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===s&&(s=0),void 0===n&&(n=this.length),t<0||r>e.length||s<0||n>this.length)throw RangeError("out of range index");if(s>=n&&t>=r)return 0;if(s>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,s>>>=0,n>>>=0,this===e)return 0;for(var i=n-s,a=r-t,l=Math.min(i,a),h=this.slice(s,n),u=e.slice(t,r),c=0;c<l;++c)if(h[c]!==u[c]){i=h[c],a=u[c];break}return i<a?-1:+(a<i)},o.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)};function b(e,t,r){r=Math.min(e.length,r);for(var s=[],n=t;n<r;){var i,a,o,l,h=e[n],u=null,c=h>239?4:h>223?3:h>191?2:1;if(n+c<=r)switch(c){case 1:h<128&&(u=h);break;case 2:(192&(i=e[n+1]))==128&&(l=(31&h)<<6|63&i)>127&&(u=l);break;case 3:i=e[n+1],a=e[n+2],(192&i)==128&&(192&a)==128&&(l=(15&h)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[n+1],a=e[n+2],o=e[n+3],(192&i)==128&&(192&a)==128&&(192&o)==128&&(l=(15&h)<<18|(63&i)<<12|(63&a)<<6|63&o)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,s.push(u>>>10&1023|55296),u=56320|1023&u),s.push(u),n+=c}var d=s,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var p="",g=0;g<f;)p+=String.fromCharCode.apply(String,d.slice(g,g+=4096));return p}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function v(e,t,r,s,n,i){if(!o.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw RangeError('"value" argument is out of bounds');if(r+s>e.length)throw RangeError("Index out of range")}function _(e,t,r,s,n,i){if(r+s>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,s,i){return t*=1,r>>>=0,i||_(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,s,23,4),r+4}function S(e,t,r,s,i){return t*=1,r>>>=0,i||_(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,s,52,8),r+8}o.prototype.write=function(e,t,r,s){if(void 0===t)s="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)s=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,i,a,o,l,h,u,c,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var f=!1;;)switch(s){case"hex":return function(e,t,r,s){r=Number(r)||0;var n=e.length-r;s?(s=Number(s))>n&&(s=n):s=n;var i=t.length;s>i/2&&(s=i/2);for(var a=0;a<s;++a){var o,l=parseInt(t.substr(2*a,2),16);if((o=l)!=o)break;e[r+a]=l}return a}(this,e,t,r);case"utf8":case"utf-8":return n=t,i=r,O(T(e,this.length-n),this,n,i);case"ascii":return a=t,o=r,O(A(e),this,a,o);case"latin1":case"binary":return function(e,t,r,s){return O(A(t),e,r,s)}(this,e,t,r);case"base64":return l=t,h=r,O(R(e),this,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,c=r,O(function(e,t){for(var r,s,n=[],i=0;i<e.length&&!((t-=2)<0);++i)s=(r=e.charCodeAt(i))>>8,n.push(r%256),n.push(s);return n}(e,this.length-u),this,u,c);default:if(f)throw TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),f=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var s=this.subarray(e,t);return Object.setPrototypeOf(s,o.prototype),s},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e],n=1,i=0;++i<t&&(n*=256);)s+=this[e+i]*n;return s},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e+--t],n=1;t>0&&(n*=256);)s+=this[e+--t]*n;return s},o.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=this[e],n=1,i=0;++i<t&&(n*=256);)s+=this[e+i]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);for(var s=t,n=1,i=this[e+--s];s>0&&(n*=256);)i+=this[e+--s]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},o.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var n=Math.pow(2,8*r)-1;v(this,e,t,r,n,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,s){if(e*=1,t>>>=0,!s){var n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}var i=0,a=1,o=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeIntBE=function(e,t,r,s){if(e*=1,t>>>=0,!s){var n=Math.pow(2,8*r-1);v(this,e,t,r,n-1,-n)}var i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return S(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return S(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,s){if(!o.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<r&&(s=r),s===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-r&&(s=e.length-t+r);var n=s-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,s);else if(this===e&&r<t&&t<s)for(var i=n-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,s),t);return n},o.prototype.fill=function(e,t,r,s){if("string"==typeof e){if("string"==typeof t?(s=t,t=0,r=this.length):"string"==typeof r&&(s=r,r=this.length),void 0!==s&&"string"!=typeof s)throw TypeError("encoding must be a string");if("string"==typeof s&&!o.isEncoding(s))throw TypeError("Unknown encoding: "+s);if(1===e.length){var n,i=e.charCodeAt(0);("utf8"===s&&i<128||"latin1"===s)&&(e=i)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n<r;++n)this[n]=e;else{var a=o.isBuffer(e)?e:o.from(e,s),l=a.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<r-t;++n)this[n+t]=a[n%l]}return this};var E=/[^+/0-9A-Za-z-_]/g;function T(e,t){t=t||1/0;for(var r,s=e.length,n=null,i=[],a=0;a<s;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!n){if(r>56319||a+1===s){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function A(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function R(e){return s.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(E,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,s){for(var n=0;n<s&&!(n+r>=t.length)&&!(n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var P=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var s=16*r,n=0;n<16;++n)t[s+n]=e[r]+e[n];return t}()},783:function(e,t){t.read=function(e,t,r,s,n){var i,a,o=8*n-s-1,l=(1<<o)-1,h=l>>1,u=-7,c=r?n-1:0,d=r?-1:1,f=e[t+c];for(c+=d,i=f&(1<<-u)-1,f>>=-u,u+=o;u>0;i=256*i+e[t+c],c+=d,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=s;u>0;a=256*a+e[t+c],c+=d,u-=8);if(0===i)i=1-h;else{if(i===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,s),i-=h}return(f?-1:1)*a*Math.pow(2,i-s)},t.write=function(e,t,r,s,n,i){var a,o,l,h=8*i-n-1,u=(1<<h)-1,c=u>>1,d=5960464477539062e-23*(23===n),f=s?0:i-1,p=s?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+c>=1?t+=d/l:t+=d*Math.pow(2,1-c),t*l>=2&&(a++,l/=2),a+c>=u?(o=0,a=u):a+c>=1?(o=(t*l-1)*Math.pow(2,n),a+=c):(o=t*Math.pow(2,c-1)*Math.pow(2,n),a=0));n>=8;e[r+f]=255&o,f+=p,o/=256,n-=8);for(a=a<<n|o,h+=n;h>0;e[r+f]=255&a,f+=p,a/=256,h-=8);e[r+f-p]|=128*g}}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}},a=!0;try{s[e](r,r.exports,i),a=!1}finally{a&&delete n[e]}return r.exports}i.ab="/ROOT/node_modules/.pnpm/next@16.2.6_@babel+core@7.2_7d7ddfdd25bda7360fc181e5027d31b3/node_modules/next/dist/compiled/buffer/",t.exports=i(72)},22792,(e,t,r)=>{"use strict";let s;Object.defineProperty(r,"__esModule",{value:!0}),r.parseCookie=c,r.parse=c,r.stringifyCookie=function(e,t){let r=t?.encode||encodeURIComponent,s=[];for(let t of Object.keys(e)){let a=e[t];if(void 0===a)continue;if(!n.test(t))throw TypeError(`cookie name is invalid: ${t}`);let o=r(a);if(!i.test(o))throw TypeError(`cookie val is invalid: ${a}`);s.push(`${t}=${o}`)}return s.join("; ")},r.stringifySetCookie=d,r.serialize=d,r.parseSetCookie=function(e,t){let r=t?.decode||y,s=e.length,n=f(e,0,s),i=p(e,0,n),a=-1===i?{name:"",value:r(g(e,0,n))}:{name:g(e,0,i),value:r(g(e,i+1,n))},o=n+1;for(;o<s;){let t=f(e,o,s),r=p(e,o,t),n=-1===r?g(e,o,t):g(e,o,r),i=-1===r?void 0:g(e,r+1,t);switch(n.toLowerCase()){case"httponly":a.httpOnly=!0;break;case"secure":a.secure=!0;break;case"partitioned":a.partitioned=!0;break;case"domain":a.domain=i;break;case"path":a.path=i;break;case"max-age":i&&l.test(i)&&(a.maxAge=Number(i));break;case"expires":if(!i)break;let h=new Date(i);Number.isFinite(h.valueOf())&&(a.expires=h);break;case"priority":if(!i)break;let u=i.toLowerCase();("low"===u||"medium"===u||"high"===u)&&(a.priority=u);break;case"samesite":if(!i)break;let c=i.toLowerCase();("lax"===c||"strict"===c||"none"===c)&&(a.sameSite=c)}o=t+1}return a},r.stringifySetCookie=d,r.serialize=d;let n=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,i=/^[\u0021-\u003A\u003C-\u007E]*$/,a=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,o=/^[\u0020-\u003A\u003D-\u007E]*$/,l=/^-?\d+$/,h=Object.prototype.toString,u=((s=function(){}).prototype=Object.create(null),s);function c(e,t){let r=new u,s=e.length;if(s<2)return r;let n=t?.decode||y,i=0;do{let t=p(e,i,s);if(-1===t)break;let a=f(e,i,s);if(t>a){i=e.lastIndexOf(";",t-1)+1;continue}let o=g(e,i,t);void 0===r[o]&&(r[o]=n(g(e,t+1,a))),i=a+1}while(i<s)return r}function d(e,t,r){let s="object"==typeof e?e:{...r,name:e,value:String(t)},l=("object"==typeof t?t:r)?.encode||encodeURIComponent;if(!n.test(s.name))throw TypeError(`argument name is invalid: ${s.name}`);let u=s.value?l(s.value):"";if(!i.test(u))throw TypeError(`argument val is invalid: ${s.value}`);let c=s.name+"="+u;if(void 0!==s.maxAge){if(!Number.isInteger(s.maxAge))throw TypeError(`option maxAge is invalid: ${s.maxAge}`);c+="; Max-Age="+s.maxAge}if(s.domain){if(!a.test(s.domain))throw TypeError(`option domain is invalid: ${s.domain}`);c+="; Domain="+s.domain}if(s.path){if(!o.test(s.path))throw TypeError(`option path is invalid: ${s.path}`);c+="; Path="+s.path}if(s.expires){var d;if(d=s.expires,"[object Date]"!==h.call(d)||!Number.isFinite(s.expires.valueOf()))throw TypeError(`option expires is invalid: ${s.expires}`);c+="; Expires="+s.expires.toUTCString()}if(s.httpOnly&&(c+="; HttpOnly"),s.secure&&(c+="; Secure"),s.partitioned&&(c+="; Partitioned"),s.priority)switch("string"==typeof s.priority?s.priority.toLowerCase():void 0){case"low":c+="; Priority=Low";break;case"medium":c+="; Priority=Medium";break;case"high":c+="; Priority=High";break;default:throw TypeError(`option priority is invalid: ${s.priority}`)}if(s.sameSite)switch("string"==typeof s.sameSite?s.sameSite.toLowerCase():s.sameSite){case!0:case"strict":c+="; SameSite=Strict";break;case"lax":c+="; SameSite=Lax";break;case"none":c+="; SameSite=None";break;default:throw TypeError(`option sameSite is invalid: ${s.sameSite}`)}return c}function f(e,t,r){let s=e.indexOf(";",t);return -1===s?r:s}function p(e,t,r){let s=e.indexOf("=",t);return s<r?s:-1}function g(e,t,r){let s=t,n=r;do{let t=e.charCodeAt(s);if(32!==t&&9!==t)break}while(++s<n)for(;n>s;){let t=e.charCodeAt(n-1);if(32!==t&&9!==t)break;n--}return e.slice(s,n)}function y(e){if(-1===e.indexOf("%"))return e;try{return decodeURIComponent(e)}catch(t){return e}}},83105,e=>{"use strict";let t,r,s;class n extends Error{constructor(e,t="FunctionsError",r){super(e),this.name=t,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class i extends n{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class a extends n{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class o extends n{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}function l(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&0>t.indexOf(s)&&(r[s]=e[s]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,s=Object.getOwnPropertySymbols(e);n<s.length;n++)0>t.indexOf(s[n])&&Object.prototype.propertyIsEnumerable.call(e,s[n])&&(r[s[n]]=e[s[n]]);return r}(b=w||(w={})).Any="any",b.ApNortheast1="ap-northeast-1",b.ApNortheast2="ap-northeast-2",b.ApSouth1="ap-south-1",b.ApSoutheast1="ap-southeast-1",b.ApSoutheast2="ap-southeast-2",b.CaCentral1="ca-central-1",b.EuCentral1="eu-central-1",b.EuWest1="eu-west-1",b.EuWest2="eu-west-2",b.EuWest3="eu-west-3",b.SaEast1="sa-east-1",b.UsEast1="us-east-1",b.UsWest1="us-west-1",b.UsWest2="us-west-2";"function"==typeof SuppressedError&&SuppressedError;class h{constructor(e,{headers:t={},customFetch:r,region:s=w.Any}={}){this.url=e,this.headers=t,this.region=s,this.fetch=(e=>e?(...t)=>e(...t):(...e)=>fetch(...e))(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){var t,r,s,n;return t=this,r=arguments,s=void 0,n=function*(e,t={}){var r;let s,n;try{let l,{headers:h,method:u,body:c,signal:d,timeout:f}=t,p={},{region:g}=t;g||(g=this.region);let y=new URL(`${this.url}/${e}`);g&&"any"!==g&&(p["x-region"]=g,y.searchParams.set("forceFunctionRegion",g)),c&&(h&&!Object.prototype.hasOwnProperty.call(h,"Content-Type")||!h)?"u">typeof Blob&&c instanceof Blob||c instanceof ArrayBuffer?(p["Content-Type"]="application/octet-stream",l=c):"string"==typeof c?(p["Content-Type"]="text/plain",l=c):"u">typeof FormData&&c instanceof FormData?l=c:(p["Content-Type"]="application/json",l=JSON.stringify(c)):l=!c||"string"==typeof c||"u">typeof Blob&&c instanceof Blob||c instanceof ArrayBuffer||"u">typeof FormData&&c instanceof FormData?c:JSON.stringify(c);let m=d;f&&(n=new AbortController,s=setTimeout(()=>n.abort(),f),d?(m=n.signal,d.addEventListener("abort",()=>n.abort())):m=n.signal);let b=yield this.fetch(y.toString(),{method:u||"POST",headers:Object.assign(Object.assign(Object.assign({},p),this.headers),h),body:l,signal:m}).catch(e=>{throw new i(e)}),w=b.headers.get("x-relay-error");if(w&&"true"===w)throw new a(b);if(!b.ok)throw new o(b);let v=(null!=(r=b.headers.get("Content-Type"))?r:"text/plain").split(";")[0].trim();return{data:"application/json"===v?yield b.json():"application/octet-stream"===v||"application/pdf"===v?yield b.blob():"text/event-stream"===v?b:"multipart/form-data"===v?yield b.formData():yield b.text(),error:null,response:b}}catch(e){return{data:null,error:e,response:e instanceof o||e instanceof a?e.context:void 0}}finally{s&&clearTimeout(s)}},new(s||(s=Promise))(function(e,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function o(e){try{l(n.throw(e))}catch(e){i(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof s?r:new s(function(e){e(r)})).then(a,o)}l((n=n.apply(t,r||[])).next())})}}let u=e=>Math.min(1e3*2**e,3e4),c=[520,503],d=["GET","HEAD","OPTIONS"];var f,p,g,y,m,b,w,v,_,k,S,E,T=class extends Error{constructor(e){super(e.message),this.name="PostgrestError",this.details=e.details,this.hint=e.hint,this.code=e.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function A(e,t){return new Promise(r=>{if(null==t?void 0:t.aborted)return void r();let s=setTimeout(()=>{null==t||t.removeEventListener("abort",n),r()},e);function n(){clearTimeout(s),r()}null==t||t.addEventListener("abort",n)})}var R=class{constructor(e){var t,r,s,n,i;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=e.method,this.url=e.url,this.headers=new Headers(e.headers),this.schema=e.schema,this.body=e.body,this.shouldThrowOnError=null!=(t=e.shouldThrowOnError)&&t,this.signal=e.signal,this.isMaybeSingle=null!=(r=e.isMaybeSingle)&&r,this.shouldStripNulls=null!=(s=e.shouldStripNulls)&&s,this.urlLengthLimit=null!=(n=e.urlLengthLimit)?n:8e3,this.retryEnabled=null==(i=e.retry)||i,e.fetch?this.fetch=e.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if("text/csv"===this.headers.get("Accept"))throw Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(e,t){return this.headers=new Headers(this.headers),this.headers.set(e,t),this}retry(e){return this.retryEnabled=e,this}then(e,t){var r=this;if(void 0===this.schema||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),"GET"!==this.method&&"HEAD"!==this.method&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){let e=this.headers.get("Accept");"application/vnd.pgrst.object+json"===e?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):e&&"application/json"!==e||this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}let s=this.fetch,n=(async()=>{let e=0;for(;;){var t,n,i,a,o;let l,h=new Headers(r.headers);e>0&&h.set("X-Retry-Count",String(e));try{l=await s(r.url.toString(),{method:r.method,headers:h,body:JSON.stringify(r.body,(e,t)=>"bigint"==typeof t?t.toString():t),signal:r.signal})}catch(t){if((null==t?void 0:t.name)==="AbortError"||(null==t?void 0:t.code)==="ABORT_ERR"||!d.includes(r.method))throw t;if(r.retryEnabled&&e<3){let t=u(e);e++,await A(t,r.signal);continue}throw t}if(t=r.method,n=l.status,i=e,r.retryEnabled&&!(i>=3)&&d.includes(t)&&c.includes(n)&&1){let t=null!=(a=null==(o=l.headers)?void 0:o.get("Retry-After"))?a:null,s=null!==t?1e3*Math.max(0,parseInt(t,10)||0):u(e);await l.text(),e++,await A(s,r.signal);continue}return await r.processResponse(l)}})();return this.shouldThrowOnError||(n=n.catch(e=>{var t,r,s,n,i,a;let o="",l="",h="",u=null==e?void 0:e.cause;if(u){let t=null!=(r=null==u?void 0:u.message)?r:"",a=null!=(s=null==u?void 0:u.code)?s:"";o=`${null!=(n=null==e?void 0:e.name)?n:"FetchError"}: ${null==e?void 0:e.message}
|
|
2
2
|
|
|
3
3
|
Caused by: ${null!=(i=null==u?void 0:u.name)?i:"Error"}: ${t}`,a&&(o+=` (${a})`),(null==u?void 0:u.stack)&&(o+=`
|
|
4
4
|
${u.stack}`)}else o=null!=(a=null==e?void 0:e.stack)?a:"";let c=this.url.toString().length;return(null==e?void 0:e.name)==="AbortError"||(null==e?void 0:e.code)==="ABORT_ERR"?(h="",l="Request was aborted (timeout or manual cancellation)",c>this.urlLengthLimit&&(l+=`. Note: Your request URL is ${c} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((null==u?void 0:u.name)==="HeadersOverflowError"||(null==u?void 0:u.code)==="UND_ERR_HEADERS_OVERFLOW")&&(h="",l="HTTP headers exceeded server limits (typically 16KB)",c>this.urlLengthLimit&&(l+=`. Your request URL is ${c} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${null!=(t=null==e?void 0:e.name)?t:"FetchError"}: ${null==e?void 0:e.message}`,details:o,hint:l,code:h},data:null,count:null,status:0,statusText:""}})),n.then(e,t)}async processResponse(e){var t,r,s;let n=null,i=null,a=null,o=e.status,l=e.statusText;if(e.ok){if("HEAD"!==this.method){let t=await e.text();""===t||(i="text/csv"===this.headers.get("Accept")||this.headers.get("Accept")&&(null==(s=this.headers.get("Accept"))?void 0:s.includes("application/vnd.pgrst.plan+text"))?t:JSON.parse(t))}let h=null==(t=this.headers.get("Prefer"))?void 0:t.match(/count=(exact|planned|estimated)/),u=null==(r=e.headers.get("content-range"))?void 0:r.split("/");h&&u&&u.length>1&&(a=parseInt(u[1])),this.isMaybeSingle&&Array.isArray(i)&&(i.length>1?(n={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,a=null,o=406,l="Not Acceptable"):i=1===i.length?i[0]:null)}else{let t=await e.text();try{n=JSON.parse(t),Array.isArray(n)&&404===e.status&&(i=[],n=null,o=200,l="OK")}catch(r){404===e.status&&""===t?(o=204,l="No Content"):n={message:t}}if(n&&this.shouldThrowOnError)throw new T(n)}return{success:null===n,error:n,data:i,count:a,status:o,statusText:l}}returns(){return this}overrideTypes(){return this}},O=class extends R{select(e){let t=!1,r=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!t?"":('"'===e&&(t=!t),e)).join("");return this.url.searchParams.set("select",r),this.headers.append("Prefer","return=representation"),this}order(e,{ascending:t=!0,nullsFirst:r,foreignTable:s,referencedTable:n=s}={}){let i=n?`${n}.order`:"order",a=this.url.searchParams.get(i);return this.url.searchParams.set(i,`${a?`${a},`:""}${e}.${t?"asc":"desc"}${void 0===r?"":r?".nullsfirst":".nullslast"}`),this}limit(e,{foreignTable:t,referencedTable:r=t}={}){let s=void 0===r?"limit":`${r}.limit`;return this.url.searchParams.set(s,`${e}`),this}range(e,t,{foreignTable:r,referencedTable:s=r}={}){let n=void 0===s?"offset":`${s}.offset`,i=void 0===s?"limit":`${s}.limit`;return this.url.searchParams.set(n,`${e}`),this.url.searchParams.set(i,`${t-e+1}`),this}abortSignal(e){return this.signal=e,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:e=!1,verbose:t=!1,settings:r=!1,buffers:s=!1,wal:n=!1,format:i="text"}={}){var a;let o=[e?"analyze":null,t?"verbose":null,r?"settings":null,s?"buffers":null,n?"wal":null].filter(Boolean).join("|"),l=null!=(a=this.headers.get("Accept"))?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${i}; for="${l}"; options=${o};`),this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(e){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${e}`),this}};let C=RegExp("[,()]");var P=class extends O{eq(e,t){return this.url.searchParams.append(e,`eq.${t}`),this}neq(e,t){return this.url.searchParams.append(e,`neq.${t}`),this}gt(e,t){return this.url.searchParams.append(e,`gt.${t}`),this}gte(e,t){return this.url.searchParams.append(e,`gte.${t}`),this}lt(e,t){return this.url.searchParams.append(e,`lt.${t}`),this}lte(e,t){return this.url.searchParams.append(e,`lte.${t}`),this}like(e,t){return this.url.searchParams.append(e,`like.${t}`),this}likeAllOf(e,t){return this.url.searchParams.append(e,`like(all).{${t.join(",")}}`),this}likeAnyOf(e,t){return this.url.searchParams.append(e,`like(any).{${t.join(",")}}`),this}ilike(e,t){return this.url.searchParams.append(e,`ilike.${t}`),this}ilikeAllOf(e,t){return this.url.searchParams.append(e,`ilike(all).{${t.join(",")}}`),this}ilikeAnyOf(e,t){return this.url.searchParams.append(e,`ilike(any).{${t.join(",")}}`),this}regexMatch(e,t){return this.url.searchParams.append(e,`match.${t}`),this}regexIMatch(e,t){return this.url.searchParams.append(e,`imatch.${t}`),this}is(e,t){return this.url.searchParams.append(e,`is.${t}`),this}isDistinct(e,t){return this.url.searchParams.append(e,`isdistinct.${t}`),this}in(e,t){let r=Array.from(new Set(t)).map(e=>"string"==typeof e&&C.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`in.(${r})`),this}notIn(e,t){let r=Array.from(new Set(t)).map(e=>"string"==typeof e&&C.test(e)?`"${e}"`:`${e}`).join(",");return this.url.searchParams.append(e,`not.in.(${r})`),this}contains(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cs.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cs.{${t.join(",")}}`):this.url.searchParams.append(e,`cs.${JSON.stringify(t)}`),this}containedBy(e,t){return"string"==typeof t?this.url.searchParams.append(e,`cd.${t}`):Array.isArray(t)?this.url.searchParams.append(e,`cd.{${t.join(",")}}`):this.url.searchParams.append(e,`cd.${JSON.stringify(t)}`),this}rangeGt(e,t){return this.url.searchParams.append(e,`sr.${t}`),this}rangeGte(e,t){return this.url.searchParams.append(e,`nxl.${t}`),this}rangeLt(e,t){return this.url.searchParams.append(e,`sl.${t}`),this}rangeLte(e,t){return this.url.searchParams.append(e,`nxr.${t}`),this}rangeAdjacent(e,t){return this.url.searchParams.append(e,`adj.${t}`),this}overlaps(e,t){return"string"==typeof t?this.url.searchParams.append(e,`ov.${t}`):this.url.searchParams.append(e,`ov.{${t.join(",")}}`),this}textSearch(e,t,{config:r,type:s}={}){let n="";"plain"===s?n="pl":"phrase"===s?n="ph":"websearch"===s&&(n="w");let i=void 0===r?"":`(${r})`;return this.url.searchParams.append(e,`${n}fts${i}.${t}`),this}match(e){return Object.entries(e).filter(([e,t])=>void 0!==t).forEach(([e,t])=>{this.url.searchParams.append(e,`eq.${t}`)}),this}not(e,t,r){return this.url.searchParams.append(e,`not.${t}.${r}`),this}or(e,{foreignTable:t,referencedTable:r=t}={}){let s=r?`${r}.or`:"or";return this.url.searchParams.append(s,`(${e})`),this}filter(e,t,r){return this.url.searchParams.append(e,`${t}.${r}`),this}},j=class{constructor(e,{headers:t={},schema:r,fetch:s,urlLengthLimit:n=8e3,retry:i}){this.url=e,this.headers=new Headers(t),this.schema=r,this.fetch=s,this.urlLengthLimit=n,this.retry=i}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(e,t){let{head:r=!1,count:s}=null!=t?t:{},n=!1,i=(null!=e?e:"*").split("").map(e=>/\s/.test(e)&&!n?"":('"'===e&&(n=!n),e)).join(""),{url:a,headers:o}=this.cloneRequestState();return a.searchParams.set("select",i),s&&o.append("Prefer",`count=${s}`),new P({method:r?"HEAD":"GET",url:a,headers:o,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(e,{count:t,defaultToNull:r=!0}={}){var s;let{url:n,headers:i}=this.cloneRequestState();if(t&&i.append("Prefer",`count=${t}`),r||i.append("Prefer","missing=default"),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);n.searchParams.set("columns",e.join(","))}}return new P({method:"POST",url:n,headers:i,schema:this.schema,body:e,fetch:null!=(s=this.fetch)?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(e,{onConflict:t,ignoreDuplicates:r=!1,count:s,defaultToNull:n=!0}={}){var i;let{url:a,headers:o}=this.cloneRequestState();if(o.append("Prefer",`resolution=${r?"ignore":"merge"}-duplicates`),void 0!==t&&a.searchParams.set("on_conflict",t),s&&o.append("Prefer",`count=${s}`),n||o.append("Prefer","missing=default"),Array.isArray(e)){let t=e.reduce((e,t)=>e.concat(Object.keys(t)),[]);if(t.length>0){let e=[...new Set(t)].map(e=>`"${e}"`);a.searchParams.set("columns",e.join(","))}}return new P({method:"POST",url:a,headers:o,schema:this.schema,body:e,fetch:null!=(i=this.fetch)?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(e,{count:t}={}){var r;let{url:s,headers:n}=this.cloneRequestState();return t&&n.append("Prefer",`count=${t}`),new P({method:"PATCH",url:s,headers:n,schema:this.schema,body:e,fetch:null!=(r=this.fetch)?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:e}={}){var t;let{url:r,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new P({method:"DELETE",url:r,headers:s,schema:this.schema,fetch:null!=(t=this.fetch)?t:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function I(e){return(I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,s)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach(function(t){!function(e,t,r){var s;(s=function(e,t){if("object"!=I(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=I(s))return s;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==I(s)?s:s+"")in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var N=class e{constructor(e,{headers:t={},schema:r,fetch:s,timeout:n,urlLengthLimit:i=8e3,retry:a}={}){this.url=e,this.headers=new Headers(t),this.schemaName=r,this.urlLengthLimit=i;const o=null!=s?s:globalThis.fetch;void 0!==n&&n>0?this.fetch=(e,t)=>{let r=new AbortController,s=setTimeout(()=>r.abort(),n),i=null==t?void 0:t.signal;if(i){if(i.aborted)return clearTimeout(s),o(e,t);let n=()=>{clearTimeout(s),r.abort()};return i.addEventListener("abort",n,{once:!0}),o(e,x(x({},t),{},{signal:r.signal})).finally(()=>{clearTimeout(s),i.removeEventListener("abort",n)})}return o(e,x(x({},t),{},{signal:r.signal})).finally(()=>clearTimeout(s))}:this.fetch=o,this.retry=a}from(e){if(!e||"string"!=typeof e||""===e.trim())throw Error("Invalid relation name: relation must be a non-empty string.");return new j(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(t){return new e(this.url,{headers:this.headers,schema:t,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,t={},{head:r=!1,get:s=!1,count:n}={}){var i;let a,o,l=new URL(`${this.url}/rpc/${e}`),h=e=>null!==e&&"object"==typeof e&&(!Array.isArray(e)||e.some(h)),u=r&&Object.values(t).some(h);u?(a="POST",o=t):r||s?(a=r?"HEAD":"GET",Object.entries(t).filter(([e,t])=>void 0!==t).map(([e,t])=>[e,Array.isArray(t)?`{${t.join(",")}}`:`${t}`]).forEach(([e,t])=>{l.searchParams.append(e,t)})):(a="POST",o=t);let c=new Headers(this.headers);return u?c.set("Prefer",n?`count=${n},return=minimal`:"return=minimal"):n&&c.set("Prefer",`count=${n}`),new P({method:a,url:l,headers:c,schema:this.schemaName,body:o,fetch:null!=(i=this.fetch)?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};let U=class{static detectEnvironment(){var t;if("u">typeof WebSocket)return{type:"native",wsConstructor:WebSocket};let r=globalThis;if("u">typeof globalThis&&void 0!==r.WebSocket)return{type:"native",wsConstructor:r.WebSocket};let s=e.g;if(s&&void 0!==s.WebSocket)return{type:"native",wsConstructor:s.WebSocket};if("u">typeof globalThis&&void 0!==r.WebSocketPair&&void 0===globalThis.WebSocket)return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if("u">typeof globalThis&&r.EdgeRuntime||"u">typeof navigator&&(null==(t=navigator.userAgent)?void 0:t.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};let n=globalThis.process;if(n){let e=n.versions;if(e&&e.node){let t=parseInt(e.node.replace(/^v/,"").split(".")[0]);return t>=22?void 0!==globalThis.WebSocket?{type:"native",wsConstructor:globalThis.WebSocket}:{type:"unsupported",error:`Node.js ${t} detected but native WebSocket not found.`,workaround:"Provide a WebSocket implementation via the transport option."}:{type:"unsupported",error:`Node.js ${t} detected without native WebSocket support.`,workaround:'For Node.js < 22, install "ws" package and provide it via the transport option:\nimport ws from "ws"\nnew RealtimeClient(url, { transport: ws })'}}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){let e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let t=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(t+=`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,79602,(e,t,n)=>{},36474,(e,t,n)=>{var a=e.i(96746);e.r(79602);var s=e.r(51268),r=s&&"object"==typeof s&&"default"in s?s:{default:s},i=void 0!==a.default&&a.default.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},o=function(){function e(e){var t=void 0===e?{}:e,n=t.name,a=void 0===n?"stylesheet":n,s=t.optimizeForSpeed,r=void 0===s?i:s;c(l(a),"`name` must be a string"),this._name=a,this._deletedRulePlaceholder="#"+a+"-deleted-rule____{}",c("boolean"==typeof r,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=r,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var o="u">typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=o?o.getAttribute("content"):null}var t,n=e.prototype;return n.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},n.isOptimizeForSpeed=function(){return this._optimizeForSpeed},n.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,"u">typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(i||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,n){return"number"==typeof n?e._serverSheet.cssRules[n]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),n},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},n.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},n.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},n.insertRule=function(e,t){if(c(l(e),"`insertRule` accepts only strings"),"u"<typeof window)return"number"!=typeof t&&(t=this._serverSheet.cssRules.length),this._serverSheet.insertRule(e,t),this._rulesCount++;if(this._optimizeForSpeed){var n=this.getSheet();"number"!=typeof t&&(t=n.cssRules.length);try{n.insertRule(e,t)}catch(t){return i||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var a=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,a))}return this._rulesCount++},n.replaceRule=function(e,t){if(this._optimizeForSpeed||"u"<typeof window){var n="u">typeof window?this.getSheet():this._serverSheet;if(t.trim()||(t=this._deletedRulePlaceholder),!n.cssRules[e])return e;n.deleteRule(e);try{n.insertRule(t,e)}catch(a){i||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),n.insertRule(this._deletedRulePlaceholder,e)}}else{var a=this._tags[e];c(a,"old rule at index `"+e+"` not found"),a.textContent=t}return e},n.deleteRule=function(e){if("u"<typeof window)return void this._serverSheet.deleteRule(e);if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},n.flush=function(){this._injected=!1,this._rulesCount=0,"u">typeof window?(this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]):this._serverSheet.cssRules=[]},n.cssRules=function(){var e=this;return"u"<typeof window?this._serverSheet.cssRules:this._tags.reduce(function(t,n){return n?t=t.concat(Array.prototype.map.call(e.getSheetForTag(n).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},n.makeStyleTag=function(e,t,n){t&&c(l(t),"makeStyleTag accepts only strings as second parameter");var a=document.createElement("style");this._nonce&&a.setAttribute("nonce",this._nonce),a.type="text/css",a.setAttribute("data-"+e,""),t&&a.appendChild(document.createTextNode(t));var s=document.head||document.getElementsByTagName("head")[0];return n?s.insertBefore(a,n):s.appendChild(a),a},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0},u={};function m(e,t){if(!t)return"jsx-"+e;var n=String(t),a=e+n;return u[a]||(u[a]="jsx-"+d(e+"-"+n)),u[a]}function h(e,t){"u"<typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var n=e+t;return u[n]||(u[n]=t.replace(/__jsx-style-dynamic-selector/g,e)),u[n]}var p=function(){function e(e){var t=void 0===e?{}:e,n=t.styleSheet,a=void 0===n?null:n,s=t.optimizeForSpeed,r=void 0!==s&&s;this._sheet=a||new o({name:"styled-jsx",optimizeForSpeed:r}),this._sheet.inject(),a&&"boolean"==typeof r&&(this._sheet.setOptimizeForSpeed(r),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"u">typeof window&&!this._fromServer&&(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var n=this.getIdAndRules(e),a=n.styleId,s=n.rules;if(a in this._instancesCounts){this._instancesCounts[a]+=1;return}var r=s.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[a]=r,this._instancesCounts[a]=1},t.remove=function(e){var t=this,n=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(n in this._instancesCounts,"styleId: `"+n+"` not found"),this._instancesCounts[n]-=1,this._instancesCounts[n]<1){var a=this._fromServer&&this._fromServer[n];a?(a.parentNode.removeChild(a),delete this._fromServer[n]):(this._indices[n].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[n]),delete this._instancesCounts[n]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],n=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return n[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,n;return t=this.cssRules(),void 0===(n=e)&&(n={}),t.map(function(e){var t=e[0],a=e[1];return r.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:n.nonce?n.nonce:void 0,dangerouslySetInnerHTML:{__html:a}})})},t.getIdAndRules=function(e){var t=e.children,n=e.dynamic,a=e.id;if(n){var s=m(a,n);return{styleId:s,rules:Array.isArray(t)?t.map(function(e){return h(s,e)}):[h(s,t)]}}return{styleId:m(a),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),f=s.createContext(null);function x(){return new p}function _(){return s.useContext(f)}f.displayName="StyleSheetContext";var g=r.default.useInsertionEffect||r.default.useLayoutEffect,b="u">typeof window?x():void 0;function v(e){var t=b||_();return t&&("u"<typeof window?t.add(e):g(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return m(e[0],e[1])}).join(" ")},n.StyleRegistry=function(e){var t=e.registry,n=e.children,a=s.useContext(f),i=s.useState(function(){return a||t||x()})[0];return r.default.createElement(f.Provider,{value:i},n)},n.createStyleRegistry=x,n.style=v,n.useStyleRegistry=_},19783,(e,t,n)=>{t.exports=e.r(36474).style},22482,e=>{"use strict";var t=e.i(8063),n=e.i(74323),a=e.i(51268);function s(){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:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),(0,t.jsx)("path",{d:"M17 21v-8H7v8"}),(0,t.jsx)("path",{d:"M7 3v5h8"})]})}var r=e.i(14260),i=e.i(92977),l=e.i(96947),o=e.i(52663),c=e.i(52405);function d(e="default"){let t="compact"===e?"bg-[position:right_0.55rem_center]":"bg-[position:right_0.65rem_center]",n="compact"===e?"!pe-8":"!pe-9";return`${(0,c.get_input_class_name)(e)} cursor-pointer appearance-none bg-size-[1rem] bg-no-repeat ${n} bg-[image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")] ${t}`}var u=e.i(69472),m=e.i(84545),h=e.i(50937),p=e.i(83327),f=e.i(59515);let x=[],_=null;var g=e.i(49532);function b(){var e=(0,g.read_entry_templates)();let t=e.map(e=>`${e.id}\0${e.name}\0${e.description}`).join("\n");if(null!==_&&_.templates_key===t)return _.snapshot;let n=0===e.length?x:Object.freeze(e.map(e=>({...e})));return _={templates_key:t,snapshot:n},n}function v(){return x}let y=new Set;function j(e){return y.add(e),()=>{y.delete(e)}}function w(e){if(void 0!==globalThis.window)try{globalThis.window.localStorage.setItem("super-time-tracker-entry-templates",JSON.stringify(e)),_=null,y.forEach(e=>{e()})}catch{}}let k="inline-flex size-10 shrink-0 cursor-pointer items-center justify-center rounded-[0.65rem] border border-panel-border bg-transparent text-muted transition-[background-color,color] duration-150 hover:bg-surface-hover hover:text-foreground focus-visible:outline-2 focus-visible:outline-input-focus-border focus-visible:outline-offset-1 disabled:cursor-not-allowed disabled:opacity-55 sm:aspect-square sm:h-full sm:w-auto sm:min-w-10 sm:max-w-11";function N({known_tags:e,on_submit:n,is_pending:x}){let _=(0,a.useSyncExternalStore)(j,b,v),[g,y]=(0,a.useState)(""),[S,E]=(0,a.useState)(""),[C,T]=(0,a.useState)(""),[A,$]=(0,a.useState)(null),[F,R]=(0,a.useState)(!1),z=(0,a.useSyncExternalStore)(m.entry_suggestion_provider_preference.subscribe,m.entry_suggestion_provider_preference.get_snapshot,m.entry_suggestion_provider_preference.get_server_snapshot),I=(0,a.useSyncExternalStore)(p.openai_api_key_preference.subscribe,p.openai_api_key_preference.get_snapshot,p.openai_api_key_preference.get_server_snapshot),M=(0,a.useSyncExternalStore)(u.claude_api_key_preference.subscribe,u.claude_api_key_preference.get_snapshot,u.claude_api_key_preference.get_server_snapshot),L=(0,a.useSyncExternalStore)(h.google_ai_api_key_preference.subscribe,h.google_ai_api_key_preference.get_snapshot,h.google_ai_api_key_preference.get_server_snapshot),D=(0,l.get_api_key_for_suggestion_provider)(z,{openai:I,claude:M,google_ai:L}),q="none"!==z&&D.trim().length>0,B=(0,a.useMemo)(()=>_.find(e=>e.id===g)??null,[_,g]),O=async()=>{if(q){R(!0),$(null);try{let e=await (0,f.request_ai_entry_description_suggestion)({provider:z,api_key:D,context:S,notes:""});E(e)}catch(e){$(e instanceof Error?e.message:String(e))}finally{R(!1)}}};return(0,t.jsxs)("form",{className:"flex flex-col gap-2 border border-panel-border bg-panel p-[1.1rem] shadow-sm",onSubmit:e=>{e.preventDefault();let t=S.trim();if(0===t.length)return;let a=C.trim();n({description:t,...a.length>0?{at:a}:{}}),E(""),T("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"check-in-description",children:"What are you working on?"}),(0,t.jsxs)("div",{className:"grid gap-2 sm:grid-cols-[minmax(0,1fr)_auto] sm:items-stretch",children:[(0,t.jsxs)("select",{className:d(),value:g,disabled:x||0===_.length,onChange:e=>{let t=e.target.value;y(t);let n=_.find(e=>e.id===t)??null;null!==n&&E(n.description)},children:[(0,t.jsx)("option",{value:"",children:0===_.length?"No templates":"Use a template…"}),_.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,t.jsxs)("div",{className:"flex w-fit gap-2 justify-self-start sm:h-full",children:[(0,t.jsx)("button",{type:"button",className:k,disabled:x||0===S.trim().length,"aria-label":"Save template",title:"Save template",onClick:()=>{let e=S.trim();if(0===e.length)return;let t=e.slice(0,40),n=globalThis.prompt("Template name",t.length>0?t:"New template");if(null===n)return;let a=n.trim();if(0===a.length)return;let s="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`,r=[..._,{id:s,name:a,description:e}];y(s),w(r)},children:(0,t.jsx)(s,{})}),(0,t.jsx)("button",{type:"button",className:k,disabled:x||null===B,"aria-label":"Delete template",title:"Delete template",onClick:()=>{if(null===B)return;let e=_.filter(e=>e.id!==B.id);y(""),w(e)},children:(0,t.jsx)(i.TrashIcon,{})})]})]}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-start",children:[(0,t.jsx)("div",{className:"min-w-0 sm:flex-1",children:(0,t.jsx)(r.TagAutocompleteInput,{id:"check-in-description",value:S,known_tags:e,placeholder:"e.g. crafting something @design",disabled:x,autoFocus:!0,on_change:E})}),(0,t.jsx)("div",{className:"sm:w-44 sm:shrink-0",children:(0,t.jsx)("input",{id:"check-in-at",className:(0,c.get_input_class_name)(),value:C,onChange:e=>T(e.target.value),placeholder:"Start (optional)","aria-label":"Start time (optional, natural language)",disabled:x})})]}),(0,t.jsxs)("div",{className:`grid gap-2 max-[860px]:grid-cols-1 ${q?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]"}`,children:[q?(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost"),disabled:x||F,onClick:()=>void O(),title:"Suggest description with AI",children:F?"Suggesting…":"Suggest"}):null,(0,t.jsx)("button",{type:"submit",className:`${(0,o.get_button_class_name)("primary")} ${q?"":"col-span-full"}`,disabled:x||0===S.trim().length,children:"Check in"})]}),null===A?null:(0,t.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:A})]})}var S=e.i(50994);let E=(0,a.forwardRef)(function({known_tags:e,is_pending:n,on_submit:s,trailing:r},i){let l="true"===(0,a.useSyncExternalStore)(S.check_in_form_collapsed_preference.subscribe,S.check_in_form_collapsed_preference.get_snapshot,S.check_in_form_collapsed_preference.get_server_snapshot),[c,d]=(0,a.useState)(!0);return((0,a.useEffect)(()=>{l&&d(!1)},[l]),(0,a.useImperativeHandle)(i,()=>({expand_and_focus:()=>{d(!0),globalThis.requestAnimationFrame(()=>{let e=document.getElementById("check-in-description");e instanceof HTMLElement&&e.focus()})}}),[]),l&&!c)?(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("primary"),disabled:n,onClick:()=>d(!0),children:"Check in"}),r]}):(0,t.jsx)(N,{known_tags:e,is_pending:n,on_submit:e=>{s(e),l&&d(!1)}})});var C=e.i(14974),T=e.i(48042),A=e.i(83391);function $(e,t,n){if(0===e.length)return null;let a=e.findIndex(e=>e.name===t),s=((-1===a?0:a)+("next"===n?1:-1)+e.length)%e.length;return e[s]?.name??null}var F=e.i(14574),R=e.i(66295),z=e.i(90299),I=e.i(53754),M=e.i(99211);function L({sheets:e,active_sheet_name:n,active_entry:s,is_pending:r,check_in_form_ref:i,active_entry_panel_ref:l,on_select_sheet:o,on_check_out:c,on_toggle_zen:d}){let u=(0,T.useRouter)(),[m,h]=(0,a.useState)(!1),p=(0,I.useCheckOutAction)(c),f=(0,a.useSyncExternalStore)(z.tracker_shortcut_map_preference.subscribe,z.tracker_shortcut_map_preference.get_snapshot,z.tracker_shortcut_map_preference.get_server_snapshot),x=(0,a.useMemo)(()=>(0,R.parse_tracker_shortcut_map)(f),[f]),_=x.help,g="?"===_?"?":_.toUpperCase(),b=(0,a.useMemo)(()=>{let t=null!==s,a="?"===_?["shift"]:[];return[{id:"help",label:g,description:"Show keyboard shortcuts",key:_,modifiers:a,action:()=>{h(e=>!e)}},{id:"check-in",label:x["check-in"].toUpperCase(),description:"Check in (focus description)",key:x["check-in"],is_available:()=>!r&&!t,action:()=>{i.current?.expand_and_focus()}},{id:"check-out",label:x["check-out"].toUpperCase(),description:"Check out",key:x["check-out"],is_available:()=>!r&&t,action:()=>{p().catch(()=>{})}},{id:"edit-entry",label:x["edit-entry"].toUpperCase(),description:"Edit active entry",key:x["edit-entry"],is_available:()=>!r&&t,action:()=>{l.current?.start_edit()}},{id:"add-note",label:x["add-note"].toUpperCase(),description:"Add note to active entry",key:x["add-note"],is_available:()=>!r&&t,action:()=>{l.current?.start_add_note()}},{id:"zen-mode",label:x["zen-mode"].toUpperCase(),description:"Toggle Zen Mode focus engine",key:x["zen-mode"],is_available:()=>!r,action:()=>{d()}},{id:"pomodoro",label:x.pomodoro.toUpperCase(),description:"Open Pomodoro",key:x.pomodoro,is_available:()=>!r,action:()=>{u.push("/pomodoro")}},{id:"previous-sheet",label:x["previous-sheet"],description:"Previous sheet",key:x["previous-sheet"],is_available:()=>!r&&e.length>1,action:()=>{let t=$(e,n,"previous");null!==t&&t!==n&&o(t)}},{id:"next-sheet",label:x["next-sheet"],description:"Next sheet",key:x["next-sheet"],is_available:()=>!r&&e.length>1,action:()=>{let t=$(e,n,"next");null!==t&&t!==n&&o(t)}}]},[s,l,n,i,p,r,o,d,u,_,g,x,e]);return((0,M.use_document_keyboard_shortcuts)(b),m)?(0,t.jsx)(A.KeyboardShortcutsDialog,{sections:(0,F.get_tracker_keyboard_shortcut_sections)(x),on_close:()=>h(!1)}):null}var D=e.i(18774),q=e.i(31113),B=e.i(72550);function O(){try{let e=window.localStorage.getItem(B.SHEET_TAG_FILTERS_STORAGE_KEY);if(null===e)return{};let t=JSON.parse(e);if(null===t||"object"!=typeof t)return{};return t}catch{return{}}}function V(e){let t=O()[e]??[],n=[],a=new Set;for(let e of t)try{let t=(0,q.normalize_stored_tag)(e);a.has(t)||(a.add(t),n.push(t))}catch{continue}return n}var U=e.i(86580);function P(e){return(0,U.get_stable_sheet_tag_filter_snapshot)(e,V(e))}function G(){return U.EMPTY_SHEET_TAG_FILTER}var H=e.i(98425),W=e.i(27850);function K(e,t){let n=O();0===t.length?delete n[e]:n[e]=t;try{window.localStorage.setItem(B.SHEET_TAG_FILTERS_STORAGE_KEY,JSON.stringify(n)),(0,W.schedule_ui_preferences_cloud_sync)()}catch{}(0,H.notify_sheet_tag_filters_subscribers)()}var Z=e.i(47540),J=e.i(62796);function Q(){return(0,a.useSyncExternalStore)(J.tag_filter_mode_preference.subscribe,J.tag_filter_mode_preference.get_snapshot,J.tag_filter_mode_preference.get_server_snapshot)}function Y({sheet_name:e,sheet_tags:n}){let s=Q(),r=(0,a.useSyncExternalStore)(H.subscribe_sheet_tag_filters,()=>P(e),G);if((0,a.useEffect)(()=>{!function(e,t){let n=V(e);if(0===n.length)return;let a=n.filter(e=>t.some(t=>(0,Z.tags_are_equal)(e,t)));a.length!==n.length&&K(e,a)}(e,n.map(e=>e.name))},[e,n]),0===n.length)return null;let i=r.length>0;return(0,t.jsxs)("fieldset",{className:"m-0 flex flex-wrap items-center gap-x-3 gap-y-2 border-0 p-0",children:[(0,t.jsx)("legend",{className:"sr-only",children:"Filter by tag"}),(0,t.jsx)("h2",{className:"m-0 shrink-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em]",children:"Filter by tag"}),(0,t.jsx)("p",{className:"m-0 shrink-0 text-[0.8rem] text-muted",children:"any"===s?"Show entries that include any selected tag.":"Show entries that include every selected tag."}),(0,t.jsxs)("div",{className:"ml-auto flex min-w-0 flex-wrap justify-end gap-1",children:[n.map(n=>{let a=r.some(e=>(0,Z.tags_are_equal)(e,n.name));return(0,t.jsxs)("button",{type:"button",className:`${(0,o.get_button_class_name)("ghost","small")} ${a?"border-accent-border bg-accent-soft text-foreground":""}`,"aria-pressed":a,onClick:()=>{var t;let a,s;return t=n.name,a=(0,q.normalize_stored_tag)(t),void((s=V(e)).some(e=>(0,Z.tags_are_equal)(e,a))?K(e,s.filter(e=>!(0,Z.tags_are_equal)(e,a))):K(e,[...s,a]))},children:[(0,D.format_display_tag)(n.name),(0,t.jsxs)("span",{className:"ml-1 font-normal text-muted",children:["(",n.entryCount,")"]})]},n.name)}),i?(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),onClick:()=>K(e,[]),children:"Clear filter"}):null]})]})}var X=e.i(70096),ee=e.i(87231),et=e.i(56586);function en({query:e,active_sheet:n,is_pending:a=!1,on_query_change:s}){let r=e.trim(),i=(0,ee.build_entry_search_href)({...(0,et.get_empty_entry_search_filters)(),query:r,sheetName:n});return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Search entries"}),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,t.jsx)("input",{type:"search",className:(0,c.get_input_class_name)("compact"),placeholder:"Search description, tags, notes…",value:e,disabled:a,"aria-label":"Search entries on this sheet",onChange:e=>s(e.target.value)}),r.length>0?(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:a,onClick:()=>s(""),children:"Clear"}):null]})]}),r.length>0?(0,t.jsx)(X.default,{className:"self-start text-[0.8rem] font-semibold text-accent no-underline hover:underline",href:i,children:"Search all sheets with filters"}):(0,t.jsx)(X.default,{className:"self-start text-[0.8rem] font-semibold text-muted no-underline hover:text-accent hover:underline",href:"/search",children:"Open global search"})]})}var ea=e.i(19946),es=e.i(37399);let er="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";function ei({sheet_name:e,is_pending:n,can_delete:s,is_archived:r=!1,on_rename:i,on_archive:l,on_unarchive:o,on_delete:c}){let[d,u]=(0,a.useState)(!1),m=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!d)return;let e=e=>{null===m.current||m.current.contains(e.target)||u(!1)};return document.addEventListener("pointerdown",e),()=>{document.removeEventListener("pointerdown",e)}},[d]);let h=()=>{u(!1)};return(0,t.jsxs)("div",{className:"relative shrink-0 self-center",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":`Actions for sheet ${e}`,"aria-expanded":d,"aria-haspopup":"menu",disabled:n,onClick:()=>u(e=>!e),children:(0,t.jsx)(es.HamburgerIcon,{})}),d?(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:[(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:er,role:"menuitem",disabled:n,onClick:()=>{h(),i()},children:"Rename"})}),r?(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:er,role:"menuitem",disabled:n||void 0===o,onClick:()=>{h(),o?.()},children:"Restore sheet"})}):(0,t.jsx)("div",{role:"none",children:(0,t.jsx)("button",{type:"button",className:er,role:"menuitem",disabled:n||void 0===l,onClick:()=>{h(),l?.()},children:"Archive sheet"})}),(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)("button",{type:"button",className:`${er} text-danger`,role:"menuitem",disabled:n||!s,title:s?void 0:"Cannot delete the last sheet",onClick:()=>{h(),c()},children:"Delete sheet"})})]}):null]})}var el=e.i(91966),eo=e.i(25204);function ec({sheets:e,db_path:n,on_select:s,on_create:r,on_rename:i,on_archive:l,on_delete:d,is_pending:u}){let{confirm:m}=(0,ea.use_confirm_dialog)(),h=(0,el.use_confirm_destructive_actions)(),p=e.filter(e=>!0!==e.archived),f=p.length>1,[x,_]=(0,a.useState)(!1),[g,b]=(0,a.useState)(""),[v,y]=(0,a.useState)(null),[j,w]=(0,a.useState)(""),k=()=>{_(!1),b("")},N=()=>{y(null),w("")};(0,eo.use_escape_to_cancel)(N,null!==v),(0,eo.use_escape_to_cancel)(k,x);let S=e=>{if(e.preventDefault(),null===v)return;let t=j.trim();0===t.length||t===v||i(v,t),N()};return(0,t.jsxs)("aside",{className:"flex min-w-0 flex-col gap-3 max-[860px]:min-w-0",children:[(0,t.jsx)("h2",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Sheets"}),(0,t.jsx)("ul",{className:"m-0 flex min-h-0 flex-1 list-none flex-col gap-1.5 p-0",children:p.map(e=>(0,t.jsx)("li",{className:"min-w-0",children:v===e.name?(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-1.5",onSubmit:S,children:[(0,t.jsx)("input",{className:(0,c.get_input_class_name)("compact"),value:j,onChange:e=>w(e.target.value),disabled:u,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)("button",{type:"submit",className:`${(0,o.get_button_class_name)("ghost")} flex-1`,disabled:u||0===j.trim().length,children:"Save"}),(0,t.jsx)("button",{type:"button",className:`${(0,o.get_button_class_name)("ghost")} flex-1`,disabled:u,onClick:N,children:"Cancel"})]})]}):(0,t.jsxs)("div",{className:"flex min-w-0 items-stretch gap-1",children:[(0,t.jsxs)("button",{type:"button",className:"flex min-w-0 flex-1 cursor-pointer items-center justify-between gap-2 rounded-md border border-transparent bg-transparent px-2.5 py-2 text-left transition-[background-color,color] duration-150 hover:bg-surface-hover",disabled:u&&!e.isActive,onClick:()=>s(e.name),children:[(0,t.jsx)("span",{className:`min-w-0 flex-1 truncate font-semibold ${e.isActive||e.hasActiveEntry?"text-accent":""}`,children:e.name}),(0,t.jsx)("span",{className:`shrink-0 text-xs whitespace-nowrap ${e.hasActiveEntry?"text-accent":"text-muted"}`,children:e.hasActiveEntry?"● active":`${e.entryCount} entries`})]}),(0,t.jsx)(ei,{sheet_name:e.name,is_pending:u,can_delete:f,on_rename:()=>{var t;y(t=e.name),w(t)},on_archive:async()=>{var t;(!h||await m((t=e.name,{title:"Archive sheet?",message:`Archive "${t}"? It will be hidden from the tracker and Sheets hub. You can restore it from the archived section on the Sheets page.`,confirmLabel:"Archive",variant:"danger"})))&&l(e.name)},on_delete:async()=>{var t,n,a;let s;(!h||await m((t=e.name,n=e.entryCount,a=e.hasActiveEntry,s=0===n?"":` This will delete ${n} ${1===n?"entry":"entries"}.`,{title:"Delete sheet?",message:`Delete "${t}"?${s}${a?" This will stop the active timer.":""}`,confirmLabel:"Delete sheet",variant:"danger"})))&&d(e.name)}})]})},e.name))}),x?(0,t.jsxs)("form",{className:"flex w-full min-w-0 flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=g.trim();0!==t.length&&(r(t),k())},children:[(0,t.jsx)("input",{className:(0,c.get_input_class_name)("compact"),value:g,onChange:e=>b(e.target.value),placeholder:"New sheet name",disabled:u,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)("button",{type:"submit",className:`${(0,o.get_button_class_name)("ghost")} flex-1`,disabled:u||0===g.trim().length,children:"Add"}),(0,t.jsx)("button",{type:"button",className:`${(0,o.get_button_class_name)("ghost")} flex-1`,disabled:u,onClick:k,children:"Cancel"})]})]}):(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost"),disabled:u,onClick:()=>_(!0),children:"Add sheet"}),(0,t.jsx)("p",{className:"mt-auto shrink-0 overflow-wrap-anywhere border-t border-panel-border pt-3 font-mono text-[0.65rem] leading-snug text-muted",title:n,children:n})]})}var ed=e.i(32584),eu=e.i(1800),em=e.i(60935);function eh(){return"true"===(0,a.useSyncExternalStore)(em.timer_show_seconds_preference.subscribe,em.timer_show_seconds_preference.get_snapshot,em.timer_show_seconds_preference.get_server_snapshot)}function ep({entry:e,in_bar:n,is_pending:s,initial_at:r,on_cancel:i,on_submit:l}){let d=(0,eu.use_duration_format)(),u=eh(),[m,h]=(0,a.useState)(()=>Date.now()-new Date(e.start).getTime()),[p,f]=(0,a.useState)(""),[x,_]=(0,a.useState)(r??""),g=(0,a.useRef)(null);(0,eo.use_escape_to_cancel)(i),(0,a.useEffect)(()=>{g.current?.focus()},[]),(0,a.useEffect)(()=>{h(Date.now()-new Date(e.start).getTime());let t=globalThis.setInterval(()=>{h(Date.now()-new Date(e.start).getTime())},1e3);return()=>globalThis.clearInterval(t)},[e.start]);let b=(0,ed.format_duration)(m,d,u),v=e.description||"Untitled entry";return(0,t.jsxs)("form",{className:"flex min-w-0 flex-col gap-4","aria-label":"Check out form",onSubmit:e=>{e.preventDefault();let t=p.trim(),n=x.trim(),a=t.length>0,s=n.length>0;a||s?l({...s?{at:n}:{},...a?{note:t}:{}}):l(void 0)},children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-[0.68rem] font-bold uppercase leading-none tracking-wider text-danger",children:"Checking out"}),(0,t.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.05rem] font-[650] leading-tight tracking-tight min-[560px]:text-[1.15rem]",children:v})]}),(0,t.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.4rem] font-medium leading-none tracking-tight text-accent min-[560px]:text-[1.6rem]",children:b})]}),e.tags.length>0?(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-[0.72rem] text-tag-text",children:(0,D.format_display_tag)(e)},e))}):null,(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-3 min-[640px]:grid-cols-[minmax(0,1fr)_minmax(10rem,14rem)]",children:[(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-note",children:[(0,t.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["Note ",(0,t.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,t.jsx)("input",{ref:g,id:"checkout-note",className:(0,c.get_input_class_name)("compact"),value:p,onChange:e=>f(e.target.value),placeholder:"Wrap-up, blockers, next steps…",disabled:s})]}),(0,t.jsxs)("label",{className:"flex min-w-0 flex-col gap-1",htmlFor:"checkout-at",children:[(0,t.jsxs)("span",{className:"text-[0.8rem] font-semibold",children:["End time ",(0,t.jsx)("span",{className:"font-normal text-muted",children:"(optional)"})]}),(0,t.jsx)("input",{id:"checkout-at",className:(0,c.get_input_class_name)("compact"),value:x,onChange:e=>_(e.target.value),placeholder:"e.g. now, 30 minutes ago, 5:30pm",disabled:s})]})]}),(0,t.jsxs)("div",{className:`flex flex-wrap items-center gap-2 ${n?"":"pt-1"}`,children:[(0,t.jsx)("button",{type:"submit",className:(0,o.get_button_class_name)("danger-solid"),disabled:s,children:"Confirm check out"}),(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost"),disabled:s,onClick:i,children:"Cancel"})]})]})}function ef(){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"})})}var ex=e.i(44356);function e_({entry:e,known_tags:n,is_pending:s,on_save:i,on_cancel:c}){let d=(0,a.useMemo)(()=>(0,ex.build_resume_description)(e.description,e.tags),[e.description,e.tags]),[x,_]=(0,a.useState)(d),[g,b]=(0,a.useState)(!1),[v,y]=(0,a.useState)(null),j=(0,a.useSyncExternalStore)(m.entry_suggestion_provider_preference.subscribe,m.entry_suggestion_provider_preference.get_snapshot,m.entry_suggestion_provider_preference.get_server_snapshot),w=(0,a.useSyncExternalStore)(p.openai_api_key_preference.subscribe,p.openai_api_key_preference.get_snapshot,p.openai_api_key_preference.get_server_snapshot),k=(0,a.useSyncExternalStore)(u.claude_api_key_preference.subscribe,u.claude_api_key_preference.get_snapshot,u.claude_api_key_preference.get_server_snapshot),N=(0,a.useSyncExternalStore)(h.google_ai_api_key_preference.subscribe,h.google_ai_api_key_preference.get_snapshot,h.google_ai_api_key_preference.get_server_snapshot),S=(0,l.get_api_key_for_suggestion_provider)(j,{openai:w,claude:k,google_ai:N}),E="none"!==j&&S.trim().length>0;(0,a.useEffect)(()=>{_((0,ex.build_resume_description)(e.description,e.tags))},[e.description,e.id,e.sheetName,e.tags]),(0,eo.use_escape_to_cancel)(c);let C=async()=>{if(E){b(!0),y(null);try{let t=e.notes.map(e=>e.text).join("\n"),n=await (0,f.request_ai_entry_description_suggestion)({provider:j,api_key:S,context:x,notes:t});_(n)}catch(e){y(e instanceof Error?e.message:String(e))}finally{b(!1)}}};return(0,t.jsxs)("form",{className:"flex min-w-0 flex-1 flex-col gap-2",onSubmit:e=>{e.preventDefault();let t=x.trim();t===d.trim()?c():i(t)},children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 max-[700px]:flex-col max-[700px]:items-start",children:[(0,t.jsx)("div",{className:"min-w-0 flex-1",children:(0,t.jsx)(r.TagAutocompleteInput,{id:`active-entry-description-${e.id}`,value:x,known_tags:n,placeholder:"e.g. crafting something @design",disabled:s,autoFocus:!0,on_change:_})}),(0,t.jsxs)("div",{className:"flex shrink-0 flex-wrap gap-2 max-[700px]:w-full",children:[E?(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:s||g,title:"Revise description with AI","aria-label":"Revise description with AI",onClick:()=>void C(),children:(0,t.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,t.jsx)(ef,{}),g?"Revising…":"Revise with AI"]})}):null,(0,t.jsx)("button",{type:"submit",className:(0,o.get_button_class_name)("primary","small"),disabled:s||x.trim()===d.trim(),children:"Save"}),(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost","small"),disabled:s,onClick:c,children:"Cancel"})]})]}),null===v?null:(0,t.jsx)("p",{className:"m-0 text-[0.8rem] text-danger",children:v})]})}var eg=e.i(50459);let eb=`${(0,o.get_button_class_name)("danger-solid")} rounded-none first:rounded-l-[0.65rem] last:rounded-r-[0.65rem] not-first:-ml-px not-first:min-w-12 not-first:border-l not-first:border-l-[color-mix(in_srgb,#ffffff_30%,var(--danger-solid))] min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1 max-[560px]:basis-1/2`;function ev({in_bar:e=!1,is_pending:n,on_start_checkout:a}){return(0,t.jsxs)("div",{className:`inline-flex min-w-0 max-w-full ${e?"max-[560px]:w-full":"min-w-30 max-[560px]:w-full"}`,children:[(0,t.jsx)("button",{type:"button",className:eb,disabled:n,onClick:()=>a(),children:"Check out"}),(0,t.jsx)("button",{type:"button",className:eb,disabled:n,title:"Check out at a specific time",onClick:()=>{let e=(0,eg.prompt_check_out_at)();null!==e&&a(e)},children:"@"})]})}var ey=e.i(28098),ej=e.i(7568),ew=e.i(4903);function ek({on_submit:e,on_cancel:n,is_pending:s,in_active_panel:r=!1,in_bar:i=!1,allow_at:l=!1}){let[d,u]=(0,a.useState)(""),[m,h]=(0,a.useState)("");return(0,eo.use_escape_to_cancel)(()=>n?.(),void 0!==n),(0,t.jsxs)("form",{className:`flex flex-col gap-2 ${r&&!i?"border-t border-accent-border pt-4":i?"border-t border-[color-mix(in_srgb,var(--accent-border)_65%,var(--panel-border))] pt-3.5":""}`,onSubmit:t=>{t.preventDefault();let n=d.trim();if(0===n.length)return;let a=m.trim();e(n,a.length>0?a:void 0),u(""),h("")},children:[(0,t.jsx)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-text",children:"Add note"}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-2 max-[860px]:grid-cols-1",children:[(0,t.jsx)("input",{id:"note-text",className:(0,c.get_input_class_name)(),value:d,onChange:e=>u(e.target.value),placeholder:"Pair with alice on the widget",disabled:s,autoFocus:!0}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 max-[860px]:w-full",children:[(0,t.jsx)("button",{type:"submit",className:(0,o.get_button_class_name)("ghost"),disabled:s||0===d.trim().length,children:"Save note"}),void 0===n?null:(0,t.jsx)("button",{type:"button",className:(0,o.get_button_class_name)("ghost"),disabled:s,onClick:n,children:"Cancel"})]})]}),l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("label",{className:"text-[0.85rem] text-muted",htmlFor:"note-at",children:["Note time"," ",(0,t.jsx)("span",{className:"font-normal opacity-85",children:"(optional, natural language)"})]}),(0,t.jsx)("input",{id:"note-at",className:(0,c.get_input_class_name)(),value:m,onChange:e=>h(e.target.value),placeholder:"e.g. 30 minutes ago",disabled:s})]}):null]})}var eN=e.i(34937),eS=e.i(76379),eE=e.i(7554),eC=e.i(27707);let eT=(0,a.forwardRef)(function({entry:e,sheets:n,known_tags:s,in_bar:r=!1,on_check_out:i,on_delete:l,on_edit:c,on_move:d,on_add_note:u,on_edit_note:m,on_delete_note:h,is_pending:p},f){var x;let _,{confirm:g}=(0,ea.use_confirm_dialog)(),b=(0,el.use_confirm_destructive_actions)(),v=(0,eS.use_confirm_before_checkout)(),y=(0,eu.use_duration_format)(),j=eh(),[w,k]=(0,a.useState)(e.durationMs),[N,S]=(0,a.useState)(!1),[E,C]=(0,a.useState)(!1),[T,A]=(0,a.useState)(!1),[$,F]=(0,a.useState)(!1),[R,z]=(0,a.useState)(void 0);(0,a.useImperativeHandle)(f,()=>({start_edit:()=>{N||E||$||S(!0)},start_add_note:()=>{N||E||T||$||A(!0)}}),[T,N,E,$]),(0,a.useEffect)(()=>{A(!1),S(!1),C(!1),F(!1),z(void 0)},[e.id,e.sheetName]),(0,a.useEffect)(()=>{k(e.durationMs);let t=globalThis.setInterval(()=>{k(Date.now()-new Date(e.start).getTime())},1e3);return()=>globalThis.clearInterval(t)},[e.durationMs,e.start]);let I=()=>{F(!1),z(void 0)},M=async e=>{(!v||await g((0,eE.get_check_out_confirm_dialog)(e)))&&(i(e),I())},L=(x=N||E||$,_="flex flex-col gap-4 rounded-lg border border-accent-border p-[1.1rem] shadow-sm",r?x?`${_} rounded-md border border-accent-border bg-[color-mix(in_srgb,var(--panel)_70%,var(--background))] p-3.5`:"flex flex-col gap-3 border-0 bg-transparent p-0 shadow-none":`${_} bg-[image:var(--active-panel-bg)]`),q=async(e,t)=>{let n,a;(!b||await g({title:"Delete note?",message:(a=(n=t.trim()).length>80?`${n.slice(0,80)}…`:n).length>0?`Remove this note? "${a}"`:"Remove this note?",confirmLabel:"Delete",variant:"danger"}))&&h(e,t)},B=(0,t.jsx)(ey.EntryActionsMenu,{current_sheet_name:e.sheetName,sheets:n,is_pending:p,on_edit:()=>C(!0),on_show_add_note_form:()=>A(!0),on_move:d,on_delete:async()=>{(!b||await g((0,eC.get_delete_entry_confirm_dialog)(e)))&&l()}});return $?(0,t.jsx)("section",{className:L,"aria-label":"Check out active entry",children:(0,t.jsx)(ep,{entry:e,in_bar:r,is_pending:p,initial_at:R,on_cancel:I,on_submit:e=>{M(e)}})}):E?(0,t.jsx)("section",{className:L,children:(0,t.jsx)(ej.EntryEditForm,{entry:e,known_tags:s,is_pending:p,in_active_panel:!0,times_only:!0,start_only:!0,on_cancel:()=>C(!1),on_save:e=>{c(e),C(!1)}})}):(0,t.jsxs)("section",{className:L,children:[(0,t.jsxs)("div",{className:"flex min-w-0 shrink-0 items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1.5",children:[r?null:(0,t.jsx)("span",{className:"self-start rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),N?(0,t.jsx)(e_,{entry:e,known_tags:s,is_pending:p,on_cancel:()=>S(!1),on_save:e=>{c({description:e}),S(!1)}}):(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-1",children:[(0,t.jsx)("h2",{className:"m-0 min-w-0 truncate text-[1.12rem] font-[650] leading-tight tracking-tight min-[560px]:text-xl",children:e.description||"Untitled entry"}),(0,t.jsx)("button",{type:"button",className:"inline-flex h-7 w-7 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","aria-label":"Edit description",title:"Edit description",disabled:p||T,onClick:()=>S(!0),children:(0,t.jsx)(eN.PencilIcon,{})})]})]}),r?null:(0,t.jsx)("div",{className:"max-[560px]:self-end",children:B})]}),(0,t.jsxs)("div",{className:`flex shrink-0 items-end justify-between gap-4 max-[860px]:flex-col max-[860px]:items-stretch ${r?"px-3":""}`,children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsx)("p",{className:"m-0 whitespace-nowrap font-mono text-[1.65rem] font-medium leading-none tracking-tight text-accent min-[440px]:text-[1.85rem] min-[560px]:text-[2rem]",children:(0,ed.format_duration)(w,y,j)}),N||0===e.tags.length?null:(0,t.jsx)("ul",{className:"m-0 flex list-none flex-wrap gap-1.5 p-0",children:e.tags.map(e=>(0,t.jsx)("li",{className:"rounded-full bg-tag-bg px-2 py-0.5 text-xs text-tag-text",children:(0,D.format_display_tag)(e)},e))})]}),(0,t.jsxs)("div",{className:`flex min-w-0 shrink-0 flex-wrap items-center justify-end gap-2 max-[560px]:flex-col max-[560px]:items-stretch ${r?"w-full":"min-w-30 max-[860px]:w-full max-[860px]:justify-stretch"}`,children:[T?null:(0,t.jsx)("button",{type:"button",className:`${(0,o.get_button_class_name)("ghost")} min-w-0 min-[561px]:px-2.5 min-[561px]:py-2 min-[561px]:text-[0.9rem] max-[560px]:flex-1`,disabled:p||N,onClick:()=>A(!0),children:"Add note"}),(0,t.jsx)(ev,{in_bar:r,is_pending:p,on_start_checkout:e=>{p||(S(!1),C(!1),A(!1),z(e),F(!0))}})]})]}),(0,t.jsx)(ew.EntryNotesList,{notes:e.notes,variant:"panel",in_bar:r,is_pending:p,on_edit_note:m,on_delete_note:q}),T?(0,t.jsx)("div",{className:"shrink-0",children:(0,t.jsx)(ek,{in_active_panel:!0,in_bar:r,allow_at:!0,is_pending:p,on_cancel:()=>A(!1),on_submit:(e,t)=>{u(e,t),A(!1)}})}):null]})});var eA=e.i(15526);let e$=(0,a.forwardRef)(function({active_entry:e,sheets:n,known_tags:s,is_pending:r,on_check_out:i,on_delete:l,on_edit:o,on_move:c,on_add_note:d,on_edit_note:u,on_delete_note:m,on_enter_zen:h},p){let{confirm:f}=(0,ea.use_confirm_dialog)(),x=(0,el.use_confirm_destructive_actions)(),_=(0,a.useRef)(null);return((0,a.useImperativeHandle)(p,()=>({start_edit:()=>{_.current?.start_edit()},start_add_note:()=>{_.current?.start_add_note()}})),null===e)?null:(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,t.jsxs)("span",{className:"text-[0.72rem] font-semibold uppercase tracking-[0.04em] text-muted whitespace-nowrap truncate",children:["Sheet ",e.sheetName]}),(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-accent px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-accent-text-on",children:"Tracking"}),(0,eA.is_pomodoro_task_entry)(e)?(0,t.jsx)("span",{className:"shrink-0 rounded-full border border-panel-border bg-surface-raised px-2 py-0.5 text-[0.68rem] font-bold uppercase leading-none tracking-wider text-foreground",children:"Pomodoro"}):null,(0,t.jsxs)("div",{className:"ml-auto flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",className:"inline-flex h-7 px-2.5 shrink-0 cursor-pointer items-center justify-center rounded-[0.35rem] border border-accent-border/30 bg-accent-soft px-3 text-[0.72rem] font-bold text-accent hover:bg-accent/15 hover:scale-105 active:scale-95 transition-all duration-150",onClick:h,title:"🧘 Enter Zen Mode focus environment",children:[(0,t.jsx)("span",{className:"me-1",children:"🧘"})," Zen Mode"]}),(0,t.jsx)(ey.EntryActionsMenu,{current_sheet_name:e.sheetName,sheets:n,is_pending:r,on_edit:()=>_.current?.start_edit(),on_show_add_note_form:()=>_.current?.start_add_note(),on_move:c,on_delete:async()=>{(!x||await f((0,eC.get_delete_entry_confirm_dialog)(e)))&&l()}})]})]}),(0,t.jsx)(eT,{ref:_,entry:e,sheets:n,known_tags:s,in_bar:!0,is_pending:r,on_check_out:i,on_delete:l,on_edit:o,on_move:c,on_add_note:d,on_edit_note:u,on_delete_note:m},`${e.sheetName}-${e.id}`)]})});var eF=e.i(16967);let eR="super-time-tracker";function ez({active_entry:e}){let t="true"===(0,a.useSyncExternalStore)(eF.timer_in_title_preference.subscribe,eF.timer_in_title_preference.get_snapshot,eF.timer_in_title_preference.get_server_snapshot),n=(0,eu.use_duration_format)(),s=eh(),[r,i]=(0,a.useState)(e?.durationMs??0);return(0,a.useEffect)(()=>{if(null===e)return void i(0);i(e.durationMs);let t=window.setInterval(()=>{i(Date.now()-new Date(e.start).getTime())},1e3);return()=>window.clearInterval(t)},[e]),(0,a.useEffect)(()=>{if(!t||null===e){document.title=eR;return}let a=e.description.trim()||"Tracking",i=(0,ed.format_duration)(r,n,s);return document.title=`${i} — ${a}`,()=>{document.title=eR}},[e,n,r,s,t]),null}let eI=`${(0,o.get_button_class_name)("primary")} inline-flex min-w-40 flex-col items-center justify-center whitespace-nowrap text-center text-accent-text-on`;function eM(){return(0,t.jsxs)(X.default,{href:"/pomodoro",className:eI,"aria-label":"Open Pomodoro timer",children:[(0,t.jsx)("span",{className:"text-[0.9rem] leading-none text-accent-text-on",children:"Start Pomodoro"}),(0,t.jsx)("span",{className:"mt-1 text-[0.72rem] font-medium leading-none text-accent-text-on opacity-85",children:"Focus timer"})]})}var eL=e.i(75404),eD=e.i(19783);let eq=[{text:"Concentrate all your thoughts upon the work at hand. The sun's rays do not burn until brought to a focus.",author:"Alexander Graham Bell"},{text:"Adopt the pace of nature: her secret is patience.",author:"Ralph Waldo Emerson"},{text:"Simplicity is the ultimate sophistication.",author:"Leonardo da Vinci"},{text:"Deep work is not some nostalgic affectation... It is an indispensable skill in our economy.",author:"Cal Newport"},{text:"The successful warrior is the average man, with laser-like focus.",author:"Bruce Lee"},{text:"Be present in all things and thankful for all things.",author:"Maya Angelou"},{text:"Focus is a muscle, and you build it through practice.",author:"Mindfulness Practice"},{text:"In the middle of difficulty lies opportunity.",author:"Albert Einstein"},{text:"Quiet the mind and the soul will speak.",author:"Ma Jaya Sati Bhagavati"},{text:"Flow is the state of being completely involved in an activity for its own sake.",author:"Mihaly Csikszentmihalyi"}];function eB({active_entry:e,sheets:n,known_tags:s,is_pending:i,on_check_in:l,on_check_out:c,on_add_note:u,on_close:m}){let h,p,f,x,_,[g,b]=(0,a.useState)(!0),[v,y]=(0,a.useState)(!1),[j,w]=(0,a.useState)(0),[k,N]=(0,a.useState)(0),[S,E]=(0,a.useState)(""),[C,T]=(0,a.useState)("idle"),[A,$]=(0,a.useState)(""),[F,R]=(0,a.useState)(""),[z,I]=(0,a.useState)("none"),[M,L]=(0,a.useState)(.3),[q,B]=(0,a.useState)("off"),[O,V]=(0,a.useState)(0),U=(0,a.useRef)(null),P=(0,a.useRef)([]),G=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(n.length>0&&!F){let e=n.find(e=>e.isActive),t=n.find(e=>!e.archived);R(e?.name??t?.name??"main")}},[n,F]),(0,a.useEffect)(()=>{if(!e)return;N(e.durationMs);let t=setInterval(()=>{N(Date.now()-new Date(e.start).getTime())},1e3);return()=>clearInterval(t)},[e]),(0,a.useEffect)(()=>{let e=setInterval(()=>{w(e=>(e+1)%eq.length)},45e3);return()=>clearInterval(e)},[]),(0,a.useEffect)(()=>{let e=()=>{y(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e)}},[]),(0,a.useEffect)(()=>{if("off"===q)return void V(0);let e=setInterval(()=>{V(e=>(e+1)%("box"===q?16:19))},1e3);return()=>clearInterval(e)},[q]);let H=()=>{if(P.current.forEach(e=>{try{"stop"in e&&"function"==typeof e.stop&&e.stop()}catch{}try{e.disconnect()}catch{}}),P.current=[],G.current){try{G.current.disconnect()}catch{}G.current=null}},W=()=>{if(!U.current){let e=window.AudioContext??window.webkitAudioContext;e&&(U.current=new e)}return U.current};(0,a.useEffect)(()=>{G.current&&U.current&&G.current.gain.setValueAtTime(M,U.current.currentTime)},[M]),(0,a.useEffect)(()=>{if(H(),"none"===z)return;let e=W();if(!e)return;"suspended"===e.state&&e.resume();let t=e.createGain();t.gain.setValueAtTime(M,e.currentTime),t.connect(e.destination),G.current=t;try{if("brown"===z){let n=2*e.sampleRate,a=e.createBuffer(1,n,e.sampleRate),s=a.getChannelData(0),r=0;for(let e=0;e<n;e++){let t=2*Math.random()-1;s[e]=(r+.02*t)/1.02,r=s[e],s[e]*=3.5}let i=e.createBufferSource();i.buffer=a,i.loop=!0;let l=e.createBiquadFilter();l.type="lowpass",l.frequency.setValueAtTime(300,e.currentTime),i.connect(l),l.connect(t),i.start(0),P.current.push(i,l)}else if("waves"===z){let n=2*e.sampleRate,a=e.createBuffer(1,n,e.sampleRate),s=a.getChannelData(0),r=0;for(let e=0;e<n;e++){let t=2*Math.random()-1;s[e]=(r+.02*t)/1.02,r=s[e],s[e]*=3.5}let i=e.createBufferSource();i.buffer=a,i.loop=!0;let l=e.createBiquadFilter();l.type="lowpass",l.Q.setValueAtTime(1,e.currentTime),l.frequency.setValueAtTime(350,e.currentTime);let o=e.createGain();o.gain.setValueAtTime(.55,e.currentTime),i.connect(l),l.connect(o),o.connect(t);let c=e.createOscillator();c.frequency.setValueAtTime(.08,e.currentTime);let d=e.createGain();d.gain.setValueAtTime(220,e.currentTime);let u=e.createGain();u.gain.setValueAtTime(.35,e.currentTime),c.connect(d),d.connect(l.frequency),c.connect(u),u.connect(o.gain),i.start(0),c.start(0),P.current.push(i,l,o,c,d,u)}else if("rain"===z){let n=2*e.sampleRate,a=e.createBuffer(1,n,e.sampleRate),s=a.getChannelData(0);for(let e=0;e<n;e++)s[e]=2*Math.random()-1;let r=e.createBufferSource();r.buffer=a,r.loop=!0;let i=e.createBiquadFilter();i.type="bandpass",i.frequency.setValueAtTime(1e3,e.currentTime),i.Q.setValueAtTime(.8,e.currentTime);let l=e.createBiquadFilter();l.type="highpass",l.frequency.setValueAtTime(2e3,e.currentTime);let o=e.createGain();o.gain.setValueAtTime(.4,e.currentTime);let c=e.createGain();c.gain.setValueAtTime(.18,e.currentTime),r.connect(i),i.connect(o),o.connect(t),r.connect(l),l.connect(c),c.connect(t),r.start(0),P.current.push(r,i,l,o,c)}else if("drone"===z){let n=e.createBiquadFilter();n.type="lowpass",n.frequency.setValueAtTime(280,e.currentTime),n.Q.setValueAtTime(3.5,e.currentTime),n.connect(t),P.current.push(n),[87.31,130.965,174.62,218.275,261.93].forEach((t,a)=>{let s=e.createOscillator();s.type=a%2==0?"triangle":"sine",s.frequency.setValueAtTime(t+(Math.random()-.5)*.4,e.currentTime);let r=e.createGain();r.gain.setValueAtTime(.15/(a+1),e.currentTime),s.connect(r),r.connect(n),s.start(0),P.current.push(s,r)});let a=e.createOscillator();a.frequency.setValueAtTime(.045,e.currentTime);let s=e.createGain();s.gain.setValueAtTime(130,e.currentTime),a.connect(s),s.connect(n.frequency),a.start(0),P.current.push(a,s)}}catch(e){console.error("Failed to play synthesized audio:",e)}return()=>H()},[z,M]),(0,a.useEffect)(()=>()=>{H(),U.current&&U.current.close()},[]);let K=async e=>{e.preventDefault();let t=S.trim();if(t){T("saving");try{await u(t),T("saved"),E(""),setTimeout(()=>T("idle"),1500)}catch{T("idle")}}},Z=(()=>{if("off"===q)return{text:"",scale:1,phase:""};if("box"===q)if(O<4)return{text:"Breathe In",scale:1+O/4*.45,phase:"inhale"};else if(O<8)return{text:"Hold",scale:1.45,phase:"hold"};else if(O<12)return{text:"Breathe Out",scale:1.45-(O-8)/4*.45,phase:"exhale"};else return{text:"Hold",scale:1,phase:"hold"};return O<4?{text:"Breathe In",scale:1+O/4*.45,phase:"inhale"}:O<11?{text:"Hold",scale:1.45,phase:"hold"}:{text:"Breathe Out",scale:1.45-(O-11)/8*.45,phase:"exhale"}})();return(0,t.jsxs)("div",{onClick:()=>{let e=W();e&&"suspended"===e.state&&e.resume()},onKeyDown:e=>{"Escape"===e.key&&m()},tabIndex:0,className:"jsx-6b5ea921a3c403a3 fixed inset-0 z-50 flex flex-col justify-between overflow-y-auto zen-ambient-bg px-6 py-8 text-foreground select-none focus:outline-none sm:px-12 sm:py-10",children:[(0,t.jsx)(eD.default,{id:"6b5ea921a3c403a3",children:"@keyframes zen-gradient-shift{0%{background-position:0%}50%{background-position:100%}to{background-position:0%}}.zen-ambient-bg{background:linear-gradient(-45deg,#07090d,#0d1620,#0a181b,#090e15) 0 0/400% 400% fixed;animation:30s infinite zen-gradient-shift}.zen-glass{-webkit-backdrop-filter:blur(16px);background:#12161f8c;border:1px solid #ffffff0d}.zen-glass-hover:hover{background:#12161fb3;border-color:#5eead426}.breathing-ring-pulse{box-shadow:0 0 35px 5px #5eead433}"}),(0,t.jsxs)("header",{className:"jsx-6b5ea921a3c403a3 flex w-full items-center justify-between z-10",children:[(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 flex items-center gap-3",children:(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 font-mono text-[0.7rem] font-bold uppercase tracking-[0.2em] text-accent",children:"🧘 Flow State Engine"})}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex items-center gap-3",children:[e&&(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex items-center gap-2 rounded-full zen-glass px-3 py-1.5 text-xs text-muted",children:[(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3",children:"Show seconds"}),(0,t.jsx)("button",{type:"button",onClick:()=>b(!g),"aria-label":"Toggle seconds",className:`jsx-6b5ea921a3c403a3 relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none ${g?"bg-accent":"bg-tag-bg"}`,children:(0,t.jsx)("span",{className:`jsx-6b5ea921a3c403a3 pointer-events-none inline-block h-4 w-4 transform rounded-full bg-foreground shadow-sm ring-0 transition duration-200 ease-in-out ${g?"translate-x-4":"translate-x-0"}`})})]}),(0,t.jsx)("button",{type:"button",title:"Toggle fullscreen",onClick:()=>{document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen().catch(e=>{console.warn("Fullscreen permission denied:",e)})},"aria-label":"Toggle fullscreen",className:"jsx-6b5ea921a3c403a3 flex h-9 w-9 items-center justify-center rounded-full zen-glass text-muted hover:text-foreground hover:scale-105 transition-all duration-150",children:v?(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-6b5ea921a3c403a3",children:(0,t.jsx)("path",{d:"M4 14h6v-6M20 10h-6v6M14 4v6h6M10 20v-6H4",className:"jsx-6b5ea921a3c403a3"})}):(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-6b5ea921a3c403a3",children:(0,t.jsx)("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3",className:"jsx-6b5ea921a3c403a3"})})}),(0,t.jsx)("button",{type:"button",title:"Exit Zen Mode (Esc)",onClick:m,className:"jsx-6b5ea921a3c403a3 flex h-9 px-4 items-center justify-center rounded-full zen-glass text-muted hover:text-foreground hover:bg-danger-soft hover:border-danger-border hover:scale-105 transition-all duration-150 text-xs font-medium",children:"Close Flow"})]})]}),(0,t.jsx)("main",{className:"jsx-6b5ea921a3c403a3 flex-1 flex flex-col justify-center items-center py-6 w-full max-w-4xl mx-auto z-10",children:e?(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 w-full flex flex-col items-center justify-center gap-10",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 relative flex items-center justify-center w-72 h-72 sm:w-80 sm:h-80 select-none",children:["off"!==q&&(0,t.jsx)("div",{style:{width:`${100*Z.scale}%`,height:`${100*Z.scale}%`},className:"jsx-6b5ea921a3c403a3 absolute rounded-full border border-accent/20 bg-accent/5 breathing-ring-pulse transition-all duration-1000 ease-in-out"}),"off"!==q&&(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 absolute -top-6 text-center",children:(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-xs uppercase tracking-[0.2em] text-accent/70 font-semibold transition-all duration-300",children:Z.text})}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 absolute w-60 h-60 rounded-full zen-glass flex flex-col items-center justify-center shadow-lg border border-white/5",children:[(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-xs text-muted font-mono uppercase tracking-[0.15em] mb-1",children:"focus session"}),(0,t.jsx)("h1",{className:"jsx-6b5ea921a3c403a3 text-4xl sm:text-5xl font-[500] font-mono tracking-tighter text-foreground mb-2 drop-shadow-md select-text",children:(p=Math.floor((h=Math.floor(k/1e3))/3600),f=Math.floor(h%3600/60),x=h%60,_=e=>String(e).padStart(2,"0"),p>0?g?`${_(p)}:${_(f)}:${_(x)}`:`${_(p)}:${_(f)}`:g?`${_(f)}:${_(x)}`:`${_(f)}`)}),(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-xs text-accent font-semibold px-2 py-0.5 rounded-full bg-accent-soft/40 border border-accent-border/30",children:e.sheetName})]})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 text-center max-w-2xl px-4 flex flex-col gap-2.5",children:[(0,t.jsx)("h2",{className:"jsx-6b5ea921a3c403a3 text-xl sm:text-2xl font-[600] text-foreground tracking-tight drop-shadow select-text leading-tight",children:e.description||"Untitled Flow State"}),e.tags.length>0&&(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-wrap justify-center gap-1.5 mt-1",children:e.tags.map(e=>(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 px-2.5 py-0.5 text-xs rounded-full zen-glass text-tag-text border border-white/5",children:(0,D.format_display_tag)(e)},e))})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 max-w-xl mx-auto text-center px-6 transition-all duration-700 ease-in-out",children:[(0,t.jsxs)("p",{className:"jsx-6b5ea921a3c403a3 text-sm sm:text-[0.95rem] italic text-muted leading-relaxed font-light select-text",children:["“",eq[j].text,"”"]}),(0,t.jsxs)("p",{className:"jsx-6b5ea921a3c403a3 text-xs text-accent/60 font-mono mt-2 tracking-wide uppercase",children:["— ",eq[j].author]})]})]}):(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 w-full max-w-md zen-glass rounded-2xl p-6 sm:p-8 shadow-xl border border-white/5",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 text-center mb-6",children:[(0,t.jsx)("h2",{className:"jsx-6b5ea921a3c403a3 text-xl font-bold tracking-tight mb-1",children:"Enter Flow State"}),(0,t.jsx)("p",{className:"jsx-6b5ea921a3c403a3 text-xs text-muted",children:"Ditch distractions and start deep work in Zen Mode."})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=A.trim();t&&F&&(l({description:t,sheetName:F}),$(""))},className:"jsx-6b5ea921a3c403a3 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-col gap-1.5",children:[(0,t.jsx)("label",{htmlFor:"zen-sheet-select",className:"jsx-6b5ea921a3c403a3 text-xs text-muted",children:"Target Sheet"}),(0,t.jsx)("select",{id:"zen-sheet-select",value:F,disabled:i||0===n.length,onChange:e=>R(e.target.value),className:`jsx-6b5ea921a3c403a3 ${d()} !bg-panel border-white/5 text-sm`,children:n.filter(e=>!e.archived).map(e=>(0,t.jsx)("option",{value:e.name,className:"jsx-6b5ea921a3c403a3",children:e.name},e.name))})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-col gap-1.5",children:[(0,t.jsx)("label",{htmlFor:"zen-checkin-desc",className:"jsx-6b5ea921a3c403a3 text-xs text-muted",children:"What is your absolute focus right now?"}),(0,t.jsx)(r.TagAutocompleteInput,{id:"zen-checkin-desc",value:A,known_tags:s,placeholder:"e.g. design system improvements @design",disabled:i,autoFocus:!0,on_change:$})]}),(0,t.jsx)("button",{type:"submit",disabled:i||0===A.trim().length,className:`jsx-6b5ea921a3c403a3 ${(0,o.get_button_class_name)("primary")} w-full mt-2 cursor-pointer font-bold text-sm tracking-wide py-3 bg-accent border-accent-border text-accent-text-on shadow-lg hover:scale-[1.01] transition-transform duration-100`,children:"Start Flow Tracker"})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 mt-8 text-center pt-6 border-t border-white/5",children:[(0,t.jsxs)("p",{className:"jsx-6b5ea921a3c403a3 text-[0.75rem] italic text-muted leading-relaxed font-light max-w-sm mx-auto",children:["“",eq[j].text,"”"]}),(0,t.jsxs)("p",{className:"jsx-6b5ea921a3c403a3 text-[0.65rem] text-accent/50 font-mono mt-1",children:["— ",eq[j].author]})]})]})}),(0,t.jsxs)("footer",{className:"jsx-6b5ea921a3c403a3 w-full flex flex-col gap-5 pt-4 border-t border-white/5 z-10",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-wrap items-end justify-between gap-5",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-col gap-2 max-w-xs w-full",children:[(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-[0.68rem] font-bold text-muted uppercase tracking-[0.1em]",children:"Ambient Focus Audio"}),(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-wrap gap-1",children:["none","brown","waves","rain","drone"].map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>I(e),className:`jsx-6b5ea921a3c403a3 px-2.5 py-1 rounded-[0.45rem] text-xs font-semibold border transition-all duration-150 ${z===e?"bg-accent border-accent-border text-accent-text-on scale-105":"zen-glass border-white/5 text-muted hover:text-foreground"}`,children:["none"===e&&"Off","brown"===e&&"Brown Noise","waves"===e&&"Waves","rain"===e&&"Rain","drone"===e&&"Zen Drone"]},e))}),"none"!==z&&(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex items-center gap-3 mt-1.5",children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"13",height:"13",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-6b5ea921a3c403a3 text-muted",children:(0,t.jsx)("polygon",{points:"11 5 6 9 2 9 2 13 6 13 11 17 11 5",className:"jsx-6b5ea921a3c403a3"})}),(0,t.jsx)("input",{type:"range",min:"0",max:"1",step:"0.05",value:M,onChange:e=>L(parseFloat(e.target.value)),"aria-label":"Volume slider",className:"jsx-6b5ea921a3c403a3 w-full h-1 bg-white/10 rounded-lg appearance-none cursor-pointer accent-accent"}),(0,t.jsxs)("span",{className:"jsx-6b5ea921a3c403a3 font-mono text-[0.65rem] text-muted w-6 text-right",children:[Math.round(100*M),"%"]})]})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex flex-col gap-2",children:[(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-[0.68rem] font-bold text-muted uppercase tracking-[0.1em]",children:"Breathing Flow Guide"}),(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 flex gap-1.5",children:["off","calm","box"].map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>B(e),className:`jsx-6b5ea921a3c403a3 px-3 py-1 rounded-[0.45rem] text-xs font-semibold border transition-all duration-150 ${q===e?"bg-accent border-accent-border text-accent-text-on scale-105":"zen-glass border-white/5 text-muted hover:text-foreground"}`,children:["off"===e&&"Disabled","calm"===e&&"Calming (4-7-8)","box"===e&&"Box Breathing (4-4-4-4)"]},e))})]}),e&&(0,t.jsxs)("form",{onSubmit:K,className:"jsx-6b5ea921a3c403a3 flex flex-col gap-2 max-w-sm w-full",children:[(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex items-center justify-between gap-2",children:[(0,t.jsx)("label",{htmlFor:"zen-distraction-input",className:"jsx-6b5ea921a3c403a3 text-[0.68rem] font-bold text-muted uppercase tracking-[0.1em]",children:"Distraction Note Pad"}),"saving"===C&&(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-[0.65rem] text-accent/80 font-mono animate-pulse",children:"Filing note…"}),"saved"===C&&(0,t.jsx)("span",{className:"jsx-6b5ea921a3c403a3 text-[0.65rem] text-accent font-mono",children:"✓ Distraction cleared"})]}),(0,t.jsxs)("div",{className:"jsx-6b5ea921a3c403a3 flex gap-2",children:[(0,t.jsx)(r.TagAutocompleteInput,{id:"zen-distraction-input",value:S,known_tags:s,placeholder:"Capture distracting thoughts here…",disabled:i||"saving"===C,on_change:E}),(0,t.jsx)("button",{type:"submit",disabled:i||"saving"===C||0===S.trim().length,className:`jsx-6b5ea921a3c403a3 ${(0,o.get_button_class_name)("ghost")} px-3 text-xs border border-white/5 hover:border-accent-border/40 hover:text-accent font-bold`,children:"Capture"})]})]})]}),e&&(0,t.jsx)("div",{className:"jsx-6b5ea921a3c403a3 flex w-full justify-center pt-2",children:(0,t.jsxs)("button",{type:"button",disabled:i,onClick:()=>{c(),m()},className:"jsx-6b5ea921a3c403a3 flex items-center justify-center gap-2 rounded-full border border-danger-border/40 bg-danger-soft px-8 py-3.5 text-sm font-semibold tracking-wide text-danger shadow-md hover:bg-danger-solid hover:text-danger-text-on hover:scale-[1.01] hover:shadow-lg focus:outline-none transition-all duration-150 cursor-pointer w-full max-w-md",children:[(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-6b5ea921a3c403a3",children:(0,t.jsx)("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9",className:"jsx-6b5ea921a3c403a3"})}),"Complete Focus Session (Check Out)"]})})]})]})}var eO=e.i(36178);function eV(e,t,n,a){return void 0===a?{text:e,sheetName:t,entryId:n}:{text:e,sheetName:t,entryId:n,at:a}}function eU(e){return`${e.sheetName}:${e.id}`}var eP=e.i(85323),eG=e.i(68713),eH=e.i(67999);async function eW(){let e=await fetch("/api/state",{cache:"no-store"});if(!e.ok)throw Error((await e.json()).error??"Failed to load tracker state");return await e.json()}var eK=e.i(51408),eZ=e.i(76709),eJ=e.i(3159),eQ=e.i(72162),eY=e.i(51229),eX=e.i(17003);function e0(e){let t=e.activeSheetName;null!==t&&(0,eX.write_active_sheet_preference)(t)}var e1=e.i(65742),e3=e.i(48541),e2=e.i(20397);let e5=(0,n.default)(()=>e.A(6838).then(e=>({default:e.EntryList})),{loadableGenerated:{modules:[19550]},loading:()=>(0,t.jsx)("p",{className:"m-0 text-[0.9rem] text-muted",children:"Loading entry list…"})}),e6=(0,n.default)(()=>e.A(72432).then(e=>({default:e.FocusGoalsNudgesBanner})),{loadableGenerated:{modules:[11791]}});e.s(["TrackerApp",0,function({initial_state:e}){let[n,s]=(0,a.useState)(e),[r,i]=(0,a.useState)(null),[l,o]=(0,a.useState)(!1),[c,d]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!1===e.activeSheetEntriesLoaded),[h,p]=(0,a.useState)(""),[f,x]=(0,a.useState)(!1),{confirm:_}=(0,ea.use_confirm_dialog)(),g=(0,el.use_confirm_destructive_actions)(),b=(0,a.useRef)(e),[v,y]=(0,a.useState)(!1),j=(0,a.useCallback)(()=>y(e=>!e),[]);(0,a.useEffect)(()=>{e0(e)},[e]),(0,a.useEffect)(()=>{(0,eQ.publish_tracker_running_entry)(n.runningEntry)},[n.runningEntry]),(0,a.useEffect)(()=>{!1===e.activeSheetEntriesLoaded&&eW().then(e=>{e0(e),s(e)}).catch(()=>{}).finally(()=>{m(!1)})},[e.activeSheetEntriesLoaded]);let w=async e=>{o(!0),i(null);try{let t=await e(),a=null!==n.activeEntry&&null===t.activeEntry,r=n.runningEntry,i=t.runningEntry;e0(t),s(t),a&&(0,eG.finish_running_pomodoro_timer)(),T&&(null===r&&null!==i?(0,eP.notify_desktop)({title:"Tracking started",body:`${i.description||"Untitled entry"} (${i.sheetName})`,tag:"tracker-running-entry"}):null!==r&&null===i?(0,eP.notify_desktop)({title:"Tracking stopped",body:`${r.description||"Untitled entry"} (${r.sheetName})`,tag:"tracker-running-entry"}):null!==r&&null!==i&&eU(r)!==eU(i)&&(0,eP.notify_desktop)({title:"Tracking switched",body:`${i.description||"Untitled entry"} (${i.sheetName})`,tag:"tracker-running-entry"}))}catch(e){i((0,eK.format_unknown_error)(e))}finally{o(!1)}},k=n.activeSheetName??n.sheets.find(e=>e.isActive)?.name??"main",N=Q(),S=(0,e2.use_entry_list_sort)(),T="true"===(0,a.useSyncExternalStore)(e3.desktop_notifications_preference.subscribe,e3.desktop_notifications_preference.get_snapshot,e3.desktop_notifications_preference.get_server_snapshot),A="true"===(0,a.useSyncExternalStore)(e1.clear_tag_filters_on_sheet_change_preference.subscribe,e1.clear_tag_filters_on_sheet_change_preference.get_snapshot,e1.clear_tag_filters_on_sheet_change_preference.get_server_snapshot),$=(0,a.useRef)(null),F=(0,a.useRef)(null),R=(0,a.useRef)(null);(0,a.useEffect)(()=>{if(!A||null===$.current||$.current===k){$.current=k;return}K(k,[]),$.current=k},[k,A]),(0,a.useEffect)(()=>{p(""),x(!1)},[k]);let z=(0,a.useSyncExternalStore)(H.subscribe_sheet_tag_filters,()=>P(k),G),I=(0,a.useMemo)(()=>(function(e){let t=new Map;for(let n of e){let e=new Set;for(let a of n.tags)try{let n=(0,q.normalize_stored_tag)(a);if(e.has(n))continue;e.add(n),t.set(n,(t.get(n)??0)+1)}catch{continue}}return[...t.entries()].map(([e,t])=>({name:e,entryCount:t})).sort((e,t)=>e.name.localeCompare(t.name))})(n.activeSheetEntries),[n.activeSheetEntries]),M=(0,a.useMemo)(()=>c||u?[]:function(e){var t;let n,{entries:a,show_archived_entries:s,filter_tags:r,tag_filter_mode:i,entry_search_query:l,entry_list_sort:o}=e,c=[...(t=function(e,t,n="all"){return 0===t.length?e:e.filter(e=>(function(e,t,n="all"){return 0===t.length||("any"===n?t.some(t=>e.tags.some(e=>(0,Z.tags_are_equal)(e,t))):t.every(t=>e.tags.some(e=>(0,Z.tags_are_equal)(e,t))))})(e,t,n))}(a.filter(e=>s?!0===e.archived:!0!==e.archived),r,i),0===(n=l.trim()).length?t:t.filter(e=>(function(e,t){let n=t.trim().toLowerCase();if(0===n.length)return{matches:!0,noteSnippet:null};let a=e.description.toLowerCase().includes(n),s=e.sheetName.toLowerCase().includes(n),r=e.tags.some(e=>e.toLowerCase().includes(n));if(a||s||r)return{matches:!0,noteSnippet:null};for(let t of e.noteTexts)if(t.toLowerCase().includes(n))return{matches:!0,noteSnippet:function(e,t){let n=e.toLowerCase().indexOf(t);if(n<0)return e.slice(0,120);let a=Math.max(0,n-40),s=Math.min(e.length,n+t.length+40),r=a>0?"…":"",i=s<e.length?"…":"";return`${r}${e.slice(a,s)}${i}`}(t,n)};return{matches:!1,noteSnippet:null}})({sheetName:e.sheetName,description:e.description,tags:e.tags,noteTexts:e.notes.map(e=>e.text)},n).matches))];switch(o){case"oldest":return c.sort((e,t)=>new Date(e.start).getTime()-new Date(t.start).getTime());case"duration":return c.sort((e,t)=>t.durationMs-e.durationMs);case"description":return c.sort((e,t)=>{let n=e.description.trim()||"Untitled entry",a=t.description.trim()||"Untitled entry";return n.localeCompare(a)});default:return c.sort((e,t)=>new Date(t.start).getTime()-new Date(e.start).getTime())}}({entries:n.activeSheetEntries,show_archived_entries:f,filter_tags:z,tag_filter_mode:N,entry_search_query:h,entry_list_sort:S}),[n.activeSheetEntries,z,N,S,h,f,c,u]),D=(0,a.useMemo)(()=>n.activeSheetEntries.filter(e=>!0===e.archived).length,[n.activeSheetEntries]),B=(0,a.useMemo)(()=>n.sheets.filter(e=>!0!==e.archived),[n.sheets]),O=(0,a.useMemo)(()=>(0,eH.get_serialized_entries_total_ms)(M),[M]);(0,a.useEffect)(()=>(0,eZ.subscribe_tracker_state_sync)(()=>{l||c||eW().then(e=>{e0(e),s(e)}).catch(()=>{})}),[l,c]);let V=function(e){let{active_sheet:t,is_switching_sheet:n,is_loading_entries:a,show_archived_entries:s,entry_search_query:r,filter_tags:i,tag_filter_mode:l}=e;if(n||a)return`Loading entries for "${t}"…`;if(s)return`No archived entries on sheet "${t}".`;let o=r.trim().length>0,c=i.length>0;return o&&c?`No entries on sheet "${t}" match your search and selected tags.`:o?`No entries on sheet "${t}" match your search.`:c&&"any"===l?`No entries on sheet "${t}" match any selected tag.`:c?`No entries on sheet "${t}" match all selected tags.`:`No entries on sheet "${t}".`}({active_sheet:k,is_switching_sheet:c,is_loading_entries:u,show_archived_entries:f,entry_search_query:h,filter_tags:z,tag_filter_mode:N}),U=e=>{let t;if(e===k&&!c)return;b.current=n;let a=(t=n.runningEntries.find(t=>t.sheetName===e)??null,{...n,activeSheetName:e,sheets:n.sheets.map(t=>({...t,isActive:t.name===e})),activeEntry:t,activeSheetEntries:n.activeSheetEntries,activeSheetTotalMs:n.activeSheetTotalMs});e0(a),s(a),d(!0),i(null),(0,eY.post_tracker_action)("/api/sheet",{name:e}).then(e=>{e0(e),s(e)}).catch(e=>{i((0,eK.format_unknown_error)(e)),s(b.current)}).finally(()=>{d(!1)})},W=(e,t,n)=>(0,eJ.patch_tracker_action)("/api/entry",{sheetName:e,entryId:t,...n});return(0,t.jsxs)(C.ConfirmDialogProvider,{children:[(0,t.jsx)(ez,{active_entry:n.activeEntry}),(0,t.jsx)(L,{sheets:n.sheets,active_sheet_name:k,active_entry:n.activeEntry,is_pending:l,check_in_form_ref:F,active_entry_panel_ref:R,on_select_sheet:U,on_check_out:e=>w(()=>(0,eY.post_tracker_action)("/api/out",(0,eO.build_check_out_request_payload)(k,e))),on_toggle_zen:j}),(0,t.jsx)("div",{className:"relative z-1",children:(0,t.jsx)(eL.TrackerTopbar,{})}),(0,t.jsxs)("div",{className:"mx-auto max-w-[1120px] px-4 pb-10 pt-4 sm:px-5 sm:pt-5",children:[null===r?null:(0,t.jsx)("p",{className:"mb-4 border border-danger-border bg-danger-soft px-3 py-2.5 text-danger-text",children:r}),(0,t.jsx)(e6,{has_running_timer:null!==n.runningEntry,initial_focus_nudges_status:n.focusNudgesStatusGlobal,on_check_in_shortcut:()=>{F.current?.expand_and_focus()}}),(0,t.jsxs)("div",{className:"grid grid-cols-[minmax(14rem,18rem)_minmax(0,1fr)] items-stretch border border-panel-border bg-panel shadow-sm max-[960px]:grid-cols-1",children:[(0,t.jsx)("div",{className:"flex min-h-0 min-w-0 flex-col border-r border-panel-border p-4 max-[860px]:border-r-0 max-[860px]:border-b",children:(0,t.jsx)(ec,{sheets:n.sheets,db_path:n.dbPath,is_pending:l,on_select:U,on_create:e=>w(()=>(0,eY.post_tracker_action)("/api/sheet",{name:e})),on_rename:(e,t)=>w(()=>(0,eJ.patch_tracker_action)("/api/sheet",{name:e,newName:t})),on_archive:e=>w(()=>(0,eJ.patch_tracker_action)("/api/sheet",{name:e,archived:!0})),on_delete:e=>w(()=>(0,eY.post_tracker_action)("/api/sheet",{name:e,delete:!0}))})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col",children:[(0,t.jsxs)("section",{className:"flex min-w-0 flex-col gap-4 border-b border-panel-border border-l-4 border-l-accent p-4",children:[null===n.activeEntry?(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-md border border-panel-border bg-background px-3 py-2",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"m-0 text-[0.72rem] font-semibold uppercase tracking-[0.06em] text-muted",children:"Quick action"}),(0,t.jsx)("p",{className:"m-0 mt-1 text-[0.9rem] font-medium",children:"Jump into Pomodoro without leaving the tracker."})]}),(0,t.jsx)(eM,{})]}):null,(0,t.jsx)(e$,{ref:R,active_entry:n.activeEntry,sheets:n.sheets,known_tags:n.knownTags,is_pending:l,on_enter_zen:()=>y(!0),on_check_out:e=>w(()=>(0,eY.post_tracker_action)("/api/out",(0,eO.build_check_out_request_payload)(k,e))),on_delete:()=>w(()=>(0,eY.post_tracker_action)("/api/entry",{sheetName:k,entryId:n.activeEntry?.id})),on_edit:e=>w(()=>W(k,n.activeEntry?.id??0,e)),on_move:e=>w(()=>(0,eY.post_tracker_action)("/api/entry/move",{sheetName:k,entryId:n.activeEntry?.id,targetSheetName:e})),on_add_note:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/note",eV(e,k,n.activeEntry?.id,t))),on_edit_note:(e,t,a)=>w(()=>(0,eJ.patch_tracker_action)("/api/note",{sheetName:k,entryId:n.activeEntry?.id,timestamp:e,originalText:t,text:a})),on_delete_note:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/note/delete",{sheetName:k,entryId:n.activeEntry?.id,timestamp:e,noteText:t}))}),null===n.activeEntry?(0,t.jsx)(E,{ref:F,known_tags:n.knownTags,is_pending:l,trailing:(0,t.jsx)("p",{className:"m-0 text-[0.85rem] leading-tight text-muted",children:"Not tracking"}),on_submit:e=>w(()=>(0,eY.post_tracker_action)("/api/in",{...e,sheetName:k}))}):null]}),(0,t.jsx)("section",{className:"flex min-w-0 flex-col gap-4 p-4",children:(0,t.jsx)(e5,{title:"Entries",entries:M,merge_context_entries:n.activeSheetEntries,sheets:B,known_tags:n.knownTags,total_ms:O,empty_message:V,is_pending:l,show_sheet_name:!1,archived_entry_count:D,show_archived_entries:f,on_toggle_show_archived:()=>x(e=>!e),header_extra:(0,t.jsxs)("div",{className:"flex w-full flex-col gap-3",children:[(0,t.jsx)(en,{query:h,active_sheet:k,is_pending:l,on_query_change:p}),(0,t.jsx)(Y,{sheet_name:k,sheet_tags:I})]}),on_delete:e=>w(()=>(0,eY.post_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id})),on_edit:(e,t)=>w(()=>W(e.sheetName,e.id,t)),on_move:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/entry/move",{sheetName:e.sheetName,entryId:e.id,targetSheetName:t})),on_move_many:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/entry/move-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id})),targetSheetName:t})),on_delete_many:e=>w(()=>(0,eY.post_tracker_action)("/api/entry/delete-bulk",{entries:e.map(e=>({sheetName:e.sheetName,entryId:e.id}))})),on_edit_note:(e,t,n,a)=>w(()=>(0,eJ.patch_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,timestamp:t,originalText:n,text:a})),on_add_note:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/note",{sheetName:e.sheetName,entryId:e.id,text:t})),on_resume:e=>w(()=>(0,eY.post_tracker_action)("/api/in",{description:(0,ex.build_resume_description)(e.description,e.tags),sheetName:e.sheetName})),on_split:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/entry/split",{sheetName:e.sheetName,entryId:e.id,at:t})),on_merge:(e,t)=>w(()=>(0,eY.post_tracker_action)("/api/entry/merge",{sheetName:e.sheetName,entryId:e.id,direction:t})),on_archive:async e=>{let t;(!g||await _((t=e.description.trim().length>0?e.description.trim():"Untitled entry",{title:"Archive entry?",message:`Archive "${t}"? It will be hidden from the entry list. You can restore it by showing archived entries.`,confirmLabel:"Archive",variant:"danger"})))&&w(()=>(0,eJ.patch_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id,archived:!0}))},on_unarchive:e=>w(()=>(0,eJ.patch_tracker_action)("/api/entry",{sheetName:e.sheetName,entryId:e.id,archived:!1}))})})]})]})]}),v&&(0,t.jsx)(eB,{active_entry:n.activeEntry,sheets:n.sheets,known_tags:n.knownTags,is_pending:l,on_check_in:e=>{w(()=>(0,eY.post_tracker_action)("/api/in",e))},on_check_out:()=>{w(()=>(0,eY.post_tracker_action)("/api/out",(0,eO.build_check_out_request_payload)(k)))},on_add_note:e=>w(()=>(0,eY.post_tracker_action)("/api/note",eV(e,k,n.activeEntry?.id,void 0))),on_close:()=>y(!1)})]})}],22482)}]);
|
|
@@ -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 +1,19 @@
|
|
|
1
|
-
{
|
|
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
|
+
}
|