wrong-notebook 2026.11.2-2 → 2026.11.3-1
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +15 -0
- package/.next/build-manifest.json +36 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +112 -0
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/page.js.nft.json +1 -1
- package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
- package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
- package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/admin/cnm-tags/route.js +6 -5
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +16 -15
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js +5 -4
- package/.next/server/app/api/admin/debug-logs/export/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/route.js +5 -4
- package/.next/server/app/api/admin/debug-logs/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js +5 -4
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/system-reset/route.js +5 -4
- package/.next/server/app/api/admin/system-reset/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/detail/route.js +16 -15
- package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/route.js +5 -4
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js +5 -4
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +11 -10
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +10 -9
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +12 -11
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +16 -14
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/auth/[...nextauth]/route.js +4 -3
- package/.next/server/app/api/auth/[...nextauth]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js +5 -4
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +14 -13
- package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js +16 -15
- package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/geogebra/route.js +12 -11
- package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/image/route.js +4 -3
- package/.next/server/app/api/error-items/[id]/image/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/notes/route.js +5 -4
- package/.next/server/app/api/error-items/[id]/notes/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/practice-records/route.js +4 -3
- package/.next/server/app/api/error-items/[id]/practice-records/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/reanswer/route.js +14 -13
- package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/retag/route.js +15 -14
- package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/route.js +6 -5
- package/.next/server/app/api/error-items/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +14 -13
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js +14 -13
- package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/answer-space/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/error-items/answer-space/route/build-manifest.json +12 -0
- package/.next/server/app/api/error-items/answer-space/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/error-items/answer-space/route.js +14 -0
- package/.next/server/app/api/error-items/answer-space/route.js.map +5 -0
- package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -0
- package/.next/server/app/api/error-items/answer-space/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/error-items/batch-delete/route.js +5 -4
- package/.next/server/app/api/error-items/batch-delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/clear/route.js +5 -4
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/list/route.js +6 -5
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +20 -18
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js +4 -3
- package/.next/server/app/api/error-items/short/[shortId]/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/similarity/route.js +6 -5
- package/.next/server/app/api/error-items/similarity/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js +15 -14
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/results/route.js +17 -16
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +16 -15
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +17 -15
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +17 -16
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js +10 -8
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +13 -12
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js +3 -2
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +20 -18
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +34 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.map +5 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/[id]/confirm-all/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-batches/[id]/read/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/[id]/read/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/[id]/read/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/[id]/read/route.js +34 -0
- package/.next/server/app/api/import-batches/[id]/read/route.js.map +5 -0
- package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/[id]/read/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-batches/[id]/retry/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/[id]/retry/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/[id]/retry/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/[id]/retry/route.js +34 -0
- package/.next/server/app/api/import-batches/[id]/retry/route.js.map +5 -0
- package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/[id]/retry/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-batches/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/[id]/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/[id]/route.js +34 -0
- package/.next/server/app/api/import-batches/[id]/route.js.map +5 -0
- package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-batches/[id]/start/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/[id]/start/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/[id]/start/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/[id]/start/route.js +34 -0
- package/.next/server/app/api/import-batches/[id]/start/route.js.map +5 -0
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/[id]/start/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-batches/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-batches/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-batches/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-batches/route.js +34 -0
- package/.next/server/app/api/import-batches/route.js.map +5 -0
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -0
- package/.next/server/app/api/import-batches/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +33 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.map +5 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -0
- package/.next/server/app/api/import-tasks/[id]/confirm/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-tasks/[id]/read/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-tasks/[id]/read/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-tasks/[id]/read/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-tasks/[id]/read/route.js +33 -0
- package/.next/server/app/api/import-tasks/[id]/read/route.js.map +5 -0
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -0
- package/.next/server/app/api/import-tasks/[id]/read/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +33 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.map +5 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -0
- package/.next/server/app/api/import-tasks/[id]/retry/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-tasks/[id]/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-tasks/[id]/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-tasks/[id]/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-tasks/[id]/route.js +33 -0
- package/.next/server/app/api/import-tasks/[id]/route.js.map +5 -0
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -0
- package/.next/server/app/api/import-tasks/[id]/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/import-tasks/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/import-tasks/route/build-manifest.json +12 -0
- package/.next/server/app/api/import-tasks/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/import-tasks/route.js +34 -0
- package/.next/server/app/api/import-tasks/route.js.map +5 -0
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -0
- package/.next/server/app/api/import-tasks/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/initialize/route.js +5 -4
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js +4 -3
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +6 -5
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js +5 -4
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +5 -4
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +13 -12
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js +5 -4
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js +5 -4
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +17 -16
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js +5 -4
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js +6 -5
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +14 -13
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +13 -12
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +11 -10
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +13 -12
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +15 -14
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js +6 -5
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js +5 -4
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js +6 -5
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +15 -14
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +9 -8
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +6 -5
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js +5 -4
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js +5 -4
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js +4 -3
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js +5 -4
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/suggestions/route.js +4 -3
- package/.next/server/app/api/tags/suggestions/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js +5 -4
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js +8 -7
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +12 -11
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +8 -7
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +10 -9
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +14 -13
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- package/.next/server/app/api/version/route.js +3 -2
- package/.next/server/app/api/version/route.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
- package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
- package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
- package/.next/server/app/exams/page.js.nft.json +1 -1
- package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js +3 -2
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/import-batches/[id]/page/build-manifest.json +22 -0
- package/.next/server/app/import-batches/[id]/page/next-font-manifest.json +11 -0
- package/.next/server/app/import-batches/[id]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/import-batches/[id]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/import-batches/[id]/page.js +14 -0
- package/.next/server/app/import-batches/[id]/page.js.map +5 -0
- package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -0
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/import-tasks/[id]/page/app-paths-manifest.json +3 -0
- package/.next/server/app/import-tasks/[id]/page/build-manifest.json +22 -0
- package/.next/server/app/import-tasks/[id]/page/next-font-manifest.json +11 -0
- package/.next/server/app/import-tasks/[id]/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/import-tasks/[id]/page/server-reference-manifest.json +4 -0
- package/.next/server/app/import-tasks/[id]/page.js +14 -0
- package/.next/server/app/import-tasks/[id]/page.js.map +5 -0
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -0
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +3 -0
- package/.next/server/app/import-tasks/page/app-paths-manifest.json +3 -0
- package/.next/server/app/import-tasks/page/build-manifest.json +22 -0
- package/.next/server/app/import-tasks/page/next-font-manifest.json +11 -0
- package/.next/server/app/import-tasks/page/react-loadable-manifest.json +1 -0
- package/.next/server/app/import-tasks/page/server-reference-manifest.json +4 -0
- package/.next/server/app/import-tasks/page.js +14 -0
- package/.next/server/app/import-tasks/page.js.map +5 -0
- package/.next/server/app/import-tasks/page.js.nft.json +1 -0
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +3 -0
- package/.next/server/app/initialize/page.js.nft.json +1 -1
- package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/manifest.webmanifest/route.js +3 -2
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/notebooks/page.js.nft.json +1 -1
- package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/practice/page.js.nft.json +1 -1
- package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
- package/.next/server/app/print-preview/page.js.nft.json +1 -1
- package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
- package/.next/server/app/register/page.js.nft.json +1 -1
- package/.next/server/app/register/page_client-reference-manifest.js +1 -1
- package/.next/server/app/review/page.js.nft.json +1 -1
- package/.next/server/app/review/page_client-reference-manifest.js +1 -1
- package/.next/server/app/setup/page.js.nft.json +1 -1
- package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/.next/server/app/stats/page.js.nft.json +1 -1
- package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tags/page.js.nft.json +1 -1
- package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +15 -0
- package/.next/server/chunks/1oeh_server_app_api_error-items_answer-space_route_actions_02_4xy5gtmofu.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_confirm-all_route_actions_1u0e8at9dph0_.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_read_route_actions_1nrzqz1at4s64.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_retry_route_actions_1u5hn2zjw-sj-.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-batches_[id]_start_route_actions_1o5tg4uk8s-ch.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-tasks_[id]_confirm_route_actions_0cj5phaug2e76.js +3 -0
- package/.next/server/chunks/1oeh_server_app_api_import-tasks_[id]_retry_route_actions_1g7rekf8h4rkk.js +3 -0
- package/.next/server/chunks/{[externals]__0c36n-dcv5nqc._.js → [externals]__0fgpzedhhntg9._.js} +1 -1
- package/.next/server/chunks/[externals]__14rv088xdnlo4._.js +3 -0
- package/.next/server/chunks/{[externals]__1lhov-pp9xqtz._.js → [externals]__1i7c9m3y35e80._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0455yyxule6q_._.js → [root-of-the-server]__0-ipecoww0k_f._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__00jyo3io99_dn._.js → [root-of-the-server]__0-rtxg7i50p0s._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0hm2dh8ziz93k._.js → [root-of-the-server]__02oqd6w58wymi._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0401xgmcbb_7u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04pdmyloqh744._.js +5 -0
- package/.next/server/chunks/{[root-of-the-server]__07uf7ctm4sjo4._.js → [root-of-the-server]__04tx90mwz-58t._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__05615yr7zmo6t._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__06lmwv-4d1slg._.js → [root-of-the-server]__05iw617rx9m75._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0n0c-mpolar22._.js → [root-of-the-server]__06675jta6pa74._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__06ocjahusp01i._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1m8b6why7f1uj._.js → [root-of-the-server]__06pk7x8wdbyel._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__08crf3zxl7fnv._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0m8bcdajibej0._.js → [root-of-the-server]__092b1e081ocu6._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0vz0xv_w6vbpq._.js → [root-of-the-server]__092h03ec6f_1u._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__12fkzjxvspcin._.js → [root-of-the-server]__094fb72-14c6v._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0_ahztuh3lr_n._.js → [root-of-the-server]__0982_75un5k3v._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0sxr-ing62eg7._.js → [root-of-the-server]__09wdoeko-mqnp._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1fj6upsvfxy4r._.js → [root-of-the-server]__0_fisu5brhyk_._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_uvtfu0yr-na._.js +4 -4
- package/.next/server/chunks/[root-of-the-server]__0a13lncff9jx-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0b1s_-vbl79om._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0rnr17a382rjx._.js → [root-of-the-server]__0cu0eqoslaz4-._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0u36j_9ml4et6._.js → [root-of-the-server]__0d_zoa2_linlk._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__145w7mwgp8ujm._.js → [root-of-the-server]__0f2xi-1x_bd0j._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__18uhupcdidftm._.js → [root-of-the-server]__0fnte1x8xdn5o._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0fxqs6p28o57m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0h3er81lqy7-3._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1f_lrxzw_n-6-._.js → [root-of-the-server]__0ha1sdqrzak3j._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1ptzu7aqoga2n._.js → [root-of-the-server]__0hcbw1sliw973._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__00kq2qcxfg-kq._.js → [root-of-the-server]__0impq05z-6_x5._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__08t21dbk1cidn._.js → [root-of-the-server]__0jw-1uedp5s7y._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0jy5w86h0qg50._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__18z_cczwqkonn._.js → [root-of-the-server]__0kehix4ojdnhw._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0kw7hbup538-8._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0xqsrh251_yms._.js → [root-of-the-server]__0l-amyqoswdni._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1v1p83o4ygnyt._.js → [root-of-the-server]__0l__ty_n0br2x._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mhtpz84f1vct._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0mks6j_xgzj06._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0nujsu6qbn-8o._.js +4 -4
- package/.next/server/chunks/{[root-of-the-server]__0nw6t7u627b2m._.js → [root-of-the-server]__0nv9vais_avpm._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0kmy5264opoz7._.js → [root-of-the-server]__0odw8n6b44k3x._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ol6aiama1k_-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pce90ecznpjr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pgghfs5ue4ff._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__11ztapi1pi7j-._.js → [root-of-the-server]__0pkist00_xrfj._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0q3uk_5f9t6mb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0qw6cz355p_eb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rwxa2doabk45._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0s3z-zsl35ueb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0smf8z8cd59g3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0sujbuwv8y6bp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tg572v-6f3wo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0to77zh5fihef._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0u04aced_0ug4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ujhtand4ld8w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ultckrjp1h-q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xkb9fyy9z_rr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xqbpgtwhqhpl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xwxn3blv1fe1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0y0skjc_7v7cr._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0ym21tuxqrmc4._.js → [root-of-the-server]__0y_zzgunl38y2._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1d1gxff_c2o28._.js → [root-of-the-server]__1-0-1pwy7s8ak._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1-90b1cy_787j._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1oedx4ko_1hl9._.js → [root-of-the-server]__1-z3uulycjf_q._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__121tnm6bol8ow._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__134n229bo2v1d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13_k7w8nrx7ie._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__13ofz2qkhwdmd._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0os8s3dtzx4gi._.js → [root-of-the-server]__16p-11g6suxzy._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__18tzik6wyd5b2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19qwvtmhzhh9_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_-sordu1ka96._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_2jbd6rjhbu6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_qwjiy9wg14j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1al4_7mvxprle._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cbejfw8sum3r._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cbhqd8d3ozuv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1cxpqdzozndhn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dh0adu5iobp3._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0btfk_sy3o9wa._.js → [root-of-the-server]__1drs4rr5x286d._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1eli1ues3akzx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1exbv92f97wbe._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1fe2v2mv5-rgo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1grfx7nsqj28h._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0fzi033rztm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ixotu0p11op8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1j0l1jz1c3mpt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jneum6lwgjph._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1mg_zqw3nheiu._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1mn422yguinbn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ndg27r3ft7-f._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1p60tmt2t1ve3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1qgitdeliyhex._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1qxr6vtllrbku._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__14wezz97rhtz9._.js → [root-of-the-server]__1r7a3lg45ng01._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1rcg5kj7i_3lc._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1n21o3aq7pxla._.js → [root-of-the-server]__1rh7o4i0_it3x._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1rylv89ttw-vw._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1o9pbkx7ejxu0._.js → [root-of-the-server]__1s-y00c3-nc_-._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ue577i7esus5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vvqeqc6b1ri5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wp-sh9b360mc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wphfm1f8cos4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xkmo8s1c258u._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__18nv1yn5xh03v._.js → [root-of-the-server]__1z51x426cuske._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1zg0z12pshrxg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__20vlnu0zllzzp._.js +3 -0
- package/.next/server/chunks/_01bayc6kg7upi._.js +3 -0
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/_05ans30vcd4s-._.js +3 -0
- package/.next/server/chunks/_0_rhee7wb6tcg._.js +1 -1
- package/.next/server/chunks/_0ge95_bkwrkmc._.js +3 -0
- package/.next/server/chunks/_0lmh33cdt_1fr._.js +3 -0
- package/.next/server/chunks/_0pzdohc1mz5ts._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +3 -0
- package/.next/server/chunks/_0xv7-7d6dyo9-._.js +3 -0
- package/.next/server/chunks/{_1wulydy4wg9ow._.js → _0xx4y9tk1qclc._.js} +2 -2
- package/.next/server/chunks/_0ymqtnritje40._.js +3 -0
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_1647rfjflw_iq._.js +3 -0
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1duugm0s3-6nw._.js +3 -0
- package/.next/server/chunks/_1e_ts14olqd90._.js +3 -0
- package/.next/server/chunks/{_10tpt8iizl4v3._.js → _1fq28h_w2e0th._.js} +7 -4
- package/.next/server/chunks/_1gdet1v2zk2gy._.js +3 -0
- package/.next/server/chunks/{_1dvka-waihfum._.js → _1gngd154ci72t._.js} +7 -4
- package/.next/server/chunks/_1j10upti9l6da._.js +3 -0
- package/.next/server/chunks/{_11_p1ahjjply_._.js → _1pvqo-qnv-nqm._.js} +2 -2
- package/.next/server/chunks/{_0dicq393_0h3i._.js → _1rreh3rgx8xan._.js} +1 -1
- package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
- package/.next/server/chunks/_1s55l1bx-1cxp._.js +3 -0
- package/.next/server/chunks/_1srq5kxah38r6._.js +3 -0
- package/.next/server/chunks/_1tahh9ric8la3._.js +3 -0
- package/.next/server/chunks/_1tvl0cm629nyc._.js +3 -0
- package/.next/server/chunks/_1ui0r0p4npnpi._.js +11 -0
- package/.next/server/chunks/_next-internal_server_app_api_import-batches_[id]_route_actions_0_mc245t1pbwl.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_import-batches_route_actions_0pi56cpanyvac.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_import-tasks_[id]_read_route_actions_116wza5ukp0c2.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_import-tasks_[id]_route_actions_1fvi-v9pgzuli.js +3 -0
- package/.next/server/chunks/_next-internal_server_app_api_import-tasks_route_actions_0d08bh7zurcp_.js +3 -0
- package/.next/server/chunks/node_modules_next_dist_0n2og9jackhd2._.js +54 -0
- package/.next/server/chunks/src_0bhf345rd7jho._.js +1 -1
- package/.next/server/chunks/src_lib_0sbu2x2ff_rnz._.js +3 -0
- package/.next/server/chunks/src_lib_10is5pyogge95._.js +1 -1
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +49 -16
- package/.next/server/chunks/src_lib_1qvj-3jt4jbq7._.js +3 -0
- package/.next/server/chunks/src_lib_1xdguwkq8k_gz._.js +3 -0
- package/.next/server/chunks/src_lib_1zjmo0u3pnxig._.js +3 -0
- package/.next/server/chunks/src_lib_constants_pagination_ts_0tz3fg9ib3b-w._.js +1 -1
- package/.next/server/chunks/src_lib_import-batches_ts_0aekmggdwo_9-._.js +3 -0
- package/.next/server/chunks/src_lib_import-tasks_ts_1f4ejsy00-v1t._.js +3 -0
- package/.next/server/chunks/src_lib_question-analysis_ts_15_8r_pxmtd06._.js +3 -0
- package/.next/server/chunks/src_lib_tag-hierarchy_ts_1illun--8v3_9._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0_eqpxqkvkrs_._.js → [root-of-the-server]__00_c9kpvx5075._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0_bi5ljcm1i1c._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0r_5r-242wwqy._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0d4mrtd9tdni-._.js → [root-of-the-server]__0vgnixmnie9dg._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1l68oxzjvj18_._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1mrj6vygoasvv._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__1eu3xw3zls5xt._.js → [root-of-the-server]__1o5pa8m50qyqa._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1ynp6nm1gttsf._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1zupg0zigit-2._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__2019hdxvtb4e0._.js +3 -0
- package/.next/server/chunks/ssr/_05szyj465au6e._.js +3 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/_0f2k-q7kimi4o._.js +3 -0
- package/.next/server/chunks/ssr/_0ks-0g-tu__3m._.js +3 -0
- package/.next/server/chunks/ssr/_0lzeodofsq9pe._.js +1 -1
- package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +3 -0
- package/.next/server/chunks/ssr/_0nt5dm7rmsp4f._.js +3 -0
- package/.next/server/chunks/ssr/{_07-atqwd3wqya._.js → _0oslwj90y-3j0._.js} +1 -1
- package/.next/server/chunks/ssr/_0ozptnii2nxuw._.js +1 -1
- package/.next/server/chunks/ssr/_0s318kewgu2zg._.js +3 -0
- package/.next/server/chunks/ssr/_0ueequ0gysrs-._.js +3 -0
- package/.next/server/chunks/ssr/_15fdum1ye-k0z._.js +3 -0
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +3 -0
- package/.next/server/chunks/ssr/{_1l_v9_8-5wv_d._.js → _1b8cip9y91_br._.js} +1 -1
- package/.next/server/chunks/ssr/_1hbrn0tcfh7hd._.js +3 -0
- package/.next/server/chunks/ssr/_1j3yr2arbxd6a._.js +3 -0
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +1 -9
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +32 -0
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +1 -9
- package/.next/server/chunks/ssr/_1w1qijzykerpu._.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_import-batches_[id]_page_actions_1hnz0a7dq8meb.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_import-tasks_[id]_page_actions_0ln1lwiey8bbi.js +3 -0
- package/.next/server/chunks/ssr/_next-internal_server_app_import-tasks_page_actions_1h7cqbj1cojed.js +3 -0
- package/.next/server/chunks/ssr/node_modules_05hncuf8243qe._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0_qoz7biz6-x_._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_11z4lth_9u_hn._.js +2 -2
- package/.next/server/chunks/ssr/node_modules_17lx40fyvpom3._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_@radix-ui_1i8eumxju2gpw._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_heic-to_dist_csp_heic-to_1a1i_ppryp81y.js +3 -0
- package/.next/server/chunks/ssr/node_modules_heic-to_dist_csp_heic-to_1myi81wrj4gw4.js +3 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_06p81-gtz_2cm._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1bq471wvtkwrl._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_pencil-line_mjs_1xkf12pwlzan2._.js +8 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-4c5fuxx178f.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d5g5-w_y282q.js +3 -0
- package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0pdc0gl8iqtfa.js +3 -0
- package/.next/server/chunks/ssr/node_modules_react-image-crop_dist_index_0khmp4mv3j9zr.js +3 -0
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0n-w9zu3b6q41.js +57 -0
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +6 -6
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +3 -0
- package/.next/server/chunks/ssr/src_app_import-tasks_[id]_page_tsx_0_grj11-jdqqc._.js +3 -0
- package/.next/server/chunks/ssr/src_app_import-tasks_page_tsx_01983hytm-x08._.js +3 -0
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +1 -1
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +6 -0
- package/.next/server/chunks/ssr/src_components_image-cropper_tsx_0pcp8-ifruyx-._.js +3 -0
- package/.next/server/chunks/ssr/src_components_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +3 -0
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +1 -31
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +10 -64
- package/.next/server/chunks/ssr/src_lib_question-split_text_ts_0h4uz23xrlybm._.js +6 -0
- package/.next/server/middleware-build-manifest.js +36 -3
- package/.next/server/next-font-manifest.js +1 -1
- package/.next/server/next-font-manifest.json +12 -0
- package/.next/server/pages/500.html +1 -1
- package/.next/server/preview-props.json +3 -3
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/02wft51kf3t9f.js +1 -0
- package/.next/static/chunks/0_ar7dth9hybc.js +1 -0
- package/.next/static/chunks/0p6ox1l56khn2.js +3 -0
- package/.next/static/chunks/0t9po-y0g3nwu.js +12 -0
- package/.next/static/chunks/0v8w72ij3d-3v.js +1 -0
- package/.next/static/chunks/0x9-b30mhne-_.js +1 -0
- package/.next/static/chunks/{1g13qcek7-0du.js → 16h0nz5l970cx.js} +1 -1
- package/.next/static/chunks/171ff2ttsrlg8.js +1 -0
- package/.next/static/chunks/1746y345zti-9.js +33 -0
- package/.next/static/chunks/1ar7mttk9ne1t.js +12 -0
- package/.next/static/chunks/1upvap68fad8i.js +1 -0
- package/.next/static/chunks/21-zw9_-z7wy0.js +1 -0
- package/.next/static/chunks/210o9wkszynk8.js +55 -0
- package/.next/static/chunks/26_q5epdikurm.js +1 -0
- package/.next/static/chunks/289znh7431pug.js +1 -0
- package/.next/static/chunks/29hn5lj1csc6m.js +6 -0
- package/.next/static/chunks/2hh64gi4pmlk2.js +1 -0
- package/.next/static/chunks/2ic9ath-r3jvf.js +193 -0
- package/.next/static/chunks/2notwq6aaf_l7.css +3 -0
- package/.next/static/chunks/3-se55-6uc0mx.js +2 -0
- package/.next/static/chunks/32hs1wu90i-g2.js +9 -0
- package/.next/static/chunks/38fux_rbsoiif.js +1 -0
- package/.next/static/chunks/38vt_4ntvy02e.js +1 -0
- package/.next/static/chunks/3b34ougp2g-5y.js +1 -0
- package/.next/static/chunks/3c3cp7uzfhnyr.js +1 -0
- package/.next/static/chunks/3gy-_kb72v5lr.js +1 -0
- package/.next/static/chunks/3lsj4waqfw7eq.js +1 -0
- package/.next/static/chunks/3ucxgsy-rkjn9.js +9 -0
- package/.next/static/chunks/3wr-25ch-9chk.js +1 -0
- package/.next/static/chunks/4441xuc3i-yb7.js +1 -0
- package/package.json +1 -1
- package/prisma/migrations/20261102102339_add_custom_answer_space/migration.sql +5 -0
- package/prisma/migrations/20261103011313_add_import_tasks/migration.sql +37 -0
- package/prisma/migrations/20261103052754_add_import_batches/migration.sql +79 -0
- package/prisma/schema.prisma +77 -0
- package/prisma/seed.db +0 -0
- package/public/third-party-licenses/heic-to/GPL-3.0.txt +674 -0
- package/public/third-party-licenses/heic-to/NOTICE.txt +76 -0
- package/public/third-party-licenses/heic-to/emscripten-LICENSE.txt +102 -0
- package/public/third-party-licenses/heic-to/heic-to-LICENSE.txt +177 -0
- package/public/third-party-licenses/heic-to/libde265-1.0.16-COPYING.txt +871 -0
- package/public/third-party-licenses/heic-to/libheif-1.23.6-COPYING.txt +871 -0
- package/.next/server/chunks/[root-of-the-server]__01nvw5ogtwc0h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02dkbynj2vxld._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__05n74a-t4yfhk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__05u_glm0nzz-u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0c2729fcpi3-x._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gaai286hkspk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jy-eooky8kei._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0kljn4jodzvqk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0pn5idap1logb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0tflqqgyujt1r._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0z99q93n88cro._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-g1cu85bv1bg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-hfmp3groi95._.js +0 -56
- package/.next/server/chunks/[root-of-the-server]__10l89psqaisak._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1236d6g1_51pt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12_laap0hyw4p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12cpc3g7-oi86._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13pd8ofsmrv7k._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13zeb46abilr5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__142g4s902bza-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1460_07yt08m0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15mf1z85mft8d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15ypu4q7xi8ig._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1610s5zvyss1k._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16864lw9bhmwl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19a62id_4lwka._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1b42xh9458czy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dreyiratyfvo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1elqmd_7a9bto._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1gvnk0s0_zrpo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hwftfenrsu3p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lafe11jnkmlv._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m1wi2f60x1fk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1o-0-f8rlbavp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1r7wz_id6mvlj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1r_x7moz0opqt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1rx3b8m_g_p57._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1wh65tfd7apxx._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1wsyku681k2uq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ximu6k5bljjj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20jkc-_5uj_zc._.js +0 -3
- package/.next/server/chunks/_03udbqs8_z944._.js +0 -3
- package/.next/server/chunks/_1_ns7o3cqznv6._.js +0 -3
- package/.next/server/chunks/_1rr_juv5pj1at._.js +0 -3
- package/.next/server/chunks/_1upqhtax8p96-._.js +0 -3
- package/.next/server/chunks/src_lib_question-deduplication_ts_1p1bik-vwl9ue._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0mf_ugip8jvfl._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1jhmaiw3yp6gx._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1x6b2a-bbo2py._.js +0 -3
- package/.next/server/chunks/ssr/_02zfjls23g-o4._.js +0 -3
- package/.next/server/chunks/ssr/_0j4vduk13imjn._.js +0 -3
- package/.next/server/chunks/ssr/_0ltqx22v65imo._.js +0 -32
- package/.next/server/chunks/ssr/_0tr-7klbcz1r7._.js +0 -3
- package/.next/server/chunks/ssr/_0yrywyu_og4rx._.js +0 -3
- package/.next/server/chunks/ssr/_1-i5cy964i_s9._.js +0 -3
- package/.next/server/chunks/ssr/_1-z85ugzufqk6._.js +0 -3
- package/.next/server/chunks/ssr/_10stgw6io7x93._.js +0 -3
- package/.next/server/chunks/ssr/_11xqn1cgzpe6k._.js +0 -3
- package/.next/server/chunks/ssr/_1cc3psc9rvrwn._.js +0 -3
- package/.next/server/chunks/ssr/_1hp7fzio98dms._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_0efju2pv0_0yw._.js +0 -3
- package/.next/static/chunks/01lfibj7hk--1.js +0 -1
- package/.next/static/chunks/06bfusm1eqhzt.js +0 -4
- package/.next/static/chunks/0fu1xttg42yzk.js +0 -1
- package/.next/static/chunks/0mp9tvylhyxid.js +0 -1
- package/.next/static/chunks/0xuzdy0dn7jkp.js +0 -63
- package/.next/static/chunks/1fa2xv93zl8oj.js +0 -1
- package/.next/static/chunks/1ou17klnb8gu_.js +0 -1
- package/.next/static/chunks/21v7--q2m3c4_.js +0 -1
- package/.next/static/chunks/22gdddnfj38h6.js +0 -1
- package/.next/static/chunks/2btkflolmab19.css +0 -3
- package/.next/static/chunks/2dml0yrklxocr.js +0 -31
- package/.next/static/chunks/2hjp9cnvepyzy.js +0 -247
- package/.next/static/chunks/2mu8zu6zd59z2.js +0 -1
- package/.next/static/chunks/2xibor-sxcc67.js +0 -1
- package/.next/static/chunks/3_e_larybjcr5.js +0 -1
- package/.next/static/chunks/3au-yz7ullfnr.js +0 -9
- package/.next/static/chunks/3zs0fu6zcu0lb.js +0 -1
- /package/.next/static/{jqVIU6HRwaZt62YD8QH_p → UGLvq52Fbq8nQxM1BjZlP}/_buildManifest.js +0 -0
- /package/.next/static/{jqVIU6HRwaZt62YD8QH_p → UGLvq52Fbq8nQxM1BjZlP}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{jqVIU6HRwaZt62YD8QH_p → UGLvq52Fbq8nQxM1BjZlP}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,204573,e=>{"use strict";var t=e.i(843476),a=e.i(271645),s=e.i(522016),r=e.i(618566),n=e.i(711241),i=e.i(456420);let l={name:"file-question-mark",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3",key:"mhlwft"}]],aliases:["file-question"]};l.node;let o=(0,i.f)(l);var c=e.i(741120),u=e.i(759659),d=e.i(469937),m=e.i(314381),g=e.i(632781),h=e.i(3198),f=e.i(519455),x=e.i(111110),p=e.i(41931),v=e.i(303163),j=e.i(201276);function y({errorItemId:e,commands:s,onUpdate:r}){let{t:n}=(0,x.b)(),[i,l]=(0,a.useState)(!1),[o,c]=(0,a.useState)(null),u=async()=>{l(!0),c(null);try{let t=await p.k.post(`/api/error-items/${e}/geogebra`,{},{recoverable:!0});t.suitable&&t.commands.length>0?r({geogebraCommands:JSON.stringify(t.commands)}):c(t.description||n.geogebra.notSuitable)}catch(t){j.V.error("[ErrorDetail]","GeoGebra analysis failed",{error:t});let e=(0,v.d)(t)||(0,v.Z)(t);e.includes("AI_AUTH_ERROR")?c(n.geogebra.authFailed):e.includes("AI_CONNECTION")?c(n.geogebra.connectionFailed):c(n.geogebra.analyzeFailed)}finally{l(!1)}},d=async t=>{await p.k.put(`/api/error-items/${e}`,{geogebraCommands:t}),r({geogebraCommands:t})},b=async()=>{await p.k.delete(`/api/error-items/${e}/geogebra`),r({geogebraCommands:null})};return s?(0,t.jsx)(h.f,{commands:s,height:700,showToolBar:!0,showAlgebraInput:!1,showMenuBar:!1,onRegenerate:u,onSaveCommands:d,onDelete:b}):(0,t.jsxs)("div",{className:"rounded-lg border border-dashed p-4",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(m.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:n.geogebra.title})]}),(0,t.jsx)(f.f,{variant:"outline",size:"sm",onClick:u,disabled:i,children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.f,{className:"mr-2 h-4 w-4 animate-spin"}),n.geogebra.analyzing]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.f,{className:"mr-2 h-4 w-4"}),n.geogebra.generate]})})]}),o&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:o}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:n.geogebra.hint})]})}function b({src:e,onClose:a}){let{t:s}=(0,x.b)();return e?(0,t.jsx)("div",{className:"fixed inset-0 z-50 bg-black/90 flex items-center justify-center p-4",onClick:a,children:(0,t.jsxs)("div",{className:"relative max-w-7xl max-h-full",children:[(0,t.jsx)("button",{className:"absolute -top-12 right-0 text-white hover:text-gray-300 text-lg font-semibold bg-black/50 px-4 py-2 rounded",onClick:a,children:s.detail?.close||"✕ Close"}),(0,t.jsx)("img",{src:e,alt:"Full size",className:"max-w-full max-h-[90vh] object-contain rounded-lg",onClick:e=>e.stopPropagation()}),(0,t.jsx)("p",{className:"text-center text-white/70 text-sm mt-4",children:s.detail?.clickOutside||"Click outside to close"})]})}):null}var w=e.i(141176),N=e.i(511445),k=e.i(515288);let A={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};A.node;let S=(0,i.f)(A);var C=e.i(856522),I=e.i(263676);function E({onClick:e,label:a}){let{t:s}=(0,x.b)();return(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",onClick:e,children:[(0,t.jsx)(S,{className:"h-4 w-4 mr-1"}),a||s.common?.edit||"Edit"]})}function T({onSave:e,onCancel:a,children:s}){let{t:r}=(0,x.b)();return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(f.f,{size:"sm",onClick:e,children:[(0,t.jsx)(C.f,{className:"h-4 w-4 mr-1"}),r.common?.save||"Save"]}),(0,t.jsxs)(f.f,{size:"sm",variant:"outline",onClick:a,children:[(0,t.jsx)(I.X,{className:"h-4 w-4 mr-1"}),r.common?.cancel||"Cancel"]}),s]})}function F({title:e,actions:a}){return(0,t.jsxs)("div",{className:"flex justify-between items-center",children:[e,a]})}var M=e.i(294114);function L({read:e,save:t,logLabel:s,successMessage:r,failureMessage:n}){let{t:i}=(0,x.b)(),[l,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(e),d=async()=>{try{await t(c),o(!1),M.c.success(r||i.common?.messages?.saveSuccess||"Saved successfully")}catch(e){j.V.error("[ErrorDetail]",`Failed to save ${s}`,{error:e}),M.c.error(n||i.common?.messages?.saveFailed||"Save failed")}};return{editing:l,value:c,setValue:u,start:()=>{u(e()),o(!0)},cancel:()=>o(!1),submit:d}}function z({title:e,value:a,onSave:s,logLabel:r,rows:n,placeholder:i,editorLabel:l,emptyText:o,cardClassName:c,titleClassName:u,contentClassName:d,headerActions:m,children:g}){let h=L({read:()=>a||"",save:s,logLabel:r}),f=(0,t.jsx)(w.f,{value:h.value,onChange:h.setValue,placeholder:i,rows:n,className:"w-full font-mono text-sm"});return(0,t.jsxs)(k.N,{className:c,children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(F,{title:(0,t.jsx)(k.v,{className:u,children:e}),actions:!h.editing&&(0,t.jsxs)("div",{className:"flex flex-wrap justify-end",children:[m,(0,t.jsx)(E,{onClick:h.start})]})})}),(0,t.jsxs)(k.O,{className:"space-y-4",children:[h.editing?(0,t.jsxs)("div",{className:"space-y-3",children:[l?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm text-muted-foreground",children:l}),f]}):f,(0,t.jsx)(T,{onSave:h.submit,onCancel:h.cancel})]}):!a&&o?(0,t.jsx)("p",{className:"text-sm text-muted-foreground italic",children:o}):(0,t.jsx)(N.f,{content:a,className:d}),g]})]})}var R=e.i(624687);function $({item:e,onUpdate:a}){let{t:s}=(0,x.b)(),r=L({read:()=>e.userNotes||"",save:async t=>{await p.k.patch(`/api/error-items/${e.id}/notes`,{userNotes:t}),a({userNotes:t})},logLabel:"notes",successMessage:s.common?.messages?.noteSaveSuccess||"Notes saved successfully"});return(0,t.jsxs)(k.N,{children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(F,{title:(0,t.jsx)(k.v,{children:s.detail.yourNotes}),actions:!r.editing&&(0,t.jsx)(E,{onClick:r.start,label:s.detail.editNotes})})}),(0,t.jsx)(k.O,{children:r.editing?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(R.f,{value:r.value,onChange:e=>r.setValue(e.target.value),placeholder:s.detail.notesPlaceholder||"Enter your notes...",rows:5,className:"w-full"}),(0,t.jsx)(T,{onSave:r.submit,onCancel:r.cancel})]}):(0,t.jsx)("div",{className:"whitespace-pre-wrap",children:e.userNotes?(0,t.jsx)("p",{className:"text-foreground",children:e.userNotes}):(0,t.jsx)("p",{className:"text-muted-foreground italic",children:s.detail.noNotes})})})]})}let V={name:"shapes",size:24,node:[["path",{d:"M8.3 10a.7.7 0 0 1-.626-1.079L11.4 3a.7.7 0 0 1 1.198-.043L16.3 8.9a.7.7 0 0 1-.572 1.1Z",key:"1bo67w"}],["rect",{x:"3",y:"14",width:"7",height:"7",rx:"1",key:"1bkyp8"}],["circle",{cx:"17.5",cy:"17.5",r:"3.5",key:"w3z12y"}]]};V.node;let O=(0,i.f)(V);function D({errorItemId:e,onDone:s}){let{t:r}=(0,x.b)(),[n,i]=(0,a.useState)(!1),l=async()=>{i(!0);try{let t=await p.k.post(`/api/error-items/${e}/figure`,{},{recoverable:!0});s(t),t.figureSvg||M.c.warning(r.figure.noFigure)}catch(a){let e=a?.data?.message||"",t=r.errors[e];j.V.error("[RegenerateFigure]","Failed to regenerate figure",{code:e}),M.c.error("NO_ORIGINAL_IMAGE"===e?r.figure.noImage:"string"==typeof t?t:r.figure.failed)}finally{i(!1)}};return(0,t.jsxs)(f.f,{variant:"outline",size:"sm",onClick:l,disabled:n,className:"flex items-center gap-2",children:[n?(0,t.jsx)(g.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(O,{className:"h-4 w-4"}),n?r.figure.regenerating:r.figure.regenerate]})}let U={name:"image-plus",size:24,node:[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]};U.node;let q=(0,i.f)(U);var _=e.i(12130),P=e.i(213761);function H({errorItemId:e,hasImage:s,onDone:r}){let{t:n}=(0,x.b)(),i=(0,a.useRef)(null),[l,o]=(0,a.useState)(!1),[c,u]=(0,a.useState)(null);(0,a.useEffect)(()=>()=>c?.dispose(),[c]);let d=async()=>{(!s||await (0,M.u)(n.replaceImage.confirm))&&i.current?.click()},m=async e=>{if(e){o(!0);try{u(await (0,P.p)(e))}catch(e){M.c.error(e instanceof P.o?n.upload.decodeErrors[e.code].replace("{format}",e.format.toUpperCase()):n.replaceImage.invalid)}finally{o(!1)}}},h=async t=>{if(c&&0!==t.length){o(!0);try{let{dataUrl:a}=await (0,P.X)(c,t[0]);u(null);let s=await p.k.put(`/api/error-items/${e}/image`,{imageDataUrl:a});r(s.originalImageUrl),M.c.success(n.replaceImage.done)}catch(t){let e=t?.data?.message||"";j.V.error("[ReplaceImage]","Failed to replace original image",{code:e}),M.c.error("INVALID_IMAGE"===e?n.replaceImage.invalid:n.replaceImage.failed)}finally{o(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{ref:i,type:"file",accept:"image/*,.heic,.heif",className:"hidden",onChange:e=>{m(e.target.files?.[0]),e.target.value=""}}),c&&(0,t.jsx)(_.f,{imageSrc:c.previewUrl,open:!l,onClose:()=>u(null),allowMulti:!1,onRegionsSelected:e=>void h(e)}),(0,t.jsxs)(f.f,{variant:"outline",size:"sm",onClick:d,disabled:l,className:"flex items-center gap-2",children:[l?(0,t.jsx)(g.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(q,{className:"h-4 w-4"}),l?n.replaceImage.uploading:s?n.replaceImage.replace:n.replaceImage.add]})]})}var G=e.i(520732),B=e.i(438465),X=e.i(28342),W=e.i(674166),Z=e.i(664030);function K({item:e,onChanged:a}){let{t:s}=(0,x.b)(),r=s.common?.notSet||"Not set",{groups:n}=(0,Z.f)(),i=L({read:()=>({subjectId:e.subjectId||null,gradeSemester:e.gradeSemester||"",paperLevel:e.paperLevel||""}),save:async t=>{let{subjectId:s,paperLevel:r,...n}=t;await p.k.put(`/api/error-items/${e.id}`,{...n,...r!==(e.paperLevel||"")?{paperLevel:r||null}:{},...s!==(e.subjectId||null)?{subjectId:s}:{}}),await a()},logLabel:"metadata",successMessage:s.common?.messages?.metaUpdateSuccess||"Metadata updated successfully!",failureMessage:s.common?.messages?.updateFailed||"Update failed"}),l=e=>i.setValue({...i.value,...e});return(0,t.jsxs)("div",{className:"space-y-2 pt-4 border-t",children:[(0,t.jsx)(F,{title:(0,t.jsx)("h4",{className:"text-sm font-semibold",children:s.detail?.questionInfo||"Question Info"}),actions:!i.editing&&(0,t.jsx)(E,{onClick:i.start})}),i.editing?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm text-muted-foreground",children:s.notebooks?.title||"Notebook"}),(0,t.jsx)(B.f,{value:i.value.subjectId||void 0,onChange:e=>l({subjectId:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{htmlFor:"detail-grade-semester",className:"text-sm text-muted-foreground",children:s.editor.gradeSemester}),(0,t.jsx)(X.f,{id:"detail-grade-semester",value:i.value.gradeSemester,onChange:e=>l({gradeSemester:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm text-muted-foreground",children:s.filter.paperLevel}),(0,t.jsx)(W.f,{value:i.value.paperLevel,onChange:e=>l({paperLevel:e})})]}),(0,t.jsx)(T,{onSave:i.submit,onCancel:i.cancel})]}):(0,t.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[s.notebooks?.title||"Notebook",":"]}),(0,t.jsx)("span",{className:"font-medium",children:e.subject?.name||r})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[s.editor.gradeSemester,":"]}),(0,t.jsx)("span",{className:"font-medium",children:e.gradeSemester||r})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("span",{className:"text-muted-foreground",children:[s.filter.paperLevel,":"]}),(0,t.jsx)("span",{className:"font-medium",children:(e=>{if(!e)return r;let t=n.find(t=>t.id===e);return t?.name||e})(e.paperLevel)})]})]})]})}var Q=e.i(487486),Y=e.i(328623);function J({errorItemId:e,onDone:s,onSuggested:r}){let{t:n}=(0,x.b)(),[i,l]=(0,a.useState)(!1),o=async()=>{l(!0);try{if(r){let t=await p.k.post(`/api/error-items/${e}/retag`,{preview:!0},{recoverable:!0});r(t.tags)}else await p.k.post(`/api/error-items/${e}/retag`,{},{recoverable:!0}),s?.()}catch(a){let e=a?.data?.message||"",t=n.errors[e];j.V.error("[RetagItem]","Failed to regenerate tags",{code:e}),M.c.error("NO_TAGS_SELECTED"===e?n.retag.noTags:"string"==typeof t?t:n.retag.itemFailed)}finally{l(!1)}};return(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",onClick:o,disabled:i,children:[i?(0,t.jsx)(g.f,{className:"h-4 w-4 mr-1 animate-spin"}):(0,t.jsx)(Y.f,{className:"h-4 w-4 mr-1"}),r?i?n.retag.suggestRunning:n.retag.suggestButton:i?n.retag.itemRunning:n.retag.itemButton]})}var ee=e.i(574041),et=e.i(952122),ea=e.i(990745);function es({item:e,educationStage:a,onChanged:s}){let{t:r}=(0,x.b)(),n=(0,ea.f)(e),i=L({read:()=>(0,ea.f)(e),save:async t=>{await p.k.put(`/api/error-items/${e.id}`,{knowledgePoints:t}),await s()},logLabel:"tags",successMessage:r.common?.messages?.tagUpdateSuccess||"Tags updated successfully!",failureMessage:r.common?.messages?.updateFailed||"Update failed"});return(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(F,{title:(0,t.jsx)("h4",{className:"text-sm font-semibold",children:r.editor?.tags||"Knowledge Tags"}),actions:!i.editing&&(0,t.jsxs)("div",{className:"flex",children:[(0,t.jsx)(J,{errorItemId:e.id,onDone:s}),(0,t.jsx)(E,{onClick:i.start})]})}),i.editing?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(ee.f,{value:i.value,onChange:i.setValue,placeholder:r.editor?.tagsPlaceholder||"Enter or select knowledge tags...",subject:(0,et.f)(e.subject?.name||null)||void 0,gradeStage:a}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:r.editor?.tagsHint||"Select from standard or custom tags"}),(0,t.jsx)(T,{onSave:i.submit,onCancel:i.cancel,children:(0,t.jsx)(J,{errorItemId:e.id,onSuggested:i.setValue})})]}):(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(e=>(0,t.jsx)(Q.f,{variant:"secondary",children:e},e))})]})}var er=e.i(580860);let en={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};en.node;let ei=(0,i.f)(en);function el({src:e,alt:a,showLabel:s,hideLabel:r,visible:n,onVisibleChange:i,onEnlarge:l,variant:o="ghost",actions:c}){let{t:u}=(0,x.b)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e&&(0,t.jsx)(f.f,{variant:o,size:"sm",onClick:()=>i(!n),className:`flex items-center gap-2 ${"ghost"===o?"text-muted-foreground":""}`,children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(er.f,{className:"h-4 w-4"}),r]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ei,{className:"h-4 w-4"}),s]})}),c]}),e&&n&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("img",{src:e,alt:a,className:"w-full rounded-lg border cursor-pointer hover:opacity-90 transition-opacity",onClick:()=>l(e)}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 text-center",children:u.detail?.clickToEnlarge||"Click to enlarge"})]})]})}function eo({item:e,educationStage:s,saveFields:r,onUpdate:n,reload:i,onEnlarge:l}){let{t:o}=(0,x.b)(),[c,u]=(0,a.useState)(!1),d=L({read:()=>e.questionText,save:e=>r({questionText:e}),logLabel:"question"});return(0,t.jsxs)(k.N,{children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(F,{title:(0,t.jsx)(k.v,{children:o.detail.question}),actions:!d.editing&&(0,t.jsx)(E,{onClick:d.start})})}),(0,t.jsxs)(k.O,{className:"space-y-4",children:[d.editing?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(w.f,{value:d.value,onChange:d.setValue,placeholder:"Enter question text...",rows:8,className:"w-full font-mono text-sm"}),(0,t.jsx)(T,{onSave:d.submit,onCancel:d.cancel})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.f,{content:e.questionText}),(0,t.jsx)(G.f,{svg:e.figureSvg,scale:e.figureScale,align:e.figureAlign,onSave:(e,t)=>r({figureScale:e,figureAlign:t})},`${e.id}-${e.figureScale??100}-${e.figureAlign??"center"}`)]}),(0,t.jsx)(es,{item:e,educationStage:s,onChanged:i}),(0,t.jsx)(K,{item:e,onChanged:i}),(0,t.jsx)("div",{className:"pt-3",children:(0,t.jsx)(el,{src:e.originalImageUrl,alt:o.detail.originalProblem||"Original Problem",showLabel:o.replaceImage?.view||"View original image",hideLabel:o.replaceImage?.hide||"Hide original image",variant:"outline",visible:c,onVisibleChange:u,onEnlarge:l,actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(H,{errorItemId:e.id,hasImage:!!e.originalImageUrl,onDone:e=>{n({originalImageUrl:e}),u(!0)}}),e.originalImageUrl&&(0,t.jsx)(D,{errorItemId:e.id,onDone:n})]})})})]})]})}var ec=e.i(967489),eu=e.i(62825);function ed({item:e,saveFields:s,onEnlarge:r}){let{t:n,language:i}=(0,x.b)(),[l,o]=(0,a.useState)(!1),c=L({read:()=>({text:e.wrongAnswerText||"",status:e.mistakeStatus||"unknown"}),save:({text:e,status:t})=>s({wrongAnswerText:e,mistakeStatus:(0,eu.x)(t,e)}),logLabel:"wrong answer"});return(0,t.jsxs)(k.N,{children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(F,{title:(0,t.jsx)(k.v,{children:n.editor?.wrongAnswerText||"Wrong Answer / Work"}),actions:!c.editing&&(0,t.jsx)(E,{onClick:c.start})})}),(0,t.jsx)(k.O,{className:"space-y-4",children:c.editing?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm text-muted-foreground",children:n.editor?.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(ec.d,{value:c.value.status,onValueChange:e=>c.setValue({...c.value,status:e}),children:[(0,t.jsx)(ec.P,{children:(0,t.jsx)(ec.U,{})}),(0,t.jsxs)(ec.r,{children:[(0,t.jsx)(ec.T,{value:"not_attempted",children:n.editor?.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(ec.T,{value:"wrong_attempt",children:n.editor?.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(ec.T,{value:"unknown",children:n.editor?.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("label",{className:"text-sm text-muted-foreground",children:n.editor?.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(w.f,{value:c.value.text,onChange:e=>c.setValue({text:e,status:e.trim()?"wrong_attempt":c.value.status}),rows:5,className:"w-full font-mono text-sm"})]}),(0,t.jsx)(T,{onSave:c.submit,onCancel:c.cancel})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)(Q.f,{variant:"secondary",children:(0,eu.i)(e.mistakeStatus,i)}),e.wrongAnswerText?(0,t.jsx)(N.f,{content:e.wrongAnswerText}):(0,t.jsx)("p",{className:"text-sm text-muted-foreground italic",children:n.detail?.noMistakeAnalysis||"No mistake analysis yet."}),e.wrongAnswerImageUrl&&(0,t.jsx)("div",{className:"pt-3",children:(0,t.jsx)(el,{src:e.wrongAnswerImageUrl,alt:n.detail.wrongAnswerImageAlt,showLabel:n.detail.viewImage,hideLabel:n.detail.hideImage,visible:l,onVisibleChange:o,onEnlarge:r})})]})})]})}let em={name:"square-function",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"M9 17c2 0 2.8-1 2.8-2.8V10c0-2 1-3.3 3.2-3",key:"m1af9g"}],["path",{d:"M9 11.2h5.7",key:"3zgcl2"}]],aliases:["function-square"]};em.node;let eg=(0,i.f)(em);var eh=e.i(716400),ef=e.i(369939);let ex=new Set(["ne","neq","nabla","nu","not","notin","ni","nexists","ngeq","nleq","nmid","nparallel","nsubseteq"]);function ep(e){return e.length>80?`${e.slice(0,80)}…`:e}let ev=["questionText","answerText","analysis","wrongAnswerText","mistakeAnalysis"];function ej({errorItemId:e,fields:s,onDone:r}){let{t:n}=(0,x.b)(),[i,l]=(0,a.useState)(!1),o=(0,a.useMemo)(()=>Object.values(function(e){let t={};for(let a of ev){let s=function(e){if(!e?.trim())return[];let{masked:t,segments:a}=(0,ef.F)(e),s=[];for(let e of a)try{eh.f.renderToString(e.tex,{displayMode:e.displayMode,throwOnError:!0,strict:"ignore"})}catch(a){let t=a instanceof Error?a.message.replace(/^KaTeX parse error:\s*/,""):String(a);s.push({snippet:ep(e.source),message:t})}let r=t.replace(/@@MATH\d+@@/g," "),n=r.replace(/\\\$/g,"").match(/\$/g);n&&s.push({snippet:"$",message:`有 ${n.length} 个未配对的 $ 定界符`});let i=r.match(/\\[()[\]]/g);i&&s.push({snippet:i.join(" "),message:"有未配对的 \\( \\) 或 \\[ \\] 定界符"});let l=[...new Set(r.match(/\\[a-zA-Z]{2,}/g)||[])].filter(e=>!e.startsWith("\\n")||ex.has(e.slice(1)));return l.length>0&&s.push({snippet:ep(l.join(" ")),message:"LaTeX 命令没有放在 $…$ 中,会原样显示"}),s}(e[a]);s.length>0&&(t[a]=s)}return t}(s)).reduce((e,t)=>e+(t?.length??0),0),[s]),c=async()=>{l(!0);try{let t=await p.k.post(`/api/error-items/${e}/fix-latex`,{},{timeout:3e5,recoverable:!0});r(t.updated);let a=t.fixedFields.map(e=>n.fixLatex.fields[e]).join(n.common.listSeparator);M.c.info(0===t.issuesBefore?n.fixLatex.noIssues:0===t.fixedFields.length?n.fixLatex.notFixed:0===t.issuesAfter?n.fixLatex.fixedAll.replace("{fields}",a):n.fixLatex.fixedPartly.replace("{fields}",a).replace("{count}",String(t.issuesAfter)))}catch(a){let e=a?.data?.message||"",t=n.errors[e];j.V.error("[FixLatex]","Failed to fix LaTeX",{code:e}),M.c.error("string"==typeof t?t:n.fixLatex.failed)}finally{l(!1)}};return 0!==o||i?(0,t.jsxs)(f.f,{variant:"outline",size:"sm",onClick:c,disabled:i,className:"border-amber-500 text-amber-700 dark:text-amber-400",title:n.fixLatex.issuesFound.replace("{count}",String(o)),children:[i?(0,t.jsx)(g.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(eg,{className:"mr-2 h-4 w-4"}),i?n.fixLatex.running:n.fixLatex.button,!i&&o>0&&(0,t.jsxs)("span",{className:"ml-1",children:["(",o,")"]})]}):null}var ey=e.i(991686),eb=e.i(846968),ew=e.i(931454);function eN({errorItemId:e,onDone:s}){let{t:r,language:n}=(0,x.b)(),[i,l]=(0,a.useState)(!1),o=async()=>{if(await (0,M.u)(r.reanswerItem.confirm)){l(!0);try{let t=await p.k.post(`/api/error-items/${e}/reanswer`,{language:n},{timeout:6e5,recoverable:!0});s(t)}catch(a){let e=a?.data?.message||"",t=r.errors[e];j.V.error("[RegenerateAnswer]","Failed to regenerate answer",{code:e}),M.c.error("NO_QUESTION_TEXT"===e?r.reanswerItem.noQuestionText:"string"==typeof t?t:r.reanswerItem.failed)}finally{l(!1)}}};return(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",onClick:o,disabled:i,children:[i?(0,t.jsx)(g.f,{className:"h-4 w-4 mr-1 animate-spin"}):(0,t.jsx)(ew.f,{className:"h-4 w-4 mr-1"}),i?r.reanswerItem.running:r.reanswerItem.button]})}var ek=e.i(689664),eA=e.i(508734);function eS({shortId:e,className:s=""}){let{t:r}=(0,x.b)(),[n,i]=(0,a.useState)(!1);if(!e)return null;let l=async t=>{t.preventDefault(),t.stopPropagation();try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),1500)}catch{window.prompt(r.shortId.copy,e)}};return(0,t.jsxs)("button",{type:"button",onClick:l,title:n?r.shortId.copied:r.shortId.copy,className:`inline-flex items-center gap-1 rounded-md border bg-muted/50 px-2 py-0.5 font-mono text-xs text-muted-foreground hover:text-foreground transition-colors ${s}`,children:[(0,t.jsx)("span",{children:r.shortId.label}),(0,t.jsx)("span",{className:"font-semibold text-foreground",children:e}),n?(0,t.jsx)(ek.f,{className:"h-3 w-3 text-green-600"}):(0,t.jsx)(eA.f,{className:"h-3 w-3"})]})}let eC={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};eC.node;let eI=(0,i.f)(eC),eE={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};eE.node;let eT=(0,i.f)(eE),eF={name:"maximize",size:24,node:[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]};eF.node;let eM=(0,i.f)(eF),eL={name:"minimize",size:24,node:[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]};eL.node;let ez=(0,i.f)(eL),eR={name:"pause",size:24,node:[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]};eR.node;let e$=(0,i.f)(eR);var eV=e.i(21357),eO=e.i(395925);let eD={name:"volume-2",size:24,node:[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]};eD.node;let eU=(0,i.f)(eD),eq={name:"volume-x",size:24,node:[["path",{d:"M11 4.702a.7.7 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.7.7 0 0 0 11 19.298z",key:"1p7khw"}],["path",{d:"m16.5 14.5 5-5",key:"cul3yw"}],["path",{d:"m16.5 9.5 5 5",key:"1akey5"}]]};eq.node;let e_=(0,i.f)(eq);var eP=e.i(975157);function eH({supported:e,enabled:a,rate:s,fullscreen:r,onToggle:n,onCycleRate:i}){let{t:l}=(0,x.b)(),o=(0,eP.f)("h-8 shrink-0",r&&"text-white hover:bg-white/20 hover:text-white"),c=e?a?l.svgAnimation.voiceOff:l.svgAnimation.voiceOn:l.svgAnimation.voiceUnsupported;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{title:c,className:"shrink-0",children:(0,t.jsx)(f.f,{variant:"ghost",size:"sm",className:(0,eP.f)(o,"w-8 p-0",a&&e&&!r&&"text-primary"),onClick:n,disabled:!e,"aria-label":c,"aria-pressed":a&&e,children:a&&e?(0,t.jsx)(eU,{className:"h-4 w-4"}):(0,t.jsx)(e_,{className:"h-4 w-4"})})}),a&&e&&(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",className:(0,eP.f)(o,"px-1.5 text-xs tabular-nums"),onClick:i,"aria-label":l.svgAnimation.voiceRate,title:l.svgAnimation.voiceRate,children:[s,"×"]})]})}let eG=/<metadata\b[^>]*\bid\s*=\s*["']narration["'][^>]*>([\s\S]*?)<\/metadata\s*>/gi,eB={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function eX(e){let t=e;if("string"==typeof t){let e=t.indexOf("["),a=t.lastIndexOf("]");if(-1===e||a<e)return null;try{t=JSON.parse(t.slice(e,a+1))}catch{return null}}if(!Array.isArray(t))return null;let a=[];for(let e of t){if(!e||"object"!=typeof e)continue;let{begin:t,text:s}=e,r="number"==typeof t?t:"string"==typeof t?eQ(t):null;if(null===r||!Number.isFinite(r)||r<0||"string"!=typeof s)continue;let n=s.replace(/\s+/g," ").trim();n&&a.push({begin:Math.round(100*r)/100,text:n})}a.sort((e,t)=>e.begin-t.begin);let s=[];for(let e of a){let t=s[s.length-1];t&&t.begin===e.begin?t.text=`${t.text} ${e.text}`:s.push({...e})}let r=s.slice(0,20).map(e=>({...e,text:e.text.slice(0,300)}));return r.length>0?r:null}function eW(e){for(let t of e.matchAll(eG)){let e=eX(t[1].replace(/&(#x[0-9a-f]+|#\d+|lt|gt|amp|quot|apos);/gi,(e,t)=>{if("#"!==t[0])return eB[t.toLowerCase()];let a="x"===t[1]||"X"===t[1]?parseInt(t.slice(2),16):Number(t.slice(1));return Number.isFinite(a)&&a<=1114111?String.fromCodePoint(a):e}));if(e)return e}return null}let eZ=/<(?:animate|animateTransform|animateMotion|set)\b[^>]*>/gi;function eK(e,t){let a=e.match(RegExp(`\\s${t}\\s*=\\s*("([^"]*)"|'([^']*)')`,"i"));return a?(a[2]??a[3]??"").trim():null}function eQ(e){if(!e)return null;let t=e.trim(),a=t.match(/^(?:(\d+):)?(\d+):(\d+(?:\.\d+)?)$/);if(a)return 3600*Number(a[1]??0)+60*Number(a[2])+Number(a[3]);let s=t.match(/^(\d+(?:\.\d+)?)(h|min|s|ms)?$/);if(!s)return null;let r={h:3600,min:60,s:1,ms:.001}[s[2]??"s"]??1;return Number(s[1])*r}let eY=new Set(["opacity","visibility","display","fill-opacity"]);function eJ(e){let t=e.getAttribute("viewBox")?.split(/[\s,]+/).map(Number),a=t?.length===4&&t[3]>0?t[1]+t[3]:parseFloat(e.getAttribute("height")??"");if(!(a>0))return null;let s=t?.length===4?t[1]+.78*t[3]:.78*a,r=[];for(let t of Array.from(e.querySelectorAll("text"))){if(t.closest("defs, metadata"))continue;let a=parseFloat(t.getAttribute("y")??t.querySelector("tspan[y]")?.getAttribute("y")??"");if(!(a>=s))continue;let n=Array.from(t.querySelectorAll("tspan")),i=(n.length>0?n.map(e=>e.textContent??"").join(" "):t.textContent??"").replace(/\s+/g," ").trim(),l=function(e,t){for(let a=e;a&&a!==t;a=a.parentElement)for(let e of Array.from(a.children)){let t=e.localName;if("set"!==t&&"animate"!==t)continue;let a=e.getAttribute("attributeName")??"";if(eY.has(a)&&!function(e,t){if(null===t)return!1;let a=t.trim();return"visibility"===e?"hidden"===a:"display"===e?"none"===a:0===Number(a)}(a,e.getAttribute("to")??e.getAttribute("values")?.split(";").pop()??null))return eQ((e.getAttribute("begin")??"0").split(";")[0])}return 0}(t,e);i&&null!==l&&r.push({begin:l,y:a,text:i})}return r.sort((e,t)=>e.begin-t.begin||e.y-t.y),eX(r.map(({begin:e,text:t})=>({begin:e,text:t})))}var e0=e.i(79058);let e1=[1,1.25,1.5,.75],e2="svg-narration-enabled",e3="svg-narration-rate";function e4(e){try{return localStorage.getItem(e)}catch{return null}}function e5(e,t){try{localStorage.setItem(e,t)}catch{}}let e8={zh:["zh","cmn"],en:["en"]};function e6(){return"speechSynthesis"in window&&"u">typeof SpeechSynthesisUtterance?window.speechSynthesis:null}let e7=!1;function e9(){let e=e6();if(!e||e7)return;e7=!0;let t=new SpeechSynthesisUtterance(" ");t.volume=0,e.speak(t)}function te(e,t){return Math.max(8e3,400*e.length/t+5e3)}function tt(e,t){let a=-1;for(let s=0;s<e.length&&e[s].begin<=t+.05;s++)a=s;return a}function ta(e){let t=Math.max(0,Math.floor(e));return`${Math.floor(t/60)}:${String(t%60).padStart(2,"0")}`}function ts({svg:e,errorItemId:s}){let{t:r,language:n}=(0,x.b)(),i=(0,a.useRef)(null),l=(0,a.useRef)(null),o=(0,a.useRef)(null),[c,u]=(0,a.useState)(null),[d,m]=(0,a.useState)(!1),[g,h]=(0,a.useState)(0),[p,v]=(0,a.useState)(!1),[j,y]=(0,a.useState)(!1),b=p||j,w=(0,a.useMemo)(()=>(function(e){let t=0;for(let a of e.match(eZ)||[]){let e=eK(a,"begin"),s=null===e?0:eQ(e.split(";")[0]);if(null===s)continue;let r=eK(a,"repeatCount");if("indefinite"!==r&&"indefinite"!==eK(a,"repeatDur"))t=Math.max(t,s+(eQ(eK(a,"dur"))??0)*(r&&Number.isFinite(Number(r))?Number(r):1))}return t})(e),[e]),N=(0,a.useMemo)(()=>(function(e){let t=e.match(/<svg\b[^>]*>/i)?.[0]??"",a=eK(t,"viewBox")?.split(/[\s,]+/).map(Number);if(a?.length===4&&a[2]>0&&a[3]>0)return a[2]/a[3];let s=parseFloat(eK(t,"width")??""),r=parseFloat(eK(t,"height")??"");return s>0&&r>0?s/r:1.6})(e),[e]),k=(0,a.useMemo)(()=>`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; img-src data:"><style>html,body{margin:0;height:100%;background:#fff;overflow:hidden}svg{display:block;width:100%;height:100%}</style></head><body>${e}</body></html>`,[e]),A=(0,a.useMemo)(()=>eW(e),[e]),[S,C]=(0,a.useState)(null),I=A??S,E=(0,a.useCallback)(()=>{let e=l.current?.contentDocument;return"function"==typeof e?.getAnimations?e.getAnimations():[]},[]),T=function({segments:e,language:t,errorItemId:s,holdAnimation:r}){let[n,i]=(0,a.useState)(!1),[l,o]=(0,a.useState)("browser"),[c,u]=(0,a.useState)(!1),[d,m]=(0,a.useState)(1),[g,h]=(0,a.useState)(!1),[f,x]=(0,a.useState)(!1),p=(0,a.useRef)(void 0),v=(0,a.useRef)(-1),j=(0,a.useRef)(!1),y=(0,a.useRef)(null),b=(0,a.useRef)(0),w=(0,a.useRef)(null),N=(0,a.useRef)(null),k=(0,a.useRef)(!1),A=(0,a.useRef)("browser"),S=(0,a.useRef)(!1),C=(0,a.useRef)(!1),I=(0,a.useRef)(1),E=(0,a.useRef)(r);(0,a.useEffect)(()=>{E.current=r},[r]),(0,a.useEffect)(()=>{C.current="1"===e4(e2),u(C.current);let e=Number(e4(e3));e1.includes(e)&&(I.current=e,m(e))},[]),(0,a.useEffect)(()=>{let e=!0;return(0,e0.v)().then(t=>{e&&(A.current=t,o(t))}),()=>{e=!1}},[]),(0,a.useEffect)(()=>{let e=e6();if(!e)return;let a=()=>{let a,s,r,n=e.getVoices();a=e8[t],s=n.filter(e=>a.some(t=>e.lang.toLowerCase().startsWith(t))),r="zh"===t?/^(zh|cmn)[-_](cn|hans)/i:/^en[-_]us/i,p.current=s.find(e=>r.test(e.lang)&&e.localService)??s.find(e=>r.test(e.lang))??s[0],i(0===n.length||!!p.current)};return a(),e.addEventListener?.("voiceschanged",a),()=>e.removeEventListener?.("voiceschanged",a)},[t]);let T=(0,a.useCallback)(()=>{k.current&&(k.current=!1,null===y.current&&(x(!1),E.current(!1)))},[]),F=(0,a.useCallback)(a=>{let s,r=e?.[a];if(!r)return;let n=b.current,i={},l=()=>n===b.current&&w.current===i,o=e=>{clearTimeout(s),s=setTimeout(c,e)};function c(){clearTimeout(s),l()&&(w.current=null,N.current=null,j.current=!1,h(!1),T(),null!==y.current&&(y.current=null,x(!1),E.current(!1)))}let u=!1,d=()=>{if(!l()||u)return;u=!0,T();let e=e6();if(!e)return void c();let a=new SpeechSynthesisUtterance(r.text);a.lang=p.current?.lang??("en"===t?"en-US":"zh-CN"),p.current&&(a.voice=p.current),a.rate=I.current,a.onend=c,a.onerror=c,a.onstart=()=>o(te(r.text,a.rate)),o(2500),N.current=a,e.speak(a)};if(w.current=i,j.current=!0,h(!0),"cloud"!==A.current)return void d();let m=e?.[a+1];m&&(0,e0.U)(m.text,t).catch(()=>void 0);let g=setTimeout(()=>{l()&&null===y.current&&(k.current=!0,x(!0),E.current(!0))},300);(0,e0.U)(r.text,t).then(e=>{let t=(0,e0.l)();if(!l())return;if(!t){clearTimeout(g),d();return}let a=e=>()=>{l()&&!u&&e()};t.onplaying=a(()=>{clearTimeout(g),T(),o(te(r.text,t.playbackRate))}),t.onended=a(c),t.onerror=a(d),t.src=e,t.playbackRate=I.current,o(8e3),t.play().catch(a(()=>{clearTimeout(g),d()}))},()=>{clearTimeout(g),d()})},[e,t,T]),M=(0,a.useCallback)(t=>{b.current++,w.current=null,N.current=null,j.current=!1,h(!1),(null!==y.current||k.current)&&(y.current=null,k.current=!1,x(!1),E.current(!1)),v.current=e?tt(e,t)-1:-1,e6()?.cancel(),"cloud"===A.current&&(0,e0.l)()?.pause()},[e]),L=(0,a.useCallback)(t=>{if(!C.current||!e?.length||null!==y.current)return;if(j.current){let a=v.current+1;if(a>=e.length)return;let s=a>0?e[a].begin-e[a-1].begin:e[a].begin;if(t<e[a].begin-Math.min(.8,s/2))return;y.current=a,x(!0),E.current(!0);return}let a=tt(e,t);a<=v.current||(v.current=a,F(a))},[e,F]),z=(0,a.useCallback)(()=>{C.current&&(e9(),"cloud"===A.current&&(0,e0.p)())},[]),R=(0,a.useCallback)((e,t)=>{S.current=!0,M(t),C.current=e,u(e),e5(e2,e?"1":"0"),z()},[M,z]),$=(0,a.useCallback)(()=>{let e=e1[(e1.indexOf(I.current)+1)%e1.length];if(I.current=e,m(e),"cloud"===A.current){let t=(0,e0.l)();t&&(t.playbackRate=e)}e5(e3,String(e))},[]);return(0,a.useEffect)(()=>{let e="cloud"===l&&!(0,e0.h)();if(!c||(e7||!e6())&&!e)return;let t=()=>{e9(),e&&(0,e0.p)()};return document.addEventListener("click",t,{capture:!0,once:!0}),document.addEventListener("touchend",t,{capture:!0,once:!0}),()=>{document.removeEventListener("click",t,{capture:!0}),document.removeEventListener("touchend",t,{capture:!0})}},[c,l]),(0,a.useEffect)(()=>{c&&"cloud"===l&&e?.length&&(0,e0.w)(e.map(e=>e.text),t,s).catch(()=>void 0)},[c,l,e,t,s]),(0,a.useEffect)(()=>{if("cloud"!==l||!e?.length||C.current)return;let a=!0;return(0,e0.z)(e.map(e=>e.text),t).then(e=>{a&&e&&!C.current&&!S.current&&(C.current=!0,u(!0))}),()=>{a=!1}},[l,e,t]),(0,a.useEffect)(()=>()=>{b.current++,e6()?.cancel(),"cloud"===A.current&&(0,e0.l)()?.pause()},[e]),{supported:n||"cloud"===l,enabled:c,rate:d,speaking:g,holding:f,setEnabled:R,cycleRate:$,update:L,stop:M,prime:z}}({segments:I,language:n,errorItemId:s,holdAnimation:(0,a.useCallback)(e=>{e?o.current?.pauseAnimations():o.current?.unpauseAnimations(),E().forEach(t=>e?t.pause():t.play())},[E])}),F=T.enabled&&(T.holding||!d&&T.speaking),{stop:M,update:L,prime:z}=T,R=(0,a.useCallback)(()=>{o.current?.pauseAnimations(),E().forEach(e=>e.pause()),m(!1)},[E]),$=(0,a.useCallback)(()=>{M(o.current?.getCurrentTime()??0),R()},[R,M]),V=(0,a.useCallback)(e=>{o.current?.setCurrentTime(e),E().forEach(t=>{t.currentTime=1e3*e}),h(e),M(e)},[E,M]),O=(0,a.useCallback)(()=>{let e=o.current;e&&(w>0&&e.getCurrentTime()>=w&&V(0),e.unpauseAnimations(),E().forEach(e=>e.play()),m(!0),z())},[E,w,V,z]),D=async()=>{if(j)return void y(!1);if(document.fullscreenElement)return void await document.exitFullscreen().catch(()=>void 0);let e=i.current;if(e&&"function"==typeof e.requestFullscreen)try{await e.requestFullscreen();return}catch{}y(!0)};return(0,a.useEffect)(()=>{let e=()=>v(document.fullscreenElement===i.current);return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),(0,a.useEffect)(()=>{if(!j)return;let e=e=>{"Escape"===e.key&&y(!1)},t=document.body.style.overflow;return document.body.style.overflow="hidden",document.addEventListener("keydown",e),()=>{document.body.style.overflow=t,document.removeEventListener("keydown",e)}},[j]),(0,a.useEffect)(()=>{if(!d)return;let e=0,t=()=>{let a=o.current?.getCurrentTime()??0;if(L(a),w>0&&a>=w){o.current?.setCurrentTime(w),R(),h(w);return}h(a),e=requestAnimationFrame(t)};return e=requestAnimationFrame(t),()=>cancelAnimationFrame(e)},[d,w,R,L]),(0,t.jsxs)("div",{ref:i,className:(0,eP.f)("space-y-2",b&&"flex flex-col items-center justify-center bg-black p-4",j&&"fixed inset-0 z-50"),children:[(0,t.jsx)("iframe",{ref:l,srcDoc:k,sandbox:"allow-same-origin",title:r.svgAnimation.alt,onLoad:()=>{o.current=l.current?.contentDocument?.querySelector("svg")??null,M(0),R(),o.current?.setCurrentTime(0),E().forEach(e=>{e.currentTime=0}),C(o.current?eJ(o.current):null),h(0),u(o.current?e:null)},className:(0,eP.f)("mx-auto block rounded border bg-white transition-shadow",!b&&"w-full max-w-3xl",F&&"border-primary ring-2 ring-primary/40"),style:{visibility:c===e?"visible":"hidden",...b?{aspectRatio:N,width:`min(100%, calc((100dvh - 96px) * ${N}))`}:{aspectRatio:N}}}),(0,t.jsxs)("div",{className:(0,eP.f)("mx-auto flex w-full items-center gap-2",b?"max-w-5xl text-white":"max-w-3xl"),children:[(0,t.jsx)(f.f,{variant:"outline",size:"sm",className:"h-8 w-8 shrink-0 p-0 text-foreground",onClick:d?$:O,disabled:c!==e,"aria-label":d?r.svgAnimation.pause:r.svgAnimation.play,title:d?r.svgAnimation.pause:r.svgAnimation.play,children:d?(0,t.jsx)(e$,{className:"h-4 w-4"}):(0,t.jsx)(eV.f,{className:"h-4 w-4"})}),(0,t.jsx)(f.f,{variant:"ghost",size:"sm",className:(0,eP.f)("h-8 w-8 shrink-0 p-0",b&&"text-white hover:bg-white/20 hover:text-white"),onClick:()=>{V(0),O()},disabled:c!==e,"aria-label":r.svgAnimation.replay,title:r.svgAnimation.replay,children:(0,t.jsx)(eO.f,{className:"h-4 w-4"})}),w>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("input",{type:"range",min:0,max:w,step:.1,value:Math.min(g,w),onChange:e=>V(Number(e.target.value)),"aria-label":r.svgAnimation.progress,className:"h-2 min-w-0 flex-1 cursor-pointer accent-primary"}),(0,t.jsxs)("span",{className:(0,eP.f)("shrink-0 text-xs tabular-nums",b?"text-white/80":"text-muted-foreground"),children:[ta(g)," / ",ta(w)]})]}),(0,t.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[!!I?.length&&(0,t.jsx)(eH,{supported:T.supported,enabled:T.enabled,rate:T.rate,fullscreen:b,onToggle:()=>T.setEnabled(!T.enabled,o.current?.getCurrentTime()??0),onCycleRate:T.cycleRate}),(0,t.jsx)(f.f,{variant:"ghost",size:"sm",className:(0,eP.f)("h-8 w-8 shrink-0 p-0",b&&"text-white hover:bg-white/20 hover:text-white"),onClick:D,"aria-label":b?r.svgAnimation.exitFullscreen:r.svgAnimation.fullscreen,title:b?r.svgAnimation.exitFullscreen:r.svgAnimation.fullscreen,children:b?(0,t.jsx)(ez,{className:"h-4 w-4"}):(0,t.jsx)(eM,{className:"h-4 w-4"})})]})]})]})}function tr({svg:e,errorItemId:s,disabled:r,onBusyChange:n}){let{t:i,language:l}=(0,x.b)(),[o,c]=(0,a.useState)(!1),[u,d]=(0,a.useState)(!1),m=(0,a.useMemo)(()=>(function(e){let t=eW(e);if(t)return t;try{let t=new DOMParser().parseFromString(e,"image/svg+xml").documentElement;return"svg"===t.nodeName?eJ(t):null}catch{return null}})(e),[e]);if((0,a.useEffect)(()=>{let e=!0;return(0,e0.v)().then(t=>{e&&c("cloud"===t)}),()=>{e=!1}},[]),!o||!m?.length)return null;let h=async()=>{d(!0),n(!0);try{await (0,e0.H)(m.map(e=>e.text),l,s),M.c.success(i.svgAnimation.voiceRegenerateDone)}catch(s){let e=(0,v.d)(s)||"";j.V.error("[SvgAnimation]","Failed to regenerate cloud voice",{code:e,error:(0,v.Z)(s)});let t=(0,v.L)(s),a="TTS_DISABLED"===e?i.svgAnimation.voiceRegenerateDisabled:i.svgAnimation.voiceRegenerateFailed;M.c.error(t?`${a} (${t})`:a)}finally{d(!1),n(!1)}};return(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:h,disabled:r||u,title:i.svgAnimation.voiceRegenerateHint,children:[u?(0,t.jsx)(g.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(eO.f,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:u?i.svgAnimation.voiceRegenerating:i.svgAnimation.voiceRegenerate})]})}function tn({errorItemId:e,svgAnimation:s,hasOtherLanguage:r,onChange:n}){let{t:i,language:l}=(0,x.b)(),[o,d]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),[y,b]=(0,a.useState)(!1),[w,N]=(0,a.useState)(!1),[k,A]=(0,a.useState)(null),S=(0,a.useMemo)(()=>!!s&&!!eW(s),[s]),C=(e,t)=>{let a=i.errors[e];return"string"==typeof a?a:t},I=async()=>{d(!0),A(null);try{let t=await p.k.post(`/api/error-items/${e}/svg-animation`,{language:l},{timeout:6e5,recoverable:!0});n(l,t.svgAnimation)}catch(t){let e=(0,v.d)(t)||"";j.V.error("[SvgAnimation]","Failed to generate SVG animation",{code:e,error:(0,v.Z)(t)}),A("NO_QUESTION_TEXT"===e?i.svgAnimation.noQuestionText:"NO_VALID_ANIMATION"===e?i.svgAnimation.invalid:C(e,i.svgAnimation.failed))}finally{d(!1)}},E=async()=>{b(!0),A(null);try{let t=await p.k.post(`/api/error-items/${e}/svg-animation/narration`,{language:l},{timeout:3e5,recoverable:!0});n(l,t.svgAnimation),M.c.success(i.svgAnimation.narrationDone)}catch(t){let e=(0,v.d)(t)||"";j.V.error("[SvgAnimation]","Failed to generate SVG narration",{code:e,error:(0,v.Z)(t)}),A("NO_VALID_NARRATION"===e?i.svgAnimation.narrationInvalid:C(e,i.svgAnimation.narrationFailed))}finally{b(!1)}},T=async()=>{if(await (0,M.u)(i.svgAnimation.confirmDelete,{destructive:!0})){h(!0);try{await p.k.delete(`/api/error-items/${e}/svg-animation?language=${l}`),n(l,null),A(null)}catch(e){j.V.error("[SvgAnimation]","Failed to delete SVG animation",{error:e instanceof Error?e.message:String(e)}),M.c.error(i.svgAnimation.deleteFailed)}finally{h(!1)}}};if(!s)return(0,t.jsxs)("div",{className:"rounded-lg border border-dashed p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,t.jsx)(eT,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:i.svgAnimation.title})]}),(0,t.jsxs)(f.f,{variant:"outline",size:"sm",onClick:I,disabled:o,children:[o?(0,t.jsx)(g.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(eT,{className:"mr-2 h-4 w-4"}),o?i.svgAnimation.generating:i.svgAnimation.generate]})]}),k&&(0,t.jsx)("p",{className:"text-xs text-destructive mt-2",children:k}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:r?i.svgAnimation.otherLanguageAvailable:i.svgAnimation.hint})]});let F=o||m||y||w;return(0,t.jsxs)("div",{className:"rounded-lg border bg-card",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 px-3 py-2 border-b bg-muted/30",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:i.svgAnimation.title}),F&&(0,t.jsx)(g.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-1",children:[(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:E,disabled:F,title:i.svgAnimation.narrationHint,children:[y?(0,t.jsx)(g.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(eI,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:y?i.svgAnimation.narrationGenerating:S?i.svgAnimation.narrationRegenerate:i.svgAnimation.narrationGenerate})]}),(0,t.jsx)(tr,{svg:s,errorItemId:e,disabled:F,onBusyChange:N}),(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:I,disabled:F,children:[o?(0,t.jsx)(g.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(c.f,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:o?i.svgAnimation.generating:i.svgAnimation.regenerate})]}),(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:T,disabled:F,children:[(0,t.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,t.jsx)("span",{children:i.svgAnimation.delete})]})]})]}),k&&(0,t.jsx)("p",{className:"px-3 pt-2 text-xs text-destructive",children:k}),(0,t.jsx)("div",{className:"p-2 sm:p-3",children:(0,t.jsx)(ts,{svg:s,errorItemId:e})})]})}var ti=e.i(912505),tl=e.i(86963),to=e.i(35209);e.s(["default",0,function(){let e=(0,r.useParams)(),i=(0,r.useRouter)(),{t:l,language:m}=(0,x.b)(),[g,h]=(0,a.useState)(null);(0,to.f)(l.detail.title,g?.subject?.name,g?.shortId);let[v,w]=(0,a.useState)(!0),[N,k]=(0,a.useState)(null),[A,S]=(0,a.useState)(!1),[C,I]=(0,a.useState)(void 0),[E,T]=(0,a.useState)(!1),[F,L]=(0,a.useState)(!0),[R,V]=(0,a.useState)(null),[O,D]=(0,a.useState)(!1),U=(0,a.useCallback)(async e=>{try{let t=await p.k.get(`/api/error-items/${e}`);h(t)}catch(e){j.V.error("[ErrorDetail]","Failed to fetch error item",{error:e}),M.c.error(l.common?.messages?.loadFailed||"Failed to load item"),i.push("/notebooks")}finally{w(!1)}},[i,l]);(0,a.useEffect)(()=>{p.k.get("/api/user").then(e=>{e&&e.educationStage&&I(e.educationStage),T(!!e?.enableGeogebra),L(e?.enableSvgAnimation!==!1)}).catch(e=>j.V.error("[ErrorDetail]","Failed to fetch user info",{error:e})),e.id&&U(e.id)},[e.id,U]);let q=(0,a.useCallback)(e=>{h(t=>t&&{...t,...e})},[]),_=async e=>{g&&(await p.k.put(`/api/error-items/${g.id}`,e),q(e))},P=async()=>{g&&await U(g.id)},H=async e=>{if(!g)return;let t=g.difficultyStars??null;q({difficultyStars:e}),D(!0);try{let t=await p.k.put(`/api/error-items/${g.id}`,{difficultyStars:e});q({paperLevel:t.paperLevel})}catch(e){q({difficultyStars:t}),j.V.error("[ErrorDetail]","Failed to save difficulty",{error:e}),M.c.error(l.difficulty.saveFailed)}finally{D(!1)}},G=(0,a.useCallback)((e,t)=>{q({["en"===e?"svgAnimationEn":"svgAnimation"]:t})},[q]),B=async()=>{if(g&&await (0,M.u)(l.common?.messages?.confirmDelete||"Are you sure you want to delete this error item?",{destructive:!0}))try{await p.k.delete(`/api/error-items/${g.id}/delete`),M.c.success(l.common?.messages?.deleteSuccess||"Deleted successfully"),i.push(g.subjectId?`/notebooks/${g.subjectId}`:"/notebooks")}catch(e){j.V.error("[ErrorDetail]","Failed to delete error item",{error:e}),M.c.error(l.common?.messages?.deleteFailed||"Delete failed")}};return v?(0,t.jsx)(tl.f,{label:l.common.loading}):g?(0,t.jsxs)("main",{className:"min-h-screen",children:[(0,t.jsxs)("div",{className:"mx-auto max-w-6xl space-y-6 px-4 py-6 md:px-8 md:py-8",children:[(0,t.jsxs)("div",{className:"flex flex-col md:flex-row justify-between items-start md:items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-2",children:[(0,t.jsx)(s.default,{href:g.subjectId?`/notebooks/${g.subjectId}`:"/notebooks",children:(0,t.jsx)(f.f,{variant:"ghost",size:"icon",className:"-ml-2",children:(0,t.jsx)(n.f,{className:"h-5 w-5"})})}),(0,t.jsx)("h1",{className:"text-2xl font-bold tracking-tight",children:l.detail.title}),(0,t.jsx)(eS,{shortId:g.shortId}),(0,t.jsx)(d.f,{size:"md",value:g.difficultyStars,onChange:H,disabled:O})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(ej,{errorItemId:g.id,fields:g,onDone:q}),(0,t.jsx)(s.default,{href:`/practice?id=${g.id}`,children:(0,t.jsxs)(f.f,{variant:"outline",size:"sm",children:[(0,t.jsx)(c.f,{className:"mr-2 h-4 w-4"}),l.detail.practice]})}),R&&(0,t.jsx)(eb.x,{status:R,className:"h-8 self-center px-3"}),(0,t.jsxs)(f.f,{variant:"ghost",size:"sm",onClick:B,className:"text-red-600 dark:text-red-400 hover:text-red-700 dark:hover:text-red-300 hover:bg-red-50 dark:hover:bg-red-950/40",children:[(0,t.jsx)(u.f,{className:"mr-2 h-4 w-4"}),l.detail.delete||"Delete"]})]})]}),(0,t.jsx)(eo,{item:g,educationStage:C,saveFields:_,onUpdate:q,reload:P,onEnlarge:k}),(0,t.jsx)(ey.K,{errorItemId:g.id,onMasteryStatusChange:V}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsx)(z,{title:l.detail.correctAnswer,value:g.answerText,onSave:e=>_({answerText:e}),logLabel:"answer",rows:5,placeholder:"Enter answer...",cardClassName:"border-primary/20",titleClassName:"text-primary",contentClassName:"font-semibold",headerActions:(0,t.jsx)(eN,{errorItemId:g.id,onDone:e=>q({answerText:e.answerText??"",analysis:e.analysis??""})}),children:g.referenceImageUrl&&(0,t.jsx)("div",{className:"pt-3",children:(0,t.jsx)(el,{src:g.referenceImageUrl,alt:l.detail.referenceImageAlt,showLabel:l.detail.viewImage,hideLabel:l.detail.hideImage,visible:A,onVisibleChange:S,onEnlarge:k})})}),(0,t.jsx)(ed,{item:g,saveFields:_,onEnlarge:k})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsx)(z,{title:l.detail.analysis,value:g.analysis,onSave:e=>_({analysis:e}),logLabel:"analysis",rows:12,placeholder:"Enter analysis..."}),(0,t.jsx)(z,{title:l.detail?.mistakeAnalysis||"Mistake Analysis",value:g.mistakeAnalysis,onSave:e=>_({mistakeAnalysis:e}),logLabel:"mistake analysis",rows:8,editorLabel:l.editor?.mistakeAnalysis||"Mistake Cause Analysis",emptyText:l.detail?.noMistakeAnalysis||"No mistake analysis yet."})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[F&&(0,t.jsx)(tn,{errorItemId:g.id,svgAnimation:"en"===m?g.svgAnimationEn:g.svgAnimation,hasOtherLanguage:!!("en"===m?g.svgAnimation:g.svgAnimationEn),onChange:G},m),E&&(0,t.jsx)(y,{errorItemId:g.id,commands:g.geogebraCommands,onUpdate:q}),(0,t.jsx)($,{item:g,onUpdate:q})]})]}),(0,t.jsx)(b,{src:N,onClose:()=>k(null)})]}):(0,t.jsx)(ti.f,{icon:o,title:l.detail.notFound||"Item not found",className:"m-4 md:m-8"})}],204573)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,864272,e=>{"use strict";var t=e.i(843476),a=e.i(271645),r=e.i(522016),s=e.i(618566),i=e.i(13285),n=e.i(853138),l=e.i(716327),c=e.i(456539),o=e.i(632781),d=e.i(77071),m=e.i(456420);let u={name:"undo-2",size:24,node:[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]};u.node;let h=(0,m.f)(u),p={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};p.node;let x=(0,m.f)(p),f={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};f.node;let g=(0,m.f)(f);var b=e.i(508734);let y={name:"crop",size:24,node:[["path",{d:"M6 2v14a2 2 0 0 0 2 2h14",key:"ron5a4"}],["path",{d:"M18 22V8a2 2 0 0 0-2-2H2",key:"7s9ehn"}]]};y.node;let j=(0,m.f)(y),w={name:"merge",size:24,node:[["path",{d:"m8 6 4-4 4 4",key:"ybng9g"}],["path",{d:"M12 2v10.3a4 4 0 0 1-1.172 2.872L4 22",key:"1hyw0i"}],["path",{d:"m20 22-5-5",key:"1m27yz"}]]};w.node;let v=(0,m.f)(w),k={name:"scissors",size:24,node:[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]};k.node;let N=(0,m.f)(k);var B=e.i(759659),S=e.i(411382),C=e.i(978056),z=e.i(54105),M=e.i(722219),M=M,I=e.i(772325),R=M,T=e.i(825624);let E=S.z.object({x:C.z.number().min(0).max(1),y:C.z.number().min(0).max(1),width:C.z.number().min(.01).max(1),height:C.z.number().min(.01).max(1)}).refine(e=>e.x+e.width<=1.0001&&e.y+e.height<=1.0001,{message:"REGION_OUT_OF_BOUNDS"}),$=["unclear","partial","unlocated"],D=S.z.object({key:z.z.string().regex(/^[A-Za-z0-9_-]{1,40}$/),label:z.z.string().max(20).nullable(),text:z.z.string().max(2e4),material:z.z.string().max(2e4).nullable(),section:z.z.string().max(500).nullable(),selected:M.boolean(),regions:I.z.array(E).max(4),hasFigure:M.boolean(),flags:I.z.array(R.enum($)).max($.length)}),A=["blurry","partial","truncated","tooMany"];function F(e=[]){let t=new Set(e);for(;;){let e=`q${Math.random().toString(36).slice(2,10)}`;if(!t.has(e))return e}}function H(e,t){return"image"===t?e.regions.length>0:e.text.trim().length>0}S.z.object({items:I.z.array(D).max(T.S),ignored:I.z.array(z.z.string().max(2e4)).max(200),warnings:I.z.array(R.enum(A)).max(A.length)}).superRefine((e,t)=>{let a=new Set;for(let r of e.items)a.has(r.key)&&t.addIssue({code:"custom",message:"DUPLICATE_ITEM_KEY"}),a.add(r.key)});var U=e.i(975157);function _({imageUrl:e,imageSize:a,regions:r,className:s}){let i=function(e){if(0===e.length)return null;let t=Math.min(...e.map(e=>e.x)),a=Math.min(...e.map(e=>e.y));return{x:t,y:a,width:Math.max(...e.map(e=>e.x+e.width))-t,height:Math.max(...e.map(e=>e.y+e.height))-a}}(r);if(!i)return null;let n=i.width*a.width/Math.max(1,i.height*a.height);return(0,t.jsx)("div",{className:(0,U.f)("relative w-full overflow-hidden rounded-md border bg-white",s),style:{aspectRatio:String(Math.max(.25,Math.min(8,n)))},"aria-hidden":!0,children:(0,t.jsx)("img",{src:e,alt:"",className:"absolute max-w-none select-none",draggable:!1,style:{width:`${100/i.width}%`,height:`${100/i.height}%`,left:`${-i.x/i.width*100}%`,top:`${-i.y/i.height*100}%`}})})}var O=e.i(487486),q=e.i(519455),P=e.i(257428),L=e.i(624687),K=e.i(111110);function V(e,t){return{...e,items:t}}function G(e,t){return e.items.findIndex(e=>e.key===t)}function W(e,t,a){return V(e,e.items.map(e=>{if(e.key!==t)return e;let r={...e,...a};return void 0!==a.text&&(r.text=a.text.slice(0,2e4)),void 0!==a.regions&&(r.regions=a.regions.slice(0,4),r.flags=r.regions.length>0?e.flags.filter(e=>"unlocated"!==e):[...new Set([...e.flags,"unlocated"])]),r}))}function Y(e,t,a){let r=G(e,t),s=r+a;if(r<0||s<0||s>=e.items.length)return e;let i=[...e.items];return[i[r],i[s]]=[i[s],i[r]],V(e,i)}function Q({item:e,index:r,total:s,source:i,expanded:o,onToggleExpand:d,onEdit:m,image:u,onAdjustRegion:h,highlighted:p}){let{t:f}=(0,K.b)(),y=(0,a.useRef)(null),w=H(e,i),k=`draft-item-${e.key}`;return(0,t.jsxs)("li",{id:k,className:(0,U.f)("rounded-xl border bg-card p-3 transition-colors",!e.selected&&"opacity-70",p&&"border-primary ring-2 ring-primary/30"),"data-testid":"draft-item","data-selected":e.selected,children:[(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(P.f,{className:"mt-1 h-5 w-5",checked:e.selected,disabled:!w,onCheckedChange:t=>m(a=>{var r,s;return r=e.key,s=!0===t,V(a,a.items.map(e=>e.key===r?{...e,selected:s}:e))}),"aria-label":f.importBatch.question.replace("{index}",String(r+1))}),(0,t.jsxs)("button",{type:"button",className:"min-w-0 flex-1 text-left",onClick:d,"aria-expanded":o,"aria-controls":`${k}-body`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-sm",children:[(0,t.jsx)("span",{className:"font-semibold",children:f.importBatch.question.replace("{index}",String(r+1))}),e.label&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:f.importBatch.originalLabel.replace("{label}",e.label)}),e.material&&(0,t.jsx)(O.f,{variant:"secondary",children:f.importBatch.material}),e.hasFigure&&(0,t.jsx)(O.f,{variant:"outline",children:f.importBatch.hasFigure}),e.section&&(0,t.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:e.section.split("\n")[0]})]}),!o&&e.text&&(0,t.jsx)("p",{className:"mt-1 line-clamp-3 whitespace-pre-line break-words text-sm text-muted-foreground",children:e.text}),e.flags.length>0&&(0,t.jsx)("ul",{className:"mt-1 space-y-0.5",children:e.flags.map(e=>(0,t.jsxs)("li",{className:"flex items-center gap-1 text-xs text-amber-700 dark:text-amber-300",children:[(0,t.jsx)(n.f,{className:"h-3 w-3 shrink-0"}),f.importBatch.flags[e]]},e))})]}),(0,t.jsx)(q.f,{type:"button",size:"icon",variant:"ghost",className:"h-8 w-8 shrink-0",onClick:d,"aria-label":o?f.importBatch.collapse:f.importBatch.edit,children:o?(0,t.jsx)(c.f,{className:"h-4 w-4"}):(0,t.jsx)(l.f,{className:"h-4 w-4"})})]}),u&&e.regions.length>0&&(0,t.jsx)("button",{type:"button",className:"mt-2 block w-full max-w-md pl-8",onClick:h,"aria-label":f.importBatch.adjustRegion,children:(0,t.jsx)(_,{imageUrl:u.url,imageSize:u,regions:e.regions,className:"max-h-48"})}),o&&(0,t.jsxs)("div",{id:`${k}-body`,className:"mt-3 space-y-3 pl-8",children:[e.material&&(0,t.jsxs)("div",{className:"rounded-lg bg-muted/60 p-2 text-sm",children:[(0,t.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2",children:[(0,t.jsxs)("span",{className:"text-xs font-medium",children:[f.importBatch.material," · ",f.importBatch.materialHint]}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>m(t=>W(t,e.key,{material:null})),children:f.importBatch.removeMaterial})]}),(0,t.jsx)("p",{className:"line-clamp-6 whitespace-pre-line break-words text-muted-foreground",children:e.material})]}),"text"===i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(L.f,{ref:y,"aria-label":f.importBatch.questionText,value:e.text,onChange:t=>m(a=>W(a,e.key,{text:t.target.value}),`text-${e.key}`),className:"min-h-28 font-mono text-sm"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f.importBatch.splitHint})]}):(0,t.jsxs)(t.Fragment,{children:[e.text&&(0,t.jsx)("p",{className:"whitespace-pre-line break-words text-sm text-muted-foreground",children:e.text}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:f.importBatch.imageTextHint})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:["text"===i?(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"outline",onClick:()=>{let t=y.current?.selectionStart??0;m(a=>(function(e,t,a){let r=G(e,t);if(r<0||e.items.length>=T.S)return e;let s=e.items[r],i=s.text.slice(0,a).replace(/\s+$/,""),n=s.text.slice(a).replace(/^\s+/,"");if(!i||!n)return e;let l={...s,key:F(e.items.map(e=>e.key)),label:null,text:n,regions:[],flags:s.regions.length>0?["unlocated"]:[],selected:!(s.regions.length>0)&&s.selected},c=[...e.items];return c.splice(r,1,{...s,text:i},l),V(e,c)})(a,e.key,t))},children:[(0,t.jsx)(N,{className:"mr-1 h-4 w-4"}),f.importBatch.splitHere]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"outline",onClick:h,children:[(0,t.jsx)(j,{className:"mr-1 h-4 w-4"}),e.regions.length?f.importBatch.adjustRegion:f.importBatch.locate]}),(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"outline",onClick:()=>m(t=>(function(e,t){let a=G(e,t);if(a<0||e.items.length>=T.S)return e;let r=e.items[a],s={...r,key:F(e.items.map(e=>e.key)),label:null,regions:r.regions.map(e=>({...e}))},i=[...e.items];return i.splice(a+1,0,s),V(e,i)})(t,e.key)),children:[(0,t.jsx)(b.f,{className:"mr-1 h-4 w-4"}),f.importBatch.duplicate]})]}),(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"outline",disabled:0===r,onClick:()=>m(t=>(function(e,t){let a=G(e,t);if(a<=0)return e;let r=e.items[a-1],s=e.items[a],i={...r,text:[r.text,s.text].filter(e=>e.trim()).join("\n").slice(0,2e4),material:r.material??s.material,selected:r.selected||s.selected,regions:[...r.regions,...s.regions].slice(0,4),hasFigure:r.hasFigure||s.hasFigure,flags:[...new Set([...r.flags,...s.flags])].filter(e=>"unlocated"!==e||r.regions.length+s.regions.length===0)},n=[...e.items];return n.splice(a-1,2,i),V(e,n)})(t,e.key)),children:[(0,t.jsx)(v,{className:"mr-1 h-4 w-4"}),f.importBatch.mergeUp]}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",disabled:0===r,onClick:()=>m(t=>Y(t,e.key,-1)),"aria-label":f.importBatch.moveUp,children:(0,t.jsx)(g,{className:"h-4 w-4"})}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",disabled:r===s-1,onClick:()=>m(t=>Y(t,e.key,1)),"aria-label":f.importBatch.moveDown,children:(0,t.jsx)(x,{className:"h-4 w-4"})}),(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>m(t=>{var a;return a=e.key,V(t,t.items.filter(e=>e.key!==a))}),children:[(0,t.jsx)(B.f,{className:"mr-1 h-4 w-4"}),f.importBatch.delete]})]})]})]})}var X=e.i(328623);function J({count:e,missingRegions:a,confirmBeforeImport:r,starting:s,onStart:i,onDiscard:n}){let{t:l}=(0,K.b)(),c=(r?l.importBatch.startReview:l.importBatch.startAuto).replace("{count}",String(e)),d=0===e?l.importBatch.nothingSelected:a>0?l.importBatch.needsRegion.replace("{count}",String(a)):r?l.importBatch.startHintReview:l.importBatch.startHintAuto;return(0,t.jsx)("div",{className:"fixed inset-x-0 bottom-[calc(4rem+env(safe-area-inset-bottom))] z-30 border-t bg-background/95 py-3 pl-4 pr-16 shadow-[0_-4px_12px_rgba(0,0,0,0.06)] backdrop-blur md:sticky md:bottom-4 md:rounded-xl md:border md:px-4","data-testid":"draft-start-bar",children:(0,t.jsxs)("div",{className:"mx-auto flex max-w-4xl flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground md:max-w-md","data-testid":"draft-start-hint",children:s??d}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(q.f,{type:"button",variant:"ghost",onClick:n,disabled:!!s,className:"shrink-0",children:l.importBatch.discard}),(0,t.jsxs)(q.f,{type:"button",onClick:i,disabled:0===e||!!s,className:"min-w-0 flex-1 md:flex-none","data-testid":"draft-start",children:[s?(0,t.jsx)(o.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(X.f,{className:"mr-2 h-4 w-4"}),(0,t.jsx)("span",{className:"truncate",children:c})]})]})]})})}function Z({imageUrl:e,items:r,onSelectItem:s,highlightedKey:i}){let{t:n}=(0,K.b)(),[o,d]=(0,a.useState)(!0);return(0,t.jsxs)("section",{className:"rounded-xl border bg-card p-3","data-testid":"page-image-overview",children:[(0,t.jsxs)(q.f,{type:"button",variant:"ghost",size:"sm",className:"mb-2 h-8 px-2 md:hidden",onClick:()=>d(e=>!e),"aria-expanded":o,children:[o?(0,t.jsx)(c.f,{className:"mr-1 h-4 w-4"}):(0,t.jsx)(l.f,{className:"mr-1 h-4 w-4"}),o?n.importBatch.hideImage:n.importBatch.showImage]}),(0,t.jsxs)("div",{className:(0,U.f)("relative mx-auto w-fit max-w-full",!o&&"hidden md:block"),children:[(0,t.jsx)("img",{src:e,alt:"",className:"block max-h-[70vh] max-w-full select-none rounded-md",draggable:!1}),r.map((e,a)=>e.regions.map((r,l)=>(0,t.jsx)("button",{type:"button",onClick:()=>s(e.key),className:(0,U.f)("absolute rounded-sm border-2 transition-colors",e.selected?"border-primary bg-primary/10":"border-dashed border-muted-foreground/70 bg-transparent",i===e.key&&"border-amber-500 bg-amber-400/20"),style:{left:`${100*r.x}%`,top:`${100*r.y}%`,width:`${100*r.width}%`,height:`${100*r.height}%`},"aria-label":n.importBatch.question.replace("{index}",String(a+1)),children:0===l&&(0,t.jsx)("span",{className:(0,U.f)("absolute -left-0.5 -top-0.5 rounded-br-md px-1.5 text-xs font-semibold text-white",e.selected?"bg-primary":"bg-muted-foreground"),children:a+1})},`${e.key}-${l}`)))]})]})}var ee=e.i(232660),et=e.i(776639);let ea={x:.1,y:.1,width:.8,height:.3};function er(e){return{unit:"%",x:100*e.x,y:100*e.y,width:100*e.width,height:100*e.height}}function es(e){let t={x:e.x/100,y:e.y/100,width:e.width/100,height:e.height/100};return t.width>=.01&&t.height>=.01?t:null}function ei({open:e,imageUrl:r,regions:s,onClose:i,onSave:n}){let{t:l}=(0,K.b)(),[c,o]=(0,a.useState)(()=>(s.length?s:[ea]).map(er)),[m,u]=(0,a.useState)(0),h=c[Math.min(m,c.length-1)];return(0,t.jsx)(et.N,{open:e,onOpenChange:e=>!e&&i(),children:(0,t.jsxs)(et.d,{className:"flex h-[90vh] max-w-3xl flex-col gap-0 p-0",children:[(0,t.jsxs)(et.s,{className:"shrink-0 border-b p-4",children:[(0,t.jsx)(et.F,{children:l.importBatch.regionDialogTitle}),(0,t.jsx)(et.C,{children:l.importBatch.regionDialogHint})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto bg-black p-3",children:(0,t.jsx)("div",{className:"mx-auto w-fit",children:(0,t.jsx)(ee.f,{crop:h,onChange:(e,t)=>o(e=>e.map((e,a)=>a===m?t:e)),children:(0,t.jsx)("img",{src:r,alt:"",className:"block max-h-[65vh] max-w-full",draggable:!1})})})}),(0,t.jsxs)("div",{className:"shrink-0 space-y-3 border-t p-4",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[c.map((e,a)=>(0,t.jsx)("button",{type:"button",onClick:()=>u(a),className:(0,U.f)("rounded-md border px-3 py-1 text-sm",a===m?"border-primary bg-primary/10 font-medium":"text-muted-foreground"),children:l.importBatch.regionTab.replace("{index}",String(a+1))},a)),c.length<4&&(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"ghost",onClick:()=>{o(e=>[...e,er(ea)]),u(c.length)},children:[(0,t.jsx)(d.f,{className:"mr-1 h-4 w-4"}),l.importBatch.addRegion]}),c.length>1&&(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"ghost",className:"text-destructive",onClick:()=>{o(e=>e.filter((e,t)=>t!==m)),u(0)},children:[(0,t.jsx)(B.f,{className:"mr-1 h-4 w-4"}),l.importBatch.removeRegion]})]}),(0,t.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,t.jsx)(q.f,{type:"button",variant:"outline",onClick:i,children:l.common.cancel}),(0,t.jsx)(q.f,{type:"button",onClick:()=>{let e=c.map(es).filter(e=>null!==e);e.length&&n(e)},children:l.importBatch.saveRegion})]})]})]})})}function en({source:e,draft:r,onEdit:s,onUndo:i,canUndo:m,saveState:u,image:p,confirmBeforeImport:x,starting:f,onStart:g,onDiscard:b,hasConflictCopy:y,onRestoreConflict:j,onDismissConflict:w}){let{t:v}=(0,K.b)(),[k,N]=(0,a.useState)(null),[B,S]=(0,a.useState)(null),[C,z]=(0,a.useState)(null),[M,I]=(0,a.useState)(!1),R=r.items.filter(t=>t.selected&&H(t,e)),E=r.items.length>0&&r.items.every(t=>t.selected||!H(t,e)),$=r.items.filter(t=>t.selected&&!H(t,e)).length;return(0,t.jsxs)("div",{className:"space-y-4 pb-36 md:pb-24",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsxs)("p",{className:"text-base font-semibold","data-testid":"draft-summary",children:[v.importBatch.detected.replace("{count}",String(r.items.length)),(0,t.jsx)("span",{className:"mx-2 text-muted-foreground",children:"·"}),v.importBatch.selected.replace("{count}",String(R.length))]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)("span",{className:"mr-2 flex items-center gap-1 text-xs text-muted-foreground","aria-live":"polite","data-testid":"draft-save-state","data-state":u,children:["saving"===u&&(0,t.jsx)(o.f,{className:"h-3 w-3 animate-spin"}),v.importBatch.save[u]]}),(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"ghost",disabled:!m,onClick:i,children:[(0,t.jsx)(h,{className:"mr-1 h-4 w-4"}),v.importBatch.undo]}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",onClick:()=>s(t=>(function(e,t,a=()=>!0){return V(e,e.items.map(e=>({...e,selected:t&&a(e)})))})(t,!E,t=>H(t,e))),children:E?v.importBatch.selectNone:v.importBatch.selectAll})]})]}),y&&(0,t.jsxs)("div",{className:"space-y-2 rounded-lg border border-primary/40 bg-primary/5 p-3 text-sm",role:"status","data-testid":"draft-conflict",children:[(0,t.jsx)("p",{children:v.importBatch.conflictKept}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(q.f,{type:"button",size:"sm",onClick:j,children:v.importBatch.restoreMine}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",onClick:w,children:v.importBatch.discardMine})]})]}),r.warnings.length>0&&(0,t.jsx)("ul",{className:"space-y-1 rounded-lg border border-amber-300 bg-amber-50 p-3 text-sm text-amber-900 dark:border-amber-700 dark:bg-amber-950/40 dark:text-amber-200",children:r.warnings.map(e=>(0,t.jsxs)("li",{className:"flex items-start gap-2",children:[(0,t.jsx)(n.f,{className:"mt-0.5 h-4 w-4 shrink-0"}),v.importBatch.warnings[e]]},e))}),p&&(0,t.jsx)(Z,{imageUrl:p.url,items:r.items,onSelectItem:e=>{S(e),N(e),document.getElementById(`draft-item-${e}`)?.scrollIntoView({behavior:"smooth",block:"center"})},highlightedKey:B}),0===r.items.length?(0,t.jsx)("p",{className:"rounded-xl border border-dashed p-6 text-center text-sm text-muted-foreground",children:v.importBatch.emptyDraft}):(0,t.jsx)("ol",{className:"space-y-3",children:r.items.map((a,i)=>(0,t.jsx)(Q,{item:a,index:i,total:r.items.length,source:e,expanded:k===a.key,onToggleExpand:()=>N(e=>e===a.key?null:a.key),onEdit:s,image:p,onAdjustRegion:()=>z({key:a.key,regions:a.regions}),highlighted:B===a.key},a.key))}),p&&(0,t.jsxs)(q.f,{type:"button",variant:"outline",size:"sm",onClick:()=>z({key:null,regions:[]}),children:[(0,t.jsx)(d.f,{className:"mr-1 h-4 w-4"}),v.importBatch.addQuestion]}),r.ignored.length>0&&(0,t.jsxs)("section",{className:"rounded-xl border p-3",children:[(0,t.jsxs)("button",{type:"button",className:"flex w-full items-center justify-between text-left text-sm font-medium",onClick:()=>I(e=>!e),"aria-expanded":M,children:[v.importBatch.ignoredTitle.replace("{count}",String(r.ignored.length)),M?(0,t.jsx)(c.f,{className:"h-4 w-4"}):(0,t.jsx)(l.f,{className:"h-4 w-4"})]}),M&&(0,t.jsxs)("div",{className:"mt-2 space-y-2",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:v.importBatch.ignoredHint}),(0,t.jsx)("ul",{className:"space-y-2",children:r.ignored.map((e,a)=>(0,t.jsxs)("li",{className:"flex items-start gap-2 rounded-lg bg-muted/50 p-2 text-sm",children:[(0,t.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words text-muted-foreground",children:e}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"outline",className:"h-7 shrink-0",onClick:()=>s(e=>(function(e,t){let a=e.ignored[t];if(void 0===a||e.items.length>=T.S)return e;let r={key:F(e.items.map(e=>e.key)),label:null,text:a,material:null,section:null,selected:!0,regions:[],hasFigure:!1,flags:[]};return{...e,items:[...e.items,r],ignored:e.ignored.filter((e,a)=>a!==t)}})(e,a)),children:v.importBatch.addAsQuestion})]},`${a}-${e.slice(0,20)}`))})]})]}),(0,t.jsx)(J,{count:R.length,missingRegions:$,confirmBeforeImport:x,starting:f,onStart:g,onDiscard:b}),p&&C&&(0,t.jsx)(ei,{open:!0,imageUrl:p.url,regions:C.regions,onClose:()=>z(null),onSave:e=>{let t=C.key;s(a=>t?W(a,t,{regions:e,selected:!0}):function(e,t){if(e.items.length>=T.S)return e;let a={key:F(e.items.map(e=>e.key)),label:null,text:"",material:null,section:null,selected:!0,regions:[t],hasFigure:!1,flags:[]};return{...e,items:[...e.items,a]}}(a,e[0])),z(null)}})]})}var el=e.i(399847),ec=e.i(395925);function eo({batch:e,busy:a,onRetry:r,onDiscard:s}){let{t:i}=(0,K.b)(),n=i.errors,l=e.error?"string"==typeof n[e.error]?n[e.error]:e.error:null;return"splitting"===e.phase?(0,t.jsxs)("section",{className:"flex items-start gap-3 rounded-xl border bg-card p-4",role:"status","data-testid":"batch-splitting",children:[(0,t.jsx)(o.f,{className:"mt-0.5 h-5 w-5 shrink-0 animate-spin text-primary"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("p",{className:"font-medium",children:i.importBatch.phase.splitting}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i.importBatch.splittingHint}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",onClick:s,children:i.importBatch.discard})]})]}):(0,t.jsxs)("section",{className:"flex items-start gap-3 rounded-xl border border-destructive/40 bg-card p-4","data-testid":"batch-failed",children:[(0,t.jsx)(el.f,{className:"mt-0.5 h-5 w-5 shrink-0 text-destructive"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)("p",{className:"font-medium",children:i.importBatch.phase.failed}),l&&(0,t.jsx)("p",{className:"text-sm text-destructive",children:l}),"image"===e.source&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i.importBatch.manualFallback}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsxs)(q.f,{type:"button",size:"sm",onClick:r,disabled:a,children:[(0,t.jsx)(ec.f,{className:"mr-1 h-4 w-4"}),i.importBatch.retrySplit]}),(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"ghost",onClick:s,children:i.importBatch.discard})]})]})]})}var ed=e.i(551757),em=e.i(615568),eu=e.i(168148);let eh={analyzing:.5,saving:.9,review:1,saved:1,failed:1};function ep({task:e}){let{t:a}=(0,K.b)(),r=a.importBatch.itemStatus;if("saved"===e.status){let a=e.errorItemId?e.duplicate?r.duplicate:r.saved:r.deleted;return(0,t.jsxs)("span",{className:"flex items-center gap-1 text-green-700 dark:text-green-300",children:[(0,t.jsx)(ed.f,{className:"h-4 w-4"}),a]})}return"failed"===e.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-destructive",children:[(0,t.jsx)(el.f,{className:"h-4 w-4"}),r.failed]}):"review"===e.status?(0,t.jsxs)("span",{className:"flex items-center gap-1 text-primary",children:[(0,t.jsx)(em.f,{className:"h-4 w-4"}),r.review]}):(0,t.jsxs)("span",{className:"flex items-center gap-1 text-muted-foreground",children:[(0,t.jsx)(o.f,{className:"h-4 w-4 animate-spin"}),r[e.status]]})}function ex({batch:e,image:a,busy:s,onRetryFailed:i,onRetryOne:n,onConfirmAll:l}){let{t:c}=(0,K.b)(),{counts:o}=e,d=o.total-o.active,m=o.total?Math.round(e.tasks.reduce((e,t)=>e+eh[t.status],0)/o.total*100):0,u=new Map((e.draft?.items??[]).map((e,t)=>[e.key,{item:e,index:t}])),h=c.errors;return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("section",{className:"space-y-3 rounded-xl border bg-card p-4","data-testid":"batch-progress","data-phase":e.phase,children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-base font-semibold",children:c.importBatch.progress.replace("{done}",String(d)).replace("{total}",String(o.total))}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.importTasks.stageEstimate})]}),(0,t.jsx)(eu.f,{value:m,"aria-label":c.importTasks.stageEstimate,"aria-valuetext":c.common.progress.estimated.replace("{percent}",String(m)),className:"h-2"}),(0,t.jsxs)("ul",{className:"flex flex-wrap gap-x-4 gap-y-1 text-sm","data-testid":"batch-counts",children:[(0,t.jsx)("li",{className:"text-green-700 dark:text-green-300",children:c.importBatch.counts.saved.replace("{count}",String(o.saved-o.duplicate))}),o.duplicate>0&&(0,t.jsx)("li",{className:"text-muted-foreground",children:c.importBatch.counts.duplicate.replace("{count}",String(o.duplicate))}),o.review>0&&(0,t.jsx)("li",{className:"text-primary",children:c.importBatch.counts.review.replace("{count}",String(o.review))}),o.failed>0&&(0,t.jsx)("li",{className:"text-destructive",children:c.importBatch.counts.failed.replace("{count}",String(o.failed))}),o.active>0&&(0,t.jsx)("li",{className:"text-muted-foreground",children:c.importBatch.counts.active.replace("{count}",String(o.active))})]}),o.active>0&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.importBatch.leaveHint}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[o.failed>0&&(0,t.jsxs)(q.f,{type:"button",size:"sm",onClick:i,disabled:s,children:[(0,t.jsx)(ec.f,{className:"mr-1 h-4 w-4"}),c.importBatch.retryFailed.replace("{count}",String(o.failed))]}),o.review>0&&(0,t.jsx)(q.f,{type:"button",size:"sm",variant:"outline",onClick:l,disabled:s,children:c.importBatch.confirmAll.replace("{count}",String(o.review))})]})]}),(0,t.jsx)("ol",{className:"space-y-3",children:e.tasks.map(e=>{let i=u.get(e.batchItemKey??""),l=e.error?"string"==typeof h[e.error]?h[e.error]:e.error:null;return(0,t.jsxs)("li",{className:(0,U.f)("flex gap-3 rounded-xl border bg-card p-3 text-sm",e.unread&&"review"===e.status&&"border-primary/50"),"data-testid":"batch-task","data-status":e.status,children:[a&&i&&i.item.regions.length>0&&(0,t.jsx)(_,{imageUrl:a.url,imageSize:a,regions:i.item.regions,className:"w-20 shrink-0 self-start sm:w-28"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:c.importBatch.question.replace("{index}",String((i?.index??0)+1))}),(0,t.jsx)(ep,{task:e})]}),(0,t.jsx)("p",{className:"line-clamp-2 break-words text-muted-foreground",children:e.excerpt||i?.item.text}),"saved"===e.status&&e.errorItemId&&!e.duplicate&&e.notebookName&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:c.importTasks.savedTo.replace("{notebook}",e.notebookName).replace("{id}",e.errorItemShortId||"-")}),l&&"failed"===e.status&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:l}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 pt-1",children:["review"===e.status&&(0,t.jsx)(q.f,{asChild:!0,size:"sm",children:(0,t.jsx)(r.default,{href:`/import-tasks/${e.id}`,children:c.importBatch.review})}),"saved"===e.status&&e.errorItemId&&(0,t.jsx)(q.f,{asChild:!0,size:"sm",variant:"outline",children:(0,t.jsx)(r.default,{href:`/error-items/${e.errorItemId}`,children:c.importBatch.viewItem})}),"failed"===e.status&&(0,t.jsxs)(q.f,{type:"button",size:"sm",variant:"outline",onClick:()=>n(e),disabled:s,children:[(0,t.jsx)(ec.f,{className:"mr-1 h-3 w-3"}),c.importTasks.retry]})]})]})]},e.id)})})]})}var ef=e.i(912505),eg=e.i(393842),eb=e.i(86963),ey=e.i(61425),ej=e.i(213761);async function ew(e){let t=new Image;if(t.decoding="async",t.src=e,await t.decode(),!t.naturalWidth||!t.naturalHeight)throw Error("IMAGE_EMPTY");return t}async function ev(e,t){let a=e.naturalWidth,r=e.naturalHeight,s=t.map(e=>(function(e,t=.008){let a=Math.max(0,e.x-t),r=Math.max(0,e.y-t);return{x:a,y:r,width:Math.min(1,e.x+e.width+t)-a,height:Math.min(1,e.y+e.height+t)-r}})(e));if(1===s.length)return(0,ej.X)({source:e,width:a,height:r},s[0]);let i=s.map(e=>({sx:Math.round(e.x*a),sy:Math.round(e.y*r),sw:Math.max(1,Math.round(e.width*a)),sh:Math.max(1,Math.round(e.height*r))})),n=document.createElement("canvas");n.width=Math.max(...i.map(e=>e.sw)),n.height=i.reduce((e,t)=>e+t.sh,0)+16*(i.length-1);let l=n.getContext("2d");if(!l)throw Error("CANVAS_UNSUPPORTED");l.fillStyle="#ffffff",l.fillRect(0,0,n.width,n.height);let c=0;for(let t of i)l.drawImage(e,t.sx,t.sy,t.sw,t.sh,0,c,t.sw,t.sh),c+=t.sh+16;let o=await createImageBitmap(n);try{return await (0,ej.X)({source:o,width:n.width,height:n.height})}finally{o.close()}}var ek=e.i(294114),eN=e.i(201276),eB=e.i(575557),eS=e.i(116331),eC=e.i(35209),ez=e.i(364002);e.s(["default",0,function(){let e=(0,s.useParams)(),n=(0,s.useRouter)(),l=e.id,{t:c}=(0,K.b)();(0,eC.f)(c.importBatch.title);let o=function(e,t={}){let[r,s]=(0,a.useState)(null),[i,n]=(0,a.useState)(!1),[l,c]=(0,a.useState)(null),[o,d]=(0,a.useState)("saved"),m=(0,a.useRef)([]),[u,h]=(0,a.useState)(!1),p=(0,a.useRef)(0),x=(0,a.useRef)(0),f=(0,a.useRef)(0),g=(0,a.useRef)(null),b=(0,a.useRef)(null),y=(0,a.useRef)(null),j=(0,a.useRef)(async()=>!0),[w,v]=(0,a.useState)(null),k=(0,a.useRef)(t.onConflict);(0,a.useEffect)(()=>{k.current=t.onConflict},[t.onConflict]);let N=(0,a.useCallback)((e,t=!1)=>{s(t=>t&&!e.imageData&&t.imageData&&t.id===e.id?{...e,imageData:t.imageData}:e);let a=x.current!==f.current;(t||!a||"draft"!==e.status)&&(null!==g.current&&e.version!==p.current&&(m.current=[],h(!1)),p.current=e.version,g.current=e.draft,c(e.draft),f.current=x.current,d("saved"))},[]),B=(0,a.useCallback)(async()=>{if("u"<typeof document||"hidden"!==document.visibilityState)try{N(await (0,eB.w)(e)),n(!1)}catch(e){e?.status===404&&n(!0)}},[e,N]);(0,a.useEffect)(()=>{let t=!1;(0,eB.w)(e,{image:!0}).then(e=>{t||N(e,!0)}).catch(e=>{t||e?.status!==404||n(!0)});let a=(0,eS.E)(()=>void B());return()=>{t=!0,a()}},[e,N,B]);let S=r?.phase==="splitting"||r?.phase==="processing";(0,a.useEffect)(()=>{if(!S)return;let e=setInterval(()=>void B(),2500);return()=>clearInterval(e)},[S,B]);let C=(0,a.useCallback)(async()=>{let t=x.current;d("saving");try{let a=await (0,eB.S)(e,p.current,g.current);return p.current=a.version,f.current=t,s(e=>e?{...a,imageData:e.imageData}:a),d(x.current===t?"saved":"dirty"),"ok"}catch(t){let e=(0,eB.n)(t);if(e){let t=g.current;return"draft"===e.status&&t&&v(t),N(e,!0),k.current?.(),"conflict"}return d("error"),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>void j.current(),5e3),"error"}},[e,N]),z=(0,a.useCallback)(async()=>{for(y.current&&(clearTimeout(y.current),y.current=null);;){let e=b.current??(b.current=(async()=>{try{for(;x.current!==f.current&&g.current;)if(await C()!=="ok")return!1;return!0}finally{b.current=null}})());if(!await e)return!1;if(x.current===f.current)return!0}},[C]);(0,a.useEffect)(()=>{j.current=z},[z]),(0,a.useEffect)(()=>{let e=()=>{"hidden"===document.visibilityState&&x.current!==f.current&&z()};return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",e),()=>{document.removeEventListener("visibilitychange",e),window.removeEventListener("pagehide",e)}},[z]),(0,a.useEffect)(()=>()=>{y.current&&clearTimeout(y.current)},[]);let M=(0,a.useCallback)(e=>{g.current=e,c(e),x.current+=1,d("dirty"),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>void z(),800)},[z]),I=(0,a.useRef)(null),R=(0,a.useCallback)((e,t)=>{let a=g.current;if(!a)return;let r=e(a);if(r===a)return;let s=Date.now(),i=t&&I.current?.group===t&&s-I.current.at<1500;I.current=t?{group:t,at:s}:null,i||(m.current=[...m.current.slice(-29),a],h(!0)),M(r)},[M]),T=(0,a.useCallback)(()=>{let e=m.current.pop();I.current=null,h(m.current.length>0),e&&M(e)},[M]),E=(0,a.useCallback)(()=>{v(null),w&&R(()=>w)},[w,R]);return{batch:r,draft:l,notFound:i,saveState:o,refresh:B,save:z,edit:R,undo:T,canUndo:u,conflictCopy:w,restoreConflictCopy:E,dismissConflictCopy:()=>v(null),version:()=>p.current,replace:e=>N(e,!0)}}(l,{onConflict:()=>ek.c.info(c.importBatch.conflict)}),{batch:d,draft:m,notFound:u}=o,h=function(e){let[t,r]=(0,a.useState)(null);return(0,a.useEffect)(()=>{if(!e)return;let t=!1,a=new Image;return a.onload=()=>{t||r({url:e,width:a.naturalWidth,height:a.naturalHeight})},a.src=e,()=>{t=!0}},[e]),t&&t.url===e?t:null}(d?.source==="image"?d.imageData:null),[p,x]=(0,a.useState)(null),[f,g]=(0,a.useState)(null),[b,y]=(0,a.useState)(!1),j=(0,a.useRef)(null);if((0,a.useEffect)(()=>{(0,ez.x)().then(x)},[]),(0,a.useEffect)(()=>{d?.unread&&j.current!==`${d.id}:${d.phase}:${d.counts.active}`&&(j.current=`${d.id}:${d.phase}:${d.counts.active}`,(0,eB.f)(d.id).catch(e=>eN.V.warn("[ImportBatch]","Mark read failed",{error:e})))},[d]),u)return(0,t.jsx)("main",{className:"mx-auto max-w-3xl px-4 py-6 md:px-8 md:py-8",children:(0,t.jsx)(ef.f,{icon:i.f,title:c.importBatch.notFound,action:(0,t.jsx)(r.default,{href:"/import-tasks",children:(0,t.jsx)(q.f,{children:c.importTasks.viewTasks})})})});if(!d||null===p||"image"===d.source&&"draft"===d.status&&!h)return(0,t.jsx)(eb.f,{});let w=async e=>{y(!0);try{await e()}catch(t){let e=(0,eB.n)(t);e?(o.replace(e),ek.c.info(c.importBatch.conflict)):ek.c.error((0,ey.f)(t,c))}finally{y(!1)}},v=async()=>{if(m){g(c.importBatch.submitting);try{let e;if(!await o.save())return;if("image"===d.source){if(!d.imageData)throw Error("IMAGE_EMPTY");let t=await ew(d.imageData),a=m.items.filter(e=>e.selected&&H(e,"image"));e=[];let r=0;for(let s of a){g(c.importBatch.cropping.replace("{done}",String(e.length+1)).replace("{total}",String(a.length)));let i=await ev(t,s.regions);r+=i.bytes,e.push({key:s.key,imageBase64:i.dataUrl,imageInfo:{outputWidth:i.width,outputHeight:i.height,outputBytes:i.bytes,quality:i.quality}})}if(e.reduce((e,t)=>e+t.imageBase64.length,0)>0x3c00000)return void ek.c.error(c.errors.IMPORT_BATCH_TOO_LARGE);g(c.importBatch.uploadingImages.replace("{count}",String(e.length)).replace("{size}",`${(r/1024/1024).toFixed(1)}MB`))}o.replace(await (0,eB.g)(d.id,o.version(),e)),window.scrollTo({top:0})}catch(t){eN.V.error("[ImportBatch]","Start failed",{error:t});let e=(0,eB.n)(t);e?(o.replace(e),ek.c.info(c.importBatch.conflict)):ek.c.error((0,ey.f)(t,c))}finally{g(null)}}},k=async()=>{await (0,ek.u)(c.importBatch.discardConfirm)&&await w(async()=>{await (0,eB.o)(d.id),ek.c.success(c.importBatch.discarded),n.push("/import-tasks")})},N=()=>w(async()=>{o.replace(await (0,eB.s)(d.id)),ek.c.info(c.importTasks.retried)}),B=`${c.importBatch.source[d.source]} \xb7 ${c.importBatch.phase[d.phase]}`;return(0,t.jsxs)("main",{className:"mx-auto max-w-4xl space-y-4 px-4 py-6 md:px-8 md:py-8",children:[(0,t.jsx)(eg.f,{backHref:"/import-tasks",title:c.importBatch.title,description:B}),"splitting"===d.phase||"failed"===d.phase?(0,t.jsx)(eo,{batch:d,busy:b,onRetry:N,onDiscard:k}):"draft"===d.status&&m?(0,t.jsx)(en,{source:d.source,draft:m,onEdit:o.edit,onUndo:o.undo,canUndo:o.canUndo,saveState:o.saveState,image:h,confirmBeforeImport:p,starting:f,onStart:v,onDiscard:k,hasConflictCopy:!!o.conflictCopy,onRestoreConflict:o.restoreConflictCopy,onDismissConflict:o.dismissConflictCopy}):(0,t.jsx)(ex,{batch:d,image:h,busy:b,onRetryFailed:N,onRetryOne:e=>w(async()=>{await (0,eS.R)(e.id),ek.c.info(c.importTasks.retried),await o.refresh()}),onConfirmAll:()=>w(async()=>{let e=await (0,eB.J)(d.id);o.replace(e.batch),ek.c.success(c.importBatch.confirmAllDone.replace("{count}",String(e.saved)))})})]})}],864272)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,470152,e=>{function t(e,[r,n]){return Math.min(n,Math.max(r,e))}(0,Object.defineProperty)(t,"name",{value:"clamp",configurable:!0}),e.s(["f",0,t])},75830,586318,e=>{var t=e.i(271645),r=e.i(30030),n=e.i(820783),o=e.i(991918),i=e.i(843476),l=e.i(934620),a=Object.defineProperty,s=(e,t)=>a(e,"name",{value:t,configurable:!0});function u(e){let l=e+"CollectionProvider",[a,u]=(0,r.f)(l),[c,f]=a(l,{collectionRef:{current:null},itemMap:new Map}),d=s(e=>{let{scope:r,children:n}=e,o=t.useRef(null),l=t.useRef(new Map).current;return(0,i.jsx)(c,{scope:r,itemMap:l,collectionRef:o,children:n})},"CollectionProvider");d.displayName=l;let p=e+"CollectionSlot",h=(0,o.B)(p),m=t.forwardRef((e,t)=>{let{scope:r,children:o}=e,l=f(p,r),a=(0,n.f)(t,l.collectionRef);return(0,i.jsx)(h,{ref:a,children:o})});m.displayName=p;let g=e+"CollectionItemSlot",y="data-radix-collection-item",w=(0,o.B)(g),x=t.forwardRef((e,r)=>{let{scope:o,children:l,...a}=e,s=t.useRef(null),u=(0,n.f)(r,s),c=f(g,o);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>void c.itemMap.delete(s))),(0,i.jsx)(w,{...{[y]:""},ref:u,children:l})});function v(r){let n=f(e+"CollectionConsumer",r);return t.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${y}]`));return Array.from(n.itemMap.values()).sort((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current))},[n.collectionRef,n.itemMap])}return x.displayName=g,s(v,"useCollection"),[{Provider:d,Slot:m,ItemSlot:x},v,u]}s(u,"createCollection");var c=new WeakMap,f=class e extends Map{static{s(this,"OrderedDict")}#e;constructor(e){super(e),this.#e=[...super.keys()],c.set(this,!0)}set(e,t){return c.get(this)&&!this.has(e)&&this.#e.push(e),super.set(e,t),this}insert(e,t,r){let n=this.has(t),o=n?this.size:this.size+1,i=h(e),l=i>=0?Math.min(i,o-1):Math.max(o+i,0);if(n?this.#e.indexOf(t)===l:l===this.size)return this.set(t,r),this;let a=this.#e.filter(e=>e!==t);a.splice(l,0,t);let s=a.map(e=>[e,e===t?r:this.get(e)]);for(let[e,t]of(this.clear(),s))this.set(e,t);return this}with(t,r,n){let o=new e(this);return o.insert(t,r,n),o}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,r){let n=this.#e.indexOf(e);if(-1===n)return this;let o=this.#e.indexOf(t);return this.insert(-1!==o&&o<n?n-1:n,t,r)}after(e){let t=this.#e.indexOf(e);if(-1!==(t=-1===t||t===this.size-1?-1:t+1))return this.entryAt(t)}setAfter(e,t,r){let n=this.#e.indexOf(e);if(-1===n)return this;let o=this.#e.indexOf(t);return this.insert(-1!==o&&o<=n?n:n+1,t,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return void 0!==t&&this.delete(t)}at(e){let t=d(this.#e,e);if(void 0!==t)return this.get(t)}entryAt(e){let t=d(this.#e,e);if(void 0!==t)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return d(this.#e,e)}from(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.at(n)}keyFrom(e,t){let r=this.indexOf(e);if(-1===r)return;let n=r+t;return n<0&&(n=0),n>=this.size&&(n=this.size-1),this.keyAt(n)}find(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return n;r++}}findIndex(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return r;r++}return -1}filter(t,r){let n=[],o=0;for(let e of this)Reflect.apply(t,r,[e,o,this])&&n.push(e),o++;return new e(n)}map(t,r){let n=[],o=0;for(let e of this)n.push([e[0],Reflect.apply(t,r,[e,o,this])]),o++;return new e(n)}reduce(...e){let[t,r]=e,n=e.length>1;if(!n&&0===this.size)throw TypeError("Reduce of empty OrderedDict with no initial value");let o=0,i=r;for(let e of this)i=0!==o||n?Reflect.apply(t,this,[i,e,o,this]):e,o++;return i}reduceRight(...e){let[t,r]=e,n=e.length>1;if(!n&&0===this.size)throw TypeError("Reduce of empty OrderedDict with no initial value");let o=r;for(let e=this.size-1;e>=0;e--){let r=this.entryAt(e);o=e!==this.size-1||n?Reflect.apply(t,this,[o,r,e,this]):r}return o}sort(e){if("function"!=typeof e)throw TypeError("OrderedDict.sort requires a compare function");let t=[...this.entries()].sort(e);for(let[e,r]of(this.clear(),t))this.set(e,r);return this}toSorted(t){if("function"!=typeof t)throw TypeError("OrderedDict.toSorted requires a compare function");return new e([...this.entries()].sort(t))}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let r=this.keyAt(e),n=this.get(r);t.set(r,n)}return t}toSpliced(...t){let r=[...this.entries()];return r.splice(...t),new e(r)}slice(t,r){let n=new e;for(let e of this.#e.slice(t,r))n.set(e,this.get(e));return n}every(e,t){let r=0;for(let n of this){if(!Reflect.apply(e,t,[n,r,this]))return!1;r++}return!0}some(e,t){let r=0;for(let n of this){if(Reflect.apply(e,t,[n,r,this]))return!0;r++}return!1}};function d(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let r=p(e,t);return -1===r?void 0:e[r]}function p(e,t){let r=e.length,n=h(t),o=n>=0?n:r+n;return o<0||o>=r?-1:o}function h(e){return e!=e||0===e?0:Math.trunc(e)}function m(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null==e||null==t)return!1;let r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n of r)if(!Object.prototype.hasOwnProperty.call(t,n)||e[n]!==t[n])return!1;return!0}function g(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function y(e){let t;for(let r of e.keys()){if(t){let e=t.compareDocumentPosition(r);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=r}return!0}function w(e,t){return e[1].element&&t[1].element?g(e[1].element,t[1].element)?-1:1:0}function x(e){return new MutationObserver(t=>{for(let r of t)if("childList"===r.type)return void e()})}s(d,"at"),s(p,"toSafeIndex"),s(h,"toSafeInteger"),s(function(e){let a=e+"CollectionProvider",[u,c]=(0,r.f)(a),[d,p]=u(a);d.displayName=e+"CollectionStableContextProvider";let[h,g]=u(a);h.displayName=e+"CollectionStatefulContextProvider";let v=s(({state:e,...t})=>e?(0,i.jsx)(S,{...t,state:e}):(0,i.jsx)(b,{...t}),"CollectionProvider");v.displayName=a;let b=s(e=>{let t=E();return(0,i.jsx)(S,{...e,state:t})},"CollectionInit");b.displayName=e+"CollectionInit";let S=s(e=>{let{scope:r,children:o,state:l}=e,a=t.useRef(null),[s,u]=t.useState(null),c=(0,n.f)(a,u),[p,m]=l,g=t.useRef(new f),v=t.useCallback(()=>{let e=g.current;return y(e)||e.sort(w),e},[]);return t.useEffect(()=>{if(!s)return;let e=x(()=>{m(e=>{let t=e.toSorted(w);return t.some(([t],r)=>e.keyAt(r)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,m]),(0,i.jsx)(d,{scope:r,collectionElementRef:c,collectionElementRefObject:a,getCollection:v,setCollection:m,registryRef:g,children:(0,i.jsx)(h,{scope:r,collectionElement:s,collection:p,children:o})})},"CollectionProviderImpl");S.displayName=e+"CollectionProviderImpl";let C=e+"CollectionSlot",R=(0,o.B)(C),P=t.forwardRef((e,t)=>{let{scope:r,children:o}=e,l=p(C,r),a=(0,n.f)(t,l.collectionElementRef);return(0,i.jsx)(R,{ref:a,children:o})});P.displayName=C;let j=e+"CollectionItemSlot",O=(0,o.B)(j),T=t.forwardRef((e,r)=>{let{scope:o,children:a,...s}=e,u=t.useRef(null),{setCollection:c,registryRef:d}=p(j,o),h=t.useRef(s);m(h.current,s)||(h.current=s);let g=h.current,y=t.useCallback(e=>{let t=d.current;e?t.set(e,{...h.current,element:e}):u.current&&t.delete(u.current)},[d]),x=(0,n.f)(r,y,u);(0,l.f)(()=>{let e=u.current,t=d.current;e&&t.has(e)&&t.set(e,{...g,element:e})},[g,d]);let v=t.useRef(null);return t.useEffect(()=>{let e=u.current,t=v.current;((t?.element??null)!==e||e&&t?.itemData!==g)&&(v.current=e?{element:e,itemData:g}:null,c(r=>{let n=new f(r);return t&&t.element!==e&&n.delete(t.element),e&&n.set(e,{...g,element:e}),n.sort(w)}))}),t.useEffect(()=>()=>{let e=v.current;v.current=null,e&&c(t=>{if(!t.has(e.element))return t;let r=new f(t);return r.delete(e.element),r})},[c]),(0,i.jsx)(O,{"data-radix-collection-item":"",ref:x,children:a})});function E(){return t.useState(new f)}function A(t){let{collection:r}=g(e+"CollectionConsumer",t);return r}function k(t){let{getCollection:r}=p(e+"CollectionConsumer",t);return r}return T.displayName=j,s(E,"useInitCollection"),s(A,"useCollection"),s(k,"useGetCollection"),[{Provider:v,Slot:P,ItemSlot:T},{createCollectionScope:c,useCollection:A,useGetCollection:k,useInitCollection:E}]},"createCollection"),s(m,"shallowEqual"),s(g,"isElementPreceding"),s(y,"isInDocumentOrder"),s(w,"sortByDocumentPosition"),s(x,"getChildListObserver"),e.s(["f",0,u],75830);var v=Object.defineProperty,b=t.createContext(void 0);function S(e){let r=t.useContext(b);return e||r||"ltr"}v(S,"name",{value:"useDirection",configurable:!0}),e.s(["f",0,S],586318)},853660,e=>{let t;var r=e.i(271645);let n=["top","right","bottom","left"],o=Math.min,i=Math.max,l=Math.round,a=Math.floor,s=e=>({x:e,y:e}),u={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,t){return"function"==typeof e?e(t):e}function f(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let y=["left","right"],w=["right","left"],x=["top","bottom"],v=["bottom","top"];function b(e){let t=f(e);return u[t]+e.slice(t.length)}function S(e){var t,r,n,o;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(r=e.right)?r:0,bottom:null!=(n=e.bottom)?n:0,left:null!=(o=e.left)?o:0}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function R(e,t,r){let n,{reference:o,floating:i}=e,l=m(t),a=p(m(t)),s=h(a),u=f(t),c=o.x+o.width/2-i.width/2,g=o.y+o.height/2-i.height/2,y=o[s]/2-i[s]/2;switch(u){case"top":n={x:c,y:o.y-i.height};break;case"bottom":n={x:c,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:g};break;case"left":n={x:o.x-i.width,y:g};break;default:n={x:o.x,y:o.y}}let w=d(t);return w&&(n[a]+=y*("end"===w?1:-1)*(r&&"y"===l?-1:1)),n}async function P(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=c(t,e),m=S(h),g=a[p?"floating"===d?"reference":"floating":d],y=C(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),w="floating"===d?{x:n,y:o,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),v=await (null==i.isElement?void 0:i.isElement(x))&&await (null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},b=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:s}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}let j=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:l}=r,a=l.detectOverflow?l:{...l,detectOverflow:P},s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=R(u,n,s),d=n,p=0,h={};for(let r=0;r<i.length;r++){let m=i[r];if(!m)continue;let{name:g,fn:y}=m,{x:w,y:x,data:v,reset:b}=await y({x:c,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=w?w:c,f=null!=x?x:f,h[g]={...h[g],...v},b&&p<50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:c,y:f}=R(u,d,s)),r=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:h}};function O(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function T(e){return n.some(t=>e[t]>=0)}let E=new Set(["left","top"]);async function A(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),l=f(r),a=d(r),s="y"===m(r),u=E.has(l)?-1:1,p=i&&s?-1:1,h=c(t,e),{mainAxis:g,crossAxis:y,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(y="end"===a?-1*w:w),s?{x:y*p,y:g*u}:{x:g*u,y:y*p}}function k(){return"u">typeof window}function D(e){return N(e)?(e.nodeName||"").toLowerCase():"#document"}function I(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(N(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function N(e){return!!k()&&(e instanceof Node||e instanceof I(e).Node)}function M(e){return!!k()&&(e instanceof Element||e instanceof I(e).Element)}function H(e){return!!k()&&(e instanceof HTMLElement||e instanceof I(e).HTMLElement)}function V(e){return!(!k()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof I(e).ShadowRoot)}function B(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=q(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&"inline"!==o&&"contents"!==o}function F(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let z=/transform|translate|scale|rotate|perspective|filter/,_=/paint|layout|strict|content/,W=e=>!!e&&"none"!==e;function U(e){let t=M(e)?q(e):e;return W(t.transform)||W(t.translate)||W(t.scale)||W(t.rotate)||W(t.perspective)||!$()&&(W(t.backdropFilter)||W(t.filter))||z.test(t.willChange||"")||_.test(t.contain||"")}function $(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function K(e){return/^(html|body|#document)$/.test(D(e))}function q(e){return I(e).getComputedStyle(e)}function Y(e){return M(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function X(e){if("html"===D(e))return e;let t=e.assignedSlot||e.parentNode||V(e)&&e.host||L(e);return V(t)?t.host:t}function G(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=X(t);return K(r)?(t.ownerDocument||t).body:H(r)&&B(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),l=I(o);if(!i)return t.concat(o,G(o,[],r));{let e=Z(l);return t.concat(l,l.visualViewport||[],B(o)?o:[],e&&r?G(e):[])}}function Z(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J(e){let t=q(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=H(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=l(r)!==i||l(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Q(e){return M(e)?e:e.contextElement}function ee(e){let t=Q(e);if(!H(t))return s(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=J(t),a=(i?l(r.width):r.width)/n,u=(i?l(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let et=s(0);function er(e){let t=I(e);return $()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:et}function en(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),l=Q(e),a=s(1);t&&(n?M(n)&&(a=ee(n)):a=ee(e));let u=(void 0===(o=r)&&(o=!1),n&&o&&n===I(l))?er(l):s(0),c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(l&&n){let e=I(l),t=M(n)?I(n):n,r=e,o=Z(r);for(;o&&t!==r;){let e=ee(o),t=o.getBoundingClientRect(),n=q(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,p*=e.y,c+=i,f+=l,o=Z(r=I(o))}}return C({width:d,height:p,x:c,y:f})}function eo(e,t){let r=Y(e).scrollLeft;return t?t.left+r:en(L(e)).left+r}function ei(e,t){let r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-eo(e,r),y:r.top+t.scrollTop}}function el(e,t,r){var n;let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,r){void 0===r&&(r="viewport");let n="layoutViewport"===r,o=I(e),i=L(e),l=o.visualViewport,a=i.clientWidth,s=i.clientHeight,u=0,c=0;if(l){let e=!$()||"fixed"===t;n?e||(u=-l.offsetLeft,c=-l.offsetTop):(a=l.width,s=l.height,e&&(u=l.offsetLeft,c=l.offsetTop))}if(0>=eo(i)){let e=i.ownerDocument,t=e.body,r=getComputedStyle(t),n="CSS1Compat"===e.compatMode&&parseFloat(r.marginLeft)+parseFloat(r.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-n),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?o/2:o;l<=25&&(a-=l)}return{width:a,height:s,x:u,y:c}}(e,r,t);else if("document"===t){let t,r,l,a,s,u;t=Y(n=L(e)),r=n.ownerDocument.body,l=i(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),a=i(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight),s=-t.scrollLeft+eo(n),u=-t.scrollTop,"rtl"===q(r).direction&&(s+=i(n.clientWidth,r.clientWidth)-l),o={width:l,height:a,x:s,y:u}}else if(M(t)){let e,n,i,l,a,s;n=(e=en(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,l=ee(t),a=t.clientWidth*l.x,s=t.clientHeight*l.y,o={width:a,height:s,x:i*l.x,y:n*l.y}}else{let r=er(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return C(o)}function ea(e){return"static"===q(e).position}function es(e,t){if(!H(e)||"fixed"===q(e).position)return null;if(t)return t(e);let r=e.offsetParent;return L(e)===r&&(r=r.ownerDocument.body),r}function eu(e,t){var r;let n=I(e);if(F(e))return n;if(!H(e)){let t=X(e);for(;t&&!K(t);){if(M(t)&&!ea(t))return t;t=X(t)}return n}let o=es(e,t);for(;o&&(r=o,/^(table|td|th)$/.test(D(r)))&&ea(o);)o=es(o,t);return o&&K(o)&&ea(o)&&!U(o)?n:o||function(e){let t=X(e);for(;H(t)&&!K(t);){if(U(t))return t;if(F(t))break;t=X(t)}return null}(e)||n}let ec=async function(e){let t=this.getOffsetParent||eu,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=H(t),o=L(t),i="fixed"===r,l=en(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=s(0);if((n||!i)&&(("body"!==D(t)||B(o))&&(a=Y(t)),n)){let e=en(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!n&&o&&(u.x=eo(o));let c=!o||n||i?s(0):ei(o,a);return{x:l.left+a.scrollLeft-u.x-c.x,y:l.top+a.scrollTop-u.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},ef={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,l=L(n),a=!!t&&F(t.floating);if(n===l||a&&i)return r;let u={scrollLeft:0,scrollTop:0},c=s(1),f=s(0),d=H(n);if((d||!i)&&(("body"!==D(n)||B(l))&&(u=Y(n)),d)){let e=en(n);c=ee(n),f.x=e.x+n.clientLeft,f.y=e.y+n.clientTop}let p=!l||d||i?s(0):ei(l,u);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:r.y*c.y-u.scrollTop*c.y+f.y+p.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:l}=e,a=[..."clippingAncestors"===r?F(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=G(e,[],!1).filter(e=>M(e)&&"body"!==D(e)),o=null,i="fixed"===q(e).position,l=i?X(e):e;for(;M(l)&&!K(l);){let e=q(l),t=U(l),r=o?o.position:i?"fixed":"";t||"fixed"!==r&&("absolute"!==r||"static"!==e.position)?o=e:n=n.filter(e=>e!==l),l=X(l)}return t.set(e,n),n}(t,this._c):[].concat(r),n],s=el(t,a[0],l),u=s.top,c=s.right,f=s.bottom,d=s.left;for(let e=1;e<a.length;e++){let r=el(t,a[e],l);u=i(r.top,u),c=o(r.right,c),f=o(r.bottom,f),d=i(r.left,d)}return{width:c-d,height:f-u,x:d,y:u}},getOffsetParent:eu,getElementRects:ec,getClientRects:function(e){return e.getClientRects?Array.from(e.getClientRects()):[]},getDimensions:function(e){let{width:t,height:r}=J(e);return{width:t,height:r}},getScale:ee,isElement:M,isRTL:function(e){return"rtl"===q(e).direction}};function ed(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ep=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:l,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:g,padding:y=0}=c(e,t)||{};if(null==g)return{};let w=S(y),x={x:r,y:n},v=p(m(l)),b=h(v),C=await s.getDimensions(g),R="y"===v,P=R?"clientHeight":"clientWidth",j=a.reference[b]+a.reference[v]-x[v]-a.floating[b],O=x[v]-a.reference[v],T=await (null==s.getOffsetParent?void 0:s.getOffsetParent(g)),E=T?T[P]:0;E&&await (null==s.isElement?void 0:s.isElement(T))||(E=u.floating[P]||a.floating[b]);let A=E/2-C[b]/2-1,k=o(w[R?"top":"left"],A),D=o(w[R?"bottom":"right"],A),I=E-C[b]-D,L=E/2-C[b]/2+(j/2-O/2),N=i(k,o(L,I)),M=!f.arrow&&null!=d(l)&&L!==N&&a.reference[b]/2-(L<k?k:D)-C[b]/2<0,H=M?L<k?L-k:L-I:0;return{[v]:x[v]+H,data:{[v]:N,centerOffset:L-N-H,...M&&{alignmentOffset:H}},reset:M}}});var eh=e.i(174080),em="u">typeof document?r.useLayoutEffect:function(){};function eg(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!eg(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!eg(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function ey(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ew(e,t){let r=ey(e);return Math.round(t*r)/r}function ex(e){let t=r.useRef(e);return em(()=>{t.current=e}),t}var ev=e.i(248425),eb=e.i(843476),eS=Object.defineProperty,eC=r.forwardRef(eS(function(e,t){let{children:r,width:n=10,height:o=5,...i}=e;return(0,eb.jsx)(ev.V.svg,{...i,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:(0,eb.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"name",{value:"Arrow",configurable:!0})),eR=e.i(820783),eP=e.i(30030),ej=e.i(30207),eO=e.i(934620),eT=e.i(635804),eE=Object.defineProperty,eA=(e,t)=>eE(e,"name",{value:t,configurable:!0}),ek="partial",eD="Popper",[eI,eL]=(0,eP.f)(eD),[eN,eM]=eI(eD),eH=eA(e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null),[l,a]=r.useState(void 0);return(0,eb.jsx)(eN,{scope:t,anchor:o,onAnchorChange:i,placementState:l,setPlacementState:a,children:n})},"Popper"),eV=r.forwardRef(eA(function(e,t){let{__scopePopper:n,virtualRef:o,...i}=e,l=eM("PopperAnchor",n),a=r.useRef(null),s=l.onAnchorChange,u=r.useCallback(e=>{a.current=e,e&&s(e)},[s]),c=(0,eR.f)(t,u),f=r.useRef(null);r.useEffect(()=>{if(!o)return;let e=f.current;f.current=o.current,e!==f.current&&s(f.current)});let d=l.placementState&&eq(l.placementState),p=d?.[0],h=d?.[1];return o?null:(0,eb.jsx)(ev.V.div,{"data-radix-popper-side":p,"data-radix-popper-align":h,...i,ref:c})},"PopperAnchor")),eB="PopperContent",[eF,ez]=eI(eB),e_=r.forwardRef(eA(function(e,t){var n,l,s,u,S,C,R,P,k,D,N,M,H;let V,B,F,z,_,W,{__scopePopper:U,side:$="bottom",sideOffset:K=0,align:q="center",alignOffset:Y=0,arrowPadding:X=0,avoidCollisions:Z=!0,collisionBoundary:J=[],collisionPadding:ee=0,sticky:et=ek,hideWhenDetached:er=!1,updatePositionStrategy:eo="optimized",onPlaced:ei,...el}=e,ea=eM(eB,U),[es,eu]=r.useState(null),ec=(0,eR.f)(t,eu),[eS,eC]=r.useState(null),eP=(0,eT.f)(eS),eE=eP?.width??0,eD=eP?.height??0,eI="number"==typeof ee?ee:{top:0,right:0,bottom:0,left:0,...ee},eL=Array.isArray(J)?J:[J],eN=eL.length>0,eH={padding:eI,boundary:eL.filter(e$),altBoundary:eN},{refs:eV,floatingStyles:ez,placement:e_,isPositioned:eW,middlewareData:eU}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[f,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=r.useState(o);eg(p,o)||h(o);let[m,g]=r.useState(null),[y,w]=r.useState(null),x=r.useCallback(e=>{e!==C.current&&(C.current=e,g(e))},[]),v=r.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),b=l||m,S=a||y,C=r.useRef(null),R=r.useRef(null),P=r.useRef(f),O=null!=u,T=ex(u),E=ex(i),A=ex(c),k=r.useCallback(()=>{var e,r;let o,i,l;if(!C.current||!R.current)return;let a={placement:t,strategy:n,middleware:p};E.current&&(a.platform=E.current),(e=C.current,r=R.current,o=new Map,i=null!=a?a:{},l={...ef,...i.platform,_c:o},j(e,r,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==A.current};D.current&&!eg(P.current,t)&&(P.current=t,eh.flushSync(()=>{d(t)}))})},[p,t,n,E,A]);em(()=>{!1===c&&P.current.isPositioned&&(P.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let D=r.useRef(!1);em(()=>(D.current=!0,()=>{D.current=!1}),[]),em(()=>{if(b&&(C.current=b),S&&(R.current=S),b&&S){if(T.current)return T.current(b,S,k);k()}},[b,S,k,T,O]);let I=r.useMemo(()=>({reference:C,floating:R,setReference:x,setFloating:v}),[x,v]),L=r.useMemo(()=>({reference:b,floating:S}),[b,S]),N=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!L.floating)return e;let t=ew(L.floating,f.x),r=ew(L.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ey(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,L.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:k,refs:I,elements:L,floatingStyles:N}),[f,k,I,L,N])}({strategy:"fixed",placement:$+("center"!==q?"-"+q:""),whileElementsMounted:eA((...e)=>(function(e,t,r,n){let l;void 0===n&&(n={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,p=Q(e),h=s||u?[...p?G(p):[],...t?G(t):[]]:[];h.forEach(e=>{s&&e.addEventListener("scroll",r),u&&e.addEventListener("resize",r)});let m=p&&f?function(e,t,r){let n,l=null,s=L(e);function u(){var e;clearTimeout(n),null==(e=l)||e.disconnect(),l=null}function c(r,f){void 0===r&&(r=!1),void 0===f&&(f=1),u();let d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=d;if(r||t(),!m||!g)return;let y={rootMargin:-a(h)+"px "+-a(s.clientWidth-(p+m))+"px "+-a(s.clientHeight-(h+g))+"px "+-a(p)+"px",threshold:i(0,o(1,f))||1},w=!0;function x(t){let r=t[0].intersectionRatio;if(!ed(d,e.getBoundingClientRect()))return c();if(r!==f){if(!w)return c();r?c(!1,r):n=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{l=new IntersectionObserver(x,{...y,root:s.ownerDocument})}catch(e){l=new IntersectionObserver(x,y)}l.observe(e)}let f=I(e),d=()=>c(r);return f.addEventListener("resize",d),c(!0),()=>{f.removeEventListener("resize",d),u()}}(p,r,u):null,g=-1,y=null;c&&(y=new ResizeObserver(e=>{let[n]=e;n&&n.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),r()}),p&&!d&&y.observe(p),t&&y.observe(t));let w=d?en(e):null;return d&&function t(){let n=en(e);w&&!ed(w,n)&&r(),w=n,l=requestAnimationFrame(t)}(),r(),()=>{var e;h.forEach(e=>{s&&e.removeEventListener("scroll",r),u&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(l)}})(...e,{animationFrame:"always"===eo}),"whileElementsMounted"),elements:{reference:ea.anchor},middleware:[{name:(V={name:"offset",options:l=n={mainAxis:K+eD,alignmentAxis:Y},async fn(e){var t,r;let{x:n,y:o,placement:i,middlewareData:a}=e,s=await A(e,l);return i===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:n+s.x,y:o+s.y,data:{...s,placement:i}}}}).name,fn:V.fn,options:[n,void 0]},Z&&{name:(B={name:"shift",options:S=u={mainAxis:!0,crossAxis:!1,...et===ek?{limiter:{fn:(s=void 0,{options:s={},fn(e){var t,r,n,o;let{x:i,y:l,placement:a,rects:u,middlewareData:d}=e,{offset:h=0,mainAxis:g=!0,crossAxis:y=!0}=c(s,e),w={x:i,y:l},x=m(a),v=p(x),b=w[v],S=w[x],C=c(h,e),R="number"==typeof C?{mainAxis:C,crossAxis:0}:{mainAxis:null!=(t=C.mainAxis)?t:0,crossAxis:null!=(r=C.crossAxis)?r:0};if(g){let e="y"===v?"height":"width",t=u.reference[v]-u.floating[e]+R.mainAxis,r=u.reference[v]+u.reference[e]-R.mainAxis;b<t?b=t:b>r&&(b=r)}if(y){let e="y"===v?"width":"height",t=E.has(f(a)),r=u.reference[x]-u.floating[e]+(t&&(null==(n=d.offset)?void 0:n[x])||0)+(t?0:R.crossAxis),i=u.reference[x]+u.reference[e]+(t?0:(null==(o=d.offset)?void 0:o[x])||0)-(t?R.crossAxis:0);S<r?S=r:S>i&&(S=i)}return{[v]:b,[x]:S}}}).fn,options:[void 0,void 0]}}:{},...eH},async fn(e){let{x:t,y:r,placement:n,platform:l}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...f}=c(S,e),d={x:t,y:r},h=await l.detectOverflow(e,f),g=m(n),y=p(g),w=d[y],x=d[g],v=(e,t)=>i(t+h["y"===e?"top":"left"],o(t,t-h["y"===e?"bottom":"right"]));a&&(w=v(y,w)),s&&(x=v(g,x));let b=u.fn({...e,[y]:w,[g]:x});return{...b,data:{x:b.x-t,y:b.y-r,enabled:{[y]:a,[g]:s}}}}}).name,fn:B.fn,options:[u,void 0]},Z&&{name:(F={name:"flip",options:R=C={...eH},async fn(e){var t,r,n,o,i,l,a,s;let u,S,C,{placement:P,middlewareData:j,rects:O,initialPlacement:T,platform:E,elements:A}=e,{mainAxis:k=!0,crossAxis:D=!0,fallbackPlacements:I,fallbackStrategy:L="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:M=!0,...H}=c(R,e);if(null!=(t=j.arrow)&&t.alignmentOffset)return{};let V=f(P),B=m(T),F=f(T)===T,z=await (null==E.isRTL?void 0:E.isRTL(A.floating)),_=I||(F||!M?[b(T)]:(u=b(T),[g(T),u,g(u)])),W="none"!==N;!I&&W&&_.push(...(S=d(T),C=function(e,t,r){switch(e){case"top":case"bottom":if(r)return t?w:y;return t?y:w;case"left":case"right":return t?x:v;default:return[]}}(f(T),"start"===N,z),S&&(C=C.map(e=>e+"-"+S),M&&(C=C.concat(C.map(g)))),C));let U=[T,..._],$=await E.detectOverflow(e,H),K=[],q=(null==(r=j.flip)?void 0:r.overflows)||[];if(k&&K.push($[V]),D){let e,t,r,n,o=(l=P,a=O,void 0===(s=z)&&(s=!1),e=d(l),r=h(t=p(m(l))),n="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[r]>a.floating[r]&&(n=b(n)),[n,b(n)]);K.push($[o[0]],$[o[1]])}if(q=[...q,{placement:P,overflows:K}],!K.every(e=>e<=0)){let e=((null==(n=j.flip)?void 0:n.index)||0)+1,t=U[e];if(t&&("alignment"!==D||B===m(t)||q.every(e=>m(e.placement)!==B||e.overflows[0]>0)))return{data:{index:e,overflows:q},reset:{placement:t}};let r=null==(o=q.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(L){case"bestFit":{let e=null==(i=q.filter(e=>{if(W){let t=m(e.placement);return t===B||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(r=e);break}case"initialPlacement":r=T}if(P!==r)return{reset:{placement:r}}}return{}}}).name,fn:F.fn,options:[C,void 0]},{name:(z={name:"size",options:k=P={...eH,apply:eA(({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:i}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${r}px`),l.setProperty("--radix-popper-available-height",`${n}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)},"apply")},async fn(e){let t,r,{placement:n,rects:l,platform:a,elements:s}=e,{apply:u=()=>{},...p}=c(k,e),h=await a.detectOverflow(e,p),g=f(n),y=d(n),w="y"===m(n),{width:x,height:v}=l.floating;"top"===g||"bottom"===g?(t=g,r=y===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(r=g,t="end"===y?"top":"bottom");let b=v-h.top-h.bottom,S=x-h.left-h.right,C=o(v-h[t],b),R=o(x-h[r],S),P=e.middlewareData.shift,j=!P,O=C,T=R;null!=P&&P.enabled.x&&(T=S),null!=P&&P.enabled.y&&(O=b),j&&!y&&(w?T=x-2*i(h.left,h.right):O=v-2*i(h.top,h.bottom)),await u({...e,availableWidth:T,availableHeight:O});let E=await a.getDimensions(s.floating);return x!==E.width||v!==E.height?{reset:{rects:!0}}:{}}}).name,fn:z.fn,options:[P,void 0]},eS&&{name:(_={name:"arrow",options:N=D={element:eS,padding:X},fn(e){let{element:t,padding:r}="function"==typeof N?N(e):N;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ep({element:t.current,padding:r}).fn(e):{}:t?ep({element:t,padding:r}).fn(e):{}}}).name,fn:_.fn,options:[D,void 0]},eK({arrowWidth:eE,arrowHeight:eD}),er&&{name:(W={name:"hide",options:H=M=eN?{strategy:"referenceHidden",...eH}:{strategy:"referenceHidden",padding:eH.padding,altBoundary:eH.altBoundary},async fn(e){let{rects:t,platform:r}=e,{strategy:n="referenceHidden",...o}=c(H,e);switch(n){case"referenceHidden":{let n=O(await r.detectOverflow(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:T(n)}}}case"escaped":{let n=O(await r.detectOverflow(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:T(n)}}}default:return{}}}}).name,fn:W.fn,options:[M,void 0]}]}),eY=ea.setPlacementState;(0,eO.f)(()=>(eY(e_),()=>{eY(void 0)}),[e_,eY]);let[eX,eG]=eq(e_),eZ=(0,ej.f)(ei);(0,eO.f)(()=>{eW&&eZ?.()},[eW,eZ]);let eJ=eU.arrow?.x,eQ=eU.arrow?.y,e0=eU.arrow?.centerOffset!==0,[e1,e2]=r.useState();return(0,eO.f)(()=>{es&&e2(window.getComputedStyle(es).zIndex)},[es]),(0,eb.jsx)("div",{ref:eV.setFloating,"data-radix-popper-content-wrapper":"",style:{...ez,transform:eW?ez.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:e1,"--radix-popper-transform-origin":[eU.transformOrigin?.x,eU.transformOrigin?.y].join(" "),...eU.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eb.jsx)(eF,{scope:U,placedSide:eX,placedAlign:eG,onArrowChange:eC,arrowX:eJ,arrowY:eQ,shouldHideArrow:e0,children:(0,eb.jsx)(ev.V.div,{"data-side":eX,"data-align":eG,...el,ref:ec,style:{...el.style,animation:eW?el.style?.animation:"none"}})})})},"PopperContent")),eW={top:"bottom",right:"left",bottom:"top",left:"right"},eU=r.forwardRef(eA(function(e,t){let{__scopePopper:r,...n}=e,o=ez("PopperArrow",r),i=eW[o.placedSide];return(0,eb.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,eb.jsx)(eC,{...n,ref:t,style:{...n.style,display:"block"}})})},"PopperArrow"));function e$(e){return null!==e}eA(e$,"isNotNull");var eK=eA(e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[s,u]=eq(r),c={start:"0%",center:"50%",end:"100%"}[u],f=(o.arrow?.x??0)+l/2,d=(o.arrow?.y??0)+a/2,p="",h="";return"bottom"===s?(p=i?c:`${f}px`,h=`${-a}px`):"top"===s?(p=i?c:`${f}px`,h=`${n.floating.height+a}px`):"right"===s?(p=`${-a}px`,h=i?c:`${d}px`):"left"===s&&(p=`${n.floating.width+a}px`,h=i?c:`${d}px`),{data:{x:p,y:h}}}}),"transformOrigin");function eq(e){let[t,r="center"]=e.split("-");return[t,r]}eA(eq,"getSideAndAlignFromPlacement"),e.s(["g",0,eV,"j",0,eU,"c",0,e_,"F",0,eH,"y",0,eL],853660)},967489,e=>{var t=e.i(843476),r=e.i(271645),n=e.i(174080),o=e.i(470152),i=e.i(981140),l=e.i(75830),a=e.i(820783),s=e.i(30030),u=e.i(586318),c=e.i(726330),f=e.i(303536),d=e.i(765491),p=e.i(610772),h=e.i(853660),m=e.i(774606),g=e.i(296626),y=e.i(248425),w=e.i(991918),x=e.i(30207),v=e.i(369340),b=e.i(934620),S=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),C=e.i(186312),R=e.i(985369),P=Object.defineProperty,j=(e,t)=>P(e,"name",{value:t,configurable:!0}),O=[" ","Enter","ArrowUp","ArrowDown"],T=[" ","Enter"],E="Select",[A,k,D]=(0,l.f)(E),[I,L]=(0,s.f)(E,[D,h.y]),N=(0,h.y)(),[M,H]=I(E),[V,B]=I(E);function F(e){let{__scopeSelect:n,children:o,open:i,defaultOpen:l,onOpenChange:a,value:s,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:g,disabled:y,required:w,form:x,internal_do_not_use_render:b}=e,S=N(n),[C,R]=r.useState(null),[P,O]=r.useState(null),[T,k]=r.useState(!1),D=(0,u.f)(d),[I,L]=(0,v.f)({prop:i,defaultProp:l??!1,onChange:a,caller:E}),[H,B]=(0,v.f)({prop:s,defaultProp:c,onChange:f,caller:E}),F=r.useRef(null),z=r.useRef(!1),[_,W]=r.useState(null),U=j(e=>{W({value:e,hasConsumerStoppedPropagation:z.current}),B(e)},"handleUserSelect"),$=r.useRef(H);r.useEffect(()=>{let e=x?C?.ownerDocument.getElementById(x):C?.form;if(e instanceof HTMLFormElement){let t=j(()=>B($.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[x,C,B]);let K=!C||!!x||!!C.closest("form"),[q,Y]=r.useState(new Set),X=(0,p.f)(),G=Array.from(q).map(e=>e.props.value).join(";"),Z=r.useCallback(e=>{Y(t=>new Set(t).add(e))},[]),J=r.useCallback(e=>{Y(t=>{let r=new Set(t);return r.delete(e),r})},[]),Q={required:w,trigger:C,onTriggerChange:R,valueNode:P,onValueNodeChange:O,valueNodeHasChildren:T,onValueNodeHasChildrenChange:k,contentId:X,value:H,onValueChange:B,hasConsumerStoppedPropagationRef:z,userSelection:_,onUserSelect:U,open:I,onOpenChange:L,dir:D,triggerPointerDownPosRef:F,disabled:y,name:m,autoComplete:g,form:x,nativeOptions:q,nativeSelectKey:G,isFormControl:K};return(0,t.jsx)(h.F,{...S,children:(0,t.jsx)(M,{scope:n,...Q,children:(0,t.jsx)(A.Provider,{scope:n,children:(0,t.jsx)(V,{scope:n,onNativeOptionAdd:Z,onNativeOptionRemove:J,children:eR(b)?b(Q):o})})})})}j(F,"SelectProvider");var z=j(e=>{let{__scopeSelect:r,children:n,...o}=e;return(0,t.jsx)(F,{__scopeSelect:r,...o,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[n,e?(0,t.jsx)(eC,{__scopeSelect:r}):null]})})},"Select"),_=r.forwardRef(j(function(e,n){let{__scopeSelect:o,disabled:l=!1,...s}=e,u=N(o),c=H("SelectTrigger",o),f=c.disabled||l,d=(0,a.f)(n,c.onTriggerChange),p=k(o),m=r.useRef("touch"),[g,w,x]=ej(e=>{let t=p().filter(e=>!e.disabled),r=t.find(e=>e.value===c.value),n=eO(t,e,r);void 0!==n&&c.onUserSelect(n.value)}),v=j(e=>{f||(c.onOpenChange(!0),x()),e&&(c.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},"handleOpen");return(0,t.jsx)(h.g,{asChild:!0,...u,children:(0,t.jsx)(y.V.button,{type:"button",role:"combobox","aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":eP(c.value)?"":void 0,...s,ref:d,onClick:(0,i.f)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&v(e)}),onPointerDown:(0,i.f)(s.onPointerDown,e=>{m.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(v(e),e.preventDefault())}),onKeyDown:(0,i.f)(s.onKeyDown,e=>{let t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||(c.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),w(e.key)),(!t||" "!==e.key)&&O.includes(e.key)&&(v(),e.preventDefault())})})})},"SelectTrigger")),W=r.forwardRef(j(function(e,n){let{__scopeSelect:o,className:i,style:l,children:s,placeholder:u="",...c}=e,f=H("SelectValue",o),{onValueNodeHasChildrenChange:d}=f,p=void 0!==s,h=(0,a.f)(n,f.onValueNodeChange);(0,b.f)(()=>{d(p)},[d,p]);let m=eP(f.value);return(0,t.jsx)(y.V.span,{...c,asChild:!m&&c.asChild,ref:h,style:{pointerEvents:"none"},children:(0,t.jsx)(r.Fragment,{children:m?u:s},m?"placeholder":"value")})},"SelectValue")),U=r.forwardRef(j(function(e,r){let{__scopeSelect:n,children:o,...i}=e;return(0,t.jsx)(y.V.span,{"aria-hidden":!0,...i,ref:r,children:o||"▼"})},"SelectIcon")),[$,K]=I("SelectPortal",{forceMount:void 0}),q=j(e=>{let{__scopeSelect:r,forceMount:n,...o}=e;return(0,t.jsx)($,{scope:e.__scopeSelect,forceMount:n,children:(0,t.jsx)(m.f,{asChild:!0,...o})})},"SelectPortal"),Y="SelectContent",X=r.forwardRef(j(function(e,n){let o=K(Y,e.__scopeSelect),{forceMount:i=o.forceMount,...l}=e,a=H(Y,e.__scopeSelect),[s,u]=r.useState();return(0,b.f)(()=>{u(new DocumentFragment)},[]),(0,t.jsx)(g.f,{present:i||a.open,children:({present:e})=>e?(0,t.jsx)(ee,{...l,ref:n}):(0,t.jsx)(G,{...l,fragment:s})})},"SelectContent")),G=r.forwardRef(j(function(e,r){let{__scopeSelect:o,children:i,fragment:l}=e;return l?n.createPortal((0,t.jsx)(Z,{scope:o,children:(0,t.jsx)(A.Slot,{scope:o,children:(0,t.jsx)("div",{ref:r,children:i})})}),l):null},"SelectContentFragment")),[Z,J]=I(Y),Q=(0,w.B)("SelectContent.RemoveScroll"),ee=r.forwardRef(j(function(e,n){let{__scopeSelect:o}=e,{position:l="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:p,side:h,sideOffset:m,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:x,collisionPadding:v,sticky:b,hideWhenDetached:S,avoidCollisions:P,...O}=e,T=H(Y,o),[E,A]=r.useState(null),[D,I]=r.useState(null),L=(0,a.f)(n,A),[N,M]=r.useState(null),[V,B]=r.useState(null),F=k(o),[z,_]=r.useState(!1),W=r.useRef(!1),U=r.useRef(!1),$=r.useRef(!1);r.useEffect(()=>{if(E)return(0,C.f)(E)},[E]),(0,f.f)();let K=r.useCallback(e=>{let[t,...r]=F().map(e=>e.ref.current),[n]=r.slice(-1),o=document.activeElement;for(let r of e)if(r===o||(r?.scrollIntoView({block:"nearest"}),r===t&&D&&(D.scrollTop=0),r===n&&D&&(D.scrollTop=D.scrollHeight),r?.focus(),document.activeElement!==o))return},[F,D]),q=r.useCallback(()=>K([N,E]),[K,N,E]);r.useEffect(()=>{z&&q()},[z,q]);let{onOpenChange:X,triggerPointerDownPosRef:G}=T;r.useEffect(()=>{if(E){let e={x:0,y:0},t=j(t=>{e={x:Math.abs(Math.round(t.pageX)-(G.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(G.current?.y??0))}},"handlePointerMove"),r=j(r=>{e.x<=10&&e.y<=10?r.preventDefault():r.composedPath().includes(E)||X(!1),document.removeEventListener("pointermove",t),G.current=null},"handlePointerUp");return null!==G.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}},[E,X,G]),r.useEffect(()=>{let e=j(()=>X(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[X]);let[J,ee]=ej(e=>{let t=F().filter(e=>!e.disabled),r=t.find(e=>e.ref.current===document.activeElement),n=eO(t,e,r);n&&setTimeout(()=>n.ref.current?.focus())}),en=r.useCallback((e,t,r)=>{let n=!U.current;n&&(U.current=!0);let o=!W.current&&!r;void 0!==T.value&&T.value===t||o?(M(e),o&&(W.current=!0)):n&&M(e)},[T.value]),eo=r.useCallback(()=>E?.focus(),[E]),ei=r.useCallback((e,t,r)=>{if(!e)return;let n=!$.current;n&&($.current=!0);let o=!W.current&&!r;void 0!==T.value&&T.value===t||o?B(e):n&&B(e)},[T.value]),el="popper"===l?er:et;return(0,t.jsx)(Z,{scope:o,content:E,viewport:D,onViewportChange:I,itemRefCallback:en,selectedItem:N,onItemLeave:eo,itemTextRefCallback:ei,focusSelectedItem:q,selectedItemText:V,position:l,isPositioned:z,searchRef:J,children:(0,t.jsx)(R.f,{as:Q,allowPinchZoom:!0,children:(0,t.jsx)(d.v,{asChild:!0,trapped:T.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,i.f)(s,e=>{T.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,t.jsx)(c.V,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:p,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>T.onOpenChange(!1),children:(0,t.jsx)(el,{role:"listbox",id:T.contentId,"data-state":T.open?"open":"closed",dir:T.dir,onContextMenu:e=>e.preventDefault(),...O,...el===er?{side:h,sideOffset:m,align:g,alignOffset:y,arrowPadding:w,collisionBoundary:x,collisionPadding:v,sticky:b,hideWhenDetached:S,avoidCollisions:P}:{},onPlaced:()=>_(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...O.style},onKeyDown:(0,i.f)(O.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||ee(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=F().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout(()=>K(t)),e.preventDefault()}})})})})})})},"SelectContentImpl")),et=r.forwardRef(j(function(e,n){let{__scopeSelect:i,onPlaced:l,...s}=e,u=H(Y,i),c=J(Y,i),[f,d]=r.useState(null),[p,h]=r.useState(null),m=(0,a.f)(n,h),g=k(i),w=r.useRef(!1),x=r.useRef(!0),{viewport:v,selectedItem:S,selectedItemText:C,focusSelectedItem:R}=c,P=r.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&p&&v&&S&&C){let e=u.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=u.valueNode.getBoundingClientRect(),n=C.getBoundingClientRect();if("rtl"!==u.dir){let i=n.left-t.left,l=r.left-i,a=e.left-l,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-10,d=(0,o.f)(l,[10,Math.max(10,c-u)]);f.style.minWidth=s+"px",f.style.left=d+"px"}else{let i=t.right-n.right,l=window.innerWidth-r.right-i,a=window.innerWidth-e.right-l,s=e.width+a,u=Math.max(s,t.width),c=window.innerWidth-10,d=(0,o.f)(l,[10,Math.max(10,c-u)]);f.style.minWidth=s+"px",f.style.right=d+"px"}let i=g(),a=window.innerHeight-20,s=v.scrollHeight,c=window.getComputedStyle(p),d=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),y=d+h+s+parseInt(c.paddingBottom,10)+m,x=Math.min(5*S.offsetHeight,y),b=window.getComputedStyle(v),R=parseInt(b.paddingTop,10),P=parseInt(b.paddingBottom,10),j=e.top+e.height/2-10,O=S.offsetHeight/2,T=d+h+(S.offsetTop+O);if(T<=j){let e=i.length>0&&S===i[i.length-1].ref.current;f.style.bottom="0px";let t=Math.max(a-j,O+(e?P:0)+(p.clientHeight-v.offsetTop-v.offsetHeight)+m);f.style.height=T+t+"px"}else{let e=i.length>0&&S===i[0].ref.current;f.style.top="0px";let t=Math.max(j,d+v.offsetTop+(e?R:0)+O);f.style.height=t+(y-T)+"px",v.scrollTop=T-j+v.offsetTop}f.style.margin="10px 0",f.style.minHeight=x+"px",f.style.maxHeight=a+"px",l?.(),requestAnimationFrame(()=>w.current=!0)}},[g,u.trigger,u.valueNode,f,p,v,S,C,u.dir,l]);(0,b.f)(()=>P(),[P]);let[j,O]=r.useState();(0,b.f)(()=>{p&&O(window.getComputedStyle(p).zIndex)},[p]);let T=r.useCallback(e=>{e&&!0===x.current&&(P(),R?.(),x.current=!1)},[P,R]);return(0,t.jsx)(en,{scope:i,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:T,children:(0,t.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,t.jsx)(y.V.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})},"SelectItemAlignedPosition")),er=r.forwardRef(j(function(e,r){let{__scopeSelect:n,align:o="start",collisionPadding:i=10,...l}=e,a=N(n);return(0,t.jsx)(h.c,{...a,...l,ref:r,align:o,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[en,eo]=I(Y,{}),ei="SelectViewport",el=r.forwardRef(j(function(e,n){let{__scopeSelect:o,nonce:l,...s}=e,u=J(ei,o),c=eo(ei,o),f=(0,a.f)(n,u.onViewportChange),d=r.useRef(0);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:l}),(0,t.jsx)(A.Slot,{scope:o,children:(0,t.jsx)(y.V.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:(0,i.f)(s.onScroll,e=>{let t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=c;if(n?.current&&r){let e=Math.abs(d.current-t.scrollTop);if(e>0){let n=window.innerHeight-20,o=Math.max(parseFloat(r.style.minHeight),parseFloat(r.style.height));if(o<n){let i=o+e,l=Math.min(n,i),a=i-l;r.style.height=l+"px","0px"===r.style.bottom&&(t.scrollTop=a>0?a:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})},"SelectViewport")),[ea,es]=I("SelectGroup"),eu=r.forwardRef(j(function(e,r){let{__scopeSelect:n,...o}=e,i=es("SelectLabel",n);return(0,t.jsx)(y.V.div,{id:i.id,...o,ref:r})},"SelectLabel")),ec="SelectItem",[ef,ed]=I(ec),ep=r.forwardRef(j(function(e,n){let{__scopeSelect:o,value:l,disabled:s=!1,textValue:u,...c}=e,f=H(ec,o),d=J(ec,o),h=f.value===l,[m,g]=r.useState(u??""),[w,v]=r.useState(!1),b=(0,x.f)(e=>d.itemRefCallback?.(e,l,s)),S=(0,a.f)(n,b),C=(0,p.f)(),R=r.useRef("touch");function P(e){f.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f.onUserSelect(l),f.onOpenChange(!1)}return j(P,"handleSelect"),(0,t.jsx)(ef,{scope:o,value:l,disabled:s,textId:C,isSelected:h,onItemTextChange:r.useCallback(e=>{g(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(A.ItemSlot,{scope:o,value:l,disabled:s,textValue:m,children:(0,t.jsx)(y.V.div,{role:"option","aria-labelledby":C,"data-highlighted":w?"":void 0,"aria-selected":h&&w,"data-state":h?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:S,onFocus:(0,i.f)(c.onFocus,()=>v(!0)),onBlur:(0,i.f)(c.onBlur,()=>v(!1)),onClick:(0,i.f)(c.onClick,e=>{s||"mouse"!==R.current&&P(e)}),onPointerUp:(0,i.f)(c.onPointerUp,e=>{s||"mouse"===R.current&&P(e)}),onPointerDown:(0,i.f)(c.onPointerDown,e=>{R.current=e.pointerType}),onPointerMove:(0,i.f)(c.onPointerMove,e=>{R.current=e.pointerType,s?d.onItemLeave?.():"mouse"===R.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,i.f)(c.onPointerLeave,e=>{e.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:(0,i.f)(c.onKeyDown,e=>{s||e.target!==e.currentTarget||(d.searchRef?.current===""||" "!==e.key)&&(T.includes(e.key)&&P(e)," "===e.key&&e.preventDefault())})})})})},"SelectItem")),eh="SelectItemText",em=r.forwardRef(j(function(e,o){let{__scopeSelect:i,className:l,style:s,...u}=e,c=H(eh,i),f=J(eh,i),d=ed(eh,i),p=B(eh,i),[h,m]=r.useState(null),g=(0,x.f)(e=>f.itemTextRefCallback?.(e,d.value,d.disabled)),w=(0,a.f)(o,m,d.onItemTextChange,g),v=h?.textContent,S=r.useMemo(()=>(0,t.jsx)("option",{value:d.value,disabled:d.disabled,children:v},d.value),[d.disabled,d.value,v]),{onNativeOptionAdd:C,onNativeOptionRemove:R}=p;return(0,b.f)(()=>(C(S),()=>R(S)),[C,R,S]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.V.span,{id:d.textId,...u,ref:w}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!eP(c.value)?n.createPortal(u.children,c.valueNode):null]})},"SelectItemText")),eg=r.forwardRef(j(function(e,r){let{__scopeSelect:n,...o}=e;return ed("SelectItemIndicator",n).isSelected?(0,t.jsx)(y.V.span,{"aria-hidden":!0,...o,ref:r}):null},"SelectItemIndicator")),ey="SelectScrollUpButton",ew=r.forwardRef(j(function(e,n){let o=J(ey,e.__scopeSelect),i=eo(ey,e.__scopeSelect),[l,s]=r.useState(!1),u=(0,a.f)(n,i.onScrollButtonChange);return(0,b.f)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)};j(e,"handleScroll");let t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?(0,t.jsx)(eb,{...e,ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),ex="SelectScrollDownButton",ev=r.forwardRef(j(function(e,n){let o=J(ex,e.__scopeSelect),i=eo(ex,e.__scopeSelect),[l,s]=r.useState(!1),u=(0,a.f)(n,i.onScrollButtonChange);return(0,b.f)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)};j(e,"handleScroll");let t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?(0,t.jsx)(eb,{...e,ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),eb=r.forwardRef(j(function(e,n){let{__scopeSelect:o,onAutoScroll:l,...a}=e,s=J("SelectScrollButton",o),u=r.useRef(null),c=k(o),f=r.useCallback(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return r.useEffect(()=>()=>f(),[f]),(0,b.f)(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,t.jsx)(y.V.div,{"aria-hidden":!0,...a,ref:n,style:{flexShrink:0,...a.style},onPointerDown:(0,i.f)(a.onPointerDown,()=>{null===u.current&&(u.current=window.setInterval(l,50))}),onPointerMove:(0,i.f)(a.onPointerMove,()=>{s.onItemLeave?.(),null===u.current&&(u.current=window.setInterval(l,50))}),onPointerLeave:(0,i.f)(a.onPointerLeave,()=>{f()})})},"SelectScrollButtonImpl")),eS=r.forwardRef(j(function(e,r){let{__scopeSelect:n,...o}=e;return(0,t.jsx)(y.V.div,{"aria-hidden":!0,...o,ref:r})},"SelectSeparator")),eC=r.forwardRef(j(function({__scopeSelect:e,...n},o){let i=H("SelectBubbleInput",e),{value:l,onValueChange:s,required:u,disabled:c,name:f,autoComplete:d,form:p,userSelection:h}=i,{nativeOptions:m,nativeSelectKey:g}=i,w=r.useRef(null),x=(0,a.f)(o,w),v=l??"",b=r.useRef(v),C=r.useRef(h),R=r.useRef(!1),P=Array.from(m).some(e=>(e.props.value??"")==="");return r.useEffect(()=>{let e=w.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set,r=null!==h&&h!==C.current;C.current=h;let n=b.current!==v;if(b.current=v,r&&!n&&h.value!==v&&!h.hasConsumerStoppedPropagation&&t){R.current=!0;try{t.call(e,h.value),e.dispatchEvent(new Event("change",{bubbles:!0}))}finally{R.current=!1,t.call(e,v)}return}let o=r&&n&&!h.hasConsumerStoppedPropagation;if(n&&t){let r=new Event("change",{bubbles:o});t.call(e,v),e.dispatchEvent(r)}},[v,h]),(0,t.jsxs)(y.V.select,{"aria-hidden":!0,required:u,tabIndex:-1,name:f,autoComplete:d,disabled:c,form:p,onChange:e=>{R.current||s(e.target.value)},...n,style:{...S,...n.style},ref:x,defaultValue:v,children:[eP(l)&&!P?(0,t.jsx)("option",{value:""}):null,Array.from(m)]},g)},"SelectBubbleInput"));function eR(e){return"function"==typeof e}function eP(e){return""===e||void 0===e}function ej(e){let t=(0,x.f)(e),n=r.useRef(""),o=r.useRef(0),i=r.useCallback(e=>{let r=n.current+e;function i(e){n.current=e,window.clearTimeout(o.current),""!==e&&(o.current=window.setTimeout(()=>i(""),1e3))}t(r),j(i,"updateSearch"),i(r)},[t]),l=r.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return r.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,i,l]}function eO(e,t,r){let n=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=r?e.indexOf(r):-1,i=eT(e,Math.max(o,0));1===n.length&&(i=i.filter(e=>e!==r));let l=i.find(e=>e.textValue.toLowerCase().startsWith(n.toLowerCase()));return l!==r?l:void 0}function eT(e,t){return e.map((r,n)=>e[(t+n)%e.length])}j(eR,"isFunction"),j(eP,"shouldShowPlaceholder"),j(ej,"useTypeaheadSearch"),j(eO,"findNextItem"),j(eT,"wrapArray");var eE=e.i(689664),eA=e.i(716327),ek=e.i(456539),eD=e.i(975157);let eI=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(_,{ref:o,className:(0,eD.f)("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[r,(0,t.jsx)(U,{asChild:!0,children:(0,t.jsx)(eA.f,{className:"h-4 w-4 opacity-50"})})]}));eI.displayName=_.displayName;let eL=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ew,{ref:n,className:(0,eD.f)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(ek.f,{className:"h-4 w-4"})}));eL.displayName=ew.displayName;let eN=r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(ev,{ref:n,className:(0,eD.f)("flex cursor-default items-center justify-center py-1",e),...r,children:(0,t.jsx)(eA.f,{className:"h-4 w-4"})}));eN.displayName=ev.displayName;let eM=r.forwardRef(({className:e,children:r,position:n="popper",...o},i)=>(0,t.jsx)(q,{children:(0,t.jsxs)(X,{ref:i,className:(0,eD.f)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[(0,t.jsx)(eL,{}),(0,t.jsx)(el,{className:(0,eD.f)("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:r}),(0,t.jsx)(eN,{})]})}));eM.displayName=X.displayName,(r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(eu,{ref:n,className:(0,eD.f)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...r}))).displayName=eu.displayName;let eH=r.forwardRef(({className:e,children:r,...n},o)=>(0,t.jsxs)(ep,{ref:o,className:(0,eD.f)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(eg,{children:(0,t.jsx)(eE.f,{className:"h-4 w-4"})})}),(0,t.jsx)(em,{children:r})]}));eH.displayName=ep.displayName,(r.forwardRef(({className:e,...r},n)=>(0,t.jsx)(eS,{ref:n,className:(0,eD.f)("-mx-1 my-1 h-px bg-muted",e),...r}))).displayName=eS.displayName,e.s(["d",0,z,"r",0,eM,"T",0,eH,"P",0,eI,"U",0,W],967489)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,726330,30207,e=>{var t,n=e.i(271645),r=e.i(981140),o=e.i(248425),a=e.i(820783),i=e.i(934620),u=Object.defineProperty,c=n[" useInsertionEffect ".trim().toString()];function s(e){let t=n.useRef(e);return"function"==typeof c?c(()=>{t.current=e}):(0,i.f)(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}u(s,"name",{value:"useCallbackRef",configurable:!0}),e.s(["f",0,s],30207);var l=e.i(843476),d=Object.defineProperty,f=(e,t)=>d(e,"name",{value:t,configurable:!0}),v="dismissableLayer.update",p=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),m=n.forwardRef(f(function(e,i){let{disableOutsidePointerEvents:u=!1,deferPointerDownOutside:c=!1,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:b,onDismiss:w,...S}=e,C=n.useContext(p),[k,L]=n.useState(null),P=k?.ownerDocument??globalThis?.document,[,R]=n.useState({}),O=(0,a.f)(i,L),T=Array.from(C.layers),[D]=[...C.layersWithOutsidePointerEventsDisabled].slice(-1),A=D?T.indexOf(D):-1,N=k?T.indexOf(k):-1,M=C.layersWithOutsidePointerEventsDisabled.size>0,x=N>=A,F=n.useRef(!1),I=y(e=>{m?.(e),b?.(e),e.defaultPrevented||w?.()},{ownerDocument:P,deferPointerDownOutside:c,isDeferredPointerDownOutsideRef:F,dismissableSurfaces:C.dismissableSurfaces,shouldHandlePointerDownOutside:n.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...C.branches].some(t=>t.contains(e));return x&&!t},[C.branches,x])}),W=g(e=>{if(c&&F.current)return;let t=e.target;![...C.branches].some(e=>e.contains(t))&&(h?.(e),b?.(e),e.defaultPrevented||w?.())},P),j=!!k&&N===T.length-1,B=s(e=>{"Escape"===e.key&&(d?.(e),!e.defaultPrevented&&w&&(e.preventDefault(),w()))});return n.useEffect(()=>{if(j)return P.addEventListener("keydown",B,{capture:!0}),()=>P.removeEventListener("keydown",B,{capture:!0})},[P,j,B]),n.useEffect(()=>{if(k)return u&&(0===C.layersWithOutsidePointerEventsDisabled.size&&(t=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),C.layersWithOutsidePointerEventsDisabled.add(k)),C.layers.add(k),E(),()=>{u&&(C.layersWithOutsidePointerEventsDisabled.delete(k),0===C.layersWithOutsidePointerEventsDisabled.size&&(P.body.style.pointerEvents=t))}},[k,P,u,C]),n.useEffect(()=>()=>{k&&(C.layers.delete(k),C.layersWithOutsidePointerEventsDisabled.delete(k),E())},[k,C]),n.useEffect(()=>{let e=f(()=>R({}),"handleUpdate");return document.addEventListener(v,e),()=>document.removeEventListener(v,e)},[]),(0,l.jsx)(o.V.div,{...S,ref:O,style:{pointerEvents:M?x?"auto":"none":void 0,...e.style},onFocusCapture:(0,r.f)(e.onFocusCapture,W.onFocusCapture),onBlurCapture:(0,r.f)(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:(0,r.f)(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function h(){let e=n.useContext(p),[t,r]=n.useState(null);return n.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}f(h,"useDismissableLayerSurface");var b=f(()=>!0,"IS_TRUE");function y(e,t){let{ownerDocument:r=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:i,shouldHandlePointerDownOutside:u=b}=t,c=s(e),l=n.useRef(!1),d=n.useRef(!1),v=n.useRef(new Map),p=n.useRef(()=>{});return n.useEffect(()=>{function e(){d.current=!1,a.current=!1,v.current.clear()}function t(){return Array.from(v.current.values()).some(Boolean)}function n(e){if(!d.current)return;let t=e.target;t instanceof Node&&[...i].some(e=>e.contains(t))||v.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{d.current&&p.current()},0)}function s(e){d.current&&v.current.set(e.type,!1)}f(e,"resetOutsideInteraction"),f(t,"isOutsideInteractionIntercepted"),f(n,"handleInteractionCapture"),f(s,"handleInteractionBubble");let m=f(n=>{if(n.target&&!l.current){let i=function(){r.removeEventListener("click",p.current);let n=t();e(),n||w("dismissableLayer.pointerDownOutside",c,s,{discrete:!0})};if(f(i,"handleAndDispatchPointerDownOutsideEvent"),!u(n.target)){r.removeEventListener("click",p.current),e(),l.current=!1;return}let s={originalEvent:n};d.current=!0,a.current=o&&0===n.button,v.current.clear(),o&&0===n.button?(r.removeEventListener("click",p.current),p.current=i,r.addEventListener("click",p.current,{once:!0})):i()}else r.removeEventListener("click",p.current),e();l.current=!1},"handlePointerDown"),h=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of h)r.addEventListener(e,n,!0),r.addEventListener(e,s);let b=window.setTimeout(()=>{r.addEventListener("pointerdown",m)},0);return()=>{for(let e of(window.clearTimeout(b),r.removeEventListener("pointerdown",m),r.removeEventListener("click",p.current),h))r.removeEventListener(e,n,!0),r.removeEventListener(e,s)}},[r,c,o,a,i,u]),{onPointerDownCapture:f(()=>l.current=!0,"onPointerDownCapture")}}function g(e,t=globalThis?.document){let r=s(e),o=n.useRef(!1);return n.useEffect(()=>{let e=f(e=>{e.target&&!o.current&&w("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:f(()=>o.current=!0,"onFocusCapture"),onBlurCapture:f(()=>o.current=!1,"onBlurCapture")}}function E(){let e=new CustomEvent(v);document.dispatchEvent(e)}function w(e,t,n,{discrete:r}){let a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?(0,o.u)(a,i):a.dispatchEvent(i)}f(y,"usePointerDownOutside"),f(g,"useFocusOutside"),f(E,"dispatchUpdate"),f(w,"handleAndDispatchCustomEvent"),e.s(["V",0,m,"y",0,h],726330)},303536,e=>{var t=e.i(271645),n=Object.defineProperty,r=(e,t)=>n(e,"name",{value:t,configurable:!0}),o=0,a=null;function i(){t.useEffect(()=>{a||(a={start:u(),end:u()});let{start:e,end:t}=a;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),o++,()=>{1===o&&(a?.start.remove(),a?.end.remove(),a=null),o=Math.max(0,o-1)}},[])}function u(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}r(function(e){return i(),e.children},"FocusGuards"),r(i,"useFocusGuards"),r(u,"createFocusGuard"),e.s(["f",0,i])},765491,e=>{var t=e.i(271645),n=e.i(820783),r=e.i(248425),o=e.i(30207),a=e.i(843476),i=Object.defineProperty,u=(e,t)=>i(e,"name",{value:t,configurable:!0}),c="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",l={bubbles:!1,cancelable:!0},d=t.forwardRef(u(function(e,i){let{loop:d=!1,trapped:f=!1,branches:v,onMountAutoFocus:p,onUnmountAutoFocus:m,...g}=e,[E,w]=t.useState(null),k=(0,o.f)(p),L=(0,o.f)(m),R=t.useRef(null),O=(0,n.f)(i,w),T=t.useRef(v);t.useEffect(()=>{T.current=v});let D=t.useCallback(e=>!!e&&(!!E?.contains(e)||!!T.current?.some(t=>t.contains(e))),[E]),A=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(f){let e=function(e){if(A.paused||!E)return;let t=e.target;D(t)?R.current=t:S(R.current,{select:!0})},t=function(e){if(A.paused||!E)return;let t=e.relatedTarget;null!==t&&(D(t)||S(R.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&S(E)};u(e,"handleFocusIn"),u(t,"handleFocusOut"),u(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return E&&r.observe(E,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[f,E,A.paused,D]),t.useEffect(()=>{if(E){C.add(A);let e=document.activeElement;if(!E.contains(e)){let t=new CustomEvent(c,l);E.addEventListener(c,k),E.dispatchEvent(t),t.defaultPrevented||(h(P(y(E)),{select:!0}),document.activeElement===e&&S(E))}return()=>{E.removeEventListener(c,k);let t=E.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(s,l);E.addEventListener(s,L),E.dispatchEvent(r),r.defaultPrevented||S(e??t.body,{select:!0}),E.removeEventListener(s,L),C.remove(A)},0)}}},[E,k,L,A]);let N=t.useCallback(e=>{if(!d&&!f||A.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,o]=b(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),d&&S(o,{select:!0})):(e.preventDefault(),d&&S(r,{select:!0})):n===t&&e.preventDefault()}},[d,f,A.paused]);return(0,a.jsx)(r.V.div,{tabIndex:-1,...g,ref:O,onKeyDown:N})},"FocusScope")),f=t.createContext(null);function v({registry:e,children:t}){return e?(0,a.jsx)(f.Provider,{value:e,children:t}):t}function p(){let[e,n]=t.useState([]);return{nodes:e,registry:t.useMemo(()=>({add:u(e=>n(t=>t.includes(e)?t:[...t,e]),"add"),remove:u(e=>n(t=>t.filter(t=>t!==e)),"remove")}),[])}}function m(e){let n=t.useContext(f);t.useEffect(()=>{if(e&&n)return n.add(e),()=>n.remove(e)},[e,n])}function h(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(S(r,{select:t}),document.activeElement!==n)return}function b(e){let t=y(e);return[g(t,e),g(t.reverse(),e)]}function y(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:u(e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):E(r,{upTo:t})))return r}function E(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===t||e!==t);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function w(e){return"INPUT"===e.tagName&&"function"==typeof e.select}function S(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&w(e)&&t&&e.select()}}u(v,"FocusScopeBranchProvider"),u(p,"useFocusScopeBranchRegistry"),u(m,"useFocusScopeBranch"),u(h,"focusFirst"),u(b,"getTabbableEdges"),u(y,"getTabbableCandidates"),u(g,"findVisible"),u(E,"isHidden"),u(w,"isSelectableInput"),u(S,"focus");var C=k();function k(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=L(e,t)).unshift(t)},remove(t){e=L(e,t),e[0]?.resume()}}}function L(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}function P(e){return e.filter(e=>"A"!==e.tagName)}u(k,"createFocusScopesStack"),u(L,"arrayRemove"),u(P,"removeLinks"),e.s(["v",0,d,"l",0,v,"i",0,m,"D",0,p])},610772,e=>{var t=e.i(271645),n=e.i(934620),r=Object.defineProperty,o=t[" useId ".trim().toString()]||(()=>void 0),a=0;function i(e){let[r,i]=t.useState(o());return(0,n.f)(()=>{e||i(e=>e??String(a++))},[e]),e||(r?`radix-${r}`:"")}r(i,"name",{value:"useId",configurable:!0}),e.s(["f",0,i])},774606,e=>{var t=e.i(271645),n=e.i(174080),r=e.i(248425),o=e.i(934620),a=e.i(843476),i=Object.defineProperty,u=t.forwardRef(i(function(e,i){let{container:u,...c}=e,[s,l]=t.useState(!1);(0,o.f)(()=>l(!0),[]);let d=u||s&&globalThis?.document?.body;return d?n.createPortal((0,a.jsx)(r.V.div,{...c,ref:i}),d):null},"name",{value:"Portal",configurable:!0}));e.s(["f",0,u])},186312,e=>{var t=new WeakMap,n=new WeakMap,r={},o=0,a=function(e){return e&&(e.host||a(e.parentNode))},i=function(e,i,u,c){var s=(Array.isArray(e)?e:[e]).map(function(e){if(i.contains(e))return e;var t=a(e);return t&&i.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",i,". Doing nothing"),null)}).filter(function(e){return!!e});r[u]||(r[u]=new WeakMap);var l=r[u],d=[],f=new Set,v=new Set(s),p=function(e){!e||f.has(e)||(f.add(e),p(e.parentNode))};s.forEach(p);var m=function(e){!e||v.has(e)||Array.prototype.forEach.call(e.children,function(e){if(f.has(e))m(e);else try{var r=e.getAttribute(c),o=null!==r&&"false"!==r,a=(t.get(e)||0)+1,i=(l.get(e)||0)+1;t.set(e,a),l.set(e,i),d.push(e),1===a&&o&&n.set(e,!0),1===i&&e.setAttribute(u,"true"),o||e.setAttribute(c,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(i),f.clear(),o++,function(){d.forEach(function(e){var r=t.get(e)-1,o=l.get(e)-1;t.set(e,r),l.set(e,o),r||(n.has(e)||e.removeAttribute(c),n.delete(e)),o||e.removeAttribute(u)}),--o||(t=new WeakMap,t=new WeakMap,n=new WeakMap,r={})}};e.s(["f",0,function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=t||("u"<typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),i(r,o,n,"aria-hidden")):function(){return null}}])},985369,e=>{var t,n,r,o,a,i,u,c=function(){return(c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}var l=("function"==typeof SuppressedError&&SuppressedError,e.i(271645)),d="right-scroll-bar-position",f="width-before-scroll-bar";function v(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var p="u">typeof window?l.useLayoutEffect:l.useEffect,m=new WeakMap,h=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,a={read:function(){if(o)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:null},useMedium:function(e){var t=n(e,o);return r.push(t),function(){r=r.filter(function(e){return e!==t})}},assignSyncMedium:function(e){for(o=!0;r.length;){var t=r;r=[],t.forEach(e)}r={push:function(t){return e(t)},filter:function(){return r}}},assignMedium:function(e){o=!0;var t=[];if(r.length){var n=r;r=[],n.forEach(e),t=r}var a=function(){var n=t;t=[],n.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),r={push:function(e){t.push(e),i()},filter:function(e){return t=t.filter(e),r}}}}).options=c({async:!0,ssr:!1},t),a),b=function(){},y=l.forwardRef(function(e,t){var n,r,o,a,i=l.useRef(null),u=l.useState({onScrollCapture:b,onWheelCapture:b,onTouchMoveCapture:b}),d=u[0],f=u[1],y=e.forwardProps,g=e.children,E=e.className,w=e.removeScrollBar,S=e.enabled,C=e.shards,k=e.sideCar,L=e.noRelative,P=e.noIsolation,R=e.inert,O=e.allowPinchZoom,T=e.as,D=e.gapMode,A=s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=(n=[i,t],r=function(e){return n.forEach(function(t){return v(t,e)})},(o=(0,l.useState)(function(){return{value:null,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}})[0]).callback=r,a=o.facade,p(function(){var e=m.get(a);if(e){var t=new Set(e),r=new Set(n),o=a.current;t.forEach(function(e){r.has(e)||v(e,null)}),r.forEach(function(e){t.has(e)||v(e,o)})}m.set(a,n)},[n]),a),M=c(c({},A),d);return l.createElement(l.Fragment,null,S&&l.createElement(k,{sideCar:h,removeScrollBar:w,shards:C,noRelative:L,noIsolation:P,inert:R,setCallbacks:f,allowPinchZoom:!!O,lockRef:i,gapMode:D}),y?l.cloneElement(l.Children.only(g),c(c({},M),{ref:N})):l.createElement(void 0===T?"div":T,c({},M,{className:E,ref:N}),g))});y.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},y.classNames={fullWidth:f,zeroRight:d};var g=function(e){var t=e.sideCar,n=s(e,["sideCar"]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error("Sidecar medium not found");return l.createElement(r,c({},n))};g.isSideCarExport=!0;var E=function(){var e=0,t=null;return{add:function(n){if(0==e&&(t=function(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=u||("u">typeof __webpack_nonce__?__webpack_nonce__:void 0);return t&&e.setAttribute("nonce",t),e}())){var r,o;(r=t).styleSheet?r.styleSheet.cssText=n:r.appendChild(document.createTextNode(n)),o=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(o)}e++},remove:function(){--e||!t||(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},w=function(){var e=E();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},S=function(){var e=w();return function(t){return e(t.styles,t.dynamic),null}},C={left:0,top:0,right:0,gap:0},k=function(e){return parseInt(e||"",10)||0},L=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[k(n),k(r),k(o)]},P=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return C;var t=L(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},R=S(),O="data-scroll-locked",T=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(u,"px ").concat(r,";\n }\n body[").concat(O,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(a,"px;\n padding-right: ").concat(i,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(u,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(u,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(d," {\n right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(f," {\n margin-right: ").concat(u,"px ").concat(r,";\n }\n \n .").concat(d," .").concat(d," {\n right: 0 ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(O,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(u,"px;\n }\n")},D=function(){var e=parseInt(document.body.getAttribute(O)||"0",10);return isFinite(e)?e:0},A=function(){l.useEffect(function(){return document.body.setAttribute(O,(D()+1).toString()),function(){var e=D()-1;e<=0?document.body.removeAttribute(O):document.body.setAttribute(O,e.toString())}},[])},N=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;A();var a=l.useMemo(function(){return P(o)},[o]);return l.createElement(R,{styles:T(a,!t,o,n?"":"!important")})},M=!1;if("u">typeof window)try{var x=Object.defineProperty({},"passive",{get:function(){return M=!0,!0}});window.addEventListener("test",x,x),window.removeEventListener("test",x,x)}catch(e){M=!1}var F=!!M&&{passive:!1},I=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&(n.overflowY!==n.overflowX||"TEXTAREA"===e.tagName||"visible"!==n[t])},W=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),j(e,r)){var o=B(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},j=function(e,t){return"v"===e?I(t,"overflowY"):I(t,"overflowX")},B=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},_=function(e,t,n,r,o){var a,i=(a=window.getComputedStyle(t).direction,"h"===e&&"rtl"===a?-1:1),u=i*r,c=n.target,s=t.contains(c),l=!1,d=u>0,f=0,v=0;do{if(!c)break;var p=B(e,c),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&j(e,c)&&(f+=h,v+=m);var b=c.parentNode;c=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!s&&c!==document.body||s&&(t.contains(c)||t===c))return d&&(o&&1>Math.abs(f)||!o&&u>f)?l=!0:!d&&(o&&1>Math.abs(v)||!o&&-u>v)&&(l=!0),l},K=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},U=function(e){return[e.deltaX,e.deltaY]},V=function(e){return e&&"current"in e?e.current:e},X=0,Y=[];let z=(i=function(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(X++)[0],a=l.useState(S)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,a=t.length;o<a;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(V),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=l.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var o,a=K(e),u=n.current,c="deltaX"in e?e.deltaX:u[0]-a[0],s="deltaY"in e?e.deltaY:u[1]-a[1],l=e.target,d=Math.abs(c)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),v=f&&f.anchorNode;if(v&&(v===l||v.contains(l)))return!1;var p=W(d,l);if(!p)return!0;if(p?o=d:(o="v"===d?"h":"v",p=W(d,l)),!p)return!1;if(!r.current&&"changedTouches"in e&&(c||s)&&(r.current=o),!o)return!0;var m=r.current||o;return _(m,t,e,"h"===m?c:s,!0)},[]),c=l.useCallback(function(e){if(Y.length&&Y[Y.length-1]===a){var n="deltaY"in e?U(e):K(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta,r[0]===n[0]&&r[1]===n[1])})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(V).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?u(e,o[0]):!i.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),s=l.useCallback(function(e,n,r,o){var a={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),d=l.useCallback(function(e){n.current=K(e),r.current=void 0},[]),f=l.useCallback(function(t){s(t.type,U(t),t.target,u(t,e.lockRef.current))},[]),v=l.useCallback(function(t){s(t.type,K(t),t.target,u(t,e.lockRef.current))},[]);l.useEffect(function(){return Y.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:v}),document.addEventListener("wheel",c,F),document.addEventListener("touchmove",c,F),document.addEventListener("touchstart",d,F),function(){Y=Y.filter(function(e){return e!==a}),document.removeEventListener("wheel",c,F),document.removeEventListener("touchmove",c,F),document.removeEventListener("touchstart",d,F)}},[]);var p=e.removeScrollBar,m=e.inert;return l.createElement(l.Fragment,null,m?l.createElement(a,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,p?l.createElement(N,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},h.useMedium(i),g);var H=l.forwardRef(function(e,t){return l.createElement(y,c({},e,{ref:t,sideCar:z}))});H.classNames=y.classNames,e.s(["f",0,H],985369)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,462684,t=>{t.v(l=>Promise.all(["static/chunks/2hh64gi4pmlk2.js"].map(l=>t.l(l))).then(()=>l(506175)))}]);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let n={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],711241)},399847,e=>{var t=e.i(456420);let n={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],399847)},508734,e=>{var t=e.i(456420);let n={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],508734)},13285,e=>{var t=e.i(456420);let n={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],13285)},615568,168148,61425,e=>{var t=e.i(456420);let n={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],615568);var i=e.i(843476),a=e.i(271645),o=e.i(30030),s=e.i(248425),l=Object.defineProperty,h=(e,t)=>l(e,"name",{value:t,configurable:!0}),d="Progress",[c,u]=(0,o.f)(d),[p,f]=c(d),g=a.forwardRef(h(function(e,t){let{__scopeProgress:n,value:r=null,max:a,getValueLabel:o=w,...l}=e;(a||0===a)&&!v(a)&&console.error(C(`${a}`,"Progress"));let h=v(a)?a:100;null===r||b(r,h)||console.error(D(`${r}`,"Progress"));let d=b(r,h)?r:null,c=x(d)?o(d,h):void 0;return(0,i.jsx)(p,{scope:n,value:d,max:h,children:(0,i.jsx)(s.V.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":x(d)?d:void 0,"aria-valuetext":c,role:"progressbar","data-state":y(d,h),"data-value":d??void 0,"data-max":h,...l,ref:t})})},"Progress")),m=a.forwardRef(h(function(e,t){let{__scopeProgress:n,...r}=e,a=f("ProgressIndicator",n);return(0,i.jsx)(s.V.div,{"data-state":y(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})},"ProgressIndicator"));function w(e,t){return`${Math.round(e/t*100)}%`}function y(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function x(e){return"number"==typeof e}function v(e){return x(e)&&!isNaN(e)&&e>0}function b(e,t){return x(e)&&!isNaN(e)&&e<=t&&e>=0}function C(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function D(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
2
|
+
- a positive number
|
|
3
|
+
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
|
|
4
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
|
+
|
|
6
|
+
Defaulting to \`null\`.`}h(w,"defaultGetValueLabel"),h(y,"getProgressState"),h(x,"isNumber"),h(v,"isValidMaxNumber"),h(b,"isValidValueNumber"),h(C,"getInvalidMaxError"),h(D,"getInvalidValueError");var k=e.i(975157);let E=a.forwardRef(({className:e,value:t,...n},r)=>(0,i.jsx)(g,{ref:r,value:t,className:(0,k.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:(0,i.jsx)(m,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));E.displayName=g.displayName,e.s(["f",0,E],168148);var M=e.i(303163);e.s(["f",0,function(e,t){let n=t.common?.messages?.analysisFailed||"Analysis failed, please try again",r=(0,M.d)(e);if(r){let e=t.errors??{};if(!(r in e))return r;let i=e[r];return"string"==typeof i?i:n}let i=(0,M.Z)(e);if(i.includes("fetch")||i.includes("network"))return t.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${n} (${t})`}return n}],61425)},328623,e=>{var t=e.i(456420);let n={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};n.node;let r=(0,t.f)(n);e.s(["f",0,r],328623)},232660,213761,e=>{var t=e.i(271645),n={x:0,y:0,width:0,height:0,unit:"px"},r=(e,t,n)=>Math.min(Math.max(e,t),n),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function a(e,t,r){return"%"===e.unit?{...n,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/r*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/r*100:0}}function o(e,t,r){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*r/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*r/100:0}:{...n,...e,unit:"px"}}function s(e,t,n,r,i,a=0,o=0,l=r,h=i){let d={...e},c=Math.min(a,r),u=Math.min(o,i),p=Math.min(l,r),f=Math.min(h,i);t&&(t>1?(u=(c=o?o*t:c)/t,p=l*t):(c=(u=a?a/t:u)*t,f=h/t)),d.y<0&&(d.height=Math.max(d.height+d.y,u),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);let g=r-(d.x+d.width);g<0&&(d.x=Math.min(d.x,r-c),d.width+=g);let m=i-(d.y+d.height);if(m<0&&(d.y=Math.min(d.y,i-u),d.height+=m),d.width<c&&(("sw"===n||"nw"==n)&&(d.x-=c-d.width),d.width=c),d.height<u&&(("nw"===n||"ne"==n)&&(d.y-=u-d.height),d.height=u),d.width>p&&(("sw"===n||"nw"==n)&&(d.x-=p-d.width),d.width=p),d.height>f&&(("nw"===n||"ne"==n)&&(d.y-=f-d.height),d.height=f),t){let e=d.width/d.height;if(e<t){let e=Math.max(d.width/t,u);("nw"===n||"ne"==n)&&(d.y-=e-d.height),d.height=e}else if(e>t){let e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}var l={capture:!0,passive:!1},h=0,d=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:r,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:r,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:r}=this.getBox();e&&r&&n(o(t,e,r),a(t,e,r))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,r=this.getBox();if(!t)return;let i=o(t,r.width,r.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,s=e.clientX,l=e.clientY,h=i.x,d=i.y;if(a){let t=e.clientX-r.x,n=e.clientY-r.y,o=0,c=0;"ne"===a||"e"==a?(o=t-(i.x+i.width),c=n-i.y,h=i.x,d=i.y+i.height):"se"===a||"s"===a?(o=t-(i.x+i.width),c=n-(i.y+i.height),h=i.x,d=i.y):"sw"===a||"w"==a?(o=t-i.x,c=n-(i.y+i.height),h=i.x+i.width,d=i.y):("nw"===a||"n"==a)&&(o=t-i.x,c=n-i.y,h=i.x+i.width,d=i.y+i.height),s=h+r.x+o,l=d+r.y+c}this.evData={startClientX:s,startClientY:l,startCropX:h,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:r,keepSelection:i,onChange:s}=this.props,l=this.getBox();if(n||r||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-l.x,d=e.clientY-l.y,c={unit:"px",x:h,y:d,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,s(o(c,l.width,l.height),a(c,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:n,disabled:r,onChange:s,onDragStart:l}=this.props,h=this.getBox();if(r||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:d}=this;d.clientX=e.clientX,d.clientY=e.clientY,i(n,t=d.isResize?this.resizeCrop():this.dragCrop())||s(o(t,h.width,h.height),a(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:n,disabled:i,onChange:s,onComplete:l}=this.props;if(i)return;let h=t.key,d=!1;if(!n)return;let c=this.getBox(),u=this.makePixelCrop(c),p=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(u.x-=p,d=!0):"ArrowRight"===h?(u.x+=p,d=!0):"ArrowUp"===h?(u.y-=p,d=!0):"ArrowDown"===h&&(u.y+=p,d=!0),d){t.cancelable&&t.preventDefault(),u.x=r(u.x,0,c.width-u.width),u.y=r(u.y,0,c.height-u.height);let e=o(u,c.width,c.height),n=a(u,c.width,c.height);s(e,n),l&&l(e,n)}};onHandlerKeyDown=(t,n)=>{var r,l;let h,{aspect:d=0,crop:c,disabled:u,minWidth:p=0,minHeight:f=0,maxWidth:g,maxHeight:m,onChange:w,onComplete:y}=this.props,x=this.getBox();if(u||!c||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let v=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,b=s((r=o(c,x.width,x.height),l=t.key,h={...r},"ArrowLeft"===l?"nw"===n?(h.x-=v,h.y-=v,h.width+=v,h.height+=v):"w"===n?(h.x-=v,h.width+=v):"sw"===n?(h.x-=v,h.width+=v,h.height+=v):"ne"===n?(h.y+=v,h.width-=v,h.height-=v):"e"===n?h.width-=v:"se"===n&&(h.width-=v,h.height-=v):"ArrowRight"===l&&("nw"===n?(h.x+=v,h.y+=v,h.width-=v,h.height-=v):"w"===n?(h.x+=v,h.width-=v):"sw"===n?(h.x+=v,h.width-=v,h.height-=v):"ne"===n?(h.y-=v,h.width+=v,h.height+=v):"e"===n?h.width+=v:"se"===n&&(h.width+=v,h.height+=v)),"ArrowUp"===l?"nw"===n?(h.x-=v,h.y-=v,h.width+=v,h.height+=v):"n"===n?(h.y-=v,h.height+=v):"ne"===n?(h.y-=v,h.width+=v,h.height+=v):"sw"===n?(h.x+=v,h.width-=v,h.height-=v):"s"===n?h.height-=v:"se"===n&&(h.width-=v,h.height-=v):"ArrowDown"===l&&("nw"===n?(h.x+=v,h.y+=v,h.width-=v,h.height-=v):"n"===n?(h.y+=v,h.height-=v):"ne"===n?(h.y+=v,h.width-=v,h.height-=v):"sw"===n?(h.x-=v,h.width+=v,h.height+=v):"s"===n?h.height+=v:"se"===n&&(h.width+=v,h.height+=v)),h),d,n,x.width,x.height,p,f,g,m);if(!i(c,b)){let e=a(b,x.width,x.height);w(b,e),y&&y(b,e)}};onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:r,onDragEnd:i}=this.props,s=this.getBox();this.unbindDocMove(),!(n||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),r&&r(o(t,s.width,s.height),a(t,s.width,s.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),i=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return n.x=r(e.startCropX+i,0,t.width-n.width),n.y=r(e.startCropY+a,0,t.height-n.height),n}getPointRegion(e,t,n,r){let{evData:i}=this,a=i.clientX-e.x,o=i.clientY-e.y,s;return s=r&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:a<i.startCropX)?s?"nw":"sw":s?"ne":"se"}resolveMinDimensions(e,t,n=0,r=0){let i=Math.min(n,e.width),a=Math.min(r,e.height);return t&&(i||a)?t>1?i?[i,i/t]:[a*t,a]:a?[a*t,a]:[i,i/t]:[i,a]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:i,maxHeight:a}=this.props,o=this.getBox(),[l,h]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight),d=this.makePixelCrop(o),c=this.getPointRegion(o,t.ord,l,h),u=t.ord||c,p=t.clientX-t.startClientX,f=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(p=Math.min(p,-l)),(h&&"nw"===u||"n"===u||"ne"===u)&&(f=Math.min(f,-h));let g={unit:"px",x:0,y:0,width:0,height:0};"ne"===c?(g.x=t.startCropX,g.width=p,n?g.height=g.width/n:g.height=Math.abs(f),g.y=t.startCropY-g.height):"se"===c?(g.x=t.startCropX,g.y=t.startCropY,g.width=p,n?g.height=g.width/n:g.height=f):"sw"===c?(g.x=t.startCropX+p,g.y=t.startCropY,g.width=Math.abs(p),n?g.height=g.width/n:g.height=f):"nw"===c&&(g.x=t.startCropX+p,g.width=Math.abs(p),n?(g.height=g.width/n,g.y=t.startCropY-g.height):(g.height=Math.abs(f),g.y=t.startCropY+f));let m=s(g,n,c,o.width,o.height,l,h,i,a);return n||e.xyOrds.indexOf(u)>-1?d=m:e.xOrds.indexOf(u)>-1?(d.x=m.x,d.width=m.width):e.yOrds.indexOf(u)>-1&&(d.y=m.y,d.height=m.height),d.x=r(d.x,0,o.width-d.width),d.y=r(d.y,0,o.height-d.height),d}renderCropSelection(){let{ariaLabels:n=e.defaultProps.ariaLabels,disabled:r,locked:i,renderSelectionAddon:a,ruleOfThirds:o,crop:s}=this.props,l=this.getCropStyle();if(s)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":n.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!r&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":n.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":n.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":n.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":n.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":n.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":n.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":n.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":n.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),a&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},a(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...n,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:n,circularCrop:r,className:i,crop:a,disabled:o,locked:s,style:l,ruleOfThirds:h}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,u=a?this.renderCropSelection():null,p=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",s&&"ReactCrop--locked",c&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&r&&"ReactCrop--circular-crop",a&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",r&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:p,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),a?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),r?t.default.createElement("ellipse",{cx:`${a.x+a.width/2}${a.unit}`,cy:`${a.y+a.height/2}${a.unit}`,rx:`${a.width/2}${a.unit}`,ry:`${a.height/2}${a.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${a.x}${a.unit}`,y:`${a.y}${a.unit}`,width:`${a.width}${a.unit}`,height:`${a.height}${a.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,d],232660);let c={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,n){super(e,void 0===n?void 0:{cause:n}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let p=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),f=new Set(["mif1","msf1","mif2"]),g=new Set(["avif","avis"]);function m(e,t,n=c){let r=Math.min(1,n.maxLongEdge/Math.max(e,t),Math.sqrt(n.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*r)),height:Math.max(1,Math.floor(t*r)),scale:r}}async function w(e){let t,n;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let r=await (t=URL.createObjectURL(e),(n=new Image).decoding="async",new Promise((e,r)=>{n.onload=()=>e(n),n.onerror=()=>r(Error("IMAGE_ELEMENT_DECODE_FAILED")),n.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!r.naturalWidth||!r.naturalHeight)throw Error("IMAGE_EMPTY");return r}async function y(t){let{heicTo:n}=await e.A(462684);return n({blob:t,type:"image/jpeg",quality:.95})}function x(e,t){return new Promise((n,r)=>{e.toBlob(e=>e?n(e):r(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function v(e,t,n,r,i,a,o){let s,l=((s=document.createElement("canvas")).width=a,s.height=o,s),h=l.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,a,o),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,n,r,i,0,0,a,o),l}async function b(e,t){var n;let r,i=performance.now(),a=await e.arrayBuffer(),o=performance.now()-i,s=function(e){let t=(t,n)=>String.fromCharCode(...e.subarray(t,n));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let n=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),r=[t(8,12)];for(let e=16;e+4<=n;e+=4)r.push(t(e,e+4));if(r.some(e=>p.has(e)))return"heic";if(r.some(e=>g.has(e)))return"avif";if(r.some(e=>f.has(e)))return"heic"}return"unknown"}(new Uint8Array(a,0,Math.min(a.byteLength,64))),l=e.type||"",h=performance.now(),d="native",c=new Blob([a],{type:l||"application/octet-stream"});try{r=await w(c)}catch(e){if("heic"!==s)throw new u("unknown"===s?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",s,e);t?.();try{r=await w(await y(c)),d="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",s,e)}}let{width:b,height:C}=(n=r)instanceof HTMLImageElement?{width:n.naturalWidth,height:n.naturalHeight}:{width:n.width,height:n.height};if(!b||!C)throw new u("IMAGE_DECODE_FAILED",s);let D=m(b,C,{maxLongEdge:1600,maxPixels:1/0}),k=await x(v(r,0,0,b,C,D.width,D.height),.85),E=URL.createObjectURL(k),M=performance.now()-h;return{source:r,width:b,height:C,format:s,decoder:d,previewUrl:E,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(M)},dispose:()=>{URL.revokeObjectURL(E),r instanceof HTMLImageElement||r.close()}}}let C={x:0,y:0,width:1,height:1};async function D(e,t=C,n=c){var r;let i=performance.now(),a=e=>Math.min(1,Math.max(0,e)),o=Math.round(a(t.x)*e.width),s=Math.round(a(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(a(t.width)*e.width))),h=Math.max(1,Math.min(e.height-s,Math.round(a(t.height)*e.height))),d=m(l,h,n),u=v(e.source,o,s,l,h,d.width,d.height),p=performance.now()-i,f=performance.now(),g=n.startQuality,w=await x(u,g);for(let t=0;w.size>n.maxBytes&&t<12;t++)g-.05>=n.minQuality-1e-9?g=Math.round((g-.05)*100)/100:(d={width:Math.max(1,Math.floor(.85*d.width)),height:Math.max(1,Math.floor(.85*d.height)),scale:.85*d.scale},u=v(e.source,o,s,l,h,d.width,d.height)),w=await x(u,g);return{dataUrl:await (r=w,new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error??Error("READ_FAILED")),n.readAsDataURL(r)})),width:d.width,height:d.height,bytes:w.size,quality:g,timings:{crop:Math.round(p),compress:Math.round(performance.now()-f)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,b,"X",0,D],213761)},590546,e=>{var t=e.i(843476),n=e.i(618566),r=e.i(519455),i=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:a}){let o=(0,n.useRouter)();return(0,t.jsx)(r.f,{variant:"ghost",size:"icon",onClick:()=>{o.push(e)},className:a,children:(0,t.jsx)(i.f,{className:"h-5 w-5"})})}])},257428,e=>{var t=e.i(843476),n=e.i(271645),r=e.i(820783),i=e.i(30030),a=e.i(981140),o=e.i(369340),s=e.i(635804),l=e.i(296626),h=e.i(248425),d=Object.defineProperty,c=(e,t)=>d(e,"name",{value:t,configurable:!0}),u="Checkbox",[p,f]=(0,i.f)(u),[g,m]=p(u);function w(e){let{__scopeCheckbox:r,checked:i,children:a,defaultChecked:s,disabled:l,form:h,name:d,onCheckedChange:c,required:p,value:f="on",internal_do_not_use_render:m}=e,[w,y]=(0,o.f)({prop:i,defaultProp:s??!1,onChange:c,caller:u}),[x,v]=n.useState(null),[b,k]=n.useState(null),[E,M]=n.useState(null),R=!x||!!h||!!x.closest("form"),I={checked:w,disabled:l,setChecked:y,control:x,setControl:v,name:d,form:h,value:f,userClick:E,onUserClick:M,required:p,defaultChecked:!D(s)&&s,isFormControl:R,bubbleInput:b,setBubbleInput:k};return(0,t.jsx)(g,{scope:r,...I,children:C(m)?m(I):a})}c(w,"CheckboxProvider");var y=n.forwardRef(c(function({__scopeCheckbox:e,onKeyDown:i,onClick:o,...s},l){let{control:d,value:u,disabled:p,checked:f,required:g,setControl:w,setChecked:y,onUserClick:x,isFormControl:v,bubbleInput:b}=m("CheckboxTrigger",e),C=(0,r.f)(l,w),E=n.useRef(f);return n.useEffect(()=>{let e=d?.form;if(e){let t=c(()=>y(E.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,y]),(0,t.jsx)(h.V.button,{type:"button",role:"checkbox","aria-checked":D(f)?"mixed":f,"aria-required":g,"data-state":k(f),"data-disabled":p?"":void 0,disabled:p,value:u,...s,ref:C,onKeyDown:(0,a.f)(i,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,a.f)(o,e=>{let t=e.isPropagationStopped();x({requestedChecked:!!D(f)||!f,hasConsumerStoppedPropagation:t}),y(e=>!!D(e)||!e),b&&v&&!t&&e.stopPropagation()})})},"CheckboxTrigger")),x=n.forwardRef(c(function(e,n){let{__scopeCheckbox:r,name:i,checked:a,defaultChecked:o,required:s,disabled:l,value:h,onCheckedChange:d,form:c,...u}=e;return(0,t.jsx)(w,{__scopeCheckbox:r,checked:a,defaultChecked:o,disabled:l,required:s,onCheckedChange:d,name:i,form:c,value:h,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y,{...u,ref:n,__scopeCheckbox:r}),e&&(0,t.jsx)(b,{__scopeCheckbox:r})]})})},"Checkbox")),v=n.forwardRef(c(function(e,n){let{__scopeCheckbox:r,forceMount:i,...a}=e,o=m("CheckboxIndicator",r);return(0,t.jsx)(l.f,{present:i||D(o.checked)||!0===o.checked,children:(0,t.jsx)(h.V.span,{"data-state":k(o.checked),"data-disabled":o.disabled?"":void 0,...a,ref:n,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),b=n.forwardRef(c(function({__scopeCheckbox:e,onClick:i,...o},l){let{control:d,userClick:c,checked:u,defaultChecked:p,required:f,disabled:g,name:w,value:y,form:x,bubbleInput:v,setBubbleInput:b}=m("CheckboxBubbleInput",e),C=(0,r.f)(l,b),k=(0,s.f)(d),E=n.useRef(!1),M=n.useRef(u),R=n.useRef(c),I=n.useRef(null);n.useEffect(()=>{if(!v)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!e)return;let t=M.current!==u;M.current=u;let n=null!==c&&c!==R.current;if(R.current=c,n)I.current=t?null:c,t&&(v.indeterminate=D(u),e.call(v,!D(u)&&u)),v.dispatchEvent(new Event("click",{bubbles:!c.hasConsumerStoppedPropagation}));else if(t){let t=I.current;I.current=null;let n=t?.requestedChecked===u;E.current=!0,v.indeterminate=D(u),e.call(v,!D(u)&&u),v.dispatchEvent(new Event("click",{bubbles:!(n&&t.hasConsumerStoppedPropagation)})),E.current=!1}},[v,u,c]);let j=n.useRef(!D(u)&&u);return(0,t.jsx)(h.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:p??j.current,required:f,disabled:g,name:w,value:y,form:x,...o,tabIndex:-1,ref:C,onClick:(0,a.f)(i,e=>{E.current&&e.stopPropagation()}),style:{...o.style,...k,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function C(e){return"function"==typeof e}function D(e){return"indeterminate"===e}function k(e){return D(e)?"indeterminate":e?"checked":"unchecked"}c(C,"isFunction"),c(D,"isIndeterminate"),c(k,"getState");var E=e.i(689664),M=e.i(975157);let R=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(x,{ref:r,className:(0,M.f)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...n,children:(0,t.jsx)(v,{className:(0,M.f)("flex items-center justify-center text-current"),children:(0,t.jsx)(E.f,{className:"h-4 w-4"})})}));R.displayName=x.displayName,e.s(["f",0,R],257428)},912505,e=>{var t=e.i(843476),n=e.i(975157);e.s(["f",0,function({icon:e,title:r,description:i,action:a,className:o}){return(0,t.jsxs)("div",{className:(0,n.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",o),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:r}),i&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:i}),a&&(0,t.jsx)("div",{className:"mt-5",children:a})]})}])},393842,e=>{var t=e.i(843476),n=e.i(590546),r=e.i(975157);e.s(["f",0,function({title:e,description:i,backHref:a,actions:o,titleAddon:s,className:l}){return(0,t.jsxs)("div",{className:(0,r.f)("flex items-start gap-3",l),children:[a&&(0,t.jsx)(n.f,{fallbackUrl:a,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),s]}),i&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:i})]}),o&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:o})]})}])},86963,e=>{var t=e.i(843476),n=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(n.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},35209,e=>{var t=e.i(271645),n=e.i(111110);e.s(["f",0,function(...e){let{t:r}=(0,n.b)(),i=[r.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=i},[i])}])},825624,575557,364002,e=>{let t=/^[\s ]+/,n="一二三四五六七八九十",r=[{family:"dot",pattern:/^(\d{1,3})\s*[..](?!\d)\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function i(e){let i=e.replace(t,"");for(let{family:e,pattern:t}of r){let r=i.match(t);if(!r||i.length<=r[0].length)continue;let a=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?n.indexOf(e)+1:10*(0===t?1:n.indexOf(e[0])+1)+(t===e.length-1?0:n.indexOf(e[t+1])+1)}(r[1]);if(Number.isFinite(a)&&!(a<=0))return{value:a,family:e,prefixLength:r[0].length,label:r[1]}}return null}function a(e){let t=[];for(let n of e)(n||0!==t.length&&""!==t[t.length-1])&&t.push(n);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let o=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,s=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,l=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,h=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,d=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,c=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,u=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function p(e){let t=[],n=[];for(let r of e)r?n.push(r):n.length&&(t.push(n.join("\n")),n=[]);return n.length&&t.push(n.join("\n")),t}function f(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=[i];for(let n=r+1;n<e.length;n++){let r=e[n],o=a[a.length-1];if(r.family!==i.family)continue;let s=1===r.value&&[...t].some(e=>e>o.line&&e<r.line);(r.value===o.value+1||s)&&a.push(r)}a.length>n.length&&(n=a)}return n}function g(e,t,n){return!!h.test(e)||!!t&&"cn"===t.family&&"cn"!==n&&null!==n&&(e.length<=40||d.test(e.slice(0,20)))}function m(e){let t=e.match(c);if(!t)return null;let n=Number(t[1]),r=Number(t[2]);return n<=r?{from:n,to:r}:null}e.s(["S",0,60,"i",0,2e4,"J",0,function(e,n={}){let r=e.length>2e4,d=e.slice(0,2e4).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),w=d.map(e=>e?i(e):null),y=d.length;for(let e=0;e<d.length;e++)if(l.test(d[e])){y=e;break}let x=[],v=[];for(let e=0;e<y;e++){let t=w[e];t&&("cn"===t.family?v:x).push({...t,line:e})}let b=new Set;for(let e=0;e<y;e++)(h.test(d[e])||w[e]?.family==="cn")&&b.add(e);let C=f(x,b);if(C.length<2){let e=f(v,new Set);e.length>=2&&(C=e)}let D=a(d.slice(0,y)),k=y<d.length?p(d.slice(y)):[],E=e=>({questions:D?[{label:null,text:D,material:null,section:null}]:[],ignored:k,detected:!1,ambiguous:e,candidateCount:e?C.length:+!!D,overflow:0,tooLong:r});if(C.length<2)return E(!1);let M=C[0].family;if(!n.forceNumbered&&function(e,t,n,r){let i=null;for(let a=t-1;a>=0;a--)if(e[a]){i=g(e[a],r[a],n)?null:e[a];break}return!(!i||o.test(i)||c.test(i))&&("paren"===n?i.length>=15||/[。?!?!::,,;;]$/.test(i):/[::]$/.test(i)&&u.test(i))}(d,C[0].line,M,w))return E(!0);let R=new Set(C.map(e=>e.line)),I=[],j=[],N=null,P=[],S=[],_=(e,t)=>{for(let n of p(e))(!o.test(n)||!(n.length<80))&&(s.test(n)||n.length>=80&&/[。!?.!?;;]/.test(n))?P.push({text:n,range:m(n)}):t?I.push(n):N&&!j.some(e=>e.section===N)?N=`${N}
|
|
7
|
+
${n}`:I.push(n)},$=C[0].line,A=[];for(let e=0;e<$;e++)d[e]&&g(d[e],w[e],M)?(_(A.splice(0),!0),N=d[e],S=[]):A.push(d[e]);_(A,!0);for(let e=0;e<C.length;e++){let n=C[e].line,r=e+1<C.length?C[e+1].line:y;P.length&&(S=[...S.filter(e=>e.range),...P],P=[]);let o=r,l=null;for(let e=n+1;e<r;e++)if(d[e]&&!R.has(e)&&g(d[e],w[e],M)){o=e,l=d[e];break}let h=d.slice(n,o),c=p(h),u=[];for(;c.length>1&&s.test(c[c.length-1].slice(0,30));)u.unshift(c.pop());let f=u.length?c.join("\n"):a(h),x=C[e].value,v=S.filter(e=>!e.range||x>=e.range.from&&x<=e.range.to);for(let n of(j.push({label:C[e].label,text:function(e){let n=e.split("\n"),r=n[0]?.replace(t,"")??"",a=i(r);return a&&"cn"!==a.family&&(n[0]=r.slice(a.prefixLength)),n.join("\n")}(f),material:v.length?v.map(e=>e.text).join("\n\n"):null,section:N}),u))P.push({text:n,range:m(n)});null!==l&&(N=l,S=[],_(d.slice(o+1,r),!1))}let L=j.slice(60);return{questions:j.slice(0,60),ignored:[...I,...k,...L.map(e=>{var t;let n,r;return n=(t=e).text.trim(),(r=t.material?.trim())?`${r}
|
|
8
|
+
|
|
9
|
+
${n}`:n})],detected:!0,ambiguous:!1,candidateCount:j.length,overflow:L.length,tooLong:r}}],825624);var w=e.i(41931),y=e.i(116331);async function x(e){let t;for(let n=0;n<3;n++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===n)break;await new Promise(e=>setTimeout(e,1e3*(n+1)))}throw t}async function v(e,t=(0,y.c)()){let{batch:n}=await x(()=>w.k.post("/api/import-batches",{...e,clientRequestId:t,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4}));return(0,y.P)(),n}async function b(e,t={}){let n=t.image?"?include=image":"",{batch:r}=await w.k.get(`/api/import-batches/${encodeURIComponent(e)}${n}`);return r}async function C(e,t,n){let{batch:r}=await w.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:t,draft:n});return r}async function D(e,t,n){let{batch:r}=await x(()=>w.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:t,images:n},{timeout:12e4}));return(0,y.P)(),r}async function k(e){let{batch:t}=await w.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,y.P)(),t}async function E(e){let t=await w.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,y.P)(),t}async function M(e){await w.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,y.P)()}async function R(e){await w.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,y.P)()}async function I(){try{return!!(await w.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function j(e,t){let n=await w.k.post("/api/error-items",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,subjectId:t.subjectId||void 0,subjectName:t.subjectId?void 0:e.subject,originalImageUrl:t.imageUrl||"",paperLevel:t.paperLevel||void 0});return{id:n.id,shortId:n.shortId??null,subjectId:n.subjectId??null,notebookName:n.subject?.name??null,duplicate:n.duplicate}}e.s(["J",0,E,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,v,"o",0,M,"w",0,b,"f",0,R,"s",0,k,"S",0,C,"g",0,D],575557),e.i(201276),e.s(["x",0,I,"a",0,j],364002)}])})();
|