kordoc 4.22.6 → 4.22.8
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/{-BNRFT3K4.js → -V3MHVWUQ.js} +11 -11
- package/dist/{chunk-UFQ2DEYM.js → chunk-4OMXOT6T.js} +10 -3
- package/dist/chunk-4OMXOT6T.js.map +1 -0
- package/dist/{chunk-2XRJECQJ.cjs → chunk-5TYEUZGN.cjs} +3 -3
- package/dist/{chunk-2XRJECQJ.cjs.map → chunk-5TYEUZGN.cjs.map} +1 -1
- package/dist/{chunk-3DF57KEK.cjs → chunk-5YXW5RLC.cjs} +30 -23
- package/dist/chunk-5YXW5RLC.cjs.map +1 -0
- package/dist/{chunk-A6TLFPDO.js → chunk-D7A5NKP3.js} +2 -2
- package/dist/{chunk-NOGYQ7QQ.js → chunk-DUQJ7EBY.js} +2 -2
- package/dist/chunk-DUQJ7EBY.js.map +1 -0
- package/dist/{chunk-7IUHIM2F.js → chunk-GVRCO3KT.js} +4 -3
- package/dist/chunk-GVRCO3KT.js.map +1 -0
- package/dist/{chunk-FK3UNG3M.js → chunk-I6XE7VJQ.js} +2 -2
- package/dist/{chunk-QSVBBIOO.js → chunk-JA4IIIEU.js} +2 -2
- package/dist/{chunk-JTBKTYUJ.js → chunk-JNHUOGGQ.js} +13 -4
- package/dist/chunk-JNHUOGGQ.js.map +1 -0
- package/dist/{chunk-Q3MCNMTJ.js → chunk-K5UU73BA.js} +13 -4
- package/dist/chunk-K5UU73BA.js.map +1 -0
- package/dist/{chunk-V6MEUROO.js → chunk-KZSDBXWS.js} +11 -11
- package/dist/{chunk-E5KDXBB5.js → chunk-LM3PI43Q.js} +2 -2
- package/dist/{chunk-37BDHFGX.cjs → chunk-LSOFR4R2.cjs} +17 -8
- package/dist/chunk-LSOFR4R2.cjs.map +1 -0
- package/dist/{chunk-6CHPX72J.js → chunk-ORFDIAP3.js} +4 -4
- package/dist/{chunk-2VTIZIMO.js → chunk-OXVNNCQQ.js} +2 -2
- package/dist/{chunk-RG5PQS5J.js → chunk-P53VOW4B.js} +3 -3
- package/dist/{chunk-ZG4JVJYJ.js → chunk-P7UB5SMI.js} +2 -2
- package/dist/{chunk-IXCLL2U3.cjs → chunk-RAZJF5QW.cjs} +24 -24
- package/dist/{chunk-IXCLL2U3.cjs.map → chunk-RAZJF5QW.cjs.map} +1 -1
- package/dist/{chunk-PLFDJC3I.js → chunk-RNBU6S2X.js} +2 -2
- package/dist/{chunk-JYUYW34P.cjs → chunk-TDCHLOY6.cjs} +3 -3
- package/dist/{chunk-JYUYW34P.cjs.map → chunk-TDCHLOY6.cjs.map} +1 -1
- package/dist/{chunk-HE5VV2CM.js → chunk-TVCGPOCE.js} +2 -2
- package/dist/{chunk-U6SSH2TG.cjs → chunk-UDB4YKOP.cjs} +2 -2
- package/dist/{chunk-U6SSH2TG.cjs.map → chunk-UDB4YKOP.cjs.map} +1 -1
- package/dist/{chunk-2VH7CAVX.js → chunk-V7BK7IKP.js} +2 -2
- package/dist/{chunk-JCF5DM7D.js → chunk-VGRTUHAU.js} +3 -3
- package/dist/{chunk-MYOUWFZQ.js → chunk-XZZ7WOCP.js} +2 -2
- package/dist/{chunk-XMBILEZY.js → chunk-YBD5XGFC.js} +103 -15
- package/dist/{chunk-XMBILEZY.js.map → chunk-YBD5XGFC.js.map} +1 -1
- package/dist/{chunk-2PCMUSEB.js → chunk-YDAGUSKH.js} +2 -2
- package/dist/{chunk-6HSRXDZ7.js → chunk-YSTWJWOY.js} +11 -4
- package/dist/chunk-YSTWJWOY.js.map +1 -0
- package/dist/{chunk-OWQSWIMU.js → chunk-Z5Z7HOER.js} +4 -4
- package/dist/chunks-OV75DVHD.js +10 -0
- package/dist/cli.js +30 -30
- package/dist/{formula-UZ52GCLC.cjs → formula-246A2T5B.cjs} +9 -9
- package/dist/{formula-UZ52GCLC.cjs.map → formula-246A2T5B.cjs.map} +1 -1
- package/dist/{formula-VKQA2725.js → formula-HO2NNWVN.js} +3 -3
- package/dist/{formula-VSCB3MH4.js → formula-SPMFPBGU.js} +4 -4
- package/dist/{image-ocr-VGCU4HVH.js → image-ocr-G2UUJPBI.js} +9 -9
- package/dist/{image-ocr-P5RHC2L3.js → image-ocr-WSRZMXYM.js} +6 -6
- package/dist/{image-ocr-PN3NFOXH.cjs → image-ocr-YRACG6TO.cjs} +17 -17
- package/dist/{image-ocr-PN3NFOXH.cjs.map → image-ocr-YRACG6TO.cjs.map} +1 -1
- package/dist/index.cjs +559 -470
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +105 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +22 -22
- package/dist/{model-bundle-WBD4F7F2.js → model-bundle-CJACYVVC.js} +5 -5
- package/dist/{models-K26273R4.js → models-HGIMOYGX.js} +5 -5
- package/dist/{parse-worker-v2-2VCHGYDP.js → parse-worker-v2-7GQJ5IGY.js} +12 -12
- package/dist/{parser-PNJE3RFH.js → parser-23M44GFD.js} +12 -12
- package/dist/{parser-KQNPM3WX.cjs → parser-Q3W25PYR.cjs} +157 -157
- package/dist/{parser-KQNPM3WX.cjs.map → parser-Q3W25PYR.cjs.map} +1 -1
- package/dist/{parser-EIPIIGFQ.js → parser-TW2QXVZR.js} +9 -9
- package/dist/{pdf-ocr-FMNWCHQ4.js → pdf-ocr-DHVUQ4H2.js} +9 -9
- package/dist/pdf-ocr-RAJ33NDH.cjs +31 -0
- package/dist/{pdf-ocr-AVP5KTGK.cjs.map → pdf-ocr-RAJ33NDH.cjs.map} +1 -1
- package/dist/{pdf-ocr-TCNOGBIK.js → pdf-ocr-RZR2VPQD.js} +6 -6
- package/dist/{profile-io-W325GOXE.js → profile-io-TP5LYMSB.js} +3 -3
- package/dist/{rasterize-6XYWTABU.js → rasterize-RENNLGB3.js} +3 -3
- package/dist/{redact-doc-KX7TI5ON.js → redact-doc-TRBUJ3EL.js} +11 -11
- package/dist/{render-AG5VVKE3.js → render-3X6FI2WM.js} +7 -7
- package/dist/seal-M5GYTAPE.js +10 -0
- package/dist/{setup-XTBRWZ7D.js → setup-F7JGWFDW.js} +3 -3
- package/dist/visual-PZRC23GE.js +21 -0
- package/dist/{watch-ZLJIZ6XU.js → watch-QYVW2AG6.js} +12 -12
- package/package.json +1 -1
- package/dist/chunk-37BDHFGX.cjs.map +0 -1
- package/dist/chunk-3DF57KEK.cjs.map +0 -1
- package/dist/chunk-6HSRXDZ7.js.map +0 -1
- package/dist/chunk-7IUHIM2F.js.map +0 -1
- package/dist/chunk-JTBKTYUJ.js.map +0 -1
- package/dist/chunk-NOGYQ7QQ.js.map +0 -1
- package/dist/chunk-Q3MCNMTJ.js.map +0 -1
- package/dist/chunk-UFQ2DEYM.js.map +0 -1
- package/dist/chunks-5BRSLKC7.js +0 -10
- package/dist/pdf-ocr-AVP5KTGK.cjs +0 -31
- package/dist/seal-ESKG2KMT.js +0 -10
- package/dist/visual-QTIPKQVD.js +0 -21
- /package/dist/{-BNRFT3K4.js.map → -V3MHVWUQ.js.map} +0 -0
- /package/dist/{chunk-A6TLFPDO.js.map → chunk-D7A5NKP3.js.map} +0 -0
- /package/dist/{chunk-FK3UNG3M.js.map → chunk-I6XE7VJQ.js.map} +0 -0
- /package/dist/{chunk-QSVBBIOO.js.map → chunk-JA4IIIEU.js.map} +0 -0
- /package/dist/{chunk-V6MEUROO.js.map → chunk-KZSDBXWS.js.map} +0 -0
- /package/dist/{chunk-E5KDXBB5.js.map → chunk-LM3PI43Q.js.map} +0 -0
- /package/dist/{chunk-6CHPX72J.js.map → chunk-ORFDIAP3.js.map} +0 -0
- /package/dist/{chunk-2VTIZIMO.js.map → chunk-OXVNNCQQ.js.map} +0 -0
- /package/dist/{chunk-RG5PQS5J.js.map → chunk-P53VOW4B.js.map} +0 -0
- /package/dist/{chunk-ZG4JVJYJ.js.map → chunk-P7UB5SMI.js.map} +0 -0
- /package/dist/{chunk-PLFDJC3I.js.map → chunk-RNBU6S2X.js.map} +0 -0
- /package/dist/{chunk-HE5VV2CM.js.map → chunk-TVCGPOCE.js.map} +0 -0
- /package/dist/{chunk-2VH7CAVX.js.map → chunk-V7BK7IKP.js.map} +0 -0
- /package/dist/{chunk-JCF5DM7D.js.map → chunk-VGRTUHAU.js.map} +0 -0
- /package/dist/{chunk-MYOUWFZQ.js.map → chunk-XZZ7WOCP.js.map} +0 -0
- /package/dist/{chunk-2PCMUSEB.js.map → chunk-YDAGUSKH.js.map} +0 -0
- /package/dist/{chunk-OWQSWIMU.js.map → chunk-Z5Z7HOER.js.map} +0 -0
- /package/dist/{chunks-5BRSLKC7.js.map → chunks-OV75DVHD.js.map} +0 -0
- /package/dist/{formula-VKQA2725.js.map → formula-HO2NNWVN.js.map} +0 -0
- /package/dist/{formula-VSCB3MH4.js.map → formula-SPMFPBGU.js.map} +0 -0
- /package/dist/{image-ocr-VGCU4HVH.js.map → image-ocr-G2UUJPBI.js.map} +0 -0
- /package/dist/{image-ocr-P5RHC2L3.js.map → image-ocr-WSRZMXYM.js.map} +0 -0
- /package/dist/{model-bundle-WBD4F7F2.js.map → model-bundle-CJACYVVC.js.map} +0 -0
- /package/dist/{models-K26273R4.js.map → models-HGIMOYGX.js.map} +0 -0
- /package/dist/{parse-worker-v2-2VCHGYDP.js.map → parse-worker-v2-7GQJ5IGY.js.map} +0 -0
- /package/dist/{parser-PNJE3RFH.js.map → parser-23M44GFD.js.map} +0 -0
- /package/dist/{parser-EIPIIGFQ.js.map → parser-TW2QXVZR.js.map} +0 -0
- /package/dist/{pdf-ocr-FMNWCHQ4.js.map → pdf-ocr-DHVUQ4H2.js.map} +0 -0
- /package/dist/{pdf-ocr-TCNOGBIK.js.map → pdf-ocr-RZR2VPQD.js.map} +0 -0
- /package/dist/{profile-io-W325GOXE.js.map → profile-io-TP5LYMSB.js.map} +0 -0
- /package/dist/{rasterize-6XYWTABU.js.map → rasterize-RENNLGB3.js.map} +0 -0
- /package/dist/{redact-doc-KX7TI5ON.js.map → redact-doc-TRBUJ3EL.js.map} +0 -0
- /package/dist/{render-AG5VVKE3.js.map → render-3X6FI2WM.js.map} +0 -0
- /package/dist/{seal-ESKG2KMT.js.map → seal-M5GYTAPE.js.map} +0 -0
- /package/dist/{setup-XTBRWZ7D.js.map → setup-F7JGWFDW.js.map} +0 -0
- /package/dist/{visual-QTIPKQVD.js.map → visual-PZRC23GE.js.map} +0 -0
- /package/dist/{watch-ZLJIZ6XU.js.map → watch-QYVW2AG6.js.map} +0 -0
package/dist/index.d.cts
CHANGED
|
@@ -125,6 +125,8 @@ interface IRTable {
|
|
|
125
125
|
regions?: BoundingBox[];
|
|
126
126
|
/** 표 캡션 (예: "표 1. 부서별 예산") — v3.0 */
|
|
127
127
|
caption?: string;
|
|
128
|
+
/** 캡션이 원문 쪽에서 표 아래에 있다(PDF) — 마크다운은 읽는 순서대로 캡션을 표 뒤에 낸다 */
|
|
129
|
+
captionBelow?: boolean;
|
|
128
130
|
/**
|
|
129
131
|
* 캡션 내부 블록 콘텐츠 — v4.2.8 (#55).
|
|
130
132
|
* 캡션 안 중첩표·문단을 구조 그대로, 원문 순서대로 보존한다 (IRCell.blocks와 같은 계약).
|
package/dist/index.d.ts
CHANGED
|
@@ -125,6 +125,8 @@ interface IRTable {
|
|
|
125
125
|
regions?: BoundingBox[];
|
|
126
126
|
/** 표 캡션 (예: "표 1. 부서별 예산") — v3.0 */
|
|
127
127
|
caption?: string;
|
|
128
|
+
/** 캡션이 원문 쪽에서 표 아래에 있다(PDF) — 마크다운은 읽는 순서대로 캡션을 표 뒤에 낸다 */
|
|
129
|
+
captionBelow?: boolean;
|
|
128
130
|
/**
|
|
129
131
|
* 캡션 내부 블록 콘텐츠 — v4.2.8 (#55).
|
|
130
132
|
* 캡션 안 중첩표·문단을 구조 그대로, 원문 순서대로 보존한다 (IRCell.blocks와 같은 계약).
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
blocksToPages,
|
|
3
3
|
bmpToPng,
|
|
4
4
|
inlineImagesIntoMarkdown
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-V7BK7IKP.js";
|
|
6
6
|
import {
|
|
7
7
|
parsePageRange
|
|
8
8
|
} from "./chunk-V4BH5SRQ.js";
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
validateOcrOptions,
|
|
44
44
|
visibleText,
|
|
45
45
|
wrapScript
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-K5UU73BA.js";
|
|
47
47
|
import {
|
|
48
48
|
KordocError,
|
|
49
49
|
OPTIONAL_DEP_INSTALL_HINT,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
toArrayBuffer,
|
|
62
62
|
unescapeHtml,
|
|
63
63
|
unzipLimitBytes
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-XZZ7WOCP.js";
|
|
65
65
|
|
|
66
66
|
// src/plain-markdown.ts
|
|
67
67
|
function toPlainMarkdown(md2) {
|
|
@@ -24604,7 +24604,7 @@ var MIN_SIDE = 24;
|
|
|
24604
24604
|
async function ocrEmbeddedImages(blocks, options, warnings) {
|
|
24605
24605
|
const ocr = options?.ocr;
|
|
24606
24606
|
if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
|
|
24607
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
24607
|
+
const { parseImageDocument } = await import("./image-ocr-WSRZMXYM.js");
|
|
24608
24608
|
let inserted = false, unreadable = 0;
|
|
24609
24609
|
let failed = null;
|
|
24610
24610
|
const walk = async (list, depth) => {
|
|
@@ -35106,6 +35106,90 @@ function fontHasGlyph(face, cp) {
|
|
|
35106
35106
|
return cp >= 32 && cp <= 126 || FONTS[face.trim()].ex[cp] !== void 0;
|
|
35107
35107
|
}
|
|
35108
35108
|
var HANCOM_FALLBACK_W = { 8228: 173, 8231: 173, 8211: 430, 8680: 1e3, 8728: 500, 8227: 465, 12295: 1e3, 61607: 937 / 2048 * 1e3, 61599: 937 / 2048 * 1e3, 61550: 1529 / 2048 * 1e3 };
|
|
35109
|
+
var WINGDINGS_ADV = {
|
|
35110
|
+
641: "9e a0",
|
|
35111
|
+
789: "fa",
|
|
35112
|
+
937: "73 9f a7",
|
|
35113
|
+
938: "27",
|
|
35114
|
+
987: "f9",
|
|
35115
|
+
1086: "7d 7e",
|
|
35116
|
+
1124: "47 48",
|
|
35117
|
+
1135: "35",
|
|
35118
|
+
1183: "77",
|
|
35119
|
+
1203: "41",
|
|
35120
|
+
1233: "36",
|
|
35121
|
+
1301: "fb",
|
|
35122
|
+
1332: "53",
|
|
35123
|
+
1352: "4e",
|
|
35124
|
+
1381: "43 44",
|
|
35125
|
+
1420: "58",
|
|
35126
|
+
1431: "32 33",
|
|
35127
|
+
1480: "57",
|
|
35128
|
+
1529: "55 56 6c 6e 74",
|
|
35129
|
+
1589: "e3 e4 e5 e6",
|
|
35130
|
+
1597: "69",
|
|
35131
|
+
1601: "f5 f6 f7 f8",
|
|
35132
|
+
1609: "fc",
|
|
35133
|
+
1624: "42",
|
|
35134
|
+
1627: "59 d7 d8",
|
|
35135
|
+
1660: "f1 f2 f4",
|
|
35136
|
+
1665: "54",
|
|
35137
|
+
1727: "4a 4b 4c",
|
|
35138
|
+
1739: "4f",
|
|
35139
|
+
1787: "eb ec ed ee",
|
|
35140
|
+
1803: "52",
|
|
35141
|
+
1813: "5a",
|
|
35142
|
+
1819: "51",
|
|
35143
|
+
1825: "3b 3e 5d 6f 70 71 72 76 7a a1 a2 a3 a4 a5 a8 a9 aa ab ac ad ae af b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf c0 c1 c2 c3 c4 c5 c6 d9 da db dc dd de e1 e2 e9 ea ef f0",
|
|
35144
|
+
1826: "29 34 3c 3d 49 5b 7b 7c 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 fd fe",
|
|
35145
|
+
1830: "25",
|
|
35146
|
+
1834: "5c",
|
|
35147
|
+
1863: "3f 40",
|
|
35148
|
+
1902: "66",
|
|
35149
|
+
1911: "63",
|
|
35150
|
+
1924: "3a",
|
|
35151
|
+
1927: "62",
|
|
35152
|
+
1929: "45 46",
|
|
35153
|
+
1937: "64",
|
|
35154
|
+
1941: "38",
|
|
35155
|
+
1951: "6d a6",
|
|
35156
|
+
1974: "60",
|
|
35157
|
+
2006: "df e0",
|
|
35158
|
+
2020: "75",
|
|
35159
|
+
2048: "20 96 97 98 99 9a 9b 9c 9d cb cc cd ce cf d0 d1 d2 d3 d4",
|
|
35160
|
+
2099: "65",
|
|
35161
|
+
2110: "21",
|
|
35162
|
+
2119: "ff",
|
|
35163
|
+
2146: "c7 c8 c9 ca",
|
|
35164
|
+
2150: "6a",
|
|
35165
|
+
2159: "5f",
|
|
35166
|
+
2171: "78 79 f3",
|
|
35167
|
+
2181: "68",
|
|
35168
|
+
2186: "e7 e8",
|
|
35169
|
+
2196: "37",
|
|
35170
|
+
2208: "39",
|
|
35171
|
+
2220: "28",
|
|
35172
|
+
2230: "50",
|
|
35173
|
+
2233: "61",
|
|
35174
|
+
2245: "30 67",
|
|
35175
|
+
2275: "4d",
|
|
35176
|
+
2319: "2a 2b",
|
|
35177
|
+
2344: "22",
|
|
35178
|
+
2368: "5e",
|
|
35179
|
+
2399: "2c 2d",
|
|
35180
|
+
2492: "26",
|
|
35181
|
+
2566: "d5 d6",
|
|
35182
|
+
2603: "6b",
|
|
35183
|
+
2665: "23",
|
|
35184
|
+
2751: "31",
|
|
35185
|
+
2752: "24",
|
|
35186
|
+
2951: "2e",
|
|
35187
|
+
2956: "2f"
|
|
35188
|
+
};
|
|
35189
|
+
for (const [adv, list] of Object.entries(WINGDINGS_ADV)) for (const c of list.split(" ")) {
|
|
35190
|
+
const cp = 61440 + parseInt(c, 16);
|
|
35191
|
+
if (cp !== 61600 && !(cp in HANCOM_FALLBACK_W)) HANCOM_FALLBACK_W[cp] = Number(adv) / 2048 * 1e3;
|
|
35192
|
+
}
|
|
35109
35193
|
function isHanja(cp) {
|
|
35110
35194
|
return cp >= 19968 && cp <= 40959 || cp >= 13312 && cp <= 19903 || cp >= 63744 && cp <= 64255;
|
|
35111
35195
|
}
|
|
@@ -42558,7 +42642,8 @@ function parseRenderStyles(headXml, opts) {
|
|
|
42558
42642
|
const before2024 = opts?.appMajor !== void 0 && opts.appMajor > 0 && opts.appMajor < 13;
|
|
42559
42643
|
const major = opts?.appMajor ?? 0, build = opts?.appBuild ?? 0;
|
|
42560
42644
|
const halfQuote = major === 12 && build >= 4605 || major === 13 && build >= 3901 || major > 13;
|
|
42561
|
-
const
|
|
42645
|
+
const early2024 = major === 13 && build > 0 && build < 3622;
|
|
42646
|
+
const styles = { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map(), ...before2024 ? { before2024 } : {}, ...early2024 ? { early2024 } : {} };
|
|
42562
42647
|
const doc = createXmlParser().parseFromString(headXml, "text/xml");
|
|
42563
42648
|
const root = doc.documentElement;
|
|
42564
42649
|
if (!root) return styles;
|
|
@@ -50318,13 +50403,15 @@ function splitTableRows(tbl2, top, lim, bodyH, styles, notes) {
|
|
|
50318
50403
|
const rows = measureTableRowHeights(tbl2);
|
|
50319
50404
|
if (rows.length === 0) return void 0;
|
|
50320
50405
|
const outT = num2(om, "top");
|
|
50406
|
+
const cap = captionOf(tbl2);
|
|
50407
|
+
const capTop = cap?.side === "TOP" ? cap.h + cap.gap : 0, capBottom = cap?.side === "BOTTOM" ? cap.h + cap.gap : 0;
|
|
50321
50408
|
let headH = 0;
|
|
50322
50409
|
if (tbl2.getAttribute("repeatHeader") === "1") {
|
|
50323
50410
|
const heads = /* @__PURE__ */ new Set();
|
|
50324
50411
|
for (const c of collectCells(tbl2)) if (c.el.getAttribute("header") === "1") for (let r = c.ra; r < c.ra + c.rs; r++) heads.add(r);
|
|
50325
50412
|
for (let r = 0; heads.has(r) && r < rows.length; r++) headH += rows[r];
|
|
50326
50413
|
}
|
|
50327
|
-
let y = top + outT, floor = lim, moved = false;
|
|
50414
|
+
let y = top + outT + capTop, floor = lim, moved = false;
|
|
50328
50415
|
const rowNoteLines = rows.map(() => []);
|
|
50329
50416
|
let allN = 0, allS = 0;
|
|
50330
50417
|
if (notes) for (const c of collectCells(tbl2)) for (const fn of Array.from(c.el.getElementsByTagName("hp:footNote"))) {
|
|
@@ -50347,7 +50434,8 @@ function splitTableRows(tbl2, top, lim, bodyH, styles, notes) {
|
|
|
50347
50434
|
if (mode === "CELL") {
|
|
50348
50435
|
const from = /* @__PURE__ */ new Map(), bases = /* @__PURE__ */ new Map();
|
|
50349
50436
|
while (y + h + outB > fl() && bodyH - outT - outB > 0) {
|
|
50350
|
-
const
|
|
50437
|
+
const fixedRows = tbl2.getAttribute("noAdjust") === "1";
|
|
50438
|
+
const rem = cellRowRemainder(cells, r, fl() - outB - y - (moved ? 100 : 20) - 2 * sp, from, record, bases, carries, styles, bodyH - outT - outB, fl() - outB - y - (fixedRows ? 2 : 101) - 2 * sp, fixedRows);
|
|
50351
50439
|
if (rem === 0 && r === rows.length - 1) break;
|
|
50352
50440
|
if (rem === void 0 || rem + sp + (r === rows.length - 1 ? sp : 0) >= h) {
|
|
50353
50441
|
if (moved && y === outT + headH) break;
|
|
@@ -50377,9 +50465,9 @@ function splitTableRows(tbl2, top, lim, bodyH, styles, notes) {
|
|
|
50377
50465
|
if (record) rebaseSplitCells(record, carries, styles);
|
|
50378
50466
|
if (moved) splitNotesLast = { n: allN, s: Math.max(0, allS - placed) };
|
|
50379
50467
|
splitMovedLast = moved;
|
|
50380
|
-
return y + outB;
|
|
50468
|
+
return y + capBottom + outB;
|
|
50381
50469
|
}
|
|
50382
|
-
function cellRowRemainder(cells, row, avail, from, record, bases, carries, styles, contH = 0, piece = Infinity) {
|
|
50470
|
+
function cellRowRemainder(cells, row, avail, from, record, bases, carries, styles, contH = 0, piece = Infinity, fixedRows = false) {
|
|
50383
50471
|
let rem = 0, any = false, placed = false;
|
|
50384
50472
|
const cuts = [];
|
|
50385
50473
|
for (const c of cells) {
|
|
@@ -50447,7 +50535,7 @@ function cellRowRemainder(cells, row, avail, from, record, bases, carries, style
|
|
|
50447
50535
|
}
|
|
50448
50536
|
cuts.push([c.el, base + lines[k][0], nb]);
|
|
50449
50537
|
rem = Math.max(rem, end + base - nb + c.marginT + c.marginB);
|
|
50450
|
-
if (off === 0 && /^(CENTER|BOTTOM)$/.test(c.sub.getAttribute("vertAlign") ?? "")) rem = Math.max(rem, c.h - piece);
|
|
50538
|
+
if (off === 0 && (fixedRows || /^(CENTER|BOTTOM)$/.test(c.sub.getAttribute("vertAlign") ?? ""))) rem = Math.max(rem, c.h - piece);
|
|
50451
50539
|
}
|
|
50452
50540
|
if (!(any && placed)) return void 0;
|
|
50453
50541
|
for (const [el, v, nb] of cuts) {
|
|
@@ -50976,7 +51064,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
|
|
|
50976
51064
|
const NO_WRAP = 1e9;
|
|
50977
51065
|
const intentPos = geom.marginIntent >= avail ? 0 : Math.max(0, geom.marginIntent);
|
|
50978
51066
|
const firstWrapWidth = squeeze ? NO_WRAP : Math.max(500, avail - (styles.before2024 && bulletW > 0 ? Math.max(intentPos, bulletW) : intentPos + bulletW));
|
|
50979
|
-
const condenseUse = !styles.before2024 && (geom.number || geom.bullet) ? 0 : geom.condense;
|
|
51067
|
+
const condenseUse = !styles.before2024 && !styles.early2024 && (geom.number || geom.bullet) ? 0 : geom.condense;
|
|
50980
51068
|
for (const r of rightTabFit) {
|
|
50981
51069
|
const edge = avail - bulletW;
|
|
50982
51070
|
if (r.x + widths[r.wi] + r.after > edge && edge - r.x - r.after >= 0) widths[r.wi] = edge - r.x - r.after;
|
|
@@ -51232,7 +51320,8 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
|
|
|
51232
51320
|
}
|
|
51233
51321
|
return m.objs.some((o) => o.inline && o.tag === "equation" && lineOf(o.index) === li);
|
|
51234
51322
|
})();
|
|
51235
|
-
const
|
|
51323
|
+
const endH = li === wrap.starts.length - 1 && lineObjH[li] > 0 && lineObjH[li] < textH && !m.chars.slice(textposOf[li]).some((c) => c.ch && c.ch.trim() !== "") && m.objs.some((o) => o.inline && o.tag === "tbl" && lineOf(o.index) === li) ? heightOf(m.runs[m.runs.length - 1]?.prId ?? null) : -1;
|
|
51324
|
+
const lineH = objOnly ? lineObjH[li] : endH >= 0 ? Math.max(lineObjH[li], endH) : Math.max(textH, lineObjH[li]);
|
|
51236
51325
|
const spBase = lineObjLs[li] || geom.lineSpacingType === "FIXED" ? lineH : textH;
|
|
51237
51326
|
const spacing = pitchFor(spBase, geom) - spBase;
|
|
51238
51327
|
if (band && v < band[1] && v + lineH > band[0]) v = band[1];
|
|
@@ -51254,7 +51343,7 @@ function reflowPara(p, doc, styles, areaW, startV, mode, zones = [], nums = /* @
|
|
|
51254
51343
|
seg.setAttribute("vertpos", String(vertpos));
|
|
51255
51344
|
seg.setAttribute("vertsize", String(emptyBorder ? textH0 : occupiedH === textH && boxAll > textH0 ? Math.max(textH0, boxTop) : occupiedH));
|
|
51256
51345
|
seg.setAttribute("textheight", String(lineH));
|
|
51257
|
-
seg.setAttribute("baseline", String(geom.vertAlign === "TOP" ? 0 : geom.vertAlign === "CENTER" || verticalCenter && (!geom.vertAlign || geom.vertAlign === "BASELINE") ? Math.floor(lineH / 2) : geom.vertAlign === "BOTTOM" ? lineH : Math.max(fl ? fl[1] : Math.round(textH0 * BASELINE_RATIO), boxTop > textH0 ? Math.round(boxTop * BASELINE_RATIO) : 0, lineObjAsc[li])));
|
|
51346
|
+
seg.setAttribute("baseline", String(geom.vertAlign === "TOP" ? 0 : geom.vertAlign === "CENTER" || verticalCenter && (!geom.vertAlign || geom.vertAlign === "BASELINE") ? Math.floor(lineH / 2) : geom.vertAlign === "BOTTOM" ? lineH : endH >= 0 ? Math.max(Math.round(endH * BASELINE_RATIO), lineObjAsc[li]) : Math.max(fl ? fl[1] : Math.round(textH0 * BASELINE_RATIO), boxTop > textH0 ? Math.round(boxTop * BASELINE_RATIO) : 0, lineObjAsc[li])));
|
|
51258
51347
|
seg.setAttribute("spacing", String(spacing));
|
|
51259
51348
|
let box = boxAt(li);
|
|
51260
51349
|
const fit = wrap.starts.length === 1 && lineObjH[li] === 0 ? lineParts[li]?.filter(([a, b]) => b - a >= 1440) : void 0;
|
|
@@ -51552,7 +51641,7 @@ function reflowBlockFlow(container, doc, styles, areaW, mode, counter, bodyH) {
|
|
|
51552
51641
|
} else {
|
|
51553
51642
|
cursorV = (res.floatFloor > 0 && off === 0 ? res.textBottom : res.paraBottom) + off;
|
|
51554
51643
|
if (res.floatFloor > 0 && off === 0) floatFloor = res.floatFloor;
|
|
51555
|
-
const split = bodyH > 0 && off === 0 && (res.paraBottom > lim || squareTableOver(p, startV, lim)) ? splitFloatTableRemainder(p, startV, limOwn, bodyH, styles, false, { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea }) : void 0;
|
|
51644
|
+
const split = bodyH > 0 && off === 0 && (res.paraBottom > lim || squareTableOver(p, startV, lim)) ? splitFloatTableRemainder(p, startV - (g3?.spaceBefore ?? 0), limOwn, bodyH, styles, false, { n0: pageNotes + fnsOwn.length, s0: pageFoot + ownSum, area: footArea }) : void 0;
|
|
51556
51645
|
const tEl = split !== void 0 && splitWhole ? m0Objs(p) : void 0;
|
|
51557
51646
|
const tVo = tEl ? num3(findChildByLocalName(tEl, "pos"), "vertOffset") : 0;
|
|
51558
51647
|
const tOm = tEl ? findChildByLocalName(tEl, "outMargin") : null;
|
|
@@ -54816,7 +54905,7 @@ function scriptsOff(r, off) {
|
|
|
54816
54905
|
}
|
|
54817
54906
|
async function parseImage(buffer, options) {
|
|
54818
54907
|
try {
|
|
54819
|
-
const { parseImageDocument } = await import("./image-ocr-
|
|
54908
|
+
const { parseImageDocument } = await import("./image-ocr-WSRZMXYM.js");
|
|
54820
54909
|
const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
|
|
54821
54910
|
stripScriptTags({ blocks });
|
|
54822
54911
|
return {
|
|
@@ -54880,7 +54969,7 @@ async function parseHwp(buffer, options) {
|
|
|
54880
54969
|
async function parsePdf(buffer, options) {
|
|
54881
54970
|
let parsePdfDocument;
|
|
54882
54971
|
try {
|
|
54883
|
-
const mod = await import("./parser-
|
|
54972
|
+
const mod = await import("./parser-TW2QXVZR.js");
|
|
54884
54973
|
parsePdfDocument = mod.parsePdfDocument;
|
|
54885
54974
|
} catch {
|
|
54886
54975
|
return {
|