kordoc 4.24.49 → 4.24.51

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 (191) hide show
  1. package/README.md +14 -13
  2. package/dist/{-22V6D2US.js → -KCRZNASU.js} +42 -42
  3. package/dist/{chunk-DA5AXURC.js → chunk-2SIZ5MFF.js} +84 -11
  4. package/dist/chunk-2SIZ5MFF.js.map +1 -0
  5. package/dist/{chunk-EUJX7HTR.js → chunk-35G7U3YU.js} +26 -10
  6. package/dist/{chunk-EUJX7HTR.js.map → chunk-35G7U3YU.js.map} +1 -1
  7. package/dist/{chunk-UBY2PLKR.cjs → chunk-45LMTY3P.cjs} +48 -32
  8. package/dist/chunk-45LMTY3P.cjs.map +1 -0
  9. package/dist/{chunk-PW7MQZI4.cjs → chunk-4ATTNHKS.cjs} +2 -2
  10. package/dist/{chunk-PW7MQZI4.cjs.map → chunk-4ATTNHKS.cjs.map} +1 -1
  11. package/dist/{chunk-L3JP55ZY.js → chunk-4IPFRFVU.js} +2 -2
  12. package/dist/{chunk-7KKL3PRK.js → chunk-5IMZWUXP.js} +32 -30
  13. package/dist/chunk-5IMZWUXP.js.map +1 -0
  14. package/dist/{chunk-M5RQ2PNP.js → chunk-6IAYV5W4.js} +14 -6
  15. package/dist/chunk-6IAYV5W4.js.map +1 -0
  16. package/dist/{chunk-4MWUBTAE.js → chunk-7ZWEK6GU.js} +2 -2
  17. package/dist/{chunk-LCRSRVFJ.js → chunk-AI43WY7Q.js} +2 -2
  18. package/dist/{chunk-Q7FDPJUS.js → chunk-BW7M7NEK.js} +13 -11
  19. package/dist/{chunk-Q7FDPJUS.js.map → chunk-BW7M7NEK.js.map} +1 -1
  20. package/dist/{chunk-HETGOJ6V.js → chunk-BZNS2FVC.js} +2 -2
  21. package/dist/{chunk-VMOUAWGD.js → chunk-D4AMLUTJ.js} +7 -7
  22. package/dist/{chunk-KB4ORA7M.js → chunk-DAGVJDCR.js} +2 -2
  23. package/dist/{chunk-MIJTZKWF.js → chunk-EOU3LHBZ.js} +2 -2
  24. package/dist/{chunk-S54DZB2Z.js → chunk-G5BBHFKH.js} +83 -10
  25. package/dist/chunk-G5BBHFKH.js.map +1 -0
  26. package/dist/{chunk-LOSCIAHY.js → chunk-GCYCXGNW.js} +4 -2
  27. package/dist/chunk-GCYCXGNW.js.map +1 -0
  28. package/dist/{chunk-PMGJQWSW.js → chunk-I44OXMPJ.js} +2 -2
  29. package/dist/{chunk-67GSFYG7.js → chunk-IWAYL364.js} +2 -2
  30. package/dist/{chunk-UU54HN5I.js → chunk-J2223EAJ.js} +25 -31
  31. package/dist/chunk-J2223EAJ.js.map +1 -0
  32. package/dist/{chunk-6BFWLS7E.js → chunk-JQVDG7KX.js} +3 -3
  33. package/dist/{chunk-LFFARZYZ.js → chunk-MCQSIN7Z.js} +2 -2
  34. package/dist/{chunk-HW7WVYBF.js → chunk-NQBHDDAT.js} +2 -2
  35. package/dist/{chunk-MLBX6KQM.js → chunk-NZPCUEGV.js} +2 -2
  36. package/dist/{chunk-4HJKBRZJ.js → chunk-O42SEA4E.js} +18 -18
  37. package/dist/{chunk-TAHS42ED.js → chunk-P6UVZNSO.js} +27 -11
  38. package/dist/{chunk-TAHS42ED.js.map → chunk-P6UVZNSO.js.map} +1 -1
  39. package/dist/{chunk-R2RLNUNK.js → chunk-PUMTE6MJ.js} +6 -6
  40. package/dist/{chunk-IRAZCKQ6.cjs → chunk-QECUDHOQ.cjs} +3 -3
  41. package/dist/{chunk-IRAZCKQ6.cjs.map → chunk-QECUDHOQ.cjs.map} +1 -1
  42. package/dist/{chunk-367WLMPO.cjs → chunk-QMLFUMPU.cjs} +85 -83
  43. package/dist/chunk-QMLFUMPU.cjs.map +1 -0
  44. package/dist/{chunk-ZF24SO45.js → chunk-TAZTQPXH.js} +2 -2
  45. package/dist/{chunk-CCQMSIZQ.js → chunk-TKMHLKEP.js} +19 -19
  46. package/dist/{chunk-2UWWWM4Q.cjs → chunk-TUQER6U6.cjs} +98 -98
  47. package/dist/{chunk-2UWWWM4Q.cjs.map → chunk-TUQER6U6.cjs.map} +1 -1
  48. package/dist/{chunk-OAETOHH3.js → chunk-TZNID7WN.js} +3 -3
  49. package/dist/{chunk-Y6QW3FJQ.js → chunk-U45FZY4H.js} +2 -2
  50. package/dist/{chunk-AXW2FMVR.js → chunk-U65CFPRW.js} +2 -2
  51. package/dist/{chunk-TQOAPKLU.cjs → chunk-USVDMFOC.cjs} +6 -6
  52. package/dist/{chunk-TQOAPKLU.cjs.map → chunk-USVDMFOC.cjs.map} +1 -1
  53. package/dist/{chunk-KXHUHGMC.js → chunk-V26RXRUA.js} +2 -2
  54. package/dist/{chunk-WLFZOBZR.js → chunk-V4A3L5KR.js} +3 -3
  55. package/dist/{chunk-Y4MFHEK4.cjs → chunk-VEQ33FMY.cjs} +3 -3
  56. package/dist/{chunk-Y4MFHEK4.cjs.map → chunk-VEQ33FMY.cjs.map} +1 -1
  57. package/dist/{chunk-AUAJVQQK.js → chunk-WTDEYE6F.js} +2 -2
  58. package/dist/{chunk-RQLEGKEV.js → chunk-X2ZNWQBA.js} +2 -2
  59. package/dist/{chunk-PVV6OY4M.cjs → chunk-XENUD7JK.cjs} +177 -104
  60. package/dist/chunk-XENUD7JK.cjs.map +1 -0
  61. package/dist/{chunk-EYSXMDA7.js → chunk-XO6DCDIT.js} +17 -17
  62. package/dist/{chunk-DAAJO62F.js → chunk-ZWNVRSGF.js} +2 -2
  63. package/dist/chunks-TMBS7TRD.js +11 -0
  64. package/dist/cli.js +52 -51
  65. package/dist/cli.js.map +1 -1
  66. package/dist/{formula-QJEOIVKR.cjs → formula-4O54LMV4.cjs} +14 -13
  67. package/dist/formula-4O54LMV4.cjs.map +1 -0
  68. package/dist/{formula-FQLMMBDP.js → formula-6JZI46QH.js} +4 -3
  69. package/dist/formula-6JZI46QH.js.map +1 -0
  70. package/dist/{formula-BYEDWWZU.js → formula-PSPOE4NL.js} +5 -4
  71. package/dist/formula-PSPOE4NL.js.map +1 -0
  72. package/dist/generator-IHU3ZJFL.cjs +11 -0
  73. package/dist/{generator-FTM6GOGB.cjs.map → generator-IHU3ZJFL.cjs.map} +1 -1
  74. package/dist/generator-KE3WTY4O.js +17 -0
  75. package/dist/generator-SMNLBY45.js +10 -0
  76. package/dist/hancom-GB6HZKL7.js +84 -0
  77. package/dist/hancom-GB6HZKL7.js.map +1 -0
  78. package/dist/hancom-SZBRFB4L.js +85 -0
  79. package/dist/hancom-SZBRFB4L.js.map +1 -0
  80. package/dist/hancom-YAUQDSDK.cjs +85 -0
  81. package/dist/hancom-YAUQDSDK.cjs.map +1 -0
  82. package/dist/{image-ocr-7Y3FCGRR.js → image-ocr-7SIIO5GO.js} +10 -10
  83. package/dist/{image-ocr-VIGZE4YL.js → image-ocr-J63QUDI2.js} +7 -7
  84. package/dist/{image-ocr-WRILL3WO.cjs → image-ocr-YPKWLJVD.cjs} +28 -28
  85. package/dist/{image-ocr-WRILL3WO.cjs.map → image-ocr-YPKWLJVD.cjs.map} +1 -1
  86. package/dist/index.cjs +1119 -1117
  87. package/dist/index.cjs.map +1 -1
  88. package/dist/index.d.cts +5 -2
  89. package/dist/index.d.ts +5 -2
  90. package/dist/index.js +75 -73
  91. package/dist/index.js.map +1 -1
  92. package/dist/mcp.js +42 -41
  93. package/dist/mcp.js.map +1 -1
  94. package/dist/memo-5MQ6DM4A.js +17 -0
  95. package/dist/{model-bundle-UJRQPYUU.js → model-bundle-72BDGCZY.js} +5 -5
  96. package/dist/{models-64YLAWTI.js → models-QXVI5UHR.js} +5 -5
  97. package/dist/{parse-worker-v2-QWQZKFQO.js → parse-worker-v2-RCZPPU7G.js} +23 -23
  98. package/dist/{parser-RB6CBNAM.cjs → parser-IRERCFMK.cjs} +166 -166
  99. package/dist/{parser-RB6CBNAM.cjs.map → parser-IRERCFMK.cjs.map} +1 -1
  100. package/dist/{parser-JPWANPLM.js → parser-MAOMYZY5.js} +12 -12
  101. package/dist/{parser-XFU3VRWM.js → parser-NZJD3JG7.js} +16 -16
  102. package/dist/{pdf-ocr-XTZZEYKJ.js → pdf-ocr-ELMWWH5T.js} +6 -6
  103. package/dist/pdf-ocr-KIIEIQU6.cjs +42 -0
  104. package/dist/{pdf-ocr-NOJHEH4M.cjs.map → pdf-ocr-KIIEIQU6.cjs.map} +1 -1
  105. package/dist/{pdf-ocr-ZV3KYIIE.js → pdf-ocr-NP3BOUA5.js} +9 -9
  106. package/dist/{profile-io-FAJORRD2.js → profile-io-HDWE5EY3.js} +3 -3
  107. package/dist/{rasterize-4ZJUA2DZ.js → rasterize-4TQAGBZQ.js} +3 -3
  108. package/dist/{redact-doc-JPNROEH6.js → redact-doc-NZVL45JN.js} +29 -29
  109. package/dist/{render-D4WBOBKI.js → render-7JRZBK5R.js} +12 -12
  110. package/dist/{rewrite-fallback-OF3QI6CX.js → rewrite-fallback-VYGY2GAX.js} +13 -13
  111. package/dist/seal-TXHDIO27.js +16 -0
  112. package/dist/{setup-YC25YCQB.js → setup-ME45RAIC.js} +3 -3
  113. package/dist/{to-hwpx-ZWN64NCQ.js → to-hwpx-7XR5P4NH.js} +4 -4
  114. package/dist/to-hwpx-HIL2WODY.cjs +16 -0
  115. package/dist/{to-hwpx-LUA6F5RR.cjs.map → to-hwpx-HIL2WODY.cjs.map} +1 -1
  116. package/dist/{to-hwpx-D7OMPDUQ.js → to-hwpx-IFL6CZ6T.js} +7 -7
  117. package/dist/visual-J3E3ZYN3.js +37 -0
  118. package/dist/{watch-ZU576VSR.js → watch-BAED4COV.js} +23 -23
  119. package/package.json +1 -1
  120. package/dist/chunk-367WLMPO.cjs.map +0 -1
  121. package/dist/chunk-7KKL3PRK.js.map +0 -1
  122. package/dist/chunk-DA5AXURC.js.map +0 -1
  123. package/dist/chunk-LOSCIAHY.js.map +0 -1
  124. package/dist/chunk-M5RQ2PNP.js.map +0 -1
  125. package/dist/chunk-PVV6OY4M.cjs.map +0 -1
  126. package/dist/chunk-S54DZB2Z.js.map +0 -1
  127. package/dist/chunk-UBY2PLKR.cjs.map +0 -1
  128. package/dist/chunk-UU54HN5I.js.map +0 -1
  129. package/dist/chunks-Q7242OJE.js +0 -11
  130. package/dist/formula-BYEDWWZU.js.map +0 -1
  131. package/dist/formula-FQLMMBDP.js.map +0 -1
  132. package/dist/formula-QJEOIVKR.cjs.map +0 -1
  133. package/dist/generator-FTM6GOGB.cjs +0 -11
  134. package/dist/generator-Q3L7RNUY.js +0 -17
  135. package/dist/generator-SU73HZHR.js +0 -10
  136. package/dist/memo-T5ZQEXEA.js +0 -17
  137. package/dist/pdf-ocr-NOJHEH4M.cjs +0 -42
  138. package/dist/seal-DQWEHIAM.js +0 -16
  139. package/dist/to-hwpx-LUA6F5RR.cjs +0 -16
  140. package/dist/visual-SW7NPY6K.js +0 -37
  141. /package/dist/{-22V6D2US.js.map → -KCRZNASU.js.map} +0 -0
  142. /package/dist/{chunk-L3JP55ZY.js.map → chunk-4IPFRFVU.js.map} +0 -0
  143. /package/dist/{chunk-4MWUBTAE.js.map → chunk-7ZWEK6GU.js.map} +0 -0
  144. /package/dist/{chunk-LCRSRVFJ.js.map → chunk-AI43WY7Q.js.map} +0 -0
  145. /package/dist/{chunk-HETGOJ6V.js.map → chunk-BZNS2FVC.js.map} +0 -0
  146. /package/dist/{chunk-VMOUAWGD.js.map → chunk-D4AMLUTJ.js.map} +0 -0
  147. /package/dist/{chunk-KB4ORA7M.js.map → chunk-DAGVJDCR.js.map} +0 -0
  148. /package/dist/{chunk-MIJTZKWF.js.map → chunk-EOU3LHBZ.js.map} +0 -0
  149. /package/dist/{chunk-PMGJQWSW.js.map → chunk-I44OXMPJ.js.map} +0 -0
  150. /package/dist/{chunk-67GSFYG7.js.map → chunk-IWAYL364.js.map} +0 -0
  151. /package/dist/{chunk-6BFWLS7E.js.map → chunk-JQVDG7KX.js.map} +0 -0
  152. /package/dist/{chunk-LFFARZYZ.js.map → chunk-MCQSIN7Z.js.map} +0 -0
  153. /package/dist/{chunk-HW7WVYBF.js.map → chunk-NQBHDDAT.js.map} +0 -0
  154. /package/dist/{chunk-MLBX6KQM.js.map → chunk-NZPCUEGV.js.map} +0 -0
  155. /package/dist/{chunk-4HJKBRZJ.js.map → chunk-O42SEA4E.js.map} +0 -0
  156. /package/dist/{chunk-R2RLNUNK.js.map → chunk-PUMTE6MJ.js.map} +0 -0
  157. /package/dist/{chunk-ZF24SO45.js.map → chunk-TAZTQPXH.js.map} +0 -0
  158. /package/dist/{chunk-CCQMSIZQ.js.map → chunk-TKMHLKEP.js.map} +0 -0
  159. /package/dist/{chunk-OAETOHH3.js.map → chunk-TZNID7WN.js.map} +0 -0
  160. /package/dist/{chunk-Y6QW3FJQ.js.map → chunk-U45FZY4H.js.map} +0 -0
  161. /package/dist/{chunk-AXW2FMVR.js.map → chunk-U65CFPRW.js.map} +0 -0
  162. /package/dist/{chunk-KXHUHGMC.js.map → chunk-V26RXRUA.js.map} +0 -0
  163. /package/dist/{chunk-WLFZOBZR.js.map → chunk-V4A3L5KR.js.map} +0 -0
  164. /package/dist/{chunk-AUAJVQQK.js.map → chunk-WTDEYE6F.js.map} +0 -0
  165. /package/dist/{chunk-RQLEGKEV.js.map → chunk-X2ZNWQBA.js.map} +0 -0
  166. /package/dist/{chunk-EYSXMDA7.js.map → chunk-XO6DCDIT.js.map} +0 -0
  167. /package/dist/{chunk-DAAJO62F.js.map → chunk-ZWNVRSGF.js.map} +0 -0
  168. /package/dist/{chunks-Q7242OJE.js.map → chunks-TMBS7TRD.js.map} +0 -0
  169. /package/dist/{generator-Q3L7RNUY.js.map → generator-KE3WTY4O.js.map} +0 -0
  170. /package/dist/{generator-SU73HZHR.js.map → generator-SMNLBY45.js.map} +0 -0
  171. /package/dist/{image-ocr-7Y3FCGRR.js.map → image-ocr-7SIIO5GO.js.map} +0 -0
  172. /package/dist/{image-ocr-VIGZE4YL.js.map → image-ocr-J63QUDI2.js.map} +0 -0
  173. /package/dist/{memo-T5ZQEXEA.js.map → memo-5MQ6DM4A.js.map} +0 -0
  174. /package/dist/{model-bundle-UJRQPYUU.js.map → model-bundle-72BDGCZY.js.map} +0 -0
  175. /package/dist/{models-64YLAWTI.js.map → models-QXVI5UHR.js.map} +0 -0
  176. /package/dist/{parse-worker-v2-QWQZKFQO.js.map → parse-worker-v2-RCZPPU7G.js.map} +0 -0
  177. /package/dist/{parser-JPWANPLM.js.map → parser-MAOMYZY5.js.map} +0 -0
  178. /package/dist/{parser-XFU3VRWM.js.map → parser-NZJD3JG7.js.map} +0 -0
  179. /package/dist/{pdf-ocr-XTZZEYKJ.js.map → pdf-ocr-ELMWWH5T.js.map} +0 -0
  180. /package/dist/{pdf-ocr-ZV3KYIIE.js.map → pdf-ocr-NP3BOUA5.js.map} +0 -0
  181. /package/dist/{profile-io-FAJORRD2.js.map → profile-io-HDWE5EY3.js.map} +0 -0
  182. /package/dist/{rasterize-4ZJUA2DZ.js.map → rasterize-4TQAGBZQ.js.map} +0 -0
  183. /package/dist/{redact-doc-JPNROEH6.js.map → redact-doc-NZVL45JN.js.map} +0 -0
  184. /package/dist/{render-D4WBOBKI.js.map → render-7JRZBK5R.js.map} +0 -0
  185. /package/dist/{rewrite-fallback-OF3QI6CX.js.map → rewrite-fallback-VYGY2GAX.js.map} +0 -0
  186. /package/dist/{seal-DQWEHIAM.js.map → seal-TXHDIO27.js.map} +0 -0
  187. /package/dist/{setup-YC25YCQB.js.map → setup-ME45RAIC.js.map} +0 -0
  188. /package/dist/{to-hwpx-D7OMPDUQ.js.map → to-hwpx-7XR5P4NH.js.map} +0 -0
  189. /package/dist/{to-hwpx-ZWN64NCQ.js.map → to-hwpx-IFL6CZ6T.js.map} +0 -0
  190. /package/dist/{visual-SW7NPY6K.js.map → visual-J3E3ZYN3.js.map} +0 -0
  191. /package/dist/{watch-ZU576VSR.js.map → watch-BAED4COV.js.map} +0 -0
