wrong-notebook 2026.11.4-5 → 2026.11.4-7
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.nft.json +1 -1
- package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/admin/migrate-tags/route.js.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/models/route.js +3 -3
- package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
- package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
- package/.next/server/app/api/analytics/route.js.nft.json +1 -1
- package/.next/server/app/api/analyze/route.js +4 -4
- package/.next/server/app/api/analyze/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/figure/route.js +14 -14
- 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 +2 -2
- 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 +16 -16
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- 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 +5 -5
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js +12 -12
- 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 +12 -12
- 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.nft.json +1 -1
- 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.nft.json +1 -1
- package/.next/server/app/api/error-items/export-questions/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/list/route.js +1 -1
- package/.next/server/app/api/error-items/list/route.js.nft.json +1 -1
- package/.next/server/app/api/error-items/route.js +14 -13
- package/.next/server/app/api/error-items/route.js.nft.json +1 -1
- 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 -4
- 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 +2 -2
- 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 +2 -2
- package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/[id]/route.js +2 -2
- package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/exams/route.js.nft.json +1 -1
- package/.next/server/app/api/export/route.js.nft.json +1 -1
- package/.next/server/app/api/geogebra-analyze/route.js +1 -1
- 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 +6 -6
- package/.next/server/app/api/import/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/[id]/confirm-all/route.js +8 -8
- 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 +6 -6
- 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 +8 -8
- 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 +8 -8
- 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 +8 -8
- 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 +8 -8
- package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
- package/.next/server/app/api/import-batches/route.js +8 -8
- package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/[id]/confirm/route.js +6 -6
- 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 +6 -6
- 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 +4 -4
- 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 +6 -6
- package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/import-tasks/route.js +8 -8
- package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/initialize/route.js.nft.json +1 -1
- package/.next/server/app/api/logs/frontend/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/checkin/route.js +2 -2
- package/.next/server/app/api/minimax-code/checkin/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/login/route.js.nft.json +1 -1
- package/.next/server/app/api/minimax-code/route.js +3 -3
- package/.next/server/app/api/minimax-code/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/retag/route.js +7 -7
- package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/notebooks/route.js.nft.json +1 -1
- package/.next/server/app/api/openclaw/batch-upload/route.js +8 -8
- package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/paper-groups/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/generate/route.js +16 -16
- package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
- package/.next/server/app/api/reanswer/route.js +2 -2
- package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
- package/.next/server/app/api/register/route.js.nft.json +1 -1
- package/.next/server/app/api/requests/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/review/due/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/route.js.nft.json +1 -1
- package/.next/server/app/api/setup/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/activity/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/clear/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/practice/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
- package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/server/app/api/tags/stats/route.js.nft.json +1 -1
- package/.next/server/app/api/tasks/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/batch/route.js +4 -4
- package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/route.js.nft.json +1 -1
- package/.next/server/app/api/tts/status/route.js.nft.json +1 -1
- 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/[root-of-the-server]__0-ii_w4q2w_78._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1dovdb1wrr_0e._.js → [root-of-the-server]__04yihz3dovm0z._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1xuw793xxu29t._.js → [root-of-the-server]__0cizcawcu31he._.js} +2 -2
- package/.next/server/chunks/{[root-of-the-server]__0ujhx0glgcxja._.js → [root-of-the-server]__0eqjbieakyy2g._.js} +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0vt48u-0ebzdv._.js → [root-of-the-server]__0gk6xz_lxrrer._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__0hcbw1sliw973._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0kehix4ojdnhw._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__0855dkhk7zs77._.js → [root-of-the-server]__0l8sbsrfjhttk._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__0lgbdth9-z6qg._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0o9oim91bxvxq._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0rwoy4jm7s8o7._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0si2-m5an9zl7._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svdqovwfpro2._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0svpy5s3x369z._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0ukr4xnposhv9._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0vrag-4p6eznc._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__11wpfrrg965mf._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0dqy62vnjwvwp._.js → [root-of-the-server]__13cos0n0yw_z6._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__14gc66h_h3i2i._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__163ocf8u6v-xl._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__16_meybuj-s5w._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__17659spbpgn__._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1bw1tevy-ufwx._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0zrg03ldx65tk._.js → [root-of-the-server]__1dqb3qtykno2z._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1f-ve8idsq57l._.js +1 -1
- package/.next/server/chunks/{[root-of-the-server]__1b-acwmm5hhg0._.js → [root-of-the-server]__1fp6mylnljj_6._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1gc1jsjtvhvls._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__1ii155nyrptua._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__0v8mfczhz1ax1._.js → [root-of-the-server]__1vorkvvfkrr39._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__1x_yvd3pxoee7._.js +3 -0
- package/.next/server/chunks/{[root-of-the-server]__1ybmwcbaqk63j._.js → [root-of-the-server]__1y9cx1kv17pl_._.js} +2 -2
- package/.next/server/chunks/[root-of-the-server]__20bo6axxlug5q._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__20vfjg0kexwpn._.js +3 -0
- package/.next/server/chunks/_011-ll5i30j2e._.js +1 -1
- package/.next/server/chunks/_03ovgh1-4xf3f._.js +1 -1
- package/.next/server/chunks/_05-ouasholjra._.js +3 -0
- package/.next/server/chunks/_06pseal2zu-71._.js +1 -1
- package/.next/server/chunks/_08i9pskmlafnp._.js +1 -1
- package/.next/server/chunks/_0d66myj_8567o._.js +1 -1
- package/.next/server/chunks/_0p-sas2zxy3iv._.js +1 -1
- package/.next/server/chunks/_0tkov27xr068i._.js +3 -3
- package/.next/server/chunks/_0tl0cy5j96d7h._.js +1 -1
- package/.next/server/chunks/_0zs7jfzzshbfq._.js +1 -1
- package/.next/server/chunks/_12xi_xqvtrn3k._.js +1 -1
- package/.next/server/chunks/_1638xaazsmf2m._.js +3 -3
- package/.next/server/chunks/_18hm5aaxkr500._.js +1 -1
- package/.next/server/chunks/_1a1aqmie1d3u_._.js +1 -1
- package/.next/server/chunks/_1ad8i3ukisj99._.js +3 -0
- package/.next/server/chunks/_1b0269xt-c8f7._.js +1 -1
- package/.next/server/chunks/_1cydcmia78z15._.js +1 -1
- package/.next/server/chunks/_1lz-5f4_92l2u._.js +3 -0
- package/.next/server/chunks/_1sp0xk1c5jx5r._.js +1 -1
- package/.next/server/chunks/_1vddun9dxzaqo._.js +3 -3
- package/.next/server/chunks/_1zbkha-v5mkk0._.js +1 -1
- package/.next/server/chunks/src_lib_0clsw_ng7x3ih._.js +3 -0
- package/.next/server/chunks/{src_lib_0zeksho3data7._.js → src_lib_0n6nhl7_avcme._.js} +1 -1
- package/.next/server/chunks/src_lib_0so-2topfosjo._.js +1 -1
- package/.next/server/chunks/src_lib_1-8qgpevmw3ew._.js +3 -0
- package/.next/server/chunks/src_lib_1_m3-y2t3e4xi._.js +22 -19
- package/.next/server/chunks/src_lib_1oc3awtm80lqn._.js +3 -0
- package/.next/server/chunks/src_lib_background-tasks_ts_02j9z7pcmiqfj._.js +1 -1
- package/.next/server/chunks/src_lib_exam_exam_ts_18c3t7bnr1z5k._.js +1 -1
- package/.next/server/chunks/src_lib_import_import-batches_ts_0nq3mn0v5uj28._.js +1 -1
- package/.next/server/chunks/src_lib_import_import-tasks_ts_01f-g_upv7llt._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-analysis_ts_1-3x2cfxlr3fs._.js +1 -1
- package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
- package/.next/server/chunks/src_lib_tags_retag_ts_09s5xwrzcy144._.js +1 -1
- package/.next/server/chunks/ssr/{[root-of-the-server]__0z7upqzuqtse6._.js → [root-of-the-server]__1epxx0lrejssz._.js} +1 -1
- package/.next/server/chunks/ssr/{_1lltqgoq4vqfe._.js → _01zv6gqnnj9oy._.js} +2 -2
- package/.next/server/chunks/ssr/{_0fp_p60hb9ex8._.js → _05gdkgyyr0suj._.js} +1 -1
- package/.next/server/chunks/ssr/_05k02824g2tpo._.js +1 -1
- package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +1 -1
- package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +1 -1
- package/.next/server/chunks/ssr/_1cpvkaqiyve6g._.js +3 -0
- package/.next/server/chunks/ssr/{node_modules_0y-9u3ez_29oz._.js → node_modules_115tsi2nro4tk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_109z-y1z_gtxg._.js → node_modules_1we6ggthjslzt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_08vtqzu_wfcb5._.js → node_modules_1yz9gg4275g30._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1_jdv4y0yz52i.js → node_modules_heic-to_dist_csp_heic-to_038nbq-p7grtd.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1zqrtb3kykd7q.js → node_modules_heic-to_dist_csp_heic-to_1b61b0i6philz.js} +1 -1
- package/.next/server/chunks/ssr/src_app_error-items_[id]_page_tsx_04xwwdmyh7_9q._.js +1 -1
- package/.next/server/chunks/ssr/src_app_exams_[id]_page_tsx_0xcjflkgkwzgd._.js +1 -1
- package/.next/server/chunks/ssr/src_app_import-batches_[id]_page_tsx_0mhg_vriwmkkw._.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_page_tsx_1chiuahujsxm1._.js +3 -3
- package/.next/server/chunks/ssr/src_app_practice_page_tsx_10gnx53v3kpzb._.js +1 -1
- package/.next/server/chunks/ssr/src_components_providers_tsx_09kw-mv3nb6xs._.js +12 -12
- package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +3 -3
- package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +3 -3
- package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +3 -3
- 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 +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/500.html +1 -1
- package/.next/static/chunks/{2xww3vrggzkc3.js → 05pa84fjsr-h8.js} +4 -4
- package/.next/static/chunks/07a3zn8uvj2i0.js +1 -0
- package/.next/static/chunks/{0ge9zqd21b4xd.js → 0ppbk9n8iiwlv.js} +4 -4
- package/.next/static/chunks/0qb4cgf04m6y_.js +1 -0
- package/.next/static/chunks/0wr5pvnu47q_0.js +6 -0
- package/.next/static/chunks/{3jkntcd5fwsid.js → 0y9dgn85yuuy5.js} +1 -1
- package/.next/static/chunks/{3-5otbeiq86n5.js → 1ep255e058_3b.js} +1 -1
- package/.next/static/chunks/{31uxxyexyu66p.js → 28qmcol3c39_a.js} +12 -12
- package/.next/static/chunks/2eieglv-e8e1j.js +1 -0
- package/.next/static/chunks/33vv8ujyvnonj.js +1 -0
- package/.next/static/chunks/{113lhm-f9le_y.js → 343yopry-myz8.js} +2 -2
- package/.next/static/chunks/3fyp0ya1q-g_k.js +1 -0
- package/.next/static/chunks/3g93k83oklg4_.js +1 -0
- package/.next/static/chunks/3gdidqib5e1mw.js +1 -0
- package/.next/static/chunks/{040et8v6_v-s6.js → 3x0gnqbvstc69.js} +1 -1
- package/.next/static/chunks/40t8efajfu_xz.js +12 -0
- package/package.json +1 -1
- package/prisma/seed.db +0 -0
- package/public/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78-V.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/public/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/public/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/public/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/public/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GB-H.bcmap +4 -0
- package/public/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/public/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/public/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/public/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/public/pdfjs/cmaps/LICENSE +36 -0
- package/public/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/public/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/public/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/public/pdfjs/cmaps/Roman.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/public/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/public/pdfjs/cmaps/V.bcmap +0 -0
- package/public/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/public/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/public/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/public/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/public/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/public/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/.next/server/chunks/[root-of-the-server]__04w57bdna9ax0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0fdkyswheen4o._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0ig1r6paxqzt0._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0j7ua4rsijb4c._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0l7jho_lr2z5g._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0rspref34j958._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0vf3rgatj1f3u._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0x8ehtaj_x2pf._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__120o1w9mcwgta._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__14n0eki4tdk02._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__15a3t94ps7jx2._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1d6ftxzea6h0a._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1e81i8l09skcp._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1f5_yaclxhuvj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1rxi33p9h8zrj._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1xqcu4ft3d7id._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__1yaf9vp_o6cro._.js +0 -3
- package/.next/server/chunks/_055vhdh_7iydn._.js +0 -3
- package/.next/server/chunks/_1lesklvhr_pfq._.js +0 -3
- package/.next/server/chunks/src_lib_1d99xj4d-pofa._.js +0 -3
- package/.next/static/chunks/02lw0b8i38sj3.js +0 -6
- package/.next/static/chunks/0g1lk2opoyqly.js +0 -1
- package/.next/static/chunks/1fmrzsulv-ddd.js +0 -1
- package/.next/static/chunks/1uso50ewx5j8v.js +0 -1
- package/.next/static/chunks/1yg8trzska8uv.js +0 -1
- package/.next/static/chunks/21ghhv1twe4or.js +0 -12
- package/.next/static/chunks/28bc-wd48lcls.js +0 -1
- package/.next/static/chunks/37309r9ttt-oa.js +0 -1
- package/.next/static/chunks/438pvifm_o4g_.js +0 -1
- /package/.next/static/{isKicFguXFifPUwKaqFfK → Rh_2qSdtR7MzUEFCrjWo3}/_buildManifest.js +0 -0
- /package/.next/static/{isKicFguXFifPUwKaqFfK → Rh_2qSdtR7MzUEFCrjWo3}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{isKicFguXFifPUwKaqFfK → Rh_2qSdtR7MzUEFCrjWo3}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[699052,e=>{var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),f=e.i(626937),m=e.i(10372),w=e.i(193695),v=e.i(509580);e.i(52474);var g=e.i(600220);let R=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/error-items/[id]/retag/route",pathname:"/api/error-items/[id]/retag",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/error-items/[id]/retag/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(192290),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:x,serverHooks:T}=R;async function y(e,t,r){r.requestMeta&&(0,i.R)(e,r.requestMeta),R.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/error-items/[id]/retag/route";a=a.replace(/\/index$/,"")||"/";let{instrumentation:s}=await R.ensureInstrumentation(e,{deferSpans:!0});return R.traceRequest(e,{tracer:(0,n.v)(),spanName:`${e.method||"GET"} ${a}`,httpTarget:e.url,instrumentation:s},(i,n)=>A(e,t,r,a,!1,i,n))}async function A(e,t,a,E,x,T,y){let A=await R.prepare(e,t,{srcPage:E,multiZoneDraftMode:x});if(!A)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:b,params:O,nextConfig:P,parsedUrl:S,isDraftMode:I,prerenderManifest:U,routerServerContext:_,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,resolvedPathname:q,clientReferenceManifest:M,serverActionsManifest:D,previewProps:L}=A,j=(0,o.f)(E),G=!!U.routes[q]&&(R.isDev||(0,v.f)(q,R.cacheOwner,U.routes[q]))
|
|
1
|
+
(()=>{"use strict";module.exports=[699052,e=>{var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),f=e.i(626937),m=e.i(10372),w=e.i(193695),v=e.i(509580);e.i(52474);var g=e.i(600220);let R=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/error-items/[id]/retag/route",pathname:"/api/error-items/[id]/retag",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/error-items/[id]/retag/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(192290),...{}}),{workAsyncStorage:E,workUnitAsyncStorage:x,serverHooks:T}=R;async function y(e,t,r){r.requestMeta&&(0,i.R)(e,r.requestMeta),R.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/error-items/[id]/retag/route";a=a.replace(/\/index$/,"")||"/";let{instrumentation:s}=await R.ensureInstrumentation(e,{deferSpans:!0});return R.traceRequest(e,{tracer:(0,n.v)(),spanName:`${e.method||"GET"} ${a}`,httpTarget:e.url,instrumentation:s},(i,n)=>A(e,t,r,a,!1,i,n))}async function A(e,t,a,E,x,T,y){let A=await R.prepare(e,t,{srcPage:E,multiZoneDraftMode:x});if(!A)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,deploymentId:b,params:O,nextConfig:P,parsedUrl:S,isDraftMode:I,prerenderManifest:U,routerServerContext:_,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,resolvedPathname:q,clientReferenceManifest:M,serverActionsManifest:D,previewProps:L}=A,j=(0,o.f)(E),G=!!U.routes[q]&&(R.isDev||(0,v.f)(q,R.cacheOwner,U.routes[q])),$=!!(U.dynamicRoutes[j]||G),H=async()=>((null==_?void 0:_.render404)?await _.render404(e,t,S,!1):t.end("This page could not be found"),null);if($&&!I){let e=U.dynamicRoutes[j];if(e&&!1===e.fallback&&!G){if(P.adapterPath)return await H();throw new w.NoFallbackError}}let F=null;!$||R.isDev||I||(F="/index"===(F=q)?"/":F),D&&M&&(0,s.f)({page:E,clientReferenceManifest:M,serverActionsManifest:D});let B=e.method||"GET",K=(0,n.v)(),W=!!(null==_?void 0:_.isWrappedByNextServer),J=!!(0,i.w)(e,"minimalMode"),Q=(0,i.w)(e,"incrementalCache")||await R.getIncrementalCache(e,P,L,U,J);null==Q||Q.resetRequestCache(),globalThis.__incrementalCache=Q;let V={params:O,previewProps:L,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts,useCacheTimeout:P.experimental.useCacheTimeout,durableUseCacheEntries:!!P.experimental.durableUseCacheEntries},cacheComponents:!!P.cacheComponents,validationLevel:P.experimental.instantInsights.validationLevel,isDraftMode:I,incrementalCache:Q,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:P.cacheLife,staticPageGenerationTimeout:P.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:C,deploymentId:b}},X=new l.x(e),z=new l.e(t),Y=u.k.fromNodeNextRequest(X,(0,u.t)(t)),Z=async({previousCacheEntry:r})=>{try{if(!J&&k&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===F?await R.handle(Y,V):await R.prerender(Y,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let n=V.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=V.renderOpts.collectedTags;if(!$)return await (0,p.f)(X,z,i,n),null;{let e=await i.blob(),t=(0,h.S)(i.headers);s&&(t[m.M]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.Q)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.Q?!1!==r&&r>0?P.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:g.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==F,isOnDemandRevalidate:k})},!1,_),t}},ee=async i=>{try{var s,o;let i=await R.handleResponse({req:e,nextConfig:P,cacheKey:F,routeKind:r.f.APP_ROUTE,isFallback:!1,previewProps:L,prerenderManifest:U,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:J});if(null!==i&&"error"in i)throw i.error;if(!$)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==g.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(o=i.value)?void 0:o.kind}`);J||t.setHeader("x-nextjs-cache",k?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),I&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.G)(i.value.headers);J&&$||n.delete(m.M),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,f.f)(i.cacheControl)),await (0,p.f)(X,z,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(r){if(r instanceof w.NoFallbackError||await R.onRequestError(e,r,{routerKind:"App Router",routePath:j,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==F,isOnDemandRevalidate:k})},!1,_),$)throw r;if(t.headersSent){if(i){let e=r instanceof Error?r:Error("Unknown app route error");i.recordException(e),i.setStatus({code:n.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(X,z,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.J.ERROR}),i.setAttribute("error.type",e.toString()));let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.q.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||j,s=`${B} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),i.updateName(s),y&&y!==i&&(y.setAttribute("http.route",a),y.updateName(s))})()}};W||void 0===e.url||null==T||T.setAttribute("http.target",e.url),await ee(T)}e.s(["handler",0,y,"patchFetch",0,function(){return(0,a.f)({workAsyncStorage:E,workUnitAsyncStorage:x})},"routeModule",0,R,"serverHooks",0,T,"workAsyncStorage",0,E,"workUnitAsyncStorage",0,x])},192290,e=>e.a(async(t,r)=>{try{var a=e.i(89171),i=e.i(698043),n=e.i(287012),s=e.i(632393),o=e.i(50377),l=e.i(926828),u=e.i(39472),d=e.i(856379),c=e.i(19167),p=e.i(896123),h=t([s]);[s]=h.then?(await h)():h;let m=(0,o.f)("api:error-items:retag");async function f(e,{user:t,params:r}){let{id:s}=await r;try{let r=p.v.safeParse(await e.json().catch(()=>({}))),o=r.success&&!0===r.data.preview,c=await i.f.errorItem.findUnique({where:{id:s},select:{userId:!0,shortId:!0,questionText:!0}});if(!c||c.userId!==t.id)return(0,n.X)("Item not found");let h=`error-item:${s}:retag`,f=(0,l.F)({userId:t.id,kind:"retag",subject:(0,l.E)(c),link:`/error-items/${s}`,target:h});if(!f)return(0,n.W)((0,l.M)(t.id,h)??{id:"",kind:"retag",startedAt:"",target:h});let m=await (0,d.f)(t,"retag");if(m)return f.cancel(),m;let w=await (0,l.J)(f,()=>o?(0,u.M)(s,t.id):(0,u.q)(s,t.id));return a.NextResponse.json(w)}catch(t){let e=t instanceof Error?t.message:String(t);if("ITEM_NOT_FOUND"===e)return(0,n.X)("Item not found");if(["NO_QUESTION_TEXT","NO_AVAILABLE_TAGS","NO_TAGS_SELECTED"].includes(e))return(0,n.O)(e);return m.error({error:e},"Error retagging item"),(0,n.g)(e.startsWith("AI_")?e.split(":")[0]:"Failed to retag item")}}let w=(0,c.K)((0,s.g)(f));e.s(["POST",0,w]),r()}catch(e){r(e)}},!1)]})();
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0tl0cy5j96d7h._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[923370,e=>{var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),f=e.i(626937),g=e.i(10372),m=e.i(193695),v=e.i(509580);e.i(52474);var w=e.i(600220);let R=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/error-items/[id]/figure/route",pathname:"/api/error-items/[id]/figure",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/error-items/[id]/figure/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(752736),...{}}),{workAsyncStorage:x,workUnitAsyncStorage:
|
|
1
|
+
(()=>{"use strict";module.exports=[923370,e=>{var t=e.i(747909),r=e.i(174017),a=e.i(996250),i=e.i(759756),n=e.i(561916),s=e.i(174677),o=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),f=e.i(626937),g=e.i(10372),m=e.i(193695),v=e.i(509580);e.i(52474);var w=e.i(600220);let R=new t.AppRouteRouteModule({definition:{kind:r.f.APP_ROUTE,page:"/api/error-items/[id]/figure/route",pathname:"/api/error-items/[id]/figure",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/error-items/[id]/figure/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(752736),...{}}),{workAsyncStorage:x,workUnitAsyncStorage:E,serverHooks:y}=R;async function b(e,t,r){r.requestMeta&&(0,i.R)(e,r.requestMeta),R.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let a="/api/error-items/[id]/figure/route";a=a.replace(/\/index$/,"")||"/";let{instrumentation:s}=await R.ensureInstrumentation(e,{deferSpans:!0});return R.traceRequest(e,{tracer:(0,n.v)(),spanName:`${e.method||"GET"} ${a}`,httpTarget:e.url,instrumentation:s},(i,n)=>C(e,t,r,a,!1,i,n))}async function C(e,t,a,x,E,y,b){let C=await R.prepare(e,t,{srcPage:x,multiZoneDraftMode:E});if(!C)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:T,deploymentId:A,params:I,nextConfig:S,parsedUrl:P,isDraftMode:O,prerenderManifest:U,routerServerContext:k,isOnDemandRevalidate:q,revalidateOnlyGenerated:F,resolvedPathname:M,clientReferenceManifest:_,serverActionsManifest:N,previewProps:G}=C,$=(0,o.f)(x),D=!!U.routes[M]&&(R.isDev||(0,v.f)(M,R.cacheOwner,U.routes[M])),L=!!(U.dynamicRoutes[$]||D),j=async()=>((null==k?void 0:k.render404)?await k.render404(e,t,P,!1):t.end("This page could not be found"),null);if(L&&!O){let e=U.dynamicRoutes[$];if(e&&!1===e.fallback&&!D){if(S.adapterPath)return await j();throw new m.NoFallbackError}}let H=null;!L||R.isDev||O||(H="/index"===(H=M)?"/":H),N&&_&&(0,s.f)({page:x,clientReferenceManifest:_,serverActionsManifest:N});let B=e.method||"GET",K=(0,n.v)(),W=!!(null==k?void 0:k.isWrappedByNextServer),J=!!(0,i.w)(e,"minimalMode"),Q=(0,i.w)(e,"incrementalCache")||await R.getIncrementalCache(e,S,G,U,J);null==Q||Q.resetRequestCache(),globalThis.__incrementalCache=Q;let V={params:I,previewProps:G,renderOpts:{experimental:{authInterrupts:!!S.experimental.authInterrupts,useCacheTimeout:S.experimental.useCacheTimeout,durableUseCacheEntries:!!S.experimental.durableUseCacheEntries},cacheComponents:!!S.cacheComponents,validationLevel:S.experimental.instantInsights.validationLevel,isDraftMode:O,incrementalCache:Q,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:S.cacheLife,staticPageGenerationTimeout:S.staticPageGenerationTimeout,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:T,deploymentId:A}},X=new l.x(e),z=new l.e(t),Y=u.k.fromNodeNextRequest(X,(0,u.t)(t)),Z=async({previousCacheEntry:r})=>{try{if(!J&&q&&F&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===H?await R.handle(Y,V):await R.prerender(Y,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let n=V.renderOpts.pendingWaitUntil;n&&a.waitUntil&&(a.waitUntil(n),n=void 0);let s=V.renderOpts.collectedTags;if(!L)return await (0,p.f)(X,z,i,n),null;{let e=await i.blob(),t=(0,h.S)(i.headers);s&&(t[g.M]=s),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=g.Q)&&V.renderOpts.collectedRevalidate,a=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=g.Q?!1!==r&&r>0?S.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:w.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await R.onRequestError(e,t,{routerKind:"App Router",routePath:x,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:q})},!1,k),t}},ee=async i=>{try{var s,o;let i=await R.handleResponse({req:e,nextConfig:S,cacheKey:H,routeKind:r.f.APP_ROUTE,isFallback:!1,previewProps:G,prerenderManifest:U,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:F,responseGenerator:Z,waitUntil:a.waitUntil,isMinimalMode:J});if(null!==i&&"error"in i)throw i.error;if(!L)return;if((null==i||null==(s=i.value)?void 0:s.kind)!==w.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(o=i.value)?void 0:o.kind}`);J||t.setHeader("x-nextjs-cache",q?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),O&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let n=(0,h.G)(i.value.headers);J&&L||n.delete(g.M),!i.cacheControl||t.getHeader("Cache-Control")||n.get("Cache-Control")||n.set("Cache-Control",(0,f.f)(i.cacheControl)),await (0,p.f)(X,z,new Response(i.value.body,{headers:n,status:i.value.status||200}));return}catch(r){if(r instanceof m.NoFallbackError||await R.onRequestError(e,r,{routerKind:"App Router",routePath:$,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==H,isOnDemandRevalidate:q})},!1,k),L)throw r;if(t.headersSent){if(i){let e=r instanceof Error?r:Error("Unknown app route error");i.recordException(e),i.setStatus({code:n.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(X,z,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:n.J.ERROR}),i.setAttribute("error.type",e.toString()));let r=K.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==d.q.handleRequest)return console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route")||$,s=`${B} ${a}`;i.setAttributes({"next.route":a,"http.route":a,"next.span_name":s}),i.updateName(s),b&&b!==i&&(b.setAttribute("http.route",a),b.updateName(s))})()}};W||void 0===e.url||null==y||y.setAttribute("http.target",e.url),await ee(y)}e.s(["handler",0,b,"patchFetch",0,function(){return(0,a.f)({workAsyncStorage:x,workUnitAsyncStorage:E})},"routeModule",0,R,"serverHooks",0,y,"workAsyncStorage",0,x,"workUnitAsyncStorage",0,E])},752736,e=>e.a(async(t,r)=>{try{var a=e.i(89171),i=e.i(698043),n=e.i(843911),s=e.i(287012),o=e.i(632393),l=e.i(50377),u=e.i(926828),d=e.i(214833),c=e.i(856379),p=e.i(19167),h=t([o]);[o]=h.then?(await h)():h;let g=(0,l.f)("api:error-items:figure");async function f(e,{user:t,params:r}){let{id:o}=await r;try{let e=await i.f.errorItem.findUnique({where:{id:o},select:{userId:!0,shortId:!0,originalImageUrl:!0,questionText:!0}});if(!e||e.userId!==t.id)return(0,s.X)("Item not found");let r=e.originalImageUrl?.match(/^data:([^;]+);base64,([\s\S]+)$/);if(!r)return(0,s.O)("NO_ORIGINAL_IMAGE");let l=`error-item:${o}:figure`,p=(0,u.F)({userId:t.id,kind:"figure",subject:(0,u.E)(e),link:`/error-items/${o}`,target:l});if(!p)return(0,s.W)((0,u.M)(t.id,l)??{id:"",kind:"figure",startedAt:"",target:l});let h=await (0,d.G)(()=>(0,c.f)(t,"figure"));if(h)return p.cancel(),h;let f=await (0,u.J)(p,()=>(0,n.f)().generateFigureSvg(r[2],r[1],e.questionText).then(e=>i.f.errorItem.update({where:{id:o},data:{hasFigure:e.hasFigure,figureSvg:e.figureSvg},select:{hasFigure:!0,figureSvg:!0}})));return g.info({errorItemId:o,hasFigure:f.hasFigure,svgLength:f.figureSvg?.length??0},"Figure regenerated"),a.NextResponse.json(f)}catch(t){let e=t instanceof Error?t.message:String(t);return g.error({error:e},"Error regenerating figure"),(0,s.g)(e.startsWith("AI_")?e.split(":")[0]:"Failed to regenerate figure")}}let m=(0,p.K)((0,o.g)(f));e.s(["POST",0,m]),r()}catch(e){r(e)}},!1)]})();
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_0zs7jfzzshbfq._.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{"use strict";module.exports=[583557,e=>{var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),s=e.i(561916),n=e.i(174677),l=e.i(869741),o=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),m=e.i(570101),g=e.i(626937),f=e.i(10372),h=e.i(193695),w=e.i(509580);e.i(52474);var I=e.i(600220);let y=new t.AppRouteRouteModule({definition:{kind:a.f.APP_ROUTE,page:"/api/import/route",pathname:"/api/import",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/import/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(71643),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:v,serverHooks:x}=y;async function A(e,t,a){a.requestMeta&&(0,i.R)(e,a.requestMeta),y.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let r="/api/import/route";r=r.replace(/\/index$/,"")||"/";let{instrumentation:n}=await y.ensureInstrumentation(e,{deferSpans:!0});return y.traceRequest(e,{tracer:(0,s.v)(),spanName:`${e.method||"GET"} ${r}`,httpTarget:e.url,instrumentation:n},(i,s)=>S(e,t,a,r,!1,i,s))}async function S(e,t,r,b,v,x,A){let S=await y.prepare(e,t,{srcPage:b,multiZoneDraftMode:v});if(!S)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:T,deploymentId:R,params:C,nextConfig:j,parsedUrl:P,isDraftMode:z,prerenderManifest:M,routerServerContext:q,isOnDemandRevalidate:E,revalidateOnlyGenerated:k,resolvedPathname:N,clientReferenceManifest:O,serverActionsManifest:U,previewProps:F}=S,D=(0,l.f)(b),L=!!M.routes[N]&&(y.isDev||(0,w.f)(N,y.cacheOwner,M.routes[N])),$=!!(M.dynamicRoutes[D]||L),G=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,P,!1):t.end("This page could not be found"),null);if($&&!z){let e=M.dynamicRoutes[D];if(e&&!1===e.fallback&&!L){if(j.adapterPath)return await G();throw new h.NoFallbackError}}let B=null;!$||y.isDev||z||(B="/index"===(B=N)?"/":B),U&&O&&(0,n.f)({page:b,clientReferenceManifest:O,serverActionsManifest:U});let _=e.method||"GET",H=(0,s.v)(),J=!!(null==q?void 0:q.isWrappedByNextServer),Q=!!(0,i.w)(e,"minimalMode"),K=(0,i.w)(e,"incrementalCache")||await y.getIncrementalCache(e,j,F,M,Q);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let W={params:C,previewProps:F,renderOpts:{experimental:{authInterrupts:!!j.experimental.authInterrupts,useCacheTimeout:j.experimental.useCacheTimeout,durableUseCacheEntries:!!j.experimental.durableUseCacheEntries},cacheComponents:!!j.cacheComponents,validationLevel:j.experimental.instantInsights.validationLevel,isDraftMode:z,incrementalCache:K,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:j.cacheLife,staticPageGenerationTimeout:j.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:T,deploymentId:R}},V=new o.x(e),Z=new o.e(t),X=u.k.fromNodeNextRequest(V,(0,u.t)(t)),Y=async({previousCacheEntry:a})=>{try{if(!Q&&E&&k&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===B?await y.handle(X,W):await y.prerender(X,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let n=W.renderOpts.collectedTags;if(!$)return await (0,p.f)(V,Z,i,s),null;{let e=await i.blob(),t=(0,m.S)(i.headers);n&&(t[f.M]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=f.Q)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=f.Q?!1!==a&&a>0?j.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:I.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await y.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==B,isOnDemandRevalidate:E})},!1,q),t}},ee=async i=>{try{var n,l;let i=await y.handleResponse({req:e,nextConfig:j,cacheKey:B,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:F,prerenderManifest:M,isRoutePPREnabled:!1,isOnDemandRevalidate:E,revalidateOnlyGenerated:k,responseGenerator:Y,waitUntil:r.waitUntil,isMinimalMode:Q});if(null!==i&&"error"in i)throw i.error;if(!$)return;if((null==i||null==(n=i.value)?void 0:n.kind)!==I.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`);Q||t.setHeader("x-nextjs-cache",E?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),z&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,m.G)(i.value.headers);Q&&$||s.delete(f.M),!i.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,g.f)(i.cacheControl)),await (0,p.f)(V,Z,new Response(i.value.body,{headers:s,status:i.value.status||200}));return}catch(a){if(a instanceof h.NoFallbackError||await y.onRequestError(e,a,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==B,isOnDemandRevalidate:E})},!1,q),$)throw a;if(t.headersSent){if(i){let e=a instanceof Error?a:Error("Unknown app route error");i.recordException(e),i.setStatus({code:s.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(V,Z,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:s.J.ERROR}),i.setAttribute("error.type",e.toString()));let a=H.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.q.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||D,n=`${_} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":n}),i.updateName(n),A&&A!==i&&(A.setAttribute("http.route",r),A.updateName(n))})()}};J||void 0===e.url||null==x||x.setAttribute("http.target",e.url),await ee(x)}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.f)({workAsyncStorage:b,workUnitAsyncStorage:v})},"routeModule",0,y,"serverHooks",0,x,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,v])},71643,e=>e.a(async(t,a)=>{try{var r=e.i(89171),i=e.i(698043),s=e.i(79832),n=e.i(757660),l=e.i(287012),o=e.i(50377),u=e.i(926828),d=e.i(233437),c=e.i(67105),p=e.i(578504),m=e.i(596426),g=t([s]);[s]=g.then?(await g)():g;let h=(0,o.f)("api:import");async function f(e){let t=await (0,n.getServerSession)(s.f);if(!t?.user?.email)return(0,l.k)("Not authenticated");let a=await i.f.user.findUnique({where:{email:t.user.email}});if(!a)return(0,l.k)("User not found");let{searchParams:o}=new URL(e.url),g="true"===o.get("all");if(g&&"admin"!==t.user.role)return(0,l.Q)("Admin role required");let f=null;try{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>0x3200000)return(0,l.O)("Request body too large (max 50MB)");let s=await e.json(),n=(0,c.e)(s);if(!n.success)return(0,l.O)("Invalid import data format");let o=n.data;if(!g&&o.user.email!==a.email)return(0,l.O)("Import data does not belong to current user");let w=(0,p.d)(o,o.user.email===a.email);f=(0,u.y)({userId:a.id,kind:"data_import"});let{stats:I,masteryIds:y}=await i.f.$transaction(e=>(0,m.c)({tx:e,user:a,importAll:g,normalized:w}),{timeout:6e4});return(0,m.d)(y),I.ttsSpeechesImported=await (0,d.p)(o.ttsSpeeches).catch(e=>(h.warn({error:e},"Failed to import TTS speeches"),0)),f.succeed(),h.info({userId:a.id,scope:g?"all":"user",...I},"Data import completed"),r.NextResponse.json({success:!0,stats:I})}catch(e){return f?.fail(e),h.error({error:e,userId:a.id},"Import failed"),(0,l.g)("Failed to import data")}}e.s(["POST",0,f]),a()}catch(e){a(e)}},!1),578504,e=>{var t=e.i(604147),a=e.i(180473),r=e.i(206033),i=e.i(414102),s=e.i(995408),n=e.i(118328),l=e.i(357189),o=e.i(411706),u=e.i(999617),d=e.i(819428),c=e.i(603177),p=e.i(133007),m=e.i(261829),g=e.i(377807),f=e.i(721312),h=e.i(595886);let w={gradeRecognitionMode:t.z.enum(l.K),fixedGradeSemester:t.z.enum(o.H).nullable(),confirmBeforeImport:a.z.boolean(),questionDuplicateThreshold:r.z.number().min(1).max(100),masteryThreshold:r.z.number().int().min(s.P).max(s.o),enableGeogebra:a.z.boolean(),enableSvgAnimation:a.z.boolean(),themePreference:t.z.enum(n.f)};function I(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function y(e){var t,a,r;let s,n,l="number"==typeof(t=e.masteryProbability)&&Number.isFinite(t)&&t>=0&&t<=1?t:null,o=null===l?void 0:I(e.masteryEvaluatedAt),f=(0,d.W)(e.figureSvg);return{raw:e,masteryProbability:l,masteryEvaluatedAt:o,difficultyStars:(0,u.B)(e.difficultyStars),masteryLevel:isNaN(s="number"==typeof(a=e.masteryLevel)?a:parseInt(String(a),10))||s<0||s>2?0:s,hasFigure:!0===e.hasFigure||null!==f,figureSvg:f,figureScale:(0,c.V)(e.figureScale),figureAlign:(0,c.o)(e.figureAlign),answerSpacePx:(0,p.T)(e.answerSpacePx),geogebraCommands:"string"==typeof e.geogebraCommands&&e.geogebraCommands?e.geogebraCommands:null,svgAnimation:(0,m.J)(e.svgAnimation),svgAnimationEn:(0,m.J)(e.svgAnimationEn),lastPractice:(r=e.lastPractice,(n=(0,i.a)(r))?JSON.stringify(n):null),createdAt:I(e.createdAt),updatedAt:I(e.updatedAt),questionType:(0,g.P)(e.questionType)}}function b(e){let t=Array.isArray(e.questions)?e.questions:[],a=f.r.includes(e.mode||"")?e.mode:"generate";return{raw:e,createdAt:I(e.createdAt),updatedAt:I(e.updatedAt),resultsRecordedAt:I(e.resultsRecordedAt),scope:f.A.includes(e.scope)?e.scope:"all",mode:a,difficulty:"original"===a?"original":f.Q.includes(e.difficulty)?e.difficulty:"medium",groupByType:!0===e.groupByType,requestedCount:Number.isInteger(e.requestedCount)&&e.requestedCount>0?e.requestedCount:t.length,tagNames:"string"==typeof e.tagNames?e.tagNames:null,statuses:t.map(e=>"ready"===e.status?"ready":"failed")}}function v(e){return{raw:e,result:(0,h.N)(e.result)?e.result:void 0,createdAt:I(e.createdAt),source:["practice","manual","exam","duplicate_import"].includes(e.source||"")?e.source:"practice"}}e.s(["c",0,function(e,t){try{let a=JSON.parse(e||"[]");if(!Array.isArray(a))return"[]";return JSON.stringify(a.flatMap(e=>"string"==typeof e&&t.has(e)?[t.get(e)]:[]))}catch{return"[]"}},"d",0,function(e,t){let a=t?function(e){let t={};for(let[a,r]of Object.entries(w)){let i=r.safeParse(e[a]);i.success&&Object.assign(t,{[a]:i.data})}return t}(e.user):{};return{data:e,preferences:a,hasPreferences:Object.keys(a).length>0,subjects:e.subjects??[],systemTags:e.systemTags??[],customTags:e.customTags??[],errorItems:e.errorItems.map(y),reviewSchedules:(e.reviewSchedules??[]).map(e=>({raw:e,scheduledFor:I(e.scheduledFor),completedAt:I(e.completedAt)})),practiceRecords:(e.practiceRecords??[]).map(v),examPapers:(e.examPapers??[]).map(b),paperGroups:e.paperGroups??[]}}])},596426,e=>{var t=e.i(595886),a=e.i(668426);async function r(e){let{tx:t,user:a,normalized:r,stats:i}=e;r.hasPreferences&&(await t.user.update({where:{id:a.id},data:r.preferences}),i.preferencesRestored=!0)}async function i(e){let{tx:t,user:r,importAll:i,normalized:s,stats:n,subjectIdMap:l}=e;for(let e of s.subjects){let s=i?e.userId:r.id,o=await t.subject.findFirst({where:{name:e.name,userId:s}});if(o)l.set(e.id,o.id);else{let r=(0,a.v)(e),i=await t.subject.create({data:{name:e.name,stage:r.stage,subjectKey:r.subject,tagSet:e.tagSet||"default",userId:s}});l.set(e.id,i.id),n.subjectsCreated++}}}var s=e.i(43940);async function n(e){let{tx:t,normalized:a,systemTagIdMap:r}=e;for(let e of(0,s.f)(a.systemTags)){let a=e.parentId?r.get(e.parentId)??null:null,i=await t.knowledgeTag.findFirst({where:{name:e.name,subject:e.subject,isSystem:!0,tagSet:e.tagSet||"default",parentId:a}});if(i)r.set(e.id,i.id);else{let i=await t.knowledgeTag.create({data:{name:e.name,subject:e.subject,isSystem:!0,tagSet:e.tagSet||"default",parentId:a,order:e.order||0,code:e.code}});r.set(e.id,i.id)}}}async function l(e){let{tx:t,user:a,importAll:r,normalized:i,stats:n,tagIdMap:l,systemTagIdMap:o}=e;for(let e of(0,s.f)(i.customTags)){let i=r?e.userId:a.id,s=e.tagSet||"default",u=e.parentId?l.get(e.parentId)??o.get(e.parentId)??null:null,d=await t.knowledgeTag.findFirst({where:{name:e.name,subject:e.subject,userId:i,isSystem:!1,tagSet:s,parentId:u}});if(d)l.set(e.id,d.id);else{let a=await t.knowledgeTag.create({data:{name:e.name,subject:e.subject,isSystem:!1,userId:i,tagSet:e.tagSet||"default",parentId:u,order:e.order||0,code:e.code}});l.set(e.id,a.id),n.tagsCreated++}}}async function o(e){let{tx:t,user:a,importAll:r,normalized:i,subjectTagSetMap:s,tagBySetAndName:n,tagNameMap:l}=e;for(let e of i.subjects)e.tagSet&&s.set(e.id,e.tagSet);let o=new Set;for(let e of i.errorItems)if(e.raw.tags)for(let t of e.raw.tags)o.add(t.name);let u=await t.knowledgeTag.findMany({where:{name:{in:Array.from(o)},OR:[{isSystem:!0},...r?[]:[{userId:a.id}]]}});for(let e of u){let t=`${e.tagSet}::${e.name}`;n.has(t)&&(r||e.userId!==a.id)||n.set(t,e.id)}for(let e of u)l.has(e.name)&&(r||e.userId!==a.id)||l.set(e.name,e.id)}var u=e.i(204028),d=e.i(299021),c=e.i(555231),p=e.i(655920);async function m(e){let{tx:t,user:a,importAll:r,normalized:i,paperGroupIdMap:s}=e;for(let e of i.paperGroups){let i=r?e.userId:a.id,n=await t.paperGroup.findFirst({where:{id:e.id,userId:i}});if(n)s.set(e.id,n.id);else{let a=await t.paperGroup.findFirst({where:{name:e.name,userId:i}});if(a)s.set(e.id,a.id);else{let a=await t.paperGroup.create({data:{userId:i,key:e.key,name:e.name,order:e.order||0,isActive:!1!==e.isActive}});s.set(e.id,a.id)}}}}async function g(e){let{tx:t,user:a,importAll:r,normalized:i,legacyLevelMap:s}=e;for(let e of i.errorItems){let i=r?e.raw.userId:a.id;if(!s.has(`${i}:a`)){let e=await (0,p.G)(i,t);s.set(`${i}:a`,e.a||""),s.set(`${i}:b`,e.b||""),s.set(`${i}:other`,e.other||"")}}}async function f(e,t,a,r){let{tx:i,paperGroupIdMap:s,legacyLevelMap:n}=e,l=null;if(a)if(s.has(a))l=s.get(a);else if(n.has(`${t}:${a}`))l=n.get(`${t}:${a}`)||null;else{let e=await i.paperGroup.findFirst({where:{id:a,userId:t}});l=e?.id||null}return l||null===r||(l=await (0,p.H)(t,r,i)),l}async function h(e,t,a){let{tx:r,tagIdMap:i,systemTagIdMap:s,subjectTagSetMap:n,tagBySetAndName:l,tagNameMap:o,stats:u}=e,d=a.raw;if(!d.tags||0===d.tags.length)return;let c=d.subjectId&&n.get(d.subjectId)||"default",p=[];for(let e of d.tags)if(i.has(e.id))p.push({id:i.get(e.id)});else if(s.has(e.id))p.push({id:s.get(e.id)});else{let t=l.get(`${c}::${e.name}`),a=o.get(e.name),r=t||a;r&&p.push({id:r})}p.length>0&&(await r.errorItem.update({where:{id:t},data:{tags:{connect:p}}}),u.tagsLinked+=p.length)}async function w(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,masteryIds:n,evaluatedIds:l,errorItemIdMap:o,errorItemOwnerMap:p,subjectIdMap:m}=e;for(let w of(await g(e),i.errorItems)){let{raw:i}=w,g=r?i.userId:a.id;p.set(i.id,g);let I=i.subjectId?m.get(i.subjectId):void 0,y=await (0,c.B)(t,g,i);if(y){let e=await (0,c.c)(t,g,y,i);o.set(i.id,e.id),n.add(e.id),s.duplicateErrorItems++,s.practiceRecordsCreated++;continue}let b=(0,d.P)(i.shortId)&&!await t.errorItem.findUnique({where:{shortId:i.shortId},select:{id:!0}}),v=await f(e,g,i.paperLevel,w.difficultyStars),x=await t.errorItem.create({data:{shortId:b?i.shortId:await (0,u.f)(t),userId:g,subjectId:I||void 0,originalImageUrl:i.originalImageUrl||"",ocrText:i.ocrText,questionText:i.questionText,answerText:i.answerText,analysis:i.analysis,wrongAnswerText:i.wrongAnswerText,mistakeAnalysis:i.mistakeAnalysis,mistakeStatus:i.mistakeStatus,knowledgePoints:i.knowledgePoints,source:i.source,errorType:i.errorType,userNotes:i.userNotes,masteryLevel:w.masteryLevel,gradeSemester:i.gradeSemester,paperLevel:v,difficultyStars:w.difficultyStars,hasFigure:w.hasFigure,figureSvg:w.figureSvg,figureScale:w.figureScale,figureAlign:w.figureAlign,answerSpacePx:w.answerSpacePx,geogebraCommands:w.geogebraCommands,svgAnimation:w.svgAnimation,svgAnimationEn:w.svgAnimationEn,lastPractice:w.lastPractice,questionType:w.questionType,...null!==w.masteryProbability&&w.masteryEvaluatedAt?{masteryProbability:w.masteryProbability,masteryReason:i.masteryReason??null,masterySource:"ai"===i.masterySource||"rule"===i.masterySource?i.masterySource:null,masteryEvaluatedAt:w.masteryEvaluatedAt}:{},createdAt:w.createdAt,updatedAt:w.updatedAt}});o.set(i.id,x.id),x.masteryEvaluatedAt&&l.add(x.id),s.errorItemsCreated++,await h(e,x.id,w)}}var I=e.i(721312),y=e.i(819428),b=e.i(603177),v=e.i(133007),x=e.i(731054),A=e.i(377807),S=e.i(578504);async function T(e){let{tx:t,normalized:a,stats:r,errorItemIdMap:i}=e;for(let e of a.reviewSchedules){let a=i.get(e.raw.errorItemId);if(a&&e.scheduledFor){if(await t.reviewSchedule.findFirst({where:{errorItemId:a,scheduledFor:e.scheduledFor}}))continue;await t.reviewSchedule.create({data:{errorItemId:a,scheduledFor:e.scheduledFor,completedAt:e.completedAt,isCorrect:e.raw.isCorrect}}),r.reviewSchedulesCreated++}}}async function R(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,examPaperIdMap:n,examQuestionIdMap:l,examQuestionOwnerMap:o,subjectIdMap:u,errorItemIdMap:d,errorItemOwnerMap:c}=e;for(let e of i.examPapers){let{raw:i}=e,p=r?i.userId:a.id,m=Array.isArray(i.questions)?i.questions:[],g=e.createdAt&&await t.examPaper.findFirst({where:{userId:p,title:i.title,createdAt:e.createdAt},select:{id:!0,questions:{select:{id:!0,order:!0}}}});if(g){for(let e of(n.set(i.id,g.id),m)){let t=g.questions.find(t=>t.order===e.order);t&&(l.set(e.id,t.id),o.set(e.id,p))}continue}let f=await t.examPaper.create({data:{userId:p,title:String(i.title||""),status:e.statuses.length>0?(0,I.$)(e.statuses):"failed",scope:e.scope,mode:e.mode,difficulty:e.difficulty,requestedCount:e.requestedCount,subjectIds:(0,S.c)(i.subjectIds,u),tagNames:e.tagNames,groupByType:e.groupByType,resultsRecordedAt:e.resultsRecordedAt,createdAt:e.createdAt,updatedAt:e.updatedAt}});for(let[a,r]of m.entries()){let i=r.errorItemId&&c.get(r.errorItemId)===p?d.get(r.errorItemId):void 0,s=await t.examQuestion.create({data:{paperId:f.id,order:Number.isInteger(r.order)?r.order:a,errorItemId:i,sourceShortId:String(r.sourceShortId||""),status:e.statuses[a],questionText:r.questionText,answerText:r.answerText,analysis:r.analysis,figureSvg:(0,y.W)(r.figureSvg),figureScale:(0,b.V)(r.figureScale),figureAlign:(0,b.o)(r.figureAlign),answerSpacePx:(0,v.T)(r.answerSpacePx),score:(0,x.H)(r.score??null),questionType:(0,A.P)(r.questionType),error:r.error}});l.set(r.id,s.id),o.set(r.id,p)}n.set(i.id,f.id),s.examPapersCreated++}}async function C(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,masteryIds:n,evaluatedIds:l,errorItemIdMap:o,errorItemOwnerMap:u,examQuestionIdMap:d,examQuestionOwnerMap:c}=e;for(let e of i.practiceRecords){let{raw:i}=e,p=r?i.userId:a.id,m=i.errorItemId&&u.get(i.errorItemId)===p?o.get(i.errorItemId):void 0,g=i.examQuestionId&&c.get(i.examQuestionId)===p?d.get(i.examQuestionId):void 0;await t.practiceRecord.create({data:{userId:p,subject:i.subject,difficulty:i.difficulty,isCorrect:i.isCorrect,...m?{errorItemId:m,result:e.result,questionText:i.questionText,answerText:i.answerText,analysis:i.analysis,wrongAnswerText:i.wrongAnswerText,mistakeAnalysis:i.mistakeAnalysis,originalImageUrl:i.originalImageUrl,figureSvg:(0,y.W)(i.figureSvg),source:e.source,examQuestionId:g}:{},createdAt:e.createdAt}}),s.practiceRecordsCreated++,m&&e.result&&!l.has(m)&&n.add(m)}}async function j(e){let{tx:a,user:r,normalized:i}=e;"number"==typeof i.preferences.masteryThreshold&&await (0,t.i)(a,r.id,i.preferences.masteryThreshold)}var P=e.i(971724),z=e.i(105954),M=e.i(206033),q=e.i(180473),E=e.i(604147),k=e.i(999617),N=e.i(893857),O=e.i(276041),U=e.i(843716);let F=/^data:image\/(?:jpeg|png|webp);base64,[A-Za-z0-9+/]+=*$/,D=/^[A-Za-z0-9_-]{8,64}$/,L=P.z.object({id:z.z.string().regex(D).optional(),clientRequestId:z.z.string().regex(D).nullish(),userId:z.z.string().max(100).optional(),mode:z.z.string().optional(),status:z.z.string().optional(),language:z.z.string().optional(),subjectId:z.z.string().max(100).nullish(),targetSubjectId:z.z.string().max(100).nullish(),paperLevel:z.z.string().max(100).nullish(),imageData:z.z.string().max(0xf00000).nullish(),imageInfo:z.z.string().max(1e4).nullish(),result:z.z.string().max(5e5).nullish(),error:z.z.string().max(200).nullish(),timings:z.z.string().max(1e4).nullish(),attempts:M.z.number().int().min(1).max(1e3).optional(),createdAt:z.z.string().optional(),finishedAt:z.z.string().nullish(),batchId:z.z.string().max(100).nullish(),batchItemKey:z.z.string().max(40).nullish(),inputText:z.z.string().max(4e4).nullish(),errorItemId:z.z.string().max(100).nullish(),duplicate:q.z.boolean().optional()}),$=P.z.object({id:z.z.string().regex(D),clientRequestId:z.z.string().regex(D).nullish(),userId:z.z.string().max(100).optional(),source:E.z.enum(["text","image"]),splitter:E.z.enum(["local","ai"]).optional(),status:z.z.string().optional(),mode:z.z.string().nullish(),language:z.z.string().optional(),subjectId:z.z.string().max(100).nullish(),targetSubjectId:z.z.string().max(100).nullish(),paperLevel:z.z.string().max(100).nullish(),sourceText:z.z.string().max(U.i).nullish(),imageData:z.z.string().max(0xf00000).nullish(),imageInfo:z.z.string().max(1e4).nullish(),draft:z.z.string().max(2e6).nullish(),error:z.z.string().max(200).nullish(),attempts:M.z.number().int().min(1).max(1e3).optional(),createdAt:z.z.string().optional(),startedAt:z.z.string().nullish(),finishedAt:z.z.string().nullish()});function G(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}let B=(e,t)=>e&&t.has(e)?t.get(e):null;async function _(e,t,a){let r=new Map;if(!Array.isArray(t))return{created:0,idMap:r};let i=0;for(let s of t){let t=$.safeParse(s);if(!t.success)continue;let n=t.data,l=a.resolveUserId(n.userId??"");if(await e.user.count({where:{id:l}})===0)continue;let o=n.clientRequestId||n.id,u=await e.importBatch.findFirst({where:{userId:l,OR:[{clientRequestId:o},{id:o}]},select:{id:!0}});if(u){r.set(n.id,u.id);continue}let d=n.imageData&&F.test(n.imageData)?n.imageData:"",c=function(e){if(!e)return null;try{let t=O.Z.safeParse(JSON.parse(e));return t.success?JSON.stringify(t.data):null}catch{return null}}(n.draft);if(!c&&!d&&!n.sourceText)continue;let p="started"===n.status?"started":"draft"===n.status&&c?"draft":"failed",m="failed"===p?"splitting"===n.status||"draft"===n.status?N.U:n.error||N.U:null,g=await e.importBatch.create({data:{userId:l,clientRequestId:o,source:n.source,splitter:n.splitter??("image"===n.source?"ai":"local"),status:p,mode:"auto"===n.mode||"review"===n.mode?n.mode:null,language:"en"===n.language?"en":"zh",subjectId:B(n.subjectId,a.subjectIdMap),targetSubjectId:B(n.targetSubjectId,a.subjectIdMap),paperLevel:B(n.paperLevel,a.paperGroupIdMap),sourceText:n.sourceText??null,imageData:d,imageInfo:n.imageInfo??null,draft:c,error:m,attempts:n.attempts??1,createdAt:G(n.createdAt),startedAt:G(n.startedAt)??null,finishedAt:G(n.finishedAt)??new Date},select:{id:!0}});r.set(n.id,g.id),i++}return{created:i,idMap:r}}async function H(e,t,a){if(!Array.isArray(t))return 0;let r=0,i=new Map;for(let s of t){let t=L.safeParse(s);if(!t.success)continue;let n=t.data,l=a.resolveUserId(n.userId??"");if(i.has(l)||i.set(l,await e.user.count({where:{id:l}})>0),!i.get(l))continue;let o=n.imageData&&F.test(n.imageData)?n.imageData:"",u=function(e){if(!e)return null;try{let t=k.U.safeParse(JSON.parse(e));return t.success?JSON.stringify(t.data):null}catch{return null}}(n.result),d=n.inputText?.trim()?n.inputText:null,c=n.batchId&&a.batchIdMap?.has(n.batchId)?a.batchIdMap.get(n.batchId):null,p="saved"===n.status&&null!==c;if("saved"===n.status&&!p||!p&&!u&&!o&&!d)continue;let m=G(n.createdAt),g=n.clientRequestId||n.id;if(g&&await e.importTask.count({where:{userId:l,OR:[{clientRequestId:g},{id:g}]}})>0)continue;let f="auto"===n.mode?"auto":"review",h=p?"saved":"review"===n.status&&u?"review":"failed",w=p&&n.errorItemId?a.errorItemIdMap?.get(n.errorItemId)??null:null,I="failed"===h?"analyzing"===n.status||"saving"===n.status?N.U:n.error||N.U:null;await e.importTask.create({data:{userId:l,clientRequestId:g??null,mode:f,status:h,language:"en"===n.language?"en":"zh",subjectId:B(n.subjectId,a.subjectIdMap),targetSubjectId:B(n.targetSubjectId,a.subjectIdMap),paperLevel:B(n.paperLevel,a.paperGroupIdMap),imageData:o,imageInfo:n.imageInfo??null,result:u,error:I,timings:n.timings??null,attempts:n.attempts??1,inputText:d,batchId:c,batchItemKey:c?n.batchItemKey??null:null,errorItemId:w,duplicate:!!p&&!0===n.duplicate,...p?{readAt:new Date}:{},createdAt:m,finishedAt:G(n.finishedAt)??new Date}}),r++}return r}var J=e.i(772138);async function Q(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,subjectIdMap:n,paperGroupIdMap:l,errorItemIdMap:o}=e,u={resolveUserId:e=>r?e:a.id,subjectIdMap:n,paperGroupIdMap:l,errorItemIdMap:o},d=await _(t,i.data.importBatches,u);s.importBatchesCreated=d.created,s.importTasksCreated=await H(t,i.data.importTasks,{...u,batchIdMap:d.idMap})}async function K(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,subjectIdMap:n,errorItemIdMap:l,tagIdMap:o,examPaperIdMap:u,examQuestionIdMap:d}=e;s.extensionsImported=await (0,J.G)({tx:t,userIdMap:e=>r?e:a.id,subjectIdMap:n,errorItemIdMap:l,tagIdMap:o,examPaperIdMap:u,examQuestionIdMap:d},i.data.extensions)}async function W(e){let t=function({tx:e,user:t,importAll:a,normalized:r}){return{tx:e,user:t,importAll:a,normalized:r,stats:{subjectsCreated:0,tagsCreated:0,errorItemsCreated:0,reviewSchedulesCreated:0,examPapersCreated:0,preferencesRestored:!1,practiceRecordsCreated:0,tagsLinked:0,duplicateErrorItems:0,ttsSpeechesImported:0,importTasksCreated:0,importBatchesCreated:0,extensionsImported:{}},masteryIds:new Set,evaluatedIds:new Set,subjectIdMap:new Map,systemTagIdMap:new Map,tagIdMap:new Map,subjectTagSetMap:new Map,tagBySetAndName:new Map,tagNameMap:new Map,paperGroupIdMap:new Map,legacyLevelMap:new Map,errorItemIdMap:new Map,errorItemOwnerMap:new Map,examPaperIdMap:new Map,examQuestionIdMap:new Map,examQuestionOwnerMap:new Map}}(e);return await r(t),await i(t),await n(t),await l(t),await o(t),await m(t),await w(t),await T(t),await R(t),await C(t),await j(t),await Q(t),await K(t),{stats:t.stats,masteryIds:[...t.masteryIds]}}e.s(["c",0,W,"d",0,function(e){e.length&&(0,t.d)(e)}],596426)}]})();
|
|
1
|
+
(()=>{"use strict";module.exports=[583557,e=>{var t=e.i(747909),a=e.i(174017),r=e.i(996250),i=e.i(759756),s=e.i(561916),n=e.i(174677),l=e.i(869741),o=e.i(316795),d=e.i(487718),u=e.i(995169),c=e.i(47587),p=e.i(666012),m=e.i(570101),g=e.i(626937),f=e.i(10372),h=e.i(193695),w=e.i(509580);e.i(52474);var I=e.i(600220);let y=new t.AppRouteRouteModule({definition:{kind:a.f.APP_ROUTE,page:"/api/import/route",pathname:"/api/import",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/src/app/api/import/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(71643),...{}}),{workAsyncStorage:b,workUnitAsyncStorage:v,serverHooks:x}=y;async function A(e,t,a){a.requestMeta&&(0,i.R)(e,a.requestMeta),y.isDev&&(0,i.i)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let r="/api/import/route";r=r.replace(/\/index$/,"")||"/";let{instrumentation:n}=await y.ensureInstrumentation(e,{deferSpans:!0});return y.traceRequest(e,{tracer:(0,s.v)(),spanName:`${e.method||"GET"} ${r}`,httpTarget:e.url,instrumentation:n},(i,s)=>S(e,t,a,r,!1,i,s))}async function S(e,t,r,b,v,x,A){let S=await y.prepare(e,t,{srcPage:b,multiZoneDraftMode:v});if(!S)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:T,deploymentId:R,params:C,nextConfig:j,parsedUrl:P,isDraftMode:z,prerenderManifest:M,routerServerContext:q,isOnDemandRevalidate:k,revalidateOnlyGenerated:E,resolvedPathname:N,clientReferenceManifest:O,serverActionsManifest:U,previewProps:F}=S,D=(0,l.f)(b),$=!!M.routes[N]&&(y.isDev||(0,w.f)(N,y.cacheOwner,M.routes[N])),L=!!(M.dynamicRoutes[D]||$),G=async()=>((null==q?void 0:q.render404)?await q.render404(e,t,P,!1):t.end("This page could not be found"),null);if(L&&!z){let e=M.dynamicRoutes[D];if(e&&!1===e.fallback&&!$){if(j.adapterPath)return await G();throw new h.NoFallbackError}}let B=null;!L||y.isDev||z||(B="/index"===(B=N)?"/":B),U&&O&&(0,n.f)({page:b,clientReferenceManifest:O,serverActionsManifest:U});let _=e.method||"GET",H=(0,s.v)(),J=!!(null==q?void 0:q.isWrappedByNextServer),Q=!!(0,i.w)(e,"minimalMode"),K=(0,i.w)(e,"incrementalCache")||await y.getIncrementalCache(e,j,F,M,Q);null==K||K.resetRequestCache(),globalThis.__incrementalCache=K;let W={params:C,previewProps:F,renderOpts:{experimental:{authInterrupts:!!j.experimental.authInterrupts,useCacheTimeout:j.experimental.useCacheTimeout,durableUseCacheEntries:!!j.experimental.durableUseCacheEntries},cacheComponents:!!j.cacheComponents,validationLevel:j.experimental.instantInsights.validationLevel,isDraftMode:z,incrementalCache:K,hmrRefreshHash:(0,i.w)(e,"hmrRefreshHash"),cacheLifeProfiles:j.cacheLife,staticPageGenerationTimeout:j.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0},sharedContext:{buildId:T,deploymentId:R}},V=new o.x(e),Z=new o.e(t),X=d.k.fromNodeNextRequest(V,(0,d.t)(t)),Y=async({previousCacheEntry:a})=>{try{if(!Q&&k&&E&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=null===B?await y.handle(X,W):await y.prerender(X,W);e.fetchMetrics=W.renderOpts.fetchMetrics;let s=W.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let n=W.renderOpts.collectedTags;if(!L)return await (0,p.f)(V,Z,i,s),null;{let e=await i.blob(),t=(0,m.S)(i.headers);n&&(t[f.M]=n),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=f.Q)&&W.renderOpts.collectedRevalidate,r=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=f.Q?!1!==a&&a>0?j.expireTime:void 0:W.renderOpts.collectedExpire;return{value:{kind:I.x.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await y.onRequestError(e,t,{routerKind:"App Router",routePath:b,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==B,isOnDemandRevalidate:k})},!1,q),t}},ee=async i=>{try{var n,l;let i=await y.handleResponse({req:e,nextConfig:j,cacheKey:B,routeKind:a.f.APP_ROUTE,isFallback:!1,previewProps:F,prerenderManifest:M,isRoutePPREnabled:!1,isOnDemandRevalidate:k,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:r.waitUntil,isMinimalMode:Q});if(null!==i&&"error"in i)throw i.error;if(!L)return;if((null==i||null==(n=i.value)?void 0:n.kind)!==I.x.APP_ROUTE)throw Error(`Invariant: app-route received invalid cache entry ${null==i||null==(l=i.value)?void 0:l.kind}`);Q||t.setHeader("x-nextjs-cache",k?"REVALIDATED":i.isMiss?"MISS":i.isStale?"STALE":"HIT"),z&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,m.G)(i.value.headers);Q&&L||s.delete(f.M),!i.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,g.f)(i.cacheControl)),await (0,p.f)(V,Z,new Response(i.value.body,{headers:s,status:i.value.status||200}));return}catch(a){if(a instanceof h.NoFallbackError||await y.onRequestError(e,a,{routerKind:"App Router",routePath:D,routeType:"route",revalidateReason:(0,c.f)({isStaticGeneration:null!==B,isOnDemandRevalidate:k})},!1,q),L)throw a;if(t.headersSent){if(i){let e=a instanceof Error?a:Error("Unknown app route error");i.recordException(e),i.setStatus({code:s.J.ERROR,message:e.message}),i.setAttribute("error.type",e.name)}t.writableEnded||t.destroyed||t.end()}else await (0,p.f)(V,Z,new Response(null,{status:500}));return}finally{(()=>{if(!i)return;let e=t.statusCode;i.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(i.setStatus({code:s.J.ERROR}),i.setAttribute("error.type",e.toString()));let a=H.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==u.q.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||D,n=`${_} ${r}`;i.setAttributes({"next.route":r,"http.route":r,"next.span_name":n}),i.updateName(n),A&&A!==i&&(A.setAttribute("http.route",r),A.updateName(n))})()}};J||void 0===e.url||null==x||x.setAttribute("http.target",e.url),await ee(x)}e.s(["handler",0,A,"patchFetch",0,function(){return(0,r.f)({workAsyncStorage:b,workUnitAsyncStorage:v})},"routeModule",0,y,"serverHooks",0,x,"workAsyncStorage",0,b,"workUnitAsyncStorage",0,v])},71643,e=>e.a(async(t,a)=>{try{var r=e.i(89171),i=e.i(698043),s=e.i(79832),n=e.i(757660),l=e.i(287012),o=e.i(50377),d=e.i(926828),u=e.i(233437),c=e.i(67105),p=e.i(578504),m=e.i(596426),g=t([s]);[s]=g.then?(await g)():g;let h=(0,o.f)("api:import");async function f(e){let t=await (0,n.getServerSession)(s.f);if(!t?.user?.email)return(0,l.k)("Not authenticated");let a=await i.f.user.findUnique({where:{email:t.user.email}});if(!a)return(0,l.k)("User not found");let{searchParams:o}=new URL(e.url),g="true"===o.get("all");if(g&&"admin"!==t.user.role)return(0,l.Q)("Admin role required");try{let t=e.headers.get("content-length");if(t&&parseInt(t,10)>0x3200000)return(0,l.O)("Request body too large (max 50MB)");let s=await e.json(),n=(0,c.e)(s);if(!n.success)return(0,l.O)("Invalid import data format");let o=n.data;if(!g&&o.user.email!==a.email)return(0,l.O)("Import data does not belong to current user");let f=(0,p.d)(o,o.user.email===a.email),w=`user:${a.id}:data-import`,I=(0,d.F)({userId:a.id,kind:"data_import",target:w});if(!I)return(0,l.W)((0,d.M)(a.id,w)??{id:"",kind:"data_import",startedAt:"",target:w});try{let{stats:e,masteryIds:t}=await i.f.$transaction(e=>(0,m.c)({tx:e,user:a,importAll:g,normalized:f}),{timeout:6e4});return(0,m.d)(t),e.ttsSpeechesImported=await (0,u.p)(o.ttsSpeeches).catch(e=>(h.warn({error:e},"Failed to import TTS speeches"),0)),I.succeed(),h.info({userId:a.id,scope:g?"all":"user",...e},"Data import completed"),r.NextResponse.json({success:!0,stats:e})}catch(e){throw I.fail(e),e}}catch(e){return h.error({error:e,userId:a.id},"Import failed"),(0,l.g)("Failed to import data")}}e.s(["POST",0,f]),a()}catch(e){a(e)}},!1),578504,e=>{var t=e.i(604147),a=e.i(180473),r=e.i(206033),i=e.i(414102),s=e.i(995408),n=e.i(118328),l=e.i(357189),o=e.i(411706),d=e.i(999617),u=e.i(819428),c=e.i(603177),p=e.i(133007),m=e.i(261829),g=e.i(377807),f=e.i(721312),h=e.i(595886);let w={gradeRecognitionMode:t.z.enum(l.K),fixedGradeSemester:t.z.enum(o.H).nullable(),confirmBeforeImport:a.z.boolean(),questionDuplicateThreshold:r.z.number().min(1).max(100),masteryThreshold:r.z.number().int().min(s.P).max(s.o),enableGeogebra:a.z.boolean(),enableSvgAnimation:a.z.boolean(),themePreference:t.z.enum(n.f)};function I(e){if(!e)return;let t=new Date(e);return isNaN(t.getTime())?void 0:t}function y(e){var t,a,r;let s,n,l="number"==typeof(t=e.masteryProbability)&&Number.isFinite(t)&&t>=0&&t<=1?t:null,o=null===l?void 0:I(e.masteryEvaluatedAt),f=(0,u.W)(e.figureSvg);return{raw:e,masteryProbability:l,masteryEvaluatedAt:o,difficultyStars:(0,d.B)(e.difficultyStars),masteryLevel:isNaN(s="number"==typeof(a=e.masteryLevel)?a:parseInt(String(a),10))||s<0||s>2?0:s,hasFigure:!0===e.hasFigure||null!==f,figureSvg:f,figureScale:(0,c.V)(e.figureScale),figureAlign:(0,c.o)(e.figureAlign),answerSpacePx:(0,p.T)(e.answerSpacePx),geogebraCommands:"string"==typeof e.geogebraCommands&&e.geogebraCommands?e.geogebraCommands:null,svgAnimation:(0,m.J)(e.svgAnimation),svgAnimationEn:(0,m.J)(e.svgAnimationEn),lastPractice:(r=e.lastPractice,(n=(0,i.a)(r))?JSON.stringify(n):null),createdAt:I(e.createdAt),updatedAt:I(e.updatedAt),questionType:(0,g.P)(e.questionType)}}function b(e){let t=Array.isArray(e.questions)?e.questions:[],a=f.r.includes(e.mode||"")?e.mode:"generate";return{raw:e,createdAt:I(e.createdAt),updatedAt:I(e.updatedAt),resultsRecordedAt:I(e.resultsRecordedAt),scope:f.A.includes(e.scope)?e.scope:"all",mode:a,difficulty:"original"===a?"original":f.Q.includes(e.difficulty)?e.difficulty:"medium",groupByType:!0===e.groupByType,requestedCount:Number.isInteger(e.requestedCount)&&e.requestedCount>0?e.requestedCount:t.length,tagNames:"string"==typeof e.tagNames?e.tagNames:null,statuses:t.map(e=>"ready"===e.status?"ready":"failed")}}function v(e){return{raw:e,result:(0,h.N)(e.result)?e.result:void 0,createdAt:I(e.createdAt),source:["practice","manual","exam","duplicate_import"].includes(e.source||"")?e.source:"practice"}}e.s(["c",0,function(e,t){try{let a=JSON.parse(e||"[]");if(!Array.isArray(a))return"[]";return JSON.stringify(a.flatMap(e=>"string"==typeof e&&t.has(e)?[t.get(e)]:[]))}catch{return"[]"}},"d",0,function(e,t){let a=t?function(e){let t={};for(let[a,r]of Object.entries(w)){let i=r.safeParse(e[a]);i.success&&Object.assign(t,{[a]:i.data})}return t}(e.user):{};return{data:e,preferences:a,hasPreferences:Object.keys(a).length>0,subjects:e.subjects??[],systemTags:e.systemTags??[],customTags:e.customTags??[],errorItems:e.errorItems.map(y),reviewSchedules:(e.reviewSchedules??[]).map(e=>({raw:e,scheduledFor:I(e.scheduledFor),completedAt:I(e.completedAt)})),practiceRecords:(e.practiceRecords??[]).map(v),examPapers:(e.examPapers??[]).map(b),paperGroups:e.paperGroups??[]}}])},596426,e=>{var t=e.i(595886),a=e.i(668426);async function r(e){let{tx:t,user:a,normalized:r,stats:i}=e;r.hasPreferences&&(await t.user.update({where:{id:a.id},data:r.preferences}),i.preferencesRestored=!0)}async function i(e){let{tx:t,user:r,importAll:i,normalized:s,stats:n,subjectIdMap:l}=e;for(let e of s.subjects){let s=i?e.userId:r.id,o=await t.subject.findFirst({where:{name:e.name,userId:s}});if(o)l.set(e.id,o.id);else{let r=(0,a.v)(e),i=await t.subject.create({data:{name:e.name,stage:r.stage,subjectKey:r.subject,tagSet:e.tagSet||"default",userId:s}});l.set(e.id,i.id),n.subjectsCreated++}}}var s=e.i(43940);async function n(e){let{tx:t,normalized:a,systemTagIdMap:r}=e;for(let e of(0,s.f)(a.systemTags)){let a=e.parentId?r.get(e.parentId)??null:null,i=await t.knowledgeTag.findFirst({where:{name:e.name,subject:e.subject,isSystem:!0,tagSet:e.tagSet||"default",parentId:a}});if(i)r.set(e.id,i.id);else{let i=await t.knowledgeTag.create({data:{name:e.name,subject:e.subject,isSystem:!0,tagSet:e.tagSet||"default",parentId:a,order:e.order||0,code:e.code}});r.set(e.id,i.id)}}}async function l(e){let{tx:t,user:a,importAll:r,normalized:i,stats:n,tagIdMap:l,systemTagIdMap:o}=e;for(let e of(0,s.f)(i.customTags)){let i=r?e.userId:a.id,s=e.tagSet||"default",d=e.parentId?l.get(e.parentId)??o.get(e.parentId)??null:null,u=await t.knowledgeTag.findFirst({where:{name:e.name,subject:e.subject,userId:i,isSystem:!1,tagSet:s,parentId:d}});if(u)l.set(e.id,u.id);else{let a=await t.knowledgeTag.create({data:{name:e.name,subject:e.subject,isSystem:!1,userId:i,tagSet:e.tagSet||"default",parentId:d,order:e.order||0,code:e.code}});l.set(e.id,a.id),n.tagsCreated++}}}async function o(e){let{tx:t,user:a,importAll:r,normalized:i,subjectTagSetMap:s,tagBySetAndName:n,tagNameMap:l}=e;for(let e of i.subjects)e.tagSet&&s.set(e.id,e.tagSet);let o=new Set;for(let e of i.errorItems)if(e.raw.tags)for(let t of e.raw.tags)o.add(t.name);let d=await t.knowledgeTag.findMany({where:{name:{in:Array.from(o)},OR:[{isSystem:!0},...r?[]:[{userId:a.id}]]}});for(let e of d){let t=`${e.tagSet}::${e.name}`;n.has(t)&&(r||e.userId!==a.id)||n.set(t,e.id)}for(let e of d)l.has(e.name)&&(r||e.userId!==a.id)||l.set(e.name,e.id)}var d=e.i(204028),u=e.i(299021),c=e.i(555231),p=e.i(655920);async function m(e){let{tx:t,user:a,importAll:r,normalized:i,paperGroupIdMap:s}=e;for(let e of i.paperGroups){let i=r?e.userId:a.id,n=await t.paperGroup.findFirst({where:{id:e.id,userId:i}});if(n)s.set(e.id,n.id);else{let a=await t.paperGroup.findFirst({where:{name:e.name,userId:i}});if(a)s.set(e.id,a.id);else{let a=await t.paperGroup.create({data:{userId:i,key:e.key,name:e.name,order:e.order||0,isActive:!1!==e.isActive}});s.set(e.id,a.id)}}}}async function g(e){let{tx:t,user:a,importAll:r,normalized:i,legacyLevelMap:s}=e;for(let e of i.errorItems){let i=r?e.raw.userId:a.id;if(!s.has(`${i}:a`)){let e=await (0,p.G)(i,t);s.set(`${i}:a`,e.a||""),s.set(`${i}:b`,e.b||""),s.set(`${i}:other`,e.other||"")}}}async function f(e,t,a,r){let{tx:i,paperGroupIdMap:s,legacyLevelMap:n}=e,l=null;if(a)if(s.has(a))l=s.get(a);else if(n.has(`${t}:${a}`))l=n.get(`${t}:${a}`)||null;else{let e=await i.paperGroup.findFirst({where:{id:a,userId:t}});l=e?.id||null}return l||null===r||(l=await (0,p.H)(t,r,i)),l}async function h(e,t,a){let{tx:r,tagIdMap:i,systemTagIdMap:s,subjectTagSetMap:n,tagBySetAndName:l,tagNameMap:o,stats:d}=e,u=a.raw;if(!u.tags||0===u.tags.length)return;let c=u.subjectId&&n.get(u.subjectId)||"default",p=[];for(let e of u.tags)if(i.has(e.id))p.push({id:i.get(e.id)});else if(s.has(e.id))p.push({id:s.get(e.id)});else{let t=l.get(`${c}::${e.name}`),a=o.get(e.name),r=t||a;r&&p.push({id:r})}p.length>0&&(await r.errorItem.update({where:{id:t},data:{tags:{connect:p}}}),d.tagsLinked+=p.length)}async function w(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,masteryIds:n,evaluatedIds:l,errorItemIdMap:o,errorItemOwnerMap:p,subjectIdMap:m}=e;for(let w of(await g(e),i.errorItems)){let{raw:i}=w,g=r?i.userId:a.id;p.set(i.id,g);let I=i.subjectId?m.get(i.subjectId):void 0,y=await (0,c.B)(t,g,i);if(y){let e=await (0,c.c)(t,g,y,i);o.set(i.id,e.id),n.add(e.id),s.duplicateErrorItems++,s.practiceRecordsCreated++;continue}let b=(0,u.P)(i.shortId)&&!await t.errorItem.findUnique({where:{shortId:i.shortId},select:{id:!0}}),v=await f(e,g,i.paperLevel,w.difficultyStars),x=await t.errorItem.create({data:{shortId:b?i.shortId:await (0,d.f)(t),userId:g,subjectId:I||void 0,originalImageUrl:i.originalImageUrl||"",ocrText:i.ocrText,questionText:i.questionText,answerText:i.answerText,analysis:i.analysis,wrongAnswerText:i.wrongAnswerText,mistakeAnalysis:i.mistakeAnalysis,mistakeStatus:i.mistakeStatus,knowledgePoints:i.knowledgePoints,source:i.source,errorType:i.errorType,userNotes:i.userNotes,masteryLevel:w.masteryLevel,gradeSemester:i.gradeSemester,paperLevel:v,difficultyStars:w.difficultyStars,hasFigure:w.hasFigure,figureSvg:w.figureSvg,figureScale:w.figureScale,figureAlign:w.figureAlign,answerSpacePx:w.answerSpacePx,geogebraCommands:w.geogebraCommands,svgAnimation:w.svgAnimation,svgAnimationEn:w.svgAnimationEn,lastPractice:w.lastPractice,questionType:w.questionType,...null!==w.masteryProbability&&w.masteryEvaluatedAt?{masteryProbability:w.masteryProbability,masteryReason:i.masteryReason??null,masterySource:"ai"===i.masterySource||"rule"===i.masterySource?i.masterySource:null,masteryEvaluatedAt:w.masteryEvaluatedAt}:{},createdAt:w.createdAt,updatedAt:w.updatedAt}});o.set(i.id,x.id),x.masteryEvaluatedAt&&l.add(x.id),s.errorItemsCreated++,await h(e,x.id,w)}}var I=e.i(721312),y=e.i(819428),b=e.i(603177),v=e.i(133007),x=e.i(731054),A=e.i(377807),S=e.i(578504);async function T(e){let{tx:t,normalized:a,stats:r,errorItemIdMap:i}=e;for(let e of a.reviewSchedules){let a=i.get(e.raw.errorItemId);if(a&&e.scheduledFor){if(await t.reviewSchedule.findFirst({where:{errorItemId:a,scheduledFor:e.scheduledFor}}))continue;await t.reviewSchedule.create({data:{errorItemId:a,scheduledFor:e.scheduledFor,completedAt:e.completedAt,isCorrect:e.raw.isCorrect}}),r.reviewSchedulesCreated++}}}async function R(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,examPaperIdMap:n,examQuestionIdMap:l,examQuestionOwnerMap:o,subjectIdMap:d,errorItemIdMap:u,errorItemOwnerMap:c}=e;for(let e of i.examPapers){let{raw:i}=e,p=r?i.userId:a.id,m=Array.isArray(i.questions)?i.questions:[],g=e.createdAt&&await t.examPaper.findFirst({where:{userId:p,title:i.title,createdAt:e.createdAt},select:{id:!0,questions:{select:{id:!0,order:!0}}}});if(g){for(let e of(n.set(i.id,g.id),m)){let t=g.questions.find(t=>t.order===e.order);t&&(l.set(e.id,t.id),o.set(e.id,p))}continue}let f=await t.examPaper.create({data:{userId:p,title:String(i.title||""),status:e.statuses.length>0?(0,I.$)(e.statuses):"failed",scope:e.scope,mode:e.mode,difficulty:e.difficulty,requestedCount:e.requestedCount,subjectIds:(0,S.c)(i.subjectIds,d),tagNames:e.tagNames,groupByType:e.groupByType,resultsRecordedAt:e.resultsRecordedAt,createdAt:e.createdAt,updatedAt:e.updatedAt}});for(let[a,r]of m.entries()){let i=r.errorItemId&&c.get(r.errorItemId)===p?u.get(r.errorItemId):void 0,s=await t.examQuestion.create({data:{paperId:f.id,order:Number.isInteger(r.order)?r.order:a,errorItemId:i,sourceShortId:String(r.sourceShortId||""),status:e.statuses[a],questionText:r.questionText,answerText:r.answerText,analysis:r.analysis,figureSvg:(0,y.W)(r.figureSvg),figureScale:(0,b.V)(r.figureScale),figureAlign:(0,b.o)(r.figureAlign),answerSpacePx:(0,v.T)(r.answerSpacePx),score:(0,x.H)(r.score??null),questionType:(0,A.P)(r.questionType),error:r.error}});l.set(r.id,s.id),o.set(r.id,p)}n.set(i.id,f.id),s.examPapersCreated++}}async function C(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,masteryIds:n,evaluatedIds:l,errorItemIdMap:o,errorItemOwnerMap:d,examQuestionIdMap:u,examQuestionOwnerMap:c}=e;for(let e of i.practiceRecords){let{raw:i}=e,p=r?i.userId:a.id,m=i.errorItemId&&d.get(i.errorItemId)===p?o.get(i.errorItemId):void 0,g=i.examQuestionId&&c.get(i.examQuestionId)===p?u.get(i.examQuestionId):void 0;await t.practiceRecord.create({data:{userId:p,subject:i.subject,difficulty:i.difficulty,isCorrect:i.isCorrect,...m?{errorItemId:m,result:e.result,questionText:i.questionText,answerText:i.answerText,analysis:i.analysis,wrongAnswerText:i.wrongAnswerText,mistakeAnalysis:i.mistakeAnalysis,originalImageUrl:i.originalImageUrl,figureSvg:(0,y.W)(i.figureSvg),source:e.source,examQuestionId:g}:{},createdAt:e.createdAt}}),s.practiceRecordsCreated++,m&&e.result&&!l.has(m)&&n.add(m)}}async function j(e){let{tx:a,user:r,normalized:i}=e;"number"==typeof i.preferences.masteryThreshold&&await (0,t.i)(a,r.id,i.preferences.masteryThreshold)}var P=e.i(971724),z=e.i(105954),M=e.i(206033),q=e.i(180473),k=e.i(604147),E=e.i(999617),N=e.i(893857),O=e.i(276041),U=e.i(843716);let F=/^data:image\/(?:jpeg|png|webp);base64,[A-Za-z0-9+/]+=*$/,D=/^[A-Za-z0-9_-]{8,64}$/,$=P.z.object({id:z.z.string().regex(D).optional(),clientRequestId:z.z.string().regex(D).nullish(),userId:z.z.string().max(100).optional(),mode:z.z.string().optional(),status:z.z.string().optional(),language:z.z.string().optional(),subjectId:z.z.string().max(100).nullish(),targetSubjectId:z.z.string().max(100).nullish(),paperLevel:z.z.string().max(100).nullish(),imageData:z.z.string().max(0xf00000).nullish(),imageInfo:z.z.string().max(1e4).nullish(),result:z.z.string().max(5e5).nullish(),error:z.z.string().max(200).nullish(),timings:z.z.string().max(1e4).nullish(),attempts:M.z.number().int().min(1).max(1e3).optional(),createdAt:z.z.string().optional(),finishedAt:z.z.string().nullish(),batchId:z.z.string().max(100).nullish(),batchItemKey:z.z.string().max(40).nullish(),inputText:z.z.string().max(4e4).nullish(),errorItemId:z.z.string().max(100).nullish(),duplicate:q.z.boolean().optional()}),L=P.z.object({id:z.z.string().regex(D),clientRequestId:z.z.string().regex(D).nullish(),userId:z.z.string().max(100).optional(),source:k.z.enum(["text","image"]),splitter:k.z.enum(["local","ai"]).optional(),status:z.z.string().optional(),mode:z.z.string().nullish(),language:z.z.string().optional(),subjectId:z.z.string().max(100).nullish(),targetSubjectId:z.z.string().max(100).nullish(),paperLevel:z.z.string().max(100).nullish(),sourceText:z.z.string().max(U.i).nullish(),imageData:z.z.string().max(0xf00000).nullish(),imageInfo:z.z.string().max(1e4).nullish(),draft:z.z.string().max(2e6).nullish(),error:z.z.string().max(200).nullish(),attempts:M.z.number().int().min(1).max(1e3).optional(),createdAt:z.z.string().optional(),startedAt:z.z.string().nullish(),finishedAt:z.z.string().nullish()});function G(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t}let B=(e,t)=>e&&t.has(e)?t.get(e):null;async function _(e,t,a){let r=new Map;if(!Array.isArray(t))return{created:0,idMap:r};let i=0;for(let s of t){let t=L.safeParse(s);if(!t.success)continue;let n=t.data,l=a.resolveUserId(n.userId??"");if(await e.user.count({where:{id:l}})===0)continue;let o=n.clientRequestId||n.id,d=await e.importBatch.findFirst({where:{userId:l,OR:[{clientRequestId:o},{id:o}]},select:{id:!0}});if(d){r.set(n.id,d.id);continue}let u=n.imageData&&F.test(n.imageData)?n.imageData:"",c=function(e){if(!e)return null;try{let t=O.Z.safeParse(JSON.parse(e));return t.success?JSON.stringify(t.data):null}catch{return null}}(n.draft);if(!c&&!u&&!n.sourceText)continue;let p="started"===n.status?"started":"draft"===n.status&&c?"draft":"failed",m="failed"===p?"splitting"===n.status||"draft"===n.status?N.U:n.error||N.U:null,g=await e.importBatch.create({data:{userId:l,clientRequestId:o,source:n.source,splitter:n.splitter??("image"===n.source?"ai":"local"),status:p,mode:"auto"===n.mode||"review"===n.mode?n.mode:null,language:"en"===n.language?"en":"zh",subjectId:B(n.subjectId,a.subjectIdMap),targetSubjectId:B(n.targetSubjectId,a.subjectIdMap),paperLevel:B(n.paperLevel,a.paperGroupIdMap),sourceText:n.sourceText??null,imageData:u,imageInfo:n.imageInfo??null,draft:c,error:m,attempts:n.attempts??1,createdAt:G(n.createdAt),startedAt:G(n.startedAt)??null,finishedAt:G(n.finishedAt)??new Date},select:{id:!0}});r.set(n.id,g.id),i++}return{created:i,idMap:r}}async function H(e,t,a){if(!Array.isArray(t))return 0;let r=0,i=new Map;for(let s of t){let t=$.safeParse(s);if(!t.success)continue;let n=t.data,l=a.resolveUserId(n.userId??"");if(i.has(l)||i.set(l,await e.user.count({where:{id:l}})>0),!i.get(l))continue;let o=n.imageData&&F.test(n.imageData)?n.imageData:"",d=function(e){if(!e)return null;try{let t=E.U.safeParse(JSON.parse(e));return t.success?JSON.stringify(t.data):null}catch{return null}}(n.result),u=n.inputText?.trim()?n.inputText:null,c=n.batchId&&a.batchIdMap?.has(n.batchId)?a.batchIdMap.get(n.batchId):null,p="saved"===n.status&&null!==c;if("saved"===n.status&&!p||!p&&!d&&!o&&!u)continue;let m=G(n.createdAt),g=n.clientRequestId||n.id;if(g&&await e.importTask.count({where:{userId:l,OR:[{clientRequestId:g},{id:g}]}})>0)continue;let f="auto"===n.mode?"auto":"review",h=p?"saved":"review"===n.status&&d?"review":"failed",w=p&&n.errorItemId?a.errorItemIdMap?.get(n.errorItemId)??null:null,I="failed"===h?"analyzing"===n.status||"saving"===n.status?N.U:n.error||N.U:null;await e.importTask.create({data:{userId:l,clientRequestId:g??null,mode:f,status:h,language:"en"===n.language?"en":"zh",subjectId:B(n.subjectId,a.subjectIdMap),targetSubjectId:B(n.targetSubjectId,a.subjectIdMap),paperLevel:B(n.paperLevel,a.paperGroupIdMap),imageData:o,imageInfo:n.imageInfo??null,result:d,error:I,timings:n.timings??null,attempts:n.attempts??1,inputText:u,batchId:c,batchItemKey:c?n.batchItemKey??null:null,errorItemId:w,duplicate:!!p&&!0===n.duplicate,...p?{readAt:new Date}:{},createdAt:m,finishedAt:G(n.finishedAt)??new Date}}),r++}return r}var J=e.i(772138);async function Q(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,subjectIdMap:n,paperGroupIdMap:l,errorItemIdMap:o}=e,d={resolveUserId:e=>r?e:a.id,subjectIdMap:n,paperGroupIdMap:l,errorItemIdMap:o},u=await _(t,i.data.importBatches,d);s.importBatchesCreated=u.created,s.importTasksCreated=await H(t,i.data.importTasks,{...d,batchIdMap:u.idMap})}async function K(e){let{tx:t,user:a,importAll:r,normalized:i,stats:s,subjectIdMap:n,errorItemIdMap:l,tagIdMap:o,examPaperIdMap:d,examQuestionIdMap:u}=e;s.extensionsImported=await (0,J.G)({tx:t,userIdMap:e=>r?e:a.id,subjectIdMap:n,errorItemIdMap:l,tagIdMap:o,examPaperIdMap:d,examQuestionIdMap:u},i.data.extensions)}async function W(e){let t=function({tx:e,user:t,importAll:a,normalized:r}){return{tx:e,user:t,importAll:a,normalized:r,stats:{subjectsCreated:0,tagsCreated:0,errorItemsCreated:0,reviewSchedulesCreated:0,examPapersCreated:0,preferencesRestored:!1,practiceRecordsCreated:0,tagsLinked:0,duplicateErrorItems:0,ttsSpeechesImported:0,importTasksCreated:0,importBatchesCreated:0,extensionsImported:{}},masteryIds:new Set,evaluatedIds:new Set,subjectIdMap:new Map,systemTagIdMap:new Map,tagIdMap:new Map,subjectTagSetMap:new Map,tagBySetAndName:new Map,tagNameMap:new Map,paperGroupIdMap:new Map,legacyLevelMap:new Map,errorItemIdMap:new Map,errorItemOwnerMap:new Map,examPaperIdMap:new Map,examQuestionIdMap:new Map,examQuestionOwnerMap:new Map}}(e);return await r(t),await i(t),await n(t),await l(t),await o(t),await m(t),await w(t),await T(t),await R(t),await C(t),await j(t),await Q(t),await K(t),{stats:t.stats,masteryIds:[...t.masteryIds]}}e.s(["c",0,W,"d",0,function(e){e.length&&(0,t.d)(e)}],596426)}]})();
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=_12xi_xqvtrn3k._.js.map
|