kordoc 4.21.19 → 4.21.21
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 +7 -5
- package/dist/{-FLYHAUQ6.js → -ZYF6HX4M.js} +11 -11
- package/dist/{chunk-TC6DQLYN.js → chunk-2ZGP7A5T.js} +2 -2
- package/dist/{chunk-4VM6BT4W.js → chunk-3TCF5HPP.js} +2 -2
- package/dist/{chunk-2DNJW2HO.cjs → chunk-57VNFMMS.cjs} +3 -3
- package/dist/{chunk-2DNJW2HO.cjs.map → chunk-57VNFMMS.cjs.map} +1 -1
- package/dist/{chunk-OON4IJU2.js → chunk-5HTFWUJE.js} +2 -2
- package/dist/{chunk-AQ5GIBBH.js → chunk-7YAJCXCD.js} +2 -2
- package/dist/{chunk-3O4YC67B.js → chunk-BC54LBST.js} +3 -3
- package/dist/{chunk-GK4QLKNT.js → chunk-BG6LUCQL.js} +2 -2
- package/dist/{chunk-SM42XSI3.js → chunk-CY4QM2KQ.js} +2 -2
- package/dist/{chunk-KLKV47XO.cjs → chunk-DTZIZ5PP.cjs} +13 -13
- package/dist/{chunk-KLKV47XO.cjs.map → chunk-DTZIZ5PP.cjs.map} +1 -1
- package/dist/{chunk-INZGI6PI.js → chunk-FBJVDBMO.js} +2 -2
- package/dist/{chunk-Z2OOYQ4I.js → chunk-FZMGF6XU.js} +2 -2
- package/dist/{chunk-JGGYLUGD.cjs → chunk-H2MS4VG3.cjs} +3 -3
- package/dist/{chunk-JGGYLUGD.cjs.map → chunk-H2MS4VG3.cjs.map} +1 -1
- package/dist/{chunk-3PCAJWGK.js → chunk-HWIW3WK2.js} +42 -3
- package/dist/{chunk-3PCAJWGK.js.map → chunk-HWIW3WK2.js.map} +1 -1
- package/dist/{chunk-F6N7CDB7.js → chunk-J5PBI3ZC.js} +3 -3
- package/dist/{chunk-DQ2YGTRS.js → chunk-KBV4WFZ6.js} +145 -123
- package/dist/chunk-KBV4WFZ6.js.map +1 -0
- package/dist/{chunk-YDIVY65W.js → chunk-KTLHADU4.js} +2 -2
- package/dist/{chunk-3KW2Q655.cjs → chunk-MCUX2Y2C.cjs} +2 -2
- package/dist/{chunk-3KW2Q655.cjs.map → chunk-MCUX2Y2C.cjs.map} +1 -1
- package/dist/{chunk-X6WXU4LA.js → chunk-PTF4NCFM.js} +2 -2
- package/dist/{chunk-46PYORID.js → chunk-QHNVH4TC.js} +6 -6
- package/dist/{chunk-RYRUQ73F.js → chunk-RBRHO7WL.js} +2 -2
- package/dist/{chunk-CLAIAXMX.js → chunk-T3DTTK23.js} +2 -2
- package/dist/{chunk-DZVZVZAD.cjs → chunk-T7PN5D4D.cjs} +6 -6
- package/dist/{chunk-DZVZVZAD.cjs.map → chunk-T7PN5D4D.cjs.map} +1 -1
- package/dist/{chunk-EYLEVRHT.cjs → chunk-TMUUDMDH.cjs} +274 -172
- package/dist/chunk-TMUUDMDH.cjs.map +1 -0
- package/dist/{chunk-VIFY6DJZ.js → chunk-TRO4CQHJ.js} +4 -4
- package/dist/{chunk-OWLDTF5Q.js → chunk-WGMYVRSA.js} +2 -2
- package/dist/{chunk-AMXIYV73.js → chunk-YHPJTLCA.js} +2 -2
- package/dist/{chunk-QWOZRYUA.js → chunk-YM3K3LCD.js} +450 -110
- package/dist/chunk-YM3K3LCD.js.map +1 -0
- package/dist/{chunk-Y5OSPKBU.js → chunk-YQZOPT3A.js} +225 -43
- package/dist/chunk-YQZOPT3A.js.map +1 -0
- package/dist/{chunk-UDODNSDU.js → chunk-ZZIQWSGC.js} +2 -2
- package/dist/chunks-MDMJRCJ7.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-2YYGN7UE.js → formula-6XNIXZ5L.js} +3 -3
- package/dist/{formula-EKXCURKO.cjs → formula-A3I5VAP7.cjs} +9 -9
- package/dist/{formula-EKXCURKO.cjs.map → formula-A3I5VAP7.cjs.map} +1 -1
- package/dist/{formula-Z5UPXBQM.js → formula-P7M7IH2L.js} +4 -4
- package/dist/{image-ocr-23R7RVHP.js → image-ocr-3C6W3KZO.js} +6 -6
- package/dist/{image-ocr-IMLFZ2JC.js → image-ocr-ITNY454I.js} +9 -9
- package/dist/{image-ocr-TE76KKNV.cjs → image-ocr-UJRSQ2T3.cjs} +15 -15
- package/dist/{image-ocr-TE76KKNV.cjs.map → image-ocr-UJRSQ2T3.cjs.map} +1 -1
- package/dist/index.cjs +1064 -687
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +482 -105
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-GTSRH2DY.js → model-bundle-LAWQH75O.js} +5 -5
- package/dist/{models-2J3NS7G2.js → models-6QTD2CFM.js} +5 -5
- package/dist/{parse-worker-v2-VO5UY3MP.js → parse-worker-v2-FEPJG3ER.js} +12 -12
- package/dist/{parser-FXGAKPUI.js → parser-56I364YM.js} +16 -8
- package/dist/{parser-JVUZ7EEV.js.map → parser-56I364YM.js.map} +1 -1
- package/dist/{parser-JVUZ7EEV.js → parser-KFCY3NIN.js} +19 -11
- package/dist/{parser-FXGAKPUI.js.map → parser-KFCY3NIN.js.map} +1 -1
- package/dist/{parser-D5VMCDLG.cjs → parser-VKWUMUML.cjs} +142 -134
- package/dist/parser-VKWUMUML.cjs.map +1 -0
- package/dist/pdf-ocr-MME37BL4.js +18 -0
- package/dist/pdf-ocr-OKAHNEJA.cjs +19 -0
- package/dist/{pdf-ocr-YFNUYBYJ.cjs.map → pdf-ocr-OKAHNEJA.cjs.map} +1 -1
- package/dist/pdf-ocr-ZZ6AJL6Z.js +22 -0
- package/dist/{profile-io-ULK73H2G.js → profile-io-OCITHUQF.js} +3 -3
- package/dist/{rasterize-FG3NX3GA.js → rasterize-SFCG4YOI.js} +3 -3
- package/dist/{redact-doc-NMKTKG24.js → redact-doc-5SMPXIGG.js} +11 -11
- package/dist/{render-GQUUGPOJ.js → render-FGPG5A2N.js} +7 -7
- package/dist/seal-GA7NZDTG.js +10 -0
- package/dist/{setup-PRBHD7JI.js → setup-JQVYZO7I.js} +3 -3
- package/dist/visual-YMG644YW.js +20 -0
- package/dist/{watch-LFSXNO2B.js → watch-C77BUSP7.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-DQ2YGTRS.js.map +0 -1
- package/dist/chunk-EYLEVRHT.cjs.map +0 -1
- package/dist/chunk-QWOZRYUA.js.map +0 -1
- package/dist/chunk-Y5OSPKBU.js.map +0 -1
- package/dist/chunks-J46DCTUC.js +0 -10
- package/dist/parser-D5VMCDLG.cjs.map +0 -1
- package/dist/pdf-ocr-364WQ5TY.js +0 -18
- package/dist/pdf-ocr-4MZELYCR.js +0 -22
- package/dist/pdf-ocr-YFNUYBYJ.cjs +0 -19
- package/dist/seal-EVHTG5GH.js +0 -10
- package/dist/visual-TCIR6MOG.js +0 -20
- /package/dist/{-FLYHAUQ6.js.map → -ZYF6HX4M.js.map} +0 -0
- /package/dist/{chunk-TC6DQLYN.js.map → chunk-2ZGP7A5T.js.map} +0 -0
- /package/dist/{chunk-4VM6BT4W.js.map → chunk-3TCF5HPP.js.map} +0 -0
- /package/dist/{chunk-OON4IJU2.js.map → chunk-5HTFWUJE.js.map} +0 -0
- /package/dist/{chunk-AQ5GIBBH.js.map → chunk-7YAJCXCD.js.map} +0 -0
- /package/dist/{chunk-3O4YC67B.js.map → chunk-BC54LBST.js.map} +0 -0
- /package/dist/{chunk-GK4QLKNT.js.map → chunk-BG6LUCQL.js.map} +0 -0
- /package/dist/{chunk-SM42XSI3.js.map → chunk-CY4QM2KQ.js.map} +0 -0
- /package/dist/{chunk-INZGI6PI.js.map → chunk-FBJVDBMO.js.map} +0 -0
- /package/dist/{chunk-Z2OOYQ4I.js.map → chunk-FZMGF6XU.js.map} +0 -0
- /package/dist/{chunk-F6N7CDB7.js.map → chunk-J5PBI3ZC.js.map} +0 -0
- /package/dist/{chunk-YDIVY65W.js.map → chunk-KTLHADU4.js.map} +0 -0
- /package/dist/{chunk-X6WXU4LA.js.map → chunk-PTF4NCFM.js.map} +0 -0
- /package/dist/{chunk-46PYORID.js.map → chunk-QHNVH4TC.js.map} +0 -0
- /package/dist/{chunk-RYRUQ73F.js.map → chunk-RBRHO7WL.js.map} +0 -0
- /package/dist/{chunk-CLAIAXMX.js.map → chunk-T3DTTK23.js.map} +0 -0
- /package/dist/{chunk-VIFY6DJZ.js.map → chunk-TRO4CQHJ.js.map} +0 -0
- /package/dist/{chunk-OWLDTF5Q.js.map → chunk-WGMYVRSA.js.map} +0 -0
- /package/dist/{chunk-AMXIYV73.js.map → chunk-YHPJTLCA.js.map} +0 -0
- /package/dist/{chunk-UDODNSDU.js.map → chunk-ZZIQWSGC.js.map} +0 -0
- /package/dist/{chunks-J46DCTUC.js.map → chunks-MDMJRCJ7.js.map} +0 -0
- /package/dist/{formula-2YYGN7UE.js.map → formula-6XNIXZ5L.js.map} +0 -0
- /package/dist/{formula-Z5UPXBQM.js.map → formula-P7M7IH2L.js.map} +0 -0
- /package/dist/{image-ocr-23R7RVHP.js.map → image-ocr-3C6W3KZO.js.map} +0 -0
- /package/dist/{image-ocr-IMLFZ2JC.js.map → image-ocr-ITNY454I.js.map} +0 -0
- /package/dist/{model-bundle-GTSRH2DY.js.map → model-bundle-LAWQH75O.js.map} +0 -0
- /package/dist/{models-2J3NS7G2.js.map → models-6QTD2CFM.js.map} +0 -0
- /package/dist/{parse-worker-v2-VO5UY3MP.js.map → parse-worker-v2-FEPJG3ER.js.map} +0 -0
- /package/dist/{pdf-ocr-364WQ5TY.js.map → pdf-ocr-MME37BL4.js.map} +0 -0
- /package/dist/{pdf-ocr-4MZELYCR.js.map → pdf-ocr-ZZ6AJL6Z.js.map} +0 -0
- /package/dist/{profile-io-ULK73H2G.js.map → profile-io-OCITHUQF.js.map} +0 -0
- /package/dist/{rasterize-FG3NX3GA.js.map → rasterize-SFCG4YOI.js.map} +0 -0
- /package/dist/{redact-doc-NMKTKG24.js.map → redact-doc-5SMPXIGG.js.map} +0 -0
- /package/dist/{render-GQUUGPOJ.js.map → render-FGPG5A2N.js.map} +0 -0
- /package/dist/{seal-EVHTG5GH.js.map → seal-GA7NZDTG.js.map} +0 -0
- /package/dist/{setup-PRBHD7JI.js.map → setup-JQVYZO7I.js.map} +0 -0
- /package/dist/{visual-TCIR6MOG.js.map → visual-YMG644YW.js.map} +0 -0
- /package/dist/{watch-LFSXNO2B.js.map → watch-C77BUSP7.js.map} +0 -0
package/dist/mcp.js
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
assertWithinRoot,
|
|
4
4
|
getAccessRoot,
|
|
5
5
|
isOfflineMode
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CY4QM2KQ.js";
|
|
7
7
|
import {
|
|
8
8
|
APPROVAL_MAX,
|
|
9
9
|
BODY_FONTS,
|
|
@@ -45,25 +45,25 @@ import {
|
|
|
45
45
|
resolveBuiltinTemplate,
|
|
46
46
|
unknownFontWarnings,
|
|
47
47
|
usesGaejosikMunche
|
|
48
|
-
} from "./chunk-
|
|
49
|
-
import "./chunk-
|
|
50
|
-
import "./chunk-
|
|
48
|
+
} from "./chunk-YM3K3LCD.js";
|
|
49
|
+
import "./chunk-2ZGP7A5T.js";
|
|
50
|
+
import "./chunk-HWIW3WK2.js";
|
|
51
51
|
import "./chunk-3WSNLH4B.js";
|
|
52
|
-
import "./chunk-
|
|
52
|
+
import "./chunk-7YAJCXCD.js";
|
|
53
53
|
import {
|
|
54
54
|
detectFormat,
|
|
55
55
|
detectOle2Format,
|
|
56
56
|
detectZipFormat,
|
|
57
57
|
extractHwp5MetadataOnly
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-QHNVH4TC.js";
|
|
59
59
|
import "./chunk-7FCNOKOR.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-PTF4NCFM.js";
|
|
61
61
|
import "./chunk-VQFA55IC.js";
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-BG6LUCQL.js";
|
|
63
63
|
import {
|
|
64
64
|
blocksToMarkdown
|
|
65
|
-
} from "./chunk-
|
|
66
|
-
import "./chunk-
|
|
65
|
+
} from "./chunk-RBRHO7WL.js";
|
|
66
|
+
import "./chunk-YHPJTLCA.js";
|
|
67
67
|
import {
|
|
68
68
|
KordocError,
|
|
69
69
|
VERSION,
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
routeConsoleToStderr,
|
|
72
72
|
sanitizeError,
|
|
73
73
|
toArrayBuffer
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-FZMGF6XU.js";
|
|
75
75
|
|
|
76
76
|
// src/mcp.ts
|
|
77
77
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
@@ -358,7 +358,7 @@ ${markdown}`);
|
|
|
358
358
|
break;
|
|
359
359
|
case "pdf":
|
|
360
360
|
try {
|
|
361
|
-
const { extractPdfMetadataOnly } = await import("./parser-
|
|
361
|
+
const { extractPdfMetadataOnly } = await import("./parser-KFCY3NIN.js");
|
|
362
362
|
metadata = await extractPdfMetadataOnly(buffer);
|
|
363
363
|
} catch {
|
|
364
364
|
metadata = void 0;
|
|
@@ -535,7 +535,7 @@ ${tableMarkdown}` }]
|
|
|
535
535
|
if (!parsed.success) {
|
|
536
536
|
return { content: [{ type: "text", text: `\uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}` }], isError: true };
|
|
537
537
|
}
|
|
538
|
-
const { blocksToChunks } = await import("./chunks-
|
|
538
|
+
const { blocksToChunks } = await import("./chunks-MDMJRCJ7.js");
|
|
539
539
|
const chunks = blocksToChunks(parsed.blocks, { granularity, includeTableCells: include_table_cells });
|
|
540
540
|
return { content: [{ type: "text", text: capResponseText(JSON.stringify(chunks, null, 2)) }] };
|
|
541
541
|
} catch (err) {
|
|
@@ -805,7 +805,7 @@ ${previewMd}` }]
|
|
|
805
805
|
}
|
|
806
806
|
const image = new Uint8Array(await readFile2(imgResolved));
|
|
807
807
|
const ext = extname2(imgResolved).slice(1).toLowerCase();
|
|
808
|
-
const { placeSealHwpx } = await import("./seal-
|
|
808
|
+
const { placeSealHwpx } = await import("./seal-GA7NZDTG.js");
|
|
809
809
|
const result = await placeSealHwpx(buffer, [{
|
|
810
810
|
anchor,
|
|
811
811
|
occurrence,
|
|
@@ -922,7 +922,7 @@ ${previewMd}` }]
|
|
|
922
922
|
if (outPath && await isSameFile(outPath, resolved)) {
|
|
923
923
|
return { content: [{ type: "text", text: "output_path\uAC00 \uC785\uB825 \uD30C\uC77C\uACFC \uAC19\uC2B5\uB2C8\uB2E4 \u2014 \uC6D0\uBCF8\uC744 \uB36E\uC5B4\uC4F0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uACBD\uB85C\uB97C \uC9C0\uC815\uD558\uC138\uC694." }], isError: true };
|
|
924
924
|
}
|
|
925
|
-
const { redactDocument } = await import("./redact-doc-
|
|
925
|
+
const { redactDocument } = await import("./redact-doc-5SMPXIGG.js");
|
|
926
926
|
const r = await redactDocument(buffer, { rules, maskChar: mask_char, filePath: file_path, dryRun: dry_run });
|
|
927
927
|
const MAX_LINES = 50;
|
|
928
928
|
const listed = r.fileHits.length > 0 ? r.fileHits.map((h) => ` - [${h.rule}] ${h.masked} (${h.where} @ ${h.part})`) : r.markdownHits.map((h) => ` - [${h.rule}] ${h.masked}`);
|
|
@@ -996,7 +996,7 @@ function registerRenderTools(server2) {
|
|
|
996
996
|
const { buffer, resolved } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
997
997
|
const isHwp5 = resolved.toLowerCase().endsWith(".hwp");
|
|
998
998
|
if (!isHwp5 && !pages && (format === "png" || format === "svg")) {
|
|
999
|
-
const { renderHwpxToSvg } = await import("./render-
|
|
999
|
+
const { renderHwpxToSvg } = await import("./render-FGPG5A2N.js");
|
|
1000
1000
|
const result = await renderHwpxToSvg(buffer, { highlights, reflow: true, reflowMode: reflow_mode });
|
|
1001
1001
|
const summary2 = [
|
|
1002
1002
|
`\uB80C\uB354 \uC644\uB8CC: ${result.pageCount}\uD398\uC774\uC9C0, ${Math.round(result.width)}x${Math.round(result.height)}pt (\uD14D\uC2A4\uD2B8 ${result.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${result.stats.images}\xB7\uD45C ${result.stats.tables})`,
|
|
@@ -1008,7 +1008,7 @@ function registerRenderTools(server2) {
|
|
|
1008
1008
|
summary2.push(`\uC800\uC7A5: ${outPath}`);
|
|
1009
1009
|
return { content: [{ type: "text", text: summary2.join("\n") }] };
|
|
1010
1010
|
}
|
|
1011
|
-
const { rasterizeSvg } = await import("./rasterize-
|
|
1011
|
+
const { rasterizeSvg } = await import("./rasterize-SFCG4YOI.js");
|
|
1012
1012
|
const raster = await rasterizeSvg(result.svg, result.width, result.height, max_width_px ? { maxWidthPx: max_width_px } : void 0);
|
|
1013
1013
|
if (outPath) {
|
|
1014
1014
|
await mkdir2(dirname3(outPath), { recursive: true });
|
|
@@ -1023,7 +1023,7 @@ function registerRenderTools(server2) {
|
|
|
1023
1023
|
]
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
1026
|
-
const { renderDocument } = await import("./render-
|
|
1026
|
+
const { renderDocument } = await import("./render-FGPG5A2N.js");
|
|
1027
1027
|
const { scene, assets } = await renderDocument(buffer, { format, pages, highlights, reflow: true, reflowMode: reflow_mode, maxWidthPx: max_width_px });
|
|
1028
1028
|
const summary = [
|
|
1029
1029
|
`\uB80C\uB354 \uC644\uB8CC: \uBB38\uC11C ${scene.pages.length}\uD398\uC774\uC9C0 \uC911 ${assets.filter((a) => a.page !== void 0).length || 1}\uAC74 (\uD14D\uC2A4\uD2B8 ${scene.stats.texts}\xB7\uC774\uBBF8\uC9C0 ${scene.stats.images}\xB7\uD45C ${scene.stats.tables}\xB7\uB3C4\uD615 ${scene.stats.shapes})`,
|
|
@@ -1073,7 +1073,7 @@ function registerRenderTools(server2) {
|
|
|
1073
1073
|
try {
|
|
1074
1074
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1075
1075
|
const dir = safeOutputPath(join2(output_dir, "regions.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]regions\.json$/, "");
|
|
1076
|
-
const { extractRenderedRegions } = await import("./render-
|
|
1076
|
+
const { extractRenderedRegions } = await import("./render-FGPG5A2N.js");
|
|
1077
1077
|
const regions = await extractRenderedRegions(buffer, { types: target, format, pages, paddingPt: padding_pt, reflow: true });
|
|
1078
1078
|
await mkdir2(dir, { recursive: true });
|
|
1079
1079
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1109,7 +1109,7 @@ function registerRenderTools(server2) {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
const { buffer } = await readValidatedFile(file_path, MAX_FILE_SIZE, /* @__PURE__ */ new Set([".hwpx", ".hwp"]));
|
|
1111
1111
|
const dir = output_dir ? safeOutputPath(join2(output_dir, "tables.json"), /* @__PURE__ */ new Set([".json"])).replace(/[\\/]tables\.json$/, "") : void 0;
|
|
1112
|
-
const { extractTables } = await import("./visual-
|
|
1112
|
+
const { extractTables } = await import("./visual-YMG644YW.js");
|
|
1113
1113
|
const tables = await extractTables(buffer, { policy: visual, format, paddingPt: padding_pt });
|
|
1114
1114
|
if (dir) await mkdir2(dir, { recursive: true });
|
|
1115
1115
|
const ext = format === "jpeg" ? "jpg" : "png";
|
|
@@ -1166,7 +1166,7 @@ function registerGenerateTools(server2) {
|
|
|
1166
1166
|
try {
|
|
1167
1167
|
const out = safeOutputPath(output_path, PROFILE_EXTENSIONS);
|
|
1168
1168
|
const { buffer } = await readValidatedFile(hwpx_path);
|
|
1169
|
-
const { hwpxToProfile } = await import("./-
|
|
1169
|
+
const { hwpxToProfile } = await import("./-ZYF6HX4M.js");
|
|
1170
1170
|
const profile = await hwpxToProfile(buffer);
|
|
1171
1171
|
await mkdir3(dirname4(out), { recursive: true });
|
|
1172
1172
|
await writeOutputFile(out, JSON.stringify(profile, null, 2));
|
|
@@ -1278,7 +1278,7 @@ function registerGenerateTools(server2) {
|
|
|
1278
1278
|
}
|
|
1279
1279
|
let profile;
|
|
1280
1280
|
if (profile_path) {
|
|
1281
|
-
const { parseFormatProfileJson } = await import("./profile-io-
|
|
1281
|
+
const { parseFormatProfileJson } = await import("./profile-io-OCITHUQF.js");
|
|
1282
1282
|
profile = parseFormatProfileJson(await readFile3(safePath(profile_path, PROFILE_EXTENSIONS), "utf-8"));
|
|
1283
1283
|
}
|
|
1284
1284
|
const out = safeOutputPath(output_path, /* @__PURE__ */ new Set([".hwpx"]));
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
ALL_OCR_MODELS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-WGMYVRSA.js";
|
|
5
5
|
import {
|
|
6
6
|
ALL_FORMULA_MODELS,
|
|
7
7
|
getModelStatusIn,
|
|
8
8
|
getModelsDir
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-3TCF5HPP.js";
|
|
10
|
+
import "./chunk-CY4QM2KQ.js";
|
|
11
|
+
import "./chunk-FZMGF6XU.js";
|
|
12
12
|
|
|
13
13
|
// src/shared/model-bundle.ts
|
|
14
14
|
import { copyFile, mkdir } from "fs/promises";
|
|
@@ -101,4 +101,4 @@ export {
|
|
|
101
101
|
importModels,
|
|
102
102
|
modelCacheStatus
|
|
103
103
|
};
|
|
104
|
-
//# sourceMappingURL=model-bundle-
|
|
104
|
+
//# sourceMappingURL=model-bundle-LAWQH75O.js.map
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
ocrModelPath,
|
|
11
11
|
ocrModelsCached,
|
|
12
12
|
parseCharacterDict
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-WGMYVRSA.js";
|
|
14
|
+
import "./chunk-3TCF5HPP.js";
|
|
15
|
+
import "./chunk-CY4QM2KQ.js";
|
|
16
|
+
import "./chunk-FZMGF6XU.js";
|
|
17
17
|
export {
|
|
18
18
|
ALL_OCR_MODELS,
|
|
19
19
|
OCR_DET_MODEL,
|
|
@@ -26,4 +26,4 @@ export {
|
|
|
26
26
|
ocrModelsCached,
|
|
27
27
|
parseCharacterDict
|
|
28
28
|
};
|
|
29
|
-
//# sourceMappingURL=models-
|
|
29
|
+
//# sourceMappingURL=models-6QTD2CFM.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
parseWorkerFile
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-BC54LBST.js";
|
|
5
|
+
import "./chunk-YM3K3LCD.js";
|
|
6
|
+
import "./chunk-2ZGP7A5T.js";
|
|
7
|
+
import "./chunk-HWIW3WK2.js";
|
|
8
8
|
import "./chunk-3WSNLH4B.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-7YAJCXCD.js";
|
|
10
|
+
import "./chunk-QHNVH4TC.js";
|
|
11
11
|
import "./chunk-7FCNOKOR.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-PTF4NCFM.js";
|
|
13
13
|
import "./chunk-VQFA55IC.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-BG6LUCQL.js";
|
|
15
|
+
import "./chunk-RBRHO7WL.js";
|
|
16
|
+
import "./chunk-YHPJTLCA.js";
|
|
17
17
|
import {
|
|
18
18
|
VERSION,
|
|
19
19
|
sanitizeError
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-FZMGF6XU.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/parse-worker-v2.ts
|
|
23
23
|
import { createHash } from "crypto";
|
|
@@ -299,4 +299,4 @@ export {
|
|
|
299
299
|
runParseWorkerV2,
|
|
300
300
|
toParseOptions
|
|
301
301
|
};
|
|
302
|
-
//# sourceMappingURL=parse-worker-v2-
|
|
302
|
+
//# sourceMappingURL=parse-worker-v2-FEPJG3ER.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
blocksToPages,
|
|
3
3
|
encodePng
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T3DTTK23.js";
|
|
5
5
|
import {
|
|
6
6
|
hasRequestedPagesAfter,
|
|
7
7
|
parsePageRange
|
|
@@ -53,11 +53,13 @@ import {
|
|
|
53
53
|
removeHeaderFooterBlocks,
|
|
54
54
|
removeSideTabs,
|
|
55
55
|
restoreImageBullets,
|
|
56
|
+
runningLinePatterns,
|
|
56
57
|
splitPageBreakWraps,
|
|
57
58
|
startsNewItem,
|
|
59
|
+
stripAbsorbedRunningLines,
|
|
58
60
|
trimTrailingEmptyTableCols,
|
|
59
61
|
wrapJoiner
|
|
60
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-YQZOPT3A.js";
|
|
61
63
|
import {
|
|
62
64
|
CELL_BASELINES,
|
|
63
65
|
CELL_EDGES,
|
|
@@ -70,12 +72,12 @@ import {
|
|
|
70
72
|
escapeLiteralTags,
|
|
71
73
|
stripScriptTags,
|
|
72
74
|
unframeLayoutTables
|
|
73
|
-
} from "./chunk-
|
|
74
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-KTLHADU4.js";
|
|
76
|
+
import "./chunk-FBJVDBMO.js";
|
|
75
77
|
import {
|
|
76
78
|
KordocError,
|
|
77
79
|
sanitizeHref
|
|
78
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-ZZIQWSGC.js";
|
|
79
81
|
|
|
80
82
|
// src/pdf/image-extract.ts
|
|
81
83
|
import { createHash } from "crypto";
|
|
@@ -3212,7 +3214,7 @@ function mergeLinkRuns(markdown) {
|
|
|
3212
3214
|
|
|
3213
3215
|
// src/pdf/formula-ocr.ts
|
|
3214
3216
|
async function applyFormulaOcr(buffer, blocks, pageFilter, effectivePageCount, warnings, _onProgress) {
|
|
3215
|
-
const formulaMod = await import("./formula-
|
|
3217
|
+
const formulaMod = await import("./formula-6XNIXZ5L.js");
|
|
3216
3218
|
const { FormulaPipeline, ensureFormulaModels } = formulaMod;
|
|
3217
3219
|
await ensureFormulaModels((p) => {
|
|
3218
3220
|
if (p.phase === "download" && p.total) {
|
|
@@ -3635,7 +3637,7 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3635
3637
|
}
|
|
3636
3638
|
if (targets.size > 0) {
|
|
3637
3639
|
try {
|
|
3638
|
-
const { runPdfOcr } = await import("./pdf-ocr-
|
|
3640
|
+
const { runPdfOcr } = await import("./pdf-ocr-MME37BL4.js");
|
|
3639
3641
|
const mode = typeof options?.ocr === "function" ? options.ocr : "builtin";
|
|
3640
3642
|
const regionPages = new Map([...ocrRegions].filter(([p]) => options?.ocr !== "force" && !isImageBased && !pageQuality.find((q) => q.page === p)?.needsOcr));
|
|
3641
3643
|
const ocrPageBlocks = await runPdfOcr(ocrBuffer, targets, mode, warnings, options?.onProgress, options?.tables !== false, vectorPageOps, regionPages);
|
|
@@ -3704,9 +3706,15 @@ async function parsePdfDocument(buffer, options) {
|
|
|
3704
3706
|
}
|
|
3705
3707
|
if (options?.removeHeaderFooter !== false && (parsedPageCount >= 3 || headerContext.length)) {
|
|
3706
3708
|
const removed = removeHeaderFooterBlocks(blocks, pageHeights, warnings, noteMarks, false, headerContext);
|
|
3709
|
+
const running = runningLinePatterns(removed.map((ri) => blocks[ri]), pageHeights);
|
|
3707
3710
|
for (let ri = removed.length - 1; ri >= 0; ri--) {
|
|
3708
3711
|
blocks.splice(removed[ri], 1);
|
|
3709
3712
|
}
|
|
3713
|
+
const stripped = stripAbsorbedRunningLines(blocks, pageHeights, running);
|
|
3714
|
+
if (stripped !== blocks) {
|
|
3715
|
+
blocks.length = 0;
|
|
3716
|
+
blocks.push(...stripped);
|
|
3717
|
+
}
|
|
3710
3718
|
const kept = removeSideTabs(blocks, pageWidths);
|
|
3711
3719
|
if (kept !== blocks) {
|
|
3712
3720
|
blocks.length = 0;
|
|
@@ -3875,4 +3883,4 @@ export {
|
|
|
3875
3883
|
parsePdfDocument,
|
|
3876
3884
|
removeHeaderFooterBlocks
|
|
3877
3885
|
};
|
|
3878
|
-
//# sourceMappingURL=parser-
|
|
3886
|
+
//# sourceMappingURL=parser-56I364YM.js.map
|