kordoc 4.19.0 → 4.19.1
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.
- package/README.md +2 -1
- package/dist/{-I3DEUQUC.js → -LYUUVVQF.js} +11 -11
- package/dist/{chunk-AMDDV4CI.js → chunk-4WTJS6ES.js} +2 -2
- package/dist/{chunk-DGXGVC4Z.js → chunk-5AZQEMMG.js} +6 -6
- package/dist/{chunk-C4JHZNRL.js → chunk-6KOQPPLX.js} +10 -10
- package/dist/{chunk-UTVNSCEI.js → chunk-7L5GY54Q.js} +2 -2
- package/dist/{chunk-XIWGPC3V.js → chunk-7XRI4FL4.js} +2 -2
- package/dist/{chunk-DEYCTP2S.js → chunk-ADBES5QJ.js} +3 -3
- package/dist/{chunk-VZSOPECZ.js → chunk-BDTWXJNM.js} +2 -2
- package/dist/{chunk-RYKNAYKC.js → chunk-CL3CJ7X5.js} +3 -3
- package/dist/{chunk-W5XX2GKO.js → chunk-DQHDI567.js} +2 -2
- package/dist/{chunk-GCYLNOTJ.js → chunk-FEGRQA3Q.js} +4 -4
- package/dist/{chunk-YV4PWWRW.cjs → chunk-FNX3ZAYB.cjs} +22 -22
- package/dist/{chunk-YV4PWWRW.cjs.map → chunk-FNX3ZAYB.cjs.map} +1 -1
- package/dist/{chunk-7TVRQJXI.cjs → chunk-GPNPYBXJ.cjs} +12 -12
- package/dist/{chunk-7TVRQJXI.cjs.map → chunk-GPNPYBXJ.cjs.map} +1 -1
- package/dist/{chunk-5ZSQ2ZIH.cjs → chunk-HMJXB7ZE.cjs} +3 -3
- package/dist/{chunk-5ZSQ2ZIH.cjs.map → chunk-HMJXB7ZE.cjs.map} +1 -1
- package/dist/{chunk-OMJWAJBD.js → chunk-JA5B4NPF.js} +2 -2
- package/dist/{chunk-GYQVQF2J.js → chunk-JNIJPP4B.js} +2 -2
- package/dist/{chunk-CR4RXHXO.js → chunk-KYFP5LDC.js} +2 -2
- package/dist/{chunk-L5KNWOGR.js → chunk-L5N5UQBP.js} +10 -4
- package/dist/chunk-L5N5UQBP.js.map +1 -0
- package/dist/{chunk-AAE765MK.js → chunk-MSUGYK6A.js} +3 -3
- package/dist/{chunk-34RIECIF.cjs → chunk-RHMIEEAZ.cjs} +2 -2
- package/dist/{chunk-34RIECIF.cjs.map → chunk-RHMIEEAZ.cjs.map} +1 -1
- package/dist/{chunk-XXUXQHUC.js → chunk-TRUR4RUJ.js} +2 -2
- package/dist/{chunk-FJE3TMZ7.js → chunk-UAAYIEIK.js} +2 -2
- package/dist/{chunk-LLVF6X5W.cjs → chunk-UOXOYZU4.cjs} +3 -3
- package/dist/{chunk-LLVF6X5W.cjs.map → chunk-UOXOYZU4.cjs.map} +1 -1
- package/dist/{chunk-LNU54ZKV.cjs → chunk-W5NXOMCD.cjs} +15 -9
- package/dist/chunk-W5NXOMCD.cjs.map +1 -0
- package/dist/{chunk-QHN7N2QA.js → chunk-X6ME7YYS.js} +2 -2
- package/dist/{chunk-UCTD3BXH.js → chunk-XFZMRCGJ.js} +2 -2
- package/dist/{chunk-DH75ZUYF.js → chunk-YLST4S4P.js} +10 -4
- package/dist/chunk-YLST4S4P.js.map +1 -0
- package/dist/{chunk-5B55S4JU.js → chunk-Z2WI3E4N.js} +2 -2
- package/dist/{chunk-HFMIAMEO.js → chunk-ZTGTFO52.js} +4 -4
- package/dist/chunks-T67OQGPJ.js +10 -0
- package/dist/cli.js +26 -26
- package/dist/{formula-I4MAHCTZ.js → formula-G4YA7SNQ.js} +3 -3
- package/dist/{formula-L2BKGA4J.cjs → formula-J3UUIPCX.cjs} +9 -9
- package/dist/{formula-L2BKGA4J.cjs.map → formula-J3UUIPCX.cjs.map} +1 -1
- package/dist/{formula-DUEAYGIG.js → formula-QSZRYZ44.js} +4 -4
- package/dist/{image-ocr-ZWRJZKYR.cjs → image-ocr-467KLV3F.cjs} +15 -15
- package/dist/{image-ocr-ZWRJZKYR.cjs.map → image-ocr-467KLV3F.cjs.map} +1 -1
- package/dist/{image-ocr-B32G24XW.js → image-ocr-I52GBXRE.js} +6 -6
- package/dist/{image-ocr-NUL3JKXM.js → image-ocr-ZP3F4MUY.js} +9 -9
- package/dist/index.cjs +278 -278
- package/dist/index.js +5 -5
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-OBIKG4K5.js → model-bundle-FEUM7XXS.js} +5 -5
- package/dist/{models-2OZHOPPM.js → models-6QCNX5YR.js} +5 -5
- package/dist/{parser-FDE6GQST.js → parser-6EIBURDE.js} +176 -12
- package/dist/parser-6EIBURDE.js.map +1 -0
- package/dist/{parser-DMWCXX7A.cjs → parser-BIJBX2D5.cjs} +392 -228
- package/dist/parser-BIJBX2D5.cjs.map +1 -0
- package/dist/{parser-YW3NMSJE.js → parser-YX4LGKIK.js} +173 -9
- package/dist/parser-YX4LGKIK.js.map +1 -0
- package/dist/pdf-ocr-DXQIMO77.cjs +17 -0
- package/dist/{pdf-ocr-K2OK7FNQ.cjs.map → pdf-ocr-DXQIMO77.cjs.map} +1 -1
- package/dist/pdf-ocr-MESGGING.js +20 -0
- package/dist/pdf-ocr-YSRBRIPR.js +16 -0
- package/dist/{profile-io-6WCU4KHY.js → profile-io-ATHFEUAP.js} +3 -3
- package/dist/{rasterize-X3I7SWXF.js → rasterize-SG3CLXMQ.js} +3 -3
- package/dist/{redact-doc-6H7WPUQD.js → redact-doc-K3S4HFHU.js} +11 -11
- package/dist/{render-PBQJGZT3.js → render-6CQJM7VE.js} +7 -7
- package/dist/seal-SMO4544N.js +10 -0
- package/dist/{setup-UORJSR3M.js → setup-CZ5KHGPI.js} +3 -3
- package/dist/visual-UWYGQLOU.js +20 -0
- package/dist/{watch-S2ZMDDZU.js → watch-RQRIGLFF.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-DH75ZUYF.js.map +0 -1
- package/dist/chunk-L5KNWOGR.js.map +0 -1
- package/dist/chunk-LNU54ZKV.cjs.map +0 -1
- package/dist/chunks-JPNLQOVD.js +0 -10
- package/dist/parser-DMWCXX7A.cjs.map +0 -1
- package/dist/parser-FDE6GQST.js.map +0 -1
- package/dist/parser-YW3NMSJE.js.map +0 -1
- package/dist/pdf-ocr-7MR56U4P.js +0 -16
- package/dist/pdf-ocr-K2OK7FNQ.cjs +0 -17
- package/dist/pdf-ocr-YHC4X67W.js +0 -20
- package/dist/seal-E2E7CFZJ.js +0 -10
- package/dist/visual-4GDT5BRH.js +0 -20
- /package/dist/{-I3DEUQUC.js.map → -LYUUVVQF.js.map} +0 -0
- /package/dist/{chunk-AMDDV4CI.js.map → chunk-4WTJS6ES.js.map} +0 -0
- /package/dist/{chunk-DGXGVC4Z.js.map → chunk-5AZQEMMG.js.map} +0 -0
- /package/dist/{chunk-C4JHZNRL.js.map → chunk-6KOQPPLX.js.map} +0 -0
- /package/dist/{chunk-UTVNSCEI.js.map → chunk-7L5GY54Q.js.map} +0 -0
- /package/dist/{chunk-XIWGPC3V.js.map → chunk-7XRI4FL4.js.map} +0 -0
- /package/dist/{chunk-DEYCTP2S.js.map → chunk-ADBES5QJ.js.map} +0 -0
- /package/dist/{chunk-VZSOPECZ.js.map → chunk-BDTWXJNM.js.map} +0 -0
- /package/dist/{chunk-RYKNAYKC.js.map → chunk-CL3CJ7X5.js.map} +0 -0
- /package/dist/{chunk-W5XX2GKO.js.map → chunk-DQHDI567.js.map} +0 -0
- /package/dist/{chunk-GCYLNOTJ.js.map → chunk-FEGRQA3Q.js.map} +0 -0
- /package/dist/{chunk-OMJWAJBD.js.map → chunk-JA5B4NPF.js.map} +0 -0
- /package/dist/{chunk-GYQVQF2J.js.map → chunk-JNIJPP4B.js.map} +0 -0
- /package/dist/{chunk-CR4RXHXO.js.map → chunk-KYFP5LDC.js.map} +0 -0
- /package/dist/{chunk-AAE765MK.js.map → chunk-MSUGYK6A.js.map} +0 -0
- /package/dist/{chunk-XXUXQHUC.js.map → chunk-TRUR4RUJ.js.map} +0 -0
- /package/dist/{chunk-FJE3TMZ7.js.map → chunk-UAAYIEIK.js.map} +0 -0
- /package/dist/{chunk-QHN7N2QA.js.map → chunk-X6ME7YYS.js.map} +0 -0
- /package/dist/{chunk-UCTD3BXH.js.map → chunk-XFZMRCGJ.js.map} +0 -0
- /package/dist/{chunk-5B55S4JU.js.map → chunk-Z2WI3E4N.js.map} +0 -0
- /package/dist/{chunk-HFMIAMEO.js.map → chunk-ZTGTFO52.js.map} +0 -0
- /package/dist/{chunks-JPNLQOVD.js.map → chunks-T67OQGPJ.js.map} +0 -0
- /package/dist/{formula-I4MAHCTZ.js.map → formula-G4YA7SNQ.js.map} +0 -0
- /package/dist/{formula-DUEAYGIG.js.map → formula-QSZRYZ44.js.map} +0 -0
- /package/dist/{image-ocr-B32G24XW.js.map → image-ocr-I52GBXRE.js.map} +0 -0
- /package/dist/{image-ocr-NUL3JKXM.js.map → image-ocr-ZP3F4MUY.js.map} +0 -0
- /package/dist/{model-bundle-OBIKG4K5.js.map → model-bundle-FEUM7XXS.js.map} +0 -0
- /package/dist/{models-2OZHOPPM.js.map → models-6QCNX5YR.js.map} +0 -0
- /package/dist/{pdf-ocr-7MR56U4P.js.map → pdf-ocr-MESGGING.js.map} +0 -0
- /package/dist/{pdf-ocr-YHC4X67W.js.map → pdf-ocr-YSRBRIPR.js.map} +0 -0
- /package/dist/{profile-io-6WCU4KHY.js.map → profile-io-ATHFEUAP.js.map} +0 -0
- /package/dist/{rasterize-X3I7SWXF.js.map → rasterize-SG3CLXMQ.js.map} +0 -0
- /package/dist/{redact-doc-6H7WPUQD.js.map → redact-doc-K3S4HFHU.js.map} +0 -0
- /package/dist/{render-PBQJGZT3.js.map → render-6CQJM7VE.js.map} +0 -0
- /package/dist/{seal-E2E7CFZJ.js.map → seal-SMO4544N.js.map} +0 -0
- /package/dist/{setup-UORJSR3M.js.map → setup-CZ5KHGPI.js.map} +0 -0
- /package/dist/{visual-4GDT5BRH.js.map → visual-UWYGQLOU.js.map} +0 -0
- /package/dist/{watch-S2ZMDDZU.js.map → watch-RQRIGLFF.js.map} +0 -0
package/README.md
CHANGED
|
@@ -111,10 +111,11 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
111
111
|
|
|
112
112
|
## 최근 업데이트
|
|
113
113
|
|
|
114
|
-
최신 배포: **[4.19.
|
|
114
|
+
최신 배포: **[4.19.1](https://github.com/chrisryugj/kordoc/releases/tag/v4.19.1)** · 2026-10-07
|
|
115
115
|
|
|
116
116
|
| 버전 | 주요 변경 |
|
|
117
117
|
| --- | --- |
|
|
118
|
+
| 4.19.1 | PDF 쪽별 마크다운(`pages`)에서 쪽 넘김 표를 쪽마다 다시 갈라 뒤 쪽 행·상자가 앞 쪽에 붙거나 쪽 항목이 빠지지 않게 (#136) |
|
|
118
119
|
| 4.19.0 | RAG 색인용 `tableFormat: "gfm"` — 병합·중첩 표도 HTML 없이 GFM 파이프 표로, 셀 안 표는 부모·자식 관계 표지와 함께 독립 표로 (#138) |
|
|
119
120
|
| 4.18.12–13 | PDF 쪽 넘김 문단 잇기 판정을 HWPX·DOCX 원문 대조로 재조정 — 문장 끝·들여쓰기·나열 기호·탭 행 근거 (HWPX 쌍 오판 50 → 5) |
|
|
120
121
|
| 4.18.11 | 글꼴 사전 수천 개가 글꼴 파일을 나눠 쓰는 PDF의 메모리 폭주(힙 7GB+ 종료) 수정 (#137) |
|
|
@@ -51,17 +51,17 @@ import {
|
|
|
51
51
|
unknownFontWarnings,
|
|
52
52
|
usesGaejosikMunche,
|
|
53
53
|
validateHwpx
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-6KOQPPLX.js";
|
|
55
55
|
import {
|
|
56
56
|
blocksToPages
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-X6ME7YYS.js";
|
|
58
58
|
import {
|
|
59
59
|
applySplices,
|
|
60
60
|
buildParagraphSplices,
|
|
61
61
|
buildRangeSplices,
|
|
62
62
|
placeSealHwpx,
|
|
63
63
|
scanSectionXml
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-MSUGYK6A.js";
|
|
65
65
|
import {
|
|
66
66
|
DEFAULT_REDACT_RULES,
|
|
67
67
|
redactMarkdown,
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
} from "./chunk-3WSNLH4B.js";
|
|
70
70
|
import {
|
|
71
71
|
blocksToChunks
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-JNIJPP4B.js";
|
|
73
73
|
import {
|
|
74
74
|
SPACE_EM_FIXED,
|
|
75
75
|
SPACE_EM_FONT,
|
|
@@ -94,20 +94,20 @@ import {
|
|
|
94
94
|
renderSceneToHtml,
|
|
95
95
|
simulateWrap,
|
|
96
96
|
simulateWrapKeepWord
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-5AZQEMMG.js";
|
|
98
98
|
import "./chunk-7FCNOKOR.js";
|
|
99
|
-
import "./chunk-
|
|
99
|
+
import "./chunk-L5N5UQBP.js";
|
|
100
100
|
import "./chunk-VQFA55IC.js";
|
|
101
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-UAAYIEIK.js";
|
|
102
102
|
import {
|
|
103
103
|
blocksToMarkdown,
|
|
104
104
|
flattenLayoutTables,
|
|
105
105
|
hasStructuredCellContent
|
|
106
|
-
} from "./chunk-
|
|
107
|
-
import "./chunk-
|
|
106
|
+
} from "./chunk-TRUR4RUJ.js";
|
|
107
|
+
import "./chunk-JA5B4NPF.js";
|
|
108
108
|
import {
|
|
109
109
|
VERSION
|
|
110
|
-
} from "./chunk-
|
|
110
|
+
} from "./chunk-7L5GY54Q.js";
|
|
111
111
|
export {
|
|
112
112
|
BUILTIN_TEMPLATES,
|
|
113
113
|
DEFAULT_REDACT_RULES,
|
|
@@ -198,4 +198,4 @@ export {
|
|
|
198
198
|
usesGaejosikMunche,
|
|
199
199
|
validateHwpx
|
|
200
200
|
};
|
|
201
|
-
//# sourceMappingURL=-
|
|
201
|
+
//# sourceMappingURL=-LYUUVVQF.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
KordocError
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7L5GY54Q.js";
|
|
5
5
|
|
|
6
6
|
// src/shared/offline.ts
|
|
7
7
|
import { realpathSync } from "fs";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
getAccessRoot,
|
|
50
50
|
assertWithinRoot
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=chunk-
|
|
52
|
+
//# sourceMappingURL=chunk-4WTJS6ES.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
HEADING_RATIO_H3,
|
|
10
10
|
tidyScriptTags,
|
|
11
11
|
unframeLayoutTables
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-L5N5UQBP.js";
|
|
13
13
|
import {
|
|
14
14
|
parsePageRange
|
|
15
15
|
} from "./chunk-VQFA55IC.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
findChildByLocalName,
|
|
23
23
|
hwpFaceToCssStack,
|
|
24
24
|
parseRenderStyles
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-UAAYIEIK.js";
|
|
26
26
|
import {
|
|
27
27
|
MAX_COLS,
|
|
28
28
|
MAX_ROWS,
|
|
@@ -33,18 +33,18 @@ import {
|
|
|
33
33
|
flattenLayoutTables,
|
|
34
34
|
mapPuaText,
|
|
35
35
|
markNonLayoutTable
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-TRUR4RUJ.js";
|
|
37
37
|
import {
|
|
38
38
|
loadSharp,
|
|
39
39
|
rasterizePageSvg
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-JA5B4NPF.js";
|
|
41
41
|
import {
|
|
42
42
|
KordocError,
|
|
43
43
|
escapeHtml,
|
|
44
44
|
precheckZipSize,
|
|
45
45
|
sanitizeHref,
|
|
46
46
|
toArrayBuffer
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-7L5GY54Q.js";
|
|
48
48
|
|
|
49
49
|
// src/render/svg-render.ts
|
|
50
50
|
import JSZip from "jszip";
|
|
@@ -7770,4 +7770,4 @@ export {
|
|
|
7770
7770
|
cropRect,
|
|
7771
7771
|
extractRenderedRegions
|
|
7772
7772
|
};
|
|
7773
|
-
//# sourceMappingURL=chunk-
|
|
7773
|
+
//# sourceMappingURL=chunk-5AZQEMMG.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
blocksToPages
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X6ME7YYS.js";
|
|
5
5
|
import {
|
|
6
6
|
allLinesegRemovalSplices,
|
|
7
7
|
applySplices,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
paraTextPureT,
|
|
16
16
|
patchZipEntries,
|
|
17
17
|
scanSectionXml
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MSUGYK6A.js";
|
|
19
19
|
import {
|
|
20
20
|
CONVERT_MAP,
|
|
21
21
|
FLAG_COMPRESSED,
|
|
@@ -65,7 +65,7 @@ import {
|
|
|
65
65
|
romanNumeral,
|
|
66
66
|
simulateWrap,
|
|
67
67
|
takeTocLeaders
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-5AZQEMMG.js";
|
|
69
69
|
import {
|
|
70
70
|
CELL_EDGES,
|
|
71
71
|
HEADING_RATIO_H1,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
tidyScriptTags,
|
|
78
78
|
unframeLayoutTables,
|
|
79
79
|
wrapScript
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-L5N5UQBP.js";
|
|
81
81
|
import {
|
|
82
82
|
parsePageRange
|
|
83
83
|
} from "./chunk-VQFA55IC.js";
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
findChildByLocalName,
|
|
97
97
|
localName,
|
|
98
98
|
rawTextContent
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-UAAYIEIK.js";
|
|
100
100
|
import {
|
|
101
101
|
MAX_COLS,
|
|
102
102
|
MAX_ROWS,
|
|
@@ -111,7 +111,7 @@ import {
|
|
|
111
111
|
hasStructuredCellContent,
|
|
112
112
|
mapPuaText,
|
|
113
113
|
noteSuffix
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-TRUR4RUJ.js";
|
|
115
115
|
import {
|
|
116
116
|
KordocError,
|
|
117
117
|
classifyError,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
toArrayBuffer,
|
|
128
128
|
unescapeHtml,
|
|
129
129
|
unzipLimitBytes
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-7L5GY54Q.js";
|
|
131
131
|
|
|
132
132
|
// src/table/visual.ts
|
|
133
133
|
import { readFile as readFile2 } from "fs/promises";
|
|
@@ -30160,7 +30160,7 @@ function scriptsOff(r, off) {
|
|
|
30160
30160
|
}
|
|
30161
30161
|
async function parseImage(buffer, options) {
|
|
30162
30162
|
try {
|
|
30163
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
30163
|
+
const { parseImageDocument } = await import("./image-ocr-ZP3F4MUY.js");
|
|
30164
30164
|
const { blocks, warnings } = await parseImageDocument(buffer, options);
|
|
30165
30165
|
stripScriptTags({ blocks });
|
|
30166
30166
|
return {
|
|
@@ -30220,7 +30220,7 @@ async function parseHwp(buffer, options) {
|
|
|
30220
30220
|
async function parsePdf(buffer, options) {
|
|
30221
30221
|
let parsePdfDocument;
|
|
30222
30222
|
try {
|
|
30223
|
-
const mod = await import("./parser-
|
|
30223
|
+
const mod = await import("./parser-6EIBURDE.js");
|
|
30224
30224
|
parsePdfDocument = mod.parsePdfDocument;
|
|
30225
30225
|
} catch {
|
|
30226
30226
|
return {
|
|
@@ -30443,4 +30443,4 @@ export {
|
|
|
30443
30443
|
parseHwpml,
|
|
30444
30444
|
fillForm
|
|
30445
30445
|
};
|
|
30446
|
-
//# sourceMappingURL=chunk-
|
|
30446
|
+
//# sourceMappingURL=chunk-6KOQPPLX.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/utils.ts
|
|
4
4
|
import { format } from "util";
|
|
5
|
-
var VERSION = true ? "4.19.
|
|
5
|
+
var VERSION = true ? "4.19.1" : "0.0.0-dev";
|
|
6
6
|
function toArrayBuffer(buf) {
|
|
7
7
|
if (buf.byteOffset === 0 && buf.byteLength === buf.buffer.byteLength) {
|
|
8
8
|
return buf.buffer;
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
classifyError,
|
|
171
171
|
partExtension
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-7L5GY54Q.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
KordocError
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z2WI3E4N.js";
|
|
4
4
|
|
|
5
5
|
// src/pdf/formula/models.ts
|
|
6
6
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -308,4 +308,4 @@ export {
|
|
|
308
308
|
ensureFormulaModels,
|
|
309
309
|
ensureSingleModel
|
|
310
310
|
};
|
|
311
|
-
//# sourceMappingURL=chunk-
|
|
311
|
+
//# sourceMappingURL=chunk-7XRI4FL4.js.map
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
extractPageBlocksWithLines,
|
|
10
10
|
getOcrModelsDir,
|
|
11
11
|
parseCharacterDict
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-FEGRQA3Q.js";
|
|
13
13
|
import {
|
|
14
14
|
OPTIONAL_DEP_INSTALL_HINT
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z2WI3E4N.js";
|
|
16
16
|
|
|
17
17
|
// src/ocr/ruling-lines.ts
|
|
18
18
|
var INK_LUMA_MAX = 205;
|
|
@@ -2062,4 +2062,4 @@ export {
|
|
|
2062
2062
|
runPdfOcr,
|
|
2063
2063
|
ocrItemsToBlocks
|
|
2064
2064
|
};
|
|
2065
|
-
//# sourceMappingURL=chunk-
|
|
2065
|
+
//# sourceMappingURL=chunk-ADBES5QJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
assertNetworkAllowed
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4WTJS6ES.js";
|
|
5
5
|
|
|
6
6
|
// src/pdf/formula/models.ts
|
|
7
7
|
import { createHash as createHash2 } from "crypto";
|
|
@@ -294,4 +294,4 @@ export {
|
|
|
294
294
|
ensureFormulaModels,
|
|
295
295
|
ensureSingleModel
|
|
296
296
|
};
|
|
297
|
-
//# sourceMappingURL=chunk-
|
|
297
|
+
//# sourceMappingURL=chunk-BDTWXJNM.js.map
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
HEADING_RATIO_H2,
|
|
6
6
|
HEADING_RATIO_H3,
|
|
7
7
|
tidyScriptTags
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L5N5UQBP.js";
|
|
9
9
|
import {
|
|
10
10
|
safeMax,
|
|
11
11
|
safeMin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-7L5GY54Q.js";
|
|
13
13
|
|
|
14
14
|
// src/pdf/line-extract.ts
|
|
15
15
|
import { OPS } from "pdfjs-dist/legacy/build/pdf.mjs";
|
|
@@ -8298,4 +8298,4 @@ export {
|
|
|
8298
8298
|
removeSideTabs,
|
|
8299
8299
|
extractPageBlocksWithLines
|
|
8300
8300
|
};
|
|
8301
|
-
//# sourceMappingURL=chunk-
|
|
8301
|
+
//# sourceMappingURL=chunk-CL3CJ7X5.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToMarkdown
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YLST4S4P.js";
|
|
4
4
|
|
|
5
5
|
// src/page-markdown.ts
|
|
6
6
|
function blocksToPages(blocks, render = blocksToMarkdown) {
|
|
@@ -167,4 +167,4 @@ export {
|
|
|
167
167
|
inlineImagesIntoMarkdown,
|
|
168
168
|
blocksToPages
|
|
169
169
|
};
|
|
170
|
-
//# sourceMappingURL=chunk-
|
|
170
|
+
//# sourceMappingURL=chunk-DQHDI567.js.map
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
HEADING_RATIO_H2,
|
|
5
5
|
HEADING_RATIO_H3,
|
|
6
6
|
tidyScriptTags
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YLST4S4P.js";
|
|
8
8
|
import {
|
|
9
9
|
ensureModelsIn,
|
|
10
10
|
getModelsDir
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7XRI4FL4.js";
|
|
12
12
|
import {
|
|
13
13
|
safeMax,
|
|
14
14
|
safeMin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-Z2WI3E4N.js";
|
|
16
16
|
|
|
17
17
|
// src/ocr/models.ts
|
|
18
18
|
import { join } from "path";
|
|
@@ -8378,4 +8378,4 @@ export {
|
|
|
8378
8378
|
removeSideTabs,
|
|
8379
8379
|
extractPageBlocksWithLines
|
|
8380
8380
|
};
|
|
8381
|
-
//# sourceMappingURL=chunk-
|
|
8381
|
+
//# sourceMappingURL=chunk-FEGRQA3Q.js.map
|
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkW5NXOMCDcjs = require('./chunk-W5NXOMCD.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkHMJXB7ZEcjs = require('./chunk-HMJXB7ZE.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkRHMIEEAZcjs = require('./chunk-RHMIEEAZ.cjs');
|
|
16
16
|
|
|
17
17
|
// src/ocr/models.ts
|
|
18
18
|
var _path = require('path');
|
|
@@ -40,10 +40,10 @@ var OCR_REC_DICT = {
|
|
|
40
40
|
};
|
|
41
41
|
var ALL_OCR_MODELS = [OCR_DET_MODEL, OCR_REC_MODEL, OCR_REC_DICT];
|
|
42
42
|
function getOcrModelsDir() {
|
|
43
|
-
return
|
|
43
|
+
return _chunkHMJXB7ZEcjs.getModelsDir.call(void 0, "ppocr");
|
|
44
44
|
}
|
|
45
45
|
async function ensureOcrModels(onProgress) {
|
|
46
|
-
return
|
|
46
|
+
return _chunkHMJXB7ZEcjs.ensureModelsIn.call(void 0, getOcrModelsDir(), ALL_OCR_MODELS, onProgress);
|
|
47
47
|
}
|
|
48
48
|
async function ocrModelsCached() {
|
|
49
49
|
const dir = getOcrModelsDir();
|
|
@@ -2091,7 +2091,7 @@ function tagScripts(text, lines) {
|
|
|
2091
2091
|
const [s, e, kind] = marks[m];
|
|
2092
2092
|
out = out.slice(0, s) + `<${kind}>` + out.slice(s, e) + `</${kind}>` + out.slice(e);
|
|
2093
2093
|
}
|
|
2094
|
-
return
|
|
2094
|
+
return _chunkW5NXOMCDcjs.tidyScriptTags.call(void 0, out);
|
|
2095
2095
|
}
|
|
2096
2096
|
|
|
2097
2097
|
// src/pdf/line-wrap.ts
|
|
@@ -3689,9 +3689,9 @@ function detectHeadings(blocks, medianFontSize) {
|
|
|
3689
3689
|
if (/^\d+$/.test(text) && !isChapterNumber(block, blocks[bi + 1], medianFontSize)) continue;
|
|
3690
3690
|
const ratio = block.style.fontSize / medianFontSize;
|
|
3691
3691
|
let level = 0;
|
|
3692
|
-
if (ratio >=
|
|
3693
|
-
else if (ratio >=
|
|
3694
|
-
else if (ratio >=
|
|
3692
|
+
if (ratio >= _chunkW5NXOMCDcjs.HEADING_RATIO_H1) level = 1;
|
|
3693
|
+
else if (ratio >= _chunkW5NXOMCDcjs.HEADING_RATIO_H2) level = 2;
|
|
3694
|
+
else if (ratio >= _chunkW5NXOMCDcjs.HEADING_RATIO_H3) level = 3;
|
|
3695
3695
|
if (level > 0) {
|
|
3696
3696
|
block.type = "heading";
|
|
3697
3697
|
block.level = level;
|
|
@@ -3704,7 +3704,7 @@ function isChapterNumber(block, next, medianFontSize) {
|
|
|
3704
3704
|
const nextSize = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _98 => _98.style, 'optionalAccess', _99 => _99.fontSize]), () => ( 0));
|
|
3705
3705
|
const text = _nullishCoalesce(_optionalChain([next, 'optionalAccess', _100 => _100.text, 'optionalAccess', _101 => _101.trim, 'call', _102 => _102()]), () => ( ""));
|
|
3706
3706
|
const a = block.bbox, b = _optionalChain([next, 'optionalAccess', _103 => _103.bbox]);
|
|
3707
|
-
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _104 => _104.text, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize *
|
|
3707
|
+
return /^\d{1,2}$/.test(_nullishCoalesce(_optionalChain([block, 'access', _104 => _104.text, 'optionalAccess', _105 => _105.trim, 'call', _106 => _106()]), () => ( ""))) && size >= medianFontSize * 2.5 && !!next && (next.type === "paragraph" || next.type === "heading") && next.pageNumber === block.pageNumber && nextSize >= medianFontSize * _chunkW5NXOMCDcjs.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;
|
|
3708
3708
|
}
|
|
3709
3709
|
function mergeStackedHeadingLines(blocks, medianFontSize) {
|
|
3710
3710
|
for (let i = 0; i < blocks.length - 1; ) {
|
|
@@ -6016,16 +6016,16 @@ function isProseSpread(items) {
|
|
|
6016
6016
|
for (let i = 1; i < sorted.length; i++) {
|
|
6017
6017
|
gaps.push(sorted[i].x - (sorted[i - 1].x + sorted[i - 1].w));
|
|
6018
6018
|
}
|
|
6019
|
-
const maxGap =
|
|
6019
|
+
const maxGap = _chunkRHMIEEAZcjs.safeMax.call(void 0, gaps);
|
|
6020
6020
|
const avgLen = items.reduce((s, i) => s + i.text.length, 0) / items.length;
|
|
6021
6021
|
if (items.length >= 4 && maxGap < 40 && avgLen < 5) return true;
|
|
6022
|
-
const minGap =
|
|
6022
|
+
const minGap = _chunkRHMIEEAZcjs.safeMin.call(void 0, gaps);
|
|
6023
6023
|
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;
|
|
6024
6024
|
}
|
|
6025
6025
|
function detectColumns(yLines) {
|
|
6026
6026
|
const allItems = yLines.flat();
|
|
6027
6027
|
if (allItems.length === 0) return null;
|
|
6028
|
-
const pageWidth =
|
|
6028
|
+
const pageWidth = _chunkRHMIEEAZcjs.safeMax.call(void 0, allItems.map((i) => i.x + i.w)) - _chunkRHMIEEAZcjs.safeMin.call(void 0, allItems.map((i) => i.x));
|
|
6029
6029
|
if (pageWidth < 100) return null;
|
|
6030
6030
|
let bigoLineIdx = -1;
|
|
6031
6031
|
for (let i = 0; i < yLines.length; i++) {
|
|
@@ -6495,12 +6495,12 @@ function recordClipCellEdges(grids, horizontals, verticals, nonRules) {
|
|
|
6495
6495
|
}
|
|
6496
6496
|
function takeClipCellEdges(from, to) {
|
|
6497
6497
|
const e = CLIP_CELL_EDGES.get(from);
|
|
6498
|
-
if (e)
|
|
6498
|
+
if (e) _chunkW5NXOMCDcjs.CELL_EDGES.set(to, e);
|
|
6499
6499
|
}
|
|
6500
6500
|
function joinCellEdges(a, b) {
|
|
6501
|
-
const u =
|
|
6501
|
+
const u = _chunkW5NXOMCDcjs.CELL_EDGES.get(a), d = _chunkW5NXOMCDcjs.CELL_EDGES.get(b);
|
|
6502
6502
|
if (!u || !d) return;
|
|
6503
|
-
|
|
6503
|
+
_chunkW5NXOMCDcjs.CELL_EDGES.set(a, { t: u.t, b: d.b, l: u.l || d.l, r: u.r || d.r });
|
|
6504
6504
|
}
|
|
6505
6505
|
|
|
6506
6506
|
// src/pdf/table-unit-row.ts
|
|
@@ -6516,7 +6516,7 @@ function rebuildUnitLine(items, grid) {
|
|
|
6516
6516
|
function prependUnitRow(cells, cols, line, usedItems) {
|
|
6517
6517
|
const text = cleanCellText(line.map((item) => item.text).join(""));
|
|
6518
6518
|
cells.unshift(Array.from({ length: cols }, (_, c) => ({ text: c === 0 ? text : "", colSpan: c === 0 ? cols : 1, rowSpan: 1 })));
|
|
6519
|
-
for (const cell of cells[0])
|
|
6519
|
+
for (const cell of cells[0]) _chunkW5NXOMCDcjs.CELL_EDGES.set(cell, NO_EDGES);
|
|
6520
6520
|
for (const item of line) usedItems.add(item);
|
|
6521
6521
|
}
|
|
6522
6522
|
function attachUnitRow(items, grid, cells, cols, usedItems) {
|
|
@@ -7046,7 +7046,7 @@ function recordFrameTitle(table, source, pageNum) {
|
|
|
7046
7046
|
const [label, spacer, title] = cells;
|
|
7047
7047
|
if (!/^(?:붙임|별첨|첨부|부록)\s*\d{1,3}$/.test(label.text.trim()) || spacer.text.trim() || !title.text.trim()) return;
|
|
7048
7048
|
if (cells.some((c) => {
|
|
7049
|
-
const e =
|
|
7049
|
+
const e = _chunkW5NXOMCDcjs.CELL_EDGES.get(c);
|
|
7050
7050
|
return !e || e.t || e.b || e.l || e.r;
|
|
7051
7051
|
})) return;
|
|
7052
7052
|
const xs = TABLE_COLXS.get(table), style = dominantStyle(source), fs = _nullishCoalesce(_optionalChain([style, 'optionalAccess', _326 => _326.fontSize]), () => ( 0));
|
|
@@ -7958,7 +7958,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7958
7958
|
groupSizes.push(1);
|
|
7959
7959
|
}
|
|
7960
7960
|
const allY = remaining.map((i) => i.y);
|
|
7961
|
-
const pageH =
|
|
7961
|
+
const pageH = _chunkRHMIEEAZcjs.safeMax.call(void 0, allY) - _chunkRHMIEEAZcjs.safeMin.call(void 0, allY);
|
|
7962
7962
|
const gapThreshold = Math.max(15, pageH * 0.03);
|
|
7963
7963
|
const sides = frameColumnTextBands(remaining, spanning, gx);
|
|
7964
7964
|
const textBlocks = [];
|
|
@@ -7974,7 +7974,7 @@ function extractBlocksWithGrids(items, pageNum, pageWidth, pageHeight, grids, ho
|
|
|
7974
7974
|
finalTextBlocks.push(...detectListBlocks(textBlocks));
|
|
7975
7975
|
} else {
|
|
7976
7976
|
const allY = remaining.map((i) => i.y);
|
|
7977
|
-
const pageH =
|
|
7977
|
+
const pageH = _chunkRHMIEEAZcjs.safeMax.call(void 0, allY) - _chunkRHMIEEAZcjs.safeMin.call(void 0, allY);
|
|
7978
7978
|
const groups = xyCutOrder(remaining, Math.max(15, pageH * 0.03));
|
|
7979
7979
|
const textBlocks = [];
|
|
7980
7980
|
for (const group of groups) {
|
|
@@ -8299,7 +8299,7 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
|
|
|
8299
8299
|
blocks.push(...columnTextToBlocks(tableText, pageNum, bbox, dominantStyle(items)));
|
|
8300
8300
|
} else {
|
|
8301
8301
|
const allY = items.map((i) => i.y);
|
|
8302
|
-
const pageHeight =
|
|
8302
|
+
const pageHeight = _chunkRHMIEEAZcjs.safeMax.call(void 0, allY) - _chunkRHMIEEAZcjs.safeMin.call(void 0, allY);
|
|
8303
8303
|
const gapThreshold = Math.max(15, pageHeight * 0.03);
|
|
8304
8304
|
const orderedGroups = proseCutX !== null ? splitTwoColumnProse(items, proseCutX) : xyCutOrder(items, gapThreshold);
|
|
8305
8305
|
for (const group of orderedGroups) {
|
|
@@ -8378,4 +8378,4 @@ function extractPageBlocksFallback(items, pageNum, fullPage = false, detectTable
|
|
|
8378
8378
|
|
|
8379
8379
|
|
|
8380
8380
|
exports.OCR_DET_MODEL = OCR_DET_MODEL; exports.OCR_REC_MODEL = OCR_REC_MODEL; exports.OCR_REC_DICT = OCR_REC_DICT; exports.getOcrModelsDir = getOcrModelsDir; exports.ensureOcrModels = ensureOcrModels; exports.ocrModelsCached = ocrModelsCached; exports.parseCharacterDict = parseCharacterDict; exports.extractLines = extractLines; exports.extractImageRegions = extractImageRegions; 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.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.NO_EDGES = NO_EDGES; exports.joinCellEdges = joinCellEdges; exports.FRAME_READING_UNITS = FRAME_READING_UNITS; exports.recordFrameReadingUnit = recordFrameReadingUnit; exports.restoreImageBullets = restoreImageBullets; exports.detectRightArrowRegions = detectRightArrowRegions; exports.removeSideTabs = removeSideTabs; exports.extractPageBlocksWithLines = extractPageBlocksWithLines;
|
|
8381
|
-
//# sourceMappingURL=chunk-
|
|
8381
|
+
//# sourceMappingURL=chunk-FNX3ZAYB.cjs.map
|