wrong-notebook 2026.11.4-4 → 2026.11.4-6

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.
Files changed (138) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/server/app/_global-error.html +1 -1
  4. package/.next/server/app/_global-error.rsc +1 -1
  5. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  8. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  9. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/admin/page.js.nft.json +1 -1
  11. package/.next/server/app/admin/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/admin/user/[id]/page.js.nft.json +1 -1
  13. package/.next/server/app/admin/user/[id]/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/api/admin/dashboard/route.js.nft.json +1 -1
  15. package/.next/server/app/api/admin/users/[id]/detail/route.js.nft.json +1 -1
  16. package/.next/server/app/api/ai/models/route.js.nft.json +1 -1
  17. package/.next/server/app/api/ai/test/route.js.nft.json +1 -1
  18. package/.next/server/app/api/analytics/route.js.nft.json +1 -1
  19. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  20. package/.next/server/app/api/error-items/[id]/figure/route.js.nft.json +1 -1
  21. package/.next/server/app/api/error-items/[id]/fix-latex/route.js.nft.json +1 -1
  22. package/.next/server/app/api/error-items/[id]/geogebra/route.js.nft.json +1 -1
  23. package/.next/server/app/api/error-items/[id]/reanswer/route.js.nft.json +1 -1
  24. package/.next/server/app/api/error-items/[id]/retag/route.js.nft.json +1 -1
  25. package/.next/server/app/api/error-items/[id]/svg-animation/narration/route.js.nft.json +1 -1
  26. package/.next/server/app/api/error-items/[id]/svg-animation/route.js.nft.json +1 -1
  27. package/.next/server/app/api/error-items/route.js.nft.json +1 -1
  28. package/.next/server/app/api/exams/[id]/questions/[questionId]/regenerate/route.js.nft.json +1 -1
  29. package/.next/server/app/api/exams/[id]/results/route.js.nft.json +1 -1
  30. package/.next/server/app/api/exams/[id]/retry/route.js.nft.json +1 -1
  31. package/.next/server/app/api/exams/[id]/route.js.nft.json +1 -1
  32. package/.next/server/app/api/exams/route.js.nft.json +1 -1
  33. package/.next/server/app/api/geogebra-analyze/route.js.nft.json +1 -1
  34. package/.next/server/app/api/import/route.js.nft.json +1 -1
  35. package/.next/server/app/api/import-batches/[id]/confirm-all/route.js.nft.json +1 -1
  36. package/.next/server/app/api/import-batches/[id]/fix-text/route.js.nft.json +1 -1
  37. package/.next/server/app/api/import-batches/[id]/read/route.js.nft.json +1 -1
  38. package/.next/server/app/api/import-batches/[id]/retry/route.js.nft.json +1 -1
  39. package/.next/server/app/api/import-batches/[id]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/import-batches/[id]/start/route.js.nft.json +1 -1
  41. package/.next/server/app/api/import-batches/route.js.nft.json +1 -1
  42. package/.next/server/app/api/import-tasks/[id]/confirm/route.js.nft.json +1 -1
  43. package/.next/server/app/api/import-tasks/[id]/read/route.js.nft.json +1 -1
  44. package/.next/server/app/api/import-tasks/[id]/retry/route.js.nft.json +1 -1
  45. package/.next/server/app/api/import-tasks/[id]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/import-tasks/route.js.nft.json +1 -1
  47. package/.next/server/app/api/notebooks/[id]/retag/route.js.nft.json +1 -1
  48. package/.next/server/app/api/openclaw/batch-upload/route.js.nft.json +1 -1
  49. package/.next/server/app/api/practice/generate/route.js.nft.json +1 -1
  50. package/.next/server/app/api/practice/grade/route.js.nft.json +1 -1
  51. package/.next/server/app/api/practice/record/[id]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/practice/record/route.js.nft.json +1 -1
  53. package/.next/server/app/api/reanswer/route.js.nft.json +1 -1
  54. package/.next/server/app/api/review/due/route.js.nft.json +1 -1
  55. package/.next/server/app/api/stats/repeated-mistakes/route.js.nft.json +1 -1
  56. package/.next/server/app/api/stats/weak-tags/route.js.nft.json +1 -1
  57. package/.next/server/app/api/tasks/route.js.nft.json +1 -1
  58. package/.next/server/app/api/tts/batch/route.js.nft.json +1 -1
  59. package/.next/server/app/api/user/route.js.nft.json +1 -1
  60. package/.next/server/app/error-items/[id]/page.js.nft.json +1 -1
  61. package/.next/server/app/error-items/[id]/page_client-reference-manifest.js +1 -1
  62. package/.next/server/app/exams/[id]/page.js.nft.json +1 -1
  63. package/.next/server/app/exams/[id]/page_client-reference-manifest.js +1 -1
  64. package/.next/server/app/exams/[id]/print/page.js.nft.json +1 -1
  65. package/.next/server/app/exams/[id]/print/page_client-reference-manifest.js +1 -1
  66. package/.next/server/app/exams/page.js.nft.json +1 -1
  67. package/.next/server/app/exams/page_client-reference-manifest.js +1 -1
  68. package/.next/server/app/import-batches/[id]/page.js.nft.json +1 -1
  69. package/.next/server/app/import-batches/[id]/page_client-reference-manifest.js +1 -1
  70. package/.next/server/app/import-tasks/[id]/page.js.nft.json +1 -1
  71. package/.next/server/app/import-tasks/[id]/page_client-reference-manifest.js +1 -1
  72. package/.next/server/app/import-tasks/page.js.nft.json +1 -1
  73. package/.next/server/app/import-tasks/page_client-reference-manifest.js +1 -1
  74. package/.next/server/app/initialize/page.js.nft.json +1 -1
  75. package/.next/server/app/initialize/page_client-reference-manifest.js +1 -1
  76. package/.next/server/app/login/page.js.nft.json +1 -1
  77. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app/notebooks/[id]/add/page.js.nft.json +1 -1
  79. package/.next/server/app/notebooks/[id]/add/page_client-reference-manifest.js +1 -1
  80. package/.next/server/app/notebooks/[id]/page.js.nft.json +1 -1
  81. package/.next/server/app/notebooks/[id]/page_client-reference-manifest.js +1 -1
  82. package/.next/server/app/notebooks/page.js.nft.json +1 -1
  83. package/.next/server/app/notebooks/page_client-reference-manifest.js +1 -1
  84. package/.next/server/app/page.js.nft.json +1 -1
  85. package/.next/server/app/page_client-reference-manifest.js +1 -1
  86. package/.next/server/app/practice/page.js.nft.json +1 -1
  87. package/.next/server/app/practice/page_client-reference-manifest.js +1 -1
  88. package/.next/server/app/print-preview/page.js.nft.json +1 -1
  89. package/.next/server/app/print-preview/page_client-reference-manifest.js +1 -1
  90. package/.next/server/app/register/page.js.nft.json +1 -1
  91. package/.next/server/app/register/page_client-reference-manifest.js +1 -1
  92. package/.next/server/app/review/page.js.nft.json +1 -1
  93. package/.next/server/app/review/page_client-reference-manifest.js +1 -1
  94. package/.next/server/app/setup/page.js.nft.json +1 -1
  95. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  96. package/.next/server/app/stats/page.js.nft.json +1 -1
  97. package/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  98. package/.next/server/app/tags/page.js.nft.json +1 -1
  99. package/.next/server/app/tags/page_client-reference-manifest.js +1 -1
  100. package/.next/server/chunks/_0i58-g30ox5-8._.js +1 -1
  101. package/.next/server/chunks/_0tkov27xr068i._.js +2 -2
  102. package/.next/server/chunks/_1638xaazsmf2m._.js +2 -2
  103. package/.next/server/chunks/_1vddun9dxzaqo._.js +2 -2
  104. package/.next/server/chunks/src_lib_question_question-deduplication_ts_0gumctesi3szc._.js +1 -1
  105. package/.next/server/chunks/ssr/_05k02824g2tpo._.js +1 -1
  106. package/.next/server/chunks/ssr/_0haie2cnycj6w._.js +1 -1
  107. package/.next/server/chunks/ssr/_0xlbgtld9_r3o._.js +1 -1
  108. package/.next/server/chunks/ssr/{node_modules_0y-9u3ez_29oz._.js → node_modules_0k1nrfz1fc_hq._.js} +1 -1
  109. package/.next/server/chunks/ssr/{node_modules_heic-to_dist_csp_heic-to_1zqrtb3kykd7q.js → node_modules_heic-to_dist_csp_heic-to_1nf434s-u6kms.js} +1 -1
  110. package/.next/server/chunks/ssr/src_app_exams_[id]_page_tsx_0xcjflkgkwzgd._.js +1 -1
  111. package/.next/server/chunks/ssr/src_app_page_tsx_1chiuahujsxm1._.js +3 -3
  112. package/.next/server/chunks/ssr/src_components_exam_exam-figure-scale-bar_tsx_1dxk6lzvp_d28._.js +1 -1
  113. package/.next/server/chunks/ssr/src_lib_0773v8b5gb93o._.js +2 -2
  114. package/.next/server/chunks/ssr/src_lib_1qhs590-z9xnh._.js +2 -2
  115. package/.next/server/chunks/ssr/src_lib_1z8akixo3j8ti._.js +2 -2
  116. package/.next/server/chunks/ssr/src_lib_i18n_en_ts_08zkpwnoqey5s._.js +1 -1
  117. package/.next/server/middleware-build-manifest.js +3 -3
  118. package/.next/server/pages/500.html +1 -1
  119. package/.next/static/chunks/07a3zn8uvj2i0.js +1 -0
  120. package/.next/static/chunks/1cwhgdmqho-2t.js +1 -0
  121. package/.next/static/chunks/1yg8trzska8uv.js +1 -0
  122. package/.next/static/chunks/{21ghhv1twe4or.js → 2l2ua9lgx300i.js} +6 -6
  123. package/.next/static/chunks/{3jkntcd5fwsid.js → 31w59f_-bu51t.js} +1 -1
  124. package/.next/static/chunks/323kkik1qwm2y.js +1 -0
  125. package/.next/static/chunks/{0ge9zqd21b4xd.js → 3c40qx1tzlts3.js} +4 -4
  126. package/.next/static/chunks/{10hk15u8jc7o1.js → 3fj_icg91t5ar.js} +1 -1
  127. package/.next/static/chunks/{2xww3vrggzkc3.js → 3j1dur22a3fw3.js} +3 -3
  128. package/.next/static/chunks/3mzbsz7_owawc.js +6 -0
  129. package/package.json +1 -1
  130. package/prisma/seed.db +0 -0
  131. package/.next/static/chunks/1y0cjudvnz4la.js +0 -6
  132. package/.next/static/chunks/28bc-wd48lcls.js +0 -1
  133. package/.next/static/chunks/2acga0__tn9yl.js +0 -1
  134. package/.next/static/chunks/37309r9ttt-oa.js +0 -1
  135. package/.next/static/chunks/438pvifm_o4g_.js +0 -1
  136. /package/.next/static/{bFQJMw9c1NJ6NSOY8pN2N → VfJFYtoZukxoeRxgJiLaW}/_buildManifest.js +0 -0
  137. /package/.next/static/{bFQJMw9c1NJ6NSOY8pN2N → VfJFYtoZukxoeRxgJiLaW}/_clientMiddlewareManifest.js +0 -0
  138. /package/.next/static/{bFQJMw9c1NJ6NSOY8pN2N → VfJFYtoZukxoeRxgJiLaW}/_ssgManifest.js +0 -0
