wrong-notebook 2026.11.4-1 → 2026.11.4-3
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/build-manifest.json +3 -3
- 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 +14 -13
- 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 +14 -13
- 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 +14 -13
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js +15 -13
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js +16 -16
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +18 -17
- 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 +13 -12
- 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 +14 -13
- 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 -18
- 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 +16 -14
- 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 +19 -18
- 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 +9 -6
- 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 +16 -14
- 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 +16 -14
- 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/list/route.js +8 -8
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +20 -20
- 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 +18 -17
- package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/results/route.js +17 -17
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js +17 -17
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +18 -17
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js +17 -17
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js +9 -8
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +17 -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 +21 -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 -24
- 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 -19
- 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 +24 -23
- 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 -24
- 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 +24 -23
- 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 +24 -23
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +24 -23
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +23 -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 +23 -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 +24 -23
- 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 +23 -22
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +24 -23
- 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 +16 -16
- 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 +19 -18
- 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 -17
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js +14 -13
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js +15 -14
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js +17 -16
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +18 -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 +15 -14
- 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 +16 -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 +16 -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 +9 -8
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js +9 -9
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- package/.next/server/app/api/user/route.js +15 -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/chunks/[externals]__1j5vgk-wr4vpe._.js +3 -0
- package/.next/server/chunks/[externals]_fs_0pplqgcyv2l7l._.js +3 -0
- package/.next/server/chunks/[externals]_fs_1d5jh8vp8y6zt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__05tyrbfzivoeq._.js → [root-of-the-server]__0-5ex-1jwf2so._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__01-14hxale6jz._.js → [root-of-the-server]__000xbr1s0pxwr._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00_59ioz3-clx._.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]__01rm65xnqj0z-._.js → [root-of-the-server]__00cvwb7xtihiy._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__00g0do0mkiaol._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__02nbzp-n9g9_o._.js → [root-of-the-server]__00u81uwtn433h._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__09pkxauucdf_0._.js → [root-of-the-server]__02osgjesv2sc1._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0xnu_7ck-z9do._.js → [root-of-the-server]__02rd5j6up78m2._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__02t-_4nuz92ls._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0384w26qgo9xm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04ofq5esp33on._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__04rit3x7n87ku._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__006u92h_madgn._.js → [root-of-the-server]__05d81asaxsts8._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__06dvthqk5vh87._.js +3 -0
- 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]__1eu_g0k_nr3i-._.js → [root-of-the-server]__0702vmlo8jrsa._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__075pb7_pb654o._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0k4cyyyh6z6_p._.js → [root-of-the-server]__08wi504al-t3f._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0bmczgpuggwki._.js → [root-of-the-server]__0_gf1ay3sa41e._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0_zz_zj6cp7hy._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0bgi7pc7dogwe._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0cjj_9c_1d-eb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0d315c1v02ny0._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0eba9rni-2_tw._.js → [root-of-the-server]__0dyqmjzl1b_1f._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0ehph__dmu6pf._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0evv12a34qcy6._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__0fdvaccw9slrb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fr_y2a0149cd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0fscx2v333vm8._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0g9zoc0653-fw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0h-qm7nop9330._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0hsl0y0knqi-1._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__029n0r2v92pcc._.js → [root-of-the-server]__0htnw-q6r_ple._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0lqv0n5j2fg24._.js → [root-of-the-server]__0i3k26mx8ndsy._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0ifmgp3wd_za_._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0joi1yae2ehm4._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0imuc7gi1ii-e._.js → [root-of-the-server]__0k0dc64mmh6m3._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0l104gjwyuf1b._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0l5ybk_p285gl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lm6l50r5n5di._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0lsvd81f6kf59._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0oh43a4yzv1os._.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]__0fx0s5_6sjw-d._.js → [root-of-the-server]__0tn4z733mbm06._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0torie7kq-_7m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0tvp4sm4zx3wt._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0geynfn2xmdle._.js → [root-of-the-server]__0tzkw11a1tdju._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0uhfq-cs0r44u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0unr-g_-8kx90._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0v6kysx0rq-1m._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrs8pd3vzslw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0wfpx1grz3ds6._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0x-02x70-ewqa._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ya2x1q-h3scx._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zhm5smhb-gdm._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0zmnn5ww2etgw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__10_9ca38kz5au._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1kiolpvl5u4e-._.js → [root-of-the-server]__10gw_yrtllol4._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__11d2q9o0f28s0._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__11oto6h82pnhn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__12wn_ef3w7f8l._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__132-2tja1hzjw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13aq01o_yamyz._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__13x167nrb3y6w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1438_x9vkg2ow._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__14qqa5fifm2rn._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16jaf2eom1mlc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16pezaw35f9j1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16qwprn5u6gjt._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__176zyagwjex4i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__180yz6lfwyg1x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__197qvpegys2sj._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19cfobnhf4rgh._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__19r0-5tk-zh9i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1_sr40zcjsx6y._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1c_nbrrytj02e._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dgb5al4upb9v._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1dkmclmcfr_o2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1e8_j43j1t1m3._.js +27 -0
- package/.next/server/chunks/[root-of-the-server]__1fmsngpmgt-p-._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1frkpeaqco77c._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gfpzuz6qe78x._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1gvappei6o8kd._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1h0tye6lfskvl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hc_s6bb3tqn2._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1hy_enkxk2q7n._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1icr5yq0kmxsk._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1j92hfszx6_cs._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jd9zchusdb14._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1jey4pj050ie1._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ji7iwt_w00lv._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1okwln3g2ifvb._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1oy49h1nfcsne._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1p4_cgasfcy73._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1s21nmek1dpsc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sk7ctcxmkco3._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1sl3foar6w087._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ui10_ypv4qrw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1v5o1ch2vz7iw._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vm13gnfyoh6u._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1vrtsz6125q__._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1wnuzqkneu1ws._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1xv0q7bppzr-w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1yzqi7jexvvzc._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1zq5g6-uodrek._.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/_03wxfgqq6wpf_._.js +3 -0
- package/.next/server/chunks/_0431fxnqiloso._.js +1 -1
- 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/_0819wmh2_bgt-._.js +3 -0
- 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/_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/_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/_0rnn090b4_3pb._.js +3 -0
- package/.next/server/chunks/_0suqhfy3e5sv6._.js +1 -1
- package/.next/server/chunks/{_03dn7v_h3d-v8._.js → _0tkov27xr068i._.js} +8 -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} +8 -7
- package/.next/server/chunks/_1647rfjflw_iq._.js +1 -1
- package/.next/server/chunks/_1654ui1ph-3x8._.js +3 -0
- 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/_1ahefh9733vmk._.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/_1ex6ovo_j2jzv._.js +1 -1
- 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/_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/_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} +8 -7
- package/.next/server/chunks/_1xpj9uk-9zhl8._.js +1 -1
- 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_@anthropic-ai_sdk_1ulo822751toa._.js +3 -0
- 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_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_0cmg152v4yi6o._.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_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 +131 -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_1v5vdsc8-zp2z._.js +3 -0
- package/.next/server/chunks/src_lib_ai_index_ts_0m0hlq4d9zy9i._.js +1 -1
- 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 +3 -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_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]__1z2o77biewl3j._.js → [root-of-the-server]__01epe_65_8e8r._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__01z2m5q6l60fn._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0ht0nkzazbnl9._.js → [root-of-the-server]__0iqnvufl6qrve._.js} +2 -2
- 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]__03208_liub81h._.js → [root-of-the-server]__1babe6vdwxbtq._.js} +2 -2
- 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/_0mfy8kk0_omxw._.js +3 -0
- package/.next/server/chunks/ssr/_0mvuvawj5-r--._.js +1 -1
- package/.next/server/chunks/ssr/_0qgs--x99c558._.js +3 -0
- package/.next/server/chunks/ssr/_0rd-teluypcd2._.js +1 -1
- package/.next/server/chunks/ssr/_0svbyo-zufys9._.js +3 -0
- package/.next/server/chunks/ssr/{_186fwf-hcr_ua._.js → _101w__e2w9gr0._.js} +2 -2
- package/.next/server/chunks/ssr/_19hxsrrruepym._.js +1 -1
- package/.next/server/chunks/ssr/_1qgg_ll5hkjaf._.js +1 -1
- package/.next/server/chunks/ssr/{_1xv0q8o3g3r5d._.js → _1s3gqrczubor-._.js} +2 -2
- package/.next/server/chunks/ssr/_1th-xa6ci3ryc._.js +3 -0
- package/.next/server/chunks/ssr/_1ux6eqqkupo6v._.js +1 -1
- package/.next/server/chunks/ssr/{_1pdnzaad7hk0d._.js → _1x_zn17exkc4t._.js} +2 -2
- package/.next/server/chunks/ssr/{_0w83jztp72o20._.js → _20593q3u-y025._.js} +2 -2
- package/.next/server/chunks/ssr/{node_modules_1d2ueqm41z04k._.js → node_modules_16_nl7nawmp3n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1_wfmqq00b4vx.js → node_modules_heic-to_dist_csp_heic-to_0i0ydbk94w-r3.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1myi81wrj4gw4.js → node_modules_heic-to_dist_csp_heic-to_1h62imz_ct0w_.js} +1 -1
- package/.next/server/chunks/ssr/src_0_qzoo_03n_v-._.js +3 -0
- package/.next/server/chunks/ssr/src_1gayunqs8u2e2._.js +1 -1
- package/.next/server/chunks/ssr/src_1iewbwi2267a1._.js +3 -0
- package/.next/server/chunks/ssr/{src_1jhctayt9gxoc._.js → src_1o5f_wr8vv-x0._.js} +2 -2
- 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 +1 -1
- 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 +1 -1
- package/.next/server/chunks/ssr/src_app_print-preview_page_tsx_001yt-fzrj7tf._.js +1 -1
- package/.next/server/chunks/ssr/src_components_correction-editor_tsx_1p7z02t66tndx._.js +2 -2
- 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_import-tasks_import-task-card_tsx_01r47qh8ryspb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_print-preview_answer-space-control_tsx_02kuswyxklzp_._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +10 -10
- package/.next/server/chunks/ssr/{src_lib_1vv0-aje_e-zh._.js → src_lib_0773v8b5gb93o._.js} +2 -2
- package/.next/server/chunks/ssr/{src_lib_0-wirad5ziskp._.js → src_lib_1qhs590-z9xnh._.js} +2 -2
- 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/{1pdlii0oox0-7.js → 037g92rz3qjm_.js} +1 -1
- package/.next/static/chunks/{2cfz0fumc6ghe.js → 045cs_rolnmjd.js} +1 -1
- package/.next/static/chunks/077y4nms_vzwe.js +1 -0
- package/.next/static/chunks/{1746y345zti-9.js → 0eize8lf2hp4i.js} +2 -2
- package/.next/static/chunks/{3tv07cyoo_hat.js → 0gxr8rcvy4zzg.js} +1 -1
- package/.next/static/chunks/0njrl9jn2yde_.js +1 -0
- package/.next/static/chunks/{02wft51kf3t9f.js → 0ovv_fq59i4y4.js} +1 -1
- package/.next/static/chunks/{1uaqnxl-xshw6.js → 0uay0bmznf3g-.js} +1 -1
- package/.next/static/chunks/{0wcwopwk4us6h.js → 0vlsab1wxbcnl.js} +2 -2
- package/.next/static/chunks/{31-r0kqqw-wfd.js → 0xwz3h9d_e7kb.js} +1 -1
- package/.next/static/chunks/1-dh1gads_tda.js +1 -0
- package/.next/static/chunks/{0_xcjg47jv3ur.js → 1-qu_z3i5b8ul.js} +1 -1
- package/.next/static/chunks/164mvykuvwd-0.js +1 -0
- package/.next/static/chunks/{3oz37kz8n7y3b.js → 18bumc8ezaiy4.js} +1 -1
- package/.next/static/chunks/1ado9no6s8r2t.js +1 -0
- package/.next/static/chunks/{2r5aeenvfl93p.js → 1j8eduwold2uf.js} +1 -1
- package/.next/static/chunks/{3fh32b9da9l_5.js → 1k2m_f0nu22fb.js} +1 -1
- package/.next/static/chunks/1pw6djqafgpo7.js +2 -0
- package/.next/static/chunks/{2ebh36q8lvor_.js → 1xpxy-ja2ym0o.js} +1 -1
- package/.next/static/chunks/25flylmb_qz91.js +1 -0
- package/.next/static/chunks/2cpsg6e2vg7fx.css +3 -0
- package/.next/static/chunks/2jt0139jd2-i3.js +12 -0
- package/.next/static/chunks/2qjb14pd2n3x_.js +1 -0
- package/.next/static/chunks/2s6ae7khf13mi.js +12 -0
- package/.next/static/chunks/33fakli20_bmk.js +1 -0
- package/.next/static/chunks/34dstd5pyqifj.js +1 -0
- package/.next/static/chunks/39lbv0arntrnf.js +193 -0
- package/.next/static/chunks/3_w-p8241f5rv.js +1 -0
- package/.next/static/chunks/{3wch6vphcivq5.js → 3j92h-4k4_o_f.js} +1 -1
- package/.next/static/chunks/{4441xuc3i-yb7.js → 3rnbnqcge4lza.js} +1 -1
- package/.next/static/chunks/{2qqyq-iqkv_oa.js → 3snn9aaz5n95k.js} +2 -2
- package/.next/static/chunks/43btem6mtf_gh.js +1 -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/20261103231825_exam_paper_mode/migration.sql +25 -0
- package/prisma/schema.prisma +1 -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]__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]__0wj82qshtrskw._.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]__0z0knsep33lsx._.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]__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/_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_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_1geq39r7va9gy._.js +0 -3
- package/.next/server/chunks/src_lib_1h4xeb9lyx31r._.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_1xdguwkq8k_gz._.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/src_lib_tag-hierarchy_ts_1illun--8v3_9._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0vgnixmnie9dg._.js +0 -3
- package/.next/server/chunks/ssr/_01rfvhncgnpvl._.js +0 -3
- package/.next/server/chunks/ssr/_0wculltrlnokg._.js +0 -3
- package/.next/server/chunks/ssr/_1-5vj-nfmgwz8._.js +0 -3
- package/.next/server/chunks/ssr/_18dt93-y95n-0._.js +0 -3
- package/.next/server/chunks/ssr/_1b3pell8an7q7._.js +0 -3
- package/.next/server/chunks/ssr/_1gbbaroe3f8p2._.js +0 -3
- package/.next/server/chunks/ssr/_1ujx-n3muyaxs._.js +0 -32
- package/.next/server/chunks/ssr/src_1vhiktxz2_jj3._.js +0 -3
- 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/081x3sje_s-_s.js +0 -1
- package/.next/static/chunks/093fbi_f_vb46.js +0 -1
- package/.next/static/chunks/0nq5_ne_bugdp.js +0 -1
- package/.next/static/chunks/0y5zywo-ll2w3.js +0 -1
- package/.next/static/chunks/17dk_oppf9-hv.js +0 -12
- package/.next/static/chunks/1a9_ien1xt883.js +0 -1
- package/.next/static/chunks/1b5jj8zk0mtzk.js +0 -1
- package/.next/static/chunks/2ic9ath-r3jvf.js +0 -193
- package/.next/static/chunks/38fux_rbsoiif.js +0 -1
- package/.next/static/chunks/38vt_4ntvy02e.js +0 -1
- package/.next/static/chunks/3ayhhtp8n8w82.css +0 -3
- package/.next/static/chunks/3kr4ynzxd4_6d.js +0 -2
- /package/.next/static/{0_A8rshkxRGdIAt8Ht93Q → P3mJPGERki1060-s7tC9h}/_buildManifest.js +0 -0
- /package/.next/static/{0_A8rshkxRGdIAt8Ht93Q → P3mJPGERki1060-s7tC9h}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{0_A8rshkxRGdIAt8Ht93Q → P3mJPGERki1060-s7tC9h}/_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
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let i=(0,t.f)(s);e.s(["f",0,i],711241)},422337,e=>{var t=e.i(843476),s=e.i(271645),i=e.i(522016),a=e.i(618566),r=e.i(980105),n=e.i(866531),l=e.i(731335),c=e.i(497346),d=e.i(519455),m=e.i(912505),u=e.i(393842),o=e.i(86963),f=e.i(111110),x=e.i(41931),h=e.i(201276),p=e.i(
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let i=(0,t.f)(s);e.s(["f",0,i],711241)},422337,e=>{var t=e.i(843476),s=e.i(271645),i=e.i(522016),a=e.i(618566),r=e.i(980105),n=e.i(866531),l=e.i(731335),c=e.i(497346),d=e.i(519455),m=e.i(912505),u=e.i(393842),o=e.i(86963),f=e.i(111110),x=e.i(41931),h=e.i(201276),p=e.i(127175),j=e.i(35209),v=e.i(532377),b=e.i(901219),g=e.i(339501),k=e.i(183444);e.s(["default",0,function(){let e=(0,a.useParams)(),w=(0,a.useRouter)(),y=e.id,{t:N}=(0,f.b)();(0,j.f)(N.importTasks.title);let{task:I,notFound:T,refresh:S}=(0,b.a)(y),R=(0,v.f)(S),E=(0,k.f)("[ImportTask]"),z=(0,g.f)(I?.status==="analyzing"||I?.status==="saving"),C=(0,s.useRef)(null),[D,P]=(0,s.useState)(null),B=I?.status==="review";(0,s.useEffect)(()=>{if(!B)return;let e=!1;return(0,p.h)(y,{image:!0}).then(t=>{e||P({id:y,data:t.imageData})}).catch(e=>h.V.error("[ImportTask]","Failed to load task image",{error:e})),()=>{e=!0}},[y,B]);let[F,U]=(0,s.useState)(null);if((0,s.useEffect)(()=>{x.k.get("/api/notebooks").then(U).catch(e=>{h.V.error("[ImportTask]","Failed to fetch notebooks",{error:e}),U([])})},[]),(0,s.useEffect)(()=>{I&&C.current!==I.id&&I.unread&&(C.current=I.id,R.markRead(I))},[I,R]),T)return(0,t.jsx)("main",{className:"mx-auto max-w-3xl px-4 py-6 md:px-8 md:py-8",children:(0,t.jsx)(m.f,{icon:r.f,title:N.importTasks.notFound,action:(0,t.jsx)(i.default,{href:"/import-tasks",children:(0,t.jsx)(d.f,{children:N.importTasks.viewTasks})})})});if(!I||"review"===I.status&&(!F||D?.id!==y))return(0,t.jsx)(o.f,{});let V=I.result?.subject,A=V?F?.find(e=>e.name.includes(V)||V.includes(e.name)):void 0,H=I.batchId?`/import-batches/${I.batchId}`:"/import-tasks",K=async e=>{let t=I.targetSubjectId??e.subjectId??null,s=await E.run(()=>(0,p.I)(I.id,{...e,subjectId:t}),t,!I.batchId);s&&(I.batchId||!t)&&w.push(H),s||S()};return(0,t.jsxs)("main",{className:`mx-auto space-y-4 px-4 py-6 md:px-8 md:py-8 ${"review"===I.status?"max-w-6xl":"max-w-3xl"}`,children:[(0,t.jsx)(u.f,{backHref:H,title:I.batchId?N.importBatch.title:N.importTasks.title,description:N.importTasks.status[I.status]}),(0,t.jsx)(c.f,{message:E.saveError,onDismiss:E.dismissSaveError}),"review"===I.status&&I.result?(0,t.jsx)(n.f,{initialData:I.result,imagePreview:D?.data??null,onSave:K,onCancel:()=>w.push(H),initialSubjectId:I.targetSubjectId||I.subjectId||A?.id}):(0,t.jsx)(l.f,{task:I,now:z,onViewItem:()=>R.viewItem(I),onRetry:()=>R.retry(I),onDiscard:async()=>{await R.discard(I)&&w.push(H)}})]})}])},590546,e=>{var t=e.i(843476),s=e.i(618566),i=e.i(519455),a=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:r}){let n=(0,s.useRouter)();return(0,t.jsx)(i.f,{variant:"ghost",size:"icon",onClick:()=>{n.push(e)},className:r,children:(0,t.jsx)(a.f,{className:"h-5 w-5"})})}])},912505,e=>{var t=e.i(843476),s=e.i(975157);e.s(["f",0,function({icon:e,title:i,description:a,action:r,className:n}){return(0,t.jsxs)("div",{className:(0,s.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",n),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:i}),a&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:a}),r&&(0,t.jsx)("div",{className:"mt-5",children:r})]})}])},393842,e=>{var t=e.i(843476),s=e.i(590546),i=e.i(975157);e.s(["f",0,function({title:e,description:a,backHref:r,actions:n,titleAddon:l,className:c}){return(0,t.jsxs)("div",{className:(0,i.f)("flex items-start gap-3",c),children:[r&&(0,t.jsx)(s.f,{fallbackUrl:r,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),a&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:a})]}),n&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:n})]})}])},86963,e=>{var t=e.i(843476),s=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(s.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},35209,e=>{var t=e.i(271645),s=e.i(111110);e.s(["f",0,function(...e){let{t:i}=(0,s.b)(),a=[i.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=a},[a])}])}])})();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
- less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
|
|
4
4
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
5
5
|
|
|
6
|
-
Defaulting to \`null\`.`}s(f,"defaultGetValueLabel"),s(y,"getProgressState"),s(x,"isNumber"),s(v,"isValidMaxNumber"),s(b,"isValidValueNumber"),s(C,"getInvalidMaxError"),s(D,"getInvalidValueError");var M=e.i(975157);let E=r.forwardRef(({className:e,value:t,...n},a)=>(0,i.jsx)(m,{ref:a,value:t,className:(0,M.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:(0,i.jsx)(w,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));E.displayName=m.displayName,e.s(["f",0,E],168148)},328623,e=>{var t=e.i(456420);let n={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],328623)},232660,213761,e=>{var t=e.i(271645),n={x:0,y:0,width:0,height:0,unit:"px"},a=(e,t,n)=>Math.min(Math.max(e,t),n),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function r(e,t,a){return"%"===e.unit?{...n,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/a*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/a*100:0}}function o(e,t,a){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*a/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*a/100:0}:{...n,...e,unit:"px"}}function h(e,t,n,a,i,r=0,o=0,l=a,s=i){let d={...e},c=Math.min(r,a),u=Math.min(o,i),g=Math.min(l,a),p=Math.min(s,i);t&&(t>1?(u=(c=o?o*t:c)/t,g=l*t):(c=(u=r?r/t:u)*t,p=s/t)),d.y<0&&(d.height=Math.max(d.height+d.y,u),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);let m=a-(d.x+d.width);m<0&&(d.x=Math.min(d.x,a-c),d.width+=m);let w=i-(d.y+d.height);if(w<0&&(d.y=Math.min(d.y,i-u),d.height+=w),d.width<c&&(("sw"===n||"nw"==n)&&(d.x-=c-d.width),d.width=c),d.height<u&&(("nw"===n||"ne"==n)&&(d.y-=u-d.height),d.height=u),d.width>g&&(("sw"===n||"nw"==n)&&(d.x-=g-d.width),d.width=g),d.height>p&&(("nw"===n||"ne"==n)&&(d.y-=p-d.height),d.height=p),t){let e=d.width/d.height;if(e<t){let e=Math.max(d.width/t,u);("nw"===n||"ne"==n)&&(d.y-=e-d.height),d.height=e}else if(e>t){let e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}var l={capture:!0,passive:!1},s=0,d=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${s++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:a,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:a,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:a}=this.getBox();e&&a&&n(o(t,e,a),r(t,e,a))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,a=this.getBox();if(!t)return;let i=o(t,a.width,a.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let r=e.target.dataset.ord,h=e.clientX,l=e.clientY,s=i.x,d=i.y;if(r){let t=e.clientX-a.x,n=e.clientY-a.y,o=0,c=0;"ne"===r||"e"==r?(o=t-(i.x+i.width),c=n-i.y,s=i.x,d=i.y+i.height):"se"===r||"s"===r?(o=t-(i.x+i.width),c=n-(i.y+i.height),s=i.x,d=i.y):"sw"===r||"w"==r?(o=t-i.x,c=n-(i.y+i.height),s=i.x+i.width,d=i.y):("nw"===r||"n"==r)&&(o=t-i.x,c=n-i.y,s=i.x+i.width,d=i.y+i.height),h=s+a.x+o,l=d+a.y+c}this.evData={startClientX:h,startClientY:l,startCropX:s,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!!r,ord:r},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:a,keepSelection:i,onChange:h}=this.props,l=this.getBox();if(n||a||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-l.x,d=e.clientY-l.y,c={unit:"px",x:s,y:d,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,h(o(c,l.width,l.height),r(c,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:n,disabled:a,onChange:h,onDragStart:l}=this.props,s=this.getBox();if(a||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:d}=this;d.clientX=e.clientX,d.clientY=e.clientY,i(n,t=d.isResize?this.resizeCrop():this.dragCrop())||h(o(t,s.width,s.height),r(t,s.width,s.height))};onComponentKeyDown=t=>{let{crop:n,disabled:i,onChange:h,onComplete:l}=this.props;if(i)return;let s=t.key,d=!1;if(!n)return;let c=this.getBox(),u=this.makePixelCrop(c),g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===s?(u.x-=g,d=!0):"ArrowRight"===s?(u.x+=g,d=!0):"ArrowUp"===s?(u.y-=g,d=!0):"ArrowDown"===s&&(u.y+=g,d=!0),d){t.cancelable&&t.preventDefault(),u.x=a(u.x,0,c.width-u.width),u.y=a(u.y,0,c.height-u.height);let e=o(u,c.width,c.height),n=r(u,c.width,c.height);h(e,n),l&&l(e,n)}};onHandlerKeyDown=(t,n)=>{var a,l;let s,{aspect:d=0,crop:c,disabled:u,minWidth:g=0,minHeight:p=0,maxWidth:m,maxHeight:w,onChange:f,onComplete:y}=this.props,x=this.getBox();if(u||!c||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let v=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,b=h((a=o(c,x.width,x.height),l=t.key,s={...a},"ArrowLeft"===l?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"w"===n?(s.x-=v,s.width+=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"e"===n?s.width-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowRight"===l&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"w"===n?(s.x+=v,s.width-=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"e"===n?s.width+=v:"se"===n&&(s.width+=v,s.height+=v)),"ArrowUp"===l?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"n"===n?(s.y-=v,s.height+=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"s"===n?s.height-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowDown"===l&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"n"===n?(s.y+=v,s.height-=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"s"===n?s.height+=v:"se"===n&&(s.width+=v,s.height+=v)),s),d,n,x.width,x.height,g,p,m,w);if(!i(c,b)){let e=r(b,x.width,x.height);f(b,e),y&&y(b,e)}};onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:a,onDragEnd:i}=this.props,h=this.getBox();this.unbindDocMove(),!(n||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),a&&a(o(t,h.width,h.height),r(t,h.width,h.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),i=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return n.x=a(e.startCropX+i,0,t.width-n.width),n.y=a(e.startCropY+r,0,t.height-n.height),n}getPointRegion(e,t,n,a){let{evData:i}=this,r=i.clientX-e.x,o=i.clientY-e.y,h;return h=a&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:r<i.startCropX)?h?"nw":"sw":h?"ne":"se"}resolveMinDimensions(e,t,n=0,a=0){let i=Math.min(n,e.width),r=Math.min(a,e.height);return t&&(i||r)?t>1?i?[i,i/t]:[r*t,r]:r?[r*t,r]:[i,i/t]:[i,r]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:i,maxHeight:r}=this.props,o=this.getBox(),[l,s]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight),d=this.makePixelCrop(o),c=this.getPointRegion(o,t.ord,l,s),u=t.ord||c,g=t.clientX-t.startClientX,p=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(g=Math.min(g,-l)),(s&&"nw"===u||"n"===u||"ne"===u)&&(p=Math.min(p,-s));let m={unit:"px",x:0,y:0,width:0,height:0};"ne"===c?(m.x=t.startCropX,m.width=g,n?m.height=m.width/n:m.height=Math.abs(p),m.y=t.startCropY-m.height):"se"===c?(m.x=t.startCropX,m.y=t.startCropY,m.width=g,n?m.height=m.width/n:m.height=p):"sw"===c?(m.x=t.startCropX+g,m.y=t.startCropY,m.width=Math.abs(g),n?m.height=m.width/n:m.height=p):"nw"===c&&(m.x=t.startCropX+g,m.width=Math.abs(g),n?(m.height=m.width/n,m.y=t.startCropY-m.height):(m.height=Math.abs(p),m.y=t.startCropY+p));let w=h(m,n,c,o.width,o.height,l,s,i,r);return n||e.xyOrds.indexOf(u)>-1?d=w:e.xOrds.indexOf(u)>-1?(d.x=w.x,d.width=w.width):e.yOrds.indexOf(u)>-1&&(d.y=w.y,d.height=w.height),d.x=a(d.x,0,o.width-d.width),d.y=a(d.y,0,o.height-d.height),d}renderCropSelection(){let{ariaLabels:n=e.defaultProps.ariaLabels,disabled:a,locked:i,renderSelectionAddon:r,ruleOfThirds:o,crop:h}=this.props,l=this.getCropStyle();if(h)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":n.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!a&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":n.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":n.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":n.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":n.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":n.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":n.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":n.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":n.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...n,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:n,circularCrop:a,className:i,crop:r,disabled:o,locked:h,style:l,ruleOfThirds:s}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,u=r?this.renderCropSelection():null,g=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",h&&"ReactCrop--locked",c&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&a&&"ReactCrop--circular-crop",r&&s&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",a&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:g,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),r?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"}),a?t.default.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,d],232660);let c={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,n){super(e,void 0===n?void 0:{cause:n}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let g=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),p=new Set(["mif1","msf1","mif2"]),m=new Set(["avif","avis"]);function w(e,t,n=c){let a=Math.min(1,n.maxLongEdge/Math.max(e,t),Math.sqrt(n.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a)),scale:a}}async function f(e){let t,n;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let a=await (t=URL.createObjectURL(e),(n=new Image).decoding="async",new Promise((e,a)=>{n.onload=()=>e(n),n.onerror=()=>a(Error("IMAGE_ELEMENT_DECODE_FAILED")),n.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!a.naturalWidth||!a.naturalHeight)throw Error("IMAGE_EMPTY");return a}async function y(t){let{heicTo:n}=await e.A(462684);return n({blob:t,type:"image/jpeg",quality:.95})}function x(e,t){return new Promise((n,a)=>{e.toBlob(e=>e?n(e):a(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function v(e,t,n,a,i,r,o){let h,l=((h=document.createElement("canvas")).width=r,h.height=o,h),s=l.getContext("2d");if(!s)throw Error("CANVAS_UNSUPPORTED");return s.fillStyle="#ffffff",s.fillRect(0,0,r,o),s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",s.drawImage(e,t,n,a,i,0,0,r,o),l}async function b(e,t){var n;let a,i=performance.now(),r=await e.arrayBuffer(),o=performance.now()-i,h=function(e){let t=(t,n)=>String.fromCharCode(...e.subarray(t,n));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let n=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),a=[t(8,12)];for(let e=16;e+4<=n;e+=4)a.push(t(e,e+4));if(a.some(e=>g.has(e)))return"heic";if(a.some(e=>m.has(e)))return"avif";if(a.some(e=>p.has(e)))return"heic"}return"unknown"}(new Uint8Array(r,0,Math.min(r.byteLength,64))),l=e.type||"",s=performance.now(),d="native",c=new Blob([r],{type:l||"application/octet-stream"});try{a=await f(c)}catch(e){if("heic"!==h)throw new u("unknown"===h?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",h,e);t?.();try{a=await f(await y(c)),d="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",h,e)}}let{width:b,height:C}=(n=a)instanceof HTMLImageElement?{width:n.naturalWidth,height:n.naturalHeight}:{width:n.width,height:n.height};if(!b||!C)throw new u("IMAGE_DECODE_FAILED",h);let D=w(b,C,{maxLongEdge:1600,maxPixels:1/0}),M=await x(v(a,0,0,b,C,D.width,D.height),.85),E=URL.createObjectURL(M),R=performance.now()-s;return{source:a,width:b,height:C,format:h,decoder:d,previewUrl:E,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(R)},dispose:()=>{URL.revokeObjectURL(E),a instanceof HTMLImageElement||a.close()}}}let C={x:0,y:0,width:1,height:1};async function D(e,t=C,n=c){var a;let i=performance.now(),r=e=>Math.min(1,Math.max(0,e)),o=Math.round(r(t.x)*e.width),h=Math.round(r(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(r(t.width)*e.width))),s=Math.max(1,Math.min(e.height-h,Math.round(r(t.height)*e.height))),d=w(l,s,n),u=v(e.source,o,h,l,s,d.width,d.height),g=performance.now()-i,p=performance.now(),m=n.startQuality,f=await x(u,m);for(let t=0;f.size>n.maxBytes&&t<12;t++)m-.05>=n.minQuality-1e-9?m=Math.round((m-.05)*100)/100:(d={width:Math.max(1,Math.floor(.85*d.width)),height:Math.max(1,Math.floor(.85*d.height)),scale:.85*d.scale},u=v(e.source,o,h,l,s,d.width,d.height)),f=await x(u,m);return{dataUrl:await (a=f,new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error??Error("READ_FAILED")),n.readAsDataURL(a)})),width:d.width,height:d.height,bytes:f.size,quality:m,timings:{crop:Math.round(g),compress:Math.round(performance.now()-p)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,b,"X",0,D],213761)},61425,e=>{var t=e.i(303163);e.s(["f",0,function(e,n){let a=n.common?.messages?.analysisFailed||"Analysis failed, please try again",i=(0,t.d)(e);if(i){let e=n.errors??{};if(!(i in e))return i;let t=e[i];return"string"==typeof t?t:a}let r=(0,t.Z)(e);if(r.includes("fetch")||r.includes("network"))return n.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`${a} (${t})`}return a}])},810104,e=>{var t=e.i(213761);function n(e,t=.008){let a=Math.max(0,e.x-t),i=Math.max(0,e.y-t);return{x:a,y:i,width:Math.min(1,e.x+e.width+t)-a,height:Math.min(1,e.y+e.height+t)-i}}async function a(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 i(e,n){let a=function(e,t=16,n=!1){let a=Math.max(...e.map(e=>e.width)),i=0,r=e.map(e=>{let r=n?a/e.width:e.scale??1,o={x:0,y:i,width:Math.round(e.width*r),height:Math.round(e.height*r)};return i+=o.height+t,o});return{width:Math.max(...r.map(e=>e.width)),height:i-t,rects:r}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,n),i=document.createElement("canvas");i.width=a.width,i.height=a.height;let r=i.getContext("2d");if(!r)throw Error("CANVAS_UNSUPPORTED");r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height),e.forEach((e,t)=>{let n=a.rects[t];r.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,n.x,n.y,n.width,n.height)});let o=await createImageBitmap(i);try{return await (0,t.X)({source:o,width:i.width,height:i.height})}finally{o.close()}}async function r(e,a){let r=e.naturalWidth,o=e.naturalHeight,h=a.map(e=>n(e));return 1===h.length?(0,t.X)({source:e,width:r,height:o},h[0]):i(h.map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*o),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*o))})),!1)}async function o(e){return i((await Promise.all(e.map(a))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function h(e,t,a){let r=e.naturalWidth,o=e.naturalHeight,h=a.width/r,l=t.map(e=>n(e)).map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*o),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*o)),scale:h}));return l.push({source:a.source,sx:0,sy:0,sw:a.width,sh:a.height}),i(l,!1)}e.s(["y",0,a,"k",0,h,"M",0,r,"v",0,o])},575557,e=>{var t=e.i(41931),n=e.i(116331);async function a(e){let t;for(let n=0;n<3;n++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===n)break;await new Promise(e=>setTimeout(e,1e3*(n+1)))}throw t}async function i(e,r=(0,n.c)()){let{batch:o}=await a(()=>t.k.post("/api/import-batches",{...e,clientRequestId:r,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4}));return(0,n.P)(),o}async function r(e,n={}){let a=n.image?"?include=image":"",{batch:i}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${a}`);return i}async function o(e,n,a){let{batch:i}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:n,draft:a});return i}async function h(e,i,r){let{batch:o}=await a(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:i,images:r},{timeout:12e4}));return(0,n.P)(),o}async function l(e){let{batch:a}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,n.P)(),a}async function s(e){let a=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,n.P)(),a}async function d(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,n.P)()}async function c(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,n.P)()}async function u(e,n){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:n},{timeout:6e5,recoverable:!0})}e.s(["J",0,s,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,i,"o",0,d,"w",0,r,"$",0,u,"f",0,c,"s",0,l,"S",0,o,"g",0,h])},364002,e=>{var t=e.i(41931);async function n(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function a(e,n){let a=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,subjectId:n.subjectId||void 0,subjectName:n.subjectId?void 0:e.subject,originalImageUrl:n.imageUrl||"",paperLevel:n.paperLevel||void 0});return{id:a.id,shortId:a.shortId??null,subjectId:a.subjectId??null,notebookName:a.subject?.name??null,duplicate:a.duplicate}}e.i(201276),e.s(["x",0,n,"a",0,a],364002)},825624,e=>{let t=/^[\s ]+/,n="一二三四五六七八九十",a=[{family:"dot",pattern:/^(\d{1,3})\s*[..](?!\d)\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function i(e){let i=e.replace(t,"");for(let{family:e,pattern:t}of a){let a=i.match(t);if(!a||i.length<=a[0].length)continue;let r=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?n.indexOf(e)+1:10*(0===t?1:n.indexOf(e[0])+1)+(t===e.length-1?0:n.indexOf(e[t+1])+1)}(a[1]);if(Number.isFinite(r)&&!(r<=0))return{value:r,family:e,prefixLength:a[0].length,label:a[1]}}return null}function r(e){let t=[];for(let n of e)(n||0!==t.length&&""!==t[t.length-1])&&t.push(n);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let o=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,h=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,l=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,s=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,d=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,c=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,u=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function g(e){let t=[],n=[];for(let a of e)a?n.push(a):n.length&&(t.push(n.join("\n")),n=[]);return n.length&&t.push(n.join("\n")),t}function p(e,t){let n=[];for(let a=0;a<e.length;a++){let i=e[a],r=[i];for(let n=a+1;n<e.length;n++){let a=e[n],o=r[r.length-1];if(a.family!==i.family)continue;let h=1===a.value&&[...t].some(e=>e>o.line&&e<a.line);(a.value===o.value+1||h)&&r.push(a)}r.length>n.length&&(n=r)}return n}function m(e,t,n){return!!s.test(e)||!!t&&"cn"===t.family&&"cn"!==n&&null!==n&&(e.length<=40||d.test(e.slice(0,20)))}function w(e){let t=e.match(c);if(!t)return null;let n=Number(t[1]),a=Number(t[2]);return n<=a?{from:n,to:a}:null}e.s(["S",0,60,"i",0,2e4,"J",0,function(e,n={}){let a=e.length>2e4,d=e.slice(0,2e4).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),f=d.map(e=>e?i(e):null),y=d.length;for(let e=0;e<d.length;e++)if(l.test(d[e])){y=e;break}let x=[],v=[];for(let e=0;e<y;e++){let t=f[e];t&&("cn"===t.family?v:x).push({...t,line:e})}let b=new Set;for(let e=0;e<y;e++)(s.test(d[e])||f[e]?.family==="cn")&&b.add(e);let C=p(x,b);if(C.length<2){let e=p(v,new Set);e.length>=2&&(C=e)}let D=r(d.slice(0,y)),M=y<d.length?g(d.slice(y)):[],E=e=>({questions:D?[{label:null,text:D,material:null,section:null}]:[],ignored:M,detected:!1,ambiguous:e,candidateCount:e?C.length:+!!D,overflow:0,tooLong:a});if(C.length<2)return E(!1);let R=C[0].family;if(!n.forceNumbered&&function(e,t,n,a){let i=null;for(let r=t-1;r>=0;r--)if(e[r]){i=m(e[r],a[r],n)?null:e[r];break}return!(!i||o.test(i)||c.test(i))&&("paren"===n?i.length>=15||/[。?!?!::,,;;]$/.test(i):/[::]$/.test(i)&&u.test(i))}(d,C[0].line,R,f))return E(!0);let k=new Set(C.map(e=>e.line)),I=[],P=[],_=null,S=[],$=[],A=(e,t)=>{for(let n of g(e))(!o.test(n)||!(n.length<80))&&(h.test(n)||n.length>=80&&/[。!?.!?;;]/.test(n))?S.push({text:n,range:w(n)}):t?I.push(n):_&&!P.some(e=>e.section===_)?_=`${_}
|
|
6
|
+
Defaulting to \`null\`.`}s(f,"defaultGetValueLabel"),s(y,"getProgressState"),s(x,"isNumber"),s(v,"isValidMaxNumber"),s(b,"isValidValueNumber"),s(C,"getInvalidMaxError"),s(D,"getInvalidValueError");var M=e.i(975157);let E=r.forwardRef(({className:e,value:t,...n},a)=>(0,i.jsx)(m,{ref:a,value:t,className:(0,M.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:(0,i.jsx)(w,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));E.displayName=m.displayName,e.s(["f",0,E],168148)},328623,e=>{var t=e.i(456420);let n={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};n.node;let a=(0,t.f)(n);e.s(["f",0,a],328623)},232660,213761,e=>{var t=e.i(271645),n={x:0,y:0,width:0,height:0,unit:"px"},a=(e,t,n)=>Math.min(Math.max(e,t),n),i=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function r(e,t,a){return"%"===e.unit?{...n,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/a*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/a*100:0}}function o(e,t,a){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*a/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*a/100:0}:{...n,...e,unit:"px"}}function h(e,t,n,a,i,r=0,o=0,l=a,s=i){let d={...e},c=Math.min(r,a),u=Math.min(o,i),g=Math.min(l,a),p=Math.min(s,i);t&&(t>1?(u=(c=o?o*t:c)/t,g=l*t):(c=(u=r?r/t:u)*t,p=s/t)),d.y<0&&(d.height=Math.max(d.height+d.y,u),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);let m=a-(d.x+d.width);m<0&&(d.x=Math.min(d.x,a-c),d.width+=m);let w=i-(d.y+d.height);if(w<0&&(d.y=Math.min(d.y,i-u),d.height+=w),d.width<c&&(("sw"===n||"nw"==n)&&(d.x-=c-d.width),d.width=c),d.height<u&&(("nw"===n||"ne"==n)&&(d.y-=u-d.height),d.height=u),d.width>g&&(("sw"===n||"nw"==n)&&(d.x-=g-d.width),d.width=g),d.height>p&&(("nw"===n||"ne"==n)&&(d.y-=p-d.height),d.height=p),t){let e=d.width/d.height;if(e<t){let e=Math.max(d.width/t,u);("nw"===n||"ne"==n)&&(d.y-=e-d.height),d.height=e}else if(e>t){let e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}var l={capture:!0,passive:!1},s=0,d=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${s++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:a,height:i}=e.getBoundingClientRect();return{x:t,y:n,width:a,height:i}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:a}=this.getBox();e&&a&&n(o(t,e,a),r(t,e,a))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,l),this.document.addEventListener("pointerup",this.onDocPointerDone,l),this.document.addEventListener("pointercancel",this.onDocPointerDone,l),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,l),this.document.removeEventListener("pointerup",this.onDocPointerDone,l),this.document.removeEventListener("pointercancel",this.onDocPointerDone,l),!1)}onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,a=this.getBox();if(!t)return;let i=o(t,a.width,a.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let r=e.target.dataset.ord,h=e.clientX,l=e.clientY,s=i.x,d=i.y;if(r){let t=e.clientX-a.x,n=e.clientY-a.y,o=0,c=0;"ne"===r||"e"==r?(o=t-(i.x+i.width),c=n-i.y,s=i.x,d=i.y+i.height):"se"===r||"s"===r?(o=t-(i.x+i.width),c=n-(i.y+i.height),s=i.x,d=i.y):"sw"===r||"w"==r?(o=t-i.x,c=n-(i.y+i.height),s=i.x+i.width,d=i.y):("nw"===r||"n"==r)&&(o=t-i.x,c=n-i.y,s=i.x+i.width,d=i.y+i.height),h=s+a.x+o,l=d+a.y+c}this.evData={startClientX:h,startClientY:l,startCropX:s,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!!r,ord:r},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:a,keepSelection:i,onChange:h}=this.props,l=this.getBox();if(n||a||i&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let s=e.clientX-l.x,d=e.clientY-l.y,c={unit:"px",x:s,y:d,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:s,startCropY:d,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,h(o(c,l.width,l.height),r(c,l.width,l.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:n,disabled:a,onChange:h,onDragStart:l}=this.props,s=this.getBox();if(a||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,l&&l(e));let{evData:d}=this;d.clientX=e.clientX,d.clientY=e.clientY,i(n,t=d.isResize?this.resizeCrop():this.dragCrop())||h(o(t,s.width,s.height),r(t,s.width,s.height))};onComponentKeyDown=t=>{let{crop:n,disabled:i,onChange:h,onComplete:l}=this.props;if(i)return;let s=t.key,d=!1;if(!n)return;let c=this.getBox(),u=this.makePixelCrop(c),g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===s?(u.x-=g,d=!0):"ArrowRight"===s?(u.x+=g,d=!0):"ArrowUp"===s?(u.y-=g,d=!0):"ArrowDown"===s&&(u.y+=g,d=!0),d){t.cancelable&&t.preventDefault(),u.x=a(u.x,0,c.width-u.width),u.y=a(u.y,0,c.height-u.height);let e=o(u,c.width,c.height),n=r(u,c.width,c.height);h(e,n),l&&l(e,n)}};onHandlerKeyDown=(t,n)=>{var a,l;let s,{aspect:d=0,crop:c,disabled:u,minWidth:g=0,minHeight:p=0,maxWidth:m,maxHeight:w,onChange:f,onComplete:y}=this.props,x=this.getBox();if(u||!c||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let v=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,b=h((a=o(c,x.width,x.height),l=t.key,s={...a},"ArrowLeft"===l?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"w"===n?(s.x-=v,s.width+=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"e"===n?s.width-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowRight"===l&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"w"===n?(s.x+=v,s.width-=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"e"===n?s.width+=v:"se"===n&&(s.width+=v,s.height+=v)),"ArrowUp"===l?"nw"===n?(s.x-=v,s.y-=v,s.width+=v,s.height+=v):"n"===n?(s.y-=v,s.height+=v):"ne"===n?(s.y-=v,s.width+=v,s.height+=v):"sw"===n?(s.x+=v,s.width-=v,s.height-=v):"s"===n?s.height-=v:"se"===n&&(s.width-=v,s.height-=v):"ArrowDown"===l&&("nw"===n?(s.x+=v,s.y+=v,s.width-=v,s.height-=v):"n"===n?(s.y+=v,s.height-=v):"ne"===n?(s.y+=v,s.width-=v,s.height-=v):"sw"===n?(s.x-=v,s.width+=v,s.height+=v):"s"===n?s.height+=v:"se"===n&&(s.width+=v,s.height+=v)),s),d,n,x.width,x.height,g,p,m,w);if(!i(c,b)){let e=r(b,x.width,x.height);f(b,e),y&&y(b,e)}};onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:a,onDragEnd:i}=this.props,h=this.getBox();this.unbindDocMove(),!(n||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,i&&i(e),a&&a(o(t,h.width,h.height),r(t,h.width,h.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),i=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return n.x=a(e.startCropX+i,0,t.width-n.width),n.y=a(e.startCropY+r,0,t.height-n.height),n}getPointRegion(e,t,n,a){let{evData:i}=this,r=i.clientX-e.x,o=i.clientY-e.y,h;return h=a&&t?"nw"===t||"n"===t||"ne"===t:o<i.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:r<i.startCropX)?h?"nw":"sw":h?"ne":"se"}resolveMinDimensions(e,t,n=0,a=0){let i=Math.min(n,e.width),r=Math.min(a,e.height);return t&&(i||r)?t>1?i?[i,i/t]:[r*t,r]:r?[r*t,r]:[i,i/t]:[i,r]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:i,maxHeight:r}=this.props,o=this.getBox(),[l,s]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight),d=this.makePixelCrop(o),c=this.getPointRegion(o,t.ord,l,s),u=t.ord||c,g=t.clientX-t.startClientX,p=t.clientY-t.startClientY;(l&&"nw"===u||"w"===u||"sw"===u)&&(g=Math.min(g,-l)),(s&&"nw"===u||"n"===u||"ne"===u)&&(p=Math.min(p,-s));let m={unit:"px",x:0,y:0,width:0,height:0};"ne"===c?(m.x=t.startCropX,m.width=g,n?m.height=m.width/n:m.height=Math.abs(p),m.y=t.startCropY-m.height):"se"===c?(m.x=t.startCropX,m.y=t.startCropY,m.width=g,n?m.height=m.width/n:m.height=p):"sw"===c?(m.x=t.startCropX+g,m.y=t.startCropY,m.width=Math.abs(g),n?m.height=m.width/n:m.height=p):"nw"===c&&(m.x=t.startCropX+g,m.width=Math.abs(g),n?(m.height=m.width/n,m.y=t.startCropY-m.height):(m.height=Math.abs(p),m.y=t.startCropY+p));let w=h(m,n,c,o.width,o.height,l,s,i,r);return n||e.xyOrds.indexOf(u)>-1?d=w:e.xOrds.indexOf(u)>-1?(d.x=w.x,d.width=w.width):e.yOrds.indexOf(u)>-1&&(d.y=w.y,d.height=w.height),d.x=a(d.x,0,o.width-d.width),d.y=a(d.y,0,o.height-d.height),d}renderCropSelection(){let{ariaLabels:n=e.defaultProps.ariaLabels,disabled:a,locked:i,renderSelectionAddon:r,ruleOfThirds:o,crop:h}=this.props,l=this.getCropStyle();if(h)return t.default.createElement("div",{style:l,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":n.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!a&&!i&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":n.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":n.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":n.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":n.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":n.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":n.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":n.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":n.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),o&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return o({...n,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:n,circularCrop:a,className:i,crop:r,disabled:o,locked:h,style:l,ruleOfThirds:s}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,u=r?this.renderCropSelection():null,g=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",h&&"ReactCrop--locked",c&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&a&&"ReactCrop--circular-crop",r&&s&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",a&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:g,style:l},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),r?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"}),a?t.default.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,u)}};e.s(["f",0,d],232660);let c={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class u extends Error{code;format;constructor(e,t,n){super(e,void 0===n?void 0:{cause:n}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let g=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),p=new Set(["mif1","msf1","mif2"]),m=new Set(["avif","avis"]);function w(e,t,n=c){let a=Math.min(1,n.maxLongEdge/Math.max(e,t),Math.sqrt(n.maxPixels/Math.max(1,e*t)));return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(t*a)),scale:a}}async function f(e){let t,n;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let a=await (t=URL.createObjectURL(e),(n=new Image).decoding="async",new Promise((e,a)=>{n.onload=()=>e(n),n.onerror=()=>a(Error("IMAGE_ELEMENT_DECODE_FAILED")),n.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!a.naturalWidth||!a.naturalHeight)throw Error("IMAGE_EMPTY");return a}async function y(t){let{heicTo:n}=await e.A(462684);return n({blob:t,type:"image/jpeg",quality:.95})}function x(e,t){return new Promise((n,a)=>{e.toBlob(e=>e?n(e):a(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function v(e,t,n,a,i,r,o){let h,l=((h=document.createElement("canvas")).width=r,h.height=o,h),s=l.getContext("2d");if(!s)throw Error("CANVAS_UNSUPPORTED");return s.fillStyle="#ffffff",s.fillRect(0,0,r,o),s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",s.drawImage(e,t,n,a,i,0,0,r,o),l}async function b(e,t){var n;let a,i=performance.now(),r=await e.arrayBuffer(),o=performance.now()-i,h=function(e){let t=(t,n)=>String.fromCharCode(...e.subarray(t,n));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let n=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),a=[t(8,12)];for(let e=16;e+4<=n;e+=4)a.push(t(e,e+4));if(a.some(e=>g.has(e)))return"heic";if(a.some(e=>m.has(e)))return"avif";if(a.some(e=>p.has(e)))return"heic"}return"unknown"}(new Uint8Array(r,0,Math.min(r.byteLength,64))),l=e.type||"",s=performance.now(),d="native",c=new Blob([r],{type:l||"application/octet-stream"});try{a=await f(c)}catch(e){if("heic"!==h)throw new u("unknown"===h?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",h,e);t?.();try{a=await f(await y(c)),d="heic"}catch(e){throw new u("HEIC_DECODE_FAILED",h,e)}}let{width:b,height:C}=(n=a)instanceof HTMLImageElement?{width:n.naturalWidth,height:n.naturalHeight}:{width:n.width,height:n.height};if(!b||!C)throw new u("IMAGE_DECODE_FAILED",h);let D=w(b,C,{maxLongEdge:1600,maxPixels:1/0}),M=await x(v(a,0,0,b,C,D.width,D.height),.85),E=URL.createObjectURL(M),R=performance.now()-s;return{source:a,width:b,height:C,format:h,decoder:d,previewUrl:E,sourceType:l,sourceBytes:e.size,timings:{read:Math.round(o),convert:Math.round(R)},dispose:()=>{URL.revokeObjectURL(E),a instanceof HTMLImageElement||a.close()}}}let C={x:0,y:0,width:1,height:1};async function D(e,t=C,n=c){var a;let i=performance.now(),r=e=>Math.min(1,Math.max(0,e)),o=Math.round(r(t.x)*e.width),h=Math.round(r(t.y)*e.height),l=Math.max(1,Math.min(e.width-o,Math.round(r(t.width)*e.width))),s=Math.max(1,Math.min(e.height-h,Math.round(r(t.height)*e.height))),d=w(l,s,n),u=v(e.source,o,h,l,s,d.width,d.height),g=performance.now()-i,p=performance.now(),m=n.startQuality,f=await x(u,m);for(let t=0;f.size>n.maxBytes&&t<12;t++)m-.05>=n.minQuality-1e-9?m=Math.round((m-.05)*100)/100:(d={width:Math.max(1,Math.floor(.85*d.width)),height:Math.max(1,Math.floor(.85*d.height)),scale:.85*d.scale},u=v(e.source,o,h,l,s,d.width,d.height)),f=await x(u,m);return{dataUrl:await (a=f,new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error??Error("READ_FAILED")),n.readAsDataURL(a)})),width:d.width,height:d.height,bytes:f.size,quality:m,timings:{crop:Math.round(g),compress:Math.round(performance.now()-p)}}}e.s(["o",0,u,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,b,"X",0,D],213761)},499930,e=>{var t=e.i(213761);function n(e,t=.008){let a=Math.max(0,e.x-t),i=Math.max(0,e.y-t);return{x:a,y:i,width:Math.min(1,e.x+e.width+t)-a,height:Math.min(1,e.y+e.height+t)-i}}async function a(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 i(e,n){let a=function(e,t=16,n=!1){let a=Math.max(...e.map(e=>e.width)),i=0,r=e.map(e=>{let r=n?a/e.width:e.scale??1,o={x:0,y:i,width:Math.round(e.width*r),height:Math.round(e.height*r)};return i+=o.height+t,o});return{width:Math.max(...r.map(e=>e.width)),height:i-t,rects:r}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,n),i=document.createElement("canvas");i.width=a.width,i.height=a.height;let r=i.getContext("2d");if(!r)throw Error("CANVAS_UNSUPPORTED");r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height),e.forEach((e,t)=>{let n=a.rects[t];r.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,n.x,n.y,n.width,n.height)});let o=await createImageBitmap(i);try{return await (0,t.X)({source:o,width:i.width,height:i.height})}finally{o.close()}}async function r(e,a){let r=e.naturalWidth,o=e.naturalHeight,h=a.map(e=>n(e));return 1===h.length?(0,t.X)({source:e,width:r,height:o},h[0]):i(h.map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*o),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*o))})),!1)}async function o(e){return i((await Promise.all(e.map(a))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function h(e,t,a){let r=e.naturalWidth,o=e.naturalHeight,h=a.width/r,l=t.map(e=>n(e)).map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*o),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*o)),scale:h}));return l.push({source:a.source,sx:0,sy:0,sw:a.width,sh:a.height}),i(l,!1)}e.s(["y",0,a,"k",0,h,"M",0,r,"v",0,o])},119472,e=>{var t=e.i(41931),n=e.i(127175);async function a(e){let t;for(let n=0;n<3;n++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===n)break;await new Promise(e=>setTimeout(e,1e3*(n+1)))}throw t}async function i(e,r=(0,n.c)()){let{batch:o}=await a(()=>t.k.post("/api/import-batches",{...e,clientRequestId:r,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0},{timeout:12e4}));return(0,n.P)(),o}async function r(e,n={}){let a=n.image?"?include=image":"",{batch:i}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${a}`);return i}async function o(e,n,a){let{batch:i}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:n,draft:a});return i}async function h(e,i,r){let{batch:o}=await a(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:i,images:r},{timeout:12e4}));return(0,n.P)(),o}async function l(e){let{batch:a}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,n.P)(),a}async function s(e){let a=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,n.P)(),a}async function d(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,n.P)()}async function c(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,n.P)()}async function u(e,n){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:n},{timeout:6e5,recoverable:!0})}e.s(["J",0,s,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,i,"o",0,d,"w",0,r,"$",0,u,"f",0,c,"s",0,l,"S",0,o,"g",0,h])},25197,e=>{var t=e.i(41931);async function n(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function a(e,n){let a=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:e.answerText,analysis:e.analysis,wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,subjectId:n.subjectId||void 0,subjectName:n.subjectId?void 0:e.subject,originalImageUrl:n.imageUrl||"",paperLevel:n.paperLevel||void 0});return{id:a.id,shortId:a.shortId??null,subjectId:a.subjectId??null,notebookName:a.subject?.name??null,duplicate:a.duplicate}}e.i(201276),e.s(["x",0,n,"a",0,a],25197)},825624,e=>{let t=/^[\s ]+/,n="一二三四五六七八九十",a=[{family:"dot",pattern:/^(\d{1,3})\s*[..](?!\d)\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function i(e){let i=e.replace(t,"");for(let{family:e,pattern:t}of a){let a=i.match(t);if(!a||i.length<=a[0].length)continue;let r=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?n.indexOf(e)+1:10*(0===t?1:n.indexOf(e[0])+1)+(t===e.length-1?0:n.indexOf(e[t+1])+1)}(a[1]);if(Number.isFinite(r)&&!(r<=0))return{value:r,family:e,prefixLength:a[0].length,label:a[1]}}return null}function r(e){let t=[];for(let n of e)(n||0!==t.length&&""!==t[t.length-1])&&t.push(n);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let o=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,h=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,l=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,s=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,d=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,c=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,u=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function g(e){let t=[],n=[];for(let a of e)a?n.push(a):n.length&&(t.push(n.join("\n")),n=[]);return n.length&&t.push(n.join("\n")),t}function p(e,t){let n=[];for(let a=0;a<e.length;a++){let i=e[a],r=[i];for(let n=a+1;n<e.length;n++){let a=e[n],o=r[r.length-1];if(a.family!==i.family)continue;let h=1===a.value&&[...t].some(e=>e>o.line&&e<a.line);(a.value===o.value+1||h)&&r.push(a)}r.length>n.length&&(n=r)}return n}function m(e,t,n){return!!s.test(e)||!!t&&"cn"===t.family&&"cn"!==n&&null!==n&&(e.length<=40||d.test(e.slice(0,20)))}function w(e){let t=e.match(c);if(!t)return null;let n=Number(t[1]),a=Number(t[2]);return n<=a?{from:n,to:a}:null}e.s(["S",0,60,"i",0,2e4,"J",0,function(e,n={}){let a=e.length>2e4,d=e.slice(0,2e4).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),f=d.map(e=>e?i(e):null),y=d.length;for(let e=0;e<d.length;e++)if(l.test(d[e])){y=e;break}let x=[],v=[];for(let e=0;e<y;e++){let t=f[e];t&&("cn"===t.family?v:x).push({...t,line:e})}let b=new Set;for(let e=0;e<y;e++)(s.test(d[e])||f[e]?.family==="cn")&&b.add(e);let C=p(x,b);if(C.length<2){let e=p(v,new Set);e.length>=2&&(C=e)}let D=r(d.slice(0,y)),M=y<d.length?g(d.slice(y)):[],E=e=>({questions:D?[{label:null,text:D,material:null,section:null}]:[],ignored:M,detected:!1,ambiguous:e,candidateCount:e?C.length:+!!D,overflow:0,tooLong:a});if(C.length<2)return E(!1);let R=C[0].family;if(!n.forceNumbered&&function(e,t,n,a){let i=null;for(let r=t-1;r>=0;r--)if(e[r]){i=m(e[r],a[r],n)?null:e[r];break}return!(!i||o.test(i)||c.test(i))&&("paren"===n?i.length>=15||/[。?!?!::,,;;]$/.test(i):/[::]$/.test(i)&&u.test(i))}(d,C[0].line,R,f))return E(!0);let k=new Set(C.map(e=>e.line)),I=[],P=[],_=null,S=[],$=[],A=(e,t)=>{for(let n of g(e))(!o.test(n)||!(n.length<80))&&(h.test(n)||n.length>=80&&/[。!?.!?;;]/.test(n))?S.push({text:n,range:w(n)}):t?I.push(n):_&&!P.some(e=>e.section===_)?_=`${_}
|
|
7
7
|
${n}`:I.push(n)},N=C[0].line,L=[];for(let e=0;e<N;e++)d[e]&&m(d[e],f[e],R)?(A(L.splice(0),!0),_=d[e],$=[]):L.push(d[e]);A(L,!0);for(let e=0;e<C.length;e++){let n=C[e].line,a=e+1<C.length?C[e+1].line:y;S.length&&($=[...$.filter(e=>e.range),...S],S=[]);let o=a,l=null;for(let e=n+1;e<a;e++)if(d[e]&&!k.has(e)&&m(d[e],f[e],R)){o=e,l=d[e];break}let s=d.slice(n,o),c=g(s),u=[];for(;c.length>1&&h.test(c[c.length-1].slice(0,30));)u.unshift(c.pop());let p=u.length?c.join("\n"):r(s),x=C[e].value,v=$.filter(e=>!e.range||x>=e.range.from&&x<=e.range.to);for(let n of(P.push({label:C[e].label,text:function(e){let n=e.split("\n"),a=n[0]?.replace(t,"")??"",r=i(a);return r&&"cn"!==r.family&&(n[0]=a.slice(r.prefixLength)),n.join("\n")}(p),material:v.length?v.map(e=>e.text).join("\n\n"):null,section:_}),u))S.push({text:n,range:w(n)});null!==l&&(_=l,$=[],A(d.slice(o+1,a),!1))}let O=P.slice(60);return{questions:P.slice(0,60),ignored:[...I,...M,...O.map(e=>{var t;let n,a;return n=(t=e).text.trim(),(a=t.material?.trim())?`${a}
|
|
8
8
|
|
|
9
|
-
${n}`:n})],detected:!0,ambiguous:!1,candidateCount:P.length,overflow:O.length,tooLong:a}}])}])})();
|
|
9
|
+
${n}`:n})],detected:!0,ambiguous:!1,candidateCount:P.length,overflow:O.length,tooLong:a}}])},767077,e=>{var t=e.i(303163);e.s(["f",0,function(e,n){let a=n.common?.messages?.analysisFailed||"Analysis failed, please try again",i=(0,t.d)(e);if(i){let e=n.errors??{};if(!(i in e))return i;let t=e[i];return"string"==typeof t?t:a}let r=(0,t.Z)(e);if(r.includes("fetch")||r.includes("network"))return n.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`${a} (${t})`}return a}])}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,711241,e=>{var t=e.i(456420);let a={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],711241)},474544,e=>{var t=e.i(456420);let a={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],474544)},444594,e=>{var t=e.i(456420);let a={name:"inbox",size:24,node:[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],444594)},218964,e=>{var t=e.i(456420);let a={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],218964)},77043,e=>{var t=e.i(456420);let a={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],77043)},566595,e=>{var t=e.i(456420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],566595)},328623,e=>{var t=e.i(456420);let a={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"]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],328623)},786563,e=>{var t=e.i(456420);let a={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"}]]};a.node;let s=(0,t.f)(a);e.s(["f",0,s],786563)},198591,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(618566),r=e.i(519455),i=e.i(393842),n=e.i(86963),l=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 f=(0,o.f)(h);var x=e.i(444594),p=e.i(218964),g=e.i(77043),b=e.i(566595),j=e.i(666696),y=e.i(716327);let v={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"]};v.node;let k=(0,o.f)(v);var w=e.i(755146),N=e.i(111110);function S({mastery:e,timeRange:a,onMasteryChange:s,onTimeRangeChange:i}){let{t:n}=(0,N.b)(),l=[{value:"all",label:n.filter.all||"All"},{value:"new",label:n.filter.review||"To Review"},{value:"reviewing",label:n.filter.reviewing||"Reviewing"},{value:"mastered",label:n.filter.mastered||"Mastered"}],o=[{value:"all",label:n.filter.allTime||"All Time"},{value:"week",label:n.filter.lastWeek||"Last Week"},{value:"month",label:n.filter.lastMonth||"Last Month"}];return(0,t.jsxs)(w.G,{children:[(0,t.jsx)(w.X,{asChild:!0,children:(0,t.jsxs)(r.f,{variant:"outline",size:"sm",className:"h-10",children:[(0,t.jsx)(k,{className:"mr-2 h-4 w-4"}),n.notebook.filter,(0,t.jsx)(y.f,{className:"ml-2 h-4 w-4"})]})}),(0,t.jsxs)(w.L,{align:"end",className:"w-48",children:[(0,t.jsx)(w.B,{children:n.filter.masteryStatus||"Mastery Status"}),l.map(({value:a,label:r})=>(0,t.jsxs)(w.r,{onClick:()=>s(a),children:[e===a&&"✓ ",r]},a)),(0,t.jsx)(w.U,{}),(0,t.jsx)(w.B,{children:n.filter.timeRange||"Time Range"}),o.map(({value:e,label:s})=>(0,t.jsxs)(w.r,{onClick:()=>i(e),children:[a===e&&"✓ ",s]},e))]})]})}var C=e.i(470279);function R({value:e,onChange:a}){let{t:s}=(0,N.b)(),{groups:i,loading:n}=(0,C.f)(),l=i.filter(e=>e.isActive);return n?null:(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(r.f,{variant:"all"===e?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>a("all"),children:s.filter.all||"All"}),l.map(s=>(0,t.jsx)(r.f,{variant:e===s.id?"default":"outline",size:"sm",className:"rounded-full",onClick:()=>a(s.id),children:s.name},s.id))]})}var E=e.i(263676),z=e.i(632781),T=e.i(776639),M=e.i(307364),q=e.i(511445),P=e.i(41931),$=e.i(201276);function F({ids:e}){let{t:s}=(0,N.b)(),[i,n]=(0,a.useState)(!1),[l,o]=(0,a.useState)(null),[c,d]=(0,a.useState)(!1),[u,h]=(0,a.useState)(null),[x,p]=(0,a.useState)(0),[g,b]=e,j=()=>{d(!0),o(null),h(null),p(e=>e+1)};return(0,a.useEffect)(()=>{if(!i||!g||!b)return;let e=!0;return P.k.post("/api/error-items/similarity",{ids:[g,b]}).then(t=>{e&&o(t)}).catch(t=>{e&&(h("Question text is required for similarity comparison"===t?.data?.message?s.questionSimilarity.missingText:s.questionSimilarity.failed),$.V.error("[Similarity]","相似度比较失败",{error:t instanceof Error?t.message:String(t)}))}).finally(()=>{e&&d(!1)}),()=>{e=!1}},[i,g,b,x,s.questionSimilarity.failed,s.questionSimilarity.missingText]),(0,t.jsxs)(T.N,{open:i,onOpenChange:e=>{n(e),e&&j()},children:[(0,t.jsx)(T.a,{asChild:!0,children:(0,t.jsxs)(r.f,{variant:"outline",disabled:2!==e.length,title:s.questionSimilarity.selectTwo,children:[(0,t.jsx)(f,{className:"mr-2 h-4 w-4"}),s.questionSimilarity.title]})}),(0,t.jsxs)(T.d,{className:"w-[calc(100vw-2rem)] sm:max-w-3xl max-h-[85vh] overflow-y-auto",children:[(0,t.jsxs)(T.s,{children:[(0,t.jsx)(T.F,{children:s.questionSimilarity.title}),(0,t.jsx)(T.C,{children:s.questionSimilarity.description})]}),c&&(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm",role:"status",children:[(0,t.jsx)(z.f,{className:"h-4 w-4 animate-spin"}),s.common.loading]}),u&&(0,t.jsx)("p",{className:"text-sm text-destructive",role:"alert",children:u}),u&&(0,t.jsx)(r.f,{variant:"outline",onClick:j,children:s.questionSimilarity.retry}),l&&(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:s.questionSimilarity.score}),(0,t.jsxs)("p",{className:"text-3xl font-bold tabular-nums",children:[Number((100*l.similarity).toFixed(4)),"%"]}),(0,t.jsx)("p",{className:"text-sm",children:s.questionSimilarity.threshold.replace("{threshold}",String(l.threshold))}),(0,t.jsx)("p",{className:"text-sm font-medium",children:l.duplicate?s.questionSimilarity.duplicate:s.questionSimilarity.different})]}),(0,t.jsx)("div",{className:"grid gap-3 sm:grid-cols-2",children:l.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:[s.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)(q.f,{content:e.questionText})})]},e.id))})]}),(0,t.jsx)(M.f,{onSaved:j})]})]})}function A({selectedIds:e,deleting:a,onCancel:s,onDelete:i}){let{t:n}=(0,N.b)();return(0,t.jsx)("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:n.notebook.selectedCount.replace("{count}",String(e.length))}),(0,t.jsx)("p",{className:"text-xs",children:n.questionSimilarity.selectTwo})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(F,{ids:e}),(0,t.jsxs)(r.f,{variant:"outline",onClick:s,children:[(0,t.jsx)(E.X,{className:"mr-2 h-4 w-4"}),n.notebook.cancelSelect]}),(0,t.jsxs)(r.f,{variant:"destructive",onClick:i,disabled:0===e.length||a,children:[(0,t.jsx)(u.f,{className:"mr-2 h-4 w-4"}),n.notebook.deleteSelected]})]})]})})}var L=e.i(215519),_=e.i(306831),D=e.i(967489),I=e.i(597138);let V={1:["一年级"],2:["二年级"],3:["三年级"],4:["四年级"],5:["五年级"],6:["六年级"],7:["七年级上","七年级下","七年级"],8:["八年级上","八年级下","八年级"],9:["九年级上","九年级下","九年级"],10:["高一上","高一下","高一"],11:["高二上","高二下","高二"],12:["高三上","高三下","高三"]};function H({gradeSemester:e,tag:s,subjectName:r,tagSet:i="default",onFilterChange:n,className:l}){let{t:o}=(0,N.b)(),{timeZone:c}=(0,L.M)(),[d,u]=(0,a.useState)(e||""),[m,h]=(0,a.useState)(""),[f,x]=(0,a.useState)(s||""),[p,g]=(0,a.useState)([]),[b,j]=(0,a.useState)(!0),[y,v]=(0,a.useState)([]),[k,w]=(0,a.useState)(e);e!==k&&(w(e),void 0!==e&&u(e));let[S,C]=(0,a.useState)(s);s!==S&&(C(s),void 0!==s&&x(s||""));let R=(0,a.useCallback)((e,t)=>{let a=(0,_.c)(new Date,c),s=a.getFullYear(),r=(a.getMonth()+1>=9?s:s-1)-t+1;return"primary"===e?r:"junior_high"===e?r+6:"senior_high"===e?r+9:0},[c]),E=(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&&R(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=>V[e]||[])},[R]);(0,a.useEffect)(()=>{(async()=>{j(!0);try{let e=await P.k.get("/api/user"),t=E(e.educationStage,e.enrollmentYear);v(t);let a=r?(0,I.f)(r):"math";try{let e=await P.k.get(`/api/tags?subject=${a}&tagSet=${encodeURIComponent(i)}`);g(e.tags)}catch(e){$.V.warn("[KnowledgeFilter]","Failed to fetch tags for subject",{subject:a,tagSet:i,error:e}),g([])}}catch(e){$.V.error("[KnowledgeFilter]","Failed to load filter data",{error:e})}finally{j(!1)}})()},[r,i,E]);let z=p.find(e=>e.name===d),T=z?.children||[],M=T.find(e=>e.name===m),q=e=>0===e.children.length?[e.name]:e.children.flatMap(e=>q(e)),F=M?[...new Set(q(M))]:[],A=y.filter(e=>p.some(t=>t.name===e));return(0,t.jsxs)("div",{className:`flex gap-2 ${l}`,children:[(0,t.jsxs)(D.d,{value:d,onValueChange:e=>{u(e),h(""),x(""),n({gradeSemester:"all"===e?void 0:e,chapter:void 0,tag:void 0})},disabled:b,children:[(0,t.jsx)(D.P,{className:"w-[140px]",children:(0,t.jsx)(D.U,{placeholder:o.filter?.gradeShort||"Grade"})}),(0,t.jsxs)(D.r,{children:[(0,t.jsx)(D.T,{value:"all",children:o.filter?.allGrades||"All grades"}),A.map(e=>(0,t.jsx)(D.T,{value:e,children:e},e))]})]}),(0,t.jsxs)(D.d,{value:m,onValueChange:e=>{h(e),x(""),n({gradeSemester:"all"===d?void 0:d,chapter:"all"===e?void 0:e,tag:void 0})},disabled:!d||"all"===d,children:[(0,t.jsx)(D.P,{className:"w-[180px]",children:(0,t.jsx)(D.U,{placeholder:o.filter?.chapter||"Chapter"})}),(0,t.jsxs)(D.r,{children:[(0,t.jsx)(D.T,{value:"all",children:o.filter?.allChapters||"All chapters"}),T.map(e=>(0,t.jsx)(D.T,{value:e.name,children:e.name.replace(/^第\d+章\s*/,"")},e.id))]})]}),(0,t.jsxs)(D.d,{value:f,onValueChange:e=>{x(e),n({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)(D.P,{className:"w-[140px]",children:(0,t.jsx)(D.U,{placeholder:o.filter?.knowledgePoint||"Tag"})}),(0,t.jsxs)(D.r,{children:[(0,t.jsx)(D.T,{value:"all",children:o.filter?.allKnowledgePoints||"All tags"}),F.map(e=>(0,t.jsx)(D.T,{value:e,children:e},e))]})]})]})}var U=e.i(487486),B=e.i(912505),K=e.i(793479),O=e.i(658512),W=e.i(469817),G=e.i(905110);function X(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),t}var Y=e.i(294114),J=e.i(380935),Q=e.i(164549);function Z({subjectId:e,subjectName:i,tagSet:n="default",initialMastery:l,initialTag:o}){let{t:c}=(0,N.b)(),d=(0,s.useRouter)(),[u,m]=(0,a.useState)([]),[h,y]=(0,a.useState)(!0),[v,k]=(0,a.useState)(""),[w,C]=(0,a.useState)(l??"all"),[E,z]=(0,a.useState)("all"),[T,M]=(0,a.useState)(""),[q,F]=(0,a.useState)(""),[L,_]=(0,a.useState)("all"),[D,I]=(0,a.useState)(o??null),[V,G]=(0,a.useState)(1),ee=W.$,[et,ea]=(0,a.useState)(0),[es,er]=(0,a.useState)(0),[ei,en]=(0,a.useState)(!1),[el,eo]=(0,a.useState)(new Set),[ec,ed]=(0,a.useState)(!1),eu=(0,a.useMemo)(()=>({subjectId:e,search:v,mastery:w,timeRange:E,tag:D,gradeSemester:T,chapter:q,paperLevel:L}),[e,v,w,E,D,T,q,L]),em=()=>{en(!ei),eo(new Set)},eh=(0,a.useCallback)(async()=>{y(!0);try{let e=X(eu);e.append("page",V.toString()),e.append("pageSize",ee.toString());let t=await P.k.get(`/api/error-items/list?${e.toString()}`);m(t.items),ea(t.total),er(t.totalPages)}catch(e){$.V.error("[ErrorList]","Failed to fetch error items",{error:e})}finally{y(!1)}},[eu,V,ee]),ef=async()=>{if(0===el.size)return;let e=(c.notebook?.confirmBatchDelete||"Delete {count} items?").replace("{count}",el.size.toString());if(await (0,Y.u)(e,{destructive:!0})){ed(!0);try{await P.k.post("/api/error-items/batch-delete",{ids:Array.from(el)}),Y.c.success(c.notebook?.batchDeleteSuccess||"Deleted successfully"),en(!1),eo(new Set),eh()}catch(e){$.V.error("[ErrorList]","Batch delete failed",{error:e}),Y.c.error(c.common?.messages?.deleteFailed||"Delete failed")}finally{ed(!1)}}},ex=(0,a.useRef)(eu);return(0,a.useEffect)(()=>{let e=ex.current!==eu;(ex.current=eu,e&&1!==V)?G(1):eh()},[V,eu,eh]),(0,t.jsxs)("div",{className:`space-y-6 ${ei?"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)(K.f,{placeholder:c.notebook.search,title:c.shortId.searchHint,className:"h-10 rounded-xl bg-card pl-9",value:v,onChange:e=>k(e.target.value),onKeyDown:async e=>{let t=v.trim();if("Enter"!==e.key||!(0,Q.f)(t))return;let a=await (0,J.f)(t);a&&d.push(`/error-items/${a}`)}})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,t.jsx)(S,{mastery:w,timeRange:E,onMasteryChange:C,onTimeRangeChange:z}),(0,t.jsxs)(r.f,{variant:"outline",size:"sm",className:"h-10",onClick:()=>d.push(`/print-preview?${X(eu).toString()}`),children:[(0,t.jsx)(g.f,{className:"mr-2 h-4 w-4"}),c.notebook?.exportPrint||"Export for Print"]}),!ei&&(0,t.jsxs)(r.f,{variant:"outline",size:"sm",className:"h-10",onClick:em,children:[(0,t.jsx)(f,{className:"mr-2 h-4 w-4"}),c.questionSimilarity.title]}),(0,t.jsxs)(r.f,{variant:ei?"secondary":"outline",size:"sm",className:"h-10",onClick:em,children:[(0,t.jsx)(p.f,{className:"mr-2 h-4 w-4"}),ei?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)(H,{gradeSemester:T,tag:D,onFilterChange:({gradeSemester:e,chapter:t,tag:a})=>{void 0!==e&&M(e),void 0!==t&&F(t),I(void 0===a?null:a),e?t||F(""):(M(""),F(""),I(null)),G(1)},subjectName:i,tagSet:n})}),(0,t.jsx)(R,{value:L,onChange:_})]}),D&&(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)(U.f,{variant:"secondary",className:"cursor-pointer",onClick:()=>I(null),children:[D,(0,t.jsx)("span",{className:"ml-1 text-xs",children:"×"})]})]}),!h&&0===u.length&&(0,t.jsx)(B.f,{icon:x.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:ei,selected:el.has(e.id),onToggleSelect:()=>{var t;return t=e.id,void eo(e=>{let a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a})},selectedTag:D,onTagClick:e=>I(D===e?null:e)},e.id))}),(0,t.jsx)(O.f,{page:V,totalPages:es,total:et,pageSize:ee,onPageChange:G}),ei&&(0,t.jsx)(A,{selectedIds:[...el],deleting:ec,onCancel:em,onDelete:ef})]})}function ee(e){let r=(0,s.useSearchParams)(),i=(0,a.useMemo)(()=>{let e,t,a;return e={},t=r.get("mastery"),(0,G.A)(t)&&(e.mastery=t),(a=r.get("tag"))&&(e.tag=a),e},[r]);return(0,t.jsx)(Z,{...e,initialMastery:i.mastery,initialTag:i.tag})}function et(e){return(0,t.jsx)(a.Suspense,{fallback:null,children:(0,t.jsx)(ee,{...e})})}var ea=e.i(110204);function es({open:e,onOpenChange:s,currentName:i,onRename:n}){let[l,o]=(0,a.useState)(i),[c,d]=(0,a.useState)(!1),{t:u}=(0,N.b)(),[m,h]=(0,a.useState)(i);i!==m&&(h(i),o(i));let f=async()=>{if(!l.trim())return void Y.c.warning(u.notebooks?.renameDialog?.enterName||"Please enter notebook name");d(!0);try{await n(l.trim()),s(!1)}catch(e){$.V.error("[RenameNotebook]","Failed to rename notebook",{error:e})}finally{d(!1)}};return(0,t.jsx)(T.N,{open:e,onOpenChange:s,children:(0,t.jsxs)(T.d,{children:[(0,t.jsx)(T.s,{children:(0,t.jsx)(T.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)(ea.f,{htmlFor:"rename-name",children:u.notebooks?.renameDialog?.nameLabel||"New Name"}),(0,t.jsx)(K.f,{id:"rename-name",placeholder:u.notebooks?.renameDialog?.placeholder||"Enter new notebook name",value:l,onChange:e=>o(e.target.value),onKeyDown:e=>"Enter"===e.key&&f()})]})}),(0,t.jsxs)(T.c,{children:[(0,t.jsx)(r.f,{variant:"outline",onClick:()=>s(!1),children:u.common.cancel}),(0,t.jsx)(r.f,{onClick:f,disabled:c||!l.trim(),children:c?u.notebooks?.renameDialog?.renaming||"Renaming...":u.notebooks?.renameDialog?.rename||"Rename"})]})]})})}var er=e.i(328623);function ei({notebookId:e,onFinished:s}){let{t:i}=(0,N.b)(),[n,l]=(0,a.useState)(null),[o,c]=(0,a.useState)(null),d=(0,a.useRef)(!1),u=(0,a.useCallback)(()=>{P.k.get(`/api/notebooks/${e}/retag`).then(e=>{d.current&&e&&!e.running&&s?.(),d.current=!!e?.running,l(e)}).catch(()=>void 0)},[e,s]);(0,a.useEffect)(u,[u]),(0,a.useEffect)(()=>{if(!n?.running)return;let e=setTimeout(u,2e3);return()=>clearTimeout(e)},[n,u]);let m=async()=>{if(await (0,Y.u)(i.retag.notebookConfirm)){c(null);try{let t=await P.k.post(`/api/notebooks/${e}/retag`,{});if(0===t.total)return void c(i.retag.empty);d.current=t.running,l(t)}catch{c(i.retag.itemFailed)}}},h=o??(n?.running?i.retag.progress.replace("{done}",String(n.done)).replace("{total}",String(n.total)):n?.finishedAt&&n.total>0?i.retag.finished.replace("{success}",String(n.total-n.failed)).replace("{failed}",String(n.failed)):null);return(0,t.jsxs)("div",{className:"flex flex-col items-start sm:items-end gap-1",children:[(0,t.jsxs)(r.f,{variant:"outline",size:"sm",onClick:m,disabled:n?.running,"aria-label":i.retag.notebookButton,children:[n?.running?(0,t.jsx)(z.f,{className:"h-4 w-4 animate-spin sm:mr-2"}):(0,t.jsx)(er.f,{className:"h-4 w-4 sm:mr-2"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:i.retag.notebookButton})]}),h&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:h})]})}var en=e.i(709830),el=e.i(35209),eo=e.i(303163);e.s(["default",0,function(){let e=(0,s.useParams)(),o=(0,s.useRouter)(),{t:c}=(0,N.b)(),[h,f]=(0,a.useState)(null);(0,el.f)(c.notebooks.title,h?.name);let[x,p]=(0,a.useState)(!0),[g,b]=(0,a.useState)(!1),[j,y]=(0,a.useState)(0),v=(0,a.useCallback)(async e=>{try{let t=await P.k.get(`/api/notebooks/${e}`);f(t)}catch(e){$.V.error("[NotebookDetail]","Failed to fetch notebook",{error:e}),Y.c.error(c.notebooks?.notFound||"Notebook not found"),o.push("/notebooks")}finally{p(!1)}},[o,c]);(0,a.useEffect)(()=>{e.id&&v(e.id)},[e.id,v]);let k=async e=>{h&&f(await P.k.put(`/api/notebooks/${h.id}`,{name:e}))},w=async()=>{if(h)try{let e=await P.k.get(`/api/notebooks/${h.id}`);if((e._count?.errorItems||0)>0)return void Y.c.warning(c.notebooks?.deleteNotEmpty||"Please clear all items in this notebook first.");if(!await (0,Y.u)((c.notebooks?.deleteConfirm||"Are you sure?").replace("{name}",h.name),{destructive:!0}))return;await P.k.delete(`/api/notebooks/${h.id}`),o.replace("/notebooks")}catch(e){$.V.error("[NotebookDetail]","Failed to delete notebook",{error:e}),Y.c.error((0,eo.d)(e)||c.notebooks?.deleteError||"Failed to delete")}};return x?(0,t.jsx)(n.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)(i.f,{backHref:"/notebooks",title:h.name,titleAddon:(0,t.jsx)(r.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)(r.f,{variant:"outline",size:"sm",className:"text-destructive hover:text-destructive",onClick:w,"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)(ei,{notebookId:h.id,onFinished:()=>y(e=>e+1)}),(0,t.jsx)(m.default,{href:`/notebooks/${h.id}/add`,children:(0,t.jsxs)(r.f,{"aria-label":c.notebooks?.addError||"Add Error",children:[(0,t.jsx)(l.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"hidden sm:inline",children:c.notebooks?.addError||"Add Error"})]})})]})}),(0,t.jsx)(et,{subjectId:h.id,subjectName:h.name,tagSet:h.tagSet||"default"},j),(0,t.jsx)(es,{open:g,onOpenChange:b,currentName:h.name,onRename:k})]})}):null}],198591)},469937,e=>{var t=e.i(843476),a=e.i(786563),s=e.i(111110),r=e.i(975157);let i=[1,2,3,4,5];e.s(["f",0,function({value:e,onChange:n,disabled:l,size:o="sm",showUnrated:c=!0,className:d}){let{t:u}=(0,s.b)(),m=e??0,h="sm"===o?"h-3.5 w-3.5":"h-5 w-5",f=m?u.difficulty.starsLabel.replace("{n}",String(m)):u.difficulty.unrated;return n?(0,t.jsxs)("span",{className:(0,r.f)("inline-flex items-center gap-0.5",d),role:"group","aria-label":`${u.difficulty.label}${u.common.colon}${f}`,title:u.difficulty.clearHint,children:[i.map(e=>(0,t.jsx)("button",{type:"button",disabled:l,onClick:()=>n(e===m?null:e),"aria-label":u.difficulty.setStars.replace("{n}",String(e)),"aria-pressed":e<=m,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)(a.f,{className:(0,r.f)(h,e<=m?"fill-amber-400 text-amber-400":"text-muted-foreground/40")})},e)),!m&&c&&(0,t.jsx)("span",{className:"ml-1 text-xs text-muted-foreground",children:u.difficulty.unrated})]}):m?(0,t.jsx)("span",{className:(0,r.f)("inline-flex items-center",d),role:"img","aria-label":`${u.difficulty.label}${u.common.colon}${f}`,title:f,children:i.map(e=>(0,t.jsx)(a.f,{className:(0,r.f)(h,e<=m?"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",d),children:u.difficulty.unrated}):null}])},846968,e=>{var t=e.i(843476),a=e.i(548161),s=e.i(474544),r=e.i(741120),i=e.i(487486),n=e.i(111110);let l={new:{className:"bg-warning/15 text-amber-700 dark:text-warning",icon:s.f},reviewing:{className:"bg-primary/10 text-primary",icon:r.f},mastered:{className:"bg-success/15 text-success",icon:a.f}};e.s(["o",0,{new:"border-l-warning/70",reviewing:"border-l-primary/60",mastered:"border-l-success/70"},"x",0,function({status:e,className:a=""}){let{t:s}=(0,n.b)(),{className:r,icon:o}=l[e],c="mastered"===e?s.notebook.mastered:"reviewing"===e?s.notebook.reviewing:s.notebook.review;return(0,t.jsx)(i.f,{variant:"secondary",className:`${r} ${a}`,children:(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)(o,{className:"h-3 w-3"})," ",c]})})}])},709830,76824,e=>{var t=e.i(843476),a=e.i(111110),s=e.i(597138);let r=["primary","junior_high","senior_high"],i="primary",n=["math","english","chinese","physics","chemistry","biology","history","geography","politics"];function l(e){return"string"==typeof e&&n.includes(e)}function o(e){var t;let a=l(e.subjectKey)?e.subjectKey:(0,s.f)(e.name);return{stage:"string"==typeof(t=e.stage)&&r.includes(t)?e.stage:i,subject:a&&l(a)?a:null}}function c(){let{t:e}=(0,a.b)();return{stageLabel:t=>({primary:e.auth.primary,junior_high:e.auth.juniorHigh,senior_high:e.auth.seniorHigh})[t],subjectLabel:t=>e.tags.subjects[t]}}e.s(["j",0,i,"c",0,r,"W",0,{primary:["math","english","chinese"],junior_high:n,senior_high:n},"v",0,o],76824),e.s(["E",0,function({notebook:e,className:a}){let{stageLabel:s,subjectLabel:r}=c(),i=o(e);return(0,t.jsxs)("span",{className:a,children:[s(i.stage),i.subject?` \xb7 ${r(i.subject)}`:""]})},"O",0,c],709830)},590546,e=>{var t=e.i(843476),a=e.i(618566),s=e.i(519455),r=e.i(711241);e.s(["f",0,function({fallbackUrl:e,className:i}){let n=(0,a.useRouter)();return(0,t.jsx)(s.f,{variant:"ghost",size:"icon",onClick:()=>{n.push(e)},className:i,children:(0,t.jsx)(r.f,{className:"h-5 w-5"})})}])},257428,e=>{var t=e.i(843476),a=e.i(271645),s=e.i(820783),r=e.i(30030),i=e.i(981140),n=e.i(369340),l=e.i(635804),o=e.i(296626),c=e.i(248425),d=Object.defineProperty,u=(e,t)=>d(e,"name",{value:t,configurable:!0}),m="Checkbox",[h,f]=(0,r.f)(m),[x,p]=h(m);function g(e){let{__scopeCheckbox:s,checked:r,children:i,defaultChecked:l,disabled:o,form:c,name:d,onCheckedChange:u,required:h,value:f="on",internal_do_not_use_render:p}=e,[g,b]=(0,n.f)({prop:r,defaultProp:l??!1,onChange:u,caller:m}),[j,y]=a.useState(null),[v,N]=a.useState(null),[S,C]=a.useState(null),R=!j||!!c||!!j.closest("form"),E={checked:g,disabled:o,setChecked:b,control:j,setControl:y,name:d,form:c,value:f,userClick:S,onUserClick:C,required:h,defaultChecked:!w(l)&&l,isFormControl:R,bubbleInput:v,setBubbleInput:N};return(0,t.jsx)(x,{scope:s,...E,children:k(p)?p(E):i})}u(g,"CheckboxProvider");var b=a.forwardRef(u(function({__scopeCheckbox:e,onKeyDown:r,onClick:n,...l},o){let{control:d,value:m,disabled:h,checked:f,required:x,setControl:g,setChecked:b,onUserClick:j,isFormControl:y,bubbleInput:v}=p("CheckboxTrigger",e),k=(0,s.f)(o,g),S=a.useRef(f);return a.useEffect(()=>{let e=d?.form;if(e){let t=u(()=>b(S.current),"reset");return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,b]),(0,t.jsx)(c.V.button,{type:"button",role:"checkbox","aria-checked":w(f)?"mixed":f,"aria-required":x,"data-state":N(f),"data-disabled":h?"":void 0,disabled:h,value:m,...l,ref:k,onKeyDown:(0,i.f)(r,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,i.f)(n,e=>{let t=e.isPropagationStopped();j({requestedChecked:!!w(f)||!f,hasConsumerStoppedPropagation:t}),b(e=>!!w(e)||!e),v&&y&&!t&&e.stopPropagation()})})},"CheckboxTrigger")),j=a.forwardRef(u(function(e,a){let{__scopeCheckbox:s,name:r,checked:i,defaultChecked:n,required:l,disabled:o,value:c,onCheckedChange:d,form:u,...m}=e;return(0,t.jsx)(g,{__scopeCheckbox:s,checked:i,defaultChecked:n,disabled:o,required:l,onCheckedChange:d,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{...m,ref:a,__scopeCheckbox:s}),e&&(0,t.jsx)(v,{__scopeCheckbox:s})]})})},"Checkbox")),y=a.forwardRef(u(function(e,a){let{__scopeCheckbox:s,forceMount:r,...i}=e,n=p("CheckboxIndicator",s);return(0,t.jsx)(o.f,{present:r||w(n.checked)||!0===n.checked,children:(0,t.jsx)(c.V.span,{"data-state":N(n.checked),"data-disabled":n.disabled?"":void 0,...i,ref:a,style:{pointerEvents:"none",...e.style}})})},"CheckboxIndicator")),v=a.forwardRef(u(function({__scopeCheckbox:e,onClick:r,...n},o){let{control:d,userClick:u,checked:m,defaultChecked:h,required:f,disabled:x,name:g,value:b,form:j,bubbleInput:y,setBubbleInput:v}=p("CheckboxBubbleInput",e),k=(0,s.f)(o,v),N=(0,l.f)(d),S=a.useRef(!1),C=a.useRef(m),R=a.useRef(u),E=a.useRef(null);a.useEffect(()=>{if(!y)return;let e=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(!e)return;let t=C.current!==m;C.current=m;let a=null!==u&&u!==R.current;if(R.current=u,a)E.current=t?null:u,t&&(y.indeterminate=w(m),e.call(y,!w(m)&&m)),y.dispatchEvent(new Event("click",{bubbles:!u.hasConsumerStoppedPropagation}));else if(t){let t=E.current;E.current=null;let a=t?.requestedChecked===m;S.current=!0,y.indeterminate=w(m),e.call(y,!w(m)&&m),y.dispatchEvent(new Event("click",{bubbles:!(a&&t.hasConsumerStoppedPropagation)})),S.current=!1}},[y,m,u]);let z=a.useRef(!w(m)&&m);return(0,t.jsx)(c.V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:h??z.current,required:f,disabled:x,name:g,value:b,form:j,...n,tabIndex:-1,ref:k,onClick:(0,i.f)(r,e=>{S.current&&e.stopPropagation()}),style:{...n.style,...N,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})},"CheckboxBubbleInput"));function k(e){return"function"==typeof e}function w(e){return"indeterminate"===e}function N(e){return w(e)?"indeterminate":e?"checked":"unchecked"}u(k,"isFunction"),u(w,"isIndeterminate"),u(N,"getState");var S=e.i(689664),C=e.i(975157);let R=a.forwardRef(({className:e,...a},s)=>(0,t.jsx)(j,{ref:s,className:(0,C.f)("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...a,children:(0,t.jsx)(y,{className:(0,C.f)("flex items-center justify-center text-current"),children:(0,t.jsx)(S.f,{className:"h-4 w-4"})})}));R.displayName=j.displayName,e.s(["f",0,R],257428)},912505,e=>{var t=e.i(843476),a=e.i(975157);e.s(["f",0,function({icon:e,title:s,description:r,action:i,className:n}){return(0,t.jsxs)("div",{className:(0,a.f)("flex flex-col items-center justify-center rounded-2xl border border-dashed bg-card/50 px-6 py-14 text-center",n),children:[(0,t.jsx)("div",{className:"mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-accent text-accent-foreground",children:(0,t.jsx)(e,{className:"h-7 w-7"})}),(0,t.jsx)("p",{className:"font-medium",children:s}),r&&(0,t.jsx)("p",{className:"mt-1 max-w-sm text-sm text-muted-foreground",children:r}),i&&(0,t.jsx)("div",{className:"mt-5",children:i})]})}])},393842,e=>{var t=e.i(843476),a=e.i(590546),s=e.i(975157);e.s(["f",0,function({title:e,description:r,backHref:i,actions:n,titleAddon:l,className:o}){return(0,t.jsxs)("div",{className:(0,s.f)("flex items-start gap-3",o),children:[i&&(0,t.jsx)(a.f,{fallbackUrl:i,className:"-ml-2 shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold tracking-tight sm:text-3xl",children:e}),l]}),r&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground sm:text-base",children:r})]}),n&&(0,t.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:n})]})}])},86963,e=>{var t=e.i(843476),a=e.i(632781);e.s(["f",0,function({label:e}){return(0,t.jsxs)("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-3 text-muted-foreground",children:[(0,t.jsx)(a.f,{className:"h-7 w-7 animate-spin text-primary"}),e&&(0,t.jsx)("p",{className:"text-sm",children:e})]})}])},469817,e=>{e.s(["$",0,18,"u",0,5,"A",0,200])},35209,e=>{var t=e.i(271645),a=e.i(111110);e.s(["f",0,function(...e){let{t:s}=(0,a.b)(),r=[s.pageTitle.base,...e.map(e=>"string"==typeof e?e.trim():"").filter(e=>e.length>0)].join("-");(0,t.useEffect)(()=>{document.title=r},[r])}])},991722,e=>{function t(e){return"not_attempted"===e||"wrong_attempt"===e||"unknown"===e?e:"unknown"}e.s(["i",0,function(e,a="zh"){return("en"===a?{not_attempted:"Not attempted",wrong_attempt:"Wrong attempt",unknown:"Unknown"}:{not_attempted:"不会做",wrong_attempt:"做错了",unknown:"未判断"})[t(e)]},"h",0,t,"x",0,function(e,a){return(a||"").trim()?"wrong_attempt":t(e)}])},380935,164549,e=>{var t=e.i(41931);async function a(e){try{return(await t.k.get(`/api/error-items/short/${encodeURIComponent(e)}`)).id}catch{return null}}e.s(["f",0,a],380935);let s=RegExp("^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{6}$");e.s(["f",0,function(e){return"string"==typeof e&&s.test(e)}],164549)},428602,e=>{e.s(["f",0,function(e){if(e.tags&&e.tags.length>0)return e.tags.map(e=>e.name);if(!e.knowledgePoints)return[];try{let t=JSON.parse(e.knowledgePoints);return Array.isArray(t)?t.filter(e=>"string"==typeof e):[]}catch{return[]}}])},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}])}])})();
|
|
@@ -5,105 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
* 用于版本升级时自动重建系统标签并保留关联关系
|
|
6
6
|
*/
|
|
7
7
|
const client_1 = require("@prisma/client");
|
|
8
|
-
const
|
|
8
|
+
const data_1 = require("../src/lib/tags/data");
|
|
9
|
+
const rebuild_1 = require("../src/lib/tags/seed/rebuild");
|
|
9
10
|
const prisma = new client_1.PrismaClient();
|
|
10
|
-
async function seedMath(tx, curriculum, gradeOrder) {
|
|
11
|
-
let count = 0;
|
|
12
|
-
for (const [gradeSemester, chapters] of Object.entries(curriculum)) {
|
|
13
|
-
const gradeNode = await tx.knowledgeTag.create({
|
|
14
|
-
data: {
|
|
15
|
-
name: gradeSemester,
|
|
16
|
-
subject: 'math',
|
|
17
|
-
parentId: null,
|
|
18
|
-
isSystem: true,
|
|
19
|
-
order: gradeOrder[gradeSemester] || 99,
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
count++;
|
|
23
|
-
for (let chapterIdx = 0; chapterIdx < chapters.length; chapterIdx++) {
|
|
24
|
-
const chapter = chapters[chapterIdx];
|
|
25
|
-
const chapterNode = await tx.knowledgeTag.create({
|
|
26
|
-
data: {
|
|
27
|
-
name: chapter.chapter,
|
|
28
|
-
subject: 'math',
|
|
29
|
-
parentId: gradeNode.id,
|
|
30
|
-
isSystem: true,
|
|
31
|
-
order: chapterIdx + 1,
|
|
32
|
-
},
|
|
33
|
-
});
|
|
34
|
-
count++;
|
|
35
|
-
for (let sectionIdx = 0; sectionIdx < chapter.sections.length; sectionIdx++) {
|
|
36
|
-
const section = chapter.sections[sectionIdx];
|
|
37
|
-
const sectionNode = await tx.knowledgeTag.create({
|
|
38
|
-
data: {
|
|
39
|
-
name: section.section,
|
|
40
|
-
subject: 'math',
|
|
41
|
-
parentId: chapterNode.id,
|
|
42
|
-
isSystem: true,
|
|
43
|
-
order: sectionIdx + 1,
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
count++;
|
|
47
|
-
for (let tagIdx = 0; tagIdx < section.tags.length; tagIdx++) {
|
|
48
|
-
const tagName = section.tags[tagIdx];
|
|
49
|
-
await tx.knowledgeTag.create({
|
|
50
|
-
data: {
|
|
51
|
-
name: tagName,
|
|
52
|
-
subject: 'math',
|
|
53
|
-
parentId: sectionNode.id,
|
|
54
|
-
isSystem: true,
|
|
55
|
-
order: tagIdx + 1,
|
|
56
|
-
},
|
|
57
|
-
});
|
|
58
|
-
count++;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return count;
|
|
64
|
-
}
|
|
65
|
-
async function seedStandardSubject(tx, subject, curriculum, gradeOrder) {
|
|
66
|
-
let count = 0;
|
|
67
|
-
for (const [gradeSemester, chapters] of Object.entries(curriculum)) {
|
|
68
|
-
const gradeNode = await tx.knowledgeTag.create({
|
|
69
|
-
data: {
|
|
70
|
-
name: gradeSemester,
|
|
71
|
-
subject: subject,
|
|
72
|
-
parentId: null,
|
|
73
|
-
isSystem: true,
|
|
74
|
-
order: gradeOrder[gradeSemester] || 99,
|
|
75
|
-
},
|
|
76
|
-
});
|
|
77
|
-
count++;
|
|
78
|
-
for (let chapterIdx = 0; chapterIdx < chapters.length; chapterIdx++) {
|
|
79
|
-
const chapter = chapters[chapterIdx];
|
|
80
|
-
const chapterNode = await tx.knowledgeTag.create({
|
|
81
|
-
data: {
|
|
82
|
-
name: chapter.chapter,
|
|
83
|
-
subject: subject,
|
|
84
|
-
parentId: gradeNode.id,
|
|
85
|
-
isSystem: true,
|
|
86
|
-
order: chapterIdx + 1,
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
count++;
|
|
90
|
-
for (let tagIdx = 0; tagIdx < chapter.tags.length; tagIdx++) {
|
|
91
|
-
const tagName = chapter.tags[tagIdx];
|
|
92
|
-
await tx.knowledgeTag.create({
|
|
93
|
-
data: {
|
|
94
|
-
name: tagName,
|
|
95
|
-
subject: subject,
|
|
96
|
-
parentId: chapterNode.id,
|
|
97
|
-
isSystem: true,
|
|
98
|
-
order: tagIdx + 1,
|
|
99
|
-
},
|
|
100
|
-
});
|
|
101
|
-
count++;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
return count;
|
|
106
|
-
}
|
|
107
11
|
async function main() {
|
|
108
12
|
console.log('[RebuildTags] Starting automatic system tag rebuild...');
|
|
109
13
|
let totalCreated = 0;
|
|
@@ -136,31 +40,31 @@ async function main() {
|
|
|
136
40
|
console.log('[RebuildTags] Step 2: Rebuilding system tags...');
|
|
137
41
|
// Math
|
|
138
42
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'math' } });
|
|
139
|
-
totalCreated += await seedMath(tx,
|
|
43
|
+
totalCreated += await (0, rebuild_1.seedMath)(tx, data_1.MATH_CURRICULUM, data_1.MATH_GRADE_ORDER);
|
|
140
44
|
// Physics
|
|
141
45
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'physics' } });
|
|
142
|
-
totalCreated += await seedStandardSubject(tx, 'physics',
|
|
46
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'physics', data_1.PHYSICS_CURRICULUM, data_1.PHYSICS_GRADE_ORDER);
|
|
143
47
|
// English
|
|
144
48
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'english' } });
|
|
145
|
-
totalCreated += await seedStandardSubject(tx, 'english',
|
|
49
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'english', data_1.ENGLISH_CURRICULUM, data_1.ENGLISH_GRADE_ORDER);
|
|
146
50
|
// Chemistry
|
|
147
51
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'chemistry' } });
|
|
148
|
-
totalCreated += await seedStandardSubject(tx, 'chemistry',
|
|
52
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'chemistry', data_1.CHEMISTRY_CURRICULUM, data_1.CHEMISTRY_GRADE_ORDER);
|
|
149
53
|
// Biology
|
|
150
54
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'biology' } });
|
|
151
|
-
totalCreated += await seedStandardSubject(tx, 'biology',
|
|
55
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'biology', data_1.BIOLOGY_CURRICULUM, data_1.BIOLOGY_GRADE_ORDER);
|
|
152
56
|
// Chinese
|
|
153
57
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'chinese' } });
|
|
154
|
-
totalCreated += await seedStandardSubject(tx, 'chinese',
|
|
58
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'chinese', data_1.CHINESE_CURRICULUM, data_1.CHINESE_GRADE_ORDER);
|
|
155
59
|
// History
|
|
156
60
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'history' } });
|
|
157
|
-
totalCreated += await seedStandardSubject(tx, 'history',
|
|
61
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'history', data_1.HISTORY_CURRICULUM, data_1.HISTORY_GRADE_ORDER);
|
|
158
62
|
// Geography
|
|
159
63
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'geography' } });
|
|
160
|
-
totalCreated += await seedStandardSubject(tx, 'geography',
|
|
64
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'geography', data_1.GEOGRAPHY_CURRICULUM, data_1.GEOGRAPHY_GRADE_ORDER);
|
|
161
65
|
// Politics
|
|
162
66
|
await tx.knowledgeTag.deleteMany({ where: { isSystem: true, subject: 'politics' } });
|
|
163
|
-
totalCreated += await seedStandardSubject(tx, 'politics',
|
|
67
|
+
totalCreated += await (0, rebuild_1.seedStandardSubject)(tx, 'politics', data_1.POLITICS_CURRICULUM, data_1.POLITICS_GRADE_ORDER);
|
|
164
68
|
console.log(`[RebuildTags] Created ${totalCreated} tags`);
|
|
165
69
|
// ========== STEP 3: 恢复关联关系 ==========
|
|
166
70
|
console.log('[RebuildTags] Step 3: Restoring associations...');
|
|
@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
8
8
|
const client_1 = require("@prisma/client");
|
|
9
9
|
const error_message_1 = require("../src/lib/error-message");
|
|
10
10
|
const logger_1 = require("../src/lib/logger");
|
|
11
|
-
const seed_chinese_tags_1 = require("../src/lib/seed-chinese-tags");
|
|
11
|
+
const seed_chinese_tags_1 = require("../src/lib/tags/seed/seed-chinese-tags");
|
|
12
12
|
const logger = (0, logger_1.createLogger)('seed-chinese-tags');
|
|
13
13
|
async function main() {
|
|
14
14
|
const prisma = new client_1.PrismaClient();
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.logger = void 0;
|
|
22
22
|
exports.createLogger = createLogger;
|
|
23
|
+
// 不加 server-only:scripts/ 下的种子与维护脚本(Docker、安装包启动时以普通 node 运行)直接导入本模块
|
|
23
24
|
const debug_log_1 = require("./debug-log");
|
|
24
25
|
const LOG_LEVELS = {
|
|
25
26
|
trace: 10,
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.seedMath = seedMath;
|
|
4
|
+
exports.seedStandardSubject = seedStandardSubject;
|
|
5
|
+
/** 数学为四层(年级→章→节→知识点),其余学科为三层(年级→章→知识点) */
|
|
6
|
+
async function seedMath(tx, curriculum, gradeOrder) {
|
|
7
|
+
let count = 0;
|
|
8
|
+
for (const [gradeSemester, chapters] of Object.entries(curriculum)) {
|
|
9
|
+
const gradeNode = await tx.knowledgeTag.create({
|
|
10
|
+
data: {
|
|
11
|
+
name: gradeSemester,
|
|
12
|
+
subject: 'math',
|
|
13
|
+
parentId: null,
|
|
14
|
+
isSystem: true,
|
|
15
|
+
order: gradeOrder[gradeSemester] || 99,
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
count++;
|
|
19
|
+
for (let chapterIdx = 0; chapterIdx < chapters.length; chapterIdx++) {
|
|
20
|
+
const chapter = chapters[chapterIdx];
|
|
21
|
+
const chapterNode = await tx.knowledgeTag.create({
|
|
22
|
+
data: {
|
|
23
|
+
name: chapter.chapter,
|
|
24
|
+
subject: 'math',
|
|
25
|
+
parentId: gradeNode.id,
|
|
26
|
+
isSystem: true,
|
|
27
|
+
order: chapterIdx + 1,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
count++;
|
|
31
|
+
for (let sectionIdx = 0; sectionIdx < chapter.sections.length; sectionIdx++) {
|
|
32
|
+
const section = chapter.sections[sectionIdx];
|
|
33
|
+
const sectionNode = await tx.knowledgeTag.create({
|
|
34
|
+
data: {
|
|
35
|
+
name: section.section,
|
|
36
|
+
subject: 'math',
|
|
37
|
+
parentId: chapterNode.id,
|
|
38
|
+
isSystem: true,
|
|
39
|
+
order: sectionIdx + 1,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
count++;
|
|
43
|
+
for (let tagIdx = 0; tagIdx < section.tags.length; tagIdx++) {
|
|
44
|
+
const tagName = section.tags[tagIdx];
|
|
45
|
+
await tx.knowledgeTag.create({
|
|
46
|
+
data: {
|
|
47
|
+
name: tagName,
|
|
48
|
+
subject: 'math',
|
|
49
|
+
parentId: sectionNode.id,
|
|
50
|
+
isSystem: true,
|
|
51
|
+
order: tagIdx + 1,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
count++;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return count;
|
|
60
|
+
}
|
|
61
|
+
/** 标准学科(除数学外):年级 → 章 → 知识点 三层结构 */
|
|
62
|
+
async function seedStandardSubject(tx, subject, curriculum, gradeOrder) {
|
|
63
|
+
let count = 0;
|
|
64
|
+
for (const [gradeSemester, chapters] of Object.entries(curriculum)) {
|
|
65
|
+
const gradeNode = await tx.knowledgeTag.create({
|
|
66
|
+
data: {
|
|
67
|
+
name: gradeSemester,
|
|
68
|
+
subject,
|
|
69
|
+
parentId: null,
|
|
70
|
+
isSystem: true,
|
|
71
|
+
order: gradeOrder[gradeSemester] || 99,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
count++;
|
|
75
|
+
for (let chapterIdx = 0; chapterIdx < chapters.length; chapterIdx++) {
|
|
76
|
+
const chapter = chapters[chapterIdx];
|
|
77
|
+
const chapterNode = await tx.knowledgeTag.create({
|
|
78
|
+
data: {
|
|
79
|
+
name: chapter.chapter,
|
|
80
|
+
subject,
|
|
81
|
+
parentId: gradeNode.id,
|
|
82
|
+
isSystem: true,
|
|
83
|
+
order: chapterIdx + 1,
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
count++;
|
|
87
|
+
for (let tagIdx = 0; tagIdx < chapter.tags.length; tagIdx++) {
|
|
88
|
+
const tagName = chapter.tags[tagIdx];
|
|
89
|
+
await tx.knowledgeTag.create({
|
|
90
|
+
data: {
|
|
91
|
+
name: tagName,
|
|
92
|
+
subject,
|
|
93
|
+
parentId: chapterNode.id,
|
|
94
|
+
isSystem: true,
|
|
95
|
+
order: tagIdx + 1,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
count++;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return count;
|
|
103
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.seedChineseTags = seedChineseTags;
|
|
4
|
-
|
|
4
|
+
// Docker 与安装包构建时用 tsc 单独编译种子脚本(不读取 tsconfig 路径别名),本文件及其依赖只能用相对路径导入
|
|
5
|
+
const chinese_1 = require("../data/chinese");
|
|
5
6
|
/** 增量补齐内置语文标签,保留已有标签 ID、题目关联和其他标签体系。 */
|
|
6
7
|
async function seedChineseTags(prisma) {
|
|
7
8
|
return prisma.$transaction(async (tx) => {
|
package/package.json
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- RedefineTables
|
|
2
|
+
PRAGMA defer_foreign_keys=ON;
|
|
3
|
+
PRAGMA foreign_keys=OFF;
|
|
4
|
+
CREATE TABLE "new_ExamPaper" (
|
|
5
|
+
"id" TEXT NOT NULL PRIMARY KEY,
|
|
6
|
+
"userId" TEXT NOT NULL,
|
|
7
|
+
"title" TEXT NOT NULL,
|
|
8
|
+
"status" TEXT NOT NULL DEFAULT 'generating',
|
|
9
|
+
"scope" TEXT NOT NULL,
|
|
10
|
+
"difficulty" TEXT NOT NULL,
|
|
11
|
+
"mode" TEXT NOT NULL DEFAULT 'generate',
|
|
12
|
+
"requestedCount" INTEGER NOT NULL,
|
|
13
|
+
"subjectIds" TEXT NOT NULL,
|
|
14
|
+
"tagNames" TEXT,
|
|
15
|
+
"resultsRecordedAt" DATETIME,
|
|
16
|
+
"createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
17
|
+
"updatedAt" DATETIME NOT NULL,
|
|
18
|
+
CONSTRAINT "ExamPaper_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE CASCADE ON UPDATE CASCADE
|
|
19
|
+
);
|
|
20
|
+
INSERT INTO "new_ExamPaper" ("createdAt", "difficulty", "id", "requestedCount", "resultsRecordedAt", "scope", "status", "subjectIds", "tagNames", "title", "updatedAt", "userId") SELECT "createdAt", "difficulty", "id", "requestedCount", "resultsRecordedAt", "scope", "status", "subjectIds", "tagNames", "title", "updatedAt", "userId" FROM "ExamPaper";
|
|
21
|
+
DROP TABLE "ExamPaper";
|
|
22
|
+
ALTER TABLE "new_ExamPaper" RENAME TO "ExamPaper";
|
|
23
|
+
CREATE INDEX "ExamPaper_userId_createdAt_idx" ON "ExamPaper"("userId", "createdAt");
|
|
24
|
+
PRAGMA foreign_keys=ON;
|
|
25
|
+
PRAGMA defer_foreign_keys=OFF;
|