kordoc 4.25.6 → 4.25.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-IOADEIUV.js → chunk-4OQNRILM.js} +3 -3
  3. package/dist/{chunk-6ZUQ6D3B.js → chunk-57D6X5EC.js} +6 -6
  4. package/dist/{chunk-I7MD3WQR.js → chunk-7IRIFS2S.js} +2 -2
  5. package/dist/{chunk-D2WQC6ME.js → chunk-BJPCDZ7X.js} +18 -18
  6. package/dist/{chunk-2RBIZALD.js → chunk-BO4TN37Y.js} +8 -8
  7. package/dist/{chunk-D6MGUFRQ.js → chunk-BUJO3D7S.js} +10 -10
  8. package/dist/{chunk-IKQMEXGU.js → chunk-DDMJAMK5.js} +4 -4
  9. package/dist/{chunk-2VNL3FDS.js → chunk-DEJ55ALN.js} +2 -2
  10. package/dist/{chunk-ILUYLDIW.js → chunk-GXQH6M7M.js} +25 -6
  11. package/dist/chunk-GXQH6M7M.js.map +7 -0
  12. package/dist/{chunk-O4XRI7EC.js → chunk-HBEJZEIC.js} +6 -6
  13. package/dist/{chunk-VDF7ZVNW.js → chunk-HCPCT63U.js} +2 -2
  14. package/dist/{chunk-EDCNR6QZ.js → chunk-IBGOVT6M.js} +2 -2
  15. package/dist/{chunk-S4NQTGXD.js → chunk-ILWAZQEE.js} +2 -2
  16. package/dist/{chunk-3Y76RPK3.js → chunk-ILYDB32A.js} +11 -10
  17. package/dist/{chunk-3Y76RPK3.js.map → chunk-ILYDB32A.js.map} +2 -2
  18. package/dist/{chunk-24J4EDVI.js → chunk-IN7GJTXN.js} +2 -2
  19. package/dist/{chunk-DTUCE7H2.js → chunk-J6J4BW2O.js} +2 -2
  20. package/dist/{chunk-TH7SIDYM.js → chunk-JTKBXFIC.js} +2 -2
  21. package/dist/{chunk-6L3VEOCI.js → chunk-JZK7KZSN.js} +5 -5
  22. package/dist/{chunk-VHZYGCS4.js → chunk-KJZMY2EG.js} +3 -3
  23. package/dist/{chunk-3URB7DI4.js → chunk-RXBYAU5I.js} +2 -2
  24. package/dist/{chunk-XI47ZEQB.js → chunk-S6RHBYG2.js} +2 -2
  25. package/dist/{chunk-QQVTLNLV.js → chunk-TRSHYXL4.js} +2 -2
  26. package/dist/{chunk-767ACEVN.js → chunk-V42EHXHI.js} +3 -3
  27. package/dist/{chunk-HMTLJJEC.js → chunk-WO2FDP74.js} +2 -2
  28. package/dist/{chunk-ZEJCW4XP.js → chunk-YUO5ZFGX.js} +2 -2
  29. package/dist/{chunk-VLOQQJ2D.js → chunk-YYZNB37Y.js} +2 -2
  30. package/dist/chunks-N73DAPFJ.js +10 -0
  31. package/dist/cli.js +37 -37
  32. package/dist/{formula-R6LXXMAS.js → formula-HNRKT7XW.js} +4 -4
  33. package/dist/{generator-ERKQ7LUN.js → generator-FWITJRFW.js} +7 -7
  34. package/dist/{hancom-VQUG46NV.js → hancom-JGFB3LWB.js} +2 -2
  35. package/dist/{image-ocr-MWQ6UDGP.js → image-ocr-LVTB3URJ.js} +14 -13
  36. package/dist/image-ocr-LVTB3URJ.js.map +7 -0
  37. package/dist/index.cjs +30 -9
  38. package/dist/index.cjs.map +2 -2
  39. package/dist/index.js +21 -21
  40. package/dist/mcp.js +33 -33
  41. package/dist/memo-GMP2GN4U.js +15 -0
  42. package/dist/{model-bundle-3F33HOS2.js → model-bundle-BMU2WZEW.js} +5 -5
  43. package/dist/{models-PD6EQIHL.js → models-COYRD3JK.js} +5 -5
  44. package/dist/{page-images-MZECTCSJ.js → page-images-RJUDXJ67.js} +2 -2
  45. package/dist/{parse-worker-v2-ZXURNYJZ.js → parse-worker-v2-75LFVVTT.js} +23 -23
  46. package/dist/{parser-WAJNO5VU.js → parser-3OOOPKDK.js} +14 -14
  47. package/dist/{pdf-ocr-GTVOOQNV.js → pdf-ocr-NKW6BMY4.js} +9 -9
  48. package/dist/{profile-io-UQSLXMWG.js → profile-io-X77P5VOT.js} +3 -3
  49. package/dist/{rasterize-3QDKNJC3.js → rasterize-AAC7FWKK.js} +3 -3
  50. package/dist/{redact-doc-IBLP55CI.js → redact-doc-5DXAVTZK.js} +22 -22
  51. package/dist/{render-EPOTL6LB.js → render-LU4BYZGP.js} +10 -10
  52. package/dist/{rewrite-fallback-5GPUDXDK.js → rewrite-fallback-SBKFNSWR.js} +12 -12
  53. package/dist/seal-DDTUOSNO.js +14 -0
  54. package/dist/{setup-CTWIURYW.js → setup-O5RWA464.js} +3 -3
  55. package/dist/{to-hwpx-OJNCWBXT.js → to-hwpx-4FMG2STG.js} +7 -7
  56. package/dist/visual-G6LJASQD.js +42 -0
  57. package/dist/{watch-NXUTGUPA.js → watch-ZBA2UVU2.js} +22 -22
  58. package/package.json +1 -1
  59. package/dist/chunk-ILUYLDIW.js.map +0 -7
  60. package/dist/chunks-GPCDFBSF.js +0 -10
  61. package/dist/image-ocr-MWQ6UDGP.js.map +0 -7
  62. package/dist/memo-7UFH4MNW.js +0 -15
  63. package/dist/seal-7YV46Q77.js +0 -14
  64. package/dist/visual-U7X4QE2V.js +0 -42
  65. /package/dist/{chunk-IOADEIUV.js.map → chunk-4OQNRILM.js.map} +0 -0
  66. /package/dist/{chunk-6ZUQ6D3B.js.map → chunk-57D6X5EC.js.map} +0 -0
  67. /package/dist/{chunk-I7MD3WQR.js.map → chunk-7IRIFS2S.js.map} +0 -0
  68. /package/dist/{chunk-D2WQC6ME.js.map → chunk-BJPCDZ7X.js.map} +0 -0
  69. /package/dist/{chunk-2RBIZALD.js.map → chunk-BO4TN37Y.js.map} +0 -0
  70. /package/dist/{chunk-D6MGUFRQ.js.map → chunk-BUJO3D7S.js.map} +0 -0
  71. /package/dist/{chunk-IKQMEXGU.js.map → chunk-DDMJAMK5.js.map} +0 -0
  72. /package/dist/{chunk-2VNL3FDS.js.map → chunk-DEJ55ALN.js.map} +0 -0
  73. /package/dist/{chunk-O4XRI7EC.js.map → chunk-HBEJZEIC.js.map} +0 -0
  74. /package/dist/{chunk-VDF7ZVNW.js.map → chunk-HCPCT63U.js.map} +0 -0
  75. /package/dist/{chunk-EDCNR6QZ.js.map → chunk-IBGOVT6M.js.map} +0 -0
  76. /package/dist/{chunk-S4NQTGXD.js.map → chunk-ILWAZQEE.js.map} +0 -0
  77. /package/dist/{chunk-24J4EDVI.js.map → chunk-IN7GJTXN.js.map} +0 -0
  78. /package/dist/{chunk-DTUCE7H2.js.map → chunk-J6J4BW2O.js.map} +0 -0
  79. /package/dist/{chunk-TH7SIDYM.js.map → chunk-JTKBXFIC.js.map} +0 -0
  80. /package/dist/{chunk-6L3VEOCI.js.map → chunk-JZK7KZSN.js.map} +0 -0
  81. /package/dist/{chunk-VHZYGCS4.js.map → chunk-KJZMY2EG.js.map} +0 -0
  82. /package/dist/{chunk-3URB7DI4.js.map → chunk-RXBYAU5I.js.map} +0 -0
  83. /package/dist/{chunk-XI47ZEQB.js.map → chunk-S6RHBYG2.js.map} +0 -0
  84. /package/dist/{chunk-QQVTLNLV.js.map → chunk-TRSHYXL4.js.map} +0 -0
  85. /package/dist/{chunk-767ACEVN.js.map → chunk-V42EHXHI.js.map} +0 -0
  86. /package/dist/{chunk-HMTLJJEC.js.map → chunk-WO2FDP74.js.map} +0 -0
  87. /package/dist/{chunk-ZEJCW4XP.js.map → chunk-YUO5ZFGX.js.map} +0 -0
  88. /package/dist/{chunk-VLOQQJ2D.js.map → chunk-YYZNB37Y.js.map} +0 -0
  89. /package/dist/{chunks-GPCDFBSF.js.map → chunks-N73DAPFJ.js.map} +0 -0
  90. /package/dist/{formula-R6LXXMAS.js.map → formula-HNRKT7XW.js.map} +0 -0
  91. /package/dist/{generator-ERKQ7LUN.js.map → generator-FWITJRFW.js.map} +0 -0
  92. /package/dist/{hancom-VQUG46NV.js.map → hancom-JGFB3LWB.js.map} +0 -0
  93. /package/dist/{memo-7UFH4MNW.js.map → memo-GMP2GN4U.js.map} +0 -0
  94. /package/dist/{model-bundle-3F33HOS2.js.map → model-bundle-BMU2WZEW.js.map} +0 -0
  95. /package/dist/{models-PD6EQIHL.js.map → models-COYRD3JK.js.map} +0 -0
  96. /package/dist/{page-images-MZECTCSJ.js.map → page-images-RJUDXJ67.js.map} +0 -0
  97. /package/dist/{parse-worker-v2-ZXURNYJZ.js.map → parse-worker-v2-75LFVVTT.js.map} +0 -0
  98. /package/dist/{parser-WAJNO5VU.js.map → parser-3OOOPKDK.js.map} +0 -0
  99. /package/dist/{pdf-ocr-GTVOOQNV.js.map → pdf-ocr-NKW6BMY4.js.map} +0 -0
  100. /package/dist/{profile-io-UQSLXMWG.js.map → profile-io-X77P5VOT.js.map} +0 -0
  101. /package/dist/{rasterize-3QDKNJC3.js.map → rasterize-AAC7FWKK.js.map} +0 -0
  102. /package/dist/{redact-doc-IBLP55CI.js.map → redact-doc-5DXAVTZK.js.map} +0 -0
  103. /package/dist/{render-EPOTL6LB.js.map → render-LU4BYZGP.js.map} +0 -0
  104. /package/dist/{rewrite-fallback-5GPUDXDK.js.map → rewrite-fallback-SBKFNSWR.js.map} +0 -0
  105. /package/dist/{seal-7YV46Q77.js.map → seal-DDTUOSNO.js.map} +0 -0
  106. /package/dist/{setup-CTWIURYW.js.map → setup-O5RWA464.js.map} +0 -0
  107. /package/dist/{to-hwpx-OJNCWBXT.js.map → to-hwpx-4FMG2STG.js.map} +0 -0
  108. /package/dist/{visual-U7X4QE2V.js.map → visual-G6LJASQD.js.map} +0 -0
  109. /package/dist/{watch-NXUTGUPA.js.map → watch-ZBA2UVU2.js.map} +0 -0
