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,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 _chunkIRAZCKQ6cjs = require('./chunk-IRAZCKQ6.cjs');
4
+ var _chunkQECUDHOQcjs = require('./chunk-QECUDHOQ.cjs');
5
5
 
6
6
 
7
7
 
@@ -9,11 +9,11 @@ var _chunkIRAZCKQ6cjs = require('./chunk-IRAZCKQ6.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunkTQOAPKLUcjs = require('./chunk-TQOAPKLU.cjs');
12
+ var _chunkUSVDMFOCcjs = require('./chunk-USVDMFOC.cjs');
13
13
 
14
14
 
15
15
 
16
- var _chunkPW7MQZI4cjs = require('./chunk-PW7MQZI4.cjs');
16
+ var _chunk4ATTNHKScjs = require('./chunk-4ATTNHKS.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 _chunkIRAZCKQ6cjs.getModelsDir.call(void 0, "ppocr");
68
+ return _chunkQECUDHOQcjs.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 _chunkIRAZCKQ6cjs.ensureModelsIn.call(void 0, dir, todo, onProgress);
113
+ await _chunkQECUDHOQcjs.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) _chunkTQOAPKLUcjs.CELL_EDGES.set(to, e);
3283
+ if (e) _chunkUSVDMFOCcjs.CELL_EDGES.set(to, e);
3284
3284
  }
3285
3285
  function hasOpenCellSeam(a, b) {
3286
- const u = _chunkTQOAPKLUcjs.CELL_EDGES.get(a), d = _chunkTQOAPKLUcjs.CELL_EDGES.get(b);
3286
+ const u = _chunkUSVDMFOCcjs.CELL_EDGES.get(a), d = _chunkUSVDMFOCcjs.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 = _chunkTQOAPKLUcjs.CELL_EDGES.get(a), d = _chunkTQOAPKLUcjs.CELL_EDGES.get(b);
3290
+ const u = _chunkUSVDMFOCcjs.CELL_EDGES.get(a), d = _chunkUSVDMFOCcjs.CELL_EDGES.get(b);
3291
3291
  if (!u || !d) return;
3292
- _chunkTQOAPKLUcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
3292
+ _chunkUSVDMFOCcjs.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 _chunkTQOAPKLUcjs.tidyScriptTags.call(void 0, out);
3468
+ return _chunkUSVDMFOCcjs.tidyScriptTags.call(void 0, out);
3469
3469
  }
3470
3470
 
3471
3471
  // src/pdf/line-wrap.ts
@@ -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 _nullishCoalesce(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);
@@ -6864,9 +6880,9 @@ function detectHeadings(blocks, medianFontSize) {
6864
6880
  if (/^\d+$/.test(text) && !isChapterNumber(block, blocks[bi + 1], medianFontSize)) continue;
6865
6881
  const ratio = block.style.fontSize / medianFontSize;
6866
6882
  let level = 0;
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;
6883
+ if (ratio >= _chunkUSVDMFOCcjs.HEADING_RATIO_H1) level = 1;
6884
+ else if (ratio >= _chunkUSVDMFOCcjs.HEADING_RATIO_H2) level = 2;
6885
+ else if (ratio >= _chunkUSVDMFOCcjs.HEADING_RATIO_H3) level = 3;
6870
6886
  if (level > 0) {
6871
6887
  block.type = "heading";
6872
6888
  block.level = level;
@@ -6879,7 +6895,7 @@ function isChapterNumber(block, next, medianFontSize) {
6879
6895
  const nextSize = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _193 => _193.style, 'optionalAccess', _194 => _194.fontSize]), () => ( 0));
6880
6896
  const text = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _195 => _195.text, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]), () => ( ""));
6881
6897
  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 * _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;
6898
+ 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 * _chunkUSVDMFOCcjs.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
6899
  }
6884
6900
  function mergeStackedHeadingLines(blocks, medianFontSize) {
6885
6901
  for (let i = 0; i < blocks.length - 1; ) {
@@ -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
  }
@@ -8643,16 +8659,16 @@ function isProseSpread(items) {
8643
8659
  for (let i = 1; i < sorted.length; i++) {
8644
8660
  gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
8645
8661
  }
8646
- const maxGap = _chunkPW7MQZI4cjs.safeMax.call(void 0, gaps);
8662
+ const maxGap = _chunk4ATTNHKScjs.safeMax.call(void 0, gaps);
8647
8663
  const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
8648
8664
  if (items.length >= 4 && maxGap < 40 && avgLen < 5) return true;
8649
- const minGap = _chunkPW7MQZI4cjs.safeMin.call(void 0, gaps);
8665
+ const minGap = _chunk4ATTNHKScjs.safeMin.call(void 0, gaps);
8650
8666
  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)));
8651
8667
  }
8652
8668
  function detectColumns(yLines) {
8653
8669
  const allItems = yLines.flat();
8654
8670
  if (allItems.length === 0) return null;
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));
8671
+ const pageWidth = _chunk4ATTNHKScjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunk4ATTNHKScjs.safeMin.call(void 0, allItems.map((i) => i.x));
8656
8672
  if (pageWidth < 100) return null;
8657
8673
  let bigoLineIdx = -1;
