kordoc 4.24.48 → 4.24.49

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 (208) hide show
  1. package/README.md +3 -3
  2. package/dist/{-3EMVBTE7.js → -22V6D2US.js} +42 -42
  3. package/dist/{chunk-TOOOWCKQ.cjs → chunk-2UWWWM4Q.cjs} +98 -98
  4. package/dist/{chunk-TOOOWCKQ.cjs.map → chunk-2UWWWM4Q.cjs.map} +1 -1
  5. package/dist/{chunk-MHAPDR6T.cjs → chunk-367WLMPO.cjs} +59 -67
  6. package/dist/chunk-367WLMPO.cjs.map +1 -0
  7. package/dist/{chunk-WVUR3HYW.js → chunk-4HJKBRZJ.js} +129 -40
  8. package/dist/chunk-4HJKBRZJ.js.map +1 -0
  9. package/dist/{chunk-7F5SKDUG.js → chunk-4MWUBTAE.js} +2 -2
  10. package/dist/{chunk-4N2ESXR2.js → chunk-67GSFYG7.js} +2 -2
  11. package/dist/{chunk-WICMTKWR.js → chunk-6BFWLS7E.js} +3 -3
  12. package/dist/{chunk-LBH4KAQM.cjs → chunk-6NZ32OTX.cjs} +8 -3
  13. package/dist/chunk-6NZ32OTX.cjs.map +1 -0
  14. package/dist/{chunk-JC2TMUU5.js → chunk-7KKL3PRK.js} +5 -13
  15. package/dist/chunk-7KKL3PRK.js.map +1 -0
  16. package/dist/{chunk-7EL6BCO5.js → chunk-AUAJVQQK.js} +2 -2
  17. package/dist/{chunk-QJBVP2BS.js → chunk-AXW2FMVR.js} +2 -2
  18. package/dist/{chunk-SUOJQHIN.js → chunk-CCQMSIZQ.js} +19 -19
  19. package/dist/{chunk-OUUI7I5V.js → chunk-DA5AXURC.js} +52 -4
  20. package/dist/chunk-DA5AXURC.js.map +1 -0
  21. package/dist/{chunk-3UY7ARXP.js → chunk-DAAJO62F.js} +2 -2
  22. package/dist/{chunk-QM65ELZE.js → chunk-EUJX7HTR.js} +32 -10
  23. package/dist/chunk-EUJX7HTR.js.map +1 -0
  24. package/dist/{chunk-E47LO7XG.js → chunk-EYSXMDA7.js} +17 -17
  25. package/dist/{chunk-TQ4QOCKT.js → chunk-FU6ZDWCI.js} +7 -2
  26. package/dist/chunk-FU6ZDWCI.js.map +1 -0
  27. package/dist/{chunk-MHLTZ3VI.js → chunk-HETGOJ6V.js} +2 -2
  28. package/dist/{chunk-OQPIN2OY.js → chunk-HW7WVYBF.js} +2 -2
  29. package/dist/{chunk-LHZL52HO.cjs → chunk-IRAZCKQ6.cjs} +3 -3
  30. package/dist/{chunk-LHZL52HO.cjs.map → chunk-IRAZCKQ6.cjs.map} +1 -1
  31. package/dist/{chunk-AC7FZDVP.js → chunk-KB4ORA7M.js} +2 -2
  32. package/dist/{chunk-SHYNOLL6.js → chunk-KXHUHGMC.js} +2 -2
  33. package/dist/{chunk-WO6PZMMB.js → chunk-L3JP55ZY.js} +2 -2
  34. package/dist/{chunk-OBNOOHAW.js → chunk-LCRSRVFJ.js} +2 -2
  35. package/dist/{chunk-OBNOOHAW.js.map → chunk-LCRSRVFJ.js.map} +1 -1
  36. package/dist/{chunk-OO4DHHTG.js → chunk-LFFARZYZ.js} +2 -2
  37. package/dist/{chunk-OO4DHHTG.js.map → chunk-LFFARZYZ.js.map} +1 -1
  38. package/dist/{chunk-NLPIXQOV.js → chunk-LOSCIAHY.js} +2 -2
  39. package/dist/{chunk-HW3DZ7TY.js → chunk-M5RQ2PNP.js} +6 -14
  40. package/dist/chunk-M5RQ2PNP.js.map +1 -0
  41. package/dist/{chunk-GFWCBYAI.js → chunk-MIJTZKWF.js} +2 -2
  42. package/dist/{chunk-PHU4VSNF.js → chunk-MLBX6KQM.js} +37 -3
  43. package/dist/chunk-MLBX6KQM.js.map +1 -0
  44. package/dist/{chunk-D4TKVZKB.js → chunk-OAETOHH3.js} +3 -3
  45. package/dist/{chunk-SI3GXM7Z.js → chunk-PMGJQWSW.js} +2 -2
  46. package/dist/{chunk-QOBWIFJA.cjs → chunk-PVV6OY4M.cjs} +135 -87
  47. package/dist/{chunk-QOBWIFJA.cjs.map → chunk-PVV6OY4M.cjs.map} +1 -1
  48. package/dist/{chunk-VXHZPUMS.cjs → chunk-PW7MQZI4.cjs} +2 -2
  49. package/dist/{chunk-VXHZPUMS.cjs.map → chunk-PW7MQZI4.cjs.map} +1 -1
  50. package/dist/{chunk-MYIRYP6D.js → chunk-Q7FDPJUS.js} +10 -10
  51. package/dist/{chunk-N6B5BINC.js → chunk-R2RLNUNK.js} +6 -6
  52. package/dist/{chunk-FQMPHPHE.js → chunk-RQLEGKEV.js} +2 -2
  53. package/dist/{chunk-KTGOULMH.js → chunk-S54DZB2Z.js} +51 -3
  54. package/dist/chunk-S54DZB2Z.js.map +1 -0
  55. package/dist/{chunk-D7SOY3VR.js → chunk-TAHS42ED.js} +33 -11
  56. package/dist/chunk-TAHS42ED.js.map +1 -0
  57. package/dist/{chunk-YFTD6WOP.cjs → chunk-TQOAPKLU.cjs} +6 -6
  58. package/dist/{chunk-YFTD6WOP.cjs.map → chunk-TQOAPKLU.cjs.map} +1 -1
  59. package/dist/{chunk-A6EOKPKG.cjs → chunk-UBY2PLKR.cjs} +54 -32
  60. package/dist/chunk-UBY2PLKR.cjs.map +1 -0
  61. package/dist/{chunk-UN2F6EKQ.js → chunk-UJELMNOU.js} +7 -2
  62. package/dist/chunk-UJELMNOU.js.map +1 -0
  63. package/dist/{chunk-REERG473.js → chunk-UU54HN5I.js} +6 -6
  64. package/dist/{chunk-E5RJLP2S.js → chunk-VMOUAWGD.js} +7 -7
  65. package/dist/{chunk-6YUMHSBG.js → chunk-WLFZOBZR.js} +3 -3
  66. package/dist/{chunk-SJXTCW7I.cjs → chunk-Y4MFHEK4.cjs} +40 -6
  67. package/dist/chunk-Y4MFHEK4.cjs.map +1 -0
  68. package/dist/{chunk-UJ3TZF4Y.js → chunk-Y6QW3FJQ.js} +2 -2
  69. package/dist/{chunk-GOYAJVR6.js → chunk-ZF24SO45.js} +37 -3
  70. package/dist/chunk-ZF24SO45.js.map +1 -0
  71. package/dist/chunks-Q7242OJE.js +11 -0
  72. package/dist/cli.js +73 -53
  73. package/dist/cli.js.map +1 -1
  74. package/dist/{formula-DUHNPES2.js → formula-BYEDWWZU.js} +4 -4
  75. package/dist/{formula-XNCKOV6K.js → formula-FQLMMBDP.js} +3 -3
  76. package/dist/{formula-7RJOEJHX.cjs → formula-QJEOIVKR.cjs} +9 -9
  77. package/dist/{formula-7RJOEJHX.cjs.map → formula-QJEOIVKR.cjs.map} +1 -1
  78. package/dist/generator-FTM6GOGB.cjs +11 -0
  79. package/dist/{generator-XXVCF6TG.cjs.map → generator-FTM6GOGB.cjs.map} +1 -1
  80. package/dist/generator-Q3L7RNUY.js +17 -0
  81. package/dist/generator-SU73HZHR.js +10 -0
  82. package/dist/{image-ocr-PYOXD5K4.js → image-ocr-7Y3FCGRR.js} +12 -10
  83. package/dist/image-ocr-7Y3FCGRR.js.map +1 -0
  84. package/dist/{image-ocr-NFCTNIL5.js → image-ocr-VIGZE4YL.js} +9 -7
  85. package/dist/image-ocr-VIGZE4YL.js.map +1 -0
  86. package/dist/{image-ocr-ZLAPJMES.cjs → image-ocr-WRILL3WO.cjs} +29 -27
  87. package/dist/image-ocr-WRILL3WO.cjs.map +1 -0
  88. package/dist/index.cjs +1250 -1161
  89. package/dist/index.cjs.map +1 -1
  90. package/dist/index.d.cts +13 -5
  91. package/dist/index.d.ts +13 -5
  92. package/dist/index.js +207 -118
  93. package/dist/index.js.map +1 -1
  94. package/dist/mcp.js +42 -43
  95. package/dist/mcp.js.map +1 -1
  96. package/dist/memo-T5ZQEXEA.js +17 -0
  97. package/dist/{model-bundle-TIHWFIN5.js → model-bundle-UJRQPYUU.js} +5 -5
  98. package/dist/{models-YBHBEM6J.js → models-64YLAWTI.js} +5 -5
  99. package/dist/{parse-worker-v2-Q7ST3SDO.js → parse-worker-v2-QWQZKFQO.js} +25 -24
  100. package/dist/parse-worker-v2-QWQZKFQO.js.map +1 -0
  101. package/dist/{parser-7JSQYNLS.js → parser-JPWANPLM.js} +77 -32
  102. package/dist/parser-JPWANPLM.js.map +1 -0
  103. package/dist/{parser-A76QS3VJ.cjs → parser-RB6CBNAM.cjs} +259 -214
  104. package/dist/parser-RB6CBNAM.cjs.map +1 -0
  105. package/dist/{parser-V25GYLBJ.js → parser-XFU3VRWM.js} +80 -35
  106. package/dist/parser-XFU3VRWM.js.map +1 -0
  107. package/dist/pdf-ocr-NOJHEH4M.cjs +42 -0
  108. package/dist/{pdf-ocr-5YCDSSLG.cjs.map → pdf-ocr-NOJHEH4M.cjs.map} +1 -1
  109. package/dist/{pdf-ocr-IJXT6ZJR.js → pdf-ocr-XTZZEYKJ.js} +6 -6
  110. package/dist/{pdf-ocr-GEAW23FB.js → pdf-ocr-ZV3KYIIE.js} +9 -9
  111. package/dist/{profile-io-Y7SMMS2R.js → profile-io-FAJORRD2.js} +3 -3
  112. package/dist/{rasterize-MLEHT6PU.js → rasterize-4ZJUA2DZ.js} +3 -3
  113. package/dist/{redact-doc-GPO2UTTJ.js → redact-doc-JPNROEH6.js} +30 -30
  114. package/dist/{render-TNWY53S4.js → render-D4WBOBKI.js} +13 -13
  115. package/dist/{rewrite-fallback-AHGTN757.js → rewrite-fallback-OF3QI6CX.js} +14 -14
  116. package/dist/seal-DQWEHIAM.js +16 -0
  117. package/dist/{setup-TJ57DQ6I.js → setup-YC25YCQB.js} +3 -3
  118. package/dist/to-hwpx-D7OMPDUQ.js +21 -0
  119. package/dist/to-hwpx-LUA6F5RR.cjs +16 -0
  120. package/dist/{to-hwpx-XLQUY2L2.cjs.map → to-hwpx-LUA6F5RR.cjs.map} +1 -1
  121. package/dist/{to-hwpx-DLVARUND.js → to-hwpx-ZWN64NCQ.js} +5 -5
  122. package/dist/visual-SW7NPY6K.js +37 -0
  123. package/dist/{watch-6CHDQ355.js → watch-ZU576VSR.js} +24 -24
  124. package/package.json +1 -1
  125. package/dist/chunk-A6EOKPKG.cjs.map +0 -1
  126. package/dist/chunk-D7SOY3VR.js.map +0 -1
  127. package/dist/chunk-GOYAJVR6.js.map +0 -1
  128. package/dist/chunk-HW3DZ7TY.js.map +0 -1
  129. package/dist/chunk-JC2TMUU5.js.map +0 -1
  130. package/dist/chunk-KTGOULMH.js.map +0 -1
  131. package/dist/chunk-LBH4KAQM.cjs.map +0 -1
  132. package/dist/chunk-MHAPDR6T.cjs.map +0 -1
  133. package/dist/chunk-OUUI7I5V.js.map +0 -1
  134. package/dist/chunk-PHU4VSNF.js.map +0 -1
  135. package/dist/chunk-QM65ELZE.js.map +0 -1
  136. package/dist/chunk-SJXTCW7I.cjs.map +0 -1
  137. package/dist/chunk-TQ4QOCKT.js.map +0 -1
  138. package/dist/chunk-UN2F6EKQ.js.map +0 -1
  139. package/dist/chunk-WVUR3HYW.js.map +0 -1
  140. package/dist/chunks-QTVEFJOS.js +0 -11
  141. package/dist/generator-6BFIABTF.js +0 -10
  142. package/dist/generator-XJLIBYDJ.js +0 -17
  143. package/dist/generator-XXVCF6TG.cjs +0 -11
  144. package/dist/hancom-7F53R77A.cjs +0 -85
  145. package/dist/hancom-7F53R77A.cjs.map +0 -1
  146. package/dist/hancom-D4E3WBPI.js +0 -84
  147. package/dist/hancom-D4E3WBPI.js.map +0 -1
  148. package/dist/hancom-IPF6HM5F.js +0 -85
  149. package/dist/hancom-IPF6HM5F.js.map +0 -1
  150. package/dist/image-ocr-NFCTNIL5.js.map +0 -1
  151. package/dist/image-ocr-PYOXD5K4.js.map +0 -1
  152. package/dist/image-ocr-ZLAPJMES.cjs.map +0 -1
  153. package/dist/memo-CNW6ZJFE.js +0 -17
  154. package/dist/parse-worker-v2-Q7ST3SDO.js.map +0 -1
  155. package/dist/parser-7JSQYNLS.js.map +0 -1
  156. package/dist/parser-A76QS3VJ.cjs.map +0 -1
  157. package/dist/parser-V25GYLBJ.js.map +0 -1
  158. package/dist/pdf-ocr-5YCDSSLG.cjs +0 -42
  159. package/dist/seal-7HBR3HBQ.js +0 -16
  160. package/dist/to-hwpx-6JF6Q2TZ.js +0 -21
  161. package/dist/to-hwpx-XLQUY2L2.cjs +0 -16
  162. package/dist/visual-VBDQUUKP.js +0 -37
  163. /package/dist/{-3EMVBTE7.js.map → -22V6D2US.js.map} +0 -0
  164. /package/dist/{chunk-7F5SKDUG.js.map → chunk-4MWUBTAE.js.map} +0 -0
  165. /package/dist/{chunk-4N2ESXR2.js.map → chunk-67GSFYG7.js.map} +0 -0
  166. /package/dist/{chunk-WICMTKWR.js.map → chunk-6BFWLS7E.js.map} +0 -0
  167. /package/dist/{chunk-7EL6BCO5.js.map → chunk-AUAJVQQK.js.map} +0 -0
  168. /package/dist/{chunk-QJBVP2BS.js.map → chunk-AXW2FMVR.js.map} +0 -0
  169. /package/dist/{chunk-SUOJQHIN.js.map → chunk-CCQMSIZQ.js.map} +0 -0
  170. /package/dist/{chunk-3UY7ARXP.js.map → chunk-DAAJO62F.js.map} +0 -0
  171. /package/dist/{chunk-E47LO7XG.js.map → chunk-EYSXMDA7.js.map} +0 -0
  172. /package/dist/{chunk-MHLTZ3VI.js.map → chunk-HETGOJ6V.js.map} +0 -0
  173. /package/dist/{chunk-OQPIN2OY.js.map → chunk-HW7WVYBF.js.map} +0 -0
  174. /package/dist/{chunk-AC7FZDVP.js.map → chunk-KB4ORA7M.js.map} +0 -0
  175. /package/dist/{chunk-SHYNOLL6.js.map → chunk-KXHUHGMC.js.map} +0 -0
  176. /package/dist/{chunk-WO6PZMMB.js.map → chunk-L3JP55ZY.js.map} +0 -0
  177. /package/dist/{chunk-NLPIXQOV.js.map → chunk-LOSCIAHY.js.map} +0 -0
  178. /package/dist/{chunk-GFWCBYAI.js.map → chunk-MIJTZKWF.js.map} +0 -0
  179. /package/dist/{chunk-D4TKVZKB.js.map → chunk-OAETOHH3.js.map} +0 -0
  180. /package/dist/{chunk-SI3GXM7Z.js.map → chunk-PMGJQWSW.js.map} +0 -0
  181. /package/dist/{chunk-MYIRYP6D.js.map → chunk-Q7FDPJUS.js.map} +0 -0
  182. /package/dist/{chunk-N6B5BINC.js.map → chunk-R2RLNUNK.js.map} +0 -0
  183. /package/dist/{chunk-FQMPHPHE.js.map → chunk-RQLEGKEV.js.map} +0 -0
  184. /package/dist/{chunk-REERG473.js.map → chunk-UU54HN5I.js.map} +0 -0
  185. /package/dist/{chunk-E5RJLP2S.js.map → chunk-VMOUAWGD.js.map} +0 -0
  186. /package/dist/{chunk-6YUMHSBG.js.map → chunk-WLFZOBZR.js.map} +0 -0
  187. /package/dist/{chunk-UJ3TZF4Y.js.map → chunk-Y6QW3FJQ.js.map} +0 -0
  188. /package/dist/{chunks-QTVEFJOS.js.map → chunks-Q7242OJE.js.map} +0 -0
  189. /package/dist/{formula-DUHNPES2.js.map → formula-BYEDWWZU.js.map} +0 -0
  190. /package/dist/{formula-XNCKOV6K.js.map → formula-FQLMMBDP.js.map} +0 -0
  191. /package/dist/{generator-6BFIABTF.js.map → generator-Q3L7RNUY.js.map} +0 -0
  192. /package/dist/{generator-XJLIBYDJ.js.map → generator-SU73HZHR.js.map} +0 -0
  193. /package/dist/{memo-CNW6ZJFE.js.map → memo-T5ZQEXEA.js.map} +0 -0
  194. /package/dist/{model-bundle-TIHWFIN5.js.map → model-bundle-UJRQPYUU.js.map} +0 -0
  195. /package/dist/{models-YBHBEM6J.js.map → models-64YLAWTI.js.map} +0 -0
  196. /package/dist/{pdf-ocr-GEAW23FB.js.map → pdf-ocr-XTZZEYKJ.js.map} +0 -0
  197. /package/dist/{pdf-ocr-IJXT6ZJR.js.map → pdf-ocr-ZV3KYIIE.js.map} +0 -0
  198. /package/dist/{profile-io-Y7SMMS2R.js.map → profile-io-FAJORRD2.js.map} +0 -0
  199. /package/dist/{rasterize-MLEHT6PU.js.map → rasterize-4ZJUA2DZ.js.map} +0 -0
  200. /package/dist/{redact-doc-GPO2UTTJ.js.map → redact-doc-JPNROEH6.js.map} +0 -0
  201. /package/dist/{render-TNWY53S4.js.map → render-D4WBOBKI.js.map} +0 -0
  202. /package/dist/{rewrite-fallback-AHGTN757.js.map → rewrite-fallback-OF3QI6CX.js.map} +0 -0
  203. /package/dist/{seal-7HBR3HBQ.js.map → seal-DQWEHIAM.js.map} +0 -0
  204. /package/dist/{setup-TJ57DQ6I.js.map → setup-YC25YCQB.js.map} +0 -0
  205. /package/dist/{to-hwpx-6JF6Q2TZ.js.map → to-hwpx-D7OMPDUQ.js.map} +0 -0
  206. /package/dist/{to-hwpx-DLVARUND.js.map → to-hwpx-ZWN64NCQ.js.map} +0 -0
  207. /package/dist/{visual-VBDQUUKP.js.map → visual-SW7NPY6K.js.map} +0 -0
  208. /package/dist/{watch-6CHDQ355.js.map → watch-ZU576VSR.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class;
2
2
 
3
3
 
4
- var _chunkLHZL52HOcjs = require('./chunk-LHZL52HO.cjs');
4
+ var _chunkIRAZCKQ6cjs = require('./chunk-IRAZCKQ6.cjs');
5
5
 
6
6
 
7
7
 
@@ -9,11 +9,11 @@ var _chunkLHZL52HOcjs = require('./chunk-LHZL52HO.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkYFTD6WOPcjs = require('./chunk-YFTD6WOP.cjs');
12
+ var _chunkTQOAPKLUcjs = require('./chunk-TQOAPKLU.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunkVXHZPUMScjs = require('./chunk-VXHZPUMS.cjs');
16
+ var _chunkPW7MQZI4cjs = require('./chunk-PW7MQZI4.cjs');
17
17
 
18
18
  // src/ocr/models.ts
19
19
  var _path = require('path');
@@ -65,7 +65,7 @@ var OCR_REC_DICT = {
65
65
  sizeMb: 1
66
66
  };
67
67
  function getOcrModelsDir() {
68
- return _chunkLHZL52HOcjs.getModelsDir.call(void 0, "ppocr");
68
+ return _chunkIRAZCKQ6cjs.getModelsDir.call(void 0, "ppocr");
69
69
  }
70
70
  var DEFAULT_OCR_MODELS = Object.freeze({
71
71
  det: { spec: OCR_DET_MODEL },
@@ -110,7 +110,7 @@ async function ensureOcrModelsFor(sel, onProgress) {
110
110
  if (!stamp || verifiedInProcess.get(path) !== stamp) todo.push(s.spec);
111
111
  }
112
112
  if (!todo.length) return;
113
- await _chunkLHZL52HOcjs.ensureModelsIn.call(void 0, dir, todo, onProgress);
113
+ await _chunkIRAZCKQ6cjs.ensureModelsIn.call(void 0, dir, todo, onProgress);
114
114
  for (const spec of todo) {
115
115
  const path = _path.join.call(void 0, dir, spec.filename), stamp = await fileStamp(path);
116
116
  if (stamp) verifiedInProcess.set(path, stamp);
@@ -3280,16 +3280,16 @@ function recordOpenEndCellEdges(grid, cells, horizontals) {
3280
3280
  }
3281
3281
  function takeClipCellEdges(from, to) {
3282
3282
  const e = CLIP_CELL_EDGES.get(from);
3283
- if (e) _chunkYFTD6WOPcjs.CELL_EDGES.set(to, e);
3283
+ if (e) _chunkTQOAPKLUcjs.CELL_EDGES.set(to, e);
3284
3284
  }
3285
3285
  function hasOpenCellSeam(a, b) {
3286
- const u = _chunkYFTD6WOPcjs.CELL_EDGES.get(a), d = _chunkYFTD6WOPcjs.CELL_EDGES.get(b);
3286
+ const u = _chunkTQOAPKLUcjs.CELL_EDGES.get(a), d = _chunkTQOAPKLUcjs.CELL_EDGES.get(b);
3287
3287
  return !!u && !!d && u.t && !u.b && !d.t && d.b && u.l && u.r && d.l && d.r;
3288
3288
  }
3289
3289
  function joinCellEdges(a, b) {
3290
- const u = _chunkYFTD6WOPcjs.CELL_EDGES.get(a), d = _chunkYFTD6WOPcjs.CELL_EDGES.get(b);
3290
+ const u = _chunkTQOAPKLUcjs.CELL_EDGES.get(a), d = _chunkTQOAPKLUcjs.CELL_EDGES.get(b);
3291
3291
  if (!u || !d) return;
3292
- _chunkYFTD6WOPcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
3292
+ _chunkTQOAPKLUcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
3293
3293
  }
3294
3294
 
3295
3295
  // src/pdf/cell-extract.ts
@@ -3465,7 +3465,7 @@ function tagScripts(text, lines) {
3465
3465
  const [s, e, kind] = marks[m];
3466
3466
  out = out.slice(0, s) + `<${kind}>` + out.slice(s, e) + `</${kind}>` + out.slice(e);
3467
3467
  }
3468
- return _chunkYFTD6WOPcjs.tidyScriptTags.call(void 0, out);
3468
+ return _chunkTQOAPKLUcjs.tidyScriptTags.call(void 0, out);
3469
3469
  }
3470
3470
 
3471
3471
  // src/pdf/line-wrap.ts
@@ -6864,9 +6864,9 @@ function detectHeadings(blocks, medianFontSize) {
6864
6864
  if (/^\d+$/.test(text) && !isChapterNumber(block, blocks[bi + 1], medianFontSize)) continue;
6865
6865
  const ratio = block.style.fontSize / medianFontSize;
6866
6866
  let level = 0;
6867
- if (ratio >= _chunkYFTD6WOPcjs.HEADING_RATIO_H1) level = 1;
6868
- else if (ratio >= _chunkYFTD6WOPcjs.HEADING_RATIO_H2) level = 2;
6869
- else if (ratio >= _chunkYFTD6WOPcjs.HEADING_RATIO_H3) level = 3;
6867
+ if (ratio >= _chunkTQOAPKLUcjs.HEADING_RATIO_H1) level = 1;
6868
+ else if (ratio >= _chunkTQOAPKLUcjs.HEADING_RATIO_H2) level = 2;
6869
+ else if (ratio >= _chunkTQOAPKLUcjs.HEADING_RATIO_H3) level = 3;
6870
6870
  if (level > 0) {
6871
6871
  block.type = "heading";
6872
6872
  block.level = level;
@@ -6879,7 +6879,7 @@ function isChapterNumber(block, next, medianFontSize) {
6879
6879
  const nextSize = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _193 => _193.style, 'optionalAccess', _194 => _194.fontSize]), () => ( 0));
6880
6880
  const text = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _195 => _195.text, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]), () => ( ""));
6881
6881
  const a = block.bbox, b = _optionalChain([next, 'optionalAccess', _198 => _198.bbox]);
6882
- return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _199 => _199.text, 'optionalAccess', _200 => _200.trim, 'call', _201 => _201()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize * _chunkYFTD6WOPcjs.HEADING_RATIO_H1 && text.length > 0 && text.length <= 80 && !/^[\d\s.]+$/.test(text) && !!a && !!b && a.y > b.y && a.y - (b.y + b.height) <= size * 2;
6882
+ return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _199 => _199.text, 'optionalAccess', _200 => _200.trim, 'call', _201 => _201()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize * _chunkTQOAPKLUcjs.HEADING_RATIO_H1 && text.length > 0 && text.length <= 80 && !/^[\d\s.]+$/.test(text) && !!a && !!b && a.y > b.y && a.y - (b.y + b.height) <= size * 2;
6883
6883
  }
6884
6884
  function mergeStackedHeadingLines(blocks, medianFontSize) {
6885
6885
  for (let i = 0; i < blocks.length - 1; ) {
@@ -8286,6 +8286,27 @@ function isSparseProseGrid(table) {
8286
8286
  return prose >= chars * 0.6;
8287
8287
  }
8288
8288
 
8289
+ // src/pdf/ocr-straddle-verticals.ts
8290
+ var TOL = 2;
8291
+ function extendStraddledVerticals(horizontals, verticals, items) {
8292
+ const lo = (l, k) => Math.min(l[`${k}1`], l[`${k}2`]), hi = (l, k) => Math.max(l[`${k}1`], l[`${k}2`]);
8293
+ const out = verticals.slice();
8294
+ for (let i = 0; i < verticals.length; i++) {
8295
+ const v = verticals[i], top = hi(v, "y");
8296
+ const h = horizontals.find((o) => Math.abs(o.y1 - top) <= TOL && Math.abs(lo(o, "x") - v.x1) <= TOL && hi(o, "x") > v.x1 + 10);
8297
+ if (!h) continue;
8298
+ if (horizontals.filter((o) => o.y1 < top - TOL && o.y1 > lo(v, "y") - TOL && lo(o, "x") < v.x1 - TOL && hi(o, "x") > v.x1 + TOL).length < 2) continue;
8299
+ const left = verticals.filter((o) => o.x1 < v.x1 - TOL && lo(o, "y") <= top - TOL && hi(o, "y") >= top + TOL).sort((a, b) => b.x1 - a.x1)[0];
8300
+ if (!left || horizontals.some((o) => Math.abs(o.y1 - top) <= TOL && lo(o, "x") <= left.x1 + TOL && hi(o, "x") >= v.x1 - TOL)) continue;
8301
+ const above = horizontals.filter((o) => o.y1 > top + TOL && lo(o, "x") <= left.x1 + TOL && hi(o, "x") >= hi(h, "x") - TOL).sort((a, b) => a.y1 - b.y1)[0];
8302
+ if (!above) continue;
8303
+ const straddle = items.some((it) => it.x >= left.x1 - TOL && it.x + it.w <= v.x1 + TOL && it.y < top - it.h * 0.15 && it.y + it.h > top + it.h * 0.15);
8304
+ const crossed = items.some((it) => it.x < v.x1 - TOL && it.x + it.w > v.x1 + TOL && it.y + it.h > top + TOL && it.y < above.y1 - TOL);
8305
+ if (straddle && !crossed) out[i] = { ...v, y1: lo(v, "y"), y2: above.y1 };
8306
+ }
8307
+ return out;
8308
+ }
8309
+
8289
8310
  // src/pdf/ruled-columns.ts
8290
8311
  function findRuledColumnDivider(regions, horizontals, verticals, pageWidth, pageHeight) {
8291
8312
  const candidates = [];
@@ -8622,16 +8643,16 @@ function isProseSpread(items) {
8622
8643
  for (let i = 1; i < sorted.length; i++) {
8623
8644
  gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
8624
8645
  }
8625
- const maxGap = _chunkVXHZPUMScjs.safeMax.call(void 0, gaps);
8646
+ const maxGap = _chunkPW7MQZI4cjs.safeMax.call(void 0, gaps);
8626
8647
  const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
8627
8648
  if (items.length >= 4 && maxGap < 40 && avgLen < 5) return true;
8628
- const minGap = _chunkVXHZPUMScjs.safeMin.call(void 0, gaps);
8649
+ const minGap = _chunkPW7MQZI4cjs.safeMin.call(void 0, gaps);
8629
8650
  return minGap > 0 && maxGap - minGap <= Math.max(2, maxGap * 0.15) && (items.filter((i) => /^\P{L}*\p{Ll}/u.test(i.text)).length * 2 >= items.length || items.some((i) => /\p{L}[,.;:]["”’)]?$/u.test(i.text)));
8630
8651
  }
8631
8652
  function detectColumns(yLines) {
8632
8653
  const allItems = yLines.flat();
8633
8654
  if (allItems.length === 0) return null;
8634
- const pageWidth = _chunkVXHZPUMScjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkVXHZPUMScjs.safeMin.call(void 0, allItems.map((i) => i.x));
8655
+ const pageWidth = _chunkPW7MQZI4cjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allItems.map((i) => i.x));
8635
8656
  if (pageWidth < 100) return null;
8636
8657
  let bigoLineIdx = -1;
8637
8658
  for (let i = 0; i < yLines.length; i++) {
@@ -9029,13 +9050,13 @@ function partTex(group) {
9029
9050
  const base = Math.min(...g.filter((i) => i.fontSize >= size * SCRIPT_SIZE_RATIO).map((i) => i.y));
9030
9051
  let s = "", run = "";
9031
9052
  const flush = () => {
9032
- if (run) s += _chunkYFTD6WOPcjs.toTex.call(void 0, run);
9053
+ if (run) s += _chunkTQOAPKLUcjs.toTex.call(void 0, run);
9033
9054
  run = "";
9034
9055
  };
9035
9056
  g.forEach((it, k) => {
9036
9057
  if (it.fontSize < size * SCRIPT_SIZE_RATIO && it.y - base >= size * SCRIPT_RISE_EM) {
9037
9058
  flush();
9038
- s += `^{${_chunkYFTD6WOPcjs.toTex.call(void 0, it.text)}}`;
9059
+ s += `^{${_chunkTQOAPKLUcjs.toTex.call(void 0, it.text)}}`;
9039
9060
  return;
9040
9061
  }
9041
9062
  if (k && it.x - (g[k - 1].x + g[k - 1].w) > spaceGapThreshold(it.fontSize)) run += " ";
@@ -9122,13 +9143,13 @@ function headerLineAbove(free, colXs, top) {
9122
9143
  }
9123
9144
 
9124
9145
  // src/pdf/crossing-frames.ts
9125
- var TOL = 2;
9126
- var near = (a, b) => Math.abs(a - b) <= TOL;
9146
+ var TOL2 = 2;
9147
+ var near = (a, b) => Math.abs(a - b) <= TOL2;
9127
9148
  var span = (a, b) => a <= b ? [a, b] : [b, a];
9128
9149
  function closedRects(hs, vs) {
9129
9150
  const covers = (v, x, y1, y2) => {
9130
9151
  const [lo, hi] = span(v.y1, v.y2);
9131
- return near(v.x1, x) && lo <= y1 + TOL && hi >= y2 - TOL;
9152
+ return near(v.x1, x) && lo <= y1 + TOL2 && hi >= y2 - TOL2;
9132
9153
  };
9133
9154
  const out = [];
9134
9155
  for (let i = 0; i < hs.length; i++) {
@@ -9144,7 +9165,7 @@ function closedRects(hs, vs) {
9144
9165
  return out;
9145
9166
  }
9146
9167
  function freeCorner(x, y, dx, dy, hs, vs) {
9147
- const beyondX = x + dx * 3 * TOL, beyondY = y + dy * 3 * TOL;
9168
+ const beyondX = x + dx * 3 * TOL2, beyondY = y + dy * 3 * TOL2;
9148
9169
  const h = hs.some((l) => {
9149
9170
  const [lo, hi] = span(l.x1, l.x2);
9150
9171
  return near(l.y1, y) && lo <= beyondX && hi >= beyondX;
@@ -9155,8 +9176,8 @@ function freeCorner(x, y, dx, dy, hs, vs) {
9155
9176
  });
9156
9177
  return !h && !v;
9157
9178
  }
9158
- var strictlyInside = (x, y, r) => x > r.x1 + TOL && x < r.x2 - TOL && y > r.y1 + TOL && y < r.y2 - TOL;
9159
- var contains3 = (a, b) => a.x1 <= b.x1 + TOL && a.x2 >= b.x2 - TOL && a.y1 <= b.y1 + TOL && a.y2 >= b.y2 - TOL;
9179
+ var strictlyInside = (x, y, r) => x > r.x1 + TOL2 && x < r.x2 - TOL2 && y > r.y1 + TOL2 && y < r.y2 - TOL2;
9180
+ var contains3 = (a, b) => a.x1 <= b.x1 + TOL2 && a.x2 >= b.x2 - TOL2 && a.y1 <= b.y1 + TOL2 && a.y2 >= b.y2 - TOL2;
9160
9181
  function cornerIn(a, b, hs, vs) {
9161
9182
  for (const [x, dx] of [[a.x1, -1], [a.x2, 1]]) for (const [y, dy] of [[a.y1, -1], [a.y2, 1]]) {
9162
9183
  if (strictlyInside(x, y, b) && freeCorner(x, y, dx, dy, hs, vs)) return true;
@@ -9165,7 +9186,7 @@ function cornerIn(a, b, hs, vs) {
9165
9186
  }
9166
9187
  function hasCrossingFrames(grid, horizontals, verticals) {
9167
9188
  const b = grid.bbox;
9168
- const inside = (l) => Math.min(l.x1, l.x2) >= b.x1 - TOL && Math.max(l.x1, l.x2) <= b.x2 + TOL && Math.min(l.y1, l.y2) >= b.y1 - TOL && Math.max(l.y1, l.y2) <= b.y2 + TOL;
9189
+ const inside = (l) => Math.min(l.x1, l.x2) >= b.x1 - TOL2 && Math.max(l.x1, l.x2) <= b.x2 + TOL2 && Math.min(l.y1, l.y2) >= b.y1 - TOL2 && Math.max(l.y1, l.y2) <= b.y2 + TOL2;
9169
9190
  const hs = horizontals.filter(inside), vs = verticals.filter(inside);
9170
9191
  const rects = closedRects(hs, vs);
9171
9192
  for (let i = 0; i < rects.length; i++) for (let j = i + 1; j < rects.length; j++) {
@@ -9208,7 +9229,7 @@ function rebuildUnitLine(items, grid) {
9208
9229
  function prependUnitRow(cells, cols, line, usedItems) {
9209
9230
  const text = cleanCellText(line.map((item) => item.text).join(""));
9210
9231
  cells.unshift(Array.from({ length: cols }, (_, c) => ({ text: c === 0 ? text : "", colSpan: c === 0 ? cols : 1, rowSpan: 1 })));
9211
- for (const cell of cells[0]) _chunkYFTD6WOPcjs.CELL_EDGES.set(cell, NO_EDGES);
9232
+ for (const cell of cells[0]) _chunkTQOAPKLUcjs.CELL_EDGES.set(cell, NO_EDGES);
9212
9233
  for (const item of line) usedItems.add(item);
9213
9234
  }
9214
9235
  function attachUnitRow(items, grid, cells, cols, usedItems) {
@@ -9790,7 +9811,7 @@ function recordFrameTitle(table, source, pageNum) {
9790
9811
  const [label, spacer, title] = cells;
9791
9812
  if (!/^(?:붙임|별첨|첨부|부록)\s*\d{1,3}$/.test(label.text.trim()) || spacer.text.trim() || !title.text.trim()) return;
9792
9813
  if (cells.some((c) => {
9793
- const e = _chunkYFTD6WOPcjs.CELL_EDGES.get(c);
9814
+ const e = _chunkTQOAPKLUcjs.CELL_EDGES.get(c);
9794
9815
  return !e || e.t || e.b || e.l || e.r;
9795
9816
  })) return;
9796
9817
  const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess', _393 => _393.fontSize]), () => ( 0));
@@ -9976,6 +9997,7 @@ function extractPageBlocksWithLines(items, pageNum, opList, pageWidth, pageHeigh
9976
9997
  const shadedEdges = detectTables ? closeShadedTableEdges(clipGrids, horizontals, verticals, extracted.fillRects) : void 0;
9977
9998
  if (shadedEdges) ({ horizontals, verticals } = shadedEdges);
9978
9999
  const ocrItems = items.length > 0 && items.every((it) => it.fontName === "ocr");
10000
+ if (ocrItems && detectTables) verticals = extendStraddledVerticals(horizontals, verticals, items);
9979
10001
  let lineGrids = detectTables ? buildTableGrids(horizontals, verticals, !ocrItems) : [];
9980
10002
  if (ocrItems && lineGrids.length) {
9981
10003
  lineGrids = lineGrids.map((g) => openSideColumns(g, horizontals, verticals, items, lineGrids));
@@ -10547,7 +10569,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
10547
10569
  groupSizes.push(1);
10548
10570
  }
10549
10571
  const allY = remaining.map((i) => i.y);
10550
- const pageH = _chunkVXHZPUMScjs.safeMax.call(void 0, allY) - _chunkVXHZPUMScjs.safeMin.call(void 0, allY);
10572
+ const pageH = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10551
10573
  const gapThreshold = Math.max(15, pageH * 0.03);
10552
10574
  const sides = frameColumnTextBands(remaining, spanning, gx);
10553
10575
  const textBlocks = [];
@@ -10563,7 +10585,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
10563
10585
  finalTextBlocks.push(...detectListBlocks(textBlocks));
10564
10586
  } else {
10565
10587
  const allY = remaining.map((i) => i.y);
10566
- const pageH = _chunkVXHZPUMScjs.safeMax.call(void 0, allY) - _chunkVXHZPUMScjs.safeMin.call(void 0, allY);
10588
+ const pageH = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10567
10589
  const gapThreshold = Math.max(15, pageH * 0.03);
10568
10590
  const groups = xyCutOrder(remaining, gapThreshold);
10569
10591
  const textBlocks = [];
@@ -10918,7 +10940,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
10918
10940
  blocks.push(...columnTextToBlocks(tableText, pageNum, bbox, dominantStyle(items)));
10919
10941
  } else {
10920
10942
  const allY = items.map((i) => i.y);
10921
- const pageHeight = _chunkVXHZPUMScjs.safeMax.call(void 0, allY) - _chunkVXHZPUMScjs.safeMin.call(void 0, allY);
10943
+ const pageHeight = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10922
10944
  const gapThreshold = Math.max(15, pageHeight * 0.03);
10923
10945
  const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold, 0, void 0, minGap);
10924
10946
  for (const group of orderedGroups) {
@@ -11163,4 +11185,4 @@ function rowParagraphs(block) {
11163
11185
 
11164
11186
 
11165
11187
  exports.DEFAULT_OCR_MODELS = DEFAULT_OCR_MODELS; exports.resolveOcrModels = resolveOcrModels; exports.handwritingFallbackModels = handwritingFallbackModels; exports.ocrSelectionKey = ocrSelectionKey; exports.ocrSourcePath = ocrSourcePath; exports.ensureOcrModelsFor = ensureOcrModelsFor; exports.ocrModelsCached = ocrModelsCached; exports.parseCharacterDict = parseCharacterDict; exports.grayCrop = grayCrop; exports.inkStats = inkStats; exports.splitRowBands = splitRowBands; exports.leadingTriangle = leadingTriangle; exports.arrowGlyph = arrowGlyph; exports.leaderRuns = leaderRuns; exports.inkBounds = inkBounds; exports.bracketFeatures = bracketFeatures; exports.slantedPair = slantedPair; exports.romanStems = romanStems; exports.circledAt = circledAt; exports.ringBoxes = ringBoxes; exports.quoteHead = quoteHead; exports.edgeTrim = edgeTrim; exports.tallInkCount = tallInkCount; exports.gapGlyphs = gapGlyphs; exports.ringBullet = ringBullet; exports.dashRatio = dashRatio; exports.leadingRing = leadingRing; exports.discAt = discAt; exports.serifOne = serifOne; exports.starRun = starRun; exports.bracketShape = bracketShape; exports.leadingBullet = leadingBullet; exports.stackedGlyphBands = stackedGlyphBands; exports.rememberOcrTextGaps = rememberOcrTextGaps; exports.copyOcrTextGaps = copyOcrTextGaps; exports.findOcrTextGaps = findOcrTextGaps; exports.extractLines = extractLines; exports.extractImageRegions = extractImageRegions; exports.NO_EDGES = NO_EDGES; exports.hasOpenCellSeam = hasOpenCellSeam; exports.joinCellEdges = joinCellEdges; exports.filterHiddenText = filterHiddenText; exports.collapseEvenSpacing = collapseEvenSpacing; exports.computeBBox = computeBBox; exports.dominantStyle = dominantStyle; exports.normalizeItems = normalizeItems; exports.groupByY = groupByY; exports.mergeLineSimple = mergeLineSimple; exports.WrapLexicon = WrapLexicon; exports.startsNewItem = startsNewItem; exports.wrapJoiner = wrapJoiner; exports.joinPageBreakWraps = joinPageBreakWraps; exports.splitPageBreakWraps = splitPageBreakWraps; exports.latinSoftWrap = latinSoftWrap; exports.TOC_BLOCKS = TOC_BLOCKS; exports.computeMedianFontSizeFromFreq = computeMedianFontSizeFromFreq; exports.detectHeadings = detectHeadings; exports.mergeStackedHeadingLines = mergeStackedHeadingLines; exports.detectTypographyHeadings = detectTypographyHeadings; exports.detectDocumentStyleHeadings = detectDocumentStyleHeadings; exports.detectSiblingStyleHeadings = detectSiblingStyleHeadings; exports.detectRepeatedPageLabels = detectRepeatedPageLabels; exports.detectPageLeadHeadings = detectPageLeadHeadings; exports.refineDocumentStyleHeadings = refineDocumentStyleHeadings; exports.detectMarkerHeadings = detectMarkerHeadings; exports.detectTableCaptions = detectTableCaptions; exports.detectKoreanListBlocks = detectKoreanListBlocks; exports.removeHeaderFooterBlocks = removeHeaderFooterBlocks; exports.runningLinePatterns = runningLinePatterns; exports.stripAbsorbedRunningLines = stripAbsorbedRunningLines; exports.CLIP_TABLES = CLIP_TABLES; exports.FRAME_TITLE_BLOCKS = FRAME_TITLE_BLOCKS; exports.TABLE_COLXS = TABLE_COLXS; exports.TABLE_ROWYS = TABLE_ROWYS; exports.TABLE_TAIL = TABLE_TAIL; exports.PART_COLXS = PART_COLXS; exports.EMPTY_PARTS = EMPTY_PARTS; exports.IMAGE_CELLS = IMAGE_CELLS; exports.FILLER_CELLS = FILLER_CELLS; exports.CONT_PARTS = CONT_PARTS; exports.CELL_LINES = CELL_LINES; exports.ROW_RULES = ROW_RULES; exports.trimTrailingEmptyTableCols = trimTrailingEmptyTableCols; exports.restoreImageBullets = restoreImageBullets; exports.detectRightArrowRegions = detectRightArrowRegions; exports.removeSideTabs = removeSideTabs; exports.extractPageBlocksWithLines = extractPageBlocksWithLines; exports.UNRULED_REGION_TABLES = UNRULED_REGION_TABLES; exports.mergeOcrImageRegions = mergeOcrImageRegions;
11166
- //# sourceMappingURL=chunk-A6EOKPKG.cjs.map
11188
+ //# sourceMappingURL=chunk-UBY2PLKR.cjs.map