package/README.md CHANGED
@@ -130,15 +130,15 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
130
130
 
131
131
  ## 최근 업데이트
132
132
 
133
- 최신 배포: **[4.25.6](https://github.com/chrisryugj/kordoc/releases/tag/v4.25.6)** · 2026-11-24
133
+ 최신 배포: **[4.25.7](https://github.com/chrisryugj/kordoc/releases/tag/v4.25.7)** · 2026-11-24
134
134
 
135
135
  | 버전 | 바뀐 점 | 실측 변화 |
136
136
  | --- | --- | --- |
137
+ | 4.25.7 | HWPX에서 글자 크기로 정하는 제목이 나오지 않던 것(한글 저장본 문단의 글자 모양을 읽지 않았음), OCR에서 DPI 없는 4·6배판 쪽 배율을 잘못 잡던 것, 옆 테두리 없는 표의 흐린 괘선을 버려 열이 합쳐지던 것을 고쳤습니다 | 한컴 HWP·HWPX 짝 1,120개 제목 줄 일치 966 → **1,099**짝 · 견고성 dpi150 cbe-record-guide CER 0.176 → **0.009**, 스캔 ice-geomjeong 0.063 → 0.024, 흐림 web044 0.083 → 0.014 · ODL 200(4종)·글 744·표 730·점수 5,465·OCR 56·견고성 54·KoOCR 877쪽 하락 0 · 시험 5,296개 실패 0 |
137
138
  | 4.25.6 | PDF에서 쪽을 넘긴 중첩 표의 되풀이 머리 행이 따로 남던 것, 작은 원으로 그린 글머리 점이 빠져 항목이 한 줄로 붙던 것, 값이 빈 입력란 두 칸을 두 단으로 읽던 것을 고쳤습니다 | 별표 PDF 유령 글 0.00028 → **0.00006** · ODL 163 MHS 0.9145 → 0.9201 · PDF 글 web070 재현율 0.99616 → 0.99904 · ODL 200·글 744·표 730·OCR 56·견고성 54·KoOCR 877쪽 하락 0 · 시험 5,288개 실패 0 |
138
139
  | 4.25.5 | 개인정보 가리기(`redact`)에서 인명·주소를 학습 모델로도 찾는 선택 옵션을 더했습니다(`--model`, MCP `use_model`, @ubermensch1218). 문맥 없는 이름, 「홍○동」처럼 가린 이름, 띄어 쓴 이름, 동·지번만 있는 주소를 잡습니다. 모델은 켤 때만 받고(151MB) Schift License v2.0입니다 | 합성 벤치 인명 재현율 0.962 → **1.000**(오탐 1), 전체 micro F1 0.995 → 0.998 · 게이트 모델 끔·켬 모두 통과 · 모델을 끄면 출력 그대로 · 시험 5,262개 실패 0 |
139
140
  | 4.25.4 | OCR 줄마다 상위 읽기 후보와 확률을 받는 `ocrLineCandidates`, OCR이 읽은 페이지를 이미지로 받는 `pageImages` 옵션을 더했습니다(@VerifiedIdiot). `fill 서식.hwp -o 결과.hwp`가 HWPX를 `.hwp` 이름으로 쓰던 문제를 고쳐 HWP 5.x로 저장합니다(#229, @seojaehong) | 두 옵션을 끄면 스캔 PNG 2장·스캔 PDF 1개의 출력이 4.25.3과 바이트까지 같음 · 기울인 스캔 1쪽 151줄 중 150줄에 후보, 페이지 이미지 크기 = 줄 좌표 기준 크기 · 시험 5,233개 실패 0 |
140
141
  | 4.25.3 | PDF `ocr`에 함수(OcrProvider)를 주면 본문 쪽의 차트·그림을 OCR하지 않던 문제를 고쳤습니다(#225). 그림 영역만 잘라 함수에 넘기고, 결과는 그림 자리에 넣습니다. 표 칸 안 그림이면 그 칸에 넣습니다(#226, @circlebig) | 점수 5,465·PDF 글 744·ODL 200(OCR 켬·끔)·OCR 56·견고성 54·별표 544 문서별 변화 **0** · 신고 PDF 차트 칸에 결과가 들어감 · `ocrRec: "handwriting"` 손글씨 rec v1.2.0(손글씨 기호 줄 39.7% → 97.3%, @VerifiedIdiot), 기본 OCR 출력 그대로 |
141
- | 4.25.2 | `parse-worker`가 입력 파일을 비동기로 읽어, 큰 파일을 읽는 동안에도 워커가 신호와 출력을 처리합니다(#224). 백신이 수식 변환 파일을 잘못 잡을 때의 예외 등록 방법을 설치 문제 해결에 적었습니다(#223) | 150MB 입력에서 함수가 돌아오기까지 동기 구간 14ms → **0ms** · 파서 출력 무변 |
142
142
 
143
143
  이전 버전과 상세 내용은 [변경 이력](CHANGELOG.md)에 있습니다.
144
144
 
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  parse
3
- } from "./chunk-D2WQC6ME.js";
3
+ } from "./chunk-BJPCDZ7X.js";
4
4
  import {
5
5
  classifyError,
6
6
  sanitizeError,
7
7
  toArrayBuffer
8
- } from "./chunk-3URB7DI4.js";
8
+ } from "./chunk-RXBYAU5I.js";
9
9
 
10
10
  // src/cli/worker-parse.ts
11
11
  import { readFile, stat } from "fs/promises";
@@ -25,4 +25,4 @@ async function parseWorkerFile(absPath, options) {
25
25
  export {
26
26
  parseWorkerFile
27
27
  };
28
- //# sourceMappingURL=chunk-IOADEIUV.js.map
28
+ //# sourceMappingURL=chunk-4OQNRILM.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  collectSites
3
- } from "./chunk-IKQMEXGU.js";
3
+ } from "./chunk-DDMJAMK5.js";
4
4
  import {
5
5
  patchZipEntries
6
- } from "./chunk-S4NQTGXD.js";
6
+ } from "./chunk-ILWAZQEE.js";
7
7
  import {
8
8
  applySplices,
9
9
  changedLinesegRemovalSplices,
@@ -13,14 +13,14 @@ import {
13
13
  } from "./chunk-OP4EPPXU.js";
14
14
  import {
15
15
  readZipEntry
16
- } from "./chunk-QQVTLNLV.js";
16
+ } from "./chunk-TRSHYXL4.js";
17
17
  import {
18
18
  fileTimeText
19
- } from "./chunk-XI47ZEQB.js";
19
+ } from "./chunk-S6RHBYG2.js";
20
20
  import {
21
21
  KordocError,
22
22
  precheckZipSize
23
- } from "./chunk-3URB7DI4.js";
23
+ } from "./chunk-RXBYAU5I.js";
24
24
 