8658
8674
  for (let i = 0; i < yLines.length; i++) {
@@ -9050,13 +9066,13 @@ function partTex(group) {
9050
9066
  const base = Math.min(...g.filter((i) => i.fontSize >= size * SCRIPT_SIZE_RATIO).map((i) => i.y));
9051
9067
  let s = "", run = "";
9052
9068
  const flush = () => {
9053
- if (run) s += _chunkTQOAPKLUcjs.toTex.call(void 0, run);
9069
+ if (run) s += _chunkUSVDMFOCcjs.toTex.call(void 0, run);
9054
9070
  run = "";
9055
9071
  };
9056
9072
  g.forEach((it, k) => {
9057
9073
  if (it.fontSize < size * SCRIPT_SIZE_RATIO && it.y - base >= size * SCRIPT_RISE_EM) {
9058
9074
  flush();
9059
- s += `^{${_chunkTQOAPKLUcjs.toTex.call(void 0, it.text)}}`;
9075
+ s += `^{${_chunkUSVDMFOCcjs.toTex.call(void 0, it.text)}}`;
9060
9076
  return;
9061
9077
  }
9062
9078
  if (k && it.x - (g[k - 1].x + g[k - 1].w) > spaceGapThreshold(it.fontSize)) run += " ";
@@ -9229,7 +9245,7 @@ function rebuildUnitLine(items, grid) {
9229
9245
  function prependUnitRow(cells, cols, line, usedItems) {
9230
9246
  const text = cleanCellText(line.map((item) => item.text).join(""));
9231
9247
  cells.unshift(Array.from({ length: cols }, (_, c) => ({ text: c === 0 ? text : "", colSpan: c === 0 ? cols : 1, rowSpan: 1 })));
9232
- for (const cell of cells[0]) _chunkTQOAPKLUcjs.CELL_EDGES.set(cell, NO_EDGES);
9248
+ for (const cell of cells[0]) _chunkUSVDMFOCcjs.CELL_EDGES.set(cell, NO_EDGES);
9233
9249
  for (const item of line) usedItems.add(item);
9234
9250
  }
9235
9251
  function attachUnitRow(items, grid, cells, cols, usedItems) {
@@ -9811,7 +9827,7 @@ function recordFrameTitle(table, source, pageNum) {
9811
9827
  const [label, spacer, title] = cells;
9812
9828
  if (!/^(?:붙임|별첨|첨부|부록)\s*\d{1,3}$/.test(label.text.trim()) || spacer.text.trim() || !title.text.trim()) return;
9813
9829
  if (cells.some((c) => {
9814
- const e = _chunkTQOAPKLUcjs.CELL_EDGES.get(c);
9830
+ const e = _chunkUSVDMFOCcjs.CELL_EDGES.get(c);
9815
9831
  return !e || e.t || e.b || e.l || e.r;
9816
9832
  })) return;
9817
9833
  const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess', _393 => _393.fontSize]), () => ( 0));
@@ -10569,7 +10585,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
10569
10585
  groupSizes.push(1);
10570
10586
  }
10571
10587
  const allY = remaining.map((i) => i.y);
10572
- const pageH = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10588
+ const pageH = _chunk4ATTNHKScjs.safeMax.call(void 0, allY) - _chunk4ATTNHKScjs.safeMin.call(void 0, allY);
10573
10589
  const gapThreshold = Math.max(15, pageH * 0.03);
10574
10590
  const sides = frameColumnTextBands(remaining, spanning, gx);
10575
10591
  const textBlocks = [];
@@ -10585,7 +10601,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
10585
10601
  finalTextBlocks.push(...detectListBlocks(textBlocks));
10586
10602
  } else {
10587
10603
  const allY = remaining.map((i) => i.y);
10588
- const pageH = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10604
+ const pageH = _chunk4ATTNHKScjs.safeMax.call(void 0, allY) - _chunk4ATTNHKScjs.safeMin.call(void 0, allY);
10589
10605
  const gapThreshold = Math.max(15, pageH * 0.03);
10590
10606
  const groups = xyCutOrder(remaining, gapThreshold);
10591
10607
  const textBlocks = [];
@@ -10940,7 +10956,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
10940
10956
  blocks.push(...columnTextToBlocks(tableText, pageNum, bbox, dominantStyle(items)));
10941
10957
  } else {
10942
10958
  const allY = items.map((i) => i.y);
10943
- const pageHeight = _chunkPW7MQZI4cjs.safeMax.call(void 0, allY) - _chunkPW7MQZI4cjs.safeMin.call(void 0, allY);
10959
+ const pageHeight = _chunk4ATTNHKScjs.safeMax.call(void 0, allY) - _chunk4ATTNHKScjs.safeMin.call(void 0, allY);
10944
10960
  const gapThreshold = Math.max(15, pageHeight * 0.03);
10945
10961
  const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold, 0, void 0, minGap);
10946
10962
  for (const group of orderedGroups) {
@@ -11185,4 +11201,4 @@ function rowParagraphs(block) {
11185
11201
 
11186
11202
 
11187
11203
  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;
11188
- //# sourceMappingURL=chunk-UBY2PLKR.cjs.map
11204
+ //# sourceMappingURL=chunk-45LMTY3P.cjs.map