@@ -1,12 +1,12 @@
1
- (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399847,e=>{var t=e.i(456420);let i={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],399847)},13285,e=>{var t=e.i(456420);let i={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],13285)},615568,168148,e=>{var t=e.i(456420);let i={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],615568);var a=e.i(843476),r=e.i(271645),l=e.i(30030),o=e.i(248425),s=Object.defineProperty,h=(e,t)=>s(e,"name",{value:t,configurable:!0}),c="Progress",[u,d]=(0,l.f)(c),[g,m]=u(c),p=r.forwardRef(h(function(e,t){let{__scopeProgress:i,value:n=null,max:r,getValueLabel:l=w,...s}=e;(r||0===r)&&!b(r)&&console.error(C(`${r}`,"Progress"));let h=b(r)?r:100;null===n||v(n,h)||console.error(M(`${n}`,"Progress"));let c=v(n,h)?n:null,u=x(c)?l(c,h):void 0;return(0,a.jsx)(g,{scope:i,value:c,max:h,children:(0,a.jsx)(o.V.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":x(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":y(c,h),"data-value":c??void 0,"data-max":h,...s,ref:t})})},"Progress")),f=r.forwardRef(h(function(e,t){let{__scopeProgress:i,...n}=e,r=m("ProgressIndicator",i);return(0,a.jsx)(o.V.div,{"data-state":y(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...n,ref:t})},"ProgressIndicator"));function w(e,t){return`${Math.round(e/t*100)}%`}function y(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function x(e){return"number"==typeof e}function b(e){return x(e)&&!isNaN(e)&&e>0}function v(e,t){return x(e)&&!isNaN(e)&&e<=t&&e>=0}function C(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function M(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
1
+ (()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,399847,e=>{var t=e.i(456420);let n={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],399847)},13285,e=>{var t=e.i(456420);let n={name:"layers",size:24,node:[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],aliases:["layers-3"]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],13285)},615568,168148,e=>{var t=e.i(456420);let n={name:"pencil-line",size:24,node:[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],615568);var a=e.i(843476),r=e.i(271645),l=e.i(30030),o=e.i(248425),s=Object.defineProperty,h=(e,t)=>s(e,"name",{value:t,configurable:!0}),c="Progress",[u,d]=(0,l.f)(c),[g,m]=u(c),f=r.forwardRef(h(function(e,t){let{__scopeProgress:n,value:i=null,max:r,getValueLabel:l=w,...s}=e;(r||0===r)&&!b(r)&&console.error(C(`${r}`,"Progress"));let h=b(r)?r:100;null===i||v(i,h)||console.error(M(`${i}`,"Progress"));let c=v(i,h)?i:null,u=x(c)?l(c,h):void 0;return(0,a.jsx)(g,{scope:n,value:c,max:h,children:(0,a.jsx)(o.V.div,{"aria-valuemax":h,"aria-valuemin":0,"aria-valuenow":x(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":y(c,h),"data-value":c??void 0,"data-max":h,...s,ref:t})})},"Progress")),p=r.forwardRef(h(function(e,t){let{__scopeProgress:n,...i}=e,r=m("ProgressIndicator",n);return(0,a.jsx)(o.V.div,{"data-state":y(r.value,r.max),"data-value":r.value??void 0,"data-max":r.max,...i,ref:t})},"ProgressIndicator"));function w(e,t){return`${Math.round(e/t*100)}%`}function y(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function x(e){return"number"==typeof e}function b(e){return x(e)&&!isNaN(e)&&e>0}function v(e,t){return x(e)&&!isNaN(e)&&e<=t&&e>=0}function C(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}function M(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
2
2
  - a positive number
3
3
  - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)
4
4
  - \`null\` or \`undefined\` if the progress is indeterminate.
5
5
 
6
- Defaulting to \`null\`.`}h(w,"defaultGetValueLabel"),h(y,"getProgressState"),h(x,"isNumber"),h(b,"isValidMaxNumber"),h(v,"isValidValueNumber"),h(C,"getInvalidMaxError"),h(M,"getInvalidValueError");var D=e.i(975157);let _=r.forwardRef(({className:e,value:t,...i},n)=>(0,a.jsx)(p,{ref:n,value:t,className:(0,D.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...i,children:(0,a.jsx)(f,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));_.displayName=p.displayName,e.s(["f",0,_],168148)},328623,e=>{var t=e.i(456420);let i={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};i.node;let n=(0,t.f)(i);e.s(["f",0,n],328623)},232660,e=>{var t=e.i(271645),i={x:0,y:0,width:0,height:0,unit:"px"},n=(e,t,i)=>Math.min(Math.max(e,t),i),a=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function r(e,t,n){return"%"===e.unit?{...i,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function l(e,t,n){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...i,...e,unit:"px"}}function o(e,t,i,n,a,r=0,l=0,s=n,h=a){let c={...e},u=Math.min(r,n),d=Math.min(l,a),g=Math.min(s,n),m=Math.min(h,a);t&&(t>1?(d=(u=l?l*t:u)/t,g=s*t):(u=(d=r?r/t:d)*t,m=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,d),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,u),c.x=0);let p=n-(c.x+c.width);p<0&&(c.x=Math.min(c.x,n-u),c.width+=p);let f=a-(c.y+c.height);if(f<0&&(c.y=Math.min(c.y,a-d),c.height+=f),c.width<u&&(("sw"===i||"nw"==i)&&(c.x-=u-c.width),c.width=u),c.height<d&&(("nw"===i||"ne"==i)&&(c.y-=d-c.height),c.height=d),c.width>g&&(("sw"===i||"nw"==i)&&(c.x-=g-c.width),c.width=g),c.height>m&&(("nw"===i||"ne"==i)&&(c.y-=m-c.height),c.height=m),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,d);("nw"===i||"ne"==i)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,u);("sw"===i||"nw"==i)&&(c.x-=e-c.width),c.width=e}}return c}var s={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:i,width:n,height:a}=e.getBoundingClientRect();return{x:t,y:i,width:n,height:a}}componentDidUpdate(e){let{crop:t,onComplete:i}=this.props;if(i&&!e.crop&&t){let{width:e,height:n}=this.getBox();e&&n&&i(l(t,e,n),r(t,e,n))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,s),this.document.addEventListener("pointerup",this.onDocPointerDone,s),this.document.addEventListener("pointercancel",this.onDocPointerDone,s),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,s),this.document.removeEventListener("pointerup",this.onDocPointerDone,s),this.document.removeEventListener("pointercancel",this.onDocPointerDone,s),!1)}onCropPointerDown=e=>{let{crop:t,disabled:i}=this.props,n=this.getBox();if(!t)return;let a=l(t,n.width,n.height);if(i)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let r=e.target.dataset.ord,o=e.clientX,s=e.clientY,h=a.x,c=a.y;if(r){let t=e.clientX-n.x,i=e.clientY-n.y,l=0,u=0;"ne"===r||"e"==r?(l=t-(a.x+a.width),u=i-a.y,h=a.x,c=a.y+a.height):"se"===r||"s"===r?(l=t-(a.x+a.width),u=i-(a.y+a.height),h=a.x,c=a.y):"sw"===r||"w"==r?(l=t-a.x,u=i-(a.y+a.height),h=a.x+a.width,c=a.y):("nw"===r||"n"==r)&&(l=t-a.x,u=i-a.y,h=a.x+a.width,c=a.y+a.height),o=h+n.x+l,s=c+n.y+u}this.evData={startClientX:o,startClientY:s,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!r,ord:r},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:i,locked:n,keepSelection:a,onChange:o}=this.props,s=this.getBox();if(i||n||a&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-s.x,c=e.clientY-s.y,u={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(l(u,s.width,s.height),r(u,s.width,s.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:i,disabled:n,onChange:o,onDragStart:s}=this.props,h=this.getBox();if(n||!i||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,a(i,t=c.isResize?this.resizeCrop():this.dragCrop())||o(l(t,h.width,h.height),r(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:i,disabled:a,onChange:o,onComplete:s}=this.props;if(a)return;let h=t.key,c=!1;if(!i)return;let u=this.getBox(),d=this.makePixelCrop(u),g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(d.x-=g,c=!0):"ArrowRight"===h?(d.x+=g,c=!0):"ArrowUp"===h?(d.y-=g,c=!0):"ArrowDown"===h&&(d.y+=g,c=!0),c){t.cancelable&&t.preventDefault(),d.x=n(d.x,0,u.width-d.width),d.y=n(d.y,0,u.height-d.height);let e=l(d,u.width,u.height),i=r(d,u.width,u.height);o(e,i),s&&s(e,i)}};onHandlerKeyDown=(t,i)=>{var n,s;let h,{aspect:c=0,crop:u,disabled:d,minWidth:g=0,minHeight:m=0,maxWidth:p,maxHeight:f,onChange:w,onComplete:y}=this.props,x=this.getBox();if(d||!u||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=o((n=l(u,x.width,x.height),s=t.key,h={...n},"ArrowLeft"===s?"nw"===i?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===i?(h.x-=b,h.width+=b):"sw"===i?(h.x-=b,h.width+=b,h.height+=b):"ne"===i?(h.y+=b,h.width-=b,h.height-=b):"e"===i?h.width-=b:"se"===i&&(h.width-=b,h.height-=b):"ArrowRight"===s&&("nw"===i?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===i?(h.x+=b,h.width-=b):"sw"===i?(h.x+=b,h.width-=b,h.height-=b):"ne"===i?(h.y-=b,h.width+=b,h.height+=b):"e"===i?h.width+=b:"se"===i&&(h.width+=b,h.height+=b)),"ArrowUp"===s?"nw"===i?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===i?(h.y-=b,h.height+=b):"ne"===i?(h.y-=b,h.width+=b,h.height+=b):"sw"===i?(h.x+=b,h.width-=b,h.height-=b):"s"===i?h.height-=b:"se"===i&&(h.width-=b,h.height-=b):"ArrowDown"===s&&("nw"===i?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===i?(h.y+=b,h.height-=b):"ne"===i?(h.y+=b,h.width-=b,h.height-=b):"sw"===i?(h.x-=b,h.width+=b,h.height+=b):"s"===i?h.height+=b:"se"===i&&(h.width+=b,h.height+=b)),h),c,i,x.width,x.height,g,m,p,f);if(!a(u,v)){let e=r(v,x.width,x.height);w(v,e),y&&y(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:i,onComplete:n,onDragEnd:a}=this.props,o=this.getBox();this.unbindDocMove(),!(i||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,a&&a(e),n&&n(l(t,o.width,o.height),r(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),i=this.makePixelCrop(t),a=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return i.x=n(e.startCropX+a,0,t.width-i.width),i.y=n(e.startCropY+r,0,t.height-i.height),i}getPointRegion(e,t,i,n){let{evData:a}=this,r=a.clientX-e.x,l=a.clientY-e.y,o;return o=n&&t?"nw"===t||"n"===t||"ne"===t:l<a.startCropY,(i&&t?"nw"===t||"w"===t||"sw"===t:r<a.startCropX)?o?"nw":"sw":o?"ne":"se"}resolveMinDimensions(e,t,i=0,n=0){let a=Math.min(i,e.width),r=Math.min(n,e.height);return t&&(a||r)?t>1?a?[a,a/t]:[r*t,r]:r?[r*t,r]:[a,a/t]:[a,r]}resizeCrop(){let{evData:t}=this,{aspect:i=0,maxWidth:a,maxHeight:r}=this.props,l=this.getBox(),[s,h]=this.resolveMinDimensions(l,i,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(l),u=this.getPointRegion(l,t.ord,s,h),d=t.ord||u,g=t.clientX-t.startClientX,m=t.clientY-t.startClientY;(s&&"nw"===d||"w"===d||"sw"===d)&&(g=Math.min(g,-s)),(h&&"nw"===d||"n"===d||"ne"===d)&&(m=Math.min(m,-h));let p={unit:"px",x:0,y:0,width:0,height:0};"ne"===u?(p.x=t.startCropX,p.width=g,i?p.height=p.width/i:p.height=Math.abs(m),p.y=t.startCropY-p.height):"se"===u?(p.x=t.startCropX,p.y=t.startCropY,p.width=g,i?p.height=p.width/i:p.height=m):"sw"===u?(p.x=t.startCropX+g,p.y=t.startCropY,p.width=Math.abs(g),i?p.height=p.width/i:p.height=m):"nw"===u&&(p.x=t.startCropX+g,p.width=Math.abs(g),i?(p.height=p.width/i,p.y=t.startCropY-p.height):(p.height=Math.abs(m),p.y=t.startCropY+m));let f=o(p,i,u,l.width,l.height,s,h,a,r);return i||e.xyOrds.indexOf(d)>-1?c=f:e.xOrds.indexOf(d)>-1?(c.x=f.x,c.width=f.width):e.yOrds.indexOf(d)>-1&&(c.y=f.y,c.height=f.height),c.x=n(c.x,0,l.width-c.width),c.y=n(c.y,0,l.height-c.height),c}renderCropSelection(){let{ariaLabels:i=e.defaultProps.ariaLabels,disabled:n,locked:a,renderSelectionAddon:r,ruleOfThirds:l,crop:o}=this.props,s=this.getCropStyle();if(o)return t.default.createElement("div",{style:s,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":i.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!a&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":i.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":i.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":i.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":i.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":i.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":i.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":i.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":i.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),l&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return l({...i,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:i,circularCrop:n,className:a,crop:r,disabled:l,locked:o,style:s,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:u}=this.state,d=r?this.renderCropSelection():null,g=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",a,c&&"ReactCrop--active",l&&"ReactCrop--disabled",o&&"ReactCrop--locked",u&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&n&&"ReactCrop--circular-crop",r&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:g,style:s},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},i),r?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?t.default.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,d)}};e.s(["f",0,c])},213761,e=>{let t={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class i extends Error{code;format;constructor(e,t,i){super(e,void 0===i?void 0:{cause:i}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let n=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),a=new Set(["mif1","msf1","mif2"]),r=new Set(["avif","avis"]);function l(e,i,n=t){let a=Math.min(1,n.maxLongEdge/Math.max(e,i),Math.sqrt(n.maxPixels/Math.max(1,e*i)));return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(i*a)),scale:a}}async function o(e){let t,i;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let n=await (t=URL.createObjectURL(e),(i=new Image).decoding="async",new Promise((e,n)=>{i.onload=()=>e(i),i.onerror=()=>n(Error("IMAGE_ELEMENT_DECODE_FAILED")),i.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!n.naturalWidth||!n.naturalHeight)throw Error("IMAGE_EMPTY");return n}async function s(t){let{heicTo:i}=await e.A(462684);return i({blob:t,type:"image/jpeg",quality:.95})}function h(e,t){return new Promise((i,n)=>{e.toBlob(e=>e?i(e):n(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function c(e,t,i,n,a,r,l){let o,s=((o=document.createElement("canvas")).width=r,o.height=l,o),h=s.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,r,l),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,i,n,a,0,0,r,l),s}async function u(e,t){var u;let d,g=performance.now(),m=await e.arrayBuffer(),p=performance.now()-g,f=function(e){let t=(t,i)=>String.fromCharCode(...e.subarray(t,i));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let i=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),l=[t(8,12)];for(let e=16;e+4<=i;e+=4)l.push(t(e,e+4));if(l.some(e=>n.has(e)))return"heic";if(l.some(e=>r.has(e)))return"avif";if(l.some(e=>a.has(e)))return"heic"}return"unknown"}(new Uint8Array(m,0,Math.min(m.byteLength,64))),w=e.type||"",y=performance.now(),x="native",b=new Blob([m],{type:w||"application/octet-stream"});try{d=await o(b)}catch(e){if("heic"!==f)throw new i("unknown"===f?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",f,e);t?.();try{d=await o(await s(b)),x="heic"}catch(e){throw new i("HEIC_DECODE_FAILED",f,e)}}let{width:v,height:C}=(u=d)instanceof HTMLImageElement?{width:u.naturalWidth,height:u.naturalHeight}:{width:u.width,height:u.height};if(!v||!C)throw new i("IMAGE_DECODE_FAILED",f);let M=l(v,C,{maxLongEdge:1600,maxPixels:1/0}),D=await h(c(d,0,0,v,C,M.width,M.height),.85),_=URL.createObjectURL(D),k=performance.now()-y;return{source:d,width:v,height:C,format:f,decoder:x,previewUrl:_,sourceType:w,sourceBytes:e.size,timings:{read:Math.round(p),convert:Math.round(k)},dispose:()=>{URL.revokeObjectURL(_),d instanceof HTMLImageElement||d.close()}}}let d={x:0,y:0,width:1,height:1};async function g(e,i=d,n=t){var a;let r=performance.now(),o=e=>Math.min(1,Math.max(0,e)),s=Math.round(o(i.x)*e.width),u=Math.round(o(i.y)*e.height),m=Math.max(1,Math.min(e.width-s,Math.round(o(i.width)*e.width))),p=Math.max(1,Math.min(e.height-u,Math.round(o(i.height)*e.height))),f=l(m,p,n),w=c(e.source,s,u,m,p,f.width,f.height),y=performance.now()-r,x=performance.now(),b=n.startQuality,v=await h(w,b);for(let t=0;v.size>n.maxBytes&&t<12;t++)b-.05>=n.minQuality-1e-9?b=Math.round((b-.05)*100)/100:(f={width:Math.max(1,Math.floor(.85*f.width)),height:Math.max(1,Math.floor(.85*f.height)),scale:.85*f.scale},w=c(e.source,s,u,m,p,f.width,f.height)),v=await h(w,b);return{dataUrl:await (a=v,new Promise((e,t)=>{let i=new FileReader;i.onload=()=>e(i.result),i.onerror=()=>t(i.error??Error("READ_FAILED")),i.readAsDataURL(a)})),width:f.width,height:f.height,bytes:v.size,quality:b,timings:{crop:Math.round(y),compress:Math.round(performance.now()-x)}}}e.s(["K",0,t,"o",0,i,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,u,"X",0,g])},499930,e=>{var t=e.i(213761);function i(e,t=.008){let n=Math.max(0,e.x-t),a=Math.max(0,e.y-t);return{x:n,y:a,width:Math.min(1,e.x+e.width+t)-n,height:Math.min(1,e.y+e.height+t)-a}}async function n(e){let t=new Image;if(t.decoding="async",t.src=e,await t.decode(),!t.naturalWidth||!t.naturalHeight)throw Error("IMAGE_EMPTY");return t}async function a(e,i){let n=function(e,t=16,i=!1){let n=Math.max(...e.map(e=>e.width)),a=0,r=e.map(e=>{let r=i?n/e.width:e.scale??1,l={x:0,y:a,width:Math.round(e.width*r),height:Math.round(e.height*r)};return a+=l.height+t,l});return{width:Math.max(...r.map(e=>e.width)),height:a-t,rects:r}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,i),a=document.createElement("canvas");a.width=n.width,a.height=n.height;let r=a.getContext("2d");if(!r)throw Error("CANVAS_UNSUPPORTED");r.fillStyle="#ffffff",r.fillRect(0,0,a.width,a.height),e.forEach((e,t)=>{let i=n.rects[t];r.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,i.x,i.y,i.width,i.height)});let l=await createImageBitmap(a);try{return await (0,t.X)({source:l,width:a.width,height:a.height})}finally{l.close()}}async function r(e,n){let r=e.naturalWidth,l=e.naturalHeight,o=n.map(e=>i(e));return 1===o.length?(0,t.X)({source:e,width:r,height:l},o[0]):a(o.map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*l),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*l))})),!1)}async function l(e){return a((await Promise.all(e.map(n))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function o(e,t,n){let r=e.naturalWidth,l=e.naturalHeight,o=n.width/r,s=t.map(e=>i(e)).map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*l),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*l)),scale:o}));return s.push({source:n.source,sx:0,sy:0,sw:n.width,sh:n.height}),a(s,!1)}e.s(["y",0,n,"k",0,o,"M",0,r,"v",0,l])},119472,e=>{var t=e.i(41931),i=e.i(127175);async function n(e){let t;for(let i=0;i<3;i++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===i)break;await new Promise(e=>setTimeout(e,1e3*(i+1)))}throw t}async function a(e,r=(0,i.c)()){let{batch:l}=await n(()=>t.k.post("/api/import-batches",{...e,clientRequestId:r,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0,items:e.items?.map(e=>({...e})),origin:e.origin},{timeout:12e4}));return(0,i.P)(),l}async function r(e,i={}){let n=i.image?"?include=image":"",{batch:a}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${n}`);return a}async function l(e,i,n){let{batch:a}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:i,draft:n});return a}async function o(e,a,r,l){let{batch:o}=await n(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:a,images:r,analysis:l},{timeout:12e4}));return(0,i.P)(),o}async function s(e){let{batch:n}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,i.P)(),n}async function h(e){let n=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,i.P)(),n}async function c(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,i.P)()}async function u(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,i.P)()}async function d(e,i){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:i},{timeout:6e5,recoverable:!0})}e.s(["J",0,h,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,a,"o",0,c,"w",0,r,"$",0,d,"f",0,u,"s",0,s,"S",0,l,"g",0,o])},25197,e=>{var t=e.i(41931);function i(e){return e.trim()?e:""}async function n(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function a(e,n){let a=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:i(e.answerText),analysis:i(e.analysis),wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,questionType:e.questionType??null,subjectId:n.subjectId||void 0,subjectName:n.subjectId?void 0:e.subject,originalImageUrl:n.imageUrl||"",paperLevel:n.paperLevel||void 0});return{id:a.id,shortId:a.shortId??null,subjectId:a.subjectId??null,notebookName:a.subject?.name??null,duplicate:a.duplicate}}e.i(201276),e.s(["x",0,n,"a",0,a],25197)},825624,e=>{let t=/^[\s  ]+/,i="一二三四五六七八九十",n=[{family:"dot",pattern:/^(\d{1,3})\s*(?:.|\.(?!\d))\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function a(e){let a=e.replace(t,"");for(let{family:e,pattern:t}of n){let n=a.match(t);if(!n||a.length<=n[0].length)continue;let r=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?i.indexOf(e)+1:10*(0===t?1:i.indexOf(e[0])+1)+(t===e.length-1?0:i.indexOf(e[t+1])+1)}(n[1]);if(Number.isFinite(r)&&!(r<=0))return{value:r,family:e,prefixLength:n[0].length,label:n[1]}}return null}function r(e){let i=e.split("\n"),n=i[0]?.replace(t,"")??"",r=a(n);return r&&"cn"!==r.family&&(i[0]=n.slice(r.prefixLength)),i.join("\n")}function l(e){let t=[];for(let i of e)(i||0!==t.length&&""!==t[t.length-1])&&t.push(i);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let o=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,s=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,h=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,c=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,u=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,d=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,g=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function m(e){let t=[],i=[];for(let n of e)n?i.push(n):i.length&&(t.push(i.join("\n")),i=[]);return i.length&&t.push(i.join("\n")),t}function p(e,t){let i=[];for(let n=0;n<e.length;n++){let a=e[n],r=[a];for(let i=n+1;i<e.length;i++){let n=e[i],l=r[r.length-1];if(n.family!==a.family)continue;let o=1===n.value&&[...t].some(e=>e>l.line&&e<n.line);(n.value===l.value+1||o)&&r.push(n)}r.length>i.length&&(i=r)}return i}function f(e,t,i){return!!c.test(e)||!!t&&"cn"===t.family&&"cn"!==i&&null!==i&&(e.length<=40||u.test(e.slice(0,20)))}function w(e){let t=e.match(d);if(!t)return null;let i=Number(t[1]),n=Number(t[2]);return i<=n?{from:i,to:n}:null}let y={answer:/^(?:【\s*(?:参考答案|答案)\s*】|(?:参考答案|答案)\s*[::]|Answer\s*[::])\s*(.*)$/i,analysis:/^(?:【\s*(?:解析|分析|详解|解答|点评)\s*】|(?:解析|分析|详解|解答|点评)\s*[::])\s*(.*)$/,knowledge:/^(?:【\s*(?:知识点|考点)\s*】|(?:知识点|考点)\s*[::])\s*(.*)$/,difficulty:/^(?:【\s*难度\s*】|难度\s*[::])\s*(.*)$/,questionType:/^(?:【\s*题型\s*】|题型\s*[::])\s*(.*)$/,wrongAnswer:/^(?:【\s*错答\s*】|我的答案\s*[::]|学生答案\s*[::])\s*(.*)$/},x={易:1,较易:2,中等:3,较难:4,难:5};function b(e){return e.split(/[、,,;;]/).map(e=>e.trim()).filter(Boolean)}function v(e){let t={answer:[],analysis:[],knowledge:[],difficulty:[],questionType:[],wrongAnswer:[]},i=[],n=null;for(let a of e){let e=null;for(let i of Object.keys(y)){let r=a.match(y[i]);if(!r)continue;e=i,n=i;let l=r[1].trim();l&&t[i].push(l);break}e||(n&&a.trim()?t[n].push(a.trim()):i.push(a))}let a={},r=t.answer.join("\n").trim();r&&(a.answer=r);let o=t.analysis.join("\n").trim();o&&(a.analysis=o);let s=t.knowledge.flatMap(b);s.length&&(a.knowledgePoints=s);let h=t.difficulty.join(" ").trim(),c=h?function(e){let t=e.trim();if(!t)return null;let i=t.match(/^(\d{1,2})\s*(?:星|级)?$/);if(i){let e=Number(i[1]);return e>=1&&e<=5?e:null}if(/^[★☆]{1,5}$/.test(t)){let e=(t.match(/★/g)??[]).length;return e>=1?e:null}return t in x?x[t]:null}(h):null;null!==c&&(a.difficultyStars=c);let u=t.questionType.join(" ").trim();u&&(a.questionType=u);let d=t.wrongAnswer.join("\n").trim();return d&&(a.wrongAnswer=d),{text:l(i),fields:a}}let C=/^(\d{1,3})\s*[..、,,)]\s*(\S[\s\S]*)$/,M=/^(\d{1,3})\s*[~~—–-]\s*(\d{1,3})\s*[::..、]?\s*([A-Za-z]+)$/;function D(e,t){let i=[],n=!1;for(let a of e){let e={value:!1},r=[];for(let i of a.split("\n")){let n=i.trim()?function(e){let t=e.trim();if(!t)return null;let i=function(e){let t=e.trim().match(M);if(!t)return null;let i=Number(t[1]),n=Number(t[2]),a=t[3];if(!Number.isFinite(i)||!Number.isFinite(n)||i<=0||n<=i||n-i+1>60)return null;let r=n-i+1;return a.length!==r?null:Array.from({length:r},(e,t)=>({label:String(i+t),text:a[t]}))}(t);if(i)return i;let n=function(e){let t=e.trim(),i=[];for(let e of t.matchAll(/(\d{1,3})\s*[..、,,;;]\s*/g)){let n=e.index??0,a=t[n+e[0].length];a&&/\d/.test(a)||i.push({index:n,label:e[1],afterIndex:n+e[0].length})}if(i.length<2)return null;for(let e=1;e<i.length;e++)if(Number(i[e].label)<=Number(i[e-1].label))return null;let n=[];for(let e=0;e<i.length;e++){let a=i[e].afterIndex,r=e+1<i.length?i[e+1].index:t.length,l=t.slice(a,r).trim().replace(/[;;]+$/,"").trim();if(!l||l.length>30||/[。!?!?]/.test(l))return null;n.push({label:i[e].label,text:l})}return n}(t);if(n)return n.map(e=>({label:e.label??"",text:e.text})).filter(e=>e.label);let a=t.match(C);if(!a)return null;let r=Number(a[1]);return!Number.isFinite(r)||r<=0?null:[{label:a[1],text:a[2].trim()}]}(i):null;if(!n){i.trim()&&r.push(i);continue}let a=!1;for(let l of n){let n=t.find(e=>e.label===l.label);if(!n){r.push(i);break}a=!0,e.value=!0;let o=function(e){let t=e.match(/^(.*?)(?:【?\s*(?:解析|分析|详解|解答|点评)\s*】?\s*[::])([\s\S]*)$/);if(t){let i=t[1].replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim(),n=t[2].trim();return n?{answer:i,analysis:n}:{answer:e.trim()}}return{answer:e.replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim()||e.trim()}}(l.text);o.answer&&!n.answer&&(n.answer=o.answer),o.analysis&&(n.analysis=n.analysis?`${n.analysis}
7
- ${o.analysis}`:o.analysis)}!a&&!r.includes(i)&&i.trim()&&!r.includes(i)&&r.push(i)}n=n||e.value,e.value?r.length&&i.push(r.join("\n")):i.push(a)}return[i,n]}e.s(["k",0,2e3,"f",0,1e6,"S",0,60,"i",0,2e4,"J",0,function(e,i={}){let n,u=void 0===i.maxLength?2e4:Math.min(Math.max(i.maxLength,1e3),1e6),y=void 0===i.maxQuestions?60:Math.min(Math.max(i.maxQuestions,2),2e3),x=e.length>u,b=e.slice(0,u).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),C=b.map(e=>e?a(e):null),M=b.length;for(let e=0;e<b.length;e++)if(h.test(b[e])){M=e;break}let _=[],k=[];for(let e=0;e<M;e++){let t=C[e];t&&("cn"===t.family?k:_).push({...t,line:e})}let E=new Set;for(let e=0;e<M;e++)(c.test(b[e])||C[e]?.family==="cn")&&E.add(e);let R=p(_,E);if(R.length<2){let e=p(k,new Set);e.length>=2&&(R=e)}let I=l(b.slice(0,M)),$=M<b.length?m(b.slice(M)):[],P=(n=a(b[R[0]?.line??0]??""))?n.label:null,S=e=>({questions:I?[{label:P,text:I,material:null,section:null}]:[],ignored:$,detected:!1,ambiguous:e,candidateCount:e?R.length:+!!I,overflow:0,tooLong:x});if(R.length<2){if(!I)return S(!1);let e=v(I.split("\n")),t=S(!1);if(t.questions.length>0&&Object.keys(e.fields).length>0&&(t.questions[0]={...t.questions[0],text:r(e.text),...e.fields}),t.questions.length>0&&$.length){let[e,i]=D($,t.questions);t.ignored=e,i||(t.ignored=$)}return t}let A=R[0].family;if(!i.forceNumbered&&function(e,t,i,n){let a=null;for(let r=t-1;r>=0;r--)if(e[r]){a=f(e[r],n[r],i)?null:e[r];break}return!(!a||o.test(a)||d.test(a))&&("paren"===i?a.length>=15||/[。?!?!::,,;;]$/.test(a):/[::]$/.test(a)&&g.test(a))}(b,R[0].line,A,C)){let e=S(!0);if(e.questions.length>0&&I){let t=v(I.split("\n"));Object.keys(t.fields).length>0&&(e.questions[0]={...e.questions[0],text:r(t.text),...t.fields})}return e}let N=new Set(R.map(e=>e.line)),L=[],j=[],O=null,U=[],H=[],B=(e,t)=>{for(let i of m(e))(!o.test(i)||!(i.length<80))&&(s.test(i)||i.length>=80&&/[。!?.!?;;]/.test(i))?U.push({text:i,range:w(i)}):t?L.push(i):O&&!j.some(e=>e.section===O)?O=`${O}
8
- ${i}`:L.push(i)},T=R[0].line,X=[];for(let e=0;e<T;e++)b[e]&&f(b[e],C[e],A)?(B(X.splice(0),!0),O=b[e],H=[]):X.push(b[e]);B(X,!0);for(let e=0;e<R.length;e++){let t=R[e].line,i=e+1<R.length?R[e+1].line:M;U.length&&(H=[...H.filter(e=>e.range),...U],U=[]);let n=i,a=null;for(let e=t+1;e<i;e++)if(b[e]&&!N.has(e)&&f(b[e],C[e],A)){n=e,a=b[e];break}let o=b.slice(t,n),h=m(o),c=[];for(;h.length>1&&s.test(h[h.length-1].slice(0,30));)c.unshift(h.pop());let u=c.length?h.join("\n"):l(o),d=R[e].value,g=H.filter(e=>!e.range||d>=e.range.from&&d<=e.range.to),p=v(r(u).split("\n"));for(let t of(j.push({label:R[e].label,text:p.text,material:g.length?g.map(e=>e.text).join("\n\n"):null,section:O,...p.fields}),c))U.push({text:t,range:w(t)});null!==a&&(O=a,H=[],B(b.slice(n+1,i),!1))}let[z]=D($,j),Y=j.slice(y);return{questions:j.slice(0,y),ignored:[...L,...z,...Y.map(e=>{var t;let i,n,a,r;return i=(t=e).text.trim(),a=(n=t.material?.trim())?`${n}
6
+ Defaulting to \`null\`.`}h(w,"defaultGetValueLabel"),h(y,"getProgressState"),h(x,"isNumber"),h(b,"isValidMaxNumber"),h(v,"isValidValueNumber"),h(C,"getInvalidMaxError"),h(M,"getInvalidValueError");var D=e.i(975157);let _=r.forwardRef(({className:e,value:t,...n},i)=>(0,a.jsx)(f,{ref:i,value:t,className:(0,D.f)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:(0,a.jsx)(p,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));_.displayName=f.displayName,e.s(["f",0,_],168148)},328623,e=>{var t=e.i(456420);let n={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};n.node;let i=(0,t.f)(n);e.s(["f",0,i],328623)},232660,e=>{var t=e.i(271645),n={x:0,y:0,width:0,height:0,unit:"px"},i=(e,t,n)=>Math.min(Math.max(e,t),n),a=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function r(e,t,i){return"%"===e.unit?{...n,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/i*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/i*100:0}}function l(e,t,i){return e.unit&&"px"!==e.unit?{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*i/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*i/100:0}:{...n,...e,unit:"px"}}function o(e,t,n,i,a,r=0,l=0,s=i,h=a){let c={...e},u=Math.min(r,i),d=Math.min(l,a),g=Math.min(s,i),m=Math.min(h,a);t&&(t>1?(d=(u=l?l*t:u)/t,g=s*t):(u=(d=r?r/t:d)*t,m=h/t)),c.y<0&&(c.height=Math.max(c.height+c.y,d),c.y=0),c.x<0&&(c.width=Math.max(c.width+c.x,u),c.x=0);let f=i-(c.x+c.width);f<0&&(c.x=Math.min(c.x,i-u),c.width+=f);let p=a-(c.y+c.height);if(p<0&&(c.y=Math.min(c.y,a-d),c.height+=p),c.width<u&&(("sw"===n||"nw"==n)&&(c.x-=u-c.width),c.width=u),c.height<d&&(("nw"===n||"ne"==n)&&(c.y-=d-c.height),c.height=d),c.width>g&&(("sw"===n||"nw"==n)&&(c.x-=g-c.width),c.width=g),c.height>m&&(("nw"===n||"ne"==n)&&(c.y-=m-c.height),c.height=m),t){let e=c.width/c.height;if(e<t){let e=Math.max(c.width/t,d);("nw"===n||"ne"==n)&&(c.y-=e-c.height),c.height=e}else if(e>t){let e=Math.max(c.height*t,u);("sw"===n||"nw"==n)&&(c.x-=e-c.width),c.width=e}}return c}var s={capture:!0,passive:!1},h=0,c=class e extends t.PureComponent{static xOrds=["e","w"];static yOrds=["n","s"];static xyOrds=["nw","ne","se","sw"];static nudgeStep=1;static nudgeStepMedium=10;static nudgeStepLarge=100;static defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};get document(){return document}docMoveBound=!1;mouseDownOnCrop=!1;dragStarted=!1;evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0};componentRef=(0,t.createRef)();mediaRef=(0,t.createRef)();resizeObserver;initChangeCalled=!1;instanceId=`rc-${h++}`;state={cropIsActive:!1,newCropIsBeingDrawn:!1};getBox(){let e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};let{x:t,y:n,width:i,height:a}=e.getBoundingClientRect();return{x:t,y:n,width:i,height:a}}componentDidUpdate(e){let{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){let{width:e,height:i}=this.getBox();e&&i&&n(l(t,e,i),r(t,e,i))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||=(this.document.addEventListener("pointermove",this.onDocPointerMove,s),this.document.addEventListener("pointerup",this.onDocPointerDone,s),this.document.addEventListener("pointercancel",this.onDocPointerDone,s),!0)}unbindDocMove(){this.docMoveBound&&=(this.document.removeEventListener("pointermove",this.onDocPointerMove,s),this.document.removeEventListener("pointerup",this.onDocPointerDone,s),this.document.removeEventListener("pointercancel",this.onDocPointerDone,s),!1)}onCropPointerDown=e=>{let{crop:t,disabled:n}=this.props,i=this.getBox();if(!t)return;let a=l(t,i.width,i.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let r=e.target.dataset.ord,o=e.clientX,s=e.clientY,h=a.x,c=a.y;if(r){let t=e.clientX-i.x,n=e.clientY-i.y,l=0,u=0;"ne"===r||"e"==r?(l=t-(a.x+a.width),u=n-a.y,h=a.x,c=a.y+a.height):"se"===r||"s"===r?(l=t-(a.x+a.width),u=n-(a.y+a.height),h=a.x,c=a.y):"sw"===r||"w"==r?(l=t-a.x,u=n-(a.y+a.height),h=a.x+a.width,c=a.y):("nw"===r||"n"==r)&&(l=t-a.x,u=n-a.y,h=a.x+a.width,c=a.y+a.height),o=h+i.x+l,s=c+i.y+u}this.evData={startClientX:o,startClientY:s,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!!r,ord:r},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})};onComponentPointerDown=e=>{let{crop:t,disabled:n,locked:i,keepSelection:a,onChange:o}=this.props,s=this.getBox();if(n||i||a&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});let h=e.clientX-s.x,c=e.clientY-s.y,u={unit:"px",x:h,y:c,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(l(u,s.width,s.height),r(u,s.width,s.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})};onDocPointerMove=e=>{let t,{crop:n,disabled:i,onChange:o,onDragStart:s}=this.props,h=this.getBox();if(i||!n||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,s&&s(e));let{evData:c}=this;c.clientX=e.clientX,c.clientY=e.clientY,a(n,t=c.isResize?this.resizeCrop():this.dragCrop())||o(l(t,h.width,h.height),r(t,h.width,h.height))};onComponentKeyDown=t=>{let{crop:n,disabled:a,onChange:o,onComplete:s}=this.props;if(a)return;let h=t.key,c=!1;if(!n)return;let u=this.getBox(),d=this.makePixelCrop(u),g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===h?(d.x-=g,c=!0):"ArrowRight"===h?(d.x+=g,c=!0):"ArrowUp"===h?(d.y-=g,c=!0):"ArrowDown"===h&&(d.y+=g,c=!0),c){t.cancelable&&t.preventDefault(),d.x=i(d.x,0,u.width-d.width),d.y=i(d.y,0,u.height-d.height);let e=l(d,u.width,u.height),n=r(d,u.width,u.height);o(e,n),s&&s(e,n)}};onHandlerKeyDown=(t,n)=>{var i,s;let h,{aspect:c=0,crop:u,disabled:d,minWidth:g=0,minHeight:m=0,maxWidth:f,maxHeight:p,onChange:w,onComplete:y}=this.props,x=this.getBox();if(d||!u||"ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();let b=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,v=o((i=l(u,x.width,x.height),s=t.key,h={...i},"ArrowLeft"===s?"nw"===n?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"w"===n?(h.x-=b,h.width+=b):"sw"===n?(h.x-=b,h.width+=b,h.height+=b):"ne"===n?(h.y+=b,h.width-=b,h.height-=b):"e"===n?h.width-=b:"se"===n&&(h.width-=b,h.height-=b):"ArrowRight"===s&&("nw"===n?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"w"===n?(h.x+=b,h.width-=b):"sw"===n?(h.x+=b,h.width-=b,h.height-=b):"ne"===n?(h.y-=b,h.width+=b,h.height+=b):"e"===n?h.width+=b:"se"===n&&(h.width+=b,h.height+=b)),"ArrowUp"===s?"nw"===n?(h.x-=b,h.y-=b,h.width+=b,h.height+=b):"n"===n?(h.y-=b,h.height+=b):"ne"===n?(h.y-=b,h.width+=b,h.height+=b):"sw"===n?(h.x+=b,h.width-=b,h.height-=b):"s"===n?h.height-=b:"se"===n&&(h.width-=b,h.height-=b):"ArrowDown"===s&&("nw"===n?(h.x+=b,h.y+=b,h.width-=b,h.height-=b):"n"===n?(h.y+=b,h.height-=b):"ne"===n?(h.y+=b,h.width-=b,h.height-=b):"sw"===n?(h.x-=b,h.width+=b,h.height+=b):"s"===n?h.height+=b:"se"===n&&(h.width+=b,h.height+=b)),h),c,n,x.width,x.height,g,m,f,p);if(!a(u,v)){let e=r(v,x.width,x.height);w(v,e),y&&y(v,e)}};onDocPointerDone=e=>{let{crop:t,disabled:n,onComplete:i,onDragEnd:a}=this.props,o=this.getBox();this.unbindDocMove(),!(n||!t)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,a&&a(e),i&&i(l(t,o.width,o.height),r(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))};onDragFocus=()=>{this.componentRef.current?.scrollTo(0,0)};getCropStyle(){let{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){let{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),a=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return n.x=i(e.startCropX+a,0,t.width-n.width),n.y=i(e.startCropY+r,0,t.height-n.height),n}getPointRegion(e,t,n,i){let{evData:a}=this,r=a.clientX-e.x,l=a.clientY-e.y,o;return o=i&&t?"nw"===t||"n"===t||"ne"===t:l<a.startCropY,(n&&t?"nw"===t||"w"===t||"sw"===t:r<a.startCropX)?o?"nw":"sw":o?"ne":"se"}resolveMinDimensions(e,t,n=0,i=0){let a=Math.min(n,e.width),r=Math.min(i,e.height);return t&&(a||r)?t>1?a?[a,a/t]:[r*t,r]:r?[r*t,r]:[a,a/t]:[a,r]}resizeCrop(){let{evData:t}=this,{aspect:n=0,maxWidth:a,maxHeight:r}=this.props,l=this.getBox(),[s,h]=this.resolveMinDimensions(l,n,this.props.minWidth,this.props.minHeight),c=this.makePixelCrop(l),u=this.getPointRegion(l,t.ord,s,h),d=t.ord||u,g=t.clientX-t.startClientX,m=t.clientY-t.startClientY;(s&&"nw"===d||"w"===d||"sw"===d)&&(g=Math.min(g,-s)),(h&&"nw"===d||"n"===d||"ne"===d)&&(m=Math.min(m,-h));let f={unit:"px",x:0,y:0,width:0,height:0};"ne"===u?(f.x=t.startCropX,f.width=g,n?f.height=f.width/n:f.height=Math.abs(m),f.y=t.startCropY-f.height):"se"===u?(f.x=t.startCropX,f.y=t.startCropY,f.width=g,n?f.height=f.width/n:f.height=m):"sw"===u?(f.x=t.startCropX+g,f.y=t.startCropY,f.width=Math.abs(g),n?f.height=f.width/n:f.height=m):"nw"===u&&(f.x=t.startCropX+g,f.width=Math.abs(g),n?(f.height=f.width/n,f.y=t.startCropY-f.height):(f.height=Math.abs(m),f.y=t.startCropY+m));let p=o(f,n,u,l.width,l.height,s,h,a,r);return n||e.xyOrds.indexOf(d)>-1?c=p:e.xOrds.indexOf(d)>-1?(c.x=p.x,c.width=p.width):e.yOrds.indexOf(d)>-1&&(c.y=p.y,c.height=p.height),c.x=i(c.x,0,l.width-c.width),c.y=i(c.y,0,l.height-c.height),c}renderCropSelection(){let{ariaLabels:n=e.defaultProps.ariaLabels,disabled:i,locked:a,renderSelectionAddon:r,ruleOfThirds:l,crop:o}=this.props,s=this.getCropStyle();if(o)return t.default.createElement("div",{style:s,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":n.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!i&&!a&&t.default.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},t.default.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),t.default.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":n.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":n.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":n.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":n.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":n.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":n.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":n.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),t.default.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":n.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&t.default.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),l&&t.default.createElement(t.default.Fragment,null,t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),t.default.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return l({...n,...this.props.crop||{}},e.width,e.height)}render(){let{aspect:e,children:n,circularCrop:i,className:a,crop:r,disabled:l,locked:o,style:s,ruleOfThirds:h}=this.props,{cropIsActive:c,newCropIsBeingDrawn:u}=this.state,d=r?this.renderCropSelection():null,g=((...e)=>e.filter(e=>e&&"string"==typeof e).join(" "))("ReactCrop",a,c&&"ReactCrop--active",l&&"ReactCrop--disabled",o&&"ReactCrop--locked",u&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&i&&"ReactCrop--circular-crop",r&&h&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",i&&"ReactCrop--no-animate");return t.default.createElement("div",{ref:this.componentRef,className:g,style:s},t.default.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},n),r?t.default.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},t.default.createElement("defs",null,t.default.createElement("mask",{id:`hole-${this.instanceId}`},t.default.createElement("rect",{width:"100%",height:"100%",fill:"white"}),i?t.default.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):t.default.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),t.default.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,d)}};e.s(["f",0,c])},213761,e=>{let t={maxLongEdge:4096,maxPixels:4915200,maxBytes:1572864,startQuality:.9,minQuality:.8};class n extends Error{code;format;constructor(e,t,n){super(e,void 0===n?void 0:{cause:n}),this.code=e,this.format=t,this.name="ImageDecodeError"}}let i=new Set(["heic","heix","heim","heis","hevc","hevx","hevm","hevs"]),a=new Set(["mif1","msf1","mif2"]),r=new Set(["avif","avis"]);function l(e,n,i=t){let a=Math.min(1,i.maxLongEdge/Math.max(e,n),Math.sqrt(i.maxPixels/Math.max(1,e*n)));return{width:Math.max(1,Math.floor(e*a)),height:Math.max(1,Math.floor(n*a)),scale:a}}async function o(e){let t,n;if("function"==typeof createImageBitmap)try{return await createImageBitmap(e,{imageOrientation:"from-image"})}catch{}let i=await (t=URL.createObjectURL(e),(n=new Image).decoding="async",new Promise((e,i)=>{n.onload=()=>e(n),n.onerror=()=>i(Error("IMAGE_ELEMENT_DECODE_FAILED")),n.src=t}).finally(()=>URL.revokeObjectURL(t)));if(!i.naturalWidth||!i.naturalHeight)throw Error("IMAGE_EMPTY");return i}async function s(t){let{heicTo:n}=await e.A(462684);return n({blob:t,type:"image/jpeg",quality:.95})}function h(e,t){return new Promise((n,i)=>{e.toBlob(e=>e?n(e):i(Error("CANVAS_EMPTY")),"image/jpeg",t)})}function c(e,t,n,i,a,r,l){let o,s=((o=document.createElement("canvas")).width=r,o.height=l,o),h=s.getContext("2d");if(!h)throw Error("CANVAS_UNSUPPORTED");return h.fillStyle="#ffffff",h.fillRect(0,0,r,l),h.imageSmoothingEnabled=!0,h.imageSmoothingQuality="high",h.drawImage(e,t,n,i,a,0,0,r,l),s}async function u(e,t){var u;let d,g=performance.now(),m=await e.arrayBuffer(),f=performance.now()-g,p=function(e){let t=(t,n)=>String.fromCharCode(...e.subarray(t,n));if(e.length>=3&&255===e[0]&&216===e[1]&&255===e[2])return"jpeg";if(e.length>=8&&137===e[0]&&"PNG"===t(1,4))return"png";if(e.length>=12&&"RIFF"===t(0,4)&&"WEBP"===t(8,12))return"webp";if(e.length>=6&&("GIF87a"===t(0,6)||"GIF89a"===t(0,6)))return"gif";if(e.length>=2&&"BM"===t(0,2))return"bmp";if(e.length>=12&&"ftyp"===t(4,8)){let n=Math.min(e.length,(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0||e.length),l=[t(8,12)];for(let e=16;e+4<=n;e+=4)l.push(t(e,e+4));if(l.some(e=>i.has(e)))return"heic";if(l.some(e=>r.has(e)))return"avif";if(l.some(e=>a.has(e)))return"heic"}return"unknown"}(new Uint8Array(m,0,Math.min(m.byteLength,64))),w=e.type||"",y=performance.now(),x="native",b=new Blob([m],{type:w||"application/octet-stream"});try{d=await o(b)}catch(e){if("heic"!==p)throw new n("unknown"===p?"UNSUPPORTED_IMAGE":"IMAGE_DECODE_FAILED",p,e);t?.();try{d=await o(await s(b)),x="heic"}catch(e){throw new n("HEIC_DECODE_FAILED",p,e)}}let{width:v,height:C}=(u=d)instanceof HTMLImageElement?{width:u.naturalWidth,height:u.naturalHeight}:{width:u.width,height:u.height};if(!v||!C)throw new n("IMAGE_DECODE_FAILED",p);let M=l(v,C,{maxLongEdge:1600,maxPixels:1/0}),D=await h(c(d,0,0,v,C,M.width,M.height),.85),_=URL.createObjectURL(D),k=performance.now()-y;return{source:d,width:v,height:C,format:p,decoder:x,previewUrl:_,sourceType:w,sourceBytes:e.size,timings:{read:Math.round(f),convert:Math.round(k)},dispose:()=>{URL.revokeObjectURL(_),d instanceof HTMLImageElement||d.close()}}}let d={x:0,y:0,width:1,height:1};async function g(e,n=d,i=t){var a;let r=performance.now(),o=e=>Math.min(1,Math.max(0,e)),s=Math.round(o(n.x)*e.width),u=Math.round(o(n.y)*e.height),m=Math.max(1,Math.min(e.width-s,Math.round(o(n.width)*e.width))),f=Math.max(1,Math.min(e.height-u,Math.round(o(n.height)*e.height))),p=l(m,f,i),w=c(e.source,s,u,m,f,p.width,p.height),y=performance.now()-r,x=performance.now(),b=i.startQuality,v=await h(w,b);for(let t=0;v.size>i.maxBytes&&t<12;t++)b-.05>=i.minQuality-1e-9?b=Math.round((b-.05)*100)/100:(p={width:Math.max(1,Math.floor(.85*p.width)),height:Math.max(1,Math.floor(.85*p.height)),scale:.85*p.scale},w=c(e.source,s,u,m,f,p.width,p.height)),v=await h(w,b);return{dataUrl:await (a=v,new Promise((e,t)=>{let n=new FileReader;n.onload=()=>e(n.result),n.onerror=()=>t(n.error??Error("READ_FAILED")),n.readAsDataURL(a)})),width:p.width,height:p.height,bytes:v.size,quality:b,timings:{crop:Math.round(y),compress:Math.round(performance.now()-x)}}}e.s(["K",0,t,"o",0,n,"N",0,function(e,t){return{sourceType:e.sourceType||e.format,sourceBytes:e.sourceBytes,sourceWidth:e.width,sourceHeight:e.height,outputWidth:t.width,outputHeight:t.height,outputBytes:t.bytes,decoder:e.decoder,quality:t.quality}},"p",0,u,"X",0,g])},499930,e=>{var t=e.i(213761);function n(e,t=.008){let i=Math.max(0,e.x-t),a=Math.max(0,e.y-t);return{x:i,y:a,width:Math.min(1,e.x+e.width+t)-i,height:Math.min(1,e.y+e.height+t)-a}}async function i(e){let t=new Image;if(t.decoding="async",t.src=e,await t.decode(),!t.naturalWidth||!t.naturalHeight)throw Error("IMAGE_EMPTY");return t}async function a(e,n){let i=function(e,t=16,n=!1){let i=Math.max(...e.map(e=>e.width)),a=0,r=e.map(e=>{let r=n?i/e.width:e.scale??1,l={x:0,y:a,width:Math.round(e.width*r),height:Math.round(e.height*r)};return a+=l.height+t,l});return{width:Math.max(...r.map(e=>e.width)),height:a-t,rects:r}}(e.map(e=>({width:e.sw,height:e.sh,scale:e.scale})),16,n),a=document.createElement("canvas");a.width=i.width,a.height=i.height;let r=a.getContext("2d");if(!r)throw Error("CANVAS_UNSUPPORTED");r.fillStyle="#ffffff",r.fillRect(0,0,a.width,a.height),e.forEach((e,t)=>{let n=i.rects[t];r.drawImage(e.source,e.sx,e.sy,e.sw,e.sh,n.x,n.y,n.width,n.height)});let l=await createImageBitmap(a);try{return await (0,t.X)({source:l,width:a.width,height:a.height})}finally{l.close()}}async function r(e,i){let r=e.naturalWidth,l=e.naturalHeight,o=i.map(e=>n(e));return 1===o.length?(0,t.X)({source:e,width:r,height:l},o[0]):a(o.map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*l),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*l))})),!1)}async function l(e){return a((await Promise.all(e.map(i))).map(e=>({source:e,sx:0,sy:0,sw:e.naturalWidth,sh:e.naturalHeight})),!0)}async function o(e,t,i){let r=e.naturalWidth,l=e.naturalHeight,o=i.width/r,s=t.map(e=>n(e)).map(t=>({source:e,sx:Math.round(t.x*r),sy:Math.round(t.y*l),sw:Math.max(1,Math.round(t.width*r)),sh:Math.max(1,Math.round(t.height*l)),scale:o}));return s.push({source:i.source,sx:0,sy:0,sw:i.width,sh:i.height}),a(s,!1)}e.s(["y",0,i,"k",0,o,"M",0,r,"v",0,l])},119472,e=>{var t=e.i(41931),n=e.i(127175);async function i(e){let t;for(let n=0;n<3;n++)try{return await e()}catch(e){if(t=e,!function(e){let t=e?.status;return void 0===t||408===t||502===t||503===t||504===t}(e)||2===n)break;await new Promise(e=>setTimeout(e,1e3*(n+1)))}throw t}async function a(e,r=(0,n.c)()){let{batch:l}=await i(()=>t.k.post("/api/import-batches",{...e,clientRequestId:r,subjectId:e.subjectId||void 0,targetSubjectId:e.targetSubjectId||void 0,paperLevel:e.paperLevel||void 0,items:e.items?.map(e=>({...e})),origin:e.origin},{timeout:12e4}));return(0,n.P)(),l}async function r(e,n={}){let i=n.image?"?include=image":"",{batch:a}=await t.k.get(`/api/import-batches/${encodeURIComponent(e)}${i}`);return a}async function l(e,n,i){let{batch:a}=await t.k.patch(`/api/import-batches/${encodeURIComponent(e)}`,{version:n,draft:i});return a}async function o(e,a,r,l){let{batch:o}=await i(()=>t.k.post(`/api/import-batches/${encodeURIComponent(e)}/start`,{version:a,images:r,analysis:l},{timeout:12e4}));return(0,n.P)(),o}async function s(e){let{batch:i}=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/retry`,{});return(0,n.P)(),i}async function h(e){let i=await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/confirm-all`,{});return(0,n.P)(),i}async function c(e){await t.k.delete(`/api/import-batches/${encodeURIComponent(e)}`),(0,n.P)()}async function u(e){await t.k.post(`/api/import-batches/${encodeURIComponent(e)}/read`,{}),(0,n.P)()}async function d(e,n){return t.k.post(`/api/import-batches/${encodeURIComponent(e)}/fix-text`,{items:n},{timeout:6e5,recoverable:!0})}e.s(["J",0,h,"n",0,function(e){return e?.status===409?e.data?.details?.batch??null:null},"v",0,a,"o",0,c,"w",0,r,"$",0,d,"f",0,u,"s",0,s,"S",0,l,"g",0,o])},25197,e=>{var t=e.i(41931);function n(e){return e.trim()?e:""}async function i(){try{return!!(await t.k.get("/api/user")).confirmBeforeImport}catch{return!1}}async function a(e,i){let a=await t.k.post("/api/error-items",{questionText:e.questionText,answerText:n(e.answerText),analysis:n(e.analysis),wrongAnswerText:e.wrongAnswerText||null,mistakeAnalysis:e.mistakeAnalysis||null,mistakeStatus:e.mistakeStatus||"unknown",knowledgePoints:e.knowledgePoints||[],difficultyStars:e.difficultyStars??null,recognizedGradeSemester:e.gradeSemester??null,hasFigure:e.hasFigure??!1,figureSvg:e.figureSvg??null,questionType:e.questionType??null,subjectId:i.subjectId||void 0,subjectName:i.subjectId?void 0:e.subject,originalImageUrl:i.imageUrl||"",paperLevel:i.paperLevel||void 0});return{id:a.id,shortId:a.shortId??null,subjectId:a.subjectId??null,notebookName:a.subject?.name??null,duplicate:a.duplicate}}e.i(201276),e.s(["x",0,i,"a",0,a],25197)},825624,e=>{let t=/^[\s  ]+/,n="一二三四五六七八九十",i=[{family:"dot",pattern:/^(\d{1,3})\s*(?:.|\.(?!\d))\s*/},{family:"comma",pattern:/^(\d{1,3})\s*[、,,](?!\d)\s*/},{family:"paren",pattern:/^(\d{1,3})\s*[))]\s*/},{family:"colon",pattern:/^(\d{1,3})\s*[::](?!\d)\s*/},{family:"ti",pattern:/^第\s*(\d{1,3}|[一二三四五六七八九十]{1,3})\s*题\s*[..、::]?\s*/},{family:"example",pattern:/^(?:例题?|练习|习题)\s*(\d{1,3})\s*[..、::]?\s*/},{family:"q",pattern:/^(?:Q|Question|Problem|Exercise)\s*(\d{1,3})\s*[..::)]?\s+/i},{family:"cn",pattern:/^([一二三四五六七八九十]{1,3})\s*[、..]\s*/}];function a(e){let a=e.replace(t,"");for(let{family:e,pattern:t}of i){let i=a.match(t);if(!i||a.length<=i[0].length)continue;let r=function(e){if(/^\d+$/.test(e))return Number(e);if("十"===e)return 10;let t=e.indexOf("十");return -1===t?n.indexOf(e)+1:10*(0===t?1:n.indexOf(e[0])+1)+(t===e.length-1?0:n.indexOf(e[t+1])+1)}(i[1]);if(Number.isFinite(r)&&!(r<=0))return{value:r,family:e,prefixLength:i[0].length,label:i[1]}}return null}function r(e){let n=e.split("\n"),i=n[0]?.replace(t,"")??"",r=a(i);return r&&"cn"!==r.family&&(n[0]=i.slice(r.prefixLength)),n.join("\n")}function l(e){let t=[];for(let n of e)(n||0!==t.length&&""!==t[t.length-1])&&t.push(n);for(;t.length>0&&""===t[t.length-1];)t.pop();return t.join("\n")}let o=/(姓名|班级|学号|日期|得分|分数|评分|考号|座位号|家长签字|用时|Name\s*[::_]|Class\s*[::_]|Date\s*[::_]|Score\s*[::_])|_{3,}|共\s*\d+\s*(道|题|小题)|做完|答案(见|在)|最后一页|满分\s*\d+\s*分/i,s=/(阅读|材料|短文|文章|选文|诗歌|古诗|文言文|下[面列]的?(表格|图表|统计|信息)|根据.{0,20}(回答|完成)|passage|read the|according to the)/i,h=/^(参考答案|答案与解析|答案|Answers?|Answer Key)\s*[::]?$/i,c=/^(第[一二三四五六七八九十]+(部分|大题|节)|(Part|Section)\s+[A-Z0-9IVX]+\b)/i,u=/(选择|填空|判断|计算|解答|应用|解决问题|操作|作图|阅读|写作|作文|综合|口算|听力|单项|完形|题)/,d=/(\d{1,3})\s*[~~\-—–至到]\s*(\d{1,3})\s*(?:小?题|questions?)/i,g=/(小问|小题|下列问题|以下问题|下列各题|下面各题|完成下列|回答下列|回答以下|following questions|answer the following)/i;function m(e){let t=[],n=[];for(let i of e)i?n.push(i):n.length&&(t.push(n.join("\n")),n=[]);return n.length&&t.push(n.join("\n")),t}function f(e,t){let n=[];for(let i=0;i<e.length;i++){let a=e[i],r=[a];for(let n=i+1;n<e.length;n++){let i=e[n],l=r[r.length-1];if(i.family!==a.family)continue;let o=1===i.value&&[...t].some(e=>e>l.line&&e<i.line);(i.value===l.value+1||o)&&r.push(i)}r.length>n.length&&(n=r)}return n}function p(e,t,n){return!!c.test(e)||!!t&&"cn"===t.family&&"cn"!==n&&null!==n&&(e.length<=40||u.test(e.slice(0,20)))}function w(e){let t=e.match(d);if(!t)return null;let n=Number(t[1]),i=Number(t[2]);return n<=i?{from:n,to:i}:null}let y={answer:/^(?:【\s*(?:参考答案|答案)\s*】|(?:参考答案|答案)\s*[::]|Answer\s*[::])\s*(.*)$/i,analysis:/^(?:【\s*(?:解析|分析|详解|解答|点评)\s*】|(?:解析|分析|详解|解答|点评)\s*[::])\s*(.*)$/,knowledge:/^(?:【\s*(?:知识点|考点)\s*】|(?:知识点|考点)\s*[::])\s*(.*)$/,difficulty:/^(?:【\s*难度\s*】|难度\s*[::])\s*(.*)$/,questionType:/^(?:【\s*题型\s*】|题型\s*[::])\s*(.*)$/,wrongAnswer:/^(?:【\s*错答\s*】|我的答案\s*[::]|学生答案\s*[::])\s*(.*)$/},x={易:1,较易:2,中等:3,较难:4,难:5};function b(e){return e.split(/[、,,;;]/).map(e=>e.trim()).filter(Boolean)}function v(e){let t={answer:[],analysis:[],knowledge:[],difficulty:[],questionType:[],wrongAnswer:[]},n=[],i=null;for(let a of e){let e=null;for(let n of Object.keys(y)){let r=a.match(y[n]);if(!r)continue;e=n,i=n;let l=r[1].trim();l&&t[n].push(l);break}e||(i&&a.trim()?t[i].push(a.trim()):n.push(a))}let a={},r=t.answer.join("\n").trim();r&&(a.answer=r);let o=t.analysis.join("\n").trim();o&&(a.analysis=o);let s=t.knowledge.flatMap(b);s.length&&(a.knowledgePoints=s);let h=t.difficulty.join(" ").trim(),c=h?function(e){let t=e.trim();if(!t)return null;let n=t.match(/^(\d{1,2})\s*(?:星|级)?$/);if(n){let e=Number(n[1]);return e>=1&&e<=5?e:null}if(/^[★☆]{1,5}$/.test(t)){let e=(t.match(/★/g)??[]).length;return e>=1?e:null}return t in x?x[t]:null}(h):null;null!==c&&(a.difficultyStars=c);let u=t.questionType.join(" ").trim();u&&(a.questionType=u);let d=t.wrongAnswer.join("\n").trim();return d&&(a.wrongAnswer=d),{text:l(n),fields:a}}let C=/^(\d{1,3})\s*[..、,,)]\s*(\S[\s\S]*)$/,M=/^(\d{1,3})\s*[~~—–-]\s*(\d{1,3})\s*[::..、]?\s*([A-Za-z]+)$/;function D(e,t){let n=[],i=!1;for(let a of e){let e={value:!1},r=[];for(let n of a.split("\n")){let i=n.trim()?function(e){let t=e.trim();if(!t)return null;let n=function(e){let t=e.trim().match(M);if(!t)return null;let n=Number(t[1]),i=Number(t[2]),a=t[3];if(!Number.isFinite(n)||!Number.isFinite(i)||n<=0||i<=n||i-n+1>60)return null;let r=i-n+1;return a.length!==r?null:Array.from({length:r},(e,t)=>({label:String(n+t),text:a[t]}))}(t);if(n)return n;let i=function(e){let t=e.trim(),n=[];for(let e of t.matchAll(/(\d{1,3})\s*[..、,,;;]\s*/g)){let i=e.index??0,a=t[i+e[0].length];a&&/\d/.test(a)||n.push({index:i,label:e[1],afterIndex:i+e[0].length})}if(n.length<2)return null;for(let e=1;e<n.length;e++)if(Number(n[e].label)<=Number(n[e-1].label))return null;let i=[];for(let e=0;e<n.length;e++){let a=n[e].afterIndex,r=e+1<n.length?n[e+1].index:t.length,l=t.slice(a,r).trim().replace(/[;;]+$/,"").trim();if(!l||l.length>30||/[。!?!?]/.test(l))return null;i.push({label:n[e].label,text:l})}return i}(t);if(i)return i.map(e=>({label:e.label??"",text:e.text})).filter(e=>e.label);let a=t.match(C);if(!a)return null;let r=Number(a[1]);return!Number.isFinite(r)||r<=0?null:[{label:a[1],text:a[2].trim()}]}(n):null;if(!i){n.trim()&&r.push(n);continue}let a=!1;for(let l of i){let i=t.find(e=>e.label===l.label);if(!i){r.push(n);break}a=!0,e.value=!0;let o=function(e){let t=e.match(/^(.*?)(?:【?\s*(?:解析|分析|详解|解答|点评)\s*】?\s*[::])([\s\S]*)$/);if(t){let n=t[1].replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim(),i=t[2].trim();return i?{answer:n,analysis:i}:{answer:e.trim()}}return{answer:e.replace(/^(?:【?\s*(?:参考答案|答案)\s*】?\s*[::])\s*/,"").trim()||e.trim()}}(l.text);o.answer&&!i.answer&&(i.answer=o.answer),o.analysis&&(i.analysis=i.analysis?`${i.analysis}
7
+ ${o.analysis}`:o.analysis)}!a&&!r.includes(n)&&n.trim()&&!r.includes(n)&&r.push(n)}i=i||e.value,e.value?r.length&&n.push(r.join("\n")):n.push(a)}return[n,i]}e.s(["k",0,2e3,"f",0,1e6,"S",0,60,"i",0,2e4,"J",0,function(e,n={}){let i,u=void 0===n.maxLength?2e4:Math.min(Math.max(n.maxLength,1e3),1e6),y=void 0===n.maxQuestions?60:Math.min(Math.max(n.maxQuestions,2),2e3),x=e.length>u,b=e.slice(0,u).replace(/\r\n?/g,"\n").split("\n").map(e=>e.replace(t,"").replace(/[\s ]+$/,"")),C=b.map(e=>e?a(e):null),M=b.length;for(let e=0;e<b.length;e++)if(h.test(b[e])){M=e;break}let _=[],k=[];for(let e=0;e<M;e++){let t=C[e];t&&("cn"===t.family?k:_).push({...t,line:e})}let E=new Set;for(let e=0;e<M;e++)(c.test(b[e])||C[e]?.family==="cn")&&E.add(e);let R=f(_,E);if(R.length<2){let e=f(k,new Set);e.length>=2&&(R=e)}let I=l(b.slice(0,M)),$=M<b.length?m(b.slice(M)):[],P=(i=a(b[R[0]?.line??0]??""))?i.label:null,S=e=>({questions:I?[{label:P,text:I,material:null,section:null,lineRange:{from:0,to:M}}]:[],ignored:$,detected:!1,ambiguous:e,candidateCount:e?R.length:+!!I,overflow:0,tooLong:x});if(R.length<2){if(!I)return S(!1);let e=v(I.split("\n")),t=S(!1);if(t.questions.length>0&&Object.keys(e.fields).length>0&&(t.questions[0]={...t.questions[0],text:r(e.text),...e.fields}),t.questions.length>0&&$.length){let[e,n]=D($,t.questions);t.ignored=e,n||(t.ignored=$)}return t}let A=R[0].family;if(!n.forceNumbered&&function(e,t,n,i){let a=null;for(let r=t-1;r>=0;r--)if(e[r]){a=p(e[r],i[r],n)?null:e[r];break}return!(!a||o.test(a)||d.test(a))&&("paren"===n?a.length>=15||/[。?!?!::,,;;]$/.test(a):/[::]$/.test(a)&&g.test(a))}(b,R[0].line,A,C)){let e=S(!0);if(e.questions.length>0&&I){let t=v(I.split("\n"));Object.keys(t.fields).length>0&&(e.questions[0]={...e.questions[0],text:r(t.text),...t.fields})}return e}let N=new Set(R.map(e=>e.line)),L=[],j=[],O=null,U=[],H=[],B=(e,t)=>{for(let n of m(e))(!o.test(n)||!(n.length<80))&&(s.test(n)||n.length>=80&&/[。!?.!?;;]/.test(n))?U.push({text:n,range:w(n)}):t?L.push(n):O&&!j.some(e=>e.section===O)?O=`${O}
8
+ ${n}`:L.push(n)},T=R[0].line,X=[];for(let e=0;e<T;e++)b[e]&&p(b[e],C[e],A)?(B(X.splice(0),!0),O=b[e],H=[]):X.push(b[e]);B(X,!0);for(let e=0;e<R.length;e++){let t=R[e].line,n=e+1<R.length?R[e+1].line:M;U.length&&(H=[...H.filter(e=>e.range),...U],U=[]);let i=n,a=null;for(let e=t+1;e<n;e++)if(b[e]&&!N.has(e)&&p(b[e],C[e],A)){i=e,a=b[e];break}let o=b.slice(t,i),h=m(o),c=[];for(;h.length>1&&s.test(h[h.length-1].slice(0,30));)c.unshift(h.pop());let u=c.length?h.join("\n"):l(o),d=R[e].value,g=H.filter(e=>!e.range||d>=e.range.from&&d<=e.range.to),f=v(r(u).split("\n"));for(let i of(j.push({label:R[e].label,text:f.text,material:g.length?g.map(e=>e.text).join("\n\n"):null,section:O,lineRange:{from:t,to:n},...f.fields}),c))U.push({text:i,range:w(i)});null!==a&&(O=a,H=[],B(b.slice(i+1,n),!1))}let[z]=D($,j),Y=j.slice(y);return{questions:j.slice(0,y),ignored:[...L,...z,...Y.map(e=>{var t;let n,i,a,r;return n=(t=e).text.trim(),a=(i=t.material?.trim())?`${i}
9
9
 
10
- ${i}`:i,r=[],(t.answer?.trim()&&r.push(`参考答案:${t.answer.trim()}`),t.analysis?.trim()&&r.push(`参考解析:${t.analysis.trim()}`),t.wrongAnswer?.trim()&&r.push(`学生作答:${t.wrongAnswer.trim()}`),r.length)?`${a}
10
+ ${n}`:n,r=[],(t.answer?.trim()&&r.push(`参考答案:${t.answer.trim()}`),t.analysis?.trim()&&r.push(`参考解析:${t.analysis.trim()}`),t.wrongAnswer?.trim()&&r.push(`学生作答:${t.wrongAnswer.trim()}`),r.length)?`${a}
11
11
 
12
- ${r.join("\n\n")}`:a})],detected:!0,ambiguous:!1,candidateCount:j.length,overflow:Y.length,tooLong:x}}])},767077,e=>{var t=e.i(303163);e.s(["f",0,function(e,i){let n=i.common?.messages?.analysisFailed||"Analysis failed, please try again",a=(0,t.d)(e);if(a){let e=i.errors??{};if(!(a in e))return a;let t=e[a];return"string"==typeof t?t:n}let r=(0,t.Z)(e);if(r.includes("fetch")||r.includes("network"))return i.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${n} (${t})`}return n}])},401280,e=>{let t={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};e.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(e){if("string"!=typeof e)return null;let i=e.trim().toLowerCase();return i?t[i]??null:null}])}])})();
12
+ ${r.join("\n\n")}`:a})],detected:!0,ambiguous:!1,candidateCount:j.length,overflow:Y.length,tooLong:x}}])},767077,e=>{var t=e.i(303163);e.s(["f",0,function(e,n){let i=n.common?.messages?.analysisFailed||"Analysis failed, please try again",a=(0,t.d)(e);if(a){let e=n.errors??{};if(!(a in e))return a;let t=e[a];return"string"==typeof t?t:i}let r=(0,t.Z)(e);if(r.includes("fetch")||r.includes("network"))return n.errors?.AI_CONNECTION_FAILED||"网络连接失败";if("object"==typeof e&&null!==e&&"data"in e&&"string"==typeof e.data){let t="status"in e&&"number"==typeof e.status?e.status:"Error";return`${i} (${t})`}return i}])},401280,e=>{let t={single_choice:"single_choice",singlechoice:"single_choice","single choice":"single_choice","single-choice":"single_choice",multiple_choice:"multiple_choice",multiplechoice:"multiple_choice","multiple choice":"multiple_choice","multiple-choice":"multiple_choice",multichoice:"multiple_choice","multi choice":"multiple_choice",true_false:"true_false",truefalse:"true_false","true/false":"true_false","true false":"true_false","true-false":"true_false","true / false":"true_false",fill_blank:"fill_blank",fillblank:"fill_blank","fill in the blank":"fill_blank","fill-in-the-blank":"fill_blank",fillintheblank:"fill_blank",calculation:"calculation",solution:"solution",reading:"reading",cloze:"cloze",writing:"writing",other:"other",选择题:"single_choice",单项选择:"single_choice",单选:"single_choice",单选题:"single_choice",不定项:"multiple_choice",不定项选择:"multiple_choice",多项选择:"multiple_choice",多选:"multiple_choice",多选题:"multiple_choice",判断:"true_false",判断题:"true_false",是非:"true_false",是非题:"true_false",填空:"fill_blank",填空题:"fill_blank",口算:"calculation",计算:"calculation",计算题:"calculation",解答:"solution",解答题:"solution",应用:"solution",应用题:"solution",证明:"solution",证明题:"solution",简答:"solution",简答题:"solution",阅读:"reading",阅读理解:"reading",完形:"cloze",完形填空:"cloze",作文:"writing",写作:"writing",书面表达:"writing",其他:"other"};e.s(["O",0,"__none__","V",0,["single_choice","multiple_choice","true_false","fill_blank","calculation","solution","reading","cloze","writing","other"],"u",0,{single_choice:"Single Choice",multiple_choice:"Multiple Choice",true_false:"True / False",fill_blank:"Fill in the Blank",calculation:"Calculation",solution:"Solution",reading:"Reading Comprehension",cloze:"Cloze",writing:"Writing",other:"Other"},"H",0,{single_choice:"单选题",multiple_choice:"多选题",true_false:"判断题",fill_blank:"填空题",calculation:"计算题",solution:"解答题",reading:"阅读理解",cloze:"完形填空",writing:"写作",other:"其他"},"P",0,function(e){if("string"!=typeof e)return null;let n=e.trim().toLowerCase();return n?t[n]??null:null}])}])})();
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[728298,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(271645);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let u={tree:e,renderTree:t,stateKey:r,next:null},o=1,d=l,i=u;for(;null!==d&&o<1;){if(d.stateKey===r){i.next=d.next;break}{o++;let e={tree:d.tree,renderTree:d.renderTree,stateKey:d.stateKey,next:null};i.next=e,i=e}d=d.next}return a(u),u}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return u.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(797689),u=e.r(266996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},347257,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return i}});let n=e.r(843476),l=e.r(8372),a=e.r(271645),u=e.r(33906),o=e.r(261994),d=e.r(15783);function i({Component:e,serverProvidedParams:t}){let r,s;if(null!==t)r=t.searchParams,s=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{},r=(0,u.urlSearchParamsToParsedUrlQuery)((0,a.use)(o.SearchParamsContext))}let f=(0,d.createClientSearchParams)(r),c=(0,d.createClientParams)(s);return(0,n.jsx)(e,{params:c,searchParams:f})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=e.r(843476),l=e.r(8372),a=e.r(271645),u=e.r(15783);function o({Component:e,slots:t,serverProvidedParams:r}){let d;if(null!==r)d=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);d=null!==e?e.parentParams:{}}let i=(0,u.createClientParams)(d);return(0,n.jsx)(e,{...t,params:i})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},768017,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=e.r(190809),l=e.r(843476),a=n._(e.r(271645)),u=e.r(590373),o=e.r(754394),d=e.r(8372);class i extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,o.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,o.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,u={[o.HTTPAccessErrorStatus.NOT_FOUND]:e,[o.HTTPAccessErrorStatus.FORBIDDEN]:t,[o.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let d=a===o.HTTPAccessErrorStatus.NOT_FOUND&&e,i=a===o.HTTPAccessErrorStatus.FORBIDDEN&&t,s=a===o.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return d||i||s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,u[a]]}):n}return n}}function s({notFound:e,forbidden:t,unauthorized:r,children:n}){let o=(0,u.useUntrackedPathname)(),f=(0,a.useContext)(d.MissingSlotContext);return e||t||r?(0,l.jsx)(i,{pathname:o,notFound:e,forbidden:t,unauthorized:r,missingSlots:f,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},877694,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(722976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},722976,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return u},RenderValidationBoundaryAtThisLevel:function(){return o},SlotMarker:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,u=null,o=null,d=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},339756,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(190809),u=e.r(843476),o=a._(e.r(271645)),d=e.r(8372),i=e.r(201244),s=e.r(972383),f=e.r(491915),c=e.r(358442),p=e.r(768017);e.r(877694);let m=e.r(127828),y=e.r(728298);e.r(174180);let b=e.r(261994),P=e.r(33906),h=e.r(924988);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function g(e){let t=o.default.useRef(null);return(0,o.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let a=null,u=r.hashFragment;if(u){if(null===(a="top"===u?document.body:document.getElementById(u)??document.getElementsByName(u)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let o=!1;(0,f.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,d=()=>{var r;let l,a;return null===n&&(r=t,n=!Number.isFinite(a=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||a<0?0:l.endsWith("px")?a:l.endsWith("%")?a/100*r:0),n};(u||(t=e.clientHeight,0!==(r=v(a,t,d))))&&((o=!0,l.current=!1,u)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(a,t,d)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),o&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,u.jsx)(o.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,o.useContext)(d.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(g,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:a,isActive:s}){let f,c=(0,o.useContext)(d.GlobalLayoutRouterContext);if((0,o.useContext)(b.NavigationPromisesContext),!c)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,m=(0,o.useDeferredValue)(n.data.rsc,p);if((0,h.isDeferredRsc)(m)){let e=(0,o.use)(m);null===e&&(0,o.use)(i.unresolvedThenable),f=e}else null===m&&(0,o.use)(i.unresolvedThenable),f=m;let y=f;return(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:s},children:y})}function x({loading:e,children:t}){let r=(0,o.use)(d.LayoutRouterContext);return null===r?t:(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,u.jsx)(o.Suspense,{name:e,fallback:(0,u.jsxs)(u.Fragment,{children:[l,a,n]}),children:r})}return(0,u.jsx)(u.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:f,notFound:b,forbidden:h,unauthorized:v,segmentViewBoundaries:g}){let x=(0,o.useContext)(d.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:M,parentSegmentPath:R,parentParams:S,parentLoadingData:F,url:B,isActive:A,debugNameContext:E}=x,L=C[0],H=null===R?[e]:R.concat([L,e]),D=C[1][e],N=M.slots?.get(e);(void 0===D||void 0===N)&&(0,o.use)(i.unresolvedThenable);let k=D[0],w=(0,m.createSegmentKey)(k),V=(0,y.useRouterBFCache)(D,N,w),I=[];do{let e=V.tree,o=V.renderTree,i=V.stateKey,m=e[0],y=S;if(Array.isArray(m)){let e=m[0],t=m[1],r=m[2],n=(0,P.getParamValueFromCacheKey)(t,r);null!==n&&(y={...S,[e]:n})}let g=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(m),x=g??E,T=void 0===g?void 0:E,C=(0,u.jsxs)(j,{renderTree:o,children:[(0,u.jsx)(s.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,u.jsx)(O,{name:T,loading:F,children:(0,u.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:h,unauthorized:v,children:(0,u.jsxs)(c.RedirectBoundary,{children:[(0,u.jsx)(_,{url:B,tree:e,params:y,renderTree:o,segmentPath:H,debugNameContext:x,isActive:A&&i===w}),null]})})})}),null]}),M=(0,u.jsxs)(d.TemplateContext.Provider,{value:C,children:[l,a,f]},i);I.push(M),V=V.next}while(null!==V)return I}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},837457,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(190809),l=e.r(843476),a=n._(e.r(271645)),u=e.r(8372);function o(){let e=(0,a.useContext)(u.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},797689,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(806831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},806831,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},266996,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(793504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},793504,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(843476),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},491915,(e,t,r)=>{function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}],837639,e=>{e.v(t=>Promise.all(["static/chunks/438pvifm_o4g_.js"].map(t=>e.l(t))).then(()=>t(233041)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[728298,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useRouterBFCache",{enumerable:!0,get:function(){return l}});let n=e.r(271645);function l(e,t,r){let[l,a]=(0,n.useState)(()=>({tree:e,renderTree:t,stateKey:r,next:null}));if(l.tree===e)return l;let u={tree:e,renderTree:t,stateKey:r,next:null},o=1,d=l,i=u;for(;null!==d&&o<1;){if(d.stateKey===r){i.next=d.next;break}{o++;let e={tree:d.tree,renderTree:d.renderTree,stateKey:d.stateKey,next:null};i.next=e,i=e}d=d.next}return a(u),u}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},15783,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={createClientParams:function(){return a.createRenderParamsFromClient},createClientSearchParams:function(){return u.createRenderSearchParamsFromClient}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(797689),u=e.r(266996);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},347257,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientPageRoot",{enumerable:!0,get:function(){return i}});let n=e.r(843476),l=e.r(8372),a=e.r(271645),u=e.r(33906),o=e.r(261994),d=e.r(15783);function i({Component:e,serverProvidedParams:t}){let r,s;if(null!==t)r=t.searchParams,s=t.params;else{let e=(0,a.use)(l.LayoutRouterContext);s=null!==e?e.parentParams:{},r=(0,u.urlSearchParamsToParsedUrlQuery)((0,a.use)(o.SearchParamsContext))}let f=(0,d.createClientSearchParams)(r),c=(0,d.createClientParams)(s);return(0,n.jsx)(e,{params:c,searchParams:f})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},92825,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=e.r(843476),l=e.r(8372),a=e.r(271645),u=e.r(15783);function o({Component:e,slots:t,serverProvidedParams:r}){let d;if(null!==r)d=r.params;else{let e=(0,a.use)(l.LayoutRouterContext);d=null!==e?e.parentParams:{}}let i=(0,u.createClientParams)(d);return(0,n.jsx)(e,{...t,params:i})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},768017,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=e.r(190809),l=e.r(843476),a=n._(e.r(271645)),u=e.r(590373),o=e.r(754394),d=e.r(8372);class i extends a.default.Component{constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}componentDidCatch(){}static getDerivedStateFromError(e){if((0,o.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,o.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:a}=this.state,u={[o.HTTPAccessErrorStatus.NOT_FOUND]:e,[o.HTTPAccessErrorStatus.FORBIDDEN]:t,[o.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(a){let d=a===o.HTTPAccessErrorStatus.NOT_FOUND&&e,i=a===o.HTTPAccessErrorStatus.FORBIDDEN&&t,s=a===o.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return d||i||s?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("meta",{name:"robots",content:"noindex"}),!1,u[a]]}):n}return n}}function s({notFound:e,forbidden:t,unauthorized:r,children:n}){let o=(0,u.useUntrackedPathname)(),f=(0,a.useContext)(d.MissingSlotContext);return e||t||r?(0,l.jsx)(i,{pathname:o,notFound:e,forbidden:t,unauthorized:r,missingSlots:f,children:n}):(0,l.jsx)(l.Fragment,{children:n})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},877694,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a.InstantValidationBoundaryContext},PlaceValidationBoundaryBelowThisLevel:function(){return a.PlaceValidationBoundaryBelowThisLevel},RenderValidationBoundaryAtThisLevel:function(){return a.RenderValidationBoundaryAtThisLevel},SlotMarker:function(){return a.SlotMarker}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(722976);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},722976,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0});var n={InstantValidationBoundaryContext:function(){return a},PlaceValidationBoundaryBelowThisLevel:function(){return u},RenderValidationBoundaryAtThisLevel:function(){return o},SlotMarker:function(){return d}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=null,u=null,o=null,d=null;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},339756,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0});var n={LoadingBoundaryProvider:function(){return x},default:function(){return T}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(190809),u=e.r(843476),o=a._(e.r(271645)),d=e.r(8372),i=e.r(201244),s=e.r(972383),f=e.r(491915),c=e.r(358442),p=e.r(768017);e.r(877694);let m=e.r(127828),y=e.r(728298);e.r(174180);let b=e.r(261994),h=e.r(33906),P=e.r(924988);function v(e,t,r){let n=e.getClientRects();if(0===n.length)return 0;let l=1/0;for(let e=0;e<n.length;e++){let t=n[e];t.top<l&&(l=t.top)}return l>=r()&&l<=t?1:2}function g(e){let t=o.default.useRef(null);return(0,o.useLayoutEffect)(()=>{let{scrollRef:r,renderTree:n}=e,l=r.forceScroll?r.scrollRef:n.data.scrollRef;if(null===l||!l.current)return;let a=null,u=r.hashFragment;if(u){if(null===(a="top"===u?document.body:document.getElementById(u)??document.getElementsByName(u)[0]??null)){l.current=!1,r.onlyHashChange=!1,r.hashFragment=null;return}}else a=t.current;if(null===a)return;let o=!1;(0,f.disableSmoothScrollDuringRouteTransition)(()=>{let e=document.documentElement,t=null,r=null,n=null,d=()=>{var r;let l,a;return null===n&&(r=t,n=!Number.isFinite(a=Number.parseFloat(l=getComputedStyle(e).scrollPaddingTop))||a<0?0:l.endsWith("px")?a:l.endsWith("%")?a/100*r:0),n};(u||(t=e.clientHeight,0!==(r=v(a,t,d))))&&((o=!0,l.current=!1,u)?a.scrollIntoView():1!==r&&(e.scrollTop=0,2===v(a,t,d)&&a.scrollIntoView()))},{dontForceLayout:!0,onlyHashChange:r.onlyHashChange}),o&&(r.onlyHashChange=!1,r.hashFragment=null)},void 0),(0,u.jsx)(o.Fragment,{ref:t,children:e.children})}function j({children:e,renderTree:t}){let r=(0,o.useContext)(d.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(g,{scrollRef:r.scrollRef,renderTree:t,children:e})}function _({tree:e,segmentPath:t,debugNameContext:r,renderTree:n,params:l,url:a,isActive:s}){let f,c=(0,o.useContext)(d.GlobalLayoutRouterContext);if((0,o.useContext)(b.NavigationPromisesContext),!c)throw Error("invariant global layout router not mounted");let p=null!==n.data.prefetchRsc?n.data.prefetchRsc:n.data.rsc,m=(0,o.useDeferredValue)(n.data.rsc,p);if((0,P.isDeferredRsc)(m)){let e=(0,o.use)(m);null===e&&(0,o.use)(i.unresolvedThenable),f=e}else null===m&&(0,o.use)(i.unresolvedThenable),f=m;let y=f;return(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:e,parentRenderTree:n,parentSegmentPath:t,parentParams:l,parentLoadingData:null,debugNameContext:r,url:a,isActive:s},children:y})}function x({loading:e,children:t}){let r=(0,o.use)(d.LayoutRouterContext);return null===r?t:(0,u.jsx)(d.LayoutRouterContext.Provider,{value:{parentTree:r.parentTree,parentRenderTree:r.parentRenderTree,parentSegmentPath:r.parentSegmentPath,parentParams:r.parentParams,parentLoadingData:e,debugNameContext:r.debugNameContext,url:r.url,isActive:r.isActive},children:t})}function O({name:e,loading:t,children:r}){if(null!==t){let n=t[0],l=t[1],a=t[2];return(0,u.jsx)(o.Suspense,{name:e,fallback:(0,u.jsxs)(u.Fragment,{children:[l,a,n]}),children:r})}return(0,u.jsx)(u.Fragment,{children:r})}function T({parallelRouterKey:e,error:t,errorStyles:r,errorScripts:n,templateStyles:l,templateScripts:a,template:f,notFound:b,forbidden:P,unauthorized:v,segmentViewBoundaries:g}){let x=(0,o.useContext)(d.LayoutRouterContext);if(!x)throw Error("invariant expected layout router to be mounted");let{parentTree:C,parentRenderTree:M,parentSegmentPath:R,parentParams:S,parentLoadingData:F,url:B,isActive:A,debugNameContext:E}=x,L=C[0],H=null===R?[e]:R.concat([L,e]),D=C[1][e],N=M.slots?.get(e);(void 0===D||void 0===N)&&(0,o.use)(i.unresolvedThenable);let w=D[0],k=(0,m.createSegmentKey)(w),V=(0,y.useRouterBFCache)(D,N,k),I=[];do{let e=V.tree,o=V.renderTree,i=V.stateKey,m=e[0],y=S;if(Array.isArray(m)){let e=m[0],t=m[1],r=m[2],n=(0,h.getParamValueFromCacheKey)(t,r);null!==n&&(y={...S,[e]:n})}let g=function(e){if("/"===e)return"/";if("string"==typeof e)if("(__SLOT__)"===e)return;else return e+"/";return e[1]+"/"}(m),x=g??E,T=void 0===g?void 0:E,C=(0,u.jsxs)(j,{renderTree:o,children:[(0,u.jsx)(s.ErrorBoundary,{errorComponent:t,errorStyles:r,errorScripts:n,children:(0,u.jsx)(O,{name:T,loading:F,children:(0,u.jsx)(p.HTTPAccessFallbackBoundary,{notFound:b,forbidden:P,unauthorized:v,children:(0,u.jsxs)(c.RedirectBoundary,{children:[(0,u.jsx)(_,{url:B,tree:e,params:y,renderTree:o,segmentPath:H,debugNameContext:x,isActive:A&&i===k}),null]})})})}),null]}),M=(0,u.jsxs)(d.TemplateContext.Provider,{value:C,children:[l,a,f]},i);I.push(M),V=V.next}while(null!==V)return I}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},837457,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"default",{enumerable:!0,get:function(){return o}});let n=e.r(190809),l=e.r(843476),a=n._(e.r(271645)),u=e.r(8372);function o(){let e=(0,a.useContext)(u.TemplateContext);return(0,l.jsx)(l.Fragment,{children:e})}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},797689,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(806831).createRenderParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},806831,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},266996,(e,t,r)=>{e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=e.r(793504).createRenderSearchParamsFromClient;("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},793504,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return l}});let n=new WeakMap;function l(e){let t=n.get(e);if(t)return t;let r=Promise.resolve(e);return r.status="fulfilled",r.value=e,n.set(e,r),r}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},27201,(e,t,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"IconMark",{enumerable:!0,get:function(){return l}});let n=e.r(843476),l=()=>"u">typeof window?null:(0,n.jsx)("meta",{name:"«nxt-icon»"})},491915,(e,t,r)=>{function n(e,t={}){if(t.onlyHashChange)return void e();let r=document.documentElement;if("smooth"!==r.dataset.scrollBehavior)return void e();let l=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=l}e.i(247167),Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"disableSmoothScrollDuringRouteTransition",{enumerable:!0,get:function(){return n}})}],837639,e=>{e.v(t=>Promise.all(["static/chunks/1cwhgdmqho-2t.js"].map(t=>e.l(t))).then(()=>t(233041)))}]);