@@ -1,11 +1,15 @@
1
1
  #!/usr/bin/env node
2
+ import {
3
+ extractRenderedRegions,
4
+ renderDocumentToScene
5
+ } from "./chunk-BW7M7NEK.js";
2
6
  import {
3
7
  WEBP_OPTIONS,
4
8
  blocksToPages,
5
9
  loadSharp,
6
10
  readImageQrCodes,
7
11
  toBuffer
8
- } from "./chunk-ZF24SO45.js";
12
+ } from "./chunk-TAZTQPXH.js";
9
13
  import {
10
14
  applyCellEdit,
11
15
  buildOrigUnits,
@@ -18,7 +22,7 @@ import {
18
22
  resolveParagraphMappings,
19
23
  resolveSectionEntryNames,
20
24
  stripCellTokens
21
- } from "./chunk-EYSXMDA7.js";
25
+ } from "./chunk-XO6DCDIT.js";
22
26
  import {
23
27
  TOTAL_LABEL_RE,
24
28
  comResultToParseResult,
@@ -47,10 +51,10 @@ import {
47
51
  summarize,
48
52
  textProfile,
49
53
  topLevelParagraphs
50
- } from "./chunk-CCQMSIZQ.js";
54
+ } from "./chunk-TKMHLKEP.js";
51
55
  import {
52
56
  patchZipEntries
53
- } from "./chunk-Y6QW3FJQ.js";
57
+ } from "./chunk-U45FZY4H.js";
54
58
  import {
55
59
  ANNOTATION_BLANK_RE,
56
60
  ValueCursor,
@@ -77,10 +81,6 @@ import {
77
81
  scanInlineSegments,
78
82
  scanSectionXml
79
83
  } from "./chunk-3AHL6YEA.js";
80
- import {
81
- extractRenderedRegions,
82
- renderDocumentToScene
83
- } from "./chunk-Q7FDPJUS.js";
84
84
  import {
85
85
  MAX_DECOMPRESS_SIZE,
86
86
  MAX_XML_DEPTH,
@@ -91,7 +91,7 @@ import {
91
91
  localName,
92
92
  rawTextContent,
93
93
  readZipEntry
94
- } from "./chunk-KB4ORA7M.js";
94
+ } from "./chunk-DAGVJDCR.js";
95
95
  import {
96
96
  INLINE_TABLE_MARK,
97
97
  blocksPlainText,
@@ -104,7 +104,7 @@ import {
104
104
  memosMarkdown,
105
105
  parseHwp5Document,
106
106
  resolveImageBlocks
107
- } from "./chunk-UU54HN5I.js";
107
+ } from "./chunk-J2223EAJ.js";
108
108
  import {
109
109
  MAX_PIXELS,
110
110
  bmpToPng,
@@ -131,7 +131,7 @@ import {
131
131
  stripScriptTags,
132
132
  tidyScriptTags,
133
133
  wrapScript
134
- } from "./chunk-LCRSRVFJ.js";
134
+ } from "./chunk-AI43WY7Q.js";
135
135
  import {
136
136
  MAX_COLS,
137
137
  MAX_ROWS,
@@ -142,7 +142,7 @@ import {
142
142
  flattenLayoutTables,
143
143
  hasStructuredCellContent,
144
144
  sanitizeText
145
- } from "./chunk-HETGOJ6V.js";
145
+ } from "./chunk-BZNS2FVC.js";
146
146
  import {
147
147
  hangulAmount,
148
148
  mapPuaText
@@ -158,7 +158,7 @@ import {
158
158
  stripDtd,
159
159
  toArrayBuffer,
160
160
  unzipLimitBytes
161
- } from "./chunk-KXHUHGMC.js";
161
+ } from "./chunk-V26RXRUA.js";
162
162
 
163
163
  // src/table/visual.ts
164
164
  import { readFile as readFile2 } from "fs/promises";
@@ -16889,7 +16889,7 @@ var MIN_SIDE = 24;
16889
16889
  async function ocrEmbeddedImages(blocks, options, warnings) {
16890
16890
  const ocr = options?.ocr;
16891
16891
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
16892
- const { parseImageDocument } = await import("./image-ocr-7Y3FCGRR.js");
16892
+ const { parseImageDocument } = await import("./image-ocr-7SIIO5GO.js");
16893
16893
  let inserted = false, unreadable = 0;
16894
16894
  let failed = null;
16895
16895
  const walk = async (list, depth) => {
@@ -20577,7 +20577,7 @@ function scriptsOff(r, off) {
20577
20577
  }
20578
20578
  async function parseImage(buffer, options) {
20579
20579
  try {
20580
- const { parseImageDocument } = await import("./image-ocr-7Y3FCGRR.js");
20580
+ const { parseImageDocument } = await import("./image-ocr-7SIIO5GO.js");
20581
20581
  const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
20582
20582
  stripScriptTags({ blocks });
20583
20583
  return {
@@ -20649,7 +20649,7 @@ async function parseHwp(buffer, options) {
20649
20649
  async function parsePdf(buffer, options) {
20650
20650
  let parsePdfDocument;
20651
20651
  try {
20652
- const mod = await import("./parser-JPWANPLM.js");
20652
+ const mod = await import("./parser-MAOMYZY5.js");
20653
20653
  parsePdfDocument = mod.parsePdfDocument;
20654
20654
  } catch {
20655
20655
  return {
@@ -20729,7 +20729,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
20729
20729
  throw new Error(`hwpx-preserve \uD3EC\uB9F7\uC740 HWPX\xB7HWP 5.x \uC785\uB825\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4 (\uAC10\uC9C0\uB41C \uD3EC\uB9F7: ${zipFormat})`);
20730
20730
  }
20731
20731
  } else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
20732
- const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-D7OMPDUQ.js");
20732
+ const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-IFL6CZ6T.js");
20733
20733
  const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
20734
20734
  buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
20735
20735
  } else {
@@ -20878,4 +20878,4 @@ export {
20878
20878
  parseHwpml,
20879
20879
  fillForm
20880
20880
  };
20881
- //# sourceMappingURL=chunk-4HJKBRZJ.js.map
20881
+ //# sourceMappingURL=chunk-O42SEA4E.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureModelsIn,
3
3
  getModelsDir
4
- } from "./chunk-4MWUBTAE.js";
4
+ } from "./chunk-7ZWEK6GU.js";
5
5
  import {
6
6
  CELL_EDGES,
7
7
  HEADING_RATIO_H1,
@@ -9,11 +9,11 @@ import {
9
9
  HEADING_RATIO_H3,
10
10
  tidyScriptTags,
11
11
  toTex
12
- } from "./chunk-LFFARZYZ.js";
12
+ } from "./chunk-MCQSIN7Z.js";
13
13
  import {
14
14
  safeMax,
15
15
  safeMin
16
- } from "./chunk-DAAJO62F.js";
16
+ } from "./chunk-ZWNVRSGF.js";
17
17
 
18
18
  // src/ocr/models.ts
19
19
  import { join } from "path";
@@ -6495,7 +6495,7 @@ function xyCutOrder(items, gapThreshold, depth = 0, wrapped, columnGap = 0) {
6495
6495
  const hValid = hCut.gap >= minGap;
6496
6496
  const vValid = (vCut.gap >= vMinGap || vCut.gap >= PROSE_GUTTER_MIN_GAP && isProseGutter(items, vCut.position)) && !splitsSpacedLabel(items, vCut.position);
6497
6497
  let useHorizontal;
6498
- if (hValid && vValid) useHorizontal = vCut.gap <= hCut.gap * 1.5 || staggeredSides(items, vCut.position);
6498
+ if (hValid && vValid) useHorizontal = (vCut.gap <= hCut.gap * 1.5 || staggeredSides(items, vCut.position)) && !gapInsideLongerColumn(items, hCut.position, hCut.gap, vCut.position);
6499
6499
  else if (hValid) useHorizontal = true;
6500
6500
  else if (vValid) useHorizontal = false;
6501
6501
  else return splitEdgeSpannedColumns(items, gapThreshold, depth) ?? leaf(items, wrapped);
@@ -6530,6 +6530,22 @@ function splitsSpacedLabel(items, cutX) {
6530
6530
  }
6531
6531
  return spaced > 0;
6532
6532
  }
6533
+ function gapInsideLongerColumn(items, cutY, gap, cutX) {
6534
+ const lower = items.filter((i) => i.y <= cutY);
6535
+ const side = (i) => i.x + i.w / 2 < cutX;
6536
+ if (!lower.length || lower.some((i) => i.x < cutX && i.x + i.w > cutX)) return false;
6537
+ const longLeft = side(lower[0]);
6538
+ if (lower.some((i) => side(i) !== longLeft)) return false;
6539
+ const upper = items.filter((i) => i.y > cutY);
6540
+ const long = upper.filter((i) => side(i) === longLeft), short = upper.filter((i) => side(i) !== longLeft);
6541
+ if (!long.length || !short.length) return false;
6542
+ const lines = (xs) => new Set(xs.map((i) => Math.round(i.y / 2))).size;
6543
+ if (lines(short) < 3 || lines(long) < 3) return false;
6544
+ if (Math.max(...short.map((i) => i.w)) < Math.max(...long.map((i) => i.w)) * 0.5) return false;
6545
+ const fs = long.reduce((a, i) => a + i.fontSize, 0) / long.length;
6546
+ const bottom = (xs) => Math.min(...xs.map((i) => i.y));
6547
+ return bottom(short) - bottom(long) > Math.max(gap, 3 * fs);
6548
+ }
6533
6549
  function staggeredSides(items, cutX) {
6534
6550
  const left = items.filter((i) => i.x + i.w / 2 < cutX);
6535
6551
  const right = items.filter((i) => i.x + i.w / 2 >= cutX);
@@ -8485,10 +8501,10 @@ function orderByGutter(units, rectOf, gutterX) {
8485
8501
  const cross = [];
8486
8502
  for (const u of units) {
8487
8503
  const r = rectOf(u);
8488
- const top = r.y + r.h;
8489
- if (r.x < gutterX && r.x + r.w > gutterX) cross.push({ u, top });
8490
- else if (r.x + r.w <= gutterX) left.push({ u, top });
8491
- else right.push({ u, top });
8504
+ const top = r.y + r.h, mid = r.y + r.h / 2;
8505
+ if (r.x < gutterX && r.x + r.w > gutterX) cross.push({ u, top, mid });
8506
+ else if (r.x + r.w <= gutterX) left.push({ u, top, mid });
8507
+ else right.push({ u, top, mid });
8492
8508
  }
8493
8509
  const byTopDesc = (a, b) => b.top - a.top;
8494
8510
  cross.sort(byTopDesc);
@@ -8502,10 +8518,10 @@ function orderByGutter(units, rectOf, gutterX) {
8502
8518
  const ordered = [];
8503
8519
  for (let k = 0; k <= cross.length; k++) {
8504
8520
  for (const t of left) {
8505
- if (bandOf(t.top) === k) ordered.push(t.u);
8521
+ if (bandOf(t.mid) === k) ordered.push(t.u);
8506
8522
  }
8507
8523
  for (const t of right) {
8508
- if (bandOf(t.top) === k) ordered.push(t.u);
8524
+ if (bandOf(t.mid) === k) ordered.push(t.u);
8509
8525
  }
8510
8526
  if (k < cross.length) ordered.push(cross[k].u);
8511
8527
  }
@@ -11185,4 +11201,4 @@ export {
11185
11201
  UNRULED_REGION_TABLES,
11186
11202
  mergeOcrImageRegions
11187
11203
  };
11188
- //# sourceMappingURL=chunk-TAHS42ED.js.map
11204
+ //# sourceMappingURL=chunk-P6UVZNSO.js.map