wrong-notebook 2026.11.4-2 → 2026.11.4-4
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 +1 -0
- package/.next/build-manifest.json +3 -3
- package/.next/routes-manifest.json +6 -0
- 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 +8 -6
- package/.next/server/app/api/admin/cnm-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js +16 -14
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/debug-logs/export/route.js +7 -6
- 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 +6 -5
- 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 -3
- 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 -5
- 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 -14
- 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 +7 -5
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js +8 -7
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +15 -14
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +16 -13
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +15 -14
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +20 -18
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- 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 -5
- 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 +20 -18
- 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 +18 -16
- 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 +20 -17
- 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 +6 -5
- 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 +8 -5
- 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 +5 -4
- 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 +18 -15
- 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 +18 -16
- 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 +13 -9
- 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 +18 -15
- 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 +18 -15
- 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.js +6 -6
- package/.next/server/app/api/error-items/answer-space/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/batch-delete/route.js +8 -5
- 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 -5
- package/.next/server/app/api/error-items/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route/app-paths-manifest.json +3 -0
- package/.next/server/app/api/error-items/export-questions/route/build-manifest.json +12 -0
- package/.next/server/app/api/error-items/export-questions/route/server-reference-manifest.json +4 -0
- package/.next/server/app/api/error-items/export-questions/route.js +17 -0
- package/.next/server/app/api/error-items/export-questions/route.js.map +5 -0
- package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -0
- package/.next/server/app/api/error-items/export-questions/route_client-reference-manifest.js +3 -0
- package/.next/server/app/api/error-items/list/route.js +8 -7
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +22 -21
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/short/[shortId]/route.js +5 -4
- 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 +4 -3
- 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 +20 -18
- 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 +19 -18
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +18 -17
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +21 -19
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +20 -19
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js +9 -7
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +18 -16
- package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/health/route.js.nft.json +1 -1
- package/.next/server/app/api/import/route.js +22 -20
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +25 -22
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js +19 -18
- package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/read/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/retry/route.js +25 -22
- package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/start/route.js +27 -24
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +27 -24
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/read/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/retry/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/route.js +25 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +27 -24
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js +6 -4
- 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 +6 -5
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +7 -6
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +18 -17
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js +8 -4
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js +8 -6
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +21 -19
- 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 +4 -3
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +18 -16
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +15 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +18 -16
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +16 -14
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +19 -17
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js +5 -5
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/register/status/route.js +5 -5
- package/.next/server/app/api/register/status/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js +5 -4
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js +17 -15
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js +8 -7
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js +7 -6
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js +7 -6
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js +5 -5
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js +7 -6
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js +17 -16
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js +17 -16
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js +7 -4
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- 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 +9 -8
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +10 -9
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js +11 -10
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +11 -10
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +16 -15
- package/.next/server/app/api/user/route.js.nft.json +1 -1
- 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/import-batches/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/import-tasks/page.js.nft.json +1 -1
- package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
- 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/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 +1 -0
- package/.next/server/chunks/1oeh_server_app_api_error-items_export-questions_route_actions_02nsquej76mp1.js +3 -0
- package/.next/server/chunks/[externals]__1j5vgk-wr4vpe._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0-d_vh1kcmw7g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__001wdwos9fkgg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__00cl_lnn-40t3._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05tyrbfzivoeq._.js → [root-of-the-server]__00w9qhjl8kvr4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__01-14hxale6jz._.js → [root-of-the-server]__00w_kxg7h-9_p._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00x5ad3w5zwfp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__01rm65xnqj0z-._.js → [root-of-the-server]__01jxyfokd6l4_._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__02nbzp-n9g9_o._.js → [root-of-the-server]__025dluj5es8w4._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09pkxauucdf_0._.js → [root-of-the-server]__02fu_lp66613e._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__04w57bdna9ax0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0z0knsep33lsx._.js → [root-of-the-server]__05a4j8yu5_bg1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__006u92h_madgn._.js → [root-of-the-server]__05pxdy586nh8a._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0n5l60oyv1n-1._.js → [root-of-the-server]__06i2kswg2zb80._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__07i32k2sv285o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0k4cyyyh6z6_p._.js → [root-of-the-server]__0855dkhk7zs77._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0lqv0n5j2fg24._.js → [root-of-the-server]__08iizowhy6p3l._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1eu_g0k_nr3i-._.js → [root-of-the-server]__094ybs6y_fmt5._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__09aolocrwucnt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_le78e9b2yno._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0_uup9ppknahw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0b8rxaox_x2n1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bvf731upd2_w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cgpuhmu87blm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0dqy62vnjwvwp._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0bmczgpuggwki._.js → [root-of-the-server]__0ef-17j7yp2n5._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ej9lsrmus5m4._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__0fdkyswheen4o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0eba9rni-2_tw._.js → [root-of-the-server]__0fhi9g3nqu6k3._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0fx0s5_6sjw-d._.js → [root-of-the-server]__0g3w0_9__ljck._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0g848ha1gy56h._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ig1r6paxqzt0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0j7ua4rsijb4c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0jh610iscvrmp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0imuc7gi1ii-e._.js → [root-of-the-server]__0l3io0vyav4if._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0l7jho_lr2z5g._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0llbkrw8l2ib9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0mfr1ne23y4yo._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0geynfn2xmdle._.js → [root-of-the-server]__0mslax132s9jp._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0nin5p-dwlpf9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0nye-53zadylr._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0p8cwd_go8pid._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0pojh2d6n1kp6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rspref34j958._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tsi6_qmtro9q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0u1fu9dvxmlxd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ujhx0glgcxja._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__029n0r2v92pcc._.js → [root-of-the-server]__0v8mfczhz1ax1._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0vf3rgatj1f3u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vt48u-0ebzdv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0w9f5-xtpane-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wea836zkhvlj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wex3czgya39o._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0x8ehtaj_x2pf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0xobqdj2u2s67._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0y3ui5-k9baec._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0yq7jm5ja3r6t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zrg03ldx65tk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-1ld657rjip5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1-6r_3pmgkz13._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10ngcci8pf29l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11-fk0-4iuf_k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11x5u4zg5i2c6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__120o1w9mcwgta._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12f6t_ozjtn42._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13a3izu1xb4m4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1kiolpvl5u4e-._.js → [root-of-the-server]__14e45mqzb1vjt._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__14jf33wwjqbw1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14n0eki4tdk02._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15a3t94ps7jx2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15dipxocczlvx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__15r55xy6cyrg3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17ed9rw-rhun-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19kic_glbz32b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ae5zzeo8_c2s._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1b-acwmm5hhg0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1d6ftxzea6h0a._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dovdb1wrr_0e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e7_e83zxstdw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e81i8l09skcp._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f0zocrmsd5p8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1f5_yaclxhuvj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gf_vv57qtjh0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hn69stngi4kc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hnyj47zdzrxo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1k0fuhrt1iiad._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1kxecl8v-_px5._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1l6v9x8xm11pl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1m8m5io-tr21e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1pfhgjwnx_--j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1r5lj-ffov9r0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1rxi33p9h8zrj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1uqnotrppylmw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1utvl-1o6mb8y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vc89u7_xxhyf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1x_kq-6h3utmo._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xqcu4ft3d7id._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xuw793xxu29t._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yaf9vp_o6cro._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ybmwcbaqk63j._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yyezurgy7e3k._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z4-5hlzq34fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1z9hl9qdokxpu._.js +3 -0
- package/.next/server/chunks/_0-ne-bwuvd_6w._.js +1 -1
- package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
- package/.next/server/chunks/_01bayc6kg7upi._.js +1 -1
- package/.next/server/chunks/_029zt0rilrwvt._.js +1 -1
- package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- package/.next/server/chunks/_04vbgvl2gl5bc._.js +3 -0
- package/.next/server/chunks/_055vhdh_7iydn._.js +3 -0
- package/.next/server/chunks/_05ans30vcd4s-._.js +1 -1
- package/.next/server/chunks/{_04rjm4ctjqrba._.js → _06pseal2zu-71._.js} +2 -2
- package/.next/server/chunks/_076-jjzrfdsdk._.js +1 -1
- package/.next/server/chunks/_07amw8ha9rney._.js +1 -1
- package/.next/server/chunks/{_1fki7pamd4s-7._.js → _087uva8dkvxwz._.js} +2 -2
- package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
- package/.next/server/chunks/_09o9zamz75n5d._.js +1 -1
- package/.next/server/chunks/_0_3_65z6ak-5i._.js +1 -1
- package/.next/server/chunks/_0_5s2mrhxb3-u._.js +3 -0
- package/.next/server/chunks/_0_e736ff6uhew._.js +1 -1
- package/.next/server/chunks/_0anbzuivml30d._.js +1 -1
- package/.next/server/chunks/{_0edfmbz_jbxsu._.js → _0b9gke5b17vzh._.js} +2 -2
- package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
- package/.next/server/chunks/_0gxi3zrkhyvx_._.js +1 -1
- package/.next/server/chunks/_0h1rbua_hqkox._.js +1 -1
- package/.next/server/chunks/_0hk9z9rqga4x-._.js +1 -1
- package/.next/server/chunks/_0i58-g30ox5-8._.js +3 -0
- package/.next/server/chunks/_0kjatc7pcrkvz._.js +1 -1
- package/.next/server/chunks/_0kreo-8xn80hb._.js +1 -1
- package/.next/server/chunks/_0l2j3br2g32zp._.js +1 -1
- package/.next/server/chunks/_0lepv-j_r8kfv._.js +3 -0
- package/.next/server/chunks/_0lmh33cdt_1fr._.js +1 -1
- package/.next/server/chunks/_0lob14xk0ko5z._.js +1 -1
- package/.next/server/chunks/_0mt2ctbvzfero._.js +1 -1
- package/.next/server/chunks/_0numcpxd_n25x._.js +3 -0
- package/.next/server/chunks/_0p-sas2zxy3iv._.js +1 -1
- package/.next/server/chunks/_0po48rvqz03dg._.js +1 -1
- package/.next/server/chunks/_0pzdohc1mz5ts._.js +1 -1
- package/.next/server/chunks/_0qaoat396e0_3._.js +1 -1
- package/.next/server/chunks/_0r8u30vd4lix4._.js +3 -0
- package/.next/server/chunks/_0r9ejvgz0l0-0._.js +1 -1
- package/.next/server/chunks/_0s8v0xiwcw6od._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +1 -1
- package/.next/server/chunks/_0ta62b-tktnk8._.js +3 -0
- package/.next/server/chunks/{_03dn7v_h3d-v8._.js → _0tkov27xr068i._.js} +11 -7
- package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
- package/.next/server/chunks/_0tz5wpjdgntj3._.js +1 -1
- package/.next/server/chunks/_0wegi_sv1s4wx._.js +1 -1
- package/.next/server/chunks/_0xv7-7d6dyo9-._.js +1 -1
- package/.next/server/chunks/_0xx4y9tk1qclc._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_11w6ynlxuzl55._.js +1 -1
- package/.next/server/chunks/_12fz_vwm9jemi._.js +3 -0
- package/.next/server/chunks/_12i51zlq-xxrl._.js +1 -1
- package/.next/server/chunks/_12w5k19rc45j_._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +3 -0
- package/.next/server/chunks/_13ffmxv8qrwi0._.js +1 -1
- package/.next/server/chunks/_14w9nrdlajz24._.js +1 -1
- package/.next/server/chunks/_15fpgekhvv214._.js +1 -1
- package/.next/server/chunks/{_043-r529chcri._.js → _1638xaazsmf2m._.js} +11 -7
- package/.next/server/chunks/_1647rfjflw_iq._.js +1 -1
- package/.next/server/chunks/_16jdov0rxh99d._.js +1 -1
- package/.next/server/chunks/_17zw8m241gfs3._.js +1 -1
- package/.next/server/chunks/_18amra5328v90._.js +1 -1
- package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
- package/.next/server/chunks/_1_273cgnpyl9j._.js +1 -1
- package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
- package/.next/server/chunks/_1a1udq0c4_6ad._.js +1 -1
- package/.next/server/chunks/_1ab7h8-how0le._.js +3 -0
- package/.next/server/chunks/_1ahi8466v1b3l._.js +1 -1
- package/.next/server/chunks/_1almac7c09mp4._.js +3 -0
- package/.next/server/chunks/_1b-7g4thtxfnp._.js +3 -0
- package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
- package/.next/server/chunks/_1b7qjlv0nxovi._.js +1 -1
- package/.next/server/chunks/_1be-y660a8z-q._.js +1 -1
- package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
- package/.next/server/chunks/_1e8w9uuebtrcb._.js +1 -1
- package/.next/server/chunks/_1ev3hw7jrpp8r._.js +3 -0
- package/.next/server/chunks/_1gdet1v2zk2gy._.js +1 -1
- package/.next/server/chunks/_1hj7iit2u6xez._.js +1 -1
- package/.next/server/chunks/_1hp9mnz19v199._.js +1 -1
- package/.next/server/chunks/_1j10upti9l6da._.js +1 -1
- package/.next/server/chunks/_1j8kqz21_i728._.js +1 -1
- package/.next/server/chunks/_1lesklvhr_pfq._.js +3 -0
- package/.next/server/chunks/_1muwmr6j76v3m._.js +1 -1
- package/.next/server/chunks/_1pvqo-qnv-nqm._.js +1 -1
- package/.next/server/chunks/_1q65ai1_dwgjp._.js +1 -1
- package/.next/server/chunks/_1qcv4muwnx82-._.js +3 -0
- package/.next/server/chunks/_1s5-ldt8xhtpp._.js +1 -1
- package/.next/server/chunks/_1s55l1bx-1cxp._.js +1 -1
- package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
- package/.next/server/chunks/_1srq5kxah38r6._.js +1 -1
- package/.next/server/chunks/_1t632kndbc0tj._.js +3 -0
- package/.next/server/chunks/_1tahh9ric8la3._.js +1 -1
- package/.next/server/chunks/_1tvl0cm629nyc._.js +1 -1
- package/.next/server/chunks/_1u6r2cuueltfn._.js +3 -0
- package/.next/server/chunks/{_1-6i59jd1zhly._.js → _1vddun9dxzaqo._.js} +11 -7
- package/.next/server/chunks/_1xpj9uk-9zhl8._.js +1 -1
- package/.next/server/chunks/_1xx5l4x084brt._.js +3 -0
- package/.next/server/chunks/_1z_ujac_e_65s._.js +1 -1
- package/.next/server/chunks/_1zbkha-v5mkk0._.js +3 -0
- package/.next/server/chunks/_1zvf_gki7-g0n._.js +1 -1
- package/.next/server/chunks/{_0r0hnbjdq-k9-._.js → _20snsd6f1xc63._.js} +2 -2
- package/.next/server/chunks/_20tjujotvor53._.js +1 -1
- package/.next/server/chunks/node_modules_zod_v4_classic_external_0qoqh-q5drsgn.js +4 -4
- package/.next/server/chunks/node_modules_zod_v4_classic_external_14kwlambv9opd.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_17gmk506tz413.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1b_q1zc0x8d76.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1exeae-p81c94.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1giv406od1whf.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1wq100x5o7-hi.js +3 -0
- package/.next/server/chunks/node_modules_zod_v4_classic_external_1x8fhte3frhrw.js +3 -0
- package/.next/server/chunks/src_lib_0dxltm34zaclb._.js +3 -0
- package/.next/server/chunks/src_lib_0g4wu08m-gibu._.js +3 -0
- package/.next/server/chunks/src_lib_0l0j89xrerf8m._.js +3 -0
- package/.next/server/chunks/src_lib_0osgsup3n2ypg._.js +3 -0
- package/.next/server/chunks/src_lib_0so-2topfosjo._.js +3 -0
- package/.next/server/chunks/src_lib_0whd_w99i5vmm._.js +3 -0
- package/.next/server/chunks/src_lib_0z4je8wchtdws._.js +3 -0
- package/.next/server/chunks/src_lib_0zeksho3data7._.js +3 -0
- package/.next/server/chunks/src_lib_15op6xa369-51._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +143 -131
- package/.next/server/chunks/src_lib_1d0nldjpxxl8t._.js +3 -0
- package/.next/server/chunks/src_lib_1d99xj4d-pofa._.js +3 -0
- package/.next/server/chunks/src_lib_1v7rk87xys5cb._.js +3 -0
- package/.next/server/chunks/src_lib_1w0niu4i8hnaq._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- package/.next/server/chunks/src_lib_exam_1vzmn90_kh7eg._.js +3 -0
- package/.next/server/chunks/src_lib_exam_exam_ts_18c3t7bnr1z5k._.js +3 -0
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +5 -0
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +3 -0
- package/.next/server/chunks/src_lib_mastery-status_ts_0e9jnp-14tby5._.js +3 -0
- package/.next/server/chunks/src_lib_minimax-code_checkin_ts_1j1mpuxc1vgoz._.js +1 -1
- package/.next/server/chunks/src_lib_notebook-scope_ts_06eipvr6xztlf._.js +3 -0
- package/.next/server/chunks/src_lib_question_0uw17e6at-i_h._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +3 -0
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +3 -0
- package/.next/server/chunks/src_lib_recoverable-response_ts_00y54idhlj_0e._.js +3 -0
- package/.next/server/chunks/src_lib_schemas_error-items_ts_0vdof4417rd3y._.js +3 -0
- package/.next/server/chunks/src_lib_short-id_0adg7-htn2dq_._.js +3 -0
- package/.next/server/chunks/src_lib_svg-animation_ts_0-noskwg6sysg._.js +3 -0
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +3 -0
- package/.next/server/chunks/src_lib_tags_seed_1_ej3w-2450a0._.js +3 -0
- package/.next/server/chunks/src_lib_tts_19zri-v8-l_4u._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__032-uso7x2eqk._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0ks-9bza_y-tn._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0te5kr0_7nmrv._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0uezowk-9l0x4._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0x4us8rfvt68s._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0mqo18mv_ooyq._.js → [root-of-the-server]__0xjcdrflb40xr._.js} +2 -2
- package/.next/server/chunks/ssr/{[root-of-the-server]__0x_ihemma9171._.js → [root-of-the-server]__0z7upqzuqtse6._.js} +2 -2
- package/.next/server/chunks/ssr/[root-of-the-server]__10y8dor72926b._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__12jk2bmesr4gc._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__1rrcp_77jpv98._.js +3 -0
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +3 -0
- package/.next/server/chunks/ssr/_0cmd1ubdlo_by._.js +1 -1
- package/.next/server/chunks/ssr/_0fp_p60hb9ex8._.js +3 -0
- package/.next/server/chunks/ssr/_0gsk7ce3mjc-h._.js +3 -0
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +32 -0
- package/.next/server/chunks/ssr/{_01qu892bisrf0._.js → _0j-r3zhz2ucmg._.js} +2 -2
- package/.next/server/chunks/ssr/_0m1jjbrzk71io._.js +3 -0
- package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +1 -1
- package/.next/server/chunks/ssr/_0rd-teluypcd2._.js +1 -1
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +3 -0
- package/.next/server/chunks/ssr/{_186fwf-hcr_ua._.js → _101w__e2w9gr0._.js} +2 -2
- package/.next/server/chunks/ssr/_126p5i1ynlykc._.js +3 -0
- package/.next/server/chunks/ssr/_127aw5h992s9d._.js +4 -0
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +1 -1
- package/.next/server/chunks/ssr/_1bhvzfiuz3s7j._.js +3 -0
- package/.next/server/chunks/ssr/_1d3pxsso6zv_w._.js +3 -0
- package/.next/server/chunks/ssr/_1hp3fw-gk2r-3._.js +3 -0
- package/.next/server/chunks/ssr/_1k45xb7mu-emd._.js +3 -0
- package/.next/server/chunks/ssr/_1lltqgoq4vqfe._.js +3 -0
- package/.next/server/chunks/ssr/_1ore70w45768b._.js +3 -0
- package/.next/server/chunks/ssr/{_1xv0q8o3g3r5d._.js → _1s3gqrczubor-._.js} +2 -2
- package/.next/server/chunks/ssr/_1t-o815u40ng2._.js +3 -0
- package/.next/server/chunks/ssr/{_1pdnzaad7hk0d._.js → _1x_zn17exkc4t._.js} +2 -2
- package/.next/server/chunks/ssr/_1yclgq1umgl4p._.js +4 -0
- package/.next/server/chunks/ssr/node_modules_08vtqzu_wfcb5._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_0y-9u3ez_29oz._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_109z-y1z_gtxg._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_docx_dist_index_mjs_07znba89yz2vi._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_0byqh-lbfcigr.js → node_modules_heic-to_dist_csp_heic-to_1_jdv4y0yz52i.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_19_dv9gdzg_e7.js → node_modules_heic-to_dist_csp_heic-to_1zqrtb3kykd7q.js} +1 -1
- package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_printer_mjs_0jbt269gi19_7._.js +3 -0
- package/.next/server/chunks/ssr/node_modules_pdfjs-dist_build_pdf_mjs_0z37jkkqfce7_._.js +47 -0
- package/.next/server/chunks/ssr/node_modules_read-excel-file_universal_index_0ayslfrutmja5.js +3 -0
- package/.next/server/chunks/ssr/node_modules_write-excel-file_browser_index_0l2-di6rcng1b.js +3 -0
- package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_0veaboc415l0m.js +3 -3
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +3 -0
- package/.next/server/chunks/ssr/src_130ww76krpws_._.js +1 -1
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/src_1nbi4yrww3r1m._.js +3 -0
- package/.next/server/chunks/ssr/{src_1jhctayt9gxoc._.js → src_1o5f_wr8vv-x0._.js} +2 -2
- package/.next/server/chunks/ssr/src_1rmus42s388dk._.js +3 -0
- package/.next/server/chunks/ssr/src_1seqsa8jiwu83._.js +3 -0
- package/.next/server/chunks/ssr/src_1xvnkkhvub372._.js +1 -1
- 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]_page_tsx_0xcjflkgkwzgd._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_print_page_tsx_1i-xvhk8ul1l1._.js +11 -6
- package/.next/server/chunks/ssr/src_app_exams_page_tsx_17_d4_gy2i1ds._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-tasks_[id]_page_tsx_0_grj11-jdqqc._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-tasks_page_tsx_01983hytm-x08._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_add_page_tsx_179tow1ql6vc_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_[id]_page_tsx_08njm-5-txm8_._.js +1 -1
- package/.next/server/chunks/ssr/src_app_notebooks_page_tsx_1p9src5gnz_40._.js +1 -1
- package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +6 -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 +3 -3
- package/.next/server/chunks/ssr/src_components_error-list_error-item-card_tsx_1zsiqsrj-jjd7._.js +1 -1
- package/.next/server/chunks/ssr/src_components_exam_exam-figure-scale-bar_tsx_1dxk6lzvp_d28._.js +1 -1
- package/.next/server/chunks/ssr/src_components_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +15 -10
- package/.next/server/chunks/ssr/src_components_ui_switch_tsx_054tyo61pehla._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +9 -0
- package/.next/server/chunks/ssr/src_lib_api-client_ts_04r2_ex-gua5i._.js +1 -1
- package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +3 -0
- package/.next/server/chunks/ssr/src_lib_short-id_short-id-client_ts_03nnd3s0tat3l._.js +3 -0
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/01zokrwums-fz.js +55 -0
- package/.next/static/chunks/{1pdlii0oox0-7.js → 037g92rz3qjm_.js} +1 -1
- package/.next/static/chunks/040et8v6_v-s6.js +1 -0
- package/.next/static/chunks/{2cfz0fumc6ghe.js → 045cs_rolnmjd.js} +1 -1
- package/.next/static/chunks/079f88y9j6sf-.js +45 -0
- package/.next/static/chunks/0g1lk2opoyqly.js +1 -0
- package/.next/static/chunks/0ge9zqd21b4xd.js +15 -0
- package/.next/static/chunks/0gu34v572tj7o.js +1 -0
- package/.next/static/chunks/0mnb66hvp3czv.js +2 -0
- package/.next/static/chunks/0mun2h4uaj4eh.js +1 -0
- package/.next/static/chunks/{02wft51kf3t9f.js → 0ovv_fq59i4y4.js} +1 -1
- package/.next/static/chunks/0sl4wa-ghh5g7.js +2 -0
- package/.next/static/chunks/0xbohpfp7x9jn.js +1 -0
- package/.next/static/chunks/{31-r0kqqw-wfd.js → 0xwz3h9d_e7kb.js} +1 -1
- package/.next/static/chunks/{0_xcjg47jv3ur.js → 1-qu_z3i5b8ul.js} +1 -1
- package/.next/static/chunks/10hk15u8jc7o1.js +38 -0
- package/.next/static/chunks/113lhm-f9le_y.js +2 -0
- package/.next/static/chunks/{42rupczfyygo1.js → 15zro21ycjjle.js} +1 -1
- package/.next/static/chunks/{3difxy8vzqlxn.js → 1fmrzsulv-ddd.js} +1 -1
- package/.next/static/chunks/{3fh32b9da9l_5.js → 1k2m_f0nu22fb.js} +1 -1
- package/.next/static/chunks/1uso50ewx5j8v.js +1 -0
- package/.next/static/chunks/1vtq_er8xir3c.css +3 -0
- package/.next/static/chunks/1y0cjudvnz4la.js +6 -0
- package/.next/static/chunks/20f7m1txoey_w.js +1 -0
- package/.next/static/chunks/21ghhv1twe4or.js +12 -0
- package/.next/static/chunks/23h8i_poncr7i.js +1 -0
- package/.next/static/chunks/28bc-wd48lcls.js +1 -0
- package/.next/static/chunks/2acga0__tn9yl.js +1 -0
- package/.next/static/chunks/2j3bisradcgfv.js +1 -0
- package/.next/static/chunks/2lhxk-8dpncxq.js +1 -0
- package/.next/static/chunks/2xww3vrggzkc3.js +15 -0
- package/.next/static/chunks/3-5otbeiq86n5.js +1 -0
- package/.next/static/chunks/31uxxyexyu66p.js +198 -0
- package/.next/static/chunks/33z7oz1790x50.js +1 -0
- package/.next/static/chunks/37309r9ttt-oa.js +1 -0
- package/.next/static/chunks/3_w-p8241f5rv.js +1 -0
- package/.next/static/chunks/{1uaqnxl-xshw6.js → 3f9t8cne6yfyl.js} +1 -1
- package/.next/static/chunks/{3wch6vphcivq5.js → 3j92h-4k4_o_f.js} +1 -1
- package/.next/static/chunks/3jkntcd5fwsid.js +1 -0
- package/.next/static/chunks/3ldaxwwj8i1r_.js +9 -0
- package/.next/static/chunks/3nq-bgq8lumv9.js +1 -0
- package/.next/static/chunks/{4441xuc3i-yb7.js → 3rnbnqcge4lza.js} +1 -1
- package/.next/static/chunks/3t9tbm4atwmw8.js +1 -0
- package/.next/static/chunks/3u-qpv02dkpmu.js +1 -0
- package/.next/static/chunks/438pvifm_o4g_.js +1 -0
- package/.next/static/media/pdf.worker.min.0zcq5mj7t-qsr.mjs +28 -0
- package/dist-scripts/scripts/rebuild-system-tags.js +11 -107
- package/dist-scripts/scripts/seed-chinese-primary.js +1 -1
- package/dist-scripts/src/lib/logger.js +1 -0
- package/dist-scripts/src/lib/tags/seed/rebuild.js +103 -0
- package/dist-scripts/src/lib/{seed-chinese-tags.js → tags/seed/seed-chinese-tags.js} +2 -1
- package/package.json +1 -1
- package/prisma/migrations/20261104033404_add_question_type/migration.sql +2 -0
- package/prisma/migrations/20261104040208_exam_question_score/migration.sql +2 -0
- package/prisma/migrations/20261104044246_exam_group_by_question_type/migration.sql +29 -0
- package/prisma/schema.prisma +7 -0
- package/prisma/seed.db +0 -0
- package/.next/server/chunks/[root-of-the-server]__012pau7crikop._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01jc87mm42cex._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__01newhoirvvb2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__02oqd6w58wymi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__057qz9ucs7lib._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06_pvs6rg70ri._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__06jad9cnzeci-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0_uvtfu0yr-na._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0_vinl1oembls._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ahni9caaouya._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0aq01totjzgkp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5mh_vi6e246._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b5qyqwq6mk5v._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b79cd6lae7ep._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0b_zf20owrv7l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cel4yig3zcho._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0cu5jz9b3f0i1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0d818ux928r5h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0dclcdg0hwxxj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0e13o3ny66zb3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fg20m1i6x4y9._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fhy87hr0_glw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fnte1x8xdn5o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0glupa52ge074._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gphporvvjc0d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0gs7-3gi0pdws._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0i2mt6zjxbq--._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ijq_d0gr5zo8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0iqp1f0-yvbhw._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jk-9m6ra-_um._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0jvusk64khb-a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0k0c90ih7n0te._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0maxg52nxqrzi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ml-m3il4unb6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nkrql6or-tf_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0nujsu6qbn-8o._.js +0 -27
- package/.next/server/chunks/[root-of-the-server]__0ovdiut1h8kkt._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p5_lv_pjxr5f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0p8wlug4uvmvi._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ptn9j1rleieh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0r7f34_38kmvk._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0u3m78xhq8b3l._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ualui9b50ufh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ujfft7untkmq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0vw7u-y__gk7p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0w53aflmo1keg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wdjzoxwwh6bn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0wx65sza19ou-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0xj_313186tqc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0yv_kznxz5qzn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0zldj8zxo-hvc._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1-djdd7tnb-n7._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__109pj952qxtan._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__10gp75p89v9a2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__111jxitdjhuoj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__112w8xm57okk5._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12h4ckd6f76pb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__12ig6-5hpb7s-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__13_k7w8nrx7ie._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14c50fhuh_abo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14jpfgwnpc9gl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14m8fewwq1xs6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15qkqztuygnfg._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__166997w1su5wq._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__16xl11-irmhu3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19i64i9v32y8o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__19jqc7tzna13p._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1asgy7sah0mo6._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1av1l48rnghpa._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1azaa45m60iqm._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1d159cxbdta68._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dmp3ynxbcyjz._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1dom1le7wqh7d._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1e5tjfwab0exu._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1f-7-l2abs15s._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fe2v2mv5-rgo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1fepss7g57apj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ff3h7ockrpdf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g11271g0z55n._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1g6jrwm72xr8a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1he8kk4382-0h._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1hk5kgctlp2wn._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1j44_t992y-1-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4f33-z95_7c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1k4pnhbw4rgzs._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1kx3a0dm7l2wl._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1lea5m7hl1n7f._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m7pja8jp27eh._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1m_y4afrn94oy._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1ruzcenko2gi1._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1sf2oa2wkqf_0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1t6aypqxgjkg_._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1tffqae521gxo._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1to25zgnk7xk-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1u5c7agj_phnb._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1vbof6uu4he_-._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1wfhdwfdvc6j3._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1y0n2tg-0l636._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zc0bmdyn1lg4._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1zqfz2rc4i280._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__207c97dbcdb0z._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20cdqectwle3j._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__20dy4zclqbnw8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__212aaltyh6kc2._.js +0 -3
- package/.next/server/chunks/_01y7-j4vx6cu5._.js +0 -3
- package/.next/server/chunks/_0_rhee7wb6tcg._.js +0 -3
- package/.next/server/chunks/_0at03z7sgwdv3._.js +0 -3
- package/.next/server/chunks/_0ge95_bkwrkmc._.js +0 -3
- package/.next/server/chunks/_0lj59y-ytysr5._.js +0 -3
- package/.next/server/chunks/_0v762_h-sp94d._.js +0 -3
- package/.next/server/chunks/_0vshwghrjetxu._.js +0 -3
- package/.next/server/chunks/_0z0zrluul2idw._.js +0 -3
- package/.next/server/chunks/_1a1oatugfke1p._.js +0 -3
- package/.next/server/chunks/_1ex6ovo_j2jzv._.js +0 -3
- package/.next/server/chunks/_1fgb9ve_nfat4._.js +0 -3
- package/.next/server/chunks/_1fsfy4c3rj36b._.js +0 -3
- package/.next/server/chunks/_1hc_es1a3cl6a._.js +0 -3
- package/.next/server/chunks/_1m-yyz-pl9-03._.js +0 -3
- package/.next/server/chunks/_1ns6y6y2tq8sh._.js +0 -3
- package/.next/server/chunks/_1yujnc0thk8ab._.js +0 -3
- package/.next/server/chunks/_211va-dk9519v._.js +0 -3
- package/.next/server/chunks/src_lib_0_g_0q-n01g-x._.js +0 -3
- package/.next/server/chunks/src_lib_0au5a9-5rxkab._.js +0 -3
- package/.next/server/chunks/src_lib_0d7kmnt7v2np8._.js +0 -3
- package/.next/server/chunks/src_lib_0fedb0fkc3km1._.js +0 -3
- package/.next/server/chunks/src_lib_0okewfjk6p2ci._.js +0 -3
- package/.next/server/chunks/src_lib_0ptvn4_15zxu0._.js +0 -3
- package/.next/server/chunks/src_lib_0rb6u4i7kn30r._.js +0 -3
- package/.next/server/chunks/src_lib_0svj7bkzyw9oc._.js +0 -3
- package/.next/server/chunks/src_lib_10is5pyogge95._.js +0 -3
- package/.next/server/chunks/src_lib_12j7n__96zd0q._.js +0 -3
- package/.next/server/chunks/src_lib_13hd5uoi-53hn._.js +0 -3
- package/.next/server/chunks/src_lib_1chbt4n9_vpoj._.js +0 -3
- package/.next/server/chunks/src_lib_1geq39r7va9gy._.js +0 -3
- package/.next/server/chunks/src_lib_1h4xeb9lyx31r._.js +0 -3
- package/.next/server/chunks/src_lib_1mno8g5cqmaet._.js +0 -3
- package/.next/server/chunks/src_lib_1qvj-3jt4jbq7._.js +0 -3
- package/.next/server/chunks/src_lib_1smlosz37xitx._.js +0 -3
- package/.next/server/chunks/src_lib_1squodf4swo_a._.js +0 -3
- package/.next/server/chunks/src_lib_1uei_xjjj3g7_._.js +0 -3
- package/.next/server/chunks/src_lib_1vt5vsj108u_q._.js +0 -3
- package/.next/server/chunks/src_lib_api-errors_ts_1gfd4ojz7efro._.js +0 -3
- package/.next/server/chunks/src_lib_exam_ts_0d3a4q4r41hcf._.js +0 -3
- package/.next/server/chunks/src_lib_figure-scale_ts_215n0ebzz7mr7._.js +0 -3
- package/.next/server/chunks/src_lib_import-batches_ts_0aekmggdwo_9-._.js +0 -3
- package/.next/server/chunks/src_lib_import-tasks_ts_1f4ejsy00-v1t._.js +0 -3
- package/.next/server/chunks/src_lib_question-analysis_ts_15_8r_pxmtd06._.js +0 -3
- package/.next/server/chunks/src_lib_question-deduplication_ts_1p1bik-vwl9ue._.js +0 -3
- package/.next/server/chunks/src_lib_retag_ts_0eu8ld_86kt3a._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__00_c9kpvx5075._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__03208_liub81h._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__08j-3_6cl3898._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0ht0nkzazbnl9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0r18qmblwuijm._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0sb3jhytba2xr._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__1o5pa8m50qyqa._.js +0 -3
- package/.next/server/chunks/ssr/_01rfvhncgnpvl._.js +0 -3
- package/.next/server/chunks/ssr/_0qgs--x99c558._.js +0 -3
- package/.next/server/chunks/ssr/_0w83jztp72o20._.js +0 -3
- package/.next/server/chunks/ssr/_0zacgi5-qgqwr._.js +0 -3
- package/.next/server/chunks/ssr/_11820i-k62560._.js +0 -3
- package/.next/server/chunks/ssr/_1a4u3f5sc05kb._.js +0 -3
- package/.next/server/chunks/ssr/_1j3yr2arbxd6a._.js +0 -3
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +0 -3
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +0 -32
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_02k42jp0_uoqr._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_17lx40fyvpom3._.js +0 -3
- package/.next/server/chunks/ssr/node_modules_react-image-crop_dist_index_0khmp4mv3j9zr.js +0 -3
- package/.next/server/chunks/ssr/src_0z149pjrheeb7._.js +0 -3
- package/.next/server/chunks/ssr/src_1vhiktxz2_jj3._.js +0 -3
- package/.next/server/chunks/ssr/src_components_exam_exam-status-badge_tsx_0rozdbhlqsq71._.js +0 -3
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +0 -3
- package/.next/server/chunks/ssr/src_lib_0-wirad5ziskp._.js +0 -6
- package/.next/server/chunks/ssr/src_lib_1vv0-aje_e-zh._.js +0 -6
- package/.next/server/chunks/ssr/src_lib_short-id-client_ts_1v7n6pg50kguj._.js +0 -3
- package/.next/static/chunks/0-hqh6zs3hidn.js +0 -12
- package/.next/static/chunks/02xikk3wlibg1.js +0 -1
- package/.next/static/chunks/0e6ximjg-pqgt.js +0 -1
- package/.next/static/chunks/0wcwopwk4us6h.js +0 -9
- package/.next/static/chunks/0x9-b30mhne-_.js +0 -1
- package/.next/static/chunks/0y5zywo-ll2w3.js +0 -1
- package/.next/static/chunks/17-num1x7o1m2.js +0 -1
- package/.next/static/chunks/1746y345zti-9.js +0 -33
- package/.next/static/chunks/17dk_oppf9-hv.js +0 -12
- package/.next/static/chunks/1egd1e1483_lj.js +0 -1
- package/.next/static/chunks/1o_q928xcfjs3.js +0 -1
- package/.next/static/chunks/25flylmb_qz91.js +0 -1
- package/.next/static/chunks/2924d0kl-68z7.js +0 -193
- package/.next/static/chunks/2cpsg6e2vg7fx.css +0 -3
- package/.next/static/chunks/2ebh36q8lvor_.js +0 -1
- package/.next/static/chunks/2j0linvpqza7u.js +0 -55
- package/.next/static/chunks/2qqyq-iqkv_oa.js +0 -9
- package/.next/static/chunks/2r5aeenvfl93p.js +0 -1
- package/.next/static/chunks/38vt_4ntvy02e.js +0 -1
- package/.next/static/chunks/3c3cp7uzfhnyr.js +0 -1
- package/.next/static/chunks/3gy-_kb72v5lr.js +0 -1
- package/.next/static/chunks/3oz37kz8n7y3b.js +0 -1
- package/.next/static/chunks/3s_fq__cff-ps.js +0 -2
- package/.next/static/chunks/3tv07cyoo_hat.js +0 -1
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_buildManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{E10D9dv115hLNvX7vE6qA → bFQJMw9c1NJ6NSOY8pN2N}/_ssgManifest.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/biology.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chemistry.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/chinese.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/english.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/geography.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/history.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/index.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math-gaosi.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/math.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/physics.js +0 -0
- /package/dist-scripts/src/lib/{tag-data → tags/data}/politics.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,470152,e=>{function t(e,[n,r]){return Math.min(r,Math.max(n,e))}(0,Object.defineProperty)(t,"name",{value:"clamp",configurable:!0}),e.s(["f",0,t])},75830,586318,e=>{var t=e.i(271645),n=e.i(30030),r=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,n.f)(l),[c,f]=a(l,{collectionRef:{current:null},itemMap:new Map}),d=s(e=>{let{scope:n,children:r}=e,o=t.useRef(null),l=t.useRef(new Map).current;return(0,i.jsx)(c,{scope:n,itemMap:l,collectionRef:o,children:r})},"CollectionProvider");d.displayName=l;let p=e+"CollectionSlot",h=(0,o.B)(p),m=t.forwardRef((e,t)=>{let{scope:n,children:o}=e,l=f(p,n),a=(0,r.f)(t,l.collectionRef);return(0,i.jsx)(h,{ref:a,children:o})});m.displayName=p;let v=e+"CollectionItemSlot",g="data-radix-collection-item",y=(0,o.B)(v),w=t.forwardRef((e,n)=>{let{scope:o,children:l,...a}=e,s=t.useRef(null),u=(0,r.f)(n,s),c=f(v,o);return t.useEffect(()=>(c.itemMap.set(s,{ref:s,...a}),()=>void c.itemMap.delete(s))),(0,i.jsx)(y,{...{[g]:""},ref:u,children:l})});function b(n){let r=f(e+"CollectionConsumer",n);return t.useCallback(()=>{let e=r.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${g}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])}return w.displayName=v,s(b,"useCollection"),[{Provider:d,Slot:m,ItemSlot:w},b,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,n){let r=this.has(t),o=r?this.size:this.size+1,i=h(e),l=i>=0?Math.min(i,o-1):Math.max(o+i,0);if(r?this.#e.indexOf(t)===l:l===this.size)return this.set(t,n),this;let a=this.#e.filter(e=>e!==t);a.splice(l,0,t);let s=a.map(e=>[e,e===t?n:this.get(e)]);for(let[e,t]of(this.clear(),s))this.set(e,t);return this}with(t,n,r){let o=new e(this);return o.insert(t,n,r),o}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);if(-1===r)return this;let o=this.#e.indexOf(t);return this.insert(-1!==o&&o<r?r-1:r,t,n)}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,n){let r=this.#e.indexOf(e);if(-1===r)return this;let o=this.#e.indexOf(t);return this.insert(-1!==o&&o<=r?r:r+1,t,n)}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 n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(-1===n)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return -1}filter(t,n){let r=[],o=0;for(let e of this)Reflect.apply(t,n,[e,o,this])&&r.push(e),o++;return new e(r)}map(t,n){let r=[],o=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,o,this])]),o++;return new e(r)}reduce(...e){let[t,n]=e,r=e.length>1;if(!r&&0===this.size)throw TypeError("Reduce of empty OrderedDict with no initial value");let o=0,i=n;for(let e of this)i=0!==o||r?Reflect.apply(t,this,[i,e,o,this]):e,o++;return i}reduceRight(...e){let[t,n]=e,r=e.length>1;if(!r&&0===this.size)throw TypeError("Reduce of empty OrderedDict with no initial value");let o=n;for(let e=this.size-1;e>=0;e--){let n=this.entryAt(e);o=e!==this.size-1||r?Reflect.apply(t,this,[o,n,e,this]):n}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,n]of(this.clear(),t))this.set(e,n);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 n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e;for(let e of this.#e.slice(t,n))r.set(e,this.get(e));return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function d(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);let n=p(e,t);return -1===n?void 0:e[n]}function p(e,t){let n=e.length,r=h(t),o=r>=0?r:n+r;return o<0||o>=n?-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 n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}function v(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function g(e){let t;for(let n of e.keys()){if(t){let e=t.compareDocumentPosition(n);if(!(e&Node.DOCUMENT_POSITION_DISCONNECTED)&&e&Node.DOCUMENT_POSITION_PRECEDING)return!1}t=n}return!0}function y(e,t){return e[1].element&&t[1].element?v(e[1].element,t[1].element)?-1:1:0}function w(e){return new MutationObserver(t=>{for(let n of t)if("childList"===n.type)return void e()})}s(d,"at"),s(p,"toSafeIndex"),s(h,"toSafeInteger"),s(function(e){let a=e+"CollectionProvider",[u,c]=(0,n.f)(a),[d,p]=u(a);d.displayName=e+"CollectionStableContextProvider";let[h,v]=u(a);h.displayName=e+"CollectionStatefulContextProvider";let b=s(({state:e,...t})=>e?(0,i.jsx)(S,{...t,state:e}):(0,i.jsx)(x,{...t}),"CollectionProvider");b.displayName=a;let x=s(e=>{let t=T();return(0,i.jsx)(S,{...e,state:t})},"CollectionInit");x.displayName=e+"CollectionInit";let S=s(e=>{let{scope:n,children:o,state:l}=e,a=t.useRef(null),[s,u]=t.useState(null),c=(0,r.f)(a,u),[p,m]=l,v=t.useRef(new f),b=t.useCallback(()=>{let e=v.current;return g(e)||e.sort(y),e},[]);return t.useEffect(()=>{if(!s)return;let e=w(()=>{m(e=>{let t=e.toSorted(y);return t.some(([t],n)=>e.keyAt(n)!==t)?t:e})});return e.observe(s,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[s,m]),(0,i.jsx)(d,{scope:n,collectionElementRef:c,collectionElementRefObject:a,getCollection:b,setCollection:m,registryRef:v,children:(0,i.jsx)(h,{scope:n,collectionElement:s,collection:p,children:o})})},"CollectionProviderImpl");S.displayName=e+"CollectionProviderImpl";let E=e+"CollectionSlot",C=(0,o.B)(E),R=t.forwardRef((e,t)=>{let{scope:n,children:o}=e,l=p(E,n),a=(0,r.f)(t,l.collectionElementRef);return(0,i.jsx)(C,{ref:a,children:o})});R.displayName=E;let P=e+"CollectionItemSlot",k=(0,o.B)(P),O=t.forwardRef((e,n)=>{let{scope:o,children:a,...s}=e,u=t.useRef(null),{setCollection:c,registryRef:d}=p(P,o),h=t.useRef(s);m(h.current,s)||(h.current=s);let v=h.current,g=t.useCallback(e=>{let t=d.current;e?t.set(e,{...h.current,element:e}):u.current&&t.delete(u.current)},[d]),w=(0,r.f)(n,g,u);(0,l.f)(()=>{let e=u.current,t=d.current;e&&t.has(e)&&t.set(e,{...v,element:e})},[v,d]);let b=t.useRef(null);return t.useEffect(()=>{let e=u.current,t=b.current;((t?.element??null)!==e||e&&t?.itemData!==v)&&(b.current=e?{element:e,itemData:v}:null,c(n=>{let r=new f(n);return t&&t.element!==e&&r.delete(t.element),e&&r.set(e,{...v,element:e}),r.sort(y)}))}),t.useEffect(()=>()=>{let e=b.current;b.current=null,e&&c(t=>{if(!t.has(e.element))return t;let n=new f(t);return n.delete(e.element),n})},[c]),(0,i.jsx)(k,{"data-radix-collection-item":"",ref:w,children:a})});function T(){return t.useState(new f)}function j(t){let{collection:n}=v(e+"CollectionConsumer",t);return n}function A(t){let{getCollection:n}=p(e+"CollectionConsumer",t);return n}return O.displayName=P,s(T,"useInitCollection"),s(j,"useCollection"),s(A,"useGetCollection"),[{Provider:b,Slot:R,ItemSlot:O},{createCollectionScope:c,useCollection:j,useGetCollection:A,useInitCollection:T}]},"createCollection"),s(m,"shallowEqual"),s(v,"isElementPreceding"),s(g,"isInDocumentOrder"),s(y,"sortByDocumentPosition"),s(w,"getChildListObserver"),e.s(["f",0,u],75830);var b=Object.defineProperty,x=t.createContext(void 0);function S(e){let n=t.useContext(x);return e||n||"ltr"}b(S,"name",{value:"useDirection",configurable:!0}),e.s(["f",0,S],586318)},726330,30207,e=>{var t,n=e.i(271645),r=e.i(981140),o=e.i(248425),i=e.i(820783),l=e.i(934620),a=Object.defineProperty,s=n[" useInsertionEffect ".trim().toString()];function u(e){let t=n.useRef(e);return"function"==typeof s?s(()=>{t.current=e}):(0,l.f)(()=>{t.current=e}),n.useMemo(()=>(...e)=>t.current?.(...e),[])}a(u,"name",{value:"useCallbackRef",configurable:!0}),e.s(["f",0,u],30207);var c=e.i(843476),f=Object.defineProperty,d=(e,t)=>f(e,"name",{value:t,configurable:!0}),p="dismissableLayer.update",h=n.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),m=n.forwardRef(d(function(e,l){let{disableOutsidePointerEvents:a=!1,deferPointerDownOutside:s=!1,onEscapeKeyDown:f,onPointerDownOutside:m,onFocusOutside:v,onInteractOutside:g,onDismiss:x,...S}=e,E=n.useContext(h),[C,R]=n.useState(null),P=C?.ownerDocument??globalThis?.document,[,k]=n.useState({}),O=(0,i.f)(l,R),T=Array.from(E.layers),[j]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),A=j?T.indexOf(j):-1,L=C?T.indexOf(C):-1,D=E.layersWithOutsidePointerEventsDisabled.size>0,N=L>=A,M=n.useRef(!1),I=y(e=>{m?.(e),g?.(e),e.defaultPrevented||x?.()},{ownerDocument:P,deferPointerDownOutside:s,isDeferredPointerDownOutsideRef:M,dismissableSurfaces:E.dismissableSurfaces,shouldHandlePointerDownOutside:n.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...E.branches].some(t=>t.contains(e));return N&&!t},[E.branches,N])}),F=w(e=>{if(s&&M.current)return;let t=e.target;![...E.branches].some(e=>e.contains(t))&&(v?.(e),g?.(e),e.defaultPrevented||x?.())},P),B=!!C&&L===T.length-1,V=u(e=>{"Escape"===e.key&&(f?.(e),!e.defaultPrevented&&x&&(e.preventDefault(),x()))});return n.useEffect(()=>{if(B)return P.addEventListener("keydown",V,{capture:!0}),()=>P.removeEventListener("keydown",V,{capture:!0})},[P,B,V]),n.useEffect(()=>{if(C)return a&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(t=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(C)),E.layers.add(C),b(),()=>{a&&(E.layersWithOutsidePointerEventsDisabled.delete(C),0===E.layersWithOutsidePointerEventsDisabled.size&&(P.body.style.pointerEvents=t))}},[C,P,a,E]),n.useEffect(()=>()=>{C&&(E.layers.delete(C),E.layersWithOutsidePointerEventsDisabled.delete(C),b())},[C,E]),n.useEffect(()=>{let e=d(()=>k({}),"handleUpdate");return document.addEventListener(p,e),()=>document.removeEventListener(p,e)},[]),(0,c.jsx)(o.V.div,{...S,ref:O,style:{pointerEvents:D?N?"auto":"none":void 0,...e.style},onFocusCapture:(0,r.f)(e.onFocusCapture,F.onFocusCapture),onBlurCapture:(0,r.f)(e.onBlurCapture,F.onBlurCapture),onPointerDownCapture:(0,r.f)(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function v(){let e=n.useContext(h),[t,r]=n.useState(null);return n.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),r}d(v,"useDismissableLayerSurface");var g=d(()=>!0,"IS_TRUE");function y(e,t){let{ownerDocument:r=globalThis?.document,deferPointerDownOutside:o=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:l,shouldHandlePointerDownOutside:a=g}=t,s=u(e),c=n.useRef(!1),f=n.useRef(!1),p=n.useRef(new Map),h=n.useRef(()=>{});return n.useEffect(()=>{function e(){f.current=!1,i.current=!1,p.current.clear()}function t(){return Array.from(p.current.values()).some(Boolean)}function n(e){if(!f.current)return;let t=e.target;t instanceof Node&&[...l].some(e=>e.contains(t))||p.current.set(e.type,!0),"click"===e.type&&window.setTimeout(()=>{f.current&&h.current()},0)}function u(e){f.current&&p.current.set(e.type,!1)}d(e,"resetOutsideInteraction"),d(t,"isOutsideInteractionIntercepted"),d(n,"handleInteractionCapture"),d(u,"handleInteractionBubble");let m=d(n=>{if(n.target&&!c.current){let l=function(){r.removeEventListener("click",h.current);let n=t();e(),n||x("dismissableLayer.pointerDownOutside",s,u,{discrete:!0})};if(d(l,"handleAndDispatchPointerDownOutsideEvent"),!a(n.target)){r.removeEventListener("click",h.current),e(),c.current=!1;return}let u={originalEvent:n};f.current=!0,i.current=o&&0===n.button,p.current.clear(),o&&0===n.button?(r.removeEventListener("click",h.current),h.current=l,r.addEventListener("click",h.current,{once:!0})):l()}else r.removeEventListener("click",h.current),e();c.current=!1},"handlePointerDown"),v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let e of v)r.addEventListener(e,n,!0),r.addEventListener(e,u);let g=window.setTimeout(()=>{r.addEventListener("pointerdown",m)},0);return()=>{for(let e of(window.clearTimeout(g),r.removeEventListener("pointerdown",m),r.removeEventListener("click",h.current),v))r.removeEventListener(e,n,!0),r.removeEventListener(e,u)}},[r,s,o,i,l,a]),{onPointerDownCapture:d(()=>c.current=!0,"onPointerDownCapture")}}function w(e,t=globalThis?.document){let r=u(e),o=n.useRef(!1);return n.useEffect(()=>{let e=d(e=>{e.target&&!o.current&&x("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,r]),{onFocusCapture:d(()=>o.current=!0,"onFocusCapture"),onBlurCapture:d(()=>o.current=!1,"onBlurCapture")}}function b(){let e=new CustomEvent(p);document.dispatchEvent(e)}function x(e,t,n,{discrete:r}){let i=n.originalEvent.target,l=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?(0,o.u)(i,l):i.dispatchEvent(l)}d(y,"usePointerDownOutside"),d(w,"useFocusOutside"),d(b,"dispatchUpdate"),d(x,"handleAndDispatchCustomEvent"),e.s(["V",0,m,"y",0,v],726330)},303536,e=>{var t=e.i(271645),n=Object.defineProperty,r=(e,t)=>n(e,"name",{value:t,configurable:!0}),o=0,i=null;function l(){t.useEffect(()=>{i||(i={start:a(),end:a()});let{start:e,end:t}=i;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),o++,()=>{1===o&&(i?.start.remove(),i?.end.remove(),i=null),o=Math.max(0,o-1)}},[])}function a(){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 l(),e.children},"FocusGuards"),r(l,"useFocusGuards"),r(a,"createFocusGuard"),e.s(["f",0,l])},765491,e=>{var t=e.i(271645),n=e.i(820783),r=e.i(248425),o=e.i(30207),i=e.i(843476),l=Object.defineProperty,a=(e,t)=>l(e,"name",{value:t,configurable:!0}),s="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",c={bubbles:!1,cancelable:!0},f=t.forwardRef(a(function(e,l){let{loop:f=!1,trapped:d=!1,branches:p,onMountAutoFocus:h,onUnmountAutoFocus:m,...w}=e,[b,x]=t.useState(null),C=(0,o.f)(h),R=(0,o.f)(m),k=t.useRef(null),O=(0,n.f)(l,x),T=t.useRef(p);t.useEffect(()=>{T.current=p});let j=t.useCallback(e=>!!e&&(!!b?.contains(e)||!!T.current?.some(t=>t.contains(e))),[b]),A=t.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;t.useEffect(()=>{if(d){let e=function(e){if(A.paused||!b)return;let t=e.target;j(t)?k.current=t:S(k.current,{select:!0})},t=function(e){if(A.paused||!b)return;let t=e.relatedTarget;null!==t&&(j(t)||S(k.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&S(b)};a(e,"handleFocusIn"),a(t,"handleFocusOut"),a(n,"handleMutations"),document.addEventListener("focusin",e),document.addEventListener("focusout",t);let r=new MutationObserver(n);return b&&r.observe(b,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[d,b,A.paused,j]),t.useEffect(()=>{if(b){E.add(A);let e=document.activeElement;if(!b.contains(e)){let t=new CustomEvent(s,c);b.addEventListener(s,C),b.dispatchEvent(t),t.defaultPrevented||(v(P(y(b)),{select:!0}),document.activeElement===e&&S(b))}return()=>{b.removeEventListener(s,C);let t=b.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(u,c);b.addEventListener(u,R),b.dispatchEvent(r),r.defaultPrevented||S(e??t.body,{select:!0}),b.removeEventListener(u,R),E.remove(A)},0)}}},[b,C,R,A]);let L=t.useCallback(e=>{if(!f&&!d||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]=g(t);r&&o?e.shiftKey||n!==o?e.shiftKey&&n===r&&(e.preventDefault(),f&&S(o,{select:!0})):(e.preventDefault(),f&&S(r,{select:!0})):n===t&&e.preventDefault()}},[f,d,A.paused]);return(0,i.jsx)(r.V.div,{tabIndex:-1,...w,ref:O,onKeyDown:L})},"FocusScope")),d=t.createContext(null);function p({registry:e,children:t}){return e?(0,i.jsx)(d.Provider,{value:e,children:t}):t}function h(){let[e,n]=t.useState([]);return{nodes:e,registry:t.useMemo(()=>({add:a(e=>n(t=>t.includes(e)?t:[...t,e]),"add"),remove:a(e=>n(t=>t.filter(t=>t!==e)),"remove")}),[])}}function m(e){let n=t.useContext(d);t.useEffect(()=>{if(e&&n)return n.add(e),()=>n.remove(e)},[e,n])}function v(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(S(r,{select:t}),document.activeElement!==n)return}function g(e){let t=y(e);return[w(t,e),w(t.reverse(),e)]}function y(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a(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 w(e,t){let n="function"==typeof t.checkVisibility&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):b(r,{upTo:t})))return r}function b(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 x(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&&x(e)&&t&&e.select()}}a(p,"FocusScopeBranchProvider"),a(h,"useFocusScopeBranchRegistry"),a(m,"useFocusScopeBranch"),a(v,"focusFirst"),a(g,"getTabbableEdges"),a(y,"getTabbableCandidates"),a(w,"findVisible"),a(b,"isHidden"),a(x,"isSelectableInput"),a(S,"focus");var E=C();function C(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),(e=R(e,t)).unshift(t)},remove(t){e=R(e,t),e[0]?.resume()}}}function R(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)}a(C,"createFocusScopesStack"),a(R,"arrayRemove"),a(P,"removeLinks"),e.s(["v",0,f,"l",0,p,"i",0,m,"D",0,h])},610772,e=>{var t=e.i(271645),n=e.i(934620),r=Object.defineProperty,o=t[" useId ".trim().toString()]||(()=>void 0),i=0;function l(e){let[r,l]=t.useState(o());return(0,n.f)(()=>{e||l(e=>e??String(i++))},[e]),e||(r?`radix-${r}`:"")}r(l,"name",{value:"useId",configurable:!0}),e.s(["f",0,l])},853660,e=>{let t;var n=e.i(271645);let r=["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 v(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let g=["left","right"],y=["right","left"],w=["top","bottom"],b=["bottom","top"];function x(e){let t=f(e);return u[t]+e.slice(t.length)}function S(e){var t,n,r,o;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(o=e.left)?o:0}:{top:e,right:e,bottom:e,left:e}}function E(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function C(e,t,n){let r,{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,v=o.y+o.height/2-i.height/2,g=o[s]/2-i[s]/2;switch(u){case"top":r={x:c,y:o.y-i.height};break;case"bottom":r={x:c,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:v};break;case"left":r={x:o.x-i.width,y:v};break;default:r={x:o.x,y:o.y}}let y=d(t);return y&&(r[a]+=g*("end"===y?1:-1)*(n&&"y"===l?-1:1)),r}async function R(e,t){var n;void 0===t&&(t={});let{x:r,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),v=a[p?"floating"===d?"reference":"floating":d],g=E(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(v)))||n?v:v.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:s})),y="floating"===d?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await (null==i.isElement?void 0:i.isElement(w))&&await (null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},x=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:s}):y);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}let P=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:R},s=await (null==l.isRTL?void 0:l.isRTL(t)),u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:f}=C(u,r,s),d=r,p=0,h={};for(let n=0;n<i.length;n++){let m=i[n];if(!m)continue;let{name:v,fn:g}=m,{x:y,y:w,data:b,reset:x}=await g({x:c,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});c=null!=y?y:c,f=null!=w?w:f,h[v]={...h[v],...b},x&&p<50&&(p++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(u=!0===x.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:c,y:f}=C(u,d,s)),n=-1)}return{x:c,y:f,placement:d,strategy:o,middlewareData:h}};function k(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O(e){return r.some(t=>e[t]>=0)}let T=new Set(["left","top"]);async function j(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=f(n),a=d(n),s="y"===m(n),u=T.has(l)?-1:1,p=i&&s?-1:1,h=c(t,e),{mainAxis:v,crossAxis:g,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof y&&(g="end"===a?-1*y:y),s?{x:g*p,y:v*u}:{x:v*u,y:g*p}}function A(){return"u">typeof window}function L(e){return M(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(M(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function M(e){return!!A()&&(e instanceof Node||e instanceof D(e).Node)}function I(e){return!!A()&&(e instanceof Element||e instanceof D(e).Element)}function F(e){return!!A()&&(e instanceof HTMLElement||e instanceof D(e).HTMLElement)}function B(e){return!(!A()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function V(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&"inline"!==o&&"contents"!==o}function W(e){try{if(e.matches(":popover-open"))return!0}catch(e){}try{return e.matches(":modal")}catch(e){return!1}}let _=/transform|translate|scale|rotate|perspective|filter/,H=/paint|layout|strict|content/,z=e=>!!e&&"none"!==e;function U(e){let t=I(e)?Y(e):e;return z(t.transform)||z(t.translate)||z(t.scale)||z(t.rotate)||z(t.perspective)||!K()&&(z(t.backdropFilter)||z(t.filter))||_.test(t.willChange||"")||H.test(t.contain||"")}function K(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function $(e){return/^(html|body|#document)$/.test(L(e))}function Y(e){return D(e).getComputedStyle(e)}function X(e){return I(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function q(e){if("html"===L(e))return e;let t=e.assignedSlot||e.parentNode||B(e)&&e.host||N(e);return B(t)?t.host:t}function G(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=q(t);return $(n)?(t.ownerDocument||t).body:F(n)&&V(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=D(o);if(!i)return t.concat(o,G(o,[],n));{let e=Z(l);return t.concat(l,l.visualViewport||[],V(o)?o:[],e&&n?G(e):[])}}function Z(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function J(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=F(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=l(n)!==i||l(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Q(e){return I(e)?e:e.contextElement}function ee(e){let t=Q(e);if(!F(t))return s(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=J(t),a=(i?l(n.width):n.width)/r,u=(i?l(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),u&&Number.isFinite(u)||(u=1),{x:a,y:u}}let et=s(0);function en(e){let t=D(e);return K()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:et}function er(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=Q(e),a=s(1);t&&(r?I(r)&&(a=ee(r)):a=ee(e));let u=(void 0===(o=n)&&(o=!1),r&&o&&r===D(l))?en(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&&r){let e=D(l),t=I(r)?D(r):r,n=e,o=Z(n);for(;o&&t!==n;){let e=ee(o),t=o.getBoundingClientRect(),r=Y(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,f*=e.y,d*=e.x,p*=e.y,c+=i,f+=l,o=Z(n=D(o))}}return E({width:d,height:p,x:c,y:f})}function eo(e,t){let n=X(e).scrollLeft;return t?t.left+n:er(N(e)).left+n}function ei(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eo(e,n),y:n.top+t.scrollTop}}function el(e,t,n){var r;let o;if("viewport"===t||"layoutViewport"===t)o=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,o=D(e),i=N(e),l=o.visualViewport,a=i.clientWidth,s=i.clientHeight,u=0,c=0;if(l){let e=!K()||"fixed"===t;r?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,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(i.clientWidth-t.clientWidth-r),l="stable both-edges"===getComputedStyle(i).scrollbarGutter?o/2:o;l<=25&&(a-=l)}return{width:a,height:s,x:u,y:c}}(e,n,t);else if("document"===t){let t,n,l,a,s,u;t=X(r=N(e)),n=r.ownerDocument.body,l=i(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=i(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),s=-t.scrollLeft+eo(r),u=-t.scrollTop,"rtl"===Y(n).direction&&(s+=i(r.clientWidth,n.clientWidth)-l),o={width:l,height:a,x:s,y:u}}else if(I(t)){let e,r,i,l,a,s;r=(e=er(t,!0,"fixed"===n)).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:r*l.y}}else{let n=en(e);o={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return E(o)}function ea(e){return"static"===Y(e).position}function es(e,t){if(!F(e)||"fixed"===Y(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function eu(e,t){var n;let r=D(e);if(W(e))return r;if(!F(e)){let t=q(e);for(;t&&!$(t);){if(I(t)&&!ea(t))return t;t=q(t)}return r}let o=es(e,t);for(;o&&(n=o,/^(table|td|th)$/.test(L(n)))&&ea(o);)o=es(o,t);return o&&$(o)&&ea(o)&&!U(o)?r:o||function(e){let t=q(e);for(;F(t)&&!$(t);){if(U(t))return t;if(W(t))break;t=q(t)}return null}(e)||r}let ec=async function(e){let t=this.getOffsetParent||eu,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=F(t),o=N(t),i="fixed"===n,l=er(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=s(0);if((r||!i)&&(("body"!==L(t)||V(o))&&(a=X(t)),r)){let e=er(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}!r&&o&&(u.x=eo(o));let c=!o||r||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:r.width,height:r.height}}},ef={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=N(r),a=!!t&&W(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},c=s(1),f=s(0),d=F(r);if((d||!i)&&(("body"!==L(r)||V(l))&&(u=X(r)),d)){let e=er(r);c=ee(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}let p=!l||d||i?s(0):ei(l,u);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-u.scrollTop*c.y+f.y+p.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?W(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=G(e,[],!1).filter(e=>I(e)&&"body"!==L(e)),o=null,i="fixed"===Y(e).position,l=i?q(e):e;for(;I(l)&&!$(l);){let e=Y(l),t=U(l),n=o?o.position:i?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?o=e:r=r.filter(e=>e!==l),l=q(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],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 n=el(t,a[e],l);u=i(n.top,u),c=o(n.right,c),f=o(n.bottom,f),d=i(n.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:n}=J(e);return{width:t,height:n}},getScale:ee,isElement:I,isRTL:function(e){return"rtl"===Y(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:n,y:r,placement:l,rects:a,platform:s,elements:u,middlewareData:f}=t,{element:v,padding:g=0}=c(e,t)||{};if(null==v)return{};let y=S(g),w={x:n,y:r},b=p(m(l)),x=h(b),E=await s.getDimensions(v),C="y"===b,R=C?"clientHeight":"clientWidth",P=a.reference[x]+a.reference[b]-w[b]-a.floating[x],k=w[b]-a.reference[b],O=await (null==s.getOffsetParent?void 0:s.getOffsetParent(v)),T=O?O[R]:0;T&&await (null==s.isElement?void 0:s.isElement(O))||(T=u.floating[R]||a.floating[x]);let j=T/2-E[x]/2-1,A=o(y[C?"top":"left"],j),L=o(y[C?"bottom":"right"],j),D=T-E[x]-L,N=T/2-E[x]/2+(P/2-k/2),M=i(A,o(N,D)),I=!f.arrow&&null!=d(l)&&N!==M&&a.reference[x]/2-(N<A?A:L)-E[x]/2<0,F=I?N<A?N-A:N-D:0;return{[b]:w[b]+F,data:{[b]:M,centerOffset:N-M-F,...I&&{alignmentOffset:F}},reset:I}}});var eh=e.i(174080),em="u">typeof document?n.useLayoutEffect:function(){};function ev(e,t){let n,r,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((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!ev(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ev(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eg(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ey(e,t){let n=eg(e);return Math.round(t*n)/n}function ew(e){let t=n.useRef(e);return em(()=>{t.current=e}),t}var eb=e.i(248425),ex=e.i(843476),eS=Object.defineProperty,eE=n.forwardRef(eS(function(e,t){let{children:n,width:r=10,height:o=5,...i}=e;return(0,ex.jsx)(eb.V.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ex.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"name",{value:"Arrow",configurable:!0})),eC=e.i(820783),eR=e.i(30030),eP=e.i(30207),ek=e.i(934620),eO=e.i(635804),eT=Object.defineProperty,ej=(e,t)=>eT(e,"name",{value:t,configurable:!0}),eA="partial",eL="Popper",[eD,eN]=(0,eR.f)(eL),[eM,eI]=eD(eL),eF=ej(e=>{let{__scopePopper:t,children:r}=e,[o,i]=n.useState(null),[l,a]=n.useState(void 0);return(0,ex.jsx)(eM,{scope:t,anchor:o,onAnchorChange:i,placementState:l,setPlacementState:a,children:r})},"Popper"),eB=n.forwardRef(ej(function(e,t){let{__scopePopper:r,virtualRef:o,...i}=e,l=eI("PopperAnchor",r),a=n.useRef(null),s=l.onAnchorChange,u=n.useCallback(e=>{a.current=e,e&&s(e)},[s]),c=(0,eC.f)(t,u),f=n.useRef(null);n.useEffect(()=>{if(!o)return;let e=f.current;f.current=o.current,e!==f.current&&s(f.current)});let d=l.placementState&&eY(l.placementState),p=d?.[0],h=d?.[1];return o?null:(0,ex.jsx)(eb.V.div,{"data-radix-popper-side":p,"data-radix-popper-align":h,...i,ref:c})},"PopperAnchor")),eV="PopperContent",[eW,e_]=eD(eV),eH=n.forwardRef(ej(function(e,t){var r,l,s,u,S,E,C,R,A,L,M,I,F;let B,V,W,_,H,z,{__scopePopper:U,side:K="bottom",sideOffset:$=0,align:Y="center",alignOffset:X=0,arrowPadding:q=0,avoidCollisions:Z=!0,collisionBoundary:J=[],collisionPadding:ee=0,sticky:et=eA,hideWhenDetached:en=!1,updatePositionStrategy:eo="optimized",onPlaced:ei,...el}=e,ea=eI(eV,U),[es,eu]=n.useState(null),ec=(0,eC.f)(t,eu),[eS,eE]=n.useState(null),eR=(0,eO.f)(eS),eT=eR?.width??0,eL=eR?.height??0,eD="number"==typeof ee?ee:{top:0,right:0,bottom:0,left:0,...ee},eN=Array.isArray(J)?J:[J],eM=eN.length>0,eF={padding:eD,boundary:eN.filter(eK),altBoundary:eM},{refs:eB,floatingStyles:e_,placement:eH,isPositioned:ez,middlewareData:eU}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:s=!0,whileElementsMounted:u,open:c}=e,[f,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(o);ev(p,o)||h(o);let[m,v]=n.useState(null),[g,y]=n.useState(null),w=n.useCallback(e=>{e!==E.current&&(E.current=e,v(e))},[]),b=n.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),x=l||m,S=a||g,E=n.useRef(null),C=n.useRef(null),R=n.useRef(f),k=null!=u,O=ew(u),T=ew(i),j=ew(c),A=n.useCallback(()=>{var e,n;let o,i,l;if(!E.current||!C.current)return;let a={placement:t,strategy:r,middleware:p};T.current&&(a.platform=T.current),(e=E.current,n=C.current,o=new Map,i=null!=a?a:{},l={...ef,...i.platform,_c:o},P(e,n,{...i,platform:l})).then(e=>{let t={...e,isPositioned:!1!==j.current};L.current&&!ev(R.current,t)&&(R.current=t,eh.flushSync(()=>{d(t)}))})},[p,t,r,T,j]);em(()=>{!1===c&&R.current.isPositioned&&(R.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let L=n.useRef(!1);em(()=>(L.current=!0,()=>{L.current=!1}),[]),em(()=>{if(x&&(E.current=x),S&&(C.current=S),x&&S){if(O.current)return O.current(x,S,A);A()}},[x,S,A,O,k]);let D=n.useMemo(()=>({reference:E,floating:C,setReference:w,setFloating:b}),[w,b]),N=n.useMemo(()=>({reference:x,floating:S}),[x,S]),M=n.useMemo(()=>{let e={position:r,left:0,top:0};if(!N.floating)return e;let t=ey(N.floating,f.x),n=ey(N.floating,f.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...eg(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,s,N.floating,f.x,f.y]);return n.useMemo(()=>({...f,update:A,refs:D,elements:N,floatingStyles:M}),[f,A,D,N,M])}({strategy:"fixed",placement:K+("center"!==Y?"-"+Y:""),whileElementsMounted:ej((...e)=>(function(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:s=!0,ancestorResize:u=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=Q(e),h=s||u?[...p?G(p):[],...t?G(t):[]]:[];h.forEach(e=>{s&&e.addEventListener("scroll",n),u&&e.addEventListener("resize",n)});let m=p&&f?function(e,t,n){let r,l=null,s=N(e);function u(){var e;clearTimeout(r),null==(e=l)||e.disconnect(),l=null}function c(n,f){void 0===n&&(n=!1),void 0===f&&(f=1),u();let d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:v}=d;if(n||t(),!m||!v)return;let g={rootMargin:-a(h)+"px "+-a(s.clientWidth-(p+m))+"px "+-a(s.clientHeight-(h+v))+"px "+-a(p)+"px",threshold:i(0,o(1,f))||1},y=!0;function w(t){let n=t[0].intersectionRatio;if(!ed(d,e.getBoundingClientRect()))return c();if(n!==f){if(!y)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}y=!1}try{l=new IntersectionObserver(w,{...g,root:s.ownerDocument})}catch(e){l=new IntersectionObserver(w,g)}l.observe(e)}let f=D(e),d=()=>c(n);return f.addEventListener("resize",d),c(!0),()=>{f.removeEventListener("resize",d),u()}}(p,n,u):null,v=-1,g=null;c&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&g&&t&&(g.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),p&&!d&&g.observe(p),t&&g.observe(t));let y=d?er(e):null;return d&&function t(){let r=er(e);y&&!ed(y,r)&&n(),y=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{s&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=g)||e.disconnect(),g=null,d&&cancelAnimationFrame(l)}})(...e,{animationFrame:"always"===eo}),"whileElementsMounted"),elements:{reference:ea.anchor},middleware:[{name:(B={name:"offset",options:l=r={mainAxis:$+eL,alignmentAxis:X},async fn(e){var t,n;let{x:r,y:o,placement:i,middlewareData:a}=e,s=await j(e,l);return i===(null==(t=a.offset)?void 0:t.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+s.x,y:o+s.y,data:{...s,placement:i}}}}).name,fn:B.fn,options:[r,void 0]},Z&&{name:(V={name:"shift",options:S=u={mainAxis:!0,crossAxis:!1,...et===eA?{limiter:{fn:(s=void 0,{options:s={},fn(e){var t,n,r,o;let{x:i,y:l,placement:a,rects:u,middlewareData:d}=e,{offset:h=0,mainAxis:v=!0,crossAxis:g=!0}=c(s,e),y={x:i,y:l},w=m(a),b=p(w),x=y[b],S=y[w],E=c(h,e),C="number"==typeof E?{mainAxis:E,crossAxis:0}:{mainAxis:null!=(t=E.mainAxis)?t:0,crossAxis:null!=(n=E.crossAxis)?n:0};if(v){let e="y"===b?"height":"width",t=u.reference[b]-u.floating[e]+C.mainAxis,n=u.reference[b]+u.reference[e]-C.mainAxis;x<t?x=t:x>n&&(x=n)}if(g){let e="y"===b?"width":"height",t=T.has(f(a)),n=u.reference[w]-u.floating[e]+(t&&(null==(r=d.offset)?void 0:r[w])||0)+(t?0:C.crossAxis),i=u.reference[w]+u.reference[e]+(t?0:(null==(o=d.offset)?void 0:o[w])||0)-(t?C.crossAxis:0);S<n?S=n:S>i&&(S=i)}return{[b]:x,[w]:S}}}).fn,options:[void 0,void 0]}}:{},...eF},async fn(e){let{x:t,y:n,placement:r,platform:l}=e,{mainAxis:a=!0,crossAxis:s=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=c(S,e),d={x:t,y:n},h=await l.detectOverflow(e,f),v=m(r),g=p(v),y=d[g],w=d[v],b=(e,t)=>i(t+h["y"===e?"top":"left"],o(t,t-h["y"===e?"bottom":"right"]));a&&(y=b(g,y)),s&&(w=b(v,w));let x=u.fn({...e,[g]:y,[v]:w});return{...x,data:{x:x.x-t,y:x.y-n,enabled:{[g]:a,[v]:s}}}}}).name,fn:V.fn,options:[u,void 0]},Z&&{name:(W={name:"flip",options:C=E={...eF},async fn(e){var t,n,r,o,i,l,a,s;let u,S,E,{placement:R,middlewareData:P,rects:k,initialPlacement:O,platform:T,elements:j}=e,{mainAxis:A=!0,crossAxis:L=!0,fallbackPlacements:D,fallbackStrategy:N="bestFit",fallbackAxisSideDirection:M="none",flipAlignment:I=!0,...F}=c(C,e);if(null!=(t=P.arrow)&&t.alignmentOffset)return{};let B=f(R),V=m(O),W=f(O)===O,_=await (null==T.isRTL?void 0:T.isRTL(j.floating)),H=D||(W||!I?[x(O)]:(u=x(O),[v(O),u,v(u)])),z="none"!==M;!D&&z&&H.push(...(S=d(O),E=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?y:g;return t?g:y;case"left":case"right":return t?w:b;default:return[]}}(f(O),"start"===M,_),S&&(E=E.map(e=>e+"-"+S),I&&(E=E.concat(E.map(v)))),E));let U=[O,...H],K=await T.detectOverflow(e,F),$=[],Y=(null==(n=P.flip)?void 0:n.overflows)||[];if(A&&$.push(K[B]),L){let e,t,n,r,o=(l=R,a=k,void 0===(s=_)&&(s=!1),e=d(l),n=h(t=p(m(l))),r="x"===t?e===(s?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=x(r)),[r,x(r)]);$.push(K[o[0]],K[o[1]])}if(Y=[...Y,{placement:R,overflows:$}],!$.every(e=>e<=0)){let e=((null==(r=P.flip)?void 0:r.index)||0)+1,t=U[e];if(t&&("alignment"!==L||V===m(t)||Y.every(e=>m(e.placement)!==V||e.overflows[0]>0)))return{data:{index:e,overflows:Y},reset:{placement:t}};let n=null==(o=Y.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(N){case"bestFit":{let e=null==(i=Y.filter(e=>{if(z){let t=m(e.placement);return t===V||"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&&(n=e);break}case"initialPlacement":n=O}if(R!==n)return{reset:{placement:n}}}return{}}}).name,fn:W.fn,options:[E,void 0]},{name:(_={name:"size",options:A=R={...eF,apply:ej(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:o,height:i}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${o}px`),l.setProperty("--radix-popper-anchor-height",`${i}px`)},"apply")},async fn(e){let t,n,{placement:r,rects:l,platform:a,elements:s}=e,{apply:u=()=>{},...p}=c(A,e),h=await a.detectOverflow(e,p),v=f(r),g=d(r),y="y"===m(r),{width:w,height:b}=l.floating;"top"===v||"bottom"===v?(t=v,n=g===(await (null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(n=v,t="end"===g?"top":"bottom");let x=b-h.top-h.bottom,S=w-h.left-h.right,E=o(b-h[t],x),C=o(w-h[n],S),R=e.middlewareData.shift,P=!R,k=E,O=C;null!=R&&R.enabled.x&&(O=S),null!=R&&R.enabled.y&&(k=x),P&&!g&&(y?O=w-2*i(h.left,h.right):k=b-2*i(h.top,h.bottom)),await u({...e,availableWidth:O,availableHeight:k});let T=await a.getDimensions(s.floating);return w!==T.width||b!==T.height?{reset:{rects:!0}}:{}}}).name,fn:_.fn,options:[R,void 0]},eS&&{name:(H={name:"arrow",options:M=L={element:eS,padding:q},fn(e){let{element:t,padding:n}="function"==typeof M?M(e):M;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ep({element:t.current,padding:n}).fn(e):{}:t?ep({element:t,padding:n}).fn(e):{}}}).name,fn:H.fn,options:[L,void 0]},e$({arrowWidth:eT,arrowHeight:eL}),en&&{name:(z={name:"hide",options:F=I=eM?{strategy:"referenceHidden",...eF}:{strategy:"referenceHidden",padding:eF.padding,altBoundary:eF.altBoundary},async fn(e){let{rects:t,platform:n}=e,{strategy:r="referenceHidden",...o}=c(F,e);switch(r){case"referenceHidden":{let r=k(await n.detectOverflow(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:O(r)}}}case"escaped":{let r=k(await n.detectOverflow(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:O(r)}}}default:return{}}}}).name,fn:z.fn,options:[I,void 0]}]}),eX=ea.setPlacementState;(0,ek.f)(()=>(eX(eH),()=>{eX(void 0)}),[eH,eX]);let[eq,eG]=eY(eH),eZ=(0,eP.f)(ei);(0,ek.f)(()=>{ez&&eZ?.()},[ez,eZ]);let eJ=eU.arrow?.x,eQ=eU.arrow?.y,e0=eU.arrow?.centerOffset!==0,[e1,e2]=n.useState();return(0,ek.f)(()=>{es&&e2(window.getComputedStyle(es).zIndex)},[es]),(0,ex.jsx)("div",{ref:eB.setFloating,"data-radix-popper-content-wrapper":"",style:{...e_,transform:ez?e_.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,ex.jsx)(eW,{scope:U,placedSide:eq,placedAlign:eG,onArrowChange:eE,arrowX:eJ,arrowY:eQ,shouldHideArrow:e0,children:(0,ex.jsx)(eb.V.div,{"data-side":eq,"data-align":eG,...el,ref:ec,style:{...el.style,animation:ez?el.style?.animation:"none"}})})})},"PopperContent")),ez={top:"bottom",right:"left",bottom:"top",left:"right"},eU=n.forwardRef(ej(function(e,t){let{__scopePopper:n,...r}=e,o=e_("PopperArrow",n),i=ez[o.placedSide];return(0,ex.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,ex.jsx)(eE,{...r,ref:t,style:{...r.style,display:"block"}})})},"PopperArrow"));function eK(e){return null!==e}ej(eK,"isNotNull");var e$=ej(e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,l=i?0:e.arrowWidth,a=i?0:e.arrowHeight,[s,u]=eY(n),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=`${r.floating.height+a}px`):"right"===s?(p=`${-a}px`,h=i?c:`${d}px`):"left"===s&&(p=`${r.floating.width+a}px`,h=i?c:`${d}px`),{data:{x:p,y:h}}}}),"transformOrigin");function eY(e){let[t,n="center"]=e.split("-");return[t,n]}ej(eY,"getSideAndAlignFromPlacement"),e.s(["g",0,eB,"j",0,eU,"c",0,eH,"F",0,eF,"y",0,eN],853660)},774606,e=>{var t=e.i(271645),n=e.i(174080),r=e.i(248425),o=e.i(934620),i=e.i(843476),l=Object.defineProperty,a=t.forwardRef(l(function(e,l){let{container:a,...s}=e,[u,c]=t.useState(!1);(0,o.f)(()=>c(!0),[]);let f=a||u&&globalThis?.document?.body;return f?n.createPortal((0,i.jsx)(r.V.div,{...s,ref:l}),f):null},"name",{value:"Portal",configurable:!0}));e.s(["f",0,a])},959411,e=>{e.i(271645),e.i(248425),e.i(843476);var t=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"});e.s(["f",0,t])},186312,e=>{var t=new WeakMap,n=new WeakMap,r={},o=0,i=function(e){return e&&(e.host||i(e.parentNode))},l=function(e,l,a,s){var u=(Array.isArray(e)?e:[e]).map(function(e){if(l.contains(e))return e;var t=i(e);return t&&l.contains(t)?t:(console.error("aria-hidden",e,"in not contained inside",l,". Doing nothing"),null)}).filter(function(e){return!!e});r[a]||(r[a]=new WeakMap);var c=r[a],f=[],d=new Set,p=new Set(u),h=function(e){!e||d.has(e)||(d.add(e),h(e.parentNode))};u.forEach(h);var m=function(e){!e||p.has(e)||Array.prototype.forEach.call(e.children,function(e){if(d.has(e))m(e);else try{var r=e.getAttribute(s),o=null!==r&&"false"!==r,i=(t.get(e)||0)+1,l=(c.get(e)||0)+1;t.set(e,i),c.set(e,l),f.push(e),1===i&&o&&n.set(e,!0),1===l&&e.setAttribute(a,"true"),o||e.setAttribute(s,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return m(l),d.clear(),o++,function(){f.forEach(function(e){var r=t.get(e)-1,o=c.get(e)-1;t.set(e,r),c.set(e,o),r||(n.has(e)||e.removeAttribute(s),n.delete(e)),o||e.removeAttribute(a)}),--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"))),l(r,o,n,"aria-hidden")):function(){return null}}])},985369,e=>{var t,n,r,o,i,l,a,s=function(){return(s=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 u(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 c=("function"==typeof SuppressedError&&SuppressedError,e.i(271645)),f="right-scroll-bar-position",d="width-before-scroll-bar";function p(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var h="u">typeof window?c.useLayoutEffect:c.useEffect,m=new WeakMap,v=(void 0===t&&(t={}),(void 0===n&&(n=function(e){return e}),r=[],o=!1,i={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 i=function(){var n=t;t=[],n.forEach(e)},l=function(){return Promise.resolve().then(i)};l(),r={push:function(e){t.push(e),l()},filter:function(e){return t=t.filter(e),r}}}}).options=s({async:!0,ssr:!1},t),i),g=function(){},y=c.forwardRef(function(e,t){var n,r,o,i,l=c.useRef(null),a=c.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),f=a[0],d=a[1],y=e.forwardProps,w=e.children,b=e.className,x=e.removeScrollBar,S=e.enabled,E=e.shards,C=e.sideCar,R=e.noRelative,P=e.noIsolation,k=e.inert,O=e.allowPinchZoom,T=e.as,j=e.gapMode,A=u(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=(n=[l,t],r=function(e){return n.forEach(function(t){return p(t,e)})},(o=(0,c.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,i=o.facade,h(function(){var e=m.get(i);if(e){var t=new Set(e),r=new Set(n),o=i.current;t.forEach(function(e){r.has(e)||p(e,null)}),r.forEach(function(e){t.has(e)||p(e,o)})}m.set(i,n)},[n]),i),D=s(s({},A),f);return c.createElement(c.Fragment,null,S&&c.createElement(C,{sideCar:v,removeScrollBar:x,shards:E,noRelative:R,noIsolation:P,inert:k,setCallbacks:d,allowPinchZoom:!!O,lockRef:l,gapMode:j}),y?c.cloneElement(c.Children.only(w),s(s({},D),{ref:L})):c.createElement(void 0===T?"div":T,s({},D,{className:b,ref:L}),w))});y.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},y.classNames={fullWidth:d,zeroRight:f};var w=function(e){var t=e.sideCar,n=u(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 c.createElement(r,s({},n))};w.isSideCarExport=!0;var b=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=a||("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)}}},x=function(){var e=b();return function(t,n){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},S=function(){var e=x();return function(t){return e(t.styles,t.dynamic),null}},E={left:0,top:0,right:0,gap:0},C=function(e){return parseInt(e||"",10)||0},R=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[C(n),C(r),C(o)]},P=function(e){if(void 0===e&&(e="margin"),"u"<typeof window)return E;var t=R(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])}},k=S(),O="data-scroll-locked",T=function(e,t,n,r){var o=e.left,i=e.top,l=e.right,a=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(a,"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(i,"px;\n padding-right: ").concat(l,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(a,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(f," {\n right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(d," {\n margin-right: ").concat(a,"px ").concat(r,";\n }\n \n .").concat(f," .").concat(f," {\n right: 0 ").concat(r,";\n }\n \n .").concat(d," .").concat(d," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(O,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(a,"px;\n }\n")},j=function(){var e=parseInt(document.body.getAttribute(O)||"0",10);return isFinite(e)?e:0},A=function(){c.useEffect(function(){return document.body.setAttribute(O,(j()+1).toString()),function(){var e=j()-1;e<=0?document.body.removeAttribute(O):document.body.setAttribute(O,e.toString())}},[])},L=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;A();var i=c.useMemo(function(){return P(o)},[o]);return c.createElement(k,{styles:T(i,!t,o,n?"":"!important")})},D=!1;if("u">typeof window)try{var N=Object.defineProperty({},"passive",{get:function(){return D=!0,!0}});window.addEventListener("test",N,N),window.removeEventListener("test",N,N)}catch(e){D=!1}var M=!!D&&{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])},F=function(e,t){var n=t.ownerDocument,r=t;do{if("u">typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),B(e,r)){var o=V(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body)return!1},B=function(e,t){return"v"===e?I(t,"overflowY"):I(t,"overflowX")},V=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},W=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,s=n.target,u=t.contains(s),c=!1,f=a>0,d=0,p=0;do{if(!s)break;var h=V(e,s),m=h[0],v=h[1]-h[2]-l*m;(m||v)&&B(e,s)&&(d+=v,p+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!u&&s!==document.body||u&&(t.contains(s)||t===s))return f&&(o&&1>Math.abs(d)||!o&&a>d)?c=!0:!f&&(o&&1>Math.abs(p)||!o&&-a>p)&&(c=!0),c},_=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},H=function(e){return[e.deltaX,e.deltaY]},z=function(e){return e&&"current"in e?e.current:e},U=0,K=[];let $=(l=function(e){var t=c.useRef([]),n=c.useRef([0,0]),r=c.useRef(),o=c.useState(U++)[0],i=c.useState(S)[0],l=c.useRef(e);c.useEffect(function(){l.current=e},[e]),c.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,i=t.length;o<i;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(z),!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 a=c.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var o,i=_(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,f=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===f&&"range"===c.type)return!1;var d=window.getSelection(),p=d&&d.anchorNode;if(p&&(p===c||p.contains(c)))return!1;var h=F(f,c);if(!h)return!0;if(h?o=f:(o="v"===f?"h":"v",h=F(f,c)),!h)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var m=r.current||o;return W(m,t,e,"h"===m?s:u,!0)},[]),s=c.useCallback(function(e){if(K.length&&K[K.length-1]===i){var n="deltaY"in e?H(e):_(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=(l.current.shards||[]).map(z).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),u=c.useCallback(function(e,n,r,o){var i={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(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),f=c.useCallback(function(e){n.current=_(e),r.current=void 0},[]),d=c.useCallback(function(t){u(t.type,H(t),t.target,a(t,e.lockRef.current))},[]),p=c.useCallback(function(t){u(t.type,_(t),t.target,a(t,e.lockRef.current))},[]);c.useEffect(function(){return K.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",s,M),document.addEventListener("touchmove",s,M),document.addEventListener("touchstart",f,M),function(){K=K.filter(function(e){return e!==i}),document.removeEventListener("wheel",s,M),document.removeEventListener("touchmove",s,M),document.removeEventListener("touchstart",f,M)}},[]);var h=e.removeScrollBar,m=e.inert;return c.createElement(c.Fragment,null,m?c.createElement(i,{styles:"\n .block-interactivity-".concat(o," {pointer-events: none;}\n .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,h?c.createElement(L,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},v.useMedium(l),w);var Y=c.forwardRef(function(e,t){return c.createElement(y,s({},e,{ref:t,sideCar:$}))});Y.classNames=y.classNames,e.s(["f",0,Y],985369)},967489,e=>{var t=e.i(843476),n=e.i(271645),r=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),v=e.i(296626),g=e.i(248425),y=e.i(991918),w=e.i(30207),b=e.i(369340),x=e.i(934620),S=e.i(959411),E=e.i(186312),C=e.i(985369),R=Object.defineProperty,P=(e,t)=>R(e,"name",{value:t,configurable:!0}),k=[" ","Enter","ArrowUp","ArrowDown"],O=[" ","Enter"],T="Select",[j,A,L]=(0,l.f)(T),[D,N]=(0,s.f)(T,[L,h.y]),M=(0,h.y)(),[I,F]=D(T),[B,V]=D(T);function W(e){let{__scopeSelect:r,children:o,open:i,defaultOpen:l,onOpenChange:a,value:s,defaultValue:c,onValueChange:f,dir:d,name:m,autoComplete:v,disabled:g,required:y,form:w,internal_do_not_use_render:x}=e,S=M(r),[E,C]=n.useState(null),[R,k]=n.useState(null),[O,A]=n.useState(!1),L=(0,u.f)(d),[D,N]=(0,b.f)({prop:i,defaultProp:l??!1,onChange:a,caller:T}),[F,V]=(0,b.f)({prop:s,defaultProp:c,onChange:f,caller:T}),W=n.useRef(null),_=n.useRef(!1),[H,z]=n.useState(null),U=P(e=>{z({value:e,hasConsumerStoppedPropagation:_.current}),V(e)},"handleUserSelect"),K=n.useRef(F);n.useEffect(()=>{let e=w?E?.ownerDocument.getElementById(w):E?.form;if(e instanceof HTMLFormElement){let t=P(()=>V(K.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[w,E,V]);let $=!E||!!w||!!E.closest("form"),[Y,X]=n.useState(new Set),q=(0,p.f)(),G=Array.from(Y).map(e=>e.props.value).join(";"),Z=n.useCallback(e=>{X(t=>new Set(t).add(e))},[]),J=n.useCallback(e=>{X(t=>{let n=new Set(t);return n.delete(e),n})},[]),Q={required:y,trigger:E,onTriggerChange:C,valueNode:R,onValueNodeChange:k,valueNodeHasChildren:O,onValueNodeHasChildrenChange:A,contentId:q,value:F,onValueChange:V,hasConsumerStoppedPropagationRef:_,userSelection:H,onUserSelect:U,open:D,onOpenChange:N,dir:L,triggerPointerDownPosRef:W,disabled:g,name:m,autoComplete:v,form:w,nativeOptions:Y,nativeSelectKey:G,isFormControl:$};return(0,t.jsx)(h.F,{...S,children:(0,t.jsx)(I,{scope:r,...Q,children:(0,t.jsx)(j.Provider,{scope:r,children:(0,t.jsx)(B,{scope:r,onNativeOptionAdd:Z,onNativeOptionRemove:J,children:eC(x)?x(Q):o})})})})}P(W,"SelectProvider");var _=P(e=>{let{__scopeSelect:n,children:r,...o}=e;return(0,t.jsx)(W,{__scopeSelect:n,...o,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[r,e?(0,t.jsx)(eE,{__scopeSelect:n}):null]})})},"Select"),H=n.forwardRef(P(function(e,r){let{__scopeSelect:o,disabled:l=!1,...s}=e,u=M(o),c=F("SelectTrigger",o),f=c.disabled||l,d=(0,a.f)(r,c.onTriggerChange),p=A(o),m=n.useRef("touch"),[v,y,w]=eP(e=>{let t=p().filter(e=>!e.disabled),n=t.find(e=>e.value===c.value),r=ek(t,e,n);void 0!==r&&c.onUserSelect(r.value)}),b=P(e=>{f||(c.onOpenChange(!0),w()),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)(g.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":eR(c.value)?"":void 0,...s,ref:d,onClick:(0,i.f)(s.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&b(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&&(b(e),e.preventDefault())}),onKeyDown:(0,i.f)(s.onKeyDown,e=>{let t=""!==v.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||(c.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),y(e.key)),(!t||" "!==e.key)&&k.includes(e.key)&&(b(),e.preventDefault())})})})},"SelectTrigger")),z=n.forwardRef(P(function(e,r){let{__scopeSelect:o,className:i,style:l,children:s,placeholder:u="",...c}=e,f=F("SelectValue",o),{onValueNodeHasChildrenChange:d}=f,p=void 0!==s,h=(0,a.f)(r,f.onValueNodeChange);(0,x.f)(()=>{d(p)},[d,p]);let m=eR(f.value);return(0,t.jsx)(g.V.span,{...c,asChild:!m&&c.asChild,ref:h,style:{pointerEvents:"none"},children:(0,t.jsx)(n.Fragment,{children:m?u:s},m?"placeholder":"value")})},"SelectValue")),U=n.forwardRef(P(function(e,n){let{__scopeSelect:r,children:o,...i}=e;return(0,t.jsx)(g.V.span,{"aria-hidden":!0,...i,ref:n,children:o||"▼"})},"SelectIcon")),[K,$]=D("SelectPortal",{forceMount:void 0}),Y=P(e=>{let{__scopeSelect:n,forceMount:r,...o}=e;return(0,t.jsx)(K,{scope:e.__scopeSelect,forceMount:r,children:(0,t.jsx)(m.f,{asChild:!0,...o})})},"SelectPortal"),X="SelectContent",q=n.forwardRef(P(function(e,r){let o=$(X,e.__scopeSelect),{forceMount:i=o.forceMount,...l}=e,a=F(X,e.__scopeSelect),[s,u]=n.useState();return(0,x.f)(()=>{u(new DocumentFragment)},[]),(0,t.jsx)(v.f,{present:i||a.open,children:({present:e})=>e?(0,t.jsx)(ee,{...l,ref:r}):(0,t.jsx)(G,{...l,fragment:s})})},"SelectContent")),G=n.forwardRef(P(function(e,n){let{__scopeSelect:o,children:i,fragment:l}=e;return l?r.createPortal((0,t.jsx)(Z,{scope:o,children:(0,t.jsx)(j.Slot,{scope:o,children:(0,t.jsx)("div",{ref:n,children:i})})}),l):null},"SelectContentFragment")),[Z,J]=D(X),Q=(0,y.B)("SelectContent.RemoveScroll"),ee=n.forwardRef(P(function(e,r){let{__scopeSelect:o}=e,{position:l="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:u,onPointerDownOutside:p,side:h,sideOffset:m,align:v,alignOffset:g,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:R,...k}=e,O=F(X,o),[T,j]=n.useState(null),[L,D]=n.useState(null),N=(0,a.f)(r,j),[M,I]=n.useState(null),[B,V]=n.useState(null),W=A(o),[_,H]=n.useState(!1),z=n.useRef(!1),U=n.useRef(!1),K=n.useRef(!1);n.useEffect(()=>{if(T)return(0,E.f)(T)},[T]),(0,f.f)();let $=n.useCallback(e=>{let[t,...n]=W().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(n?.scrollIntoView({block:"nearest"}),n===t&&L&&(L.scrollTop=0),n===r&&L&&(L.scrollTop=L.scrollHeight),n?.focus(),document.activeElement!==o))return},[W,L]),Y=n.useCallback(()=>$([M,T]),[$,M,T]);n.useEffect(()=>{_&&Y()},[_,Y]);let{onOpenChange:q,triggerPointerDownPosRef:G}=O;n.useEffect(()=>{if(T){let e={x:0,y:0},t=P(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"),n=P(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(T)||q(!1),document.removeEventListener("pointermove",t),G.current=null},"handlePointerUp");return null!==G.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[T,q,G]),n.useEffect(()=>{let e=P(()=>q(!1),"close");return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[q]);let[J,ee]=eP(e=>{let t=W().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ek(t,e,n);r&&setTimeout(()=>r.ref.current?.focus())}),er=n.useCallback((e,t,n)=>{let r=!U.current;r&&(U.current=!0);let o=!z.current&&!n;void 0!==O.value&&O.value===t||o?(I(e),o&&(z.current=!0)):r&&I(e)},[O.value]),eo=n.useCallback(()=>T?.focus(),[T]),ei=n.useCallback((e,t,n)=>{if(!e)return;let r=!K.current;r&&(K.current=!0);let o=!z.current&&!n;void 0!==O.value&&O.value===t||o?V(e):r&&V(e)},[O.value]),el="popper"===l?en:et;return(0,t.jsx)(Z,{scope:o,content:T,viewport:L,onViewportChange:D,itemRefCallback:er,selectedItem:M,onItemLeave:eo,itemTextRefCallback:ei,focusSelectedItem:Y,selectedItemText:B,position:l,isPositioned:_,searchRef:J,children:(0,t.jsx)(C.f,{as:Q,allowPinchZoom:!0,children:(0,t.jsx)(d.v,{asChild:!0,trapped:O.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,i.f)(s,e=>{O.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:()=>O.onOpenChange(!1),children:(0,t.jsx)(el,{role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:e=>e.preventDefault(),...k,...el===en?{side:h,sideOffset:m,align:v,alignOffset:g,arrowPadding:y,collisionBoundary:w,collisionPadding:b,sticky:x,hideWhenDetached:S,avoidCollisions:R}:{},onPlaced:()=>H(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:(0,i.f)(k.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=W().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 n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>$(t)),e.preventDefault()}})})})})})})},"SelectContentImpl")),et=n.forwardRef(P(function(e,r){let{__scopeSelect:i,onPlaced:l,...s}=e,u=F(X,i),c=J(X,i),[f,d]=n.useState(null),[p,h]=n.useState(null),m=(0,a.f)(r,h),v=A(i),y=n.useRef(!1),w=n.useRef(!0),{viewport:b,selectedItem:S,selectedItemText:E,focusSelectedItem:C}=c,R=n.useCallback(()=>{if(u.trigger&&u.valueNode&&f&&p&&b&&S&&E){let e=u.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=u.valueNode.getBoundingClientRect(),r=E.getBoundingClientRect();if("rtl"!==u.dir){let i=r.left-t.left,l=n.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-r.right,l=window.innerWidth-n.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=v(),a=window.innerHeight-20,s=b.scrollHeight,c=window.getComputedStyle(p),d=parseInt(c.borderTopWidth,10),h=parseInt(c.paddingTop,10),m=parseInt(c.borderBottomWidth,10),g=d+h+s+parseInt(c.paddingBottom,10)+m,w=Math.min(5*S.offsetHeight,g),x=window.getComputedStyle(b),C=parseInt(x.paddingTop,10),R=parseInt(x.paddingBottom,10),P=e.top+e.height/2-10,k=S.offsetHeight/2,O=d+h+(S.offsetTop+k);if(O<=P){let e=i.length>0&&S===i[i.length-1].ref.current;f.style.bottom="0px";let t=Math.max(a-P,k+(e?R:0)+(p.clientHeight-b.offsetTop-b.offsetHeight)+m);f.style.height=O+t+"px"}else{let e=i.length>0&&S===i[0].ref.current;f.style.top="0px";let t=Math.max(P,d+b.offsetTop+(e?C:0)+k);f.style.height=t+(g-O)+"px",b.scrollTop=O-P+b.offsetTop}f.style.margin="10px 0",f.style.minHeight=w+"px",f.style.maxHeight=a+"px",l?.(),requestAnimationFrame(()=>y.current=!0)}},[v,u.trigger,u.valueNode,f,p,b,S,E,u.dir,l]);(0,x.f)(()=>R(),[R]);let[P,k]=n.useState();(0,x.f)(()=>{p&&k(window.getComputedStyle(p).zIndex)},[p]);let O=n.useCallback(e=>{e&&!0===w.current&&(R(),C?.(),w.current=!1)},[R,C]);return(0,t.jsx)(er,{scope:i,contentWrapper:f,shouldExpandOnScrollRef:y,onScrollButtonChange:O,children:(0,t.jsx)("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:(0,t.jsx)(g.V.div,{...s,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})},"SelectItemAlignedPosition")),en=n.forwardRef(P(function(e,n){let{__scopeSelect:r,align:o="start",collisionPadding:i=10,...l}=e,a=M(r);return(0,t.jsx)(h.c,{...a,...l,ref:n,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")),[er,eo]=D(X,{}),ei="SelectViewport",el=n.forwardRef(P(function(e,r){let{__scopeSelect:o,nonce:l,...s}=e,u=J(ei,o),c=eo(ei,o),f=(0,a.f)(r,u.onViewportChange),d=n.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)(j.Slot,{scope:o,children:(0,t.jsx)(g.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:n,shouldExpandOnScrollRef:r}=c;if(r?.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let i=o+e,l=Math.min(r,i),a=i-l;n.style.height=l+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})})})]})},"SelectViewport")),[ea,es]=D("SelectGroup"),eu=n.forwardRef(P(function(e,n){let{__scopeSelect:r,...o}=e,i=es("SelectLabel",r);return(0,t.jsx)(g.V.div,{id:i.id,...o,ref:n})},"SelectLabel")),ec="SelectItem",[ef,ed]=D(ec),ep=n.forwardRef(P(function(e,r){let{__scopeSelect:o,value:l,disabled:s=!1,textValue:u,...c}=e,f=F(ec,o),d=J(ec,o),h=f.value===l,[m,v]=n.useState(u??""),[y,b]=n.useState(!1),x=(0,w.f)(e=>d.itemRefCallback?.(e,l,s)),S=(0,a.f)(r,x),E=(0,p.f)(),C=n.useRef("touch");function R(e){f.hasConsumerStoppedPropagationRef.current=e.isPropagationStopped(),f.onUserSelect(l),f.onOpenChange(!1)}return P(R,"handleSelect"),(0,t.jsx)(ef,{scope:o,value:l,disabled:s,textId:E,isSelected:h,onItemTextChange:n.useCallback(e=>{v(t=>t||(e?.textContent??"").trim())},[]),children:(0,t.jsx)(j.ItemSlot,{scope:o,value:l,disabled:s,textValue:m,children:(0,t.jsx)(g.V.div,{role:"option","aria-labelledby":E,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"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,()=>b(!0)),onBlur:(0,i.f)(c.onBlur,()=>b(!1)),onClick:(0,i.f)(c.onClick,e=>{s||"mouse"!==C.current&&R(e)}),onPointerUp:(0,i.f)(c.onPointerUp,e=>{s||"mouse"===C.current&&R(e)}),onPointerDown:(0,i.f)(c.onPointerDown,e=>{C.current=e.pointerType}),onPointerMove:(0,i.f)(c.onPointerMove,e=>{C.current=e.pointerType,s?d.onItemLeave?.():"mouse"===C.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)&&(O.includes(e.key)&&R(e)," "===e.key&&e.preventDefault())})})})})},"SelectItem")),eh="SelectItemText",em=n.forwardRef(P(function(e,o){let{__scopeSelect:i,className:l,style:s,...u}=e,c=F(eh,i),f=J(eh,i),d=ed(eh,i),p=V(eh,i),[h,m]=n.useState(null),v=(0,w.f)(e=>f.itemTextRefCallback?.(e,d.value,d.disabled)),y=(0,a.f)(o,m,d.onItemTextChange,v),b=h?.textContent,S=n.useMemo(()=>(0,t.jsx)("option",{value:d.value,disabled:d.disabled,children:b},d.value),[d.disabled,d.value,b]),{onNativeOptionAdd:E,onNativeOptionRemove:C}=p;return(0,x.f)(()=>(E(S),()=>C(S)),[E,C,S]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g.V.span,{id:d.textId,...u,ref:y}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!eR(c.value)?r.createPortal(u.children,c.valueNode):null]})},"SelectItemText")),ev=n.forwardRef(P(function(e,n){let{__scopeSelect:r,...o}=e;return ed("SelectItemIndicator",r).isSelected?(0,t.jsx)(g.V.span,{"aria-hidden":!0,...o,ref:n}):null},"SelectItemIndicator")),eg="SelectScrollUpButton",ey=n.forwardRef(P(function(e,r){let o=J(eg,e.__scopeSelect),i=eo(eg,e.__scopeSelect),[l,s]=n.useState(!1),u=(0,a.f)(r,i.onScrollButtonChange);return(0,x.f)(()=>{if(o.viewport&&o.isPositioned){let e=function(){s(t.scrollTop>0)};P(e,"handleScroll");let t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?(0,t.jsx)(ex,{...e,ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null},"SelectScrollUpButton")),ew="SelectScrollDownButton",eb=n.forwardRef(P(function(e,r){let o=J(ew,e.__scopeSelect),i=eo(ew,e.__scopeSelect),[l,s]=n.useState(!1),u=(0,a.f)(r,i.onScrollButtonChange);return(0,x.f)(()=>{if(o.viewport&&o.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight;s(Math.ceil(t.scrollTop)<e)};P(e,"handleScroll");let t=o.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[o.viewport,o.isPositioned]),l?(0,t.jsx)(ex,{...e,ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=o;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null},"SelectScrollDownButton")),ex=n.forwardRef(P(function(e,r){let{__scopeSelect:o,onAutoScroll:l,...a}=e,s=J("SelectScrollButton",o),u=n.useRef(null),c=A(o),f=n.useCallback(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return n.useEffect(()=>()=>f(),[f]),(0,x.f)(()=>{let e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),(0,t.jsx)(g.V.div,{"aria-hidden":!0,...a,ref:r,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=n.forwardRef(P(function(e,n){let{__scopeSelect:r,...o}=e;return(0,t.jsx)(g.V.div,{"aria-hidden":!0,...o,ref:n})},"SelectSeparator")),eE=n.forwardRef(P(function({__scopeSelect:e,...r},o){let i=F("SelectBubbleInput",e),{value:l,onValueChange:s,required:u,disabled:c,name:f,autoComplete:d,form:p,userSelection:h}=i,{nativeOptions:m,nativeSelectKey:v}=i,y=n.useRef(null),w=(0,a.f)(o,y),b=l??"",x=n.useRef(b),E=n.useRef(h),C=n.useRef(!1),R=Array.from(m).some(e=>(e.props.value??"")==="");return n.useEffect(()=>{let e=y.current;if(!e)return;let t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set,n=null!==h&&h!==E.current;E.current=h;let r=x.current!==b;if(x.current=b,n&&!r&&h.value!==b&&!h.hasConsumerStoppedPropagation&&t){C.current=!0;try{t.call(e,h.value),e.dispatchEvent(new Event("change",{bubbles:!0}))}finally{C.current=!1,t.call(e,b)}return}let o=n&&r&&!h.hasConsumerStoppedPropagation;if(r&&t){let n=new Event("change",{bubbles:o});t.call(e,b),e.dispatchEvent(n)}},[b,h]),(0,t.jsxs)(g.V.select,{"aria-hidden":!0,required:u,tabIndex:-1,name:f,autoComplete:d,disabled:c,form:p,onChange:e=>{C.current||s(e.target.value)},...r,style:{...S.f,...r.style},ref:w,defaultValue:b,children:[eR(l)&&!R?(0,t.jsx)("option",{value:""}):null,Array.from(m)]},v)},"SelectBubbleInput"));function eC(e){return"function"==typeof e}function eR(e){return""===e||void 0===e}function eP(e){let t=(0,w.f)(e),r=n.useRef(""),o=n.useRef(0),i=n.useCallback(e=>{let n=r.current+e;function i(e){r.current=e,window.clearTimeout(o.current),""!==e&&(o.current=window.setTimeout(()=>i(""),1e3))}t(n),P(i,"updateSearch"),i(n)},[t]),l=n.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return n.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,l]}function ek(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1,i=eO(e,Math.max(o,0));1===r.length&&(i=i.filter(e=>e!==n));let l=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function eO(e,t){return e.map((n,r)=>e[(t+r)%e.length])}P(eC,"isFunction"),P(eR,"shouldShowPlaceholder"),P(eP,"useTypeaheadSearch"),P(ek,"findNextItem"),P(eO,"wrapArray");var eT=e.i(689664),ej=e.i(716327),eA=e.i(456539),eL=e.i(975157);let eD=n.forwardRef(({className:e,children:n,...r},o)=>(0,t.jsxs)(H,{ref:o,className:(0,eL.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),...r,children:[n,(0,t.jsx)(U,{asChild:!0,children:(0,t.jsx)(ej.f,{className:"h-4 w-4 opacity-50"})})]}));eD.displayName=H.displayName;let eN=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(ey,{ref:r,className:(0,eL.f)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(eA.f,{className:"h-4 w-4"})}));eN.displayName=ey.displayName;let eM=n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eb,{ref:r,className:(0,eL.f)("flex cursor-default items-center justify-center py-1",e),...n,children:(0,t.jsx)(ej.f,{className:"h-4 w-4"})}));eM.displayName=eb.displayName;let eI=n.forwardRef(({className:e,children:n,position:r="popper",...o},i)=>(0,t.jsx)(Y,{children:(0,t.jsxs)(q,{ref:i,className:(0,eL.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"===r&&"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:r,...o,children:[(0,t.jsx)(eN,{}),(0,t.jsx)(el,{className:(0,eL.f)("p-1","popper"===r&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),(0,t.jsx)(eM,{})]})}));eI.displayName=q.displayName,(n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eu,{ref:r,className:(0,eL.f)("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...n}))).displayName=eu.displayName;let eF=n.forwardRef(({className:e,children:n,...r},o)=>(0,t.jsxs)(ep,{ref:o,className:(0,eL.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),...r,children:[(0,t.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,t.jsx)(ev,{children:(0,t.jsx)(eT.f,{className:"h-4 w-4"})})}),(0,t.jsx)(em,{children:n})]}));eF.displayName=ep.displayName,(n.forwardRef(({className:e,...n},r)=>(0,t.jsx)(eS,{ref:r,className:(0,eL.f)("-mx-1 my-1 h-px bg-muted",e),...n}))).displayName=eS.displayName,e.s(["d",0,_,"r",0,eI,"T",0,eF,"P",0,eD,"U",0,z],967489)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,314381,3198,e=>{var t=e.i(456420);let i={name:"box",size:24,node:[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],314381);var r=e.i(843476),a=e.i(271645),o=e.i(632781);let l={name:"maximize-2",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]};l.node;let s=(0,t.f)(l),c={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};c.node;let h=(0,t.f)(c);var d=e.i(395925),u=e.i(741120),m=e.i(759659),g=e.i(519455),p=e.i(111110),f=e.i(294114),w=e.i(201276),x=e.i(113381);let y=null;function b(e,t,i){let n=e?.firstElementChild;n&&(n.style.width="100%",n.style.height=`${i}px`,t?.setSize(e?.offsetWidth||n.offsetWidth||800,i))}function v(e,t){let i=(0,x.L)(e,t);for(let e of i)w.V.warn("[GGB]","命令执行失败",{...e});return i.map(e=>e.command+":"+e.message).join("\n")||void 0}e.s(["f",0,function({commands:e,height:t=700,showToolBar:i=!1,showAlgebraInput:n=!1,showMenuBar:l=!1,className:c="",onRegenerate:C,onDelete:k}){let{t:j}=(0,p.b)(),D=(0,a.useRef)(null),M=(0,a.useRef)(null),E=(0,a.useRef)(void 0),_=(0,a.useId)(),N=(0,a.useRef)(`ggb-${_.replace(/[^a-zA-Z0-9_-]/g,"")}`),[R,S]=(0,a.useState)(!0),[L,I]=(0,a.useState)(null),[P,z]=(0,a.useState)(!0),[$,H]=(0,a.useState)(!1),[A,B]=(0,a.useState)(!1),Y=(0,a.useMemo)(()=>(0,x.i)(e),[e]);(0,a.useEffect)(()=>{if(0===Y.length)return;let e=!1,r=N.current,a=D.current;return(y||(y=new Promise((e,t)=>{if(window.GGBApplet)return void e();let i=document.createElement("script");i.src="https://www.geogebra.org/apps/deployggb.js",i.async=!0,i.onload=()=>e(),i.onerror=()=>{y=null,t(Error("Failed to load GeoGebra"))},document.head.appendChild(i)}))).then(()=>{if(e)return;let o=window.GGBApplet;if(!o){I(j.geogebra.notLoaded),S(!1);return}if(a){a.innerHTML=`<div id="${r}" style="width:100%;height:${t}px"></div>`;try{new o({appName:"classic",width:"100%",height:t,showToolBar:i,showAlgebraInput:n,showMenuBar:l,showResetIcon:!0,enableRightClick:!0,enableShiftDragZoom:!0,language:"zh",appletOnLoad:i=>{e||(M.current=i,b(a,i,t),E.current=v(i,Y),S(!1))}},!0).inject(r)}catch(t){w.V.error("[GGB]","Init failed",{error:t}),e||(I(j.geogebra.initFailed),S(!1))}}}).catch(t=>{w.V.error("[GGB]","Script load failed",{error:t}),e||(I(j.geogebra.scriptFailed),S(!1))}),()=>{e=!0;try{let e=M.current;e?.remove&&e.remove()}catch(e){w.V.warn("[GGB]","Cleanup failed",{error:e})}M.current=null,a&&(a.innerHTML="")}},[Y,i,n,l]),(0,a.useEffect)(()=>{b(D.current,M.current,P?700:t)},[P,t]);let O=(0,a.useCallback)(()=>{let e=M.current;if(e)try{e.resetConstruction(),setTimeout(()=>{M.current&&(E.current=v(M.current,Y))},300)}catch(e){w.V.warn("[GGB]","Reset failed",{error:e})}},[Y]),X=(0,a.useCallback)(async()=>{if(C&&!$){H(!0);try{await C(E.current)}finally{H(!1)}}},[C,$]),U=(0,a.useCallback)(async()=>{if(k&&!A&&await (0,f.u)(j.geogebra.confirmDelete,{destructive:!0})){B(!0);try{await k()}catch{f.c.error(j.geogebra.deleteFailed)}finally{B(!1)}}},[k,A,j]);return 0===Y.length?null:(0,r.jsxs)("div",{className:`relative rounded-lg border bg-card ${c}`,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b bg-muted/30",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-xs font-medium text-muted-foreground",children:j.geogebra.title}),R&&(0,r.jsx)(o.f,{className:"h-3 w-3 animate-spin text-muted-foreground"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[C&&(0,r.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1",onClick:X,title:j.geogebra.regenerate,disabled:$||R,children:[$?(0,r.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(u.f,{className:"h-3.5 w-3.5"}),(0,r.jsx)("span",{children:j.geogebra.regenerate})]}),k&&(0,r.jsxs)(g.f,{variant:"ghost",size:"sm",className:"h-7 px-2 text-xs gap-1 text-destructive hover:text-destructive",onClick:U,title:j.geogebra.delete,disabled:A||$,children:[A?(0,r.jsx)(o.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,r.jsx)(m.f,{className:"h-3.5 w-3.5"}),(0,r.jsx)("span",{children:j.geogebra.delete})]}),(0,r.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:O,title:j.geogebra.reset,disabled:R,children:(0,r.jsx)(d.f,{className:"h-3.5 w-3.5"})}),(0,r.jsx)(g.f,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>z(e=>!e),title:P?j.geogebra.shrink:j.geogebra.enlarge,children:P?(0,r.jsx)(h,{className:"h-3.5 w-3.5"}):(0,r.jsx)(s,{className:"h-3.5 w-3.5"})})]})]}),(0,r.jsx)("div",{ref:D,style:{width:"100%"}}),R&&(0,r.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-background/80 rounded-b-lg",style:{top:37},children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,r.jsx)(o.f,{className:"h-6 w-6 animate-spin text-primary"}),(0,r.jsx)("span",{className:"text-sm text-muted-foreground",children:j.geogebra.loading})]})}),L&&(0,r.jsx)("div",{className:"flex items-center justify-center text-sm text-destructive",style:{minHeight:t},children:L})]})}],3198)},856522,e=>{var t=e.i(456420);let i={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],856522)},328623,e=>{var t=e.i(456420);let i={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"]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],328623)},786563,e=>{var t=e.i(456420);let i={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],786563)},232660,e=>{var t=e.i(271645),i={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,i)=>Math.min(Math.max(e,t),i),r=(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,n){return"%"===e.unit?{...i,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function o(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...i,...e,unit:"px"}}function l(e,t,i,n,r,a=0,o=0,s=n,c=r){let h={...e},d=Math.min(a,n),u=Math.min(o,r),m=Math.min(s,n),g=Math.min(c,r);t&&(t>1?(u=(d=o?o*t:d)/t,m=s*t):(d=(u=a?a/t:u)*t,g=c/t)),h.y<0&&(h.height=Math.max(h.height+h.y,u),h.y=0),h.x<0&&(h.width=Math.max(h.width+h.x,d),h.x=0);let p=n-(h.x+h.width);p<0&&(h.x=Math.min(h.x,n-d),h.width+=p);let f=r-(h.y+h.height);if(f<0&&(h.y=Math.min(h.y,r-u),h.height+=f),h.width<d&&(("sw"===i||"nw"==i)&&(h.x-=d-h.width),h.width=d),h.height<u&&(("nw"===i||"ne"==i)&&(h.y-=u-h.height),h.height=u),h.width>m&&(("sw"===i||"nw"==i)&&(h.x-=m-h.width),h.width=m),h.height>g&&(("nw"===i||"ne"==i)&&(h.y-=g-h.height),h.height=g),t){let e=h.width/h.height;if(e<t){let e=Math.max(h.width/t,u);("nw"===i||"ne"==i)&&(h.y-=e-h.height),h.height=e}else if(e>t){let e=Math.max(h.height*t,d);("sw"===i||"nw"==i)&&(h.x-=e-h.width),h.width=e}}return h}var s={capture:!0,passive:!1},c=0,h=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-${c++}`;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:i,width:n,height:r}=e.getBoundingClientRect();return{x:t,y:i,width:n,height:r}}componentDidUpdate(e){let{crop:t,onComplete:i}=this.props;if(i&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&i(o(t,e,n),a(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,s),this.document.addEventListener("pointerup",this.onDocPointerDone,s),this.document.addEventListener("pointercancel",this.onDocPointerDone,s),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,s),this.document.removeEventListener("pointerup",this.onDocPointerDone,s),this.document.removeEventListener("pointercancel",this.onDocPointerDone,s),!1)}onCropPointerDown=e=>{let{crop:t,disabled:i}=this.props,n=this.getBox();if(!t)return;let r=o(t,n.width,n.height);if(i)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let a=e.target.dataset.ord,l=e.clientX,s=e.clientY,c=r.x,h=r.y;if(a){let t=e.clientX-n.x,i=e.clientY-n.y,o=0,d=0;"ne"===a||"e"==a?(o=t-(r.x+r.width),d=i-r.y,c=r.x,h=r.y+r.height):"se"===a||"s"===a?(o=t-(r.x+r.width),d=i-(r.y+r.height),c=r.x,h=r.y):"sw"===a||"w"==a?(o=t-r.x,d=i-(r.y+r.height),c=r.x+r.width,h=r.y):("nw"===a||"n"==a)&&(o=t-r.x,d=i-r.y,c=r.x+r.width,h=r.y+r.height),l=c+n.x+o,s=h+n.y+d}this.evData={startClientX:l,startClientY:s,startCropX:c,startCropY:h,clientX:e.clientX,clientY:e.clientY,isResize:!!a,ord:a},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:i,locked:n,keepSelection:r,onChange:l}=this.props,s=this.getBox();if(i||n||r&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let c=e.clientX-s.x,h=e.clientY-s.y,d={unit:"px",x:c,y:h,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:c,startCropY:h,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,l(o(d,s.width,s.height),a(d,s.width,s.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:i,disabled:n,onChange:l,onDragStart:s}=this.props,c=this.getBox();if(n||!i||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));let{evData:h}=this;h.clientX=e.clientX,h.clientY=e.clientY,r(i,t=h.isResize?this.resizeCrop():this.dragCrop())||l(o(t,c.width,c.height),a(t,c.width,c.height))};onComponentKeyDown=t=>{let{crop:i,disabled:r,onChange:l,onComplete:s}=this.props;if(r)return;let c=t.key,h=!1;if(!i)return;let d=this.getBox(),u=this.makePixelCrop(d),m=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===c?(u.x-=m,h=!0):"ArrowRight"===c?(u.x+=m,h=!0):"ArrowUp"===c?(u.y-=m,h=!0):"ArrowDown"===c&&(u.y+=m,h=!0),h){t.cancelable&&t.preventDefault(),u.x=n(u.x,0,d.width-u.width),u.y=n(u.y,0,d.height-u.height);let e=o(u,d.width,d.height),i=a(u,d.width,d.height);l(e,i),s&&s(e,i)}};onHandlerKeyDown=(t,i)=>{var n,s;let c,{aspect:h=0,crop:d,disabled:u,minWidth:m=0,minHeight:g=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:x}=this.props,y=this.getBox();if(u||!d||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=l((n=o(d,y.width,y.height),s=t.key,c={...n},"ArrowLeft"===s?"nw"===i?(c.x-=b,c.y-=b,c.width+=b,c.height+=b):"w"===i?(c.x-=b,c.width+=b):"sw"===i?(c.x-=b,c.width+=b,c.height+=b):"ne"===i?(c.y+=b,c.width-=b,c.height-=b):"e"===i?c.width-=b:"se"===i&&(c.width-=b,c.height-=b):"ArrowRight"===s&&("nw"===i?(c.x+=b,c.y+=b,c.width-=b,c.height-=b):"w"===i?(c.x+=b,c.width-=b):"sw"===i?(c.x+=b,c.width-=b,c.height-=b):"ne"===i?(c.y-=b,c.width+=b,c.height+=b):"e"===i?c.width+=b:"se"===i&&(c.width+=b,c.height+=b)),"ArrowUp"===s?"nw"===i?(c.x-=b,c.y-=b,c.width+=b,c.height+=b):"n"===i?(c.y-=b,c.height+=b):"ne"===i?(c.y-=b,c.width+=b,c.height+=b):"sw"===i?(c.x+=b,c.width-=b,c.height-=b):"s"===i?c.height-=b:"se"===i&&(c.width-=b,c.height-=b):"ArrowDown"===s&&("nw"===i?(c.x+=b,c.y+=b,c.width-=b,c.height-=b):"n"===i?(c.y+=b,c.height-=b):"ne"===i?(c.y+=b,c.width-=b,c.height-=b):"sw"===i?(c.x-=b,c.width+=b,c.height+=b):"s"===i?c.height+=b:"se"===i&&(c.width+=b,c.height+=b)),c),h,i,y.width,y.height,m,g,p,f);if(!r(d,v)){let e=a(v,y.width,y.height);w(v,e),x&&x(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:i,onComplete:n,onDragEnd:r}=this.props,l=this.getBox();this.unbindDocMove(),!(i||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,r&&r(e),n&&n(o(t,l.width,l.height),a(t,l.width,l.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(),i=this.makePixelCrop(t),r=e.clientX-e.startClientX,a=e.clientY-e.startClientY;return i.x=n(e.startCropX+r,0,t.width-i.width),i.y=n(e.startCropY+a,0,t.height-i.height),i}getPointRegion(e,t,i,n){let{evData:r}=this,a=r.clientX-e.x,o=r.clientY-e.y,l;return l=n&&t?"nw"===t||"n"===t||"ne"===t:o<r.startCropY,(i&&t?"nw"===t||"w"===t||"sw"===t:a<r.startCropX)?l?"nw":"sw":l?"ne":"se"}resolveMinDimensions(e,t,i=0,n=0){let r=Math.min(i,e.width),a=Math.min(n,e.height);return t&&(r||a)?t>1?r?[r,r/t]:[a*t,a]:a?[a*t,a]:[r,r/t]:[r,a]}resizeCrop(){let{evData:t}=this,{aspect:i=0,maxWidth:r,maxHeight:a}=this.props,o=this.getBox(),[s,c]=this.resolveMinDimensions(o,i,this.props.minWidth,this.props.minHeight),h=this.makePixelCrop(o),d=this.getPointRegion(o,t.ord,s,c),u=t.ord||d,m=t.clientX-t.startClientX,g=t.clientY-t.startClientY;(s&&"nw"===u||"w"===u||"sw"===u)&&(m=Math.min(m,-s)),(c&&"nw"===u||"n"===u||"ne"===u)&&(g=Math.min(g,-c));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(p.x=t.startCropX,p.width=m,i?p.height=p.width/i:p.height=Math.abs(g),p.y=t.startCropY-p.height):"se"===d?(p.x=t.startCropX,p.y=t.startCropY,p.width=m,i?p.height=p.width/i:p.height=g):"sw"===d?(p.x=t.startCropX+m,p.y=t.startCropY,p.width=Math.abs(m),i?p.height=p.width/i:p.height=g):"nw"===d&&(p.x=t.startCropX+m,p.width=Math.abs(m),i?(p.height=p.width/i,p.y=t.startCropY-p.height):(p.height=Math.abs(g),p.y=t.startCropY+g));let f=l(p,i,d,o.width,o.height,s,c,r,a);return i||e.xyOrds.indexOf(u)>-1?h=f:e.xOrds.indexOf(u)>-1?(h.x=f.x,h.width=f.width):e.yOrds.indexOf(u)>-1&&(h.y=f.y,h.height=f.height),h.x=n(h.x,0,o.width-h.width),h.y=n(h.y,0,o.height-h.height),h}renderCropSelection(){let{ariaLabels:i=e.defaultProps.ariaLabels,disabled:n,locked:r,renderSelectionAddon:a,ruleOfThirds:o,crop:l}=this.props,s=this.getCropStyle();if(l)return t.default.createElement("div",{style:s,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":i.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!r&&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":i.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":i.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":i.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":i.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":i.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":i.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":i.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":i.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({...i,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:i,circularCrop:n,className:r,crop:a,disabled:o,locked:l,style:s,ruleOfThirds:c}=this.props,{cropIsActive:h,newCropIsBeingDrawn:d}=this.state,u=a?this.renderCropSelection():null,m=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",r,h&&"ReactCrop--active",o&&"ReactCrop--disabled",l&&"ReactCrop--locked",d&&"ReactCrop--new-crop",a&&e&&"ReactCrop--fixed-aspect",a&&n&&"ReactCrop--circular-crop",a&&c&&"ReactCrop--rule-of-thirds",!this.dragStarted&&a&&!a.width&&!a.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:m,style:s},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},i),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"}),n?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,h])},469937,e=>{var t=e.i(843476),i=e.i(786563),n=e.i(111110),r=e.i(975157);let a=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:o,disabled:l,size:s="sm",showUnrated:c=!0,className:h}){let{t:d}=(0,n.b)(),u=e??0,m="sm"===s?"h-3.5 w-3.5":"h-5 w-5",g=u?d.difficulty.starsLabel.replace("{n}",String(u)):d.difficulty.unrated;return o?(0,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-0.5",h),role:"group","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:d.difficulty.clearHint,children:[a.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>o(e===u?null:e),"aria-label":d.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=u,className:"rounded p-0.5 hover:bg-muted disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(i.f,{className:(0,r.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!u&&c&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:d.difficulty.unrated})]}):u?(0,t.jsx)("span",{className:(0,r.f)("inline-flex items-center",h),role:"img","aria-label":`${d.difficulty.label}${d.common.colon}${g}`,title:g,children:a.map(e=>(0,t.jsx)(i.f,{className:(0,r.f)(m,e<=u?"fill-amber-400 text-amber-400":"text-muted-foreground/30"),"aria-hidden":!0},e))}):c?(0,t.jsx)("span",{className:(0,r.f)("text-xs text-muted-foreground",h),children:d.difficulty.unrated}):null}])},12130,e=>{var t=e.i(843476),i=e.i(271645),n=e.i(232660),r=e.i(519455),a=e.i(776639),o=e.i(263676),l=e.i(111110);async function s(e,t){let{naturalWidth:i,naturalHeight:n}=e;return Promise.all(t.map(t=>new Promise((r,a)=>{let o=document.createElement("canvas"),l=Math.round(t.x*i),s=Math.round(t.y*n);o.width=Math.max(1,Math.round(t.width*i)),o.height=Math.max(1,Math.round(t.height*n));let c=o.getContext("2d");c?(c.drawImage(e,l,s,o.width,o.height,0,0,o.width,o.height),o.toBlob(e=>e?r(e):a(Error("Canvas is empty")),"image/jpeg",.95)):a(Error("Canvas is not supported"))})))}let c={maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},h=(0,i.forwardRef)(function({imageSrc:e,regions:n,onChange:r,imageStyle:a=c,onImageLoad:s},h){let{t:d}=(0,l.b)(),u=(0,i.useRef)(null),m=(0,i.useRef)(null),[g,p]=(0,i.useState)(null),f=e=>{let t=u.current.getBoundingClientRect();return{x:(e.clientX-t.left)/t.width,y:(e.clientY-t.top)/t.height}},w=()=>{g&&g.width>=.02&&g.height>=.02&&r([...n,g]),m.current=null,p(null)},x=e=>({left:`${100*e.x}%`,top:`${100*e.y}%`,width:`${100*e.width}%`,height:`${100*e.height}%`});return(0,t.jsxs)("div",{className:"relative inline-block select-none",children:[(0,t.jsx)("img",{ref:h,src:e,alt:"",draggable:!1,style:a,onLoad:s,className:"block"}),(0,t.jsxs)("div",{ref:u,className:"absolute inset-0 cursor-crosshair",style:{touchAction:"none"},onPointerDown:e=>{0===e.button&&(u.current?.setPointerCapture(e.pointerId),m.current=f(e),p(null))},onPointerMove:e=>{var t,i,n,r;let a,o,l;if(!m.current)return;let s=f(e);p((t=m.current.x,i=m.current.y,n=s.x,r=s.y,o=(a=e=>Math.min(1,Math.max(0,e)))(Math.min(t,n)),l=a(Math.min(i,r)),{x:o,y:l,width:a(Math.max(t,n))-o,height:a(Math.max(i,r))-l}))},onPointerUp:w,onPointerCancel:w,children:[n.map((e,i)=>(0,t.jsxs)("div",{className:"absolute border-2 border-sky-400 bg-sky-400/15",style:x(e),children:[(0,t.jsx)("span",{className:"absolute left-0 top-0 bg-sky-500 px-1.5 text-xs font-bold text-white",children:i+1}),(0,t.jsx)("button",{type:"button",className:"absolute -right-3 -top-3 flex h-6 w-6 items-center justify-center rounded-full bg-red-500 text-white shadow","aria-label":d.batchImport.removeRegion.replace("{index}",String(i+1)),onPointerDown:e=>e.stopPropagation(),onClick:()=>r(n.filter((e,t)=>t!==i)),children:(0,t.jsx)(o.X,{className:"h-3 w-3"})})]},i)),g&&(0,t.jsx)("div",{className:"absolute border-2 border-dashed border-yellow-300 bg-yellow-300/10",style:x(g)})]})]})});var d=e.i(456420);let u={name:"zoom-in",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};u.node;let m=(0,d.f)(u),g={name:"zoom-out",size:24,node:[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]};g.node;let p=(0,d.f)(g);function f({zoom:e,onZoomIn:i,onZoomOut:n,onReset:r}){let{t:a}=(0,l.b)(),o="outline-none focus-visible:ring-2 focus-visible:ring-white/70",s=`flex h-9 w-9 items-center justify-center rounded-full text-white transition-colors hover:bg-white/20 disabled:opacity-40 disabled:hover:bg-transparent ${o}`;return(0,t.jsxs)("div",{className:"flex items-center gap-0.5 rounded-full bg-black/60 p-1 shadow-lg backdrop-blur-sm",children:[(0,t.jsx)("button",{type:"button",className:s,onClick:n,disabled:e<=1,"aria-label":a.common.cropper.zoomOut,title:a.common.cropper.zoomOut,children:(0,t.jsx)(p,{className:"h-4 w-4"})}),(0,t.jsxs)("button",{type:"button",className:`h-9 min-w-14 rounded-full px-2 text-center text-xs font-medium tabular-nums text-white hover:bg-white/20 ${o}`,onClick:r,"aria-label":a.common.cropper.resetZoom,title:a.common.cropper.resetZoom,children:[Math.round(100*e),"%"]}),(0,t.jsx)("button",{type:"button",className:s,onClick:i,disabled:e>=5,"aria-label":a.common.cropper.zoomIn,title:a.common.cropper.zoomIn,children:(0,t.jsx)(m,{className:"h-4 w-4"})})]})}var w=e.i(201276);let x={single:{maxHeight:"70vh",maxWidth:"100%",objectFit:"contain"},auto:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"},multi:{maxHeight:"65vh",maxWidth:"100%",objectFit:"contain"}};e.s(["f",0,function({imageSrc:e,open:o,onClose:c,onCropComplete:d,onMultiCropComplete:u,onRegionsSelected:m,allowMulti:g=!0,onAutoSplit:p,onAddPart:y,partCount:b=0}){let{t:v}=(0,l.b)(),C=/^(blob:|data:image\/)/i.test(e)?e:void 0,[k,j]=(0,i.useState)(),D=(0,i.useRef)(null),[M,E]=(0,i.useState)("single"),{containerRef:_,zoom:N,imageStyle:R,measureImage:S,zoomIn:L,zoomOut:I,reset:P}=function(e){let[t,n]=(0,i.useState)(null),r=(0,i.useRef)(null),a=(0,i.useCallback)(e=>{r.current=e,n(e)},[]),[o,l]=(0,i.useState)(1),s=(0,i.useRef)(1),[c,h]=(0,i.useState)(null),d=(0,i.useRef)(null),u=(0,i.useRef)(!1),m=(0,i.useCallback)((e,t,i)=>{let n=r.current,a=s.current,o=Math.min(5,Math.max(1,e));if(!n||o===a)return;if(1===a){let e=n.querySelector("img");e&&h(e.clientWidth)}let c=n.getBoundingClientRect(),u=(t??c.left+c.width/2)-c.left,m=(i??c.top+c.height/2)-c.top;d.current={viewX:u,viewY:m,contentX:n.scrollLeft+u,contentY:n.scrollTop+m,ratio:o/a},s.current=o,l(o)},[]);(0,i.useLayoutEffect)(()=>{let e=r.current,t=d.current;e&&t&&(e.scrollLeft=t.contentX*t.ratio-t.viewX,e.scrollTop=t.contentY*t.ratio-t.viewY,d.current=null)},[o]),(0,i.useEffect)(()=>{if(!t)return;let e=e=>{e.preventDefault(),m(s.current*Math.exp(-(.0015*e.deltaY)),e.clientX,e.clientY)},i=null,n=e=>{let[t,i]=[e[0],e[1]];return{distance:Math.hypot(t.clientX-i.clientX,t.clientY-i.clientY),centerX:(t.clientX+i.clientX)/2,centerY:(t.clientY+i.clientY)/2}},r=e=>{2===e.touches.length&&(i={distance:n(e.touches).distance,zoom:s.current},u.current=!0)},a=e=>{if(!i||2!==e.touches.length)return;e.preventDefault();let{distance:t,centerX:r,centerY:a}=n(e.touches);i.distance>0&&m(i.zoom*(t/i.distance),r,a)},o=e=>{e.touches.length<2&&(i=null,u.current=!1)},l=e=>{u.current&&e.stopPropagation()};return t.addEventListener("wheel",e,{passive:!1}),t.addEventListener("touchstart",r,{passive:!0}),t.addEventListener("touchmove",a,{passive:!1}),t.addEventListener("touchend",o),t.addEventListener("touchcancel",o),t.addEventListener("pointermove",l,{capture:!0}),()=>{t.removeEventListener("wheel",e),t.removeEventListener("touchstart",r),t.removeEventListener("touchmove",a),t.removeEventListener("touchend",o),t.removeEventListener("touchcancel",o),t.removeEventListener("pointermove",l,{capture:!0})}},[t,m]);let g=(0,i.useCallback)(e=>{e&&1===s.current&&h(e.clientWidth)},[]),p=(0,i.useCallback)(()=>m(1.25*s.current),[m]),f=(0,i.useCallback)(()=>m(s.current/1.25),[m]),w=(0,i.useCallback)(()=>{s.current=1,d.current=null,l(1)},[]),x=1!==o&&c?{...e,width:c*o,height:"auto",maxWidth:"none",maxHeight:"none"}:e;return{containerRef:a,zoom:o,imageStyle:x,measureImage:g,zoomIn:p,zoomOut:f,reset:w}}(x[M]);(0,i.useEffect)(()=>{P()},[e,P]);let[z,$]=(0,i.useState)({src:e,regions:[]}),H=z.src===e?z.regions:[],A=t=>$({src:e,regions:t}),B=(0,i.useRef)(null),Y=["single",...p?["auto"]:[],...u||m&&g?["multi"]:[]],O={single:v.batchImport.singleMode,auto:v.batchImport.autoMode,multi:v.batchImport.multiMode},X=async()=>{if(0!==H.length){if(m){m(H,!0),A([]);return}if(B.current&&u)try{u(await s(B.current,H)),A([])}catch(e){w.V.error("[ImageCropper]","Multi-image crop failed",{error:e})}}},U=()=>k&&k.width>0&&k.height>0?{x:k.x/100,y:k.y/100,width:k.width/100,height:k.height/100}:{x:0,y:0,width:1,height:1},K=async()=>{let e=U();if("auto"===M&&p)return void p(e);if(m)return void m([e],!1);if(D.current&&d)try{let[t]=await s(D.current,[e]);d(t)}catch(e){w.V.error("[ImageCropper]","Crop failed",{error:e})}};return(0,t.jsx)(a.N,{open:o,onOpenChange:e=>!e&&c(),children:(0,t.jsxs)(a.d,{className:"max-w-3xl h-[90vh] flex flex-col p-0 gap-0",children:[(0,t.jsx)(a.s,{className:"p-4 border-b shrink-0",children:(0,t.jsx)(a.F,{children:v.common.cropper?.title||"Crop Image"})}),(0,t.jsxs)("div",{className:"relative min-h-0 flex-1 bg-black",children:[(0,t.jsx)("div",{ref:_,className:"flex h-full w-full overflow-auto p-4",children:(0,t.jsx)("div",{className:"m-auto",children:"multi"===M?(0,t.jsx)(h,{ref:B,imageSrc:C,regions:H,onChange:A,imageStyle:R,onImageLoad:e=>S(e.currentTarget)}):(0,t.jsx)(n.f,{crop:k,onChange:(e,t)=>j(t),children:(0,t.jsx)("img",{ref:D,alt:"Crop me",src:C,onLoad:function(e){j({unit:"%",x:0,y:0,width:100,height:100}),S(e.currentTarget)},style:R})})})}),(0,t.jsx)("div",{className:"absolute right-3 top-3",children:(0,t.jsx)(f,{zoom:N,onZoomIn:L,onZoomOut:I,onReset:P})})]}),(0,t.jsxs)("div",{className:"p-4 border-t bg-background shrink-0 space-y-3",children:[Y.length>1&&(0,t.jsx)("div",{className:`grid gap-1 rounded-md bg-muted p-1 ${3===Y.length?"grid-cols-3 sm:w-[28rem]":"grid-cols-2 sm:w-80"}`,children:Y.map(e=>(0,t.jsx)("button",{type:"button","aria-pressed":M===e,onClick:()=>{P(),E(e)},className:`rounded px-2 py-1.5 text-sm font-medium transition-colors ${M===e?"bg-background shadow-sm":"text-muted-foreground"}`,children:O[e]},e))}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:justify-between sm:items-center gap-3",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"multi"===M?`${v.batchImport.hint} ${v.batchImport.regionCount.replace("{count}",String(H.length))}`:"auto"===M?v.batchImport.autoHint:b>0?v.upload.parts.cropHint.replace("{n}",String(b+1)):v.common.cropper?.hint||"💡 Drag to adjust crop area"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 justify-end",children:["multi"===M&&H.length>0&&(0,t.jsx)(r.f,{variant:"ghost",onClick:()=>A([]),children:v.batchImport.clear}),(0,t.jsx)(r.f,{variant:"outline",onClick:c,children:v.common.cancel||"Cancel"}),"multi"===M?(0,t.jsx)(r.f,{onClick:X,disabled:0===H.length,children:v.batchImport.start.replace("{count}",String(H.length))}):(0,t.jsxs)(t.Fragment,{children:["single"===M&&y&&(0,t.jsx)(r.f,{variant:"secondary",onClick:()=>y(U()),"data-testid":"crop-add-part",children:v.upload.parts.addNext}),(0,t.jsx)(r.f,{onClick:K,children:"auto"===M?v.batchImport.autoStart:b>0?v.upload.parts.confirm.replace("{count}",String(b+1)):v.common.confirm||"Confirm"})]})]})]})]})]})})}],12130)},141176,e=>{var t=e.i(843476),i=e.i(271645),n=e.i(456420);let r={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};r.node;let a=(0,n.f)(r);var o=e.i(772382),l=e.i(511445),s=e.i(624687),c=e.i(111110),h=e.i(975157);e.s(["f",0,function({value:e,onChange:n,className:r,...d}){let{t:u}=(0,c.b)(),[m,g]=(0,i.useState)("source"),p=(0,i.useId)(),f=[{mode:"source",label:u.markdownEditor.source,icon:a},{mode:"preview",label:u.markdownEditor.preview,icon:o.f}];return(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("div",{role:"tablist","aria-label":u.markdownEditor.modeLabel,className:"flex justify-end",children:(0,t.jsx)("div",{className:"inline-flex rounded-md border bg-muted/40 p-0.5",children:f.map(({mode:e,label:i,icon:n})=>(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":m===e,"aria-controls":p,onClick:()=>g(e),className:(0,h.f)("flex items-center gap-1 rounded px-2.5 py-1 text-xs transition-colors",m===e?"bg-background font-medium shadow-sm":"text-muted-foreground hover:text-foreground"),children:[(0,t.jsx)(n,{className:"h-3.5 w-3.5"}),i]},e))})}),(0,t.jsx)("div",{id:p,role:"tabpanel",children:"source"===m?(0,t.jsx)(s.f,{value:e,onChange:e=>n(e.target.value),className:r,...d}):(0,t.jsx)("div",{className:"min-h-24 cursor-text rounded-md border bg-muted/20 px-3 py-2",onDoubleClick:()=>g("source"),title:u.markdownEditor.doubleClickToEdit,children:e.trim()?(0,t.jsx)(l.f,{content:e}):(0,t.jsx)("p",{className:"text-sm italic text-muted-foreground",children:u.markdownEditor.empty})})})]})}],141176)},438465,674166,e=>{var t=e.i(843476),i=e.i(271645),n=e.i(967489),r=e.i(856423),a=e.i(41931),o=e.i(201276),l=e.i(111110);e.s(["f",0,function({value:e,onChange:s,className:c}){let[h,d]=(0,i.useState)([]),{t:u}=(0,l.b)();return(0,i.useEffect)(()=>{(async()=>{try{let e=await a.k.get("/api/notebooks");d(e)}catch(e){o.V.error("[NotebookSelector]","Failed to fetch notebooks",{error:e})}})()},[]),(0,t.jsxs)(n.d,{value:e,onValueChange:s,children:[(0,t.jsx)(n.P,{className:c,children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(r.f,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsx)(n.U,{placeholder:u.notebooks?.selector?.placeholder||"Select Notebook"})]})}),(0,t.jsx)(n.r,{children:0===h.length?(0,t.jsx)("div",{className:"p-2 text-sm text-muted-foreground text-center",children:u.notebooks?.selector?.empty||"No notebooks available"}):h.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],438465);var s=e.i(470279);e.s(["f",0,function({value:e,onChange:i,disabled:r}){let{groups:a,loading:o}=(0,s.f)(),l=a.filter(e=>e.isActive);return(0,t.jsxs)(n.d,{value:e,onValueChange:i,disabled:r||o,children:[(0,t.jsx)(n.P,{children:(0,t.jsx)(n.U,{placeholder:"选择卷别"})}),(0,t.jsx)(n.r,{children:l.map(e=>(0,t.jsx)(n.T,{value:e.id,children:e.name},e.id))})]})}],674166)},149704,e=>{var t=e.i(843476),i=e.i(111110),n=e.i(398019),r=e.i(184110),a=e.i(975157);let o={left:"mr-auto",center:"mx-auto",right:"ml-auto"};e.s(["f",0,function({svg:e,scale:l,align:s,className:c}){let{t:h}=(0,i.b)();if(!e)return null;let d=(0,r.V)(l),u=(0,r.o)(s);return(0,t.jsx)("figure",{className:(0,a.f)("question-figure my-3",c),children:(0,t.jsx)("img",{src:(0,n.d)(e),alt:h.figure.alt,className:(0,a.f)(o[u],"block h-auto max-w-full rounded border bg-white p-2"),style:{..."left"===u?{marginLeft:0,marginRight:"auto"}:"right"===u?{marginLeft:"auto",marginRight:0}:{},maxHeight:360,zoom:d/100,maxWidth:`${Math.min(d,100)}%`}})})}])},574041,e=>{var t=e.i(843476),i=e.i(271645),n=e.i(263676),r=e.i(487486),a=e.i(793479),o=e.i(41931),l=e.i(201276);e.s(["f",0,function({value:e=[],onChange:s,placeholder:c="Enter tags...",className:h="",enterHint:d,subject:u,gradeStage:m}){let[g,p]=(0,i.useState)(""),[f,w]=(0,i.useState)([]),[x,y]=(0,i.useState)(!1),[b,v]=(0,i.useState)(0),C=(0,i.useRef)(null),k=(0,i.useRef)(null),j=(0,i.useCallback)(async t=>{try{let i=new URLSearchParams({q:t});u&&i.append("subject",u),m&&i.append("stage",m);let n=((await o.k.get(`/api/tags/suggestions?${i.toString()}`)).suggestions||[]).filter(t=>!e.includes(t));w(n.slice(0,20)),y(n.length>0),v(0)}catch(e){l.V.error("[TagInput]","Failed to fetch suggestions",{error:e})}},[u,m,e]);(0,i.useEffect)(()=>{g.trim()&&j(g)},[g,j]);let D=t=>{t.trim()&&!e.includes(t.trim())&&(s([...e,t.trim()]),p(""),w([]),y(!1),v(0))},M=t=>{s(e.filter(e=>e!==t))};return(0,i.useEffect)(()=>{let e=e=>{!k.current||k.current.contains(e.target)||C.current?.contains(e.target)||y(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,t.jsxs)("div",{className:`relative ${h}`,children:[(0,t.jsxs)("div",{className:"flex flex-wrap gap-2 p-2 border rounded-lg bg-background min-h-[42px]",children:[e.map(e=>(0,t.jsxs)(r.f,{variant:"secondary",className:"flex items-center gap-1 px-2 py-1",children:[e,(0,t.jsx)("button",{type:"button",onClick:()=>M(e),className:"hover:text-destructive ml-1",children:(0,t.jsx)(n.X,{className:"h-3 w-3"})})]},e)),(0,t.jsx)(a.f,{ref:C,type:"text",value:g,onChange:e=>{p(e.target.value),e.target.value.trim()||(w([]),y(!1))},onKeyDown:t=>{"Enter"===t.key?(t.preventDefault(),b>=0&&f[b]?D(f[b]):g.trim()&&D(g)):"ArrowDown"===t.key?(t.preventDefault(),v(e=>Math.min(e+1,f.length-1))):"ArrowUp"===t.key?(t.preventDefault(),v(e=>Math.max(e-1,0))):"Escape"===t.key?(y(!1),v(0)):"Backspace"===t.key&&!g&&e.length>0&&M(e[e.length-1])},onFocus:()=>{f.length>0&&y(!0)},placeholder:0===e.length?c:"",className:"flex-1 min-w-[120px] border-none focus-visible:ring-0 focus-visible:ring-offset-0 h-8 px-0"})]}),x&&f.length>0&&(0,t.jsx)("div",{ref:k,className:"absolute z-50 w-full mt-1 bg-popover border rounded-md shadow-md max-h-48 overflow-y-auto",children:f.map((e,i)=>(0,t.jsx)("div",{className:`px-3 py-2 cursor-pointer hover:bg-accent ${i===b?"bg-accent":""}`,onClick:()=>D(e),onMouseEnter:()=>v(i),children:e},e))}),g&&!x&&(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:d?`${d} "${g}"`:`Press Enter to create "${g}"`})]})}])},184110,e=>{let t=["left","center","right"],i="center";function n(e){return"number"==typeof e&&Number.isInteger(e)&&e>=10&&e<=200}e.s(["E",0,i,"n",0,100,"j",0,t,"a",0,200,"_",0,10,"x",0,n,"o",0,function(e){return"string"==typeof e&&t.includes(e)?e:i},"V",0,function(e){return n(e)?e:100}])},398019,e=>{e.s(["K",0,1e5,"d",0,function(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}])},213761,e=>{let t={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class i extends Error{code;format;constructor(e,t,i){super(e,void 0===i?void 0:{cause:i}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let n=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),r=new Set(["mif1","msf1","mif2"]),a=new Set(["avif","avis"]);function o(e,i,n=t){let r=Math.min(1,n.maxLongEdge/Math.max(e,i),Math.sqrt(n.maxPixels/Math.max(1,e*i)));return{width:Math.max(1,Math.floor(e*r)),height:Math.max(1,Math.floor(i*r)),scale:r}}async function l(e){let t,i;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(i=new Image).decoding="async",new Promise((e,n)=>{i.onload=()=>e(i),i.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),i.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function s(t){let{heicTo:i}=await e.A(462684);return i({blob:t,type:"image/jpeg",quality:.95})}function c(e,t){return new Promise((i,n)=>{e.toBlob(e=>e?i(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function h(e,t,i,n,r,a,o){let l,s=((l=document.createElement("canvas")).width=a,l.height=o,l),c=s.getContext("2d");if(!c)throw Error("CANVAS_UNSUPPORTED");return c.fillStyle="#ffffff",c.fillRect(0,0,a,o),c.imageSmoothingEnabled=!0,c.imageSmoothingQuality="high",c.drawImage(e,t,i,n,r,0,0,a,o),s}async function d(e,t){var d;let u,m=performance.now(),g=await e.arrayBuffer(),p=performance.now()-m,f=function(e){let t=(t,i)=>String.fromCharCode(...e.subarray(t,i));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 i=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),o=[t(8,12)];for(let e=16;e+4<=i;e+=4)o.push(t(e,e+4));if(o.some(e=>n.has(e)))return"heic";if(o.some(e=>a.has(e)))return"avif";if(o.some(e=>r.has(e)))return"heic"}return"unknown"}(new Uint8Array(g,0,Math.min(g.byteLength,64))),w=e.type||"",x=performance.now(),y="native",b=new Blob([g],{type:w||"application/octet-stream"});try{u=await l(b)}catch(e){if("heic"!==f)throw new i("unknown"===f?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",f,e);t?.();try{u=await l(await s(b)),y="heic"}catch(e){throw new i("HEIC_DECODE_FAILED",f,e)}}let{width:v,height:C}=(d=u)instanceof HTMLImageElement?{width:d.naturalWidth,height:d.naturalHeight}:{width:d.width,height:d.height};if(!v||!C)throw new i("IMAGE_DECODE_FAILED",f);let k=o(v,C,{maxLongEdge:1600,maxPixels:1/0}),j=await c(h(u,0,0,v,C,k.width,k.height),.85),D=URL.createObjectURL(j),M=performance.now()-x;return{source:u,width:v,height:C,format:f,decoder:y,previewUrl:D,sourceType:w,sourceBytes:e.size,timings:{read:Math.round(p),convert:Math.round(M)},dispose:()=>{URL.revokeObjectURL(D),u instanceof HTMLImageElement||u.close()}}}let u={x:0,y:0,width:1,height:1};async function m(e,i=u,n=t){var r;let a=performance.now(),l=e=>Math.min(1,Math.max(0,e)),s=Math.round(l(i.x)*e.width),d=Math.round(l(i.y)*e.height),g=Math.max(1,Math.min(e.width-s,Math.round(l(i.width)*e.width))),p=Math.max(1,Math.min(e.height-d,Math.round(l(i.height)*e.height))),f=o(g,p,n),w=h(e.source,s,d,g,p,f.width,f.height),x=performance.now()-a,y=performance.now(),b=n.startQuality,v=await c(w,b);for(let t=0;v.size>n.maxBytes&&t<12;t++)b-.05>=n.minQuality-1e-9?b=Math.round((b-.05)*100)/100:(f={width:Math.max(1,Math.floor(.85*f.width)),height:Math.max(1,Math.floor(.85*f.height)),scale:.85*f.scale},w=h(e.source,s,d,g,p,f.width,f.height)),v=await c(w,b);return{dataUrl:await (r=v,new Promise((e,t)=>{let i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>t(i.error??Error("READ_FAILED")),i.readAsDataURL(r)})),width:f.width,height:f.height,bytes:v.size,quality:b,timings:{crop:Math.round(x),compress:Math.round(performance.now()-y)}}}e.s(["K",0,t,"o",0,i,"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,d,"X",0,m])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,i="zh"){return("en"===i?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,i){return(i||"").trim()?"wrong_attempt":t(e)}])},401280,e=>{let t={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};e.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(e){if("string"!=typeof e)return null;let i=e.trim().toLowerCase();return i?t[i]??null:null}])},597138,e=>{e.i(306831),e.s(["f",0,function(e){if(!e)return null;let t=e.toLowerCase();return t.includes("math")||t.includes("数学")?"math":t.includes("physics")||t.includes("物理")?"physics":t.includes("chemistry")||t.includes("化学")?"chemistry":t.includes("biology")||t.includes("生物")?"biology":t.includes("english")||t.includes("英语")?"english":t.includes("chinese")||t.includes("语文")?"chinese":t.includes("history")||t.includes("历史")?"history":t.includes("geography")||t.includes("地理")?"geography":t.includes("politics")||t.includes("政治")?"politics":null}])}])})();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,615568,168148,e=>{var t=e.i(456420);let s={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"}]]};s.node;let r=(0,t.f)(s);e.s(["f",0,r],615568);var n=e.i(843476),a=e.i(271645),i=e.i(30030),l=e.i(248425),o=Object.defineProperty,u=(e,t)=>o(e,"name",{value:t,configurable:!0}),d="Progress",[c,m]=(0,i.f)(d),[f,h]=c(d),p=a.forwardRef(u(function(e,t){let{__scopeProgress:s,value:r=null,max:a,getValueLabel:i=x,...o}=e;(a||0===a)&&!v(a)&&console.error(b(`${a}`,"Progress"));let u=v(a)?a:100;null===r||j(r,u)||console.error(k(`${r}`,"Progress"));let d=j(r,u)?r:null,c=y(d)?i(d,u):void 0;return(0,n.jsx)(f,{scope:s,value:d,max:u,children:(0,n.jsx)(l.V.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":y(d)?d:void 0,"aria-valuetext":c,role:"progressbar","data-state":w(d,u),"data-value":d??void 0,"data-max":u,...o,ref:t})})},"Progress")),g=a.forwardRef(u(function(e,t){let{__scopeProgress:s,...r}=e,a=h("ProgressIndicator",s);return(0,n.jsx)(l.V.div,{"data-state":w(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})},"ProgressIndicator"));function x(e,t){return`${Math.round(e/t*100)}%`}function w(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function y(e){return"number"==typeof e}function v(e){return y(e)&&!isNaN(e)&&e>0}function j(e,t){return y(e)&&!isNaN(e)&&e<=t&&e>=0}function b(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 k(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\`.`}u(x,"defaultGetValueLabel"),u(w,"getProgressState"),u(y,"isNumber"),u(v,"isValidMaxNumber"),u(j,"isValidValueNumber"),u(b,"getInvalidMaxError"),u(k,"getInvalidValueError");var N=e.i(975157);let S=a.forwardRef(({className:e,value:t,...s},r)=>(0,n.jsx)(p,{ref:r,value:t,className:(0,N.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...s,children:(0,n.jsx)(g,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));S.displayName=p.displayName,e.s(["f",0,S],168148)},866531,497346,183444,e=>{var t=e.i(843476),s=e.i(271645),r=e.i(632781),n=e.i(741120),a=e.i(856522),i=e.i(314381),l=e.i(3198),o=e.i(519455),u=e.i(111110),d=e.i(41931),c=e.i(294114),m=e.i(201276);function f({data:e,onChange:n}){let{t:a}=(0,u.b)(),[h,p]=(0,s.useState)(!1),[g,x]=(0,s.useState)(null),w=async()=>{if(!e.questionText.trim())return void c.c.warning(a.editor.enterQuestionFirst||"Please enter question text first");if(!e.answerText.trim())return void c.c.warning(a.geogebra.answerRequired);p(!0),x(null);try{let t=await d.k.post("/api/geogebra-analyze",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis},{timeout:18e4,recoverable:!0});t.suitable&&t.commands&&t.commands.length>0?n({geogebraCommands:JSON.stringify(t.commands)}):x(t.description||a.geogebra.notSuitable)}catch(e){m.V.error("[CorrectionEditor]","GeoGebra analysis failed",{error:e}),x(a.geogebra.analyzeFailed)}finally{p(!1)}};return e.geogebraCommands?(0,t.jsx)(l.f,{commands:e.geogebraCommands,height:350,onRegenerate:w,onDelete:async()=>n({geogebraCommands:void 0})}):e.questionText.trim()&&e.answerText.trim()?(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)(i.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{children:a.geogebra.title})]}),(0,t.jsx)(o.f,{variant:"outline",size:"sm",onClick:w,disabled:h,children:h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.f,{className:"mr-2 h-4 w-4 animate-spin"}),a.geogebra.analyzing]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.f,{className:"mr-2 h-4 w-4"}),a.geogebra.generate]})})]}),g&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:g}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-2",children:a.geogebra.hint})]}):null}var h=e.i(469937),p=e.i(28342),g=e.i(438465),x=e.i(674166),w=e.i(110204),y=e.i(967489),v=e.i(401280);function j({data:e,paperLevel:s,onChange:r}){let{t:n}=(0,u.b)();return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.editor.selectNotebook||"Select Notebook"}),(0,t.jsx)(g.f,{value:e.subjectId,onChange:e=>r({subjectId:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.questionType.label||"Question Type"}),(0,t.jsxs)(y.d,{value:e.questionType||"",onValueChange:e=>r({questionType:e===v.O?null:e}),children:[(0,t.jsx)(y.P,{children:(0,t.jsx)(y.U,{placeholder:n.questionType.notSet||"Not set"})}),(0,t.jsxs)(y.r,{children:[(0,t.jsx)(y.T,{value:v.O,children:n.questionType.clear||"Clear"}),v.V.map(e=>(0,t.jsx)(y.T,{value:e,children:n.questionType.names?.[e]||e},e))]})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{htmlFor:"correction-grade-semester",children:n.editor.gradeSemester||"Grade/Semester"}),(0,t.jsx)(p.f,{id:"correction-grade-semester",value:e.gradeSemester||"",onChange:e=>r({gradeSemester:e})})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.editor.paperLevel||"Paper Level"}),(0,t.jsx)(x.f,{value:s,onChange:e=>r({paperLevel:e})})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:n.difficulty.label}),(0,t.jsx)("div",{children:(0,t.jsx)(h.f,{size:"md",value:e.difficultyStars,onChange:e=>r({difficultyStars:e})})})]})]})}var b=e.i(141176),k=e.i(515288);function N({data:e,onChange:s}){let{t:r}=(0,u.b)();return(0,t.jsxs)(k.N,{children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(k.v,{children:r.editor.mistakeAnalysisTitle||"Mistake Analysis"})}),(0,t.jsxs)(k.O,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:r.editor.mistakeStatus||"Attempt Status"}),(0,t.jsxs)(y.d,{value:e.mistakeStatus||"unknown",onValueChange:e=>s({mistakeStatus:e}),children:[(0,t.jsx)(y.P,{children:(0,t.jsx)(y.U,{})}),(0,t.jsxs)(y.r,{children:[(0,t.jsx)(y.T,{value:"not_attempted",children:r.editor.mistakeStatuses?.notAttempted||"Not attempted"}),(0,t.jsx)(y.T,{value:"wrong_attempt",children:r.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt"}),(0,t.jsx)(y.T,{value:"unknown",children:r.editor.mistakeStatuses?.unknown||"Unknown"})]})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:r.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(b.f,{value:e.wrongAnswerText||"",onChange:t=>s({wrongAnswerText:t,mistakeStatus:t.trim()?"wrong_attempt":e.mistakeStatus}),className:"min-h-[100px] font-mono text-sm",placeholder:r.editor.wrongAnswerPlaceholder||"Leave blank if no wrong answer is visible"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:r.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(b.f,{value:e.mistakeAnalysis||"",onChange:e=>s({mistakeAnalysis:e}),className:"min-h-[140px] font-mono text-sm",placeholder:r.editor.mistakeAnalysisPlaceholder||"Explain where and why the mistake happened"})]})]})]})}var S=e.i(511445),T=e.i(149704);function A({title:e,children:s,className:r}){return(0,t.jsxs)(k.N,{children:[(0,t.jsx)(k.Y,{children:(0,t.jsx)(k.v,{children:e})}),(0,t.jsx)(k.O,{className:r,children:s})]})}function I({data:e,children:s}){let{t:r}=(0,u.b)(),n={wrong_attempt:r.editor.mistakeStatuses?.wrongAttempt||"Wrong attempt",not_attempted:r.editor.mistakeStatuses?.notAttempted||"Not attempted",unknown:r.editor.mistakeStatuses?.unknown||"Unknown"};return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(A,{title:r.editor.preview?.question||"Question Preview",children:[(0,t.jsx)(S.f,{content:e.questionText}),(0,t.jsx)(T.f,{svg:e.figureSvg})]}),s,(0,t.jsx)(A,{title:r.editor.preview?.answer||"Answer Preview",children:(0,t.jsx)(S.f,{content:e.answerText})}),(0,t.jsx)(A,{title:r.editor.preview?.analysis||"Analysis Preview",children:(0,t.jsx)(S.f,{content:e.analysis})}),(0,t.jsxs)(A,{title:r.editor.preview?.mistakeAnalysis||"Mistake Analysis Preview",className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{className:"text-muted-foreground",children:[r.editor.mistakeStatus||"Attempt Status",r.common.colon,n[e.mistakeStatus]??n.unknown]}),e.wrongAnswerText&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:r.editor.wrongAnswerText||"Wrong Answer / Work"}),(0,t.jsx)(S.f,{content:e.wrongAnswerText})]}),e.mistakeAnalysis&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"font-medium mb-1",children:r.editor.mistakeAnalysis||"Mistake Cause Analysis"}),(0,t.jsx)(S.f,{content:e.mistakeAnalysis})]})]})]})}var E=e.i(574041),_=e.i(215519),$=e.i(306831);e.i(676167);var C=e.i(597138),M=e.i(991722),R=e.i(470279),O=e.i(303163);e.s(["f",0,function({initialData:e,onSave:i,onCancel:l,imagePreview:h,initialSubjectId:p,aiTimeout:g}){let{timeZone:x}=(0,_.M)(),{t:y,language:v}=(0,u.b)(),S=e=>e.trim()?e:"",[T,A]=(0,s.useState)({...e,answerText:S(e.answerText),analysis:S(e.analysis),wrongAnswerText:e.wrongAnswerText||"",mistakeAnalysis:e.mistakeAnalysis||"",mistakeStatus:e.mistakeStatus||"unknown",subjectId:p,gradeSemester:e.gradeSemester||""}),q=(0,s.useRef)(!1),P=e=>{"gradeSemester"in e&&(q.current=!0),A(t=>({...t,...e}))},{groups:U}=(0,R.f)(),V=(()=>{if(T.paperLevel)return T.paperLevel;let e="number"==typeof T.difficultyStars&&T.difficultyStars>=4?"b":"a";return U.find(t=>t.key===e&&t.isActive)?.id||""})(),L=T.paperLevel??V,[F,D]=(0,s.useState)(!1),[G,z]=(0,s.useState)(!1),[Q,H]=(0,s.useState)(!1),[W,B]=(0,s.useState)(void 0),[J,X]=(0,s.useState)([]);(0,s.useEffect)(()=>{d.k.get("/api/notebooks").then(X).catch(e=>m.V.error("[CorrectionEditor]","Failed to fetch notebooks",{error:e})),d.k.get("/api/user").then(e=>{if(H(!!e?.enableGeogebra),e){let t=function(e,t=$.J){return"ai"===e.gradeRecognitionMode?null:e.fixedGradeSemester?e.fixedGradeSemester:e.educationStage&&e.enrollmentYear?function(e,t,s=new Date,r="en",n=$.J){let a=(0,$.c)(s,n),i=a.getFullYear(),l=a.getMonth()+1,o=i-t,u="2nd";l>=9?(o+=1,u="1st"):u=l<2?"1st":"2nd";let d="zh"===r,c=d?"1st"===u?"上期":"下期":"1st"===u?"1st Semester":"2nd Semester",m=(d?{primary:["一年级","二年级","三年级","四年级","五年级","六年级"],junior_high:["初一","初二","初三"],senior_high:["高一","高二","高三"],university:["大一","大二","大三","大四"]}:{primary:["Grade 1","Grade 2","Grade 3","Grade 4","Grade 5","Grade 6"],junior_high:["Junior High Grade 1","Junior High Grade 2","Junior High Grade 3"],senior_high:["Senior High Grade 1","Senior High Grade 2","Senior High Grade 3"],university:["Freshman","Sophomore","Junior","Senior"]})[e]||[],f=`${o}`;if(f=o>0&&o<=m.length?m[o-1]:o>m.length?d?"已毕业":"Graduated":d?"学前":"Pre-school",!d)return`${f}, ${c}`;{let e="1st"===u?"上":"下";return`${f}${e}`}}(e.educationStage,e.enrollmentYear,new Date,"zh",t):null}(e,x);A(e=>e.gradeSemester||q.current?e:{...e,gradeSemester:t||""}),B(e.educationStage||void 0)}}).catch(e=>m.V.error("[CorrectionEditor]","Failed to fetch user info for grade calculation",{error:e}))},[v,x]);let Y=async()=>{if(!T.questionText.trim())return void c.c.warning(y.editor.enterQuestionFirst||"Please enter question text first");D(!0);try{let e=function({questionText:e,language:t,subject:s,imagePreview:r,gradeSemester:n,subjectId:a}){let i={questionText:e,language:t,subject:s};return r&&(i.imageBase64=r),n&&(i.gradeSemester=n),a&&(i.subjectId=a),i}({questionText:T.questionText,language:v,subject:T.subject,imagePreview:h,gradeSemester:T.gradeSemester??void 0,subjectId:T.subjectId});m.V.info("[Reanswer]",e.imageBase64?"Sending image + text (image available for mistake analysis)":"Sending text only (no image available)",{timeout:g});let t=await d.k.post("/api/reanswer",e,{timeout:g||18e4,recoverable:!0});A(e=>({...e,answerText:t.answerText,analysis:t.analysis,knowledgePoints:t.knowledgePoints,wrongAnswerText:t.wrongAnswerText||"",mistakeAnalysis:t.mistakeAnalysis||"",mistakeStatus:(0,M.x)(t.mistakeStatus,t.wrongAnswerText),difficultyStars:t.difficultyStars??e.difficultyStars,questionType:t.questionType??e.questionType})),c.c.success(y.editor.reanswerSuccess||"✅ Answer and analysis updated!")}catch(r){let e,t,s;m.V.error("[CorrectionEditor]","Reanswer failed",{error:r}),c.c.error((e=(0,O.d)(r)||"",s=(t=y.errors?.reanswer||{}).default||"Reanswer failed",e.includes("AI_AUTH_ERROR")?t.authError||y.errors?.AI_AUTH_ERROR||s:e.includes("AI_CONNECTION_FAILED")?t.connectionFailed||y.errors?.AI_CONNECTION_FAILED||s:e.includes("AI_RESPONSE_ERROR")&&(t.responseError||y.errors?.AI_RESPONSE_ERROR)||s))}finally{D(!1)}},Z=async()=>{if(!T.subjectId)return void c.c.warning(y.editor.messages?.selectNotebook||"Please select a notebook");if(!G){z(!0);try{await i({...T,paperLevel:L,mistakeStatus:(0,M.x)(T.mistakeStatus,T.wrongAnswerText)})}finally{z(!1)}}},K=y.editor.placeholder||"Supports Markdown and LaTeX...",ee=(0,C.f)(J.find(e=>e.id===T.subjectId)?.name||null)||(0,C.f)(T.subject||null)||void 0;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("h2",{className:"text-2xl font-bold",children:y.editor.title}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(o.f,{variant:"outline",onClick:l,children:y.editor.cancel}),(0,t.jsxs)(o.f,{onClick:Z,disabled:G,children:[G?(0,t.jsx)(r.f,{className:"mr-2 h-4 w-4 animate-spin"}):(0,t.jsx)(a.f,{className:"mr-2 h-4 w-4"}),G?y.common?.pleaseWait||"Please wait...":y.editor.save]})]})]}),(0,t.jsxs)("div",{className:"grid gap-6 lg:grid-cols-2",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[h&&(0,t.jsx)(k.N,{children:(0,t.jsx)(k.O,{className:"p-4",children:(0,t.jsx)("img",{src:h,alt:"Original",className:"w-full rounded-md"})})}),(0,t.jsx)(j,{data:T,paperLevel:L,onChange:P}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:y.editor.question}),(0,t.jsx)(b.f,{value:T.questionText,onChange:e=>P({questionText:e}),className:"min-h-[150px] font-mono text-sm",placeholder:K}),(0,t.jsx)(o.f,{variant:"default",size:"sm",onClick:Y,disabled:F||!T.questionText.trim(),className:"w-full bg-gradient-to-r from-indigo-600 to-violet-500 hover:from-indigo-700 hover:to-violet-600 text-white font-medium",children:F?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.f,{className:"mr-2 h-4 w-4 animate-spin"}),y.editor.reanswering||"AI solving..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.f,{className:"mr-2 h-4 w-4"}),y.editor.reanswer||"🔄 Reanswer (based on corrected question)"]})}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:y.editor.reanswerHint||"💡 If the question was misrecognized, correct it and click to regenerate answer"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:y.editor.tags}),(0,t.jsx)(E.f,{value:T.knowledgePoints,onChange:e=>P({knowledgePoints:e}),placeholder:y.editor.tagsPlaceholder||"Enter knowledge tags...",enterHint:y.editor.createTagHint,subject:ee,gradeStage:W}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:y.editor.tagsHint||"💡 Tag suggestions will appear as you type"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:y.editor.answer}),(0,t.jsx)(b.f,{value:T.answerText,onChange:e=>P({answerText:e}),className:"min-h-[100px] font-mono text-sm",placeholder:K})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(w.f,{children:y.editor.analysis}),(0,t.jsx)(b.f,{value:T.analysis,onChange:e=>P({analysis:e}),className:"min-h-[200px] font-mono text-sm",placeholder:K})]}),(0,t.jsx)(N,{data:T,onChange:P})]}),(0,t.jsx)(I,{data:T,children:Q&&(0,t.jsx)(f,{data:T,onChange:P})})]})]})}],866531);var q=e.i(853138),P=e.i(263676);e.s(["f",0,function({message:e,onDismiss:s}){let{t:r}=(0,u.b)();return e?(0,t.jsxs)("div",{role:"alert",className:"flex items-start gap-3 rounded-xl border border-destructive/30 bg-destructive/5 p-4 text-sm text-destructive",children:[(0,t.jsx)(q.f,{"aria-hidden":"true",className:"mt-0.5 h-4 w-4 shrink-0"}),(0,t.jsx)("p",{className:"min-w-0 flex-1 whitespace-pre-line break-words leading-relaxed",children:e}),(0,t.jsx)("button",{type:"button",onClick:s,"aria-label":r.common.close,className:"shrink-0 rounded p-1 hover:bg-destructive/10",children:(0,t.jsx)(P.X,{"aria-hidden":"true",className:"h-4 w-4"})})]}):null}],497346);var U=e.i(618566);function V(e){return"object"!=typeof e||null===e||Array.isArray(e)?void 0:e}function L(e,t){if("string"!=typeof e||!/^(QUESTION_SAVE_|AI_)[A-Z_]+$/.test(e))return;let s=t.errors[e];return"string"==typeof s?s:void 0}e.s(["f",0,function(e){let{t}=(0,u.b)(),r=(0,U.useRouter)(),[n,a]=(0,s.useState)(null),i=async(s,n,i=!0)=>{a(null);try{let e=await s();return c.c.success(e.duplicate?t.importFlow.duplicate:t.common.messages.saveSuccess),i&&(e.duplicate?r.push(`/error-items/${e.id}`):n&&r.push(`/notebooks/${n}`)),!0}catch(r){m.V.error(e,"Save failed",{errorMessage:(0,O.d)(r)??(0,O.Z)(r)});let s=function(e,t){let s=V(e),r=V(s?.data),n="number"==typeof s?.status?s.status:void 0,a=(0,O.d)(e),i=L(a,t)??L(r?.code,t),l={400:t.errors.QUESTION_SAVE_INVALID_INPUT,401:t.errors.QUESTION_SAVE_UNAUTHORIZED,403:t.errors.QUESTION_SAVE_FORBIDDEN,408:t.errors.QUESTION_SAVE_TIMEOUT,409:t.errors.QUESTION_SAVE_CONFLICT,413:t.errors.QUESTION_SAVE_TOO_LARGE,429:t.errors.QUESTION_SAVE_RATE_LIMITED,502:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,503:t.errors.QUESTION_SAVE_SERVER_UNAVAILABLE,504:t.errors.QUESTION_SAVE_TIMEOUT},o=i??(n?l[n]:void 0)??t.errors.QUESTION_SAVE_FAILED;!n&&(e instanceof TypeError||/fetch|network|load failed/i.test((0,O.Z)(e)))&&(o=t.errors.QUESTION_SAVE_NETWORK_ERROR);let u=V(r?.details);if("QUESTION_SAVE_GRADE_FAILED"===a){let e=L(u?.reason,t);e&&(o+=`
|
|
7
|
+
${e}`)}return 400===n&&(o+=(function(e,t){if(!Array.isArray(e))return[];let s={questionText:t.editor.question,answerText:t.editor.answer,analysis:t.editor.analysis,wrongAnswerText:t.editor.wrongAnswerText,mistakeAnalysis:t.editor.mistakeAnalysis,knowledgePoints:t.editor.tags,subjectId:t.editor.selectNotebook,gradeSemester:t.editor.gradeSemester,paperLevel:t.editor.paperLevel};return e.slice(0,3).flatMap(e=>{let r=V(e),n=r?.path,a=Array.isArray(n)&&"string"==typeof n[0]?s[n[0]]:void 0;if(!a)return[];let i=r?.maximum,l=t.questionSave.invalidField;return r?.code==="too_big"&&"number"==typeof i&&Number.isSafeInteger(i)&&i>=0&&(l="array"===r.origin?t.questionSave.tooMany:t.questionSave.tooLong),[l.replace("{field}",a).replace("{maximum}",String(i))]})})(r?.details,t).map(e=>`
|
|
8
|
+
${e}`).join("")),"string"==typeof u?.databaseCode&&/^P\d{4}$/.test(u.databaseCode)&&(o+=`
|
|
9
|
+
${t.questionSave.databaseCode.replace("{code}",u.databaseCode)}`),n&&(o+=` (HTTP ${n})`),o}(r,t);return a(s),"AI_DAILY_LIMIT_EXCEEDED"!==(0,O.d)(r)&&c.c.error(s),!1}};return{saveError:n,setSaveError:a,dismissSaveError:()=>a(null),run:i}}],183444)},731335,532377,339501,e=>{var t=e.i(843476),s=e.i(399847),r=e.i(551757),n=e.i(456420);let a={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};a.node;let i=(0,n.f)(a);var l=e.i(632781),o=e.i(615568),u=e.i(487486),d=e.i(519455),c=e.i(168148),m=e.i(111110),f=e.i(215519),h=e.i(306831);let p=["read","convert","crop","compress","upload"],g=["receive","analyze","save"];function x(e){if(!Number.isFinite(e)||e<0)return"-";if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(+(t<10))}s`;let s=Math.round(t);return`${Math.floor(s/60)}:${String(s%60).padStart(2,"0")}`}var w=e.i(975157);let y={analyzing:50,saving:90},v={analyzing:l.f,saving:l.f,review:o.f,saved:r.f,failed:s.f};e.s(["f",0,function({task:e,now:s,onReview:r,onViewItem:n,onRetry:a,onDiscard:l}){let{t:o}=(0,m.b)(),{timeZone:j}=(0,f.M)(),b=v[e.status],k="analyzing"===e.status||"saving"===e.status,N=o.errors,S=e.error?"string"==typeof N[e.error]?N[e.error]:e.error:null,T=function(e){let t=[];for(let s of p){let r=e?.client?.[s];"number"==typeof r&&t.push({stage:s,ms:r})}for(let s of g){let r=e?.server?.[s];"number"==typeof r&&t.push({stage:s,ms:r})}return t}(e.timings),A=k&&s?s-Date.parse(e.createdAt):null;return(0,t.jsxs)("div",{className:(0,w.f)("space-y-2 rounded-lg border p-3 text-sm",e.unread&&"border-primary/50 bg-primary/5"),"data-testid":"import-task-card","data-status":e.status,children:[(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(b,{className:(0,w.f)("mt-0.5 h-4 w-4 shrink-0",k&&"animate-spin text-primary","saved"===e.status&&"text-green-600","failed"===e.status&&"text-destructive","review"===e.status&&"text-primary")}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)("span",{className:"font-medium",children:o.importTasks.status[e.status]}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:o.importTasks.mode[e.mode]}),e.unread&&(0,t.jsx)(u.f,{children:o.importTasks.unread})]}),k&&(0,t.jsx)(c.f,{value:y[e.status],"aria-label":o.importTasks.stageEstimate,"aria-valuetext":o.common.progress.estimated.replace("{percent}",String(y[e.status])),className:"h-1.5"}),e.excerpt&&(0,t.jsx)("p",{className:"break-words text-muted-foreground",children:e.excerpt}),"saved"===e.status&&!e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:o.importTasks.itemDeleted}),"saved"===e.status&&e.errorItemId&&(0,t.jsx)("p",{className:"text-xs text-green-700 dark:text-green-300",children:e.duplicate?o.importTasks.duplicateSaved:o.importTasks.savedTo.replace("{notebook}",e.notebookName||"-").replace("{id}",e.errorItemShortId||"-")}),S&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:S}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(i,{className:"h-3 w-3"}),o.importTasks.createdAt.replace("{time}",(0,h.r)(e.createdAt,"MM-dd HH:mm",j))]}),null!==A&&(0,t.jsx)("span",{children:o.importTasks.elapsed.replace("{time}",x(A))}),e.attempts>1&&(0,t.jsx)("span",{children:o.importTasks.attempts.replace("{count}",String(e.attempts))})]}),T.length>0&&(0,t.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums","aria-label":"timings",children:T.map(({stage:e,ms:s})=>(0,t.jsxs)("li",{children:[o.importTasks.timings[e]," ",x(s)]},e))})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:["review"===e.status&&r&&(0,t.jsx)(d.f,{size:"sm",onClick:r,children:o.importTasks.continueReview}),"saved"===e.status&&e.errorItemId&&n&&(0,t.jsx)(d.f,{size:"sm",variant:"outline",onClick:n,children:o.importTasks.viewItem}),"failed"===e.status&&a&&(0,t.jsx)(d.f,{size:"sm",onClick:a,children:o.importTasks.retry}),"saving"!==e.status&&"saved"!==e.status&&l&&(0,t.jsx)(d.f,{size:"sm",variant:"ghost",onClick:l,children:o.importTasks.discard})]})]})}],731335);var j=e.i(618566),b=e.i(767077),k=e.i(294114),N=e.i(201276),S=e.i(127175);e.s(["f",0,function(e){let{t}=(0,m.b)(),s=(0,j.useRouter)(),r=e=>{e.unread&&(0,S.N)(e.id).catch(e=>N.V.warn("[ImportTasks]","Mark read failed",{error:e}))};return{openReview:e=>{r(e),s.push(`/import-tasks/${e.id}`)},viewItem:e=>{e.errorItemId&&(r(e),s.push(`/error-items/${e.errorItemId}`))},markRead:r,retry:async s=>{try{await (0,S.R)(s.id),k.c.info(t.importTasks.retried)}catch(e){k.c.error((0,b.f)(e,t))}e?.()},discard:async s=>{if(!await (0,k.u)(t.importTasks.discardConfirm))return!1;let r=!1;try{await (0,S.x)(s.id),k.c.success(t.importTasks.discarded),r=!0}catch(e){k.c.error((0,b.f)(e,t))}return e?.(),r}}}],532377);var T=e.i(271645);e.s(["f",0,function(e,t=1e3){let[s,r]=(0,T.useState)(()=>Date.now());return(0,T.useEffect)(()=>{if(!e)return;let s=setInterval(()=>r(Date.now()),t);return()=>clearInterval(s)},[e,t]),s}],339501)},185592,e=>{var t=e.i(843476),s=e.i(975157);e.s(["f",0,function({options:e,value:r,onChange:n,className:a}){return(0,t.jsx)("div",{className:(0,s.f)("grid gap-1 rounded-xl bg-muted p-1",a),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},role:"tablist",children:e.map(({value:e,label:a,icon:i})=>{let l=e===r;return(0,t.jsxs)("button",{type:"button",role:"tab","aria-selected":l,className:(0,s.f)("flex items-center justify-center gap-1.5 rounded-lg px-2 py-2.5 text-sm font-medium transition-all",l?"bg-card text-primary shadow-sm":"text-muted-foreground hover:text-foreground"),onClick:()=>n(e),children:[i&&(0,t.jsx)(i,{className:"h-4 w-4 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a})]},e)})})}])},499930,e=>{var t=e.i(213761);function s(e,t=.008){let r=Math.max(0,e.x-t),n=Math.max(0,e.y-t);return{x:r,y:n,width:Math.min(1,e.x+e.width+t)-r,height:Math.min(1,e.y+e.height+t)-n}}async function r(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 n(e,s){let r=function(e,t=16,s=!1){let r=Math.max(...e.map(e=>e.width)),n=0,a=e.map(e=>{let a=s?r/e.width:e.scale??1,i={x:0,y:n,width:Math.round(e.width*a),height:Math.round(e.height*a)};return n+=i.height+t,i});return{width:Math.max(...a.map(e=>e.width)),height:n-t,rects:a}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,s),n=document.createElement("canvas");n.width=r.width,n.height=r.height;let a=n.getContext("2d");if(!a)throw Error("CANVAS_UNSUPPORTED");a.fillStyle="#ffffff",a.fillRect(0,0,n.width,n.height),e.forEach((e,t)=>{let s=r.rects[t];a.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,s.x,s.y,s.width,s.height)});let i=await createImageBitmap(n);try{return await (0,t.X)({source:i,width:n.width,height:n.height})}finally{i.close()}}async function a(e,r){let a=e.naturalWidth,i=e.naturalHeight,l=r.map(e=>s(e));return 1===l.length?(0,t.X)({source:e,width:a,height:i},l[0]):n(l.map(t=>({source:e,sx:Math.round(t.x*a),sy:Math.round(t.y*i),sw:Math.max(1,Math.round(t.width*a)),sh:Math.max(1,Math.round(t.height*i))})),!1)}async function i(e){return n((await Promise.all(e.map(r))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function l(e,t,r){let a=e.naturalWidth,i=e.naturalHeight,l=r.width/a,o=t.map(e=>s(e)).map(t=>({source:e,sx:Math.round(t.x*a),sy:Math.round(t.y*i),sw:Math.max(1,Math.round(t.width*a)),sh:Math.max(1,Math.round(t.height*i)),scale:l}));return o.push({source:r.source,sx:0,sy:0,sw:r.width,sh:r.height}),n(o,!1)}e.s(["y",0,r,"k",0,l,"M",0,a,"v",0,i])},119472,e=>{var t=e.i(41931),s=e.i(127175);async function r(e){let t;for(let s=0;s<3;s++)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===s)break;await new Promise(e=>setTimeout(e,1e3*(s+1)))}throw t}async function n(e,a=(0,s.c)()){let{batch:i}=await r(()=>t.k.post("/api/import-batches",{...e,clientRequestId:a,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0,items:e.items?.map(e=>({...e})),origin:e.origin},{timeout:12e4}));return(0,s.P)(),i}async function a(e,s={}){let r=s.image?"?include=image":"",{batch:n}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${r}`);return n}async function i(e,s,r){let{batch:n}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:s,draft:r});return n}async function l(e,n,a,i){let{batch:l}=await r(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:n,images:a,analysis:i},{timeout:12e4}));return(0,s.P)(),l}async function o(e){let{batch:r}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,s.P)(),r}async function u(e){let r=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,s.P)(),r}async function d(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,s.P)()}async function c(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,s.P)()}async function m(e,s){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:s},{timeout:6e5,recoverable:!0})}e.s(["J",0,u,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,n,"o",0,d,"w",0,a,"$",0,m,"f",0,c,"s",0,o,"S",0,i,"g",0,l])},25197,e=>{var t=e.i(41931);function s(e){return e.trim()?e:""}async function r(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function n(e,r){let n=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:s(e.answerText),analysis:s(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,questionType:e.questionType??null,subjectId:r.subjectId||void 0,subjectName:r.subjectId?void 0:e.subject,originalImageUrl:r.imageUrl||"",paperLevel:r.paperLevel||void 0});return{id:n.id,shortId:n.shortId??null,subjectId:n.subjectId??null,notebookName:n.subject?.name??null,duplicate:n.duplicate}}e.i(201276),e.s(["x",0,r,"a",0,n],25197)},825624,e=>{let t=/^[\s ]+/,s="一二三四五六七八九十",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 n(e){let n=e.replace(t,"");for(let{family:e,pattern:t}of r){let r=n.match(t);if(!r||n.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?s.indexOf(e)+1:10*(0===t?1:s.indexOf(e[0])+1)+(t===e.length-1?0:s.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 s=e.split("\n"),r=s[0]?.replace(t,"")??"",a=n(r);return a&&"cn"!==a.family&&(s[0]=r.slice(a.prefixLength)),s.join("\n")}function i(e){let t=[];for(let s of e)(s||0!==t.length&&""!==t[t.length-1])&&t.push(s);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let l=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,o=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,u=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,d=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,c=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,m=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,f=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function h(e){let t=[],s=[];for(let r of e)r?s.push(r):s.length&&(t.push(s.join("\n")),s=[]);return s.length&&t.push(s.join("\n")),t}function p(e,t){let s=[];for(let r=0;r<e.length;r++){let n=e[r],a=[n];for(let s=r+1;s<e.length;s++){let r=e[s],i=a[a.length-1];if(r.family!==n.family)continue;let l=1===r.value&&[...t].some(e=>e>i.line&&e<r.line);(r.value===i.value+1||l)&&a.push(r)}a.length>s.length&&(s=a)}return s}function g(e,t,s){return!!d.test(e)||!!t&&"cn"===t.family&&"cn"!==s&&null!==s&&(e.length<=40||c.test(e.slice(0,20)))}function x(e){let t=e.match(m);if(!t)return null;let s=Number(t[1]),r=Number(t[2]);return s<=r?{from:s,to:r}:null}let w={answer:/^(?:【\s*(?:参考答案|答案)\s*】|(?:参考答案|答案)\s*[::]|Answer\s*[::])\s*(.*)$/i,analysis:/^(?:【\s*(?:解析|分析|详解|解答|点评)\s*】|(?:解析|分析|详解|解答|点评)\s*[::])\s*(.*)$/,knowledge:/^(?:【\s*(?:知识点|考点)\s*】|(?:知识点|考点)\s*[::])\s*(.*)$/,difficulty:/^(?:【\s*难度\s*】|难度\s*[::])\s*(.*)$/,questionType:/^(?:【\s*题型\s*】|题型\s*[::])\s*(.*)$/,wrongAnswer:/^(?:【\s*错答\s*】|我的答案\s*[::]|学生答案\s*[::])\s*(.*)$/},y={易:1,较易:2,中等:3,较难:4,难:5};function v(e){return e.split(/[、,,;;]/).map(e=>e.trim()).filter(Boolean)}function j(e){let t={answer:[],analysis:[],knowledge:[],difficulty:[],questionType:[],wrongAnswer:[]},s=[],r=null;for(let n of e){let e=null;for(let s of Object.keys(w)){let a=n.match(w[s]);if(!a)continue;e=s,r=s;let i=a[1].trim();i&&t[s].push(i);break}e||(r&&n.trim()?t[r].push(n.trim()):s.push(n))}let n={},a=t.answer.join("\n").trim();a&&(n.answer=a);let l=t.analysis.join("\n").trim();l&&(n.analysis=l);let o=t.knowledge.flatMap(v);o.length&&(n.knowledgePoints=o);let u=t.difficulty.join(" ").trim(),d=u?function(e){let t=e.trim();if(!t)return null;let s=t.match(/^(\d{1,2})\s*(?:星|级)?$/);if(s){let e=Number(s[1]);return e>=1&&e<=5?e:null}if(/^[★☆]{1,5}$/.test(t)){let e=(t.match(/★/g)??[]).length;return e>=1?e:null}return t in y?y[t]:null}(u):null;null!==d&&(n.difficultyStars=d);let c=t.questionType.join(" ").trim();c&&(n.questionType=c);let m=t.wrongAnswer.join("\n").trim();return m&&(n.wrongAnswer=m),{text:i(s),fields:n}}let b=/^(\d{1,3})\s*[..、,,)]\s*(\S[\s\S]*)$/,k=/^(\d{1,3})\s*[~~—–-]\s*(\d{1,3})\s*[::..、]?\s*([A-Za-z]+)$/;function N(e,t){let s=[],r=!1;for(let n of e){let e={value:!1},a=[];for(let s of n.split("\n")){let r=s.trim()?function(e){let t=e.trim();if(!t)return null;let s=function(e){let t=e.trim().match(k);if(!t)return null;let s=Number(t[1]),r=Number(t[2]),n=t[3];if(!Number.isFinite(s)||!Number.isFinite(r)||s<=0||r<=s||r-s+1>60)return null;let a=r-s+1;return n.length!==a?null:Array.from({length:a},(e,t)=>({label:String(s+t),text:n[t]}))}(t);if(s)return s;let r=function(e){let t=e.trim(),s=[];for(let e of t.matchAll(/(\d{1,3})\s*[..、,,;;]\s*/g)){let r=e.index??0,n=t[r+e[0].length];n&&/\d/.test(n)||s.push({index:r,label:e[1],afterIndex:r+e[0].length})}if(s.length<2)return null;for(let e=1;e<s.length;e++)if(Number(s[e].label)<=Number(s[e-1].label))return null;let r=[];for(let e=0;e<s.length;e++){let n=s[e].afterIndex,a=e+1<s.length?s[e+1].index:t.length,i=t.slice(n,a).trim().replace(/[;;]+$/,"").trim();if(!i||i.length>30||/[。!?!?]/.test(i))return null;r.push({label:s[e].label,text:i})}return r}(t);if(r)return r.map(e=>({label:e.label??"",text:e.text})).filter(e=>e.label);let n=t.match(b);if(!n)return null;let a=Number(n[1]);return!Number.isFinite(a)||a<=0?null:[{label:n[1],text:n[2].trim()}]}(s):null;if(!r){s.trim()&&a.push(s);continue}let n=!1;for(let i of r){let r=t.find(e=>e.label===i.label);if(!r){a.push(s);break}n=!0,e.value=!0;let l=function(e){let t=e.match(/^(.*?)(?:【?\s*(?:解析|分析|详解|解答|点评)\s*】?\s*[::])([\s\S]*)$/);if(t){let s=t[1].replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim(),r=t[2].trim();return r?{answer:s,analysis:r}:{answer:e.trim()}}return{answer:e.replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim()||e.trim()}}(i.text);l.answer&&!r.answer&&(r.answer=l.answer),l.analysis&&(r.analysis=r.analysis?`${r.analysis}
|
|
10
|
+
${l.analysis}`:l.analysis)}!n&&!a.includes(s)&&s.trim()&&!a.includes(s)&&a.push(s)}r=r||e.value,e.value?a.length&&s.push(a.join("\n")):s.push(n)}return[s,r]}e.s(["k",0,2e3,"f",0,1e6,"S",0,60,"i",0,2e4,"J",0,function(e,s={}){let r,c=void 0===s.maxLength?2e4:Math.min(Math.max(s.maxLength,1e3),1e6),w=void 0===s.maxQuestions?60:Math.min(Math.max(s.maxQuestions,2),2e3),y=e.length>c,v=e.slice(0,c).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),b=v.map(e=>e?n(e):null),k=v.length;for(let e=0;e<v.length;e++)if(u.test(v[e])){k=e;break}let S=[],T=[];for(let e=0;e<k;e++){let t=b[e];t&&("cn"===t.family?T:S).push({...t,line:e})}let A=new Set;for(let e=0;e<k;e++)(d.test(v[e])||b[e]?.family==="cn")&&A.add(e);let I=p(S,A);if(I.length<2){let e=p(T,new Set);e.length>=2&&(I=e)}let E=i(v.slice(0,k)),_=k<v.length?h(v.slice(k)):[],$=(r=n(v[I[0]?.line??0]??""))?r.label:null,C=e=>({questions:E?[{label:$,text:E,material:null,section:null}]:[],ignored:_,detected:!1,ambiguous:e,candidateCount:e?I.length:+!!E,overflow:0,tooLong:y});if(I.length<2){if(!E)return C(!1);let e=j(E.split("\n")),t=C(!1);if(t.questions.length>0&&Object.keys(e.fields).length>0&&(t.questions[0]={...t.questions[0],text:a(e.text),...e.fields}),t.questions.length>0&&_.length){let[e,s]=N(_,t.questions);t.ignored=e,s||(t.ignored=_)}return t}let M=I[0].family;if(!s.forceNumbered&&function(e,t,s,r){let n=null;for(let a=t-1;a>=0;a--)if(e[a]){n=g(e[a],r[a],s)?null:e[a];break}return!(!n||l.test(n)||m.test(n))&&("paren"===s?n.length>=15||/[。?!?!::,,;;]$/.test(n):/[::]$/.test(n)&&f.test(n))}(v,I[0].line,M,b)){let e=C(!0);if(e.questions.length>0&&E){let t=j(E.split("\n"));Object.keys(t.fields).length>0&&(e.questions[0]={...e.questions[0],text:a(t.text),...t.fields})}return e}let R=new Set(I.map(e=>e.line)),O=[],q=[],P=null,U=[],V=[],L=(e,t)=>{for(let s of h(e))(!l.test(s)||!(s.length<80))&&(o.test(s)||s.length>=80&&/[。!?.!?;;]/.test(s))?U.push({text:s,range:x(s)}):t?O.push(s):P&&!q.some(e=>e.section===P)?P=`${P}
|
|
11
|
+
${s}`:O.push(s)},F=I[0].line,D=[];for(let e=0;e<F;e++)v[e]&&g(v[e],b[e],M)?(L(D.splice(0),!0),P=v[e],V=[]):D.push(v[e]);L(D,!0);for(let e=0;e<I.length;e++){let t=I[e].line,s=e+1<I.length?I[e+1].line:k;U.length&&(V=[...V.filter(e=>e.range),...U],U=[]);let r=s,n=null;for(let e=t+1;e<s;e++)if(v[e]&&!R.has(e)&&g(v[e],b[e],M)){r=e,n=v[e];break}let l=v.slice(t,r),u=h(l),d=[];for(;u.length>1&&o.test(u[u.length-1].slice(0,30));)d.unshift(u.pop());let c=d.length?u.join("\n"):i(l),m=I[e].value,f=V.filter(e=>!e.range||m>=e.range.from&&m<=e.range.to),p=j(a(c).split("\n"));for(let t of(q.push({label:I[e].label,text:p.text,material:f.length?f.map(e=>e.text).join("\n\n"):null,section:P,...p.fields}),d))U.push({text:t,range:x(t)});null!==n&&(P=n,V=[],L(v.slice(r+1,s),!1))}let[G]=N(_,q),z=q.slice(w);return{questions:q.slice(0,w),ignored:[...O,...G,...z.map(e=>{var t;let s,r,n,a;return s=(t=e).text.trim(),n=(r=t.material?.trim())?`${r}
|
|
12
|
+
|
|
13
|
+
${s}`:s,a=[],(t.answer?.trim()&&a.push(`参考答案:${t.answer.trim()}`),t.analysis?.trim()&&a.push(`参考解析:${t.analysis.trim()}`),t.wrongAnswer?.trim()&&a.push(`学生作答:${t.wrongAnswer.trim()}`),a.length)?`${n}
|
|
14
|
+
|
|
15
|
+
${a.join("\n\n")}`:n})],detected:!0,ambiguous:!1,candidateCount:q.length,overflow:z.length,tooLong:y}}])},767077,e=>{var t=e.i(303163);e.s(["f",0,function(e,s){let r=s.common?.messages?.analysisFailed||"Analysis failed, please try again",n=(0,t.d)(e);if(n){let e=s.errors??{};if(!(n in e))return n;let t=e[n];return"string"==typeof t?t:r}let a=(0,t.Z)(e);if(a.includes("fetch")||a.includes("network"))return s.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`${r} (${t})`}return r}])}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,198591,e=>{"use strict";var t=e.i(843476),a=e.i(271645),l=e.i(618566),n=e.i(519455),s=e.i(393842),i=e.i(86963),r=e.i(77071),o=e.i(456420);let c={name:"pencil",size:24,node:[["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"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};c.node;let d=(0,o.f)(c);var u=e.i(759659),m=e.i(522016);let h={name:"git-compare-arrows",size:24,node:[["circle",{cx:"5",cy:"6",r:"3",key:"1qnov2"}],["path",{d:"M12 6h5a2 2 0 0 1 2 2v7",key:"1yj91y"}],["path",{d:"m15 9-3-3 3-3",key:"1lwv8l"}],["circle",{cx:"19",cy:"18",r:"3",key:"1qljk2"}],["path",{d:"M12 18H7a2 2 0 0 1-2-2V9",key:"16sdep"}],["path",{d:"m9 15 3 3-3 3",key:"1m3kbl"}]]};h.node;let p=(0,o.f)(h);var g=e.i(444594),x=e.i(218964),f=e.i(77043),b=e.i(566595),j=e.i(666696),y=e.i(716327);let k={name:"funnel",size:24,node:[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],aliases:["filter"]};k.node;let w=(0,o.f)(k);var v=e.i(755146),S=e.i(111110);function N({mastery:e,timeRange:a,onMasteryChange:l,onTimeRangeChange:s}){let{t:i}=(0,S.b)(),r=[{value:"all",label:i.filter.all||"All"},{value:"new",label:i.filter.review||"To Review"},{value:"reviewing",label:i.filter.reviewing||"Reviewing"},{value:"mastered",label:i.filter.mastered||"Mastered"}],o=[{value:"all",label:i.filter.allTime||"All Time"},{value:"week",label:i.filter.lastWeek||"Last Week"},{value:"month",label:i.filter.lastMonth||"Last Month"}];return(0,t.jsxs)(v.G,{children:[(0,t.jsx)(v.X,{asChild:!0,children:(0,t.jsxs)(n.f,{variant:"outline",size:"sm",className:"h-10",children:[(0,t.jsx)(w,{className:"mr-2 h-4 w-4"}),i.notebook.filter,(0,t.jsx)(y.f,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsxs)(v.L,{align:"end",className:"w-48",children:[(0,t.jsx)(v.B,{children:i.filter.masteryStatus||"Mastery Status"}),r.map(({value:a,label:n})=>(0,t.jsxs)(v.r,{onClick:()=>l(a),children:[e===a&&"✓ ",n]},a)),(0,t.jsx)(v.U,{}),(0,t.jsx)(v.B,{children:i.filter.timeRange||"Time Range"}),o.map(({value:e,label:l})=>(0,t.jsxs)(v.r,{onClick:()=>s(e),children:[a===e&&"✓ ",l]},e))]})]})}var C=e.i(470279);function T({value:e,onChange:a}){let{t:l}=(0,S.b)(),{groups:s,loading:i}=(0,C.f)(),r=s.filter(e=>e.isActive);return i?null:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(n.f,{variant:"all"===e?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>a("all"),children:l.filter.all||"All"}),r.map(l=>(0,t.jsx)(n.f,{variant:e===l.id?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>a(l.id),children:l.name},l.id))]})}var D=e.i(401280);function q({value:e,onChange:a}){let{t:l}=(0,S.b)(),s=t=>{a(e.includes(t)?e.filter(e=>e!==t):[...e,t])};return(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[D.V.map(a=>(0,t.jsx)(n.f,{type:"button",variant:e.includes(a)?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>s(a),children:l.questionType.names[a]||a},a)),(0,t.jsx)(n.f,{type:"button",variant:e.includes(D.O)?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>s(D.O),children:l.questionType.notSet})]})}let E={name:"file-braces",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:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};E.node;let A=(0,o.f)(E);var R=e.i(263676),P=e.i(257428),$=e.i(776639),F=e.i(185592),I=e.i(294114),L=e.i(201276),M=e.i(303163),z=e.i(974881);let J=/^data:image\/(png|jpeg|jpg|webp);base64,(.+)$/;async function O(t,a){let{Document:l,Packer:n}=await e.A(181571),s=new l({sections:[{children:function(e,t){let a,l,n,s=t.includeAnswers??!0,i=t.includeImages??!1,r=t.maxImageWidthPx??480,o=[];t.title&&o.push(new z.Paragraph({heading:z.HeadingLevel.HEADING_1,alignment:z.AlignmentType.CENTER,children:[new z.TextRun(t.title)]}));let c=(l=[],n=null,e.forEach((e,t)=>{let s=null;if(e.section?.trim())s=e.section.trim();else{var i;let t;e.questionType?.trim()&&(i=e.questionType.trim(),s=(t=(0,D.P)(i))?D.H[t]:i)}n&&a===s||(n={heading:s,items:[]},l.push(n),a=s),n.items.push({question:e,number:t+1})}),l),d=c.some(e=>null!==e.heading),u=0;for(let e of c){if(d&&null!==e.heading){var m,h;o.push(new z.Paragraph({heading:z.HeadingLevel.HEADING_2,children:[new z.TextRun((m=u,h=e.heading,/^(第[一二三四五六七八九十百千零\d]+(部分|大题|节)|[一二三四五六七八九十]{1,3}、|(Part|Section)\s+[A-Z0-9IVX]+\b)/i.test(h)?h:`第${function e(t){let a=["零","一","二","三","四","五","六","七","八","九"];if(t<=0)return String(t);if(t<10)return a[t];if(t<100){let e=Math.floor(t/10),l=t%10;return(e>1?a[e]:"")+"十"+(l>0?a[l]:"")}if(t<1e3){let l=Math.floor(t/100),n=t%100;return 0===n?a[l]+"百":n<10?a[l]+"百零"+a[n]:n<20?a[l]+"百一"+e(n):a[l]+"百"+e(n)}let l=Math.floor(t/1e3),n=t%1e3;return a[l]+"千"+(n>0?e(n):"")}(m+1)}大题 ${h}`))]})),u+=1}for(let{question:t,number:a}of e.items)if((t.text??"").replace(/\r\n?/g,"\n").split("\n").forEach((e,t)=>{o.push(new z.Paragraph({children:[new z.TextRun(0===t?`${a}. ${e}`:e)]}))}),i&&t.images?.length)for(let e of t.images){let t=function(e){let t,a=e.match(J);if(!a)return null;try{let e=atob(a[2]);t=new Uint8Array(e.length);for(let a=0;a<e.length;a++)t[a]=e.charCodeAt(a)}catch{return null}let l=function(e){if(e.length>=24&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]){let t=new DataView(e.buffer,e.byteOffset,e.byteLength),a=t.getUint32(16,!1),l=t.getUint32(20,!1);return a>0&&l>0?{width:a,height:l}:null}if(e.length>=4&&255===e[0]&&216===e[1]){let t=2;for(;t+9<e.length;){if(255!==e[t]){t++;continue}let a=e[t+1];if(a>=192&&a<=207&&196!==a&&200!==a&&204!==a){let a=new DataView(e.buffer,e.byteOffset,e.byteLength),l=a.getUint16(t+5,!1),n=a.getUint16(t+7,!1);if(n>0&&l>0)return{width:n,height:l};break}let l=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint16(t+2,!1);if(l<2)break;t+=2+l}}return null}(t);if(!l)return null;let n=a[1].toLowerCase();return"webp"===n?null:{bytes:t,type:"png"===n?"png":"jpg",widthPx:l.width,heightPx:l.height}}(e.dataUrl);if(!t)continue;let a=function(e,t,a){if(e<=a)return{width:e,height:t};let l=Math.max(1,Math.round(t*a/e));return{width:a,height:l}}(t.widthPx,t.heightPx,r);o.push(new z.Paragraph({children:[new z.ImageRun({type:t.type,data:t.bytes,transformation:{width:a.width,height:a.height}})]}))}}if(s){let t=e.map((e,t)=>({question:e,number:t+1})).filter(({question:e})=>e.answer?.trim()||e.analysis?.trim());if(t.length>0)for(let{question:e,number:a}of(o.push(new z.Paragraph({heading:z.HeadingLevel.HEADING_2,children:[new z.TextRun("参考答案")]})),t)){let t=e.answer?.trim()??"",l=e.analysis?.trim()??"",n=l?`答案:${t} 解析:${l}`:`答案:${t}`;o.push(new z.Paragraph({children:[new z.TextRun(`${a}. ${n}`)]}))}}return o}(t,a)}]});return n.toBlob(s)}var U=e.i(407198);let V=/^([A-F])\s*[.、.::]\s*(.*)$/,H=["A","B","C","D","E","F"],B=[60,20,20,20,20,20,40,30,8,12,10,14,16,16,8];async function _(t){let a,{default:l}=await e.A(810068),{data:n,sheet:s,columns:i,stickyRowsCount:r}={data:[(a=function(e){let t=[U.I.slice()];for(let l of e){var a;let{text:e,options:n}=function(e){let t=e.split("\n"),a=[],l=t.length,n=t.length-1;for(;n>=0;){let e=t[n].trim();if(""===e){n--;continue}let s=e.match(V);if(!s)break;let i=H.indexOf(s[1]);if(-1===i)break;a.unshift({labelIndex:i,value:s[2]}),l=--n+1}for(let e=0;e<a.length;e++)if(a[e].labelIndex!==e){a.length=0,l=t.length;break}let s=t.slice(0,l);for(;s.length>0&&""===s[s.length-1].trim();)s.pop();return 0===a.length?{text:e,options:[]}:{text:s.join("\n"),options:a.map(e=>e.value)}}(l.text??"");t.push([e,n[0]??"",n[1]??"",n[2]??"",n[3]??"",l.answer??"",l.analysis??"",l.knowledgePoints?.length?l.knowledgePoints.join("、"):"","number"!=typeof(a=l.difficultyStars)||!Number.isInteger(a)||a<1||a>5?"":String(a),function(e){if(!e)return"";let t=(0,D.P)(e);return t?D.H[t]:e}(l.questionType),l.subject??"",l.gradeSemester??"",l.source??"",l.section??"",l.label??""])}return t}(t))[0].map(e=>({value:e,fontWeight:"bold",wrap:!0})),...a.slice(1).map(e=>e.map(e=>({value:e,wrap:!0})))],sheet:"题目",columns:B.map(e=>({width:e})),stickyRowsCount:1};return l(n,{sheet:s,columns:i,stickyRowsCount:r}).toBlob()}let K="error-list-export-format";function G(){try{let e=window.localStorage.getItem(K);return"excel"===e||"word"===e?e:"json"}catch{return"json"}}function W(e,t){let a=window.URL.createObjectURL(e),l=document.createElement("a");l.href=a,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(a)}function X({open:e,onOpenChange:l,selectedIds:s}){let{t:i}=(0,S.b)(),[r,o]=(0,a.useState)(G),[c,d]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!0),[h,p]=(0,a.useState)(""),[g,x]=(0,a.useState)(!1),f=async()=>{let e=await fetch("/api/error-items/export-questions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s,includeImages:c})});if(!e.ok)throw Error((await e.json().catch(()=>({}))).message||"Export failed");let t=Number(e.headers.get("X-Export-Skipped")??"0"),a=await e.json();return{questions:Array.isArray(a?.questions)?a.questions:[],skipped:t}},b=async()=>{if(0!==s.length){x(!0);try{let e=new Date().toISOString().slice(0,10).replace(/-/g,""),t=0;if("excel"===r){let{questions:a,skipped:l}=await f();t=l;let n=await _(a);W(n,`wrong-notebook-questions-${e}.xlsx`)}else if("word"===r){let{questions:a,skipped:l}=await f();t=l;let n=h.trim()||`${i.notebook.exportJsonDialog.defaultDocxTitle} ${new Date().toISOString().slice(0,10)}`,s=await O(a,{title:n,includeAnswers:u,includeImages:c});W(s,`wrong-notebook-questions-${e}.docx`)}else{let a=await fetch("/api/error-items/export-questions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ids:s,includeImages:c})});if(!a.ok){let e=await a.json().catch(()=>({}));throw Error(e.message||"Export failed")}t=Number(a.headers.get("X-Export-Skipped")??"0");let l=await a.blob(),n=a.headers.get("Content-Disposition")?.match(/filename="(.+)"/);W(l,n?n[1]:`wrong-notebook-questions-${e}.json`)}t>0?(I.c.success(i.notebook.exportJsonDialog.success),I.c.warning(i.notebook.exportJsonDialog.emptyQuestionWarning.replace("{count}",String(t)))):I.c.success(i.notebook.exportJsonDialog.success),l(!1)}catch(e){L.V.error("[ErrorList]","Export questions failed",{error:e}),I.c.error(i.notebook.exportJsonDialog.failed+":"+(0,M.Z)(e))}finally{x(!1)}}};return(0,t.jsx)($.N,{open:e,onOpenChange:l,children:(0,t.jsxs)($.d,{children:[(0,t.jsxs)($.s,{children:[(0,t.jsx)($.F,{children:i.notebook.exportJsonDialog.title}),(0,t.jsx)($.C,{children:i.notebook.exportJsonDialog.description})]}),(0,t.jsx)("div",{className:"py-2",children:(0,t.jsx)(F.f,{options:[{value:"json",label:i.notebook.exportJsonDialog.formatJson},{value:"excel",label:i.notebook.exportJsonDialog.formatExcel},{value:"word",label:i.notebook.exportJsonDialog.formatWord}],value:r,onChange:e=>{o(e);try{window.localStorage.setItem(K,e)}catch{}}})}),"excel"===r&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i.notebook.exportJsonDialog.excelNote}),"word"===r&&(0,t.jsxs)("div",{className:"space-y-3 py-2",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("label",{htmlFor:"docx-title",className:"text-sm",children:i.notebook.exportJsonDialog.docxTitleLabel}),(0,t.jsx)("input",{id:"docx-title",type:"text",value:h,onChange:e=>p(e.target.value),placeholder:`${i.notebook.exportJsonDialog.defaultDocxTitle} ${new Date().toISOString().slice(0,10)}`,className:"w-full rounded-md border bg-background px-3 py-2 text-sm"})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(P.f,{id:"include-answers",checked:u,onCheckedChange:e=>m(!0===e)}),(0,t.jsx)("label",{htmlFor:"include-answers",className:"text-sm cursor-pointer",children:i.notebook.exportJsonDialog.includeAnswers})]}),(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(P.f,{id:"include-images",checked:c,onCheckedChange:e=>d(!0===e)}),(0,t.jsx)("label",{htmlFor:"include-images",className:"text-sm cursor-pointer",children:i.notebook.exportJsonDialog.includeImages})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:i.notebook.exportJsonDialog.wordNote})]}),"json"===r&&(0,t.jsxs)("div",{className:"flex items-center space-x-2 py-2",children:[(0,t.jsx)(P.f,{id:"include-images",checked:c,onCheckedChange:e=>d(!0===e)}),(0,t.jsx)("label",{htmlFor:"include-images",className:"text-sm cursor-pointer",children:i.notebook.exportJsonDialog.includeImages})]}),(0,t.jsxs)($.c,{children:[(0,t.jsx)(n.f,{variant:"outline",onClick:()=>l(!1),disabled:g,children:i.notebook.exportJsonDialog.cancel}),(0,t.jsx)(n.f,{onClick:b,disabled:g||0===s.length,children:g?i.notebook.exportJsonDialog.exporting:i.notebook.exportJsonDialog.export})]})]})})}var Q=e.i(632781),Y=e.i(307364),Z=e.i(511445),ee=e.i(41931);function et({ids:e}){let{t:l}=(0,S.b)(),[s,i]=(0,a.useState)(!1),[r,o]=(0,a.useState)(null),[c,d]=(0,a.useState)(!1),[u,h]=(0,a.useState)(null),[g,x]=(0,a.useState)(0),[f,b]=e,j=()=>{d(!0),o(null),h(null),x(e=>e+1)};return(0,a.useEffect)(()=>{if(!s||!f||!b)return;let e=!0;return ee.k.post("/api/error-items/similarity",{ids:[f,b]}).then(t=>{e&&o(t)}).catch(t=>{e&&(h("Question text is required for similarity comparison"===t?.data?.message?l.questionSimilarity.missingText:l.questionSimilarity.failed),L.V.error("[Similarity]","相似度比较失败",{error:t instanceof Error?t.message:String(t)}))}).finally(()=>{e&&d(!1)}),()=>{e=!1}},[s,f,b,g,l.questionSimilarity.failed,l.questionSimilarity.missingText]),(0,t.jsxs)($.N,{open:s,onOpenChange:e=>{i(e),e&&j()},children:[(0,t.jsx)($.a,{asChild:!0,children:(0,t.jsxs)(n.f,{variant:"outline",disabled:2!==e.length,title:l.questionSimilarity.selectTwo,children:[(0,t.jsx)(p,{className:"mr-2 h-4 w-4"}),l.questionSimilarity.title]})}),(0,t.jsxs)($.d,{className:"w-[calc(100vw-2rem)] sm:max-w-3xl max-h-[85vh] overflow-y-auto",children:[(0,t.jsxs)($.s,{children:[(0,t.jsx)($.F,{children:l.questionSimilarity.title}),(0,t.jsx)($.C,{children:l.questionSimilarity.description})]}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",role:"status",children:[(0,t.jsx)(Q.f,{className:"h-4 w-4 animate-spin"}),l.common.loading]}),u&&(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:u}),u&&(0,t.jsx)(n.f,{variant:"outline",onClick:j,children:l.questionSimilarity.retry}),r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"space-y-2 rounded-lg bg-muted p-4",role:"status",children:[(0,t.jsx)("p",{className:"text-sm",children:l.questionSimilarity.score}),(0,t.jsxs)("p",{className:"text-3xl font-bold tabular-nums",children:[Number((100*r.similarity).toFixed(4)),"%"]}),(0,t.jsx)("p",{className:"text-sm",children:l.questionSimilarity.threshold.replace("{threshold}",String(r.threshold))}),(0,t.jsx)("p",{className:"text-sm font-medium",children:r.duplicate?l.questionSimilarity.duplicate:l.questionSimilarity.different})]}),(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:r.items.map((e,a)=>(0,t.jsxs)("div",{className:"min-w-0 space-y-2 rounded-lg border p-3",children:[(0,t.jsxs)(m.default,{href:`/error-items/${e.id}`,className:"text-sm font-medium text-primary hover:underline",children:[l.questionSimilarity.question.replace("{index}",String(a+1))," · ",e.shortId||"-"]}),e.notebookName&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.notebookName}),(0,t.jsx)("div",{className:"max-h-56 overflow-auto text-sm",children:(0,t.jsx)(Z.f,{content:e.questionText})})]},e.id))})]}),(0,t.jsx)(Y.f,{onSaved:j})]})]})}function ea({selectedIds:e,deleting:l,onCancel:s,onDelete:i}){let{t:r}=(0,S.b)(),[o,c]=(0,a.useState)(!1);return(0,t.jsxs)("div",{className:"pb-safe fixed bottom-0 left-0 right-0 z-50 border-t bg-card/95 p-4 shadow-lg backdrop-blur",children:[(0,t.jsxs)("div",{className:"mx-auto flex max-w-6xl flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,t.jsxs)("div",{className:"space-y-1 text-sm text-muted-foreground",children:[(0,t.jsx)("p",{children:r.notebook.selectedCount.replace("{count}",String(e.length))}),(0,t.jsx)("p",{className:"text-xs",children:r.questionSimilarity.selectTwo})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(et,{ids:e}),(0,t.jsxs)(n.f,{variant:"outline",onClick:()=>c(!0),disabled:0===e.length,children:[(0,t.jsx)(A,{className:"mr-2 h-4 w-4"}),r.notebook.exportJson]}),(0,t.jsxs)(n.f,{variant:"outline",onClick:s,children:[(0,t.jsx)(R.X,{className:"mr-2 h-4 w-4"}),r.notebook.cancelSelect]}),(0,t.jsxs)(n.f,{variant:"destructive",onClick:i,disabled:0===e.length||l,children:[(0,t.jsx)(u.f,{className:"mr-2 h-4 w-4"}),r.notebook.deleteSelected]})]})]}),(0,t.jsx)(X,{open:o,onOpenChange:c,selectedIds:e})]})}var el=e.i(215519),en=e.i(306831),es=e.i(967489),ei=e.i(597138);let er={1:["一年级"],2:["二年级"],3:["三年级"],4:["四年级"],5:["五年级"],6:["六年级"],7:["七年级上","七年级下","七年级"],8:["八年级上","八年级下","八年级"],9:["九年级上","九年级下","九年级"],10:["高一上","高一下","高一"],11:["高二上","高二下","高二"],12:["高三上","高三下","高三"]};function eo({gradeSemester:e,tag:l,subjectName:n,tagSet:s="default",onFilterChange:i,className:r}){let{t:o}=(0,S.b)(),{timeZone:c}=(0,el.M)(),[d,u]=(0,a.useState)(e||""),[m,h]=(0,a.useState)(""),[p,g]=(0,a.useState)(l||""),[x,f]=(0,a.useState)([]),[b,j]=(0,a.useState)(!0),[y,k]=(0,a.useState)([]),[w,v]=(0,a.useState)(e);e!==w&&(v(e),void 0!==e&&u(e));let[N,C]=(0,a.useState)(l);l!==N&&(C(l),void 0!==l&&g(l||""));let T=(0,a.useCallback)((e,t)=>{let a=(0,en.c)(new Date,c),l=a.getFullYear(),n=(a.getMonth()+1>=9?l:l-1)-t+1;return"primary"===e?n:"junior_high"===e?n+6:"senior_high"===e?n+9:0},[c]),D=(0,a.useCallback)((e,t)=>{let a=[];return e?"primary"===e?a=[1,2,3,4,5,6]:"junior_high"===e?(a=[7,8,9],t&&T(e,t)>=10&&a.push(10,11,12)):a="senior_high"===e?[10,11,12]:[1,2,3,4,5,6,7,8,9,10,11,12]:a=[1,2,3,4,5,6,7,8,9,10,11,12],a.flatMap(e=>er[e]||[])},[T]);(0,a.useEffect)(()=>{(async()=>{j(!0);try{let e=await ee.k.get("/api/user"),t=D(e.educationStage,e.enrollmentYear);k(t);let a=n?(0,ei.f)(n):"math";try{let e=await ee.k.get(`/api/tags?subject=${a}&tagSet=${encodeURIComponent(s)}`);f(e.tags)}catch(e){L.V.warn("[KnowledgeFilter]","Failed to fetch tags for subject",{subject:a,tagSet:s,error:e}),f([])}}catch(e){L.V.error("[KnowledgeFilter]","Failed to load filter data",{error:e})}finally{j(!1)}})()},[n,s,D]);let q=x.find(e=>e.name===d),E=q?.children||[],A=E.find(e=>e.name===m),R=e=>0===e.children.length?[e.name]:e.children.flatMap(e=>R(e)),P=A?[...new Set(R(A))]:[],$=y.filter(e=>x.some(t=>t.name===e));return(0,t.jsxs)("div",{className:`flex gap-2 ${r}`,children:[(0,t.jsxs)(es.d,{value:d,onValueChange:e=>{u(e),h(""),g(""),i({gradeSemester:"all"===e?void 0:e,chapter:void 0,tag:void 0})},disabled:b,children:[(0,t.jsx)(es.P,{className:"w-[140px]",children:(0,t.jsx)(es.U,{placeholder:o.filter?.gradeShort||"Grade"})}),(0,t.jsxs)(es.r,{children:[(0,t.jsx)(es.T,{value:"all",children:o.filter?.allGrades||"All grades"}),$.map(e=>(0,t.jsx)(es.T,{value:e,children:e},e))]})]}),(0,t.jsxs)(es.d,{value:m,onValueChange:e=>{h(e),g(""),i({gradeSemester:"all"===d?void 0:d,chapter:"all"===e?void 0:e,tag:void 0})},disabled:!d||"all"===d,children:[(0,t.jsx)(es.P,{className:"w-[180px]",children:(0,t.jsx)(es.U,{placeholder:o.filter?.chapter||"Chapter"})}),(0,t.jsxs)(es.r,{children:[(0,t.jsx)(es.T,{value:"all",children:o.filter?.allChapters||"All chapters"}),E.map(e=>(0,t.jsx)(es.T,{value:e.name,children:e.name.replace(/^第\d+章\s*/,"")},e.id))]})]}),(0,t.jsxs)(es.d,{value:p,onValueChange:e=>{g(e),i({gradeSemester:"all"===d?void 0:d,chapter:"all"===m?void 0:m,tag:"all"===e?void 0:e})},disabled:!m||"all"===m,children:[(0,t.jsx)(es.P,{className:"w-[140px]",children:(0,t.jsx)(es.U,{placeholder:o.filter?.knowledgePoint||"Tag"})}),(0,t.jsxs)(es.r,{children:[(0,t.jsx)(es.T,{value:"all",children:o.filter?.allKnowledgePoints||"All tags"}),P.map(e=>(0,t.jsx)(es.T,{value:e,children:e},e))]})]})]})}var ec=e.i(487486),ed=e.i(912505),eu=e.i(793479),em=e.i(658512),eh=e.i(469817),ep=e.i(905110);function eg(e){let t=new URLSearchParams;return e.subjectId&&t.append("subjectId",e.subjectId),e.search&&t.append("query",e.search),"all"!==e.mastery&&t.append("mastery",e.mastery),"all"!==e.timeRange&&t.append("timeRange",e.timeRange),e.tag&&t.append("tag",e.tag),e.gradeSemester&&t.append("gradeSemester",e.gradeSemester),e.chapter&&t.append("chapter",e.chapter),"all"!==e.paperLevel&&t.append("paperLevel",e.paperLevel),e.questionTypes.length>0&&t.append("questionTypes",e.questionTypes.join(",")),t}var ex=e.i(380935),ef=e.i(164549);function eb({subjectId:e,subjectName:s,tagSet:i="default",initialMastery:r,initialTag:o}){let{t:c}=(0,S.b)(),d=(0,l.useRouter)(),[u,m]=(0,a.useState)([]),[h,y]=(0,a.useState)(!0),[k,w]=(0,a.useState)(""),[v,C]=(0,a.useState)(r??"all"),[E,A]=(0,a.useState)("all"),[R,P]=(0,a.useState)(""),[$,F]=(0,a.useState)(""),[M,z]=(0,a.useState)("all"),[J,O]=(0,a.useState)([]),[U,V]=(0,a.useState)(o??null),[H,B]=(0,a.useState)(1),_=eh.$,[K,G]=(0,a.useState)(0),[W,X]=(0,a.useState)(0),[Q,Y]=(0,a.useState)(!1),[Z,et]=(0,a.useState)(new Set),[el,en]=(0,a.useState)(!1),es=(0,a.useMemo)(()=>({subjectId:e,search:k,mastery:v,timeRange:E,tag:U,gradeSemester:R,chapter:$,paperLevel:M,questionTypes:J.map(e=>e===D.O?"none":e)}),[e,k,v,E,U,R,$,M,J]),ei=()=>{Y(!Q),et(new Set)},er=(0,a.useCallback)(async()=>{y(!0);try{let e=eg(es);e.append("page",H.toString()),e.append("pageSize",_.toString());let t=await ee.k.get(`/api/error-items/list?${e.toString()}`);m(t.items),G(t.total),X(t.totalPages)}catch(e){L.V.error("[ErrorList]","Failed to fetch error items",{error:e})}finally{y(!1)}},[es,H,_]),ep=async()=>{if(0===Z.size)return;let e=(c.notebook?.confirmBatchDelete||"Delete {count} items?").replace("{count}",Z.size.toString());if(await (0,I.u)(e,{destructive:!0})){en(!0);try{await ee.k.post("/api/error-items/batch-delete",{ids:Array.from(Z)}),I.c.success(c.notebook?.batchDeleteSuccess||"Deleted successfully"),Y(!1),et(new Set),er()}catch(e){L.V.error("[ErrorList]","Batch delete failed",{error:e}),I.c.error(c.common?.messages?.deleteFailed||"Delete failed")}finally{en(!1)}}},ej=(0,a.useRef)(es);return(0,a.useEffect)(()=>{let e=ej.current!==es;(ej.current=es,e&&1!==H)?B(1):er()},[H,es,er]),(0,t.jsxs)("div",{className:`space-y-6 ${Q?"pb-40 sm:pb-24":""}`,children:[(0,t.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row",children:[(0,t.jsxs)("div",{className:"relative w-full lg:flex-1",children:[(0,t.jsx)(b.f,{className:"absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(eu.f,{placeholder:c.notebook.search,title:c.shortId.searchHint,className:"h-10 rounded-xl bg-card pl-9",value:k,onChange:e=>w(e.target.value),onKeyDown:async e=>{let t=k.trim();if("Enter"!==e.key||!(0,ef.f)(t))return;let a=await (0,ex.f)(t);a&&d.push(`/error-items/${a}`)}})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(N,{mastery:v,timeRange:E,onMasteryChange:C,onTimeRangeChange:A}),(0,t.jsxs)(n.f,{variant:"outline",size:"sm",className:"h-10",onClick:()=>d.push(`/print-preview?${eg(es).toString()}`),children:[(0,t.jsx)(f.f,{className:"mr-2 h-4 w-4"}),c.notebook?.exportPrint||"Export for Print"]}),!Q&&(0,t.jsxs)(n.f,{variant:"outline",size:"sm",className:"h-10",onClick:ei,children:[(0,t.jsx)(p,{className:"mr-2 h-4 w-4"}),c.questionSimilarity.title]}),(0,t.jsxs)(n.f,{variant:Q?"secondary":"outline",size:"sm",className:"h-10",onClick:ei,children:[(0,t.jsx)(x.f,{className:"mr-2 h-4 w-4"}),Q?c.notebook?.cancelSelect||"Cancel":c.notebook?.selectMode||"Select"]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 items-stretch sm:items-center",children:[(0,t.jsx)("div",{className:"w-full sm:w-auto",children:(0,t.jsx)(eo,{gradeSemester:R,tag:U,onFilterChange:({gradeSemester:e,chapter:t,tag:a})=>{void 0!==e&&P(e),void 0!==t&&F(t),V(void 0===a?null:a),e?t||F(""):(P(""),F(""),V(null)),B(1)},subjectName:s,tagSet:i})}),(0,t.jsx)(T,{value:M,onChange:z})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:c.questionType.label}),(0,t.jsx)(q,{value:J,onChange:O})]}),U&&(0,t.jsxs)("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-lg",children:[(0,t.jsxs)("span",{className:"text-sm text-muted-foreground",children:[c.filter.filteringByTag||"Filtering by tag",":"]}),(0,t.jsxs)(ec.f,{variant:"secondary",className:"cursor-pointer",onClick:()=>V(null),children:[U,(0,t.jsx)("span",{className:"ml-1 text-xs",children:"×"})]})]}),!h&&0===u.length&&(0,t.jsx)(ed.f,{icon:g.f,title:c.notebook.emptyList,description:c.notebook.emptyListHint}),h&&0===u.length&&(0,t.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6},(e,a)=>(0,t.jsx)("div",{className:"h-44 animate-pulse rounded-2xl bg-muted"},a))}),(0,t.jsx)("div",{className:`grid gap-4 md:grid-cols-2 lg:grid-cols-3 transition-opacity ${h?"opacity-60":""}`,children:u.map(e=>(0,t.jsx)(j.f,{item:e,selectMode:Q,selected:Z.has(e.id),onToggleSelect:()=>{var t;return t=e.id,void et(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},selectedTag:U,onTagClick:e=>V(U===e?null:e)},e.id))}),(0,t.jsx)(em.f,{page:H,totalPages:W,total:K,pageSize:_,onPageChange:B}),Q&&(0,t.jsx)(ea,{selectedIds:[...Z],deleting:el,onCancel:ei,onDelete:ep})]})}function ej(e){let n=(0,l.useSearchParams)(),s=(0,a.useMemo)(()=>{let e,t,a;return e={},t=n.get("mastery"),(0,ep.A)(t)&&(e.mastery=t),(a=n.get("tag"))&&(e.tag=a),e},[n]);return(0,t.jsx)(eb,{...e,initialMastery:s.mastery,initialTag:s.tag})}function ey(e){return(0,t.jsx)(a.Suspense,{fallback:null,children:(0,t.jsx)(ej,{...e})})}var ek=e.i(110204);function ew({open:e,onOpenChange:l,currentName:s,onRename:i}){let[r,o]=(0,a.useState)(s),[c,d]=(0,a.useState)(!1),{t:u}=(0,S.b)(),[m,h]=(0,a.useState)(s);s!==m&&(h(s),o(s));let p=async()=>{if(!r.trim())return void I.c.warning(u.notebooks?.renameDialog?.enterName||"Please enter notebook name");d(!0);try{await i(r.trim()),l(!1)}catch(e){L.V.error("[RenameNotebook]","Failed to rename notebook",{error:e})}finally{d(!1)}};return(0,t.jsx)($.N,{open:e,onOpenChange:l,children:(0,t.jsxs)($.d,{children:[(0,t.jsx)($.s,{children:(0,t.jsx)($.F,{children:u.notebooks?.renameDialog?.title||"Rename Notebook"})}),(0,t.jsx)("div",{className:"space-y-4 py-4",children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(ek.f,{htmlFor:"rename-name",children:u.notebooks?.renameDialog?.nameLabel||"New Name"}),(0,t.jsx)(eu.f,{id:"rename-name",placeholder:u.notebooks?.renameDialog?.placeholder||"Enter new notebook name",value:r,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&p()})]})}),(0,t.jsxs)($.c,{children:[(0,t.jsx)(n.f,{variant:"outline",onClick:()=>l(!1),children:u.common.cancel}),(0,t.jsx)(n.f,{onClick:p,disabled:c||!r.trim(),children:c?u.notebooks?.renameDialog?.renaming||"Renaming...":u.notebooks?.renameDialog?.rename||"Rename"})]})]})})}var ev=e.i(328623);function eS({notebookId:e,onFinished:l}){let{t:s}=(0,S.b)(),[i,r]=(0,a.useState)(null),[o,c]=(0,a.useState)(null),d=(0,a.useRef)(!1),u=(0,a.useCallback)(()=>{ee.k.get(`/api/notebooks/${e}/retag`).then(e=>{d.current&&e&&!e.running&&l?.(),d.current=!!e?.running,r(e)}).catch(()=>void 0)},[e,l]);(0,a.useEffect)(u,[u]),(0,a.useEffect)(()=>{if(!i?.running)return;let e=setTimeout(u,2e3);return()=>clearTimeout(e)},[i,u]);let m=async()=>{if(await (0,I.u)(s.retag.notebookConfirm)){c(null);try{let t=await ee.k.post(`/api/notebooks/${e}/retag`,{});if(0===t.total)return void c(s.retag.empty);d.current=t.running,r(t)}catch{c(s.retag.itemFailed)}}},h=o??(i?.running?s.retag.progress.replace("{done}",String(i.done)).replace("{total}",String(i.total)):i?.finishedAt&&i.total>0?s.retag.finished.replace("{success}",String(i.total-i.failed)).replace("{failed}",String(i.failed)):null);return(0,t.jsxs)("div",{className:"flex flex-col items-start sm:items-end gap-1",children:[(0,t.jsxs)(n.f,{variant:"outline",size:"sm",onClick:m,disabled:i?.running,"aria-label":s.retag.notebookButton,children:[i?.running?(0,t.jsx)(Q.f,{className:"h-4 w-4 animate-spin sm:mr-2"}):(0,t.jsx)(ev.f,{className:"h-4 w-4 sm:mr-2"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:s.retag.notebookButton})]}),h&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h})]})}var eN=e.i(709830),eC=e.i(35209);e.s(["default",0,function(){let e=(0,l.useParams)(),o=(0,l.useRouter)(),{t:c}=(0,S.b)(),[h,p]=(0,a.useState)(null);(0,eC.f)(c.notebooks.title,h?.name);let[g,x]=(0,a.useState)(!0),[f,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)(0),k=(0,a.useCallback)(async e=>{try{let t=await ee.k.get(`/api/notebooks/${e}`);p(t)}catch(e){L.V.error("[NotebookDetail]","Failed to fetch notebook",{error:e}),I.c.error(c.notebooks?.notFound||"Notebook not found"),o.push("/notebooks")}finally{x(!1)}},[o,c]);(0,a.useEffect)(()=>{e.id&&k(e.id)},[e.id,k]);let w=async e=>{h&&p(await ee.k.put(`/api/notebooks/${h.id}`,{name:e}))},v=async()=>{if(h)try{let e=await ee.k.get(`/api/notebooks/${h.id}`);if((e._count?.errorItems||0)>0)return void I.c.warning(c.notebooks?.deleteNotEmpty||"Please clear all items in this notebook first.");if(!await (0,I.u)((c.notebooks?.deleteConfirm||"Are you sure?").replace("{name}",h.name),{destructive:!0}))return;await ee.k.delete(`/api/notebooks/${h.id}`),o.replace("/notebooks")}catch(e){L.V.error("[NotebookDetail]","Failed to delete notebook",{error:e}),I.c.error((0,M.d)(e)||c.notebooks?.deleteError||"Failed to delete")}};return g?(0,t.jsx)(i.f,{label:c.common.loading}):h?(0,t.jsx)("main",{className:"mx-auto min-h-screen max-w-6xl px-4 py-6 md:px-8 md:py-8",children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(s.f,{backHref:"/notebooks",title:h.name,titleAddon:(0,t.jsx)(n.f,{variant:"ghost",size:"icon-sm",className:"shrink-0 text-muted-foreground",onClick:()=>b(!0),title:c.notebooks?.rename||"Rename",children:(0,t.jsx)(d,{className:"h-4 w-4"})}),description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eN.E,{notebook:h})," · ",(c.notebooks?.totalErrors||"Total {count} errors").replace("{count}",(h._count?.errorItems||0).toString())]}),actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.f,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:v,"aria-label":c.common.delete,children:[(0,t.jsx)(u.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:c.common.delete})]}),(0,t.jsx)(eS,{notebookId:h.id,onFinished:()=>y(e=>e+1)}),(0,t.jsx)(m.default,{href:`/notebooks/${h.id}/add`,children:(0,t.jsxs)(n.f,{"aria-label":c.notebooks?.addError||"Add Error",children:[(0,t.jsx)(r.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:c.notebooks?.addError||"Add Error"})]})})]})}),(0,t.jsx)(ey,{subjectId:h.id,subjectName:h.name,tagSet:h.tagSet||"default"},j),(0,t.jsx)(ew,{open:f,onOpenChange:b,currentName:h.name,onRename:w})]})}):null}],198591)}]);
|