@slycode/slycode 0.2.9 → 0.2.10
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/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +9 -9
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +9 -9
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js +1 -1
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/dist/web/.next/static/chunks/{0452f599128364c9.js → 8fb2a99c64580de7.js} +1 -1
- package/dist/web/.next/static/chunks/{2a22edae0b1198eb.js → b8e0c1aeea4a14bc.js} +1 -1
- package/dist/web/src/hooks/useVoiceRecorder.ts +7 -5
- package/dist/web/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/templates/kanban-seed.json +1 -1
- /package/dist/web/.next/static/{wK5osty7Iax92ZOE_Skb7 → _fCicMElBguqtWA_EpzdZ}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{wK5osty7Iax92ZOE_Skb7 → _fCicMElBguqtWA_EpzdZ}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{wK5osty7Iax92ZOE_Skb7 → _fCicMElBguqtWA_EpzdZ}/_ssgManifest.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
|
|
2
|
-
globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/
|
|
2
|
+
globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx":{"id":1088,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js"],"async":false},"[project]/src/components/Dashboard.tsx <module evaluation>":{"id":58116,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/02a9b2dcd9d8b87c.js","/_next/static/chunks/1b46e836090e130b.js","/_next/static/chunks/de965b463aff71a9.js"],"async":false},"[project]/src/components/Dashboard.tsx":{"id":58116,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/02a9b2dcd9d8b87c.js","/_next/static/chunks/1b46e836090e130b.js","/_next/static/chunks/de965b463aff71a9.js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"1088":{"*":{"id":7491,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js"],"async":false}},"58116":{"*":{"id":39579,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","server/chunks/ssr/[root-of-the-server]__077f472c._.js","server/chunks/ssr/[root-of-the-server]__1f5fc489._.js","server/chunks/ssr/src_components_Dashboard_tsx_efc4dc27._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"1088":{"*":{"id":21229,"name":"*","chunks":[],"async":false}},"58116":{"*":{"id":92848,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":[],"[project]/src/app/layout":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/f3d7065d54a0b9ac.css","inlined":false}],"[project]/src/app/page":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/f3d7065d54a0b9ac.css","inlined":false}]},"entryJSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/ff1a16fafef87110.js","static/chunks/e24d6768d85df882.js"],"[project]/src/app/layout":["static/chunks/b8e0c1aeea4a14bc.js"],"[project]/src/app/page":["static/chunks/b8e0c1aeea4a14bc.js","static/chunks/02a9b2dcd9d8b87c.js","static/chunks/1b46e836090e130b.js","static/chunks/de965b463aff71a9.js"]}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
|
|
2
|
-
globalThis.__RSC_MANIFEST["/project/[id]/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/
|
|
2
|
+
globalThis.__RSC_MANIFEST["/project/[id]/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/ff1a16fafef87110.js","/_next/static/chunks/e24d6768d85df882.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx <module evaluation>":{"id":1088,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js"],"async":false},"[project]/src/contexts/VoiceContext.tsx":{"id":1088,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js"],"async":false},"[project]/src/components/ProjectView.tsx <module evaluation>":{"id":72630,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/24c966c8b9e12be5.js","/_next/static/chunks/0bab8c7c82cef548.js","/_next/static/chunks/345c46e638c28d26.js"],"async":false},"[project]/src/components/ProjectView.tsx":{"id":72630,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/24c966c8b9e12be5.js","/_next/static/chunks/0bab8c7c82cef548.js","/_next/static/chunks/345c46e638c28d26.js"],"async":false},"[project]/src/components/ProjectPageClient.tsx <module evaluation>":{"id":27444,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/24c966c8b9e12be5.js","/_next/static/chunks/0bab8c7c82cef548.js","/_next/static/chunks/345c46e638c28d26.js"],"async":false},"[project]/src/components/ProjectPageClient.tsx":{"id":27444,"name":"*","chunks":["/_next/static/chunks/b8e0c1aeea4a14bc.js","/_next/static/chunks/24c966c8b9e12be5.js","/_next/static/chunks/0bab8c7c82cef548.js","/_next/static/chunks/345c46e638c28d26.js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__b6871b66._.js","server/chunks/ssr/node_modules_next_dist_esm_eedfc1fd._.js"],"async":false}},"1088":{"*":{"id":7491,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js"],"async":false}},"72630":{"*":{"id":15704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","server/chunks/ssr/[root-of-the-server]__2f64210a._.js","server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","server/chunks/ssr/src_components_c4135402._.js"],"async":false}},"27444":{"*":{"id":77788,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__72142a5d._.js","server/chunks/ssr/src_contexts_VoiceContext_tsx_cfba7292._.js","server/chunks/ssr/[root-of-the-server]__2f64210a._.js","server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js","server/chunks/ssr/src_components_c4135402._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"1088":{"*":{"id":21229,"name":"*","chunks":[],"async":false}},"72630":{"*":{"id":50165,"name":"*","chunks":[],"async":false}},"27444":{"*":{"id":76100,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":[],"[project]/src/app/layout":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/f3d7065d54a0b9ac.css","inlined":false}],"[project]/src/app/project/[id]/page":[{"path":"static/chunks/43bfca92afbacd38.css","inlined":false},{"path":"static/chunks/f3d7065d54a0b9ac.css","inlined":false}]},"entryJSFiles":{"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/ff1a16fafef87110.js","static/chunks/e24d6768d85df882.js"],"[project]/src/app/layout":["static/chunks/b8e0c1aeea4a14bc.js"],"[project]/src/app/project/[id]/page":["static/chunks/b8e0c1aeea4a14bc.js","static/chunks/24c966c8b9e12be5.js","static/chunks/0bab8c7c82cef548.js","static/chunks/345c46e638c28d26.js"]}}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[7491,7957,15156,90473,a=>{"use strict";a.s(["VoiceProvider",()=>o,"useVoice",()=>n],7491);var b=a.i(87924),c=a.i(72131);function d(a,b){let c,d,e=(d=(c=b.split("+").map(a=>a.trim().toLowerCase()))[c.length-1],{ctrlKey:c.includes("ctrl"),shiftKey:c.includes("shift"),altKey:c.includes("alt"),metaKey:c.includes("meta")||c.includes("cmd"),key:"space"===d?" ":"escape"===d?"Escape":"enter"===d?"Enter":d});return(a.key.toLowerCase()===e.key.toLowerCase()||a.key===e.key)&&e.ctrlKey===a.ctrlKey&&e.shiftKey===a.shiftKey&&e.altKey===a.altKey&&e.metaKey===a.metaKey}let e={autoSubmitTerminal:!0,maxRecordingSeconds:300,shortcuts:{startRecording:"Ctrl+.",pauseResume:"Space",submit:"Enter",submitPasteOnly:"Shift+Enter",clear:"Escape"}},f={voice:e};var g=a.i(35112);function h({voiceState:a,elapsedSeconds:c,disabled:d,error:e,onRecord:f,onPause:g,onResume:h,onClear:i,onSubmit:j,onRetry:k,onOpenSettings:l}){let m;return(0,b.jsxs)("div",{className:`flex items-center gap-1.5 ${d?"opacity-40 pointer-events-none":""}`,children:[("idle"===a||"disabled"===a)&&(0,b.jsx)("button",{onClick:f,disabled:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 disabled:opacity-50 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Start recording (Ctrl+.)",children:(0,b.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})}),("recording"===a||"paused"===a)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,b.jsx)("span",{className:`inline-block h-2 w-2 rounded-full bg-red-500 ${"recording"===a?"animate-pulse":""}`}),(0,b.jsx)("span",{className:"min-w-[2.5rem] font-mono text-xs tabular-nums text-red-600 dark:text-red-400",children:(m=Math.floor(c/60),`${m}:${(c%60).toString().padStart(2,"0")}`)})]}),(0,b.jsx)("button",{onClick:"recording"===a?g:h,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-neon-blue-400/40 hover:bg-neon-blue-400/10 hover:text-neon-blue-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-neon-blue-400/40 dark:hover:bg-neon-blue-400/10 dark:hover:text-neon-blue-400",title:"recording"===a?"Pause (Space)":"Resume (Space)",children:"recording"===a?(0,b.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,b.jsx)("rect",{x:"6",y:"4",width:"4",height:"16"}),(0,b.jsx)("rect",{x:"14",y:"4",width:"4",height:"16"})]}):(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("polygon",{points:"5,3 19,12 5,21"})})}),(0,b.jsx)("button",{onClick:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear recording (Escape)",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,b.jsx)("button",{onClick:j,className:"rounded-md border border-green-400/40 bg-green-400/15 px-2 py-1.5 text-xs font-medium text-green-600 transition-all hover:bg-green-400/25 hover:shadow-[0_0_8px_rgba(34,197,94,0.2)] dark:text-green-400",title:"Submit for transcription (Enter)",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}),"transcribing"===a&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,b.jsxs)("svg",{className:"h-4 w-4 animate-spin text-[#2490b5] dark:text-neon-blue-400",viewBox:"0 0 24 24",fill:"none",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,b.jsx)("span",{className:"text-xs text-[#2490b5] dark:text-neon-blue-400",children:"Transcribing..."})]}),"error"===a&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs text-red-400",title:e||"Transcription failed",children:"Failed"}),(0,b.jsx)("button",{onClick:k,className:"rounded-md border border-neon-blue-400/40 bg-neon-blue-400/15 px-1.5 py-1 text-xs font-medium text-neon-blue-400 transition-all hover:bg-neon-blue-400/25",title:"Retry transcription",children:"Retry"}),(0,b.jsx)("button",{onClick:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("button",{onClick:l,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-void-400/50 hover:text-void-700 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-void-400/50 dark:hover:text-void-300",title:"Voice settings",children:(0,b.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})}function i({label:a,value:d,onChange:e}){let[f,g]=(0,c.useState)(!1),h=(0,c.useRef)(null),i=(0,c.useCallback)(a=>{if(!f)return;a.preventDefault(),a.stopPropagation();let b=[];a.ctrlKey&&b.push("Ctrl"),a.shiftKey&&b.push("Shift"),a.altKey&&b.push("Alt"),a.metaKey&&b.push("Cmd");let c=a.key;if(!["Control","Shift","Alt","Meta"].includes(c)){let a=" "===c?"Space":"Escape"===c?"Escape":"Enter"===c?"Enter":(c.length,c);b.push(a),e(b.join("+")),g(!1)}},[f,e]);return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:a}),(0,b.jsx)("input",{ref:h,type:"text",value:f?"Press keys...":d,readOnly:!0,onFocus:()=>g(!0),onBlur:()=>g(!1),onKeyDown:i,className:`w-28 rounded border px-2 py-1 text-center text-xs ${f?"border-neon-blue-400 bg-neon-blue-400/10 text-neon-blue-600 dark:text-neon-blue-400":"border-void-300 bg-void-50 text-void-700 dark:border-void-600 dark:bg-void-700 dark:text-void-300"} cursor-pointer outline-none`})]})}function j({settings:a,onSave:d,onClose:e}){let f=(0,c.useRef)(null),[g,h]=(0,c.useState)({...a.shortcuts}),[j,k]=(0,c.useState)(a.autoSubmitTerminal),[l,m]=(0,c.useState)(Math.round(a.maxRecordingSeconds/60)),n=(0,c.useRef)({shortcuts:g,autoSubmit:j,maxMinutes:l});return n.current={shortcuts:g,autoSubmit:j,maxMinutes:l},(0,c.useEffect)(()=>()=>{let{shortcuts:a,autoSubmit:b,maxMinutes:c}=n.current;d({shortcuts:a,autoSubmitTerminal:b,maxRecordingSeconds:60*Math.max(1,c)})},[]),(0,c.useEffect)(()=>{let a=a=>{f.current&&!f.current.contains(a.target)&&e()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e]),(0,b.jsxs)("div",{ref:f,className:"w-80 rounded-lg border border-void-200 bg-white p-4 shadow-(--shadow-overlay) dark:border-void-600 dark:bg-void-800",children:[(0,b.jsx)("h3",{className:"mb-3 text-sm font-medium text-void-800 dark:text-void-200",children:"Voice Settings"}),(0,b.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Keyboard Shortcuts"}),(0,b.jsx)(i,{label:"Start recording",value:g.startRecording,onChange:a=>h(b=>({...b,startRecording:a}))}),(0,b.jsx)(i,{label:"Pause / Resume",value:g.pauseResume,onChange:a=>h(b=>({...b,pauseResume:a}))}),(0,b.jsx)(i,{label:"Submit",value:g.submit,onChange:a=>h(b=>({...b,submit:a}))}),(0,b.jsx)(i,{label:"Paste only",value:g.submitPasteOnly,onChange:a=>h(b=>({...b,submitPasteOnly:a}))}),(0,b.jsx)(i,{label:"Clear / Cancel",value:g.clear,onChange:a=>h(b=>({...b,clear:a}))})]}),(0,b.jsxs)("div",{className:"space-y-3 border-t border-void-200 pt-3 dark:border-void-600",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Behaviour"}),(0,b.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Auto-submit (terminal)"}),(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":j,onClick:()=>k(!j),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${j?"bg-green-500":"bg-void-300 dark:bg-void-600"}`,children:(0,b.jsx)("span",{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition ${j?"translate-x-4":"translate-x-0"}`})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Max recording (min)"}),(0,b.jsx)("input",{type:"number",min:1,max:30,value:l,onChange:a=>m(parseInt(a.target.value)||5),className:"w-16 rounded border border-void-300 bg-void-50 px-2 py-1 text-center text-xs text-void-700 outline-none dark:border-void-600 dark:bg-void-700 dark:text-void-300"})]})]})]})}function k({error:a,hasRecording:d,onRetry:e,onClear:f,onClose:g}){let h=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&g()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[g]);let i=!d;return(0,b.jsxs)("div",{ref:h,className:"w-72 rounded-lg border border-red-400/30 bg-white p-3 shadow-(--shadow-overlay) dark:border-red-400/20 dark:bg-void-800",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,b.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:i?"Recording Failed":"Transcription Failed"}),(0,b.jsx)("div",{className:"mt-1 text-xs text-void-600 dark:text-void-300",children:a})]})]}),(0,b.jsx)("div",{className:"mt-2 text-xs text-void-500 dark:text-void-400",children:i&&1?"Microphone requires HTTPS or localhost. Try accessing via localhost:3003, or add this origin to chrome://flags/#unsafely-treat-insecure-origin-as-secure.":i?"Could not access the microphone.":"Your recording is preserved. You can retry or clear and start over."}),(0,b.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,b.jsx)("button",{onClick:f,className:"rounded border border-void-300 bg-void-100 px-2 py-1 text-xs text-void-600 hover:text-void-800 dark:border-void-600 dark:bg-void-700 dark:text-void-400 dark:hover:text-void-300",children:i?"Dismiss":"Clear"}),d&&e&&(0,b.jsx)("button",{onClick:e,className:"rounded border border-neon-blue-400/40 bg-neon-blue-400/15 px-2 py-1 text-xs text-neon-blue-600 hover:bg-neon-blue-400/25 dark:text-neon-blue-400",children:"Retry"})]})]})}function l(){let a=n(),d=(0,c.useRef)(null),e=(0,c.useRef)(0),[f,i]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{i(!0)},[]),null===a.currentClaimantId&&f&&("idle"!==a.voiceState&&"disabled"!==a.voiceState||a.showSettings))?(0,g.createPortal)((0,b.jsxs)("div",{className:"fixed bottom-4 right-4 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200 rounded-xl border border-red-400/30 bg-white/95 px-3 py-2 shadow-(--shadow-card) backdrop-blur-sm dark:border-red-400/20 dark:bg-void-800/95",ref:d,children:[(0,b.jsx)(h,{voiceState:a.voiceState,elapsedSeconds:a.elapsedSeconds,disabled:!1,error:a.error,onRecord:a.startRecording,onPause:a.pauseRecording,onResume:a.resumeRecording,onClear:a.clearRecording,onSubmit:a.submitRecording,onRetry:a.retryTranscription,onOpenSettings:()=>{Date.now()-e.current<200||a.setShowSettings(!a.showSettings)}}),a.showSettings&&(0,b.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,b.jsx)(j,{settings:a.settings.voice,onSave:b=>a.updateSettings({voice:b}),onClose:()=>{e.current=Date.now(),a.setShowSettings(!1)}})}),"error"===a.voiceState&&a.error&&(0,b.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,b.jsx)(k,{error:a.error,hasRecording:a.hasRecording,onRetry:()=>a.retryTranscription(),onClear:()=>a.clearRecording(),onClose:()=>a.clearRecording()})})]}),document.body):null}a.s(["VoiceControlBar",()=>h],7957),a.s(["VoiceSettingsPopover",()=>j],15156),a.s(["VoiceErrorPopup",()=>k],90473);let m=(0,c.createContext)(null);function n(){let a=(0,c.useContext)(m);if(!a)throw Error("useVoice() must be used inside <VoiceProvider>");return a}function o({children:a}){let{settings:g,updateSettings:h}=function(){let[a,b]=(0,c.useState)(f),[d,g]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json()).then(a=>{b({...f,...a,voice:{...e,...a?.voice}})}).catch(()=>{}).finally(()=>g(!1))},[]),{settings:a,updateSettings:(0,c.useCallback)(async a=>{try{let c=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(c.ok){let a=await c.json();return b({...f,...a,voice:{...e,...a?.voice}}),a}}catch{}return null},[]),isLoading:d}}(),i=(0,c.useRef)(new Map),j=(0,c.useRef)(null),k=(0,c.useCallback)((a,b)=>{i.current.set(a,b),j.current=a},[]),n=(0,c.useCallback)(a=>{if(i.current.delete(a),j.current===a){let a=Array.from(i.current.keys());j.current=a.length>0?a[0]:null}},[]),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(null),r=(0,c.useRef)(null),s=(0,c.useRef)("auto"),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!1),x=(0,c.useCallback)(a=>{let b=r.current;if(b){if("input"===b.type&&b.element){if(!document.contains(b.element))return;let c=b.element,d=c.selectionStart??c.value.length,e=c.selectionEnd??c.value.length;c.focus(),c.setSelectionRange(d,e),document.execCommand("insertText",!1,a)}else if("terminal"===b.type&&b.terminalId){let c=i.current.get(b.terminalId);if(!c)return;let d="auto"===s.current&&g.voice.autoSubmitTerminal;c.sendInput(a),d&&setTimeout(()=>c.sendInput("\r"),300)}s.current="auto"}},[g.voice.autoSubmitTerminal]),y=(0,c.useCallback)(a=>{o.current?o.current.onTranscriptionComplete(a):x(a)},[x]),z=function({maxRecordingSeconds:a,onTranscriptionComplete:b}){let[d,e]=(0,c.useState)("idle"),[f,g]=(0,c.useState)(0),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),l=(0,c.useRef)(null),m=(0,c.useRef)([]),n=(0,c.useRef)(null),o=(0,c.useRef)(null),p=(0,c.useRef)(null),q=(0,c.useRef)(0),r=(0,c.useRef)(!1),s=(0,c.useRef)(b);(0,c.useEffect)(()=>{s.current=b},[b]);let t=(0,c.useCallback)(()=>{n.current||(n.current=setInterval(()=>{g(a=>a+1)},1e3))},[]),u=(0,c.useCallback)(()=>{n.current&&(clearInterval(n.current),n.current=null)},[]);(0,c.useEffect)(()=>{"recording"===d&&f-q.current>=a&&(l.current?.state==="recording"&&l.current.pause(),r.current=!0,u(),e("paused"))},[d,f,a,u]),(0,c.useEffect)(()=>()=>{if(u(),l.current?.state!=="inactive")try{l.current?.stop()}catch{}p.current?.getTracks().forEach(a=>a.stop())},[u]);let v=(0,c.useCallback)(()=>new Promise(a=>{let b=l.current;b&&"inactive"!==b.state?(b.ondataavailable=a=>{a.data.size>0&&m.current.push(a.data)},b.onstop=()=>{a(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))},b.stop()):a(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))}),[]),w=(0,c.useCallback)(async a=>{let b=new FormData;b.append("audio",a,"recording.webm");let c=await fetch("/api/transcribe",{method:"POST",body:b}),d=await c.json();if(!c.ok)throw Error(d.error||"Transcription failed");return d.text},[]),x=(0,c.useCallback)(()=>{p.current?.getTracks().forEach(a=>a.stop()),p.current=null},[]),y=(0,c.useCallback)(async()=>{if("idle"===d||"disabled"===d)try{i(null),k(null),m.current=[],o.current=null,g(0),q.current=0;let a=await navigator.mediaDevices.getUserMedia({audio:!0});p.current=a;let b=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"",c=new MediaRecorder(a,b?{mimeType:b}:void 0);l.current=c,c.ondataavailable=a=>{a.data.size>0&&m.current.push(a.data)},c.start(1e3),e("recording"),t()}catch(b){let a=b.message;a.includes("Permission")||a.includes("NotAllowed")?i("Microphone permission denied. Please allow microphone access."):i(a||"Failed to start recording"),e("error"),x()}},[d,t,x]),z=(0,c.useCallback)(()=>{"recording"===d&&(l.current?.state==="recording"&&l.current.pause(),u(),e("paused"))},[d,u]),A=(0,c.useCallback)(()=>{"paused"===d&&(l.current?.state==="paused"&&l.current.resume(),r.current&&(q.current=f,r.current=!1),t(),e("recording"))},[d,f,t]),B=(0,c.useCallback)(()=>{if(u(),l.current?.state!=="inactive")try{l.current?.stop()}catch{}m.current=[],o.current=null,g(0),i(null),k(null),x(),e("idle")},[u,x]),C=(0,c.useCallback)(async()=>{if("recording"===d||"paused"===d){u(),e("transcribing");try{let a=await v();o.current=a,x();let b=await w(a);k(b),g(0),m.current=[],e("idle"),s.current?.(b)}catch(a){i(a.message||"Transcription failed"),e("error")}}},[d,u,v,w,x]),D=(0,c.useCallback)(async()=>{if("error"===d&&o.current){e("transcribing"),i(null);try{let a=await w(o.current);k(a),o.current=null,m.current=[],g(0),e("idle"),s.current?.(a)}catch(a){i(a.message||"Transcription failed"),e("error")}}},[d,w]);return{state:d,elapsedSeconds:f,error:h,transcribedText:j,hasRecording:null!==o.current||m.current.length>0,startRecording:y,pauseRecording:z,resumeRecording:A,clearRecording:B,submitRecording:C,retryTranscription:D}}({maxRecordingSeconds:g.voice.maxRecordingSeconds,onTranscriptionComplete:y}),A=(0,c.useCallback)(a=>{o.current&&o.current.id!==a.id&&(o.current.onRelease?.(),"idle"!==z.state&&"disabled"!==z.state&&z.clearRecording()),o.current=a,q(a.id)},[z]),B=(0,c.useCallback)(a=>{o.current?.id===a.id&&("idle"!==z.state&&"error"!==z.state&&"disabled"!==z.state&&z.clearRecording(),o.current=null,q(null))},[z]);(0,c.useEffect)(()=>{let a=a=>{let b=a.target;if(b.closest("[data-voice-target]")&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName))return void w(!0);if(b.closest("[data-terminal-id]")){let a=b.closest("[data-terminal-id]").dataset.terminalId;a&&i.current.has(a)&&(j.current=a,w(!0))}},b=()=>{setTimeout(()=>{let a=document.activeElement;if(!a)return void w(!1);let b=a.closest("[data-voice-target]")&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName),c=a.closest("[data-terminal-id]");b||c||w(!1)},100)};return document.addEventListener("focusin",a),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b)}},[]);let C=(0,c.useCallback)(()=>{if(o.current)o.current.onRecordStart?.(),z.startRecording();else{let a=document.activeElement;if(a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName)&&a.closest("[data-voice-target]"))r.current={type:"input",element:a};else if(a?.closest("[data-terminal-id]")){let b=a.closest("[data-terminal-id]").dataset.terminalId||j.current;if(!(b&&i.current.has(b)))return;r.current={type:"terminal",terminalId:b}}else{if(!(j.current&&i.current.has(j.current)))return;r.current={type:"terminal",terminalId:j.current}}z.startRecording()}},[z]),D=(0,c.useCallback)(()=>{s.current="paste",z.submitRecording()},[z]),E=(0,c.useCallback)(()=>{"recording"===z.state?z.pauseRecording():"paused"===z.state&&z.resumeRecording()},[z]);!function({voiceState:a,shortcuts:b,callbacks:e,enabled:f,hasFieldFocus:g,suspended:h}){let i=(0,c.useRef)(e),j=(0,c.useRef)(a),k=(0,c.useRef)(b),l=(0,c.useRef)(g),m=(0,c.useRef)(h);(0,c.useEffect)(()=>{i.current=e,j.current=a,k.current=b,l.current=g,m.current=h}),(0,c.useEffect)(()=>{if(!f)return;let a=a=>{if(m.current)return;let b=j.current,c=k.current,e=i.current;if("idle"===b&&l.current&&d(a,c.startRecording)){a.preventDefault(),a.stopPropagation(),e.onStartRecording();return}if("recording"===b||"paused"===b){if(d(a,c.pauseResume)){a.preventDefault(),a.stopPropagation(),e.onPauseResume();return}if(d(a,c.submitPasteOnly)){a.preventDefault(),a.stopPropagation(),e.onSubmitPasteOnly();return}if(d(a,c.submit)){a.preventDefault(),a.stopPropagation(),e.onSubmit();return}if(d(a,c.clear)){a.preventDefault(),a.stopPropagation(),e.onClear();return}}};return document.addEventListener("keydown",a,!0),()=>document.removeEventListener("keydown",a,!0)},[f])}({voiceState:z.state,shortcuts:g.voice.shortcuts,callbacks:{onStartRecording:C,onPauseResume:E,onSubmit:z.submitRecording,onSubmitPasteOnly:D,onClear:z.clearRecording},enabled:!0,hasFieldFocus:!!o.current||v,suspended:t});let F={voiceState:z.state,elapsedSeconds:z.elapsedSeconds,error:z.error,hasRecording:z.hasRecording,startRecording:z.startRecording,pauseRecording:z.pauseRecording,resumeRecording:z.resumeRecording,clearRecording:z.clearRecording,submitRecording:z.submitRecording,retryTranscription:z.retryTranscription,claimVoiceControl:A,releaseVoiceControl:B,currentClaimantId:p,settings:g,updateSettings:h,registerTerminal:k,unregisterTerminal:n,submitModeRef:s,showSettings:t,setShowSettings:u,hasFieldFocus:v,setHasFieldFocus:w};return(0,b.jsxs)(m.Provider,{value:F,children:[a,(0,b.jsx)(l,{})]})}}];
|
|
1
|
+
module.exports=[7491,7957,15156,90473,a=>{"use strict";a.s(["VoiceProvider",()=>o,"useVoice",()=>n],7491);var b=a.i(87924),c=a.i(72131);function d(a,b){let c,d,e=(d=(c=b.split("+").map(a=>a.trim().toLowerCase()))[c.length-1],{ctrlKey:c.includes("ctrl"),shiftKey:c.includes("shift"),altKey:c.includes("alt"),metaKey:c.includes("meta")||c.includes("cmd"),key:"space"===d?" ":"escape"===d?"Escape":"enter"===d?"Enter":d});return(a.key.toLowerCase()===e.key.toLowerCase()||a.key===e.key)&&e.ctrlKey===a.ctrlKey&&e.shiftKey===a.shiftKey&&e.altKey===a.altKey&&e.metaKey===a.metaKey}let e={autoSubmitTerminal:!0,maxRecordingSeconds:300,shortcuts:{startRecording:"Ctrl+.",pauseResume:"Space",submit:"Enter",submitPasteOnly:"Shift+Enter",clear:"Escape"}},f={voice:e};var g=a.i(35112);function h({voiceState:a,elapsedSeconds:c,disabled:d,error:e,onRecord:f,onPause:g,onResume:h,onClear:i,onSubmit:j,onRetry:k,onOpenSettings:l}){let m;return(0,b.jsxs)("div",{className:`flex items-center gap-1.5 ${d?"opacity-40 pointer-events-none":""}`,children:[("idle"===a||"disabled"===a)&&(0,b.jsx)("button",{onClick:f,disabled:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 disabled:opacity-50 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Start recording (Ctrl+.)",children:(0,b.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})}),("recording"===a||"paused"===a)&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,b.jsx)("span",{className:`inline-block h-2 w-2 rounded-full bg-red-500 ${"recording"===a?"animate-pulse":""}`}),(0,b.jsx)("span",{className:"min-w-[2.5rem] font-mono text-xs tabular-nums text-red-600 dark:text-red-400",children:(m=Math.floor(c/60),`${m}:${(c%60).toString().padStart(2,"0")}`)})]}),(0,b.jsx)("button",{onClick:"recording"===a?g:h,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-neon-blue-400/40 hover:bg-neon-blue-400/10 hover:text-neon-blue-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-neon-blue-400/40 dark:hover:bg-neon-blue-400/10 dark:hover:text-neon-blue-400",title:"recording"===a?"Pause (Space)":"Resume (Space)",children:"recording"===a?(0,b.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,b.jsx)("rect",{x:"6",y:"4",width:"4",height:"16"}),(0,b.jsx)("rect",{x:"14",y:"4",width:"4",height:"16"})]}):(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("polygon",{points:"5,3 19,12 5,21"})})}),(0,b.jsx)("button",{onClick:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear recording (Escape)",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,b.jsx)("button",{onClick:j,className:"rounded-md border border-green-400/40 bg-green-400/15 px-2 py-1.5 text-xs font-medium text-green-600 transition-all hover:bg-green-400/25 hover:shadow-[0_0_8px_rgba(34,197,94,0.2)] dark:text-green-400",title:"Submit for transcription (Enter)",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}),"transcribing"===a&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,b.jsxs)("svg",{className:"h-4 w-4 animate-spin text-[#2490b5] dark:text-neon-blue-400",viewBox:"0 0 24 24",fill:"none",children:[(0,b.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,b.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,b.jsx)("span",{className:"text-xs text-[#2490b5] dark:text-neon-blue-400",children:"Transcribing..."})]}),"error"===a&&(0,b.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,b.jsx)("span",{className:"text-xs text-red-400",title:e||"Transcription failed",children:"Failed"}),(0,b.jsx)("button",{onClick:k,className:"rounded-md border border-neon-blue-400/40 bg-neon-blue-400/15 px-1.5 py-1 text-xs font-medium text-neon-blue-400 transition-all hover:bg-neon-blue-400/25",title:"Retry transcription",children:"Retry"}),(0,b.jsx)("button",{onClick:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear",children:(0,b.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,b.jsx)("button",{onClick:l,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-void-400/50 hover:text-void-700 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-void-400/50 dark:hover:text-void-300",title:"Voice settings",children:(0,b.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})}function i({label:a,value:d,onChange:e}){let[f,g]=(0,c.useState)(!1),h=(0,c.useRef)(null),i=(0,c.useCallback)(a=>{if(!f)return;a.preventDefault(),a.stopPropagation();let b=[];a.ctrlKey&&b.push("Ctrl"),a.shiftKey&&b.push("Shift"),a.altKey&&b.push("Alt"),a.metaKey&&b.push("Cmd");let c=a.key;if(!["Control","Shift","Alt","Meta"].includes(c)){let a=" "===c?"Space":"Escape"===c?"Escape":"Enter"===c?"Enter":(c.length,c);b.push(a),e(b.join("+")),g(!1)}},[f,e]);return(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:a}),(0,b.jsx)("input",{ref:h,type:"text",value:f?"Press keys...":d,readOnly:!0,onFocus:()=>g(!0),onBlur:()=>g(!1),onKeyDown:i,className:`w-28 rounded border px-2 py-1 text-center text-xs ${f?"border-neon-blue-400 bg-neon-blue-400/10 text-neon-blue-600 dark:text-neon-blue-400":"border-void-300 bg-void-50 text-void-700 dark:border-void-600 dark:bg-void-700 dark:text-void-300"} cursor-pointer outline-none`})]})}function j({settings:a,onSave:d,onClose:e}){let f=(0,c.useRef)(null),[g,h]=(0,c.useState)({...a.shortcuts}),[j,k]=(0,c.useState)(a.autoSubmitTerminal),[l,m]=(0,c.useState)(Math.round(a.maxRecordingSeconds/60)),n=(0,c.useRef)({shortcuts:g,autoSubmit:j,maxMinutes:l});return n.current={shortcuts:g,autoSubmit:j,maxMinutes:l},(0,c.useEffect)(()=>()=>{let{shortcuts:a,autoSubmit:b,maxMinutes:c}=n.current;d({shortcuts:a,autoSubmitTerminal:b,maxRecordingSeconds:60*Math.max(1,c)})},[]),(0,c.useEffect)(()=>{let a=a=>{f.current&&!f.current.contains(a.target)&&e()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e]),(0,b.jsxs)("div",{ref:f,className:"w-80 rounded-lg border border-void-200 bg-white p-4 shadow-(--shadow-overlay) dark:border-void-600 dark:bg-void-800",children:[(0,b.jsx)("h3",{className:"mb-3 text-sm font-medium text-void-800 dark:text-void-200",children:"Voice Settings"}),(0,b.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Keyboard Shortcuts"}),(0,b.jsx)(i,{label:"Start recording",value:g.startRecording,onChange:a=>h(b=>({...b,startRecording:a}))}),(0,b.jsx)(i,{label:"Pause / Resume",value:g.pauseResume,onChange:a=>h(b=>({...b,pauseResume:a}))}),(0,b.jsx)(i,{label:"Submit",value:g.submit,onChange:a=>h(b=>({...b,submit:a}))}),(0,b.jsx)(i,{label:"Paste only",value:g.submitPasteOnly,onChange:a=>h(b=>({...b,submitPasteOnly:a}))}),(0,b.jsx)(i,{label:"Clear / Cancel",value:g.clear,onChange:a=>h(b=>({...b,clear:a}))})]}),(0,b.jsxs)("div",{className:"space-y-3 border-t border-void-200 pt-3 dark:border-void-600",children:[(0,b.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Behaviour"}),(0,b.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Auto-submit (terminal)"}),(0,b.jsx)("button",{type:"button",role:"switch","aria-checked":j,onClick:()=>k(!j),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${j?"bg-green-500":"bg-void-300 dark:bg-void-600"}`,children:(0,b.jsx)("span",{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition ${j?"translate-x-4":"translate-x-0"}`})})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,b.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Max recording (min)"}),(0,b.jsx)("input",{type:"number",min:1,max:30,value:l,onChange:a=>m(parseInt(a.target.value)||5),className:"w-16 rounded border border-void-300 bg-void-50 px-2 py-1 text-center text-xs text-void-700 outline-none dark:border-void-600 dark:bg-void-700 dark:text-void-300"})]})]})]})}function k({error:a,hasRecording:d,onRetry:e,onClear:f,onClose:g}){let h=(0,c.useRef)(null);(0,c.useEffect)(()=>{let a=a=>{h.current&&!h.current.contains(a.target)&&g()};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[g]);let i=!d;return(0,b.jsxs)("div",{ref:h,className:"w-72 rounded-lg border border-red-400/30 bg-white p-3 shadow-(--shadow-overlay) dark:border-red-400/20 dark:bg-void-800",children:[(0,b.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,b.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,b.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:i?"Recording Failed":"Transcription Failed"}),(0,b.jsx)("div",{className:"mt-1 text-xs text-void-600 dark:text-void-300",children:a})]})]}),(0,b.jsx)("div",{className:"mt-2 text-xs text-void-500 dark:text-void-400",children:i&&1?"Microphone requires HTTPS or localhost. Try accessing via localhost:3003, or add this origin to chrome://flags/#unsafely-treat-insecure-origin-as-secure.":i?"Could not access the microphone.":"Your recording is preserved. You can retry or clear and start over."}),(0,b.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,b.jsx)("button",{onClick:f,className:"rounded border border-void-300 bg-void-100 px-2 py-1 text-xs text-void-600 hover:text-void-800 dark:border-void-600 dark:bg-void-700 dark:text-void-400 dark:hover:text-void-300",children:i?"Dismiss":"Clear"}),d&&e&&(0,b.jsx)("button",{onClick:e,className:"rounded border border-neon-blue-400/40 bg-neon-blue-400/15 px-2 py-1 text-xs text-neon-blue-600 hover:bg-neon-blue-400/25 dark:text-neon-blue-400",children:"Retry"})]})]})}function l(){let a=n(),d=(0,c.useRef)(null),e=(0,c.useRef)(0),[f,i]=(0,c.useState)(!1);return((0,c.useEffect)(()=>{i(!0)},[]),null===a.currentClaimantId&&f&&("idle"!==a.voiceState&&"disabled"!==a.voiceState||a.showSettings))?(0,g.createPortal)((0,b.jsxs)("div",{className:"fixed bottom-4 right-4 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200 rounded-xl border border-red-400/30 bg-white/95 px-3 py-2 shadow-(--shadow-card) backdrop-blur-sm dark:border-red-400/20 dark:bg-void-800/95",ref:d,children:[(0,b.jsx)(h,{voiceState:a.voiceState,elapsedSeconds:a.elapsedSeconds,disabled:!1,error:a.error,onRecord:a.startRecording,onPause:a.pauseRecording,onResume:a.resumeRecording,onClear:a.clearRecording,onSubmit:a.submitRecording,onRetry:a.retryTranscription,onOpenSettings:()=>{Date.now()-e.current<200||a.setShowSettings(!a.showSettings)}}),a.showSettings&&(0,b.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,b.jsx)(j,{settings:a.settings.voice,onSave:b=>a.updateSettings({voice:b}),onClose:()=>{e.current=Date.now(),a.setShowSettings(!1)}})}),"error"===a.voiceState&&a.error&&(0,b.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,b.jsx)(k,{error:a.error,hasRecording:a.hasRecording,onRetry:()=>a.retryTranscription(),onClear:()=>a.clearRecording(),onClose:()=>a.clearRecording()})})]}),document.body):null}a.s(["VoiceControlBar",()=>h],7957),a.s(["VoiceSettingsPopover",()=>j],15156),a.s(["VoiceErrorPopup",()=>k],90473);let m=(0,c.createContext)(null);function n(){let a=(0,c.useContext)(m);if(!a)throw Error("useVoice() must be used inside <VoiceProvider>");return a}function o({children:a}){let{settings:g,updateSettings:h}=function(){let[a,b]=(0,c.useState)(f),[d,g]=(0,c.useState)(!0);return(0,c.useEffect)(()=>{fetch("/api/settings").then(a=>a.json()).then(a=>{b({...f,...a,voice:{...e,...a?.voice}})}).catch(()=>{}).finally(()=>g(!1))},[]),{settings:a,updateSettings:(0,c.useCallback)(async a=>{try{let c=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(c.ok){let a=await c.json();return b({...f,...a,voice:{...e,...a?.voice}}),a}}catch{}return null},[]),isLoading:d}}(),i=(0,c.useRef)(new Map),j=(0,c.useRef)(null),k=(0,c.useCallback)((a,b)=>{i.current.set(a,b),j.current=a},[]),n=(0,c.useCallback)(a=>{if(i.current.delete(a),j.current===a){let a=Array.from(i.current.keys());j.current=a.length>0?a[0]:null}},[]),o=(0,c.useRef)(null),[p,q]=(0,c.useState)(null),r=(0,c.useRef)(null),s=(0,c.useRef)("auto"),[t,u]=(0,c.useState)(!1),[v,w]=(0,c.useState)(!1),x=(0,c.useCallback)(a=>{let b=r.current;if(b){if("input"===b.type&&b.element){if(!document.contains(b.element))return;let c=b.element,d=c.selectionStart??c.value.length,e=c.selectionEnd??c.value.length;c.focus(),c.setSelectionRange(d,e),document.execCommand("insertText",!1,a)}else if("terminal"===b.type&&b.terminalId){let c=i.current.get(b.terminalId);if(!c)return;let d="auto"===s.current&&g.voice.autoSubmitTerminal;c.sendInput(a),d&&setTimeout(()=>c.sendInput("\r"),300)}s.current="auto"}},[g.voice.autoSubmitTerminal]),y=(0,c.useCallback)(a=>{o.current?o.current.onTranscriptionComplete(a):x(a)},[x]),z=function({maxRecordingSeconds:a,onTranscriptionComplete:b}){let[d,e]=(0,c.useState)("idle"),[f,g]=(0,c.useState)(0),[h,i]=(0,c.useState)(null),[j,k]=(0,c.useState)(null),l=(0,c.useRef)(null),m=(0,c.useRef)([]),n=(0,c.useRef)(null),o=(0,c.useRef)(null),p=(0,c.useRef)(null),q=(0,c.useRef)(0),r=(0,c.useRef)(!1),s=(0,c.useRef)(b);(0,c.useEffect)(()=>{s.current=b},[b]);let t=(0,c.useCallback)(()=>{n.current||(n.current=setInterval(()=>{g(a=>a+1)},1e3))},[]),u=(0,c.useCallback)(()=>{n.current&&(clearInterval(n.current),n.current=null)},[]);(0,c.useEffect)(()=>{"recording"===d&&f-q.current>=a&&(l.current?.state==="recording"&&l.current.pause(),r.current=!0,u(),e("paused"))},[d,f,a,u]),(0,c.useEffect)(()=>()=>{if(u(),l.current?.state!=="inactive")try{l.current?.stop()}catch{}p.current?.getTracks().forEach(a=>a.stop())},[u]);let v=(0,c.useCallback)(()=>new Promise(a=>{let b=l.current;b&&"inactive"!==b.state?(b.ondataavailable=a=>{a.data.size>0&&m.current.push(a.data)},b.onstop=()=>{a(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))},b.stop()):a(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))}),[]),w=(0,c.useCallback)(async a=>{let b=new FormData;b.append("audio",a,"recording.webm");let c=await fetch("/api/transcribe",{method:"POST",body:b}),d=await c.json();if(!c.ok)throw Error(d.error||"Transcription failed");return d.text},[]),x=(0,c.useCallback)(()=>{p.current?.getTracks().forEach(a=>a.stop()),p.current=null},[]),y=(0,c.useCallback)(async()=>{if("idle"===d||"disabled"===d)try{i(null),k(null),m.current=[],o.current=null,g(0),q.current=0;let a=await navigator.mediaDevices.getUserMedia({audio:!0});p.current=a;let b=MediaRecorder.isTypeSupported("audio/ogg;codecs=opus")?"audio/ogg;codecs=opus":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"",c=new MediaRecorder(a,b?{mimeType:b}:void 0);l.current=c,c.ondataavailable=a=>{a.data.size>0&&m.current.push(a.data)},c.start(1e3),e("recording"),t()}catch(b){let a=b.message;a.includes("Permission")||a.includes("NotAllowed")?i("Microphone permission denied. Please allow microphone access."):i(a||"Failed to start recording"),e("error"),x()}},[d,t,x]),z=(0,c.useCallback)(()=>{"recording"===d&&(l.current?.state==="recording"&&l.current.pause(),u(),e("paused"))},[d,u]),A=(0,c.useCallback)(()=>{"paused"===d&&(l.current?.state==="paused"&&l.current.resume(),r.current&&(q.current=f,r.current=!1),t(),e("recording"))},[d,f,t]),B=(0,c.useCallback)(()=>{if(u(),l.current?.state!=="inactive")try{l.current?.stop()}catch{}m.current=[],o.current=null,g(0),i(null),k(null),x(),e("idle")},[u,x]),C=(0,c.useCallback)(async()=>{if("recording"===d||"paused"===d){u(),e("transcribing");try{let a=await v();o.current=a,x();let b=await w(a);k(b),g(0),m.current=[],e("idle"),s.current?.(b)}catch(a){i(a.message||"Transcription failed"),e("error")}}},[d,u,v,w,x]),D=(0,c.useCallback)(async()=>{if("error"===d&&o.current){e("transcribing"),i(null);try{let a=await w(o.current);k(a),o.current=null,m.current=[],g(0),e("idle"),s.current?.(a)}catch(a){i(a.message||"Transcription failed"),e("error")}}},[d,w]);return{state:d,elapsedSeconds:f,error:h,transcribedText:j,hasRecording:null!==o.current||m.current.length>0,startRecording:y,pauseRecording:z,resumeRecording:A,clearRecording:B,submitRecording:C,retryTranscription:D}}({maxRecordingSeconds:g.voice.maxRecordingSeconds,onTranscriptionComplete:y}),A=(0,c.useCallback)(a=>{o.current&&o.current.id!==a.id&&(o.current.onRelease?.(),"idle"!==z.state&&"disabled"!==z.state&&z.clearRecording()),o.current=a,q(a.id)},[z]),B=(0,c.useCallback)(a=>{o.current?.id===a.id&&("idle"!==z.state&&"error"!==z.state&&"disabled"!==z.state&&z.clearRecording(),o.current=null,q(null))},[z]);(0,c.useEffect)(()=>{let a=a=>{let b=a.target;if(b.closest("[data-voice-target]")&&("INPUT"===b.tagName||"TEXTAREA"===b.tagName))return void w(!0);if(b.closest("[data-terminal-id]")){let a=b.closest("[data-terminal-id]").dataset.terminalId;a&&i.current.has(a)&&(j.current=a,w(!0))}},b=()=>{setTimeout(()=>{let a=document.activeElement;if(!a)return void w(!1);let b=a.closest("[data-voice-target]")&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName),c=a.closest("[data-terminal-id]");b||c||w(!1)},100)};return document.addEventListener("focusin",a),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",b)}},[]);let C=(0,c.useCallback)(()=>{if(o.current)o.current.onRecordStart?.(),z.startRecording();else{let a=document.activeElement;if(a&&("INPUT"===a.tagName||"TEXTAREA"===a.tagName)&&a.closest("[data-voice-target]"))r.current={type:"input",element:a};else if(a?.closest("[data-terminal-id]")){let b=a.closest("[data-terminal-id]").dataset.terminalId||j.current;if(!(b&&i.current.has(b)))return;r.current={type:"terminal",terminalId:b}}else{if(!(j.current&&i.current.has(j.current)))return;r.current={type:"terminal",terminalId:j.current}}z.startRecording()}},[z]),D=(0,c.useCallback)(()=>{s.current="paste",z.submitRecording()},[z]),E=(0,c.useCallback)(()=>{"recording"===z.state?z.pauseRecording():"paused"===z.state&&z.resumeRecording()},[z]);!function({voiceState:a,shortcuts:b,callbacks:e,enabled:f,hasFieldFocus:g,suspended:h}){let i=(0,c.useRef)(e),j=(0,c.useRef)(a),k=(0,c.useRef)(b),l=(0,c.useRef)(g),m=(0,c.useRef)(h);(0,c.useEffect)(()=>{i.current=e,j.current=a,k.current=b,l.current=g,m.current=h}),(0,c.useEffect)(()=>{if(!f)return;let a=a=>{if(m.current)return;let b=j.current,c=k.current,e=i.current;if("idle"===b&&l.current&&d(a,c.startRecording)){a.preventDefault(),a.stopPropagation(),e.onStartRecording();return}if("recording"===b||"paused"===b){if(d(a,c.pauseResume)){a.preventDefault(),a.stopPropagation(),e.onPauseResume();return}if(d(a,c.submitPasteOnly)){a.preventDefault(),a.stopPropagation(),e.onSubmitPasteOnly();return}if(d(a,c.submit)){a.preventDefault(),a.stopPropagation(),e.onSubmit();return}if(d(a,c.clear)){a.preventDefault(),a.stopPropagation(),e.onClear();return}}};return document.addEventListener("keydown",a,!0),()=>document.removeEventListener("keydown",a,!0)},[f])}({voiceState:z.state,shortcuts:g.voice.shortcuts,callbacks:{onStartRecording:C,onPauseResume:E,onSubmit:z.submitRecording,onSubmitPasteOnly:D,onClear:z.clearRecording},enabled:!0,hasFieldFocus:!!o.current||v,suspended:t});let F={voiceState:z.state,elapsedSeconds:z.elapsedSeconds,error:z.error,hasRecording:z.hasRecording,startRecording:z.startRecording,pauseRecording:z.pauseRecording,resumeRecording:z.resumeRecording,clearRecording:z.clearRecording,submitRecording:z.submitRecording,retryTranscription:z.retryTranscription,claimVoiceControl:A,releaseVoiceControl:B,currentClaimantId:p,settings:g,updateSettings:h,registerTerminal:k,unregisterTerminal:n,submitModeRef:s,showSettings:t,setShowSettings:u,hasFieldFocus:v,setHasFieldFocus:w};return(0,b.jsxs)(m.Provider,{value:F,children:[a,(0,b.jsx)(l,{})]})}}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=src_contexts_VoiceContext_tsx_cfba7292._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
1
|
+
<!DOCTYPE html><!--_fCicMElBguqtWA_EpzdZ--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/43bfca92afbacd38.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/f3d7065d54a0b9ac.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/8fb2a99c64580de7.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>SlyCode 🦊</title><meta name="description" content="SlyCode Managed Projects"/><link rel="icon" href="/favicon.png"/><script>(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1088,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"VoiceProvider\"]\n3:I[39756,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[37457,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n5:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n:HL[\"/_next/static/chunks/43bfca92afbacd38.css\",\"style\"]\n:HL[\"/_next/static/chunks/f3d7065d54a0b9ac.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"_fCicMElBguqtWA_EpzdZ\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/43bfca92afbacd38.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/f3d7065d54a0b9ac.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/8fb2a99c64580de7.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()\"}}]}],[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[27201,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"IconMark\"]\n7:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"SlyCode 🦊\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"SlyCode Managed Projects\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.png\"}],[\"$\",\"$Ld\",\"3\",{}]]\n"])</script></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><!--
|
|
2
|
-
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"
|
|
1
|
+
<!DOCTYPE html><!--_fCicMElBguqtWA_EpzdZ--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
|
|
2
|
+
@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"_fCicMElBguqtWA_EpzdZ\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},1088,39269,9083,49996,e=>{"use strict";e.s(["VoiceProvider",()=>b,"useVoice",()=>v],1088);var r=e.i(18050),t=e.i(71645);function n(e,r){let t,n,o=(n=(t=r.split("+").map(e=>e.trim().toLowerCase()))[t.length-1],{ctrlKey:t.includes("ctrl"),shiftKey:t.includes("shift"),altKey:t.includes("alt"),metaKey:t.includes("meta")||t.includes("cmd"),key:"space"===n?" ":"escape"===n?"Escape":"enter"===n?"Enter":n});return(e.key.toLowerCase()===o.key.toLowerCase()||e.key===o.key)&&o.ctrlKey===e.ctrlKey&&o.shiftKey===e.shiftKey&&o.altKey===e.altKey&&o.metaKey===e.metaKey}let o={autoSubmitTerminal:!0,maxRecordingSeconds:300,shortcuts:{startRecording:"Ctrl+.",pauseResume:"Space",submit:"Enter",submitPasteOnly:"Shift+Enter",clear:"Escape"}},a={voice:o};var s=e.i(74080);function i({voiceState:e,elapsedSeconds:t,disabled:n,error:o,onRecord:a,onPause:s,onResume:i,onClear:d,onSubmit:l,onRetry:c,onOpenSettings:u}){let m;return(0,r.jsxs)("div",{className:`flex items-center gap-1.5 ${n?"opacity-40 pointer-events-none":""}`,children:[("idle"===e||"disabled"===e)&&(0,r.jsx)("button",{onClick:a,disabled:n,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 disabled:opacity-50 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Start recording (Ctrl+.)",children:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})}),("recording"===e||"paused"===e)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,r.jsx)("span",{className:`inline-block h-2 w-2 rounded-full bg-red-500 ${"recording"===e?"animate-pulse":""}`}),(0,r.jsx)("span",{className:"min-w-[2.5rem] font-mono text-xs tabular-nums text-red-600 dark:text-red-400",children:(m=Math.floor(t/60),`${m}:${(t%60).toString().padStart(2,"0")}`)})]}),(0,r.jsx)("button",{onClick:"recording"===e?s:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-neon-blue-400/40 hover:bg-neon-blue-400/10 hover:text-neon-blue-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-neon-blue-400/40 dark:hover:bg-neon-blue-400/10 dark:hover:text-neon-blue-400",title:"recording"===e?"Pause (Space)":"Resume (Space)",children:"recording"===e?(0,r.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("rect",{x:"6",y:"4",width:"4",height:"16"}),(0,r.jsx)("rect",{x:"14",y:"4",width:"4",height:"16"})]}):(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("polygon",{points:"5,3 19,12 5,21"})})}),(0,r.jsx)("button",{onClick:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear recording (Escape)",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsx)("button",{onClick:l,className:"rounded-md border border-green-400/40 bg-green-400/15 px-2 py-1.5 text-xs font-medium text-green-600 transition-all hover:bg-green-400/25 hover:shadow-[0_0_8px_rgba(34,197,94,0.2)] dark:text-green-400",title:"Submit for transcription (Enter)",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}),"transcribing"===e&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,r.jsxs)("svg",{className:"h-4 w-4 animate-spin text-[#2490b5] dark:text-neon-blue-400",viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,r.jsx)("span",{className:"text-xs text-[#2490b5] dark:text-neon-blue-400",children:"Transcribing..."})]}),"error"===e&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-red-400",title:o||"Transcription failed",children:"Failed"}),(0,r.jsx)("button",{onClick:c,className:"rounded-md border border-neon-blue-400/40 bg-neon-blue-400/15 px-1.5 py-1 text-xs font-medium text-neon-blue-400 transition-all hover:bg-neon-blue-400/25",title:"Retry transcription",children:"Retry"}),(0,r.jsx)("button",{onClick:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("button",{onClick:u,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-void-400/50 hover:text-void-700 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-void-400/50 dark:hover:text-void-300",title:"Voice settings",children:(0,r.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})}function d({label:e,value:n,onChange:o}){let[a,s]=(0,t.useState)(!1),i=(0,t.useRef)(null),d=(0,t.useCallback)(e=>{if(!a)return;e.preventDefault(),e.stopPropagation();let r=[];e.ctrlKey&&r.push("Ctrl"),e.shiftKey&&r.push("Shift"),e.altKey&&r.push("Alt"),e.metaKey&&r.push("Cmd");let t=e.key;if(!["Control","Shift","Alt","Meta"].includes(t)){let e=" "===t?"Space":"Escape"===t?"Escape":"Enter"===t?"Enter":(t.length,t);r.push(e),o(r.join("+")),s(!1)}},[a,o]);return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:e}),(0,r.jsx)("input",{ref:i,type:"text",value:a?"Press keys...":n,readOnly:!0,onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:d,className:`w-28 rounded border px-2 py-1 text-center text-xs ${a?"border-neon-blue-400 bg-neon-blue-400/10 text-neon-blue-600 dark:text-neon-blue-400":"border-void-300 bg-void-50 text-void-700 dark:border-void-600 dark:bg-void-700 dark:text-void-300"} cursor-pointer outline-none`})]})}function l({settings:e,onSave:n,onClose:o}){let a=(0,t.useRef)(null),[s,i]=(0,t.useState)({...e.shortcuts}),[l,c]=(0,t.useState)(e.autoSubmitTerminal),[u,m]=(0,t.useState)(Math.round(e.maxRecordingSeconds/60)),v=(0,t.useRef)({shortcuts:s,autoSubmit:l,maxMinutes:u});return v.current={shortcuts:s,autoSubmit:l,maxMinutes:u},(0,t.useEffect)(()=>()=>{let{shortcuts:e,autoSubmit:r,maxMinutes:t}=v.current;n({shortcuts:e,autoSubmitTerminal:r,maxRecordingSeconds:60*Math.max(1,t)})},[]),(0,t.useEffect)(()=>{let e=e=>{a.current&&!a.current.contains(e.target)&&o()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o]),(0,r.jsxs)("div",{ref:a,className:"w-80 rounded-lg border border-void-200 bg-white p-4 shadow-(--shadow-overlay) dark:border-void-600 dark:bg-void-800",children:[(0,r.jsx)("h3",{className:"mb-3 text-sm font-medium text-void-800 dark:text-void-200",children:"Voice Settings"}),(0,r.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,r.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Keyboard Shortcuts"}),(0,r.jsx)(d,{label:"Start recording",value:s.startRecording,onChange:e=>i(r=>({...r,startRecording:e}))}),(0,r.jsx)(d,{label:"Pause / Resume",value:s.pauseResume,onChange:e=>i(r=>({...r,pauseResume:e}))}),(0,r.jsx)(d,{label:"Submit",value:s.submit,onChange:e=>i(r=>({...r,submit:e}))}),(0,r.jsx)(d,{label:"Paste only",value:s.submitPasteOnly,onChange:e=>i(r=>({...r,submitPasteOnly:e}))}),(0,r.jsx)(d,{label:"Clear / Cancel",value:s.clear,onChange:e=>i(r=>({...r,clear:e}))})]}),(0,r.jsxs)("div",{className:"space-y-3 border-t border-void-200 pt-3 dark:border-void-600",children:[(0,r.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Behaviour"}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Auto-submit (terminal)"}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":l,onClick:()=>c(!l),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${l?"bg-green-500":"bg-void-300 dark:bg-void-600"}`,children:(0,r.jsx)("span",{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition ${l?"translate-x-4":"translate-x-0"}`})})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Max recording (min)"}),(0,r.jsx)("input",{type:"number",min:1,max:30,value:u,onChange:e=>m(parseInt(e.target.value)||5),className:"w-16 rounded border border-void-300 bg-void-50 px-2 py-1 text-center text-xs text-void-700 outline-none dark:border-void-600 dark:bg-void-700 dark:text-void-300"})]})]})]})}function c({error:e,hasRecording:n,onRetry:o,onClear:a,onClose:s}){let i=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&s()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);let d=window.isSecureContext,l=!n;return(0,r.jsxs)("div",{ref:i,className:"w-72 rounded-lg border border-red-400/30 bg-white p-3 shadow-(--shadow-overlay) dark:border-red-400/20 dark:bg-void-800",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,r.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:l?"Recording Failed":"Transcription Failed"}),(0,r.jsx)("div",{className:"mt-1 text-xs text-void-600 dark:text-void-300",children:e})]})]}),(0,r.jsx)("div",{className:"mt-2 text-xs text-void-500 dark:text-void-400",children:l&&!d?"Microphone requires HTTPS or localhost. Try accessing via localhost:3003, or add this origin to chrome://flags/#unsafely-treat-insecure-origin-as-secure.":l?"Could not access the microphone.":"Your recording is preserved. You can retry or clear and start over."}),(0,r.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,r.jsx)("button",{onClick:a,className:"rounded border border-void-300 bg-void-100 px-2 py-1 text-xs text-void-600 hover:text-void-800 dark:border-void-600 dark:bg-void-700 dark:text-void-400 dark:hover:text-void-300",children:l?"Dismiss":"Clear"}),n&&o&&(0,r.jsx)("button",{onClick:o,className:"rounded border border-neon-blue-400/40 bg-neon-blue-400/15 px-2 py-1 text-xs text-neon-blue-600 hover:bg-neon-blue-400/25 dark:text-neon-blue-400",children:"Retry"})]})]})}function u(){let e=v(),n=(0,t.useRef)(null),o=(0,t.useRef)(0),[a,d]=(0,t.useState)(!1);return((0,t.useEffect)(()=>{d(!0)},[]),null===e.currentClaimantId&&a&&("idle"!==e.voiceState&&"disabled"!==e.voiceState||e.showSettings))?(0,s.createPortal)((0,r.jsxs)("div",{className:"fixed bottom-4 right-4 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200 rounded-xl border border-red-400/30 bg-white/95 px-3 py-2 shadow-(--shadow-card) backdrop-blur-sm dark:border-red-400/20 dark:bg-void-800/95",ref:n,children:[(0,r.jsx)(i,{voiceState:e.voiceState,elapsedSeconds:e.elapsedSeconds,disabled:!1,error:e.error,onRecord:e.startRecording,onPause:e.pauseRecording,onResume:e.resumeRecording,onClear:e.clearRecording,onSubmit:e.submitRecording,onRetry:e.retryTranscription,onOpenSettings:()=>{Date.now()-o.current<200||e.setShowSettings(!e.showSettings)}}),e.showSettings&&(0,r.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,r.jsx)(l,{settings:e.settings.voice,onSave:r=>e.updateSettings({voice:r}),onClose:()=>{o.current=Date.now(),e.setShowSettings(!1)}})}),"error"===e.voiceState&&e.error&&(0,r.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,r.jsx)(c,{error:e.error,hasRecording:e.hasRecording,onRetry:()=>e.retryTranscription(),onClear:()=>e.clearRecording(),onClose:()=>e.clearRecording()})})]}),document.body):null}e.s(["VoiceControlBar",()=>i],39269),e.s(["VoiceSettingsPopover",()=>l],9083),e.s(["VoiceErrorPopup",()=>c],49996);let m=(0,t.createContext)(null);function v(){let e=(0,t.useContext)(m);if(!e)throw Error("useVoice() must be used inside <VoiceProvider>");return e}function b({children:e}){let{settings:s,updateSettings:i}=function(){let[e,r]=(0,t.useState)(a),[n,s]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{r({...a,...e,voice:{...o,...e?.voice}})}).catch(()=>{}).finally(()=>s(!1))},[]),{settings:e,updateSettings:(0,t.useCallback)(async e=>{try{let t=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok){let e=await t.json();return r({...a,...e,voice:{...o,...e?.voice}}),e}}catch{}return null},[]),isLoading:n}}(),d=(0,t.useRef)(new Map),l=(0,t.useRef)(null),c=(0,t.useCallback)((e,r)=>{d.current.set(e,r),l.current=e},[]),v=(0,t.useCallback)(e=>{if(d.current.delete(e),l.current===e){let e=Array.from(d.current.keys());l.current=e.length>0?e[0]:null}},[]),b=(0,t.useRef)(null),[x,h]=(0,t.useState)(null),p=(0,t.useRef)(null),g=(0,t.useRef)("auto"),[f,k]=(0,t.useState)(!1),[y,j]=(0,t.useState)(!1),R=(0,t.useCallback)(e=>{let r=p.current;if(r){if("input"===r.type&&r.element){if(!document.contains(r.element))return;let t=r.element,n=t.selectionStart??t.value.length,o=t.selectionEnd??t.value.length;t.focus(),t.setSelectionRange(n,o),document.execCommand("insertText",!1,e)}else if("terminal"===r.type&&r.terminalId){let t=d.current.get(r.terminalId);if(!t)return;let n="auto"===g.current&&s.voice.autoSubmitTerminal;t.sendInput(e),n&&setTimeout(()=>t.sendInput("\r"),300)}g.current="auto"}},[s.voice.autoSubmitTerminal]),w=(0,t.useCallback)(e=>{b.current?b.current.onTranscriptionComplete(e):R(e)},[R]),C=function({maxRecordingSeconds:e,onTranscriptionComplete:r}){let[n,o]=(0,t.useState)("idle"),[a,s]=(0,t.useState)(0),[i,d]=(0,t.useState)(null),[l,c]=(0,t.useState)(null),u=(0,t.useRef)(null),m=(0,t.useRef)([]),v=(0,t.useRef)(null),b=(0,t.useRef)(null),x=(0,t.useRef)(null),h=(0,t.useRef)(0),p=(0,t.useRef)(!1),g=(0,t.useRef)(r);(0,t.useEffect)(()=>{g.current=r},[r]);let f=(0,t.useCallback)(()=>{v.current||(v.current=setInterval(()=>{s(e=>e+1)},1e3))},[]),k=(0,t.useCallback)(()=>{v.current&&(clearInterval(v.current),v.current=null)},[]);(0,t.useEffect)(()=>{"recording"===n&&a-h.current>=e&&(u.current?.state==="recording"&&u.current.pause(),p.current=!0,k(),o("paused"))},[n,a,e,k]),(0,t.useEffect)(()=>()=>{if(k(),u.current?.state!=="inactive")try{u.current?.stop()}catch{}x.current?.getTracks().forEach(e=>e.stop())},[k]);let y=(0,t.useCallback)(()=>new Promise(e=>{let r=u.current;r&&"inactive"!==r.state?(r.ondataavailable=e=>{e.data.size>0&&m.current.push(e.data)},r.onstop=()=>{e(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))},r.stop()):e(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))}),[]),j=(0,t.useCallback)(async e=>{let r=new FormData;r.append("audio",e,"recording.webm");let t=await fetch("/api/transcribe",{method:"POST",body:r}),n=await t.json();if(!t.ok)throw Error(n.error||"Transcription failed");return n.text},[]),R=(0,t.useCallback)(()=>{x.current?.getTracks().forEach(e=>e.stop()),x.current=null},[]),w=(0,t.useCallback)(async()=>{if("idle"===n||"disabled"===n)try{d(null),c(null),m.current=[],b.current=null,s(0),h.current=0;let e=await navigator.mediaDevices.getUserMedia({audio:!0});x.current=e;let r=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"",t=new MediaRecorder(e,r?{mimeType:r}:void 0);u.current=t,t.ondataavailable=e=>{e.data.size>0&&m.current.push(e.data)},t.start(1e3),o("recording"),f()}catch(r){let e=r.message;e.includes("Permission")||e.includes("NotAllowed")?d("Microphone permission denied. Please allow microphone access."):d(e||"Failed to start recording"),o("error"),R()}},[n,f,R]),C=(0,t.useCallback)(()=>{"recording"===n&&(u.current?.state==="recording"&&u.current.pause(),k(),o("paused"))},[n,k]),S=(0,t.useCallback)(()=>{"paused"===n&&(u.current?.state==="paused"&&u.current.resume(),p.current&&(h.current=a,p.current=!1),f(),o("recording"))},[n,a,f]),N=(0,t.useCallback)(()=>{if(k(),u.current?.state!=="inactive")try{u.current?.stop()}catch{}m.current=[],b.current=null,s(0),d(null),c(null),R(),o("idle")},[k,R]),E=(0,t.useCallback)(async()=>{if("recording"===n||"paused"===n){k(),o("transcribing");try{let e=await y();b.current=e,R();let r=await j(e);c(r),s(0),m.current=[],o("idle"),g.current?.(r)}catch(e){d(e.message||"Transcription failed"),o("error")}}},[n,k,y,j,R]),T=(0,t.useCallback)(async()=>{if("error"===n&&b.current){o("transcribing"),d(null);try{let e=await j(b.current);c(e),b.current=null,m.current=[],s(0),o("idle"),g.current?.(e)}catch(e){d(e.message||"Transcription failed"),o("error")}}},[n,j]);return{state:n,elapsedSeconds:a,error:i,transcribedText:l,hasRecording:null!==b.current||m.current.length>0,startRecording:w,pauseRecording:C,resumeRecording:S,clearRecording:N,submitRecording:E,retryTranscription:T}}({maxRecordingSeconds:s.voice.maxRecordingSeconds,onTranscriptionComplete:w}),S=(0,t.useCallback)(e=>{b.current&&b.current.id!==e.id&&(b.current.onRelease?.(),"idle"!==C.state&&"disabled"!==C.state&&C.clearRecording()),b.current=e,h(e.id)},[C]),N=(0,t.useCallback)(e=>{b.current?.id===e.id&&("idle"!==C.state&&"error"!==C.state&&"disabled"!==C.state&&C.clearRecording(),b.current=null,h(null))},[C]);(0,t.useEffect)(()=>{let e=e=>{let r=e.target;if(r.closest("[data-voice-target]")&&("INPUT"===r.tagName||"TEXTAREA"===r.tagName))return void j(!0);if(r.closest("[data-terminal-id]")){let e=r.closest("[data-terminal-id]").dataset.terminalId;e&&d.current.has(e)&&(l.current=e,j(!0))}},r=()=>{setTimeout(()=>{let e=document.activeElement;if(!e)return void j(!1);let r=e.closest("[data-voice-target]")&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName),t=e.closest("[data-terminal-id]");r||t||j(!1)},100)};return document.addEventListener("focusin",e),document.addEventListener("focusout",r),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",r)}},[]);let E=(0,t.useCallback)(()=>{if(b.current)b.current.onRecordStart?.(),C.startRecording();else{let e=document.activeElement;if(e&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName)&&e.closest("[data-voice-target]"))p.current={type:"input",element:e};else if(e?.closest("[data-terminal-id]")){let r=e.closest("[data-terminal-id]").dataset.terminalId||l.current;if(!(r&&d.current.has(r)))return;p.current={type:"terminal",terminalId:r}}else{if(!(l.current&&d.current.has(l.current)))return;p.current={type:"terminal",terminalId:l.current}}C.startRecording()}},[C]),T=(0,t.useCallback)(()=>{g.current="paste",C.submitRecording()},[C]),P=(0,t.useCallback)(()=>{"recording"===C.state?C.pauseRecording():"paused"===C.state&&C.resumeRecording()},[C]);!function({voiceState:e,shortcuts:r,callbacks:o,enabled:a,hasFieldFocus:s,suspended:i}){let d=(0,t.useRef)(o),l=(0,t.useRef)(e),c=(0,t.useRef)(r),u=(0,t.useRef)(s),m=(0,t.useRef)(i);(0,t.useEffect)(()=>{d.current=o,l.current=e,c.current=r,u.current=s,m.current=i}),(0,t.useEffect)(()=>{if(!a)return;let e=e=>{if(m.current)return;let r=l.current,t=c.current,o=d.current;if("idle"===r&&u.current&&n(e,t.startRecording)){e.preventDefault(),e.stopPropagation(),o.onStartRecording();return}if("recording"===r||"paused"===r){if(n(e,t.pauseResume)){e.preventDefault(),e.stopPropagation(),o.onPauseResume();return}if(n(e,t.submitPasteOnly)){e.preventDefault(),e.stopPropagation(),o.onSubmitPasteOnly();return}if(n(e,t.submit)){e.preventDefault(),e.stopPropagation(),o.onSubmit();return}if(n(e,t.clear)){e.preventDefault(),e.stopPropagation(),o.onClear();return}}};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[a])}({voiceState:C.state,shortcuts:s.voice.shortcuts,callbacks:{onStartRecording:E,onPauseResume:P,onSubmit:C.submitRecording,onSubmitPasteOnly:T,onClear:C.clearRecording},enabled:!0,hasFieldFocus:!!b.current||y,suspended:f});let L={voiceState:C.state,elapsedSeconds:C.elapsedSeconds,error:C.error,hasRecording:C.hasRecording,startRecording:C.startRecording,pauseRecording:C.pauseRecording,resumeRecording:C.resumeRecording,clearRecording:C.clearRecording,submitRecording:C.submitRecording,retryTranscription:C.retryTranscription,claimVoiceControl:S,releaseVoiceControl:N,currentClaimantId:x,settings:s,updateSettings:i,registerTerminal:c,unregisterTerminal:v,submitModeRef:g,showSettings:f,setShowSettings:k,hasFieldFocus:y,setHasFieldFocus:j};return(0,r.jsxs)(m.Provider,{value:L,children:[e,(0,r.jsx)(u,{})]})}}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,r,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},1088,39269,9083,49996,e=>{"use strict";e.s(["VoiceProvider",()=>b,"useVoice",()=>v],1088);var r=e.i(18050),t=e.i(71645);function n(e,r){let t,n,o=(n=(t=r.split("+").map(e=>e.trim().toLowerCase()))[t.length-1],{ctrlKey:t.includes("ctrl"),shiftKey:t.includes("shift"),altKey:t.includes("alt"),metaKey:t.includes("meta")||t.includes("cmd"),key:"space"===n?" ":"escape"===n?"Escape":"enter"===n?"Enter":n});return(e.key.toLowerCase()===o.key.toLowerCase()||e.key===o.key)&&o.ctrlKey===e.ctrlKey&&o.shiftKey===e.shiftKey&&o.altKey===e.altKey&&o.metaKey===e.metaKey}let o={autoSubmitTerminal:!0,maxRecordingSeconds:300,shortcuts:{startRecording:"Ctrl+.",pauseResume:"Space",submit:"Enter",submitPasteOnly:"Shift+Enter",clear:"Escape"}},a={voice:o};var s=e.i(74080);function i({voiceState:e,elapsedSeconds:t,disabled:n,error:o,onRecord:a,onPause:s,onResume:i,onClear:d,onSubmit:c,onRetry:l,onOpenSettings:u}){let m;return(0,r.jsxs)("div",{className:`flex items-center gap-1.5 ${n?"opacity-40 pointer-events-none":""}`,children:[("idle"===e||"disabled"===e)&&(0,r.jsx)("button",{onClick:a,disabled:n,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 disabled:opacity-50 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Start recording (Ctrl+.)",children:(0,r.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"})})}),("recording"===e||"paused"===e)&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,r.jsx)("span",{className:`inline-block h-2 w-2 rounded-full bg-red-500 ${"recording"===e?"animate-pulse":""}`}),(0,r.jsx)("span",{className:"min-w-[2.5rem] font-mono text-xs tabular-nums text-red-600 dark:text-red-400",children:(m=Math.floor(t/60),`${m}:${(t%60).toString().padStart(2,"0")}`)})]}),(0,r.jsx)("button",{onClick:"recording"===e?s:i,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-neon-blue-400/40 hover:bg-neon-blue-400/10 hover:text-neon-blue-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-neon-blue-400/40 dark:hover:bg-neon-blue-400/10 dark:hover:text-neon-blue-400",title:"recording"===e?"Pause (Space)":"Resume (Space)",children:"recording"===e?(0,r.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("rect",{x:"6",y:"4",width:"4",height:"16"}),(0,r.jsx)("rect",{x:"14",y:"4",width:"4",height:"16"})]}):(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("polygon",{points:"5,3 19,12 5,21"})})}),(0,r.jsx)("button",{onClick:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear recording (Escape)",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),(0,r.jsx)("button",{onClick:c,className:"rounded-md border border-green-400/40 bg-green-400/15 px-2 py-1.5 text-xs font-medium text-green-600 transition-all hover:bg-green-400/25 hover:shadow-[0_0_8px_rgba(34,197,94,0.2)] dark:text-green-400",title:"Submit for transcription (Enter)",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})})]}),"transcribing"===e&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5 px-1",children:[(0,r.jsxs)("svg",{className:"h-4 w-4 animate-spin text-[#2490b5] dark:text-neon-blue-400",viewBox:"0 0 24 24",fill:"none",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,r.jsx)("span",{className:"text-xs text-[#2490b5] dark:text-neon-blue-400",children:"Transcribing..."})]}),"error"===e&&(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-red-400",title:o||"Transcription failed",children:"Failed"}),(0,r.jsx)("button",{onClick:l,className:"rounded-md border border-neon-blue-400/40 bg-neon-blue-400/15 px-1.5 py-1 text-xs font-medium text-neon-blue-400 transition-all hover:bg-neon-blue-400/25",title:"Retry transcription",children:"Retry"}),(0,r.jsx)("button",{onClick:d,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-600 transition-all hover:border-red-400/40 hover:bg-red-400/10 hover:text-red-400 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-red-400/40 dark:hover:bg-red-400/10 dark:hover:text-red-400",title:"Clear",children:(0,r.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsx)("button",{onClick:u,className:"rounded-md border border-void-400/30 bg-void-200/50 p-1.5 text-void-500 transition-all hover:border-void-400/50 hover:text-void-700 dark:border-void-500/25 dark:bg-void-700/50 dark:text-void-400 dark:hover:border-void-400/50 dark:hover:text-void-300",title:"Voice settings",children:(0,r.jsxs)("svg",{className:"h-3.5 w-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})})]})}function d({label:e,value:n,onChange:o}){let[a,s]=(0,t.useState)(!1),i=(0,t.useRef)(null),d=(0,t.useCallback)(e=>{if(!a)return;e.preventDefault(),e.stopPropagation();let r=[];e.ctrlKey&&r.push("Ctrl"),e.shiftKey&&r.push("Shift"),e.altKey&&r.push("Alt"),e.metaKey&&r.push("Cmd");let t=e.key;if(!["Control","Shift","Alt","Meta"].includes(t)){let e=" "===t?"Space":"Escape"===t?"Escape":"Enter"===t?"Enter":(t.length,t);r.push(e),o(r.join("+")),s(!1)}},[a,o]);return(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:e}),(0,r.jsx)("input",{ref:i,type:"text",value:a?"Press keys...":n,readOnly:!0,onFocus:()=>s(!0),onBlur:()=>s(!1),onKeyDown:d,className:`w-28 rounded border px-2 py-1 text-center text-xs ${a?"border-neon-blue-400 bg-neon-blue-400/10 text-neon-blue-600 dark:text-neon-blue-400":"border-void-300 bg-void-50 text-void-700 dark:border-void-600 dark:bg-void-700 dark:text-void-300"} cursor-pointer outline-none`})]})}function c({settings:e,onSave:n,onClose:o}){let a=(0,t.useRef)(null),[s,i]=(0,t.useState)({...e.shortcuts}),[c,l]=(0,t.useState)(e.autoSubmitTerminal),[u,m]=(0,t.useState)(Math.round(e.maxRecordingSeconds/60)),v=(0,t.useRef)({shortcuts:s,autoSubmit:c,maxMinutes:u});return v.current={shortcuts:s,autoSubmit:c,maxMinutes:u},(0,t.useEffect)(()=>()=>{let{shortcuts:e,autoSubmit:r,maxMinutes:t}=v.current;n({shortcuts:e,autoSubmitTerminal:r,maxRecordingSeconds:60*Math.max(1,t)})},[]),(0,t.useEffect)(()=>{let e=e=>{a.current&&!a.current.contains(e.target)&&o()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[o]),(0,r.jsxs)("div",{ref:a,className:"w-80 rounded-lg border border-void-200 bg-white p-4 shadow-(--shadow-overlay) dark:border-void-600 dark:bg-void-800",children:[(0,r.jsx)("h3",{className:"mb-3 text-sm font-medium text-void-800 dark:text-void-200",children:"Voice Settings"}),(0,r.jsxs)("div",{className:"mb-4 space-y-2",children:[(0,r.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Keyboard Shortcuts"}),(0,r.jsx)(d,{label:"Start recording",value:s.startRecording,onChange:e=>i(r=>({...r,startRecording:e}))}),(0,r.jsx)(d,{label:"Pause / Resume",value:s.pauseResume,onChange:e=>i(r=>({...r,pauseResume:e}))}),(0,r.jsx)(d,{label:"Submit",value:s.submit,onChange:e=>i(r=>({...r,submit:e}))}),(0,r.jsx)(d,{label:"Paste only",value:s.submitPasteOnly,onChange:e=>i(r=>({...r,submitPasteOnly:e}))}),(0,r.jsx)(d,{label:"Clear / Cancel",value:s.clear,onChange:e=>i(r=>({...r,clear:e}))})]}),(0,r.jsxs)("div",{className:"space-y-3 border-t border-void-200 pt-3 dark:border-void-600",children:[(0,r.jsx)("div",{className:"text-xs font-medium text-void-500 dark:text-void-400",children:"Behaviour"}),(0,r.jsxs)("label",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Auto-submit (terminal)"}),(0,r.jsx)("button",{type:"button",role:"switch","aria-checked":c,onClick:()=>l(!c),className:`relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${c?"bg-green-500":"bg-void-300 dark:bg-void-600"}`,children:(0,r.jsx)("span",{className:`pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow transition ${c?"translate-x-4":"translate-x-0"}`})})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsx)("span",{className:"text-xs text-void-600 dark:text-void-400",children:"Max recording (min)"}),(0,r.jsx)("input",{type:"number",min:1,max:30,value:u,onChange:e=>m(parseInt(e.target.value)||5),className:"w-16 rounded border border-void-300 bg-void-50 px-2 py-1 text-center text-xs text-void-700 outline-none dark:border-void-600 dark:bg-void-700 dark:text-void-300"})]})]})]})}function l({error:e,hasRecording:n,onRetry:o,onClear:a,onClose:s}){let i=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=e=>{i.current&&!i.current.contains(e.target)&&s()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);let d=window.isSecureContext,c=!n;return(0,r.jsxs)("div",{ref:i,className:"w-72 rounded-lg border border-red-400/30 bg-white p-3 shadow-(--shadow-overlay) dark:border-red-400/20 dark:bg-void-800",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-start gap-2",children:[(0,r.jsx)("svg",{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"text-xs font-medium text-red-600 dark:text-red-400",children:c?"Recording Failed":"Transcription Failed"}),(0,r.jsx)("div",{className:"mt-1 text-xs text-void-600 dark:text-void-300",children:e})]})]}),(0,r.jsx)("div",{className:"mt-2 text-xs text-void-500 dark:text-void-400",children:c&&!d?"Microphone requires HTTPS or localhost. Try accessing via localhost:3003, or add this origin to chrome://flags/#unsafely-treat-insecure-origin-as-secure.":c?"Could not access the microphone.":"Your recording is preserved. You can retry or clear and start over."}),(0,r.jsxs)("div",{className:"mt-3 flex justify-end gap-2",children:[(0,r.jsx)("button",{onClick:a,className:"rounded border border-void-300 bg-void-100 px-2 py-1 text-xs text-void-600 hover:text-void-800 dark:border-void-600 dark:bg-void-700 dark:text-void-400 dark:hover:text-void-300",children:c?"Dismiss":"Clear"}),n&&o&&(0,r.jsx)("button",{onClick:o,className:"rounded border border-neon-blue-400/40 bg-neon-blue-400/15 px-2 py-1 text-xs text-neon-blue-600 hover:bg-neon-blue-400/25 dark:text-neon-blue-400",children:"Retry"})]})]})}function u(){let e=v(),n=(0,t.useRef)(null),o=(0,t.useRef)(0),[a,d]=(0,t.useState)(!1);return((0,t.useEffect)(()=>{d(!0)},[]),null===e.currentClaimantId&&a&&("idle"!==e.voiceState&&"disabled"!==e.voiceState||e.showSettings))?(0,s.createPortal)((0,r.jsxs)("div",{className:"fixed bottom-4 right-4 z-50 animate-in fade-in slide-in-from-bottom-2 duration-200 rounded-xl border border-red-400/30 bg-white/95 px-3 py-2 shadow-(--shadow-card) backdrop-blur-sm dark:border-red-400/20 dark:bg-void-800/95",ref:n,children:[(0,r.jsx)(i,{voiceState:e.voiceState,elapsedSeconds:e.elapsedSeconds,disabled:!1,error:e.error,onRecord:e.startRecording,onPause:e.pauseRecording,onResume:e.resumeRecording,onClear:e.clearRecording,onSubmit:e.submitRecording,onRetry:e.retryTranscription,onOpenSettings:()=>{Date.now()-o.current<200||e.setShowSettings(!e.showSettings)}}),e.showSettings&&(0,r.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,r.jsx)(c,{settings:e.settings.voice,onSave:r=>e.updateSettings({voice:r}),onClose:()=>{o.current=Date.now(),e.setShowSettings(!1)}})}),"error"===e.voiceState&&e.error&&(0,r.jsx)("div",{style:{position:"fixed",bottom:60,right:16,zIndex:9999},children:(0,r.jsx)(l,{error:e.error,hasRecording:e.hasRecording,onRetry:()=>e.retryTranscription(),onClear:()=>e.clearRecording(),onClose:()=>e.clearRecording()})})]}),document.body):null}e.s(["VoiceControlBar",()=>i],39269),e.s(["VoiceSettingsPopover",()=>c],9083),e.s(["VoiceErrorPopup",()=>l],49996);let m=(0,t.createContext)(null);function v(){let e=(0,t.useContext)(m);if(!e)throw Error("useVoice() must be used inside <VoiceProvider>");return e}function b({children:e}){let{settings:s,updateSettings:i}=function(){let[e,r]=(0,t.useState)(a),[n,s]=(0,t.useState)(!0);return(0,t.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{r({...a,...e,voice:{...o,...e?.voice}})}).catch(()=>{}).finally(()=>s(!1))},[]),{settings:e,updateSettings:(0,t.useCallback)(async e=>{try{let t=await fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(t.ok){let e=await t.json();return r({...a,...e,voice:{...o,...e?.voice}}),e}}catch{}return null},[]),isLoading:n}}(),d=(0,t.useRef)(new Map),c=(0,t.useRef)(null),l=(0,t.useCallback)((e,r)=>{d.current.set(e,r),c.current=e},[]),v=(0,t.useCallback)(e=>{if(d.current.delete(e),c.current===e){let e=Array.from(d.current.keys());c.current=e.length>0?e[0]:null}},[]),b=(0,t.useRef)(null),[x,h]=(0,t.useState)(null),p=(0,t.useRef)(null),g=(0,t.useRef)("auto"),[f,k]=(0,t.useState)(!1),[y,R]=(0,t.useState)(!1),j=(0,t.useCallback)(e=>{let r=p.current;if(r){if("input"===r.type&&r.element){if(!document.contains(r.element))return;let t=r.element,n=t.selectionStart??t.value.length,o=t.selectionEnd??t.value.length;t.focus(),t.setSelectionRange(n,o),document.execCommand("insertText",!1,e)}else if("terminal"===r.type&&r.terminalId){let t=d.current.get(r.terminalId);if(!t)return;let n="auto"===g.current&&s.voice.autoSubmitTerminal;t.sendInput(e),n&&setTimeout(()=>t.sendInput("\r"),300)}g.current="auto"}},[s.voice.autoSubmitTerminal]),w=(0,t.useCallback)(e=>{b.current?b.current.onTranscriptionComplete(e):j(e)},[j]),S=function({maxRecordingSeconds:e,onTranscriptionComplete:r}){let[n,o]=(0,t.useState)("idle"),[a,s]=(0,t.useState)(0),[i,d]=(0,t.useState)(null),[c,l]=(0,t.useState)(null),u=(0,t.useRef)(null),m=(0,t.useRef)([]),v=(0,t.useRef)(null),b=(0,t.useRef)(null),x=(0,t.useRef)(null),h=(0,t.useRef)(0),p=(0,t.useRef)(!1),g=(0,t.useRef)(r);(0,t.useEffect)(()=>{g.current=r},[r]);let f=(0,t.useCallback)(()=>{v.current||(v.current=setInterval(()=>{s(e=>e+1)},1e3))},[]),k=(0,t.useCallback)(()=>{v.current&&(clearInterval(v.current),v.current=null)},[]);(0,t.useEffect)(()=>{"recording"===n&&a-h.current>=e&&(u.current?.state==="recording"&&u.current.pause(),p.current=!0,k(),o("paused"))},[n,a,e,k]),(0,t.useEffect)(()=>()=>{if(k(),u.current?.state!=="inactive")try{u.current?.stop()}catch{}x.current?.getTracks().forEach(e=>e.stop())},[k]);let y=(0,t.useCallback)(()=>new Promise(e=>{let r=u.current;r&&"inactive"!==r.state?(r.ondataavailable=e=>{e.data.size>0&&m.current.push(e.data)},r.onstop=()=>{e(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))},r.stop()):e(new Blob(m.current,{type:m.current[0]?.type||"audio/webm"}))}),[]),R=(0,t.useCallback)(async e=>{let r=new FormData;r.append("audio",e,"recording.webm");let t=await fetch("/api/transcribe",{method:"POST",body:r}),n=await t.json();if(!t.ok)throw Error(n.error||"Transcription failed");return n.text},[]),j=(0,t.useCallback)(()=>{x.current?.getTracks().forEach(e=>e.stop()),x.current=null},[]),w=(0,t.useCallback)(async()=>{if("idle"===n||"disabled"===n)try{d(null),l(null),m.current=[],b.current=null,s(0),h.current=0;let e=await navigator.mediaDevices.getUserMedia({audio:!0});x.current=e;let r=MediaRecorder.isTypeSupported("audio/ogg;codecs=opus")?"audio/ogg;codecs=opus":MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":"",t=new MediaRecorder(e,r?{mimeType:r}:void 0);u.current=t,t.ondataavailable=e=>{e.data.size>0&&m.current.push(e.data)},t.start(1e3),o("recording"),f()}catch(r){let e=r.message;e.includes("Permission")||e.includes("NotAllowed")?d("Microphone permission denied. Please allow microphone access."):d(e||"Failed to start recording"),o("error"),j()}},[n,f,j]),S=(0,t.useCallback)(()=>{"recording"===n&&(u.current?.state==="recording"&&u.current.pause(),k(),o("paused"))},[n,k]),C=(0,t.useCallback)(()=>{"paused"===n&&(u.current?.state==="paused"&&u.current.resume(),p.current&&(h.current=a,p.current=!1),f(),o("recording"))},[n,a,f]),N=(0,t.useCallback)(()=>{if(k(),u.current?.state!=="inactive")try{u.current?.stop()}catch{}m.current=[],b.current=null,s(0),d(null),l(null),j(),o("idle")},[k,j]),E=(0,t.useCallback)(async()=>{if("recording"===n||"paused"===n){k(),o("transcribing");try{let e=await y();b.current=e,j();let r=await R(e);l(r),s(0),m.current=[],o("idle"),g.current?.(r)}catch(e){d(e.message||"Transcription failed"),o("error")}}},[n,k,y,R,j]),T=(0,t.useCallback)(async()=>{if("error"===n&&b.current){o("transcribing"),d(null);try{let e=await R(b.current);l(e),b.current=null,m.current=[],s(0),o("idle"),g.current?.(e)}catch(e){d(e.message||"Transcription failed"),o("error")}}},[n,R]);return{state:n,elapsedSeconds:a,error:i,transcribedText:c,hasRecording:null!==b.current||m.current.length>0,startRecording:w,pauseRecording:S,resumeRecording:C,clearRecording:N,submitRecording:E,retryTranscription:T}}({maxRecordingSeconds:s.voice.maxRecordingSeconds,onTranscriptionComplete:w}),C=(0,t.useCallback)(e=>{b.current&&b.current.id!==e.id&&(b.current.onRelease?.(),"idle"!==S.state&&"disabled"!==S.state&&S.clearRecording()),b.current=e,h(e.id)},[S]),N=(0,t.useCallback)(e=>{b.current?.id===e.id&&("idle"!==S.state&&"error"!==S.state&&"disabled"!==S.state&&S.clearRecording(),b.current=null,h(null))},[S]);(0,t.useEffect)(()=>{let e=e=>{let r=e.target;if(r.closest("[data-voice-target]")&&("INPUT"===r.tagName||"TEXTAREA"===r.tagName))return void R(!0);if(r.closest("[data-terminal-id]")){let e=r.closest("[data-terminal-id]").dataset.terminalId;e&&d.current.has(e)&&(c.current=e,R(!0))}},r=()=>{setTimeout(()=>{let e=document.activeElement;if(!e)return void R(!1);let r=e.closest("[data-voice-target]")&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName),t=e.closest("[data-terminal-id]");r||t||R(!1)},100)};return document.addEventListener("focusin",e),document.addEventListener("focusout",r),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",r)}},[]);let E=(0,t.useCallback)(()=>{if(b.current)b.current.onRecordStart?.(),S.startRecording();else{let e=document.activeElement;if(e&&("INPUT"===e.tagName||"TEXTAREA"===e.tagName)&&e.closest("[data-voice-target]"))p.current={type:"input",element:e};else if(e?.closest("[data-terminal-id]")){let r=e.closest("[data-terminal-id]").dataset.terminalId||c.current;if(!(r&&d.current.has(r)))return;p.current={type:"terminal",terminalId:r}}else{if(!(c.current&&d.current.has(c.current)))return;p.current={type:"terminal",terminalId:c.current}}S.startRecording()}},[S]),T=(0,t.useCallback)(()=>{g.current="paste",S.submitRecording()},[S]),P=(0,t.useCallback)(()=>{"recording"===S.state?S.pauseRecording():"paused"===S.state&&S.resumeRecording()},[S]);!function({voiceState:e,shortcuts:r,callbacks:o,enabled:a,hasFieldFocus:s,suspended:i}){let d=(0,t.useRef)(o),c=(0,t.useRef)(e),l=(0,t.useRef)(r),u=(0,t.useRef)(s),m=(0,t.useRef)(i);(0,t.useEffect)(()=>{d.current=o,c.current=e,l.current=r,u.current=s,m.current=i}),(0,t.useEffect)(()=>{if(!a)return;let e=e=>{if(m.current)return;let r=c.current,t=l.current,o=d.current;if("idle"===r&&u.current&&n(e,t.startRecording)){e.preventDefault(),e.stopPropagation(),o.onStartRecording();return}if("recording"===r||"paused"===r){if(n(e,t.pauseResume)){e.preventDefault(),e.stopPropagation(),o.onPauseResume();return}if(n(e,t.submitPasteOnly)){e.preventDefault(),e.stopPropagation(),o.onSubmitPasteOnly();return}if(n(e,t.submit)){e.preventDefault(),e.stopPropagation(),o.onSubmit();return}if(n(e,t.clear)){e.preventDefault(),e.stopPropagation(),o.onClear();return}}};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},[a])}({voiceState:S.state,shortcuts:s.voice.shortcuts,callbacks:{onStartRecording:E,onPauseResume:P,onSubmit:S.submitRecording,onSubmitPasteOnly:T,onClear:S.clearRecording},enabled:!0,hasFieldFocus:!!b.current||y,suspended:f});let L={voiceState:S.state,elapsedSeconds:S.elapsedSeconds,error:S.error,hasRecording:S.hasRecording,startRecording:S.startRecording,pauseRecording:S.pauseRecording,resumeRecording:S.resumeRecording,clearRecording:S.clearRecording,submitRecording:S.submitRecording,retryTranscription:S.retryTranscription,claimVoiceControl:C,releaseVoiceControl:N,currentClaimantId:x,settings:s,updateSettings:i,registerTerminal:l,unregisterTerminal:v,submitModeRef:g,showSettings:f,setShowSettings:k,hasFieldFocus:y,setHasFieldFocus:R};return(0,r.jsxs)(m.Provider,{value:L,children:[e,(0,r.jsx)(u,{})]})}}]);
|