25
25
  // src/form/memo.ts
26
26
  import JSZip from "jszip";
@@ -127,4 +127,4 @@ async function addMemoHwpx(hwpxBuffer, ops, now = /* @__PURE__ */ new Date()) {
127
127
  export {
128
128
  addMemoHwpx
129
129
  };
130
- //# sourceMappingURL=chunk-6ZUQ6D3B.js.map
130
+ //# sourceMappingURL=chunk-57D6X5EC.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  visibleText
3
- } from "./chunk-24J4EDVI.js";
3
+ } from "./chunk-IN7GJTXN.js";
4
4
 
5
5
  // src/script-tags.ts
6
6
  var LITERAL_TAG = /<(?=\/?(?:u|sup|sub)>)/g;
@@ -335,4 +335,4 @@ export {
335
335
  HEADING_RATIO_H2,
336
336
  HEADING_RATIO_H3
337
337
  };
338
- //# sourceMappingURL=chunk-I7MD3WQR.js.map
338
+ //# sourceMappingURL=chunk-7IRIFS2S.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  extractRenderedRegions,
3
3
  renderDocumentToScene
4
- } from "./chunk-2RBIZALD.js";
4
+ } from "./chunk-BO4TN37Y.js";
5
5
  import {
6
6
  EV,
7
7
  blocksToPages,
@@ -17,7 +17,7 @@ import {
17
17
  restoreUnmappedGlyphs,
18
18
  spaceMappedDots,
19
19
  wmfBitmap
20
- } from "./chunk-DTUCE7H2.js";
20
+ } from "./chunk-J6J4BW2O.js";
21
21
  import {
22
22
  applyCellEdit,
23
23
  buildOrigUnits,
@@ -30,13 +30,13 @@ import {
30
30
  resolveParagraphMappings,
31
31
  resolveSectionEntryNames,
32
32
  stripCellTokens
33
- } from "./chunk-D6MGUFRQ.js";
33
+ } from "./chunk-BUJO3D7S.js";
34
34
  import {
35
35
  dcxPages,
36
36
  hasLibheif,
37
37
  heicToRgba,
38
38
  pcxToRgba
39
- } from "./chunk-HMTLJJEC.js";
39
+ } from "./chunk-WO2FDP74.js";
40
40
  import {
41
41
  WEBP_OPTIONS,
42
42
  flushHeifCache,
@@ -69,10 +69,10 @@ import {
69
69
  summarize,
70
70
  topLevelParagraphs,
71
71
  usesV5Engine
72
- } from "./chunk-3Y76RPK3.js";
72
+ } from "./chunk-ILYDB32A.js";
73
73
  import {
74
74
  patchZipEntries
75
- } from "./chunk-S4NQTGXD.js";
75
+ } from "./chunk-ILWAZQEE.js";
76
76
  import {
77
77
  ANNOTATION_BLANK_RE,
78
78
  ValueCursor,
@@ -111,7 +111,7 @@ import {
111
111
  rawTextContent,
112
112
  readZipEntry,
113
113
  warnInto
114
- } from "./chunk-QQVTLNLV.js";
114
+ } from "./chunk-TRSHYXL4.js";
115
115
  import {
116
116
  comResultToParseResult,
117
117
  extractTextViaCom,
@@ -128,7 +128,7 @@ import {
128
128
  memosMarkdown,
129
129
  parseHwp5Document,
130
130
  resolveImageBlocks
131
- } from "./chunk-6L3VEOCI.js";
131
+ } from "./chunk-JZK7KZSN.js";
132
132
  import {
133
133
  MAX_PIXELS,
134
134
  bmpToPng,
@@ -166,7 +166,7 @@ import {
166
166
  stripScriptTags,
167
167
  tidyScriptTags,
168
168
  wrapScript
169
- } from "./chunk-I7MD3WQR.js";
169
+ } from "./chunk-7IRIFS2S.js";
170
170
  import {
171
171
  MAX_COLS,
172
172
  MAX_ROWS,
@@ -177,7 +177,7 @@ import {
177
177
  flattenLayoutTables,
178
178
  hasStructuredCellContent,
179
179
  sanitizeText
180
- } from "./chunk-24J4EDVI.js";
180
+ } from "./chunk-IN7GJTXN.js";
181
181
  import {
182
182
  hangulAmount,
183
183
  mapPuaText
@@ -188,7 +188,7 @@ import {
188
188
  import {
189
189
  ensureModelsIn,
190
190
  getModelsDir
191
- } from "./chunk-2VNL3FDS.js";
191
+ } from "./chunk-DEJ55ALN.js";
192
192
  import {
193
193
  BARE_URL,
194
194
  KordocError,
@@ -206,7 +206,7 @@ import {
206
206
  toArrayBuffer,
207
207
  unescapeHtml,
208
208
  unzipLimitBytes
209
- } from "./chunk-3URB7DI4.js";
209
+ } from "./chunk-RXBYAU5I.js";
210
210
 
211
211
  // src/table/visual.ts
212
212
  import { readFile as readFile4 } from "node:fs/promises";
@@ -16984,7 +16984,7 @@ var MIN_SIDE = 24;
16984
16984
  async function ocrEmbeddedImages(blocks, options, warnings) {
16985
16985
  const ocr = options?.ocr;
16986
16986
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
16987
- const { parseImageDocument } = await import("./image-ocr-MWQ6UDGP.js");
16987
+ const { parseImageDocument } = await import("./image-ocr-LVTB3URJ.js");
16988
16988
  let inserted = false, unreadable = 0;
16989
16989
  let failed = null;
16990
16990
  const walk = async (list, depth) => {
@@ -21342,8 +21342,8 @@ var MAX_MULTIPAGE_PIXELS = 1e9;
21342
21342
  var MIN_PAGE_PIXELS = 1e6;
21343
21343
  async function parseImage(buffer, options) {
21344
21344
  try {
21345
- const { parseImageDocument, imagePageCount, imagePage, imagePagePixels, decodeToRgba } = await import("./image-ocr-MWQ6UDGP.js");
21346
- const pageRasters = options?.pageImages ? new (await import("./page-images-MZECTCSJ.js")).PageImageSink(options.pageImages) : null;
21345
+ const { parseImageDocument, imagePageCount, imagePage, imagePagePixels, decodeToRgba } = await import("./image-ocr-LVTB3URJ.js");
21346
+ const pageRasters = options?.pageImages ? new (await import("./page-images-RJUDXJ67.js")).PageImageSink(options.pageImages) : null;
21347
21347
  const pageCount = await imagePageCount(buffer);
21348
21348
  const wanted = pageCount > 1 && options?.pages ? parsePageRange(options.pages, pageCount) : null;
21349
21349
  const blocks = [], warnings = [], lines = [], images = [];
@@ -21450,7 +21450,7 @@ async function parseHwp(buffer, options) {
21450
21450
  async function parsePdf(buffer, options) {
21451
21451
  let parsePdfDocument;
21452
21452
  try {
21453
- const mod = await import("./parser-WAJNO5VU.js");
21453
+ const mod = await import("./parser-3OOOPKDK.js");
21454
21454
  parsePdfDocument = mod.parsePdfDocument;
21455
21455
  } catch (err) {
21456
21456
  return { success: false, fileType: "pdf", error: sanitizeError(err), code: classifyError(err) };
@@ -21527,7 +21527,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
21527
21527
  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})`);
21528
21528
  }
21529
21529
  } else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
21530
- const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-OJNCWBXT.js");
21530
+ const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-4FMG2STG.js");
21531
21531
  const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
21532
21532
  buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
21533
21533
  } else {
@@ -21683,4 +21683,4 @@ export {
21683
21683
  parseHwpml,
21684
21684
  fillForm
21685
21685
  };
21686
- //# sourceMappingURL=chunk-D2WQC6ME.js.map
21686
+ //# sourceMappingURL=chunk-BJPCDZ7X.js.map
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  loadSharp,
3
3
  rasterizePageSvg
4
- } from "./chunk-TH7SIDYM.js";
4
+ } from "./chunk-JTKBXFIC.js";
5
5
  import {
6
6
  assemblePageSvgs,
7
7
  escapeXml,
8
8
  renderHwpxPages,
9
9
  renderSectionRoots
10
- } from "./chunk-VHZYGCS4.js";
10
+ } from "./chunk-KJZMY2EG.js";
11
11
  import {
12
12
  DEFAULT_PARA_GEOM,
13
13
  createXmlParser,
14
14
  hwpFaceToCssStack
15
- } from "./chunk-QQVTLNLV.js";
15
+ } from "./chunk-TRSHYXL4.js";
16
16
  import {
17
17
  detectImageMime,
18
18
  indexHwp5Tables,
@@ -21,7 +21,7 @@ import {
21
21
  readHwp5DocInfoRecords,
22
22
  readHwp5SectionRecords,
23
23
  readHwp5SectionStreams
24
- } from "./chunk-6L3VEOCI.js";
24
+ } from "./chunk-JZK7KZSN.js";
25
25
  import {
26
26
  TAG_CHAR_SHAPE,
27
27
  TAG_CTRL_HEADER,
@@ -38,7 +38,7 @@ import {
38
38
  TAG_TABLE,
39
39
  isExtendedOnlyCtrlChar,
40
40
  parseDocInfo
41
- } from "./chunk-XI47ZEQB.js";
41
+ } from "./chunk-S6RHBYG2.js";
42
42
  import {
43
43
  parsePageRange
44
44
  } from "./chunk-W5CMIZUB.js";
@@ -48,7 +48,7 @@ import {
48
48
  } from "./chunk-YZ3IKQLX.js";
49
49
  import {
50
50
  blocksToMarkdown
51
- } from "./chunk-24J4EDVI.js";
51
+ } from "./chunk-IN7GJTXN.js";
52
52
  import {
53
53
  mapPuaText
54
54
  } from "./chunk-RJCXOE4N.js";
@@ -56,7 +56,7 @@ import {
56
56
  KordocError,
57
57
  escapeHtml,
58
58
  toArrayBuffer
59
- } from "./chunk-3URB7DI4.js";
59
+ } from "./chunk-RXBYAU5I.js";
60
60
 
61
61
  // src/render/hwp5-scene.ts
62
62
  var TAG_BORDER_FILL = 20;
@@ -985,4 +985,4 @@ export {
985
985
  cropRect,
986
986
  extractRenderedRegions
987
987
  };
988
- //# sourceMappingURL=chunk-2RBIZALD.js.map
988
+ //# sourceMappingURL=chunk-BO4TN37Y.js.map
@@ -53,17 +53,17 @@ import {
53
53
  unescapeGfm,
54
54
  unescapeGfmCell,
55
55
  wordHunks
56
- } from "./chunk-3Y76RPK3.js";
56
+ } from "./chunk-ILYDB32A.js";
57
57
  import {
58
58
  decryptHwpxInPlace,
59
59
  lockedHwpxError,
60
60
  noteFormatFrom,
61
61
  noteRefMark
62
- } from "./chunk-VHZYGCS4.js";
62
+ } from "./chunk-KJZMY2EG.js";
63
63
  import {
64
64
  patchZipEntries,
65
65
  readZipEntries
66
- } from "./chunk-S4NQTGXD.js";
66
+ } from "./chunk-ILWAZQEE.js";
67
67
  import {
68
68
  allLinesegRemovalSplices,
69
69
  applySplices,
@@ -92,7 +92,7 @@ import {
92
92
  findChildByLocalName,
93
93
  localName,
94
94
  readZipEntry
95
- } from "./chunk-QQVTLNLV.js";
95
+ } from "./chunk-TRSHYXL4.js";
96
96
  import {
97
97
  comResultToParseResult,
98
98
  extractTextViaCom,
@@ -107,7 +107,7 @@ import {
107
107
  locateMemoBlocks,
108
108
  parseHwp5Document,
109
109
  unfilledClickHereGuide
110
- } from "./chunk-6L3VEOCI.js";
110
+ } from "./chunk-JZK7KZSN.js";
111
111
  import {
112
112
  FLAG_COMPRESSED,
113
113
  FLAG_DISTRIBUTION,
@@ -128,7 +128,7 @@ import {
128
128
  isExtendedOnlyCtrlChar,
129
129
  parseFileHeader,
130
130
  readRecords
131
- } from "./chunk-XI47ZEQB.js";
131
+ } from "./chunk-S6RHBYG2.js";
132
132
  import {
133
133
  parsePageRange
134
134
  } from "./chunk-W5CMIZUB.js";
@@ -140,20 +140,20 @@ import {
140
140
  } from "./chunk-G5XEBGZD.js";
141
141
  import {
142
142
  unframeLayoutTables
143
- } from "./chunk-I7MD3WQR.js";
143
+ } from "./chunk-7IRIFS2S.js";
144
144
  import {
145
145
  blocksToMarkdown,
146
146
  escapeGfm,
147
147
  hasInlineCellBlocks,
148
148
  sanitizeText
149
- } from "./chunk-24J4EDVI.js";
149
+ } from "./chunk-IN7GJTXN.js";
150
150
  import {
151
151
  KordocError,
152
152
  compareSectionPaths,
153
153
  isPathTraversal,
154
154
  precheckZipSize,
155
155
  stripDtd
156
- } from "./chunk-3URB7DI4.js";
156
+ } from "./chunk-RXBYAU5I.js";
157
157
 
158
158
  // src/hwpx/parser.ts
159
159
  import JSZip2 from "jszip";
@@ -4210,4 +4210,4 @@ export {
4210
4210
  removeNoteMarks,
4211
4211
  diffUnitLists
4212
4212
  };
4213
- //# sourceMappingURL=chunk-D6MGUFRQ.js.map
4213
+ //# sourceMappingURL=chunk-BUJO3D7S.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  patchZipEntries
3
- } from "./chunk-S4NQTGXD.js";
3
+ } from "./chunk-ILWAZQEE.js";
4
4
  import {
5
5
  applySplices,
6
6
  scanSectionXml
@@ -8,11 +8,11 @@ import {
8
8
  import {
9
9
  parseRenderStyles,
10
10
  readZipEntry
11
- } from "./chunk-QQVTLNLV.js";
11
+ } from "./chunk-TRSHYXL4.js";
12
12
  import {
13
13
  KordocError,
14
14
  precheckZipSize
15
- } from "./chunk-3URB7DI4.js";
15
+ } from "./chunk-RXBYAU5I.js";
16
16
 
17
17
  // src/form/seal.ts
18
18
  import JSZip from "jszip";
@@ -318,4 +318,4 @@ export {
318
318
  collectSites,
319
319
  placeSealHwpx
320
320
  };
321
- //# sourceMappingURL=chunk-IKQMEXGU.js.map
321
+ //# sourceMappingURL=chunk-DDMJAMK5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  assertNetworkAllowed
3
- } from "./chunk-EDCNR6QZ.js";
3
+ } from "./chunk-IBGOVT6M.js";
4
4
 
5
5
  // src/pdf/formula/models.ts
6
6
  import { createHash as createHash2 } from "crypto";
@@ -299,4 +299,4 @@ export {
299
299
  ensureFormulaModels,
300
300
  ensureSingleModel
301
301
  };
302
- //# sourceMappingURL=chunk-2VNL3FDS.js.map
302
+ //# sourceMappingURL=chunk-DEJ55ALN.js.map
@@ -29,7 +29,7 @@ import {
29
29
  stackedGlyphBands,
30
30
  starRun,
31
31
  tallInkCount
32
- } from "./chunk-767ACEVN.js";
32
+ } from "./chunk-V42EHXHI.js";
33
33
  import {
34
34
  validateOcrOptions
35
35
  } from "./chunk-M3E5NYSN.js";
@@ -45,14 +45,14 @@ import {
45
45
  ocrSourcePath,
46
46
  parseCharacterDict,
47
47
  resolveOcrModels
48
- } from "./chunk-ZEJCW4XP.js";
48
+ } from "./chunk-YUO5ZFGX.js";
49
49
  import {
50
50
  disableOrtTelemetry
51
51
  } from "./chunk-AY66PEUP.js";
52
52
  import {
53
53
  KordocError,
54
54
  OPTIONAL_DEP_INSTALL_HINT
55
- } from "./chunk-3URB7DI4.js";
55
+ } from "./chunk-RXBYAU5I.js";
56
56
 
57
57
  // src/ocr/ocr-stacked-rows.ts
58
58
  var NUMERIC = /^[-+−△▲▽▼]?[\d.,]+[%p원]?$|^[-–—·∼~]원?$|^\([-+−△▲▽▼]?[\d.,]+%?\)$/;
@@ -602,14 +602,33 @@ function detectRulingLines(rgba, width, height, scale) {
602
602
  frames.push({ x1: a.x1, x2: a.x2, y1, y2 });
603
603
  }
604
604
  }
605
+ for (const a of horizontals) {
606
+ if (frames.length >= 32 || a.x2 - a.x1 < minLenPx * 3) continue;
607
+ const same = horizontals.filter((b) => Math.abs(a.x1 - b.x1) <= tol && Math.abs(a.x2 - b.x2) <= tol);
608
+ for (const v of inkV) {
609
+ if (v.x1 <= a.x1 + tol || v.x1 >= a.x2 - tol || Math.abs(v.y1 - a.y1) > tol) continue;
610
+ const b = same.find((h) => Math.abs(h.y1 - v.y2) <= tol);
611
+ if (!b || b.y1 - a.y1 < minLenPx * 2 || same.filter((h) => h.y1 >= a.y1 - tol && h.y1 <= b.y1 + tol).length < 4) continue;
612
+ if (!frames.some((f) => Math.abs(f.y1 - a.y1) <= tol && Math.abs(f.y2 - b.y1) <= tol)) frames.push({ x1: a.x1, x2: a.x2, y1: a.y1, y2: b.y1, open: true });
613
+ break;
614
+ }
615
+ }
605
616
  if (frames.length) {
606
617
  const faint2 = new Uint8Array(ink.length);
607
618
  for (let p = 0; p < faint2.length; p++) if (luma[p] <= 240 && rgba[p * 4 + 3] >= 128) faint2[p] = 1;
608
619
  const hs = detectBands(faint2, width, height, maxThickPx, false, solid);
609
620
  const vs = detectBands(faint2, width, height, maxThickPx, true, solid);
621
+ const faintCol = new Uint8Array(ink.length);
622
+ for (let p = 0; p < faint2.length; p++) {
623
+ const x = p % width;
624
+ if (faint2[p] && x >= 3 && x + 3 < width && luma[p] + 12 <= Math.min(luma[p - 3], luma[p + 3])) faintCol[p] = 1;
625
+ }
626
+ const vsOpen = frames.some((f) => f.open) ? detectBands(faintCol, width, height, maxThickPx, true, solid) : [];
610
627
  for (const f of frames) {
611
- const innerH = hs.filter((h) => h.y1 > f.y1 + tol && h.y1 < f.y2 - tol && Math.abs(h.x1 - f.x1) <= tol && Math.abs(h.x2 - f.x2) <= tol);
612
- const innerV = vs.filter((v) => v.x1 > f.x1 + tol && v.x1 < f.x2 - tol && Math.abs(v.y1 - f.y1) <= tol && Math.abs(v.y2 - f.y2) <= tol);
628
+ const colAt = (x) => inkV.some((v) => Math.abs(v.x1 - x) <= tol && v.y1 <= f.y1 + tol && v.y2 >= f.y2 - tol);
629
+ const endsAtEdge = (h) => f.open ? (Math.abs(h.x1 - f.x1) <= tol || colAt(h.x1)) && (Math.abs(h.x2 - f.x2) <= tol || colAt(h.x2)) : Math.abs(h.x1 - f.x1) <= tol && Math.abs(h.x2 - f.x2) <= tol;
630
+ const innerH = hs.filter((h) => h.y1 > f.y1 + tol && h.y1 < f.y2 - tol && endsAtEdge(h));
631
+ const innerV = (f.open ? vsOpen : vs).filter((v) => v.x1 > f.x1 + tol && v.x1 < f.x2 - tol && Math.abs(v.y1 - f.y1) <= tol && Math.abs(v.y2 - f.y2) <= tol);
613
632
  const darkV = inkV.some((v) => v.x1 > f.x1 + tol && v.x1 < f.x2 - tol && v.y1 <= f.y1 + tol && v.y2 >= f.y2 - tol);
614
633
  if (innerH.length < 3 || innerV.length < 1 && !darkV) continue;
615
634
  for (const h of innerH) if (!horizontals.some((p) => Math.abs(p.y1 - h.y1) <= tol && p.x1 <= h.x1 + tol && p.x2 >= h.x2 - tol)) horizontals.push(h);
@@ -3637,4 +3656,4 @@ export {
3637
3656
  ocrItemsToBlocks,
3638
3657
  markOcrHeadings
3639
3658
  };
3640
- //# sourceMappingURL=chunk-ILUYLDIW.js.map
3659
+ //# sourceMappingURL=chunk-GXQH6M7M.js.map