kordoc 4.24.47 → 4.24.49

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 (216) hide show
  1. package/NOTICE +21 -0
  2. package/README.md +4 -4
  3. package/dist/{-PWMZE4CC.js → -22V6D2US.js} +42 -42
  4. package/dist/{chunk-RQ4XTX4J.cjs → chunk-2UWWWM4Q.cjs} +98 -98
  5. package/dist/{chunk-RQ4XTX4J.cjs.map → chunk-2UWWWM4Q.cjs.map} +1 -1
  6. package/dist/{chunk-3CWVQNFL.cjs → chunk-367WLMPO.cjs} +59 -67
  7. package/dist/chunk-367WLMPO.cjs.map +1 -0
  8. package/dist/{chunk-Z5TDZDWU.js → chunk-4HJKBRZJ.js} +153 -50
  9. package/dist/chunk-4HJKBRZJ.js.map +1 -0
  10. package/dist/{chunk-GRQXAWNW.js → chunk-4MWUBTAE.js} +2 -2
  11. package/dist/{chunk-TN5ZK2WN.js → chunk-67GSFYG7.js} +2 -2
  12. package/dist/{chunk-TGLXN6VH.js → chunk-6BFWLS7E.js} +3 -3
  13. package/dist/{chunk-X7RBVVDC.cjs → chunk-6NZ32OTX.cjs} +9 -3
  14. package/dist/chunk-6NZ32OTX.cjs.map +1 -0
  15. package/dist/{chunk-Q3UCWUEV.js → chunk-7KKL3PRK.js} +5 -13
  16. package/dist/chunk-7KKL3PRK.js.map +1 -0
  17. package/dist/{chunk-T5J4GW6B.js → chunk-AUAJVQQK.js} +2 -2
  18. package/dist/{chunk-KIVWAZKL.js → chunk-AXW2FMVR.js} +2 -2
  19. package/dist/{chunk-LEUAWTMU.js → chunk-CCQMSIZQ.js} +19 -19
  20. package/dist/{chunk-PM46GSMV.js → chunk-DA5AXURC.js} +194 -6
  21. package/dist/chunk-DA5AXURC.js.map +1 -0
  22. package/dist/{chunk-SUIH5LY7.js → chunk-DAAJO62F.js} +2 -2
  23. package/dist/{chunk-4MNRUPS5.js → chunk-EUJX7HTR.js} +53 -10
  24. package/dist/chunk-EUJX7HTR.js.map +1 -0
  25. package/dist/{chunk-56FEGA44.js → chunk-EYSXMDA7.js} +17 -17
  26. package/dist/{chunk-VKVDMH7X.js → chunk-FU6ZDWCI.js} +8 -2
  27. package/dist/chunk-FU6ZDWCI.js.map +1 -0
  28. package/dist/{chunk-KSE5HSU3.js → chunk-HETGOJ6V.js} +8 -5
  29. package/dist/chunk-HETGOJ6V.js.map +1 -0
  30. package/dist/{chunk-HFQFCAEJ.js → chunk-HW7WVYBF.js} +2 -2
  31. package/dist/{chunk-O2652KK3.cjs → chunk-IRAZCKQ6.cjs} +3 -3
  32. package/dist/{chunk-O2652KK3.cjs.map → chunk-IRAZCKQ6.cjs.map} +1 -1
  33. package/dist/{chunk-AB7MYMPZ.js → chunk-KB4ORA7M.js} +2 -2
  34. package/dist/{chunk-57BKTVR5.js → chunk-KXHUHGMC.js} +2 -2
  35. package/dist/{chunk-YLYSJSEP.js → chunk-L3JP55ZY.js} +2 -2
  36. package/dist/{chunk-2CBIY2OH.js → chunk-LCRSRVFJ.js} +2 -2
  37. package/dist/{chunk-2CBIY2OH.js.map → chunk-LCRSRVFJ.js.map} +1 -1
  38. package/dist/{chunk-IPXFIH5E.js → chunk-LFFARZYZ.js} +8 -5
  39. package/dist/chunk-LFFARZYZ.js.map +1 -0
  40. package/dist/{chunk-BO2IJGNZ.js → chunk-LOSCIAHY.js} +2 -2
  41. package/dist/{chunk-SQ5Q4Q3R.js → chunk-M5RQ2PNP.js} +6 -14
  42. package/dist/chunk-M5RQ2PNP.js.map +1 -0
  43. package/dist/{chunk-MOWJOFIH.js → chunk-MIJTZKWF.js} +2 -2
  44. package/dist/chunk-MLBX6KQM.js +153 -0
  45. package/dist/chunk-MLBX6KQM.js.map +1 -0
  46. package/dist/{chunk-HMD35PMD.js → chunk-OAETOHH3.js} +3 -3
  47. package/dist/{chunk-IWC6PTMT.js → chunk-PMGJQWSW.js} +2 -2
  48. package/dist/{chunk-LMHE4HDR.cjs → chunk-PVV6OY4M.cjs} +286 -98
  49. package/dist/chunk-PVV6OY4M.cjs.map +1 -0
  50. package/dist/{chunk-BKK2SMVM.cjs → chunk-PW7MQZI4.cjs} +2 -2
  51. package/dist/{chunk-BKK2SMVM.cjs.map → chunk-PW7MQZI4.cjs.map} +1 -1
  52. package/dist/{chunk-NYIJU4Q6.js → chunk-Q7FDPJUS.js} +10 -10
  53. package/dist/{chunk-FI7ULBC6.js → chunk-R2RLNUNK.js} +6 -6
  54. package/dist/{chunk-AO3YFJVW.js → chunk-RQLEGKEV.js} +2 -2
  55. package/dist/{chunk-OAKJNKAS.js → chunk-S54DZB2Z.js} +193 -5
  56. package/dist/chunk-S54DZB2Z.js.map +1 -0
  57. package/dist/{chunk-A67OXFXM.js → chunk-TAHS42ED.js} +54 -11
  58. package/dist/chunk-TAHS42ED.js.map +1 -0
  59. package/dist/{chunk-WAFJUSUF.cjs → chunk-TQOAPKLU.cjs} +11 -8
  60. package/dist/chunk-TQOAPKLU.cjs.map +1 -0
  61. package/dist/{chunk-UFY6XX4U.cjs → chunk-UBY2PLKR.cjs} +75 -32
  62. package/dist/chunk-UBY2PLKR.cjs.map +1 -0
  63. package/dist/{chunk-U556XJW6.js → chunk-UJELMNOU.js} +8 -2
  64. package/dist/chunk-UJELMNOU.js.map +1 -0
  65. package/dist/{chunk-FOTG4MMD.js → chunk-UU54HN5I.js} +6 -6
  66. package/dist/{chunk-BP5GDQBT.js → chunk-VMOUAWGD.js} +7 -7
  67. package/dist/{chunk-2VXVBB5Q.js → chunk-WLFZOBZR.js} +3 -3
  68. package/dist/chunk-Y4MFHEK4.cjs +156 -0
  69. package/dist/chunk-Y4MFHEK4.cjs.map +1 -0
  70. package/dist/{chunk-VL43TUO6.js → chunk-Y6QW3FJQ.js} +2 -2
  71. package/dist/chunk-ZF24SO45.js +154 -0
  72. package/dist/chunk-ZF24SO45.js.map +1 -0
  73. package/dist/chunks-Q7242OJE.js +11 -0
  74. package/dist/cli.js +74 -53
  75. package/dist/cli.js.map +1 -1
  76. package/dist/{formula-W5MTLANP.js → formula-BYEDWWZU.js} +4 -4
  77. package/dist/{formula-2BQBGPM2.js → formula-FQLMMBDP.js} +3 -3
  78. package/dist/{formula-V6CNOC4G.cjs → formula-QJEOIVKR.cjs} +9 -9
  79. package/dist/{formula-V6CNOC4G.cjs.map → formula-QJEOIVKR.cjs.map} +1 -1
  80. package/dist/generator-FTM6GOGB.cjs +11 -0
  81. package/dist/{generator-U2BRFTJ4.cjs.map → generator-FTM6GOGB.cjs.map} +1 -1
  82. package/dist/generator-Q3L7RNUY.js +17 -0
  83. package/dist/generator-SU73HZHR.js +10 -0
  84. package/dist/{image-ocr-COBRSG6O.js → image-ocr-7Y3FCGRR.js} +12 -10
  85. package/dist/image-ocr-7Y3FCGRR.js.map +1 -0
  86. package/dist/{image-ocr-2WSZULNO.js → image-ocr-VIGZE4YL.js} +9 -7
  87. package/dist/image-ocr-VIGZE4YL.js.map +1 -0
  88. package/dist/{image-ocr-MVOSHIY5.cjs → image-ocr-WRILL3WO.cjs} +29 -27
  89. package/dist/image-ocr-WRILL3WO.cjs.map +1 -0
  90. package/dist/index.cjs +1645 -1542
  91. package/dist/index.cjs.map +1 -1
  92. package/dist/index.d.cts +18 -5
  93. package/dist/index.d.ts +18 -5
  94. package/dist/index.js +231 -128
  95. package/dist/index.js.map +1 -1
  96. package/dist/mcp.js +42 -43
  97. package/dist/mcp.js.map +1 -1
  98. package/dist/memo-T5ZQEXEA.js +17 -0
  99. package/dist/{model-bundle-LFLRW2SI.js → model-bundle-UJRQPYUU.js} +5 -5
  100. package/dist/{models-UGOWUUAL.js → models-64YLAWTI.js} +5 -5
  101. package/dist/{parse-worker-v2-LCCTZWPT.js → parse-worker-v2-QWQZKFQO.js} +26 -24
  102. package/dist/parse-worker-v2-QWQZKFQO.js.map +1 -0
  103. package/dist/{parser-JAL2OOOL.js → parser-JPWANPLM.js} +428 -42
  104. package/dist/parser-JPWANPLM.js.map +1 -0
  105. package/dist/{parser-RE52HQXO.cjs → parser-RB6CBNAM.cjs} +720 -334
  106. package/dist/parser-RB6CBNAM.cjs.map +1 -0
  107. package/dist/{parser-J56FGU6P.js → parser-XFU3VRWM.js} +431 -45
  108. package/dist/parser-XFU3VRWM.js.map +1 -0
  109. package/dist/pdf-ocr-NOJHEH4M.cjs +42 -0
  110. package/dist/{pdf-ocr-5O336TCR.cjs.map → pdf-ocr-NOJHEH4M.cjs.map} +1 -1
  111. package/dist/{pdf-ocr-PQZZVFI5.js → pdf-ocr-XTZZEYKJ.js} +6 -6
  112. package/dist/{pdf-ocr-NQ3HAL77.js → pdf-ocr-ZV3KYIIE.js} +9 -9
  113. package/dist/{profile-io-K22CB2ZB.js → profile-io-FAJORRD2.js} +3 -3
  114. package/dist/{rasterize-A6B5K4QN.js → rasterize-4ZJUA2DZ.js} +3 -3
  115. package/dist/{redact-doc-TPXMML5Q.js → redact-doc-JPNROEH6.js} +30 -30
  116. package/dist/{render-ROFIMWW5.js → render-D4WBOBKI.js} +13 -13
  117. package/dist/{rewrite-fallback-WG7Z3LR3.js → rewrite-fallback-OF3QI6CX.js} +14 -14
  118. package/dist/seal-DQWEHIAM.js +16 -0
  119. package/dist/{setup-J5SHDFIE.js → setup-YC25YCQB.js} +3 -3
  120. package/dist/to-hwpx-D7OMPDUQ.js +21 -0
  121. package/dist/to-hwpx-LUA6F5RR.cjs +16 -0
  122. package/dist/{to-hwpx-RWDQB3T2.cjs.map → to-hwpx-LUA6F5RR.cjs.map} +1 -1
  123. package/dist/{to-hwpx-X7JE6YJB.js → to-hwpx-ZWN64NCQ.js} +5 -5
  124. package/dist/visual-SW7NPY6K.js +37 -0
  125. package/dist/{watch-WZBW6UE7.js → watch-ZU576VSR.js} +24 -24
  126. package/package.json +3 -2
  127. package/dist/chunk-3CWVQNFL.cjs.map +0 -1
  128. package/dist/chunk-4MNRUPS5.js.map +0 -1
  129. package/dist/chunk-A67OXFXM.js.map +0 -1
  130. package/dist/chunk-AYM7XTI2.js +0 -31
  131. package/dist/chunk-AYM7XTI2.js.map +0 -1
  132. package/dist/chunk-CQ33HCSU.js +0 -32
  133. package/dist/chunk-CQ33HCSU.js.map +0 -1
  134. package/dist/chunk-IPXFIH5E.js.map +0 -1
  135. package/dist/chunk-KSE5HSU3.js.map +0 -1
  136. package/dist/chunk-LMHE4HDR.cjs.map +0 -1
  137. package/dist/chunk-OAKJNKAS.js.map +0 -1
  138. package/dist/chunk-PM46GSMV.js.map +0 -1
  139. package/dist/chunk-Q3UCWUEV.js.map +0 -1
  140. package/dist/chunk-SQ5Q4Q3R.js.map +0 -1
  141. package/dist/chunk-U556XJW6.js.map +0 -1
  142. package/dist/chunk-UFY6XX4U.cjs.map +0 -1
  143. package/dist/chunk-VKVDMH7X.js.map +0 -1
  144. package/dist/chunk-WAFJUSUF.cjs.map +0 -1
  145. package/dist/chunk-WPLAEJU5.cjs +0 -31
  146. package/dist/chunk-WPLAEJU5.cjs.map +0 -1
  147. package/dist/chunk-X7RBVVDC.cjs.map +0 -1
  148. package/dist/chunk-Z5TDZDWU.js.map +0 -1
  149. package/dist/chunks-SHXTE5HM.js +0 -11
  150. package/dist/generator-E4VQKPRP.js +0 -10
  151. package/dist/generator-MBR4V3JQ.js +0 -17
  152. package/dist/generator-U2BRFTJ4.cjs +0 -11
  153. package/dist/hancom-7SU4XBXJ.js +0 -84
  154. package/dist/hancom-7SU4XBXJ.js.map +0 -1
  155. package/dist/hancom-MP7D7HWW.cjs +0 -85
  156. package/dist/hancom-MP7D7HWW.cjs.map +0 -1
  157. package/dist/hancom-RNJWH63M.js +0 -85
  158. package/dist/hancom-RNJWH63M.js.map +0 -1
  159. package/dist/image-ocr-2WSZULNO.js.map +0 -1
  160. package/dist/image-ocr-COBRSG6O.js.map +0 -1
  161. package/dist/image-ocr-MVOSHIY5.cjs.map +0 -1
  162. package/dist/memo-QJ5RKTBN.js +0 -17
  163. package/dist/parse-worker-v2-LCCTZWPT.js.map +0 -1
  164. package/dist/parser-J56FGU6P.js.map +0 -1
  165. package/dist/parser-JAL2OOOL.js.map +0 -1
  166. package/dist/parser-RE52HQXO.cjs.map +0 -1
  167. package/dist/pdf-ocr-5O336TCR.cjs +0 -42
  168. package/dist/seal-35U76WY2.js +0 -16
  169. package/dist/to-hwpx-RWDQB3T2.cjs +0 -16
  170. package/dist/to-hwpx-XQULU2I7.js +0 -21
  171. package/dist/visual-4HRP2VIH.js +0 -37
  172. /package/dist/{-PWMZE4CC.js.map → -22V6D2US.js.map} +0 -0
  173. /package/dist/{chunk-GRQXAWNW.js.map → chunk-4MWUBTAE.js.map} +0 -0
  174. /package/dist/{chunk-TN5ZK2WN.js.map → chunk-67GSFYG7.js.map} +0 -0
  175. /package/dist/{chunk-TGLXN6VH.js.map → chunk-6BFWLS7E.js.map} +0 -0
  176. /package/dist/{chunk-T5J4GW6B.js.map → chunk-AUAJVQQK.js.map} +0 -0
  177. /package/dist/{chunk-KIVWAZKL.js.map → chunk-AXW2FMVR.js.map} +0 -0
  178. /package/dist/{chunk-LEUAWTMU.js.map → chunk-CCQMSIZQ.js.map} +0 -0
  179. /package/dist/{chunk-SUIH5LY7.js.map → chunk-DAAJO62F.js.map} +0 -0
  180. /package/dist/{chunk-56FEGA44.js.map → chunk-EYSXMDA7.js.map} +0 -0
  181. /package/dist/{chunk-HFQFCAEJ.js.map → chunk-HW7WVYBF.js.map} +0 -0
  182. /package/dist/{chunk-AB7MYMPZ.js.map → chunk-KB4ORA7M.js.map} +0 -0
  183. /package/dist/{chunk-57BKTVR5.js.map → chunk-KXHUHGMC.js.map} +0 -0
  184. /package/dist/{chunk-YLYSJSEP.js.map → chunk-L3JP55ZY.js.map} +0 -0
  185. /package/dist/{chunk-BO2IJGNZ.js.map → chunk-LOSCIAHY.js.map} +0 -0
  186. /package/dist/{chunk-MOWJOFIH.js.map → chunk-MIJTZKWF.js.map} +0 -0
  187. /package/dist/{chunk-HMD35PMD.js.map → chunk-OAETOHH3.js.map} +0 -0
  188. /package/dist/{chunk-IWC6PTMT.js.map → chunk-PMGJQWSW.js.map} +0 -0
  189. /package/dist/{chunk-NYIJU4Q6.js.map → chunk-Q7FDPJUS.js.map} +0 -0
  190. /package/dist/{chunk-FI7ULBC6.js.map → chunk-R2RLNUNK.js.map} +0 -0
  191. /package/dist/{chunk-AO3YFJVW.js.map → chunk-RQLEGKEV.js.map} +0 -0
  192. /package/dist/{chunk-FOTG4MMD.js.map → chunk-UU54HN5I.js.map} +0 -0
  193. /package/dist/{chunk-BP5GDQBT.js.map → chunk-VMOUAWGD.js.map} +0 -0
  194. /package/dist/{chunk-2VXVBB5Q.js.map → chunk-WLFZOBZR.js.map} +0 -0
  195. /package/dist/{chunk-VL43TUO6.js.map → chunk-Y6QW3FJQ.js.map} +0 -0
  196. /package/dist/{chunks-SHXTE5HM.js.map → chunks-Q7242OJE.js.map} +0 -0
  197. /package/dist/{formula-W5MTLANP.js.map → formula-BYEDWWZU.js.map} +0 -0
  198. /package/dist/{formula-2BQBGPM2.js.map → formula-FQLMMBDP.js.map} +0 -0
  199. /package/dist/{generator-E4VQKPRP.js.map → generator-Q3L7RNUY.js.map} +0 -0
  200. /package/dist/{generator-MBR4V3JQ.js.map → generator-SU73HZHR.js.map} +0 -0
  201. /package/dist/{memo-QJ5RKTBN.js.map → memo-T5ZQEXEA.js.map} +0 -0
  202. /package/dist/{model-bundle-LFLRW2SI.js.map → model-bundle-UJRQPYUU.js.map} +0 -0
  203. /package/dist/{models-UGOWUUAL.js.map → models-64YLAWTI.js.map} +0 -0
  204. /package/dist/{pdf-ocr-NQ3HAL77.js.map → pdf-ocr-XTZZEYKJ.js.map} +0 -0
  205. /package/dist/{pdf-ocr-PQZZVFI5.js.map → pdf-ocr-ZV3KYIIE.js.map} +0 -0
  206. /package/dist/{profile-io-K22CB2ZB.js.map → profile-io-FAJORRD2.js.map} +0 -0
  207. /package/dist/{rasterize-A6B5K4QN.js.map → rasterize-4ZJUA2DZ.js.map} +0 -0
  208. /package/dist/{redact-doc-TPXMML5Q.js.map → redact-doc-JPNROEH6.js.map} +0 -0
  209. /package/dist/{render-ROFIMWW5.js.map → render-D4WBOBKI.js.map} +0 -0
  210. /package/dist/{rewrite-fallback-WG7Z3LR3.js.map → rewrite-fallback-OF3QI6CX.js.map} +0 -0
  211. /package/dist/{seal-35U76WY2.js.map → seal-DQWEHIAM.js.map} +0 -0
  212. /package/dist/{setup-J5SHDFIE.js.map → setup-YC25YCQB.js.map} +0 -0
  213. /package/dist/{to-hwpx-X7JE6YJB.js.map → to-hwpx-D7OMPDUQ.js.map} +0 -0
  214. /package/dist/{to-hwpx-XQULU2I7.js.map → to-hwpx-ZWN64NCQ.js.map} +0 -0
  215. /package/dist/{visual-4HRP2VIH.js.map → visual-SW7NPY6K.js.map} +0 -0
  216. /package/dist/{watch-WZBW6UE7.js.map → watch-ZU576VSR.js.map} +0 -0
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- extractRenderedRegions,
4
- renderDocumentToScene
5
- } from "./chunk-NYIJU4Q6.js";
6
- import {
7
- blocksToPages
8
- } from "./chunk-CQ33HCSU.js";
3
+ WEBP_OPTIONS,
4
+ blocksToPages,
5
+ loadSharp,
6
+ readImageQrCodes,
7
+ toBuffer
8
+ } from "./chunk-ZF24SO45.js";
9
9
  import {
10
10
  applyCellEdit,
11
11
  buildOrigUnits,
@@ -18,7 +18,7 @@ import {
18
18
  resolveParagraphMappings,
19
19
  resolveSectionEntryNames,
20
20
  stripCellTokens
21
- } from "./chunk-56FEGA44.js";
21
+ } from "./chunk-EYSXMDA7.js";
22
22
  import {
23
23
  TOTAL_LABEL_RE,
24
24
  comResultToParseResult,
@@ -47,10 +47,10 @@ import {
47
47
  summarize,
48
48
  textProfile,
49
49
  topLevelParagraphs
50
- } from "./chunk-LEUAWTMU.js";
50
+ } from "./chunk-CCQMSIZQ.js";
51
51
  import {
52
52
  patchZipEntries
53
- } from "./chunk-VL43TUO6.js";
53
+ } from "./chunk-Y6QW3FJQ.js";
54
54
  import {
55
55
  ANNOTATION_BLANK_RE,
56
56
  ValueCursor,
@@ -77,6 +77,10 @@ import {
77
77
  scanInlineSegments,
78
78
  scanSectionXml
79
79
  } from "./chunk-3AHL6YEA.js";
80
+ import {
81
+ extractRenderedRegions,
82
+ renderDocumentToScene
83
+ } from "./chunk-Q7FDPJUS.js";
80
84
  import {
81
85
  MAX_DECOMPRESS_SIZE,
82
86
  MAX_XML_DEPTH,
@@ -87,7 +91,7 @@ import {
87
91
  localName,
88
92
  rawTextContent,
89
93
  readZipEntry
90
- } from "./chunk-AB7MYMPZ.js";
94
+ } from "./chunk-KB4ORA7M.js";
91
95
  import {
92
96
  INLINE_TABLE_MARK,
93
97
  blocksPlainText,
@@ -100,11 +104,13 @@ import {
100
104
  memosMarkdown,
101
105
  parseHwp5Document,
102
106
  resolveImageBlocks
103
- } from "./chunk-FOTG4MMD.js";
107
+ } from "./chunk-UU54HN5I.js";
104
108
  import {
109
+ MAX_PIXELS,
105
110
  bmpToPng,
111
+ bmpToRgba,
106
112
  inlineImagesIntoMarkdown
107
- } from "./chunk-VKVDMH7X.js";
113
+ } from "./chunk-FU6ZDWCI.js";
108
114
  import {
109
115
  parsePageRange
110
116
  } from "./chunk-VQFA55IC.js";
@@ -125,7 +131,7 @@ import {
125
131
  stripScriptTags,
126
132
  tidyScriptTags,
127
133
  wrapScript
128
- } from "./chunk-2CBIY2OH.js";
134
+ } from "./chunk-LCRSRVFJ.js";
129
135
  import {
130
136
  MAX_COLS,
131
137
  MAX_ROWS,
@@ -136,7 +142,7 @@ import {
136
142
  flattenLayoutTables,
137
143
  hasStructuredCellContent,
138
144
  sanitizeText
139
- } from "./chunk-KSE5HSU3.js";
145
+ } from "./chunk-HETGOJ6V.js";
140
146
  import {
141
147
  hangulAmount,
142
148
  mapPuaText
@@ -152,7 +158,7 @@ import {
152
158
  stripDtd,
153
159
  toArrayBuffer,
154
160
  unzipLimitBytes
155
- } from "./chunk-57BKTVR5.js";
161
+ } from "./chunk-KXHUHGMC.js";
156
162
 
157
163
  // src/table/visual.ts
158
164
  import { readFile as readFile2 } from "fs/promises";
@@ -15402,7 +15408,7 @@ async function parseHeaderFooterBlocks(zip, doc, rels, kind, styles, numbering,
15402
15408
  return out;
15403
15409
  }
15404
15410
  async function parseDocxDocument(buffer, options) {
15405
- const readImages = options?.images !== false;
15411
+ const readImages = options?.images !== false || !!options?.qrCodes;
15406
15412
  precheckZipSize(buffer, MAX_DECOMPRESS_SIZE4, void 0, { re: MEDIA_PART_RE, skip: !readImages, never: NEVER_READ_RE });
15407
15413
  const zip = await JSZip2.loadAsync(buffer);
15408
15414
  const warnings = [];
@@ -15736,7 +15742,7 @@ async function pictureBlock(pic, ctx) {
15736
15742
  const ext = partExtension(rel.target);
15737
15743
  filename = `image_${String(ctx.imageNames.size + 1).padStart(3, "0")}.${ext}`;
15738
15744
  try {
15739
- if (ctx.options?.images !== false) {
15745
+ if (ctx.options?.images !== false || ctx.options?.qrCodes) {
15740
15746
  const data = await readZipEntry(file, "uint8array");
15741
15747
  ctx.images.push({ filename, data, mimeType: IMAGE_MIME[ext] ?? detectImageMime(data) ?? "application/octet-stream", source: rel.target });
15742
15748
  }
@@ -15811,7 +15817,7 @@ async function notesText(zip, rels) {
15811
15817
  return texts.join(" ");
15812
15818
  }
15813
15819
  async function parsePptxDocument(buffer, options) {
15814
- precheckZipSize(buffer, MAX_DECOMPRESS_SIZE5, MAX_ZIP_ENTRIES, { re: MEDIA_PART_RE2, skip: options?.images === false, never: NEVER_READ_RE2 });
15820
+ precheckZipSize(buffer, MAX_DECOMPRESS_SIZE5, MAX_ZIP_ENTRIES, { re: MEDIA_PART_RE2, skip: options?.images === false && !options?.qrCodes, never: NEVER_READ_RE2 });
15815
15821
  const zip = await JSZip3.loadAsync(buffer);
15816
15822
  if (!zip.file("ppt/presentation.xml")) {
15817
15823
  throw new KordocError("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 PPTX \uD30C\uC77C: ppt/presentation.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
@@ -16883,7 +16889,7 @@ var MIN_SIDE = 24;
16883
16889
  async function ocrEmbeddedImages(blocks, options, warnings) {
16884
16890
  const ocr = options?.ocr;
16885
16891
  if (ocr !== true && ocr !== "force" && typeof ocr !== "function") return false;
16886
- const { parseImageDocument } = await import("./image-ocr-COBRSG6O.js");
16892
+ const { parseImageDocument } = await import("./image-ocr-7Y3FCGRR.js");
16887
16893
  let inserted = false, unreadable = 0;
16888
16894
  let failed = null;
16889
16895
  const walk = async (list, depth) => {
@@ -16938,6 +16944,79 @@ async function tooSmall(bytes) {
16938
16944
  }
16939
16945
  }
16940
16946
 
16947
+ // src/image/format.ts
16948
+ var MIME = { png: "image/png", webp: "image/webp" };
16949
+ function isFormat(b, format2) {
16950
+ if (format2 === "png") return b[0] === 137 && b[1] === 80 && b[2] === 78 && b[3] === 71;
16951
+ return b.length >= 12 && b[0] === 82 && b[1] === 73 && b[2] === 70 && b[3] === 70 && b[8] === 87 && b[9] === 69 && b[10] === 66 && b[11] === 80;
16952
+ }
16953
+ var plain = (b) => b && new Uint8Array(b.buffer, b.byteOffset, b.byteLength);
16954
+ async function convert(sharp, img, format2) {
16955
+ if (isFormat(img.data, format2)) return img.data;
16956
+ if (img.data[0] === 66 && img.data[1] === 77) {
16957
+ if (format2 === "png") return bmpToPng(img.data);
16958
+ const px = bmpToRgba(img.data);
16959
+ if (!px || !sharp) return null;
16960
+ return plain(await sharp(toBuffer(px.data), { raw: { width: px.width, height: px.height, channels: 4 } }).webp(WEBP_OPTIONS).toBuffer().catch(() => null));
16961
+ }
16962
+ if (!sharp) return null;
16963
+ const out = sharp(toBuffer(img.data), { limitInputPixels: MAX_PIXELS }).rotate();
16964
+ return plain(await (format2 === "png" ? out.png() : out.webp(WEBP_OPTIONS)).toBuffer().catch(() => null));
16965
+ }
16966
+ async function convertImages(blocks, images, format2, warnings) {
16967
+ const sharp = await loadSharp();
16968
+ const names = new Set(images.map((i) => i.filename));
16969
+ const renamed = /* @__PURE__ */ new Map();
16970
+ const kept = [];
16971
+ for (const img of images) {
16972
+ const name = img.filename.replace(/\.[^./]*$/, "") + "." + format2;
16973
+ const data = await convert(sharp, img, format2);
16974
+ if (!data || name !== img.filename && names.has(name)) {
16975
+ kept.push(img.mimeType);
16976
+ continue;
16977
+ }
16978
+ if (name !== img.filename) {
16979
+ renamed.set(img.filename, img);
16980
+ names.add(name);
16981
+ }
16982
+ Object.assign(img, { filename: name, data, mimeType: MIME[format2] });
16983
+ }
16984
+ if (kept.length) {
16985
+ const byMime = [...new Set(kept)].map((m) => `${m} ${kept.filter((k) => k === m).length}`).join(", ");
16986
+ warnings.push({ code: "SKIPPED_IMAGE", message: `\uADF8\uB9BC ${kept.length}\uAC1C\uB294 ${format2.toUpperCase()} \uB85C \uBC14\uAFB8\uC9C0 \uBABB\uD574 \uC6D0\uBCF8 \uD615\uC2DD\uC73C\uB85C \uB0C8\uC2B5\uB2C8\uB2E4 (${byMime})${sharp ? "" : " \u2014 optional dependency 'sharp' \uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"}` });
16987
+ }
16988
+ const byName = new Map(images.map((i) => [i.filename, i]));
16989
+ const fix = (s) => s.includes("![image](") ? s.replace(/!\[image\]\(([^()\s]+)\)/g, (m, name) => {
16990
+ const img = renamed.get(name);
16991
+ return img ? `![image](${img.filename})` : m;
16992
+ }) : s;
16993
+ const walk = (list, depth) => {
16994
+ if (!list || depth > 64) return;
16995
+ for (const b of list) {
16996
+ if (b.type === "image" && b.text) {
16997
+ const img = renamed.get(b.text) ?? byName.get(b.text);
16998
+ if (img) {
16999
+ b.text = img.filename;
17000
+ if (b.imageData) b.imageData = { ...b.imageData, data: img.data, mimeType: img.mimeType };
17001
+ }
17002
+ } else if (b.text) b.text = fix(b.text);
17003
+ if (b.footnoteText) b.footnoteText = fix(b.footnoteText);
17004
+ walk(b.children, depth + 1);
17005
+ walk(b.footnoteBlocks, depth + 1);
17006
+ if (b.table) {
17007
+ if (b.table.caption) b.table.caption = fix(b.table.caption);
17008
+ for (const row of b.table.cells) for (const cell of row) {
17009
+ cell.text = fix(cell.text);
17010
+ walk(cell.blocks, depth + 1);
17011
+ }
17012
+ walk(b.table.captionBlocks, depth + 1);
17013
+ }
17014
+ }
17015
+ };
17016
+ walk(blocks, 0);
17017
+ return renamed.size > 0;
17018
+ }
17019
+
16941
17020
  // src/table/classifier.ts
16942
17021
  var DIAGRAM_KEYWORDS = /조직도|비상\s*연락망|연락망|체계도|업무\s*체계도|기구표|배치도|흐름도|추진\s*체계/u;
16943
17022
  var KEYWORD_GATE = 0.3;
@@ -17334,12 +17413,12 @@ function protoStyle(xml, ix) {
17334
17413
  if (!p) return null;
17335
17414
  const model = parsePara(xml, p);
17336
17415
  const paraPr = /\bparaPrIDRef="(\d+)"/.exec(xml.slice(p.start, p.openEnd))?.[1] ?? "0";
17337
- const plain2 = paraPlain(model);
17338
- let prefix = /^[\s ]*/.exec(plain2)[0].length;
17339
- const cp = plain2.codePointAt(prefix);
17416
+ const plain3 = paraPlain(model);
17417
+ let prefix = /^[\s ]*/.exec(plain3)[0].length;
17418
+ const cp = plain3.codePointAt(prefix);
17340
17419
  if (cp !== void 0 && isMarkerChar(mapPuaText(String.fromCodePoint(cp)))) {
17341
17420
  prefix += String.fromCodePoint(cp).length;
17342
- prefix += /^[\s ]*/.exec(plain2.slice(prefix))[0].length;
17421
+ prefix += /^[\s ]*/.exec(plain3.slice(prefix))[0].length;
17343
17422
  }
17344
17423
  let best = "", bestN = 0, pos = 0;
17345
17424
  for (const r of model.runs) {
@@ -17586,9 +17665,9 @@ var scrubText = (t) => t.replace(ROLE_LABEL_RE, (_m, label) => `${label}\u25CB\u
17586
17665
  function scrubPeople(xml) {
17587
17666
  return xml.replace(/(<hp:t\b(?:[^>/]|\/(?!>)){0,256}>)([\s\S]{0,65536}?)(<\/hp:t>)/g, (all, open, body, close) => {
17588
17667
  if (!body.includes("<")) return open + scrubText(body) + close;
17589
- const plain2 = body.replace(/<hp:(?:fwSpace|nbSpace)\/>/g, " ").replace(/<hp:tab\b[^>]{0,256}\/>/g, " ").replace(/<[^>]{1,1024}>/g, "");
17590
- const out = scrubText(plain2);
17591
- return out === plain2 ? all : open + out.replace(/&(?!(?:amp|lt|gt|quot|apos);)/g, "&amp;").replace(/</g, "&lt;") + close;
17668
+ const plain3 = body.replace(/<hp:(?:fwSpace|nbSpace)\/>/g, " ").replace(/<hp:tab\b[^>]{0,256}\/>/g, " ").replace(/<[^>]{1,1024}>/g, "");
17669
+ const out = scrubText(plain3);
17670
+ return out === plain3 ? all : open + out.replace(/&(?!(?:amp|lt|gt|quot|apos);)/g, "&amp;").replace(/</g, "&lt;") + close;
17592
17671
  });
17593
17672
  }
17594
17673
  function scrubMeta(hpf) {
@@ -18808,7 +18887,7 @@ function classify(raw) {
18808
18887
  if (li) return { kind: indent >= 2 ? "sub" : "item", body: li[1].trim() };
18809
18888
  return { kind: "para", body: t };
18810
18889
  }
18811
- function plain(s) {
18890
+ function plain2(s) {
18812
18891
  return s.replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/(\*\*|__|~~|`)/g, "").trim();
18813
18892
  }
18814
18893
  function stripQuoted(s) {
@@ -18913,11 +18992,11 @@ function lintMuncheText(text) {
18913
18992
  continue;
18914
18993
  }
18915
18994
  if (c.kind === "lead") {
18916
- leadBuf.push({ line: no, body: plain(c.body) });
18995
+ leadBuf.push({ line: no, body: plain2(c.body) });
18917
18996
  continue;
18918
18997
  }
18919
18998
  flushLead();
18920
- const b = plain(c.body);
18999
+ const b = plain2(c.body);
18921
19000
  if (!b) continue;
18922
19001
  const q = stripQuoted(b);
18923
19002
  if (c.kind === "item" || c.kind === "sub" || c.kind === "concl" || c.kind === "para") {
@@ -19737,9 +19816,9 @@ var UNIT_NOTE_RE = new RegExp(String.raw`[((]\s*(?:단위\s*[::]\s*)?(${unit
19737
19816
  var BOUND_AFTER = /^\s?(?:이상|이하|초과|미만|내외|수준|안팎|가량|정도)/;
19738
19817
  var BOUND_BEFORE = /(?:목표|기준|상한|하한|최소|최대|약)[^\d]{0,8}$/;
19739
19818
  function canonicalValue(text) {
19740
- const plain2 = text.replace(/,/g, "");
19741
- if (!plain2.includes(".")) return plain2;
19742
- return plain2.replace(/0+$/, "").replace(/\.$/, "");
19819
+ const plain3 = text.replace(/,/g, "");
19820
+ if (!plain3.includes(".")) return plain3;
19821
+ return plain3.replace(/0+$/, "").replace(/\.$/, "");
19743
19822
  }
19744
19823
  var isDistinctive = (value) => value.includes(".") || value.replace(/^0+/, "").length >= 3;
19745
19824
  function indexTable(rows, at) {
@@ -20470,21 +20549,35 @@ async function dispatch(format2, buffer, opts) {
20470
20549
  async function withEmbeddedImageOcr(blocks, markdown, warnings, images, options) {
20471
20550
  const list = [...warnings ?? []];
20472
20551
  if (!await ocrEmbeddedImages(blocks, options, list)) return { markdown, warnings: list.length ? list : void 0 };
20473
- let md = blocksToMarkdown(blocks, { tableFormat: options?.tableFormat });
20474
- if (options?.inlineImages && options.images !== false && images?.length) {
20475
- try {
20476
- md = inlineImagesIntoMarkdown(md, images, { compress: true });
20477
- } catch {
20478
- }
20552
+ return { markdown: blocksMarkdown(blocks, options, images), warnings: list.length ? list : void 0 };
20553
+ }
20554
+ async function withImageQr(blocks, markdown, warnings, images, options, inline) {
20555
+ if (!options?.qrCodes) return { markdown, warnings };
20556
+ const list = [...warnings ?? []];
20557
+ const found = await readImageQrCodes(blocks, images, list);
20558
+ return { markdown: found ? blocksMarkdown(blocks, options, inline) : markdown, warnings: list.length ? list : void 0 };
20559
+ }
20560
+ async function withImageFormat(blocks, markdown, warnings, images, options, inline) {
20561
+ if (!options?.imageFormat || options.images === false || !images?.length) return { markdown, warnings };
20562
+ const list = [...warnings ?? []];
20563
+ const renamed = await convertImages(blocks, images, options.imageFormat, list);
20564
+ return { markdown: renamed ? blocksMarkdown(blocks, options, inline) : markdown, warnings: list.length ? list : void 0 };
20565
+ }
20566
+ function blocksMarkdown(blocks, options, images) {
20567
+ const md = blocksToMarkdown(blocks, { tableFormat: options?.tableFormat });
20568
+ if (!(options?.inlineImages && options.images !== false && images?.length)) return md;
20569
+ try {
20570
+ return inlineImagesIntoMarkdown(md, images, { compress: true });
20571
+ } catch {
20572
+ return md;
20479
20573
  }
20480
- return { markdown: md, warnings: list.length ? list : void 0 };
20481
20574
  }
20482
20575
  function scriptsOff(r, off) {
20483
20576
  return off ? stripScriptTags(r) : r;
20484
20577
  }
20485
20578
  async function parseImage(buffer, options) {
20486
20579
  try {
20487
- const { parseImageDocument } = await import("./image-ocr-COBRSG6O.js");
20580
+ const { parseImageDocument } = await import("./image-ocr-7Y3FCGRR.js");
20488
20581
  const { blocks, warnings, lines } = await parseImageDocument(buffer, options);
20489
20582
  stripScriptTags({ blocks });
20490
20583
  return {
@@ -20503,7 +20596,9 @@ async function parseImage(buffer, options) {
20503
20596
  async function parseHwp3(buffer, options) {
20504
20597
  try {
20505
20598
  const { markdown, blocks, metadata, outline, warnings, images } = parseHwp3Document(buffer, options);
20506
- return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings, images, pageCount: metadata?.pageCount };
20599
+ const qr = await withImageQr(blocks, markdown, warnings, images, options, images);
20600
+ const webp = await withImageFormat(blocks, qr.markdown, qr.warnings, images, options, images);
20601
+ return { success: true, fileType: "hwp3", markdown: webp.markdown, blocks, metadata, outline, warnings: webp.warnings, images, pageCount: metadata?.pageCount };
20507
20602
  } catch (err) {
20508
20603
  return { success: false, fileType: "hwp3", error: sanitizeError(err), code: classifyError(err) };
20509
20604
  }
@@ -20513,8 +20608,10 @@ async function parseHwpx(buffer, options) {
20513
20608
  const doc = await parseHwpxDocument(buffer, options);
20514
20609
  const { blocks, metadata, outline, images, memos } = doc;
20515
20610
  const ocr = await withEmbeddedImageOcr(blocks, doc.markdown, doc.warnings, void 0, options);
20516
- const markdown = options?.memos && memos?.length ? ocr.markdown + memosMarkdown(memos) : ocr.markdown;
20517
- return scriptsOff({ success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings: ocr.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount, ...memos?.length ? { memos } : {} }, options?.scriptTags === false);
20611
+ const qr = await withImageQr(blocks, ocr.markdown, ocr.warnings, images, options);
20612
+ const webp = await withImageFormat(blocks, qr.markdown, qr.warnings, images, options);
20613
+ const markdown = options?.memos && memos?.length ? webp.markdown + memosMarkdown(memos) : webp.markdown;
20614
+ return scriptsOff({ success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings: webp.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount, ...memos?.length ? { memos } : {} }, options?.scriptTags === false);
20518
20615
  } catch (err) {
20519
20616
  return { success: false, fileType: "hwpx", error: sanitizeError(err), code: classifyError(err) };
20520
20617
  }
@@ -20541,8 +20638,10 @@ async function parseHwp(buffer, options) {
20541
20638
  }
20542
20639
  }
20543
20640
  const ocred = await withEmbeddedImageOcr(blocks, markdown, warnings, images, options);
20544
- const md = options?.memos && memos?.length ? ocred.markdown + memosMarkdown(memos) : ocred.markdown;
20545
- return scriptsOff({ success: true, fileType: "hwp", markdown: md, blocks, metadata, outline, warnings: ocred.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount, ...memos?.length ? { memos } : {} }, options?.scriptTags === false);
20641
+ const qr = await withImageQr(blocks, ocred.markdown, ocred.warnings, images, options, images);
20642
+ const webp = await withImageFormat(blocks, qr.markdown, qr.warnings, images, options, images);
20643
+ const md = options?.memos && memos?.length ? webp.markdown + memosMarkdown(memos) : webp.markdown;
20644
+ return scriptsOff({ success: true, fileType: "hwp", markdown: md, blocks, metadata, outline, warnings: webp.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount, ...memos?.length ? { memos } : {} }, options?.scriptTags === false);
20546
20645
  } catch (err) {
20547
20646
  return { success: false, fileType: "hwp", error: sanitizeError(err), code: classifyError(err) };
20548
20647
  }
@@ -20550,7 +20649,7 @@ async function parseHwp(buffer, options) {
20550
20649
  async function parsePdf(buffer, options) {
20551
20650
  let parsePdfDocument;
20552
20651
  try {
20553
- const mod = await import("./parser-JAL2OOOL.js");
20652
+ const mod = await import("./parser-JPWANPLM.js");
20554
20653
  parsePdfDocument = mod.parsePdfDocument;
20555
20654
  } catch {
20556
20655
  return {
@@ -20587,7 +20686,9 @@ async function parseXls(buffer, options) {
20587
20686
  async function parseDocx(buffer, options) {
20588
20687
  try {
20589
20688
  const { markdown, blocks, metadata, outline, warnings, images } = await parseDocxDocument(buffer, options);
20590
- return scriptsOff({ success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount }, options?.scriptTags === false);
20689
+ const qr = await withImageQr(blocks, markdown, warnings, images, options);
20690
+ const webp = await withImageFormat(blocks, qr.markdown, qr.warnings, images, options);
20691
+ return scriptsOff({ success: true, fileType: "docx", markdown: webp.markdown, blocks, metadata, outline, warnings: webp.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount }, options?.scriptTags === false);
20591
20692
  } catch (err) {
20592
20693
  return { success: false, fileType: "docx", error: sanitizeError(err), code: classifyError(err) };
20593
20694
  }
@@ -20595,7 +20696,9 @@ async function parseDocx(buffer, options) {
20595
20696
  async function parsePptx(buffer, options) {
20596
20697
  try {
20597
20698
  const { markdown, blocks, metadata, outline, warnings, images } = await parsePptxDocument(buffer, options);
20598
- return scriptsOff({ success: true, fileType: "pptx", markdown, blocks, metadata, outline, warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount }, options?.scriptTags === false);
20699
+ const qr = await withImageQr(blocks, markdown, warnings, images, options);
20700
+ const webp = await withImageFormat(blocks, qr.markdown, qr.warnings, images, options);
20701
+ return scriptsOff({ success: true, fileType: "pptx", markdown: webp.markdown, blocks, metadata, outline, warnings: webp.warnings, images: images?.length ? images : void 0, pageCount: metadata?.pageCount }, options?.scriptTags === false);
20599
20702
  } catch (err) {
20600
20703
  return { success: false, fileType: "pptx", error: sanitizeError(err), code: classifyError(err) };
20601
20704
  }
@@ -20626,7 +20729,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
20626
20729
  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})`);
20627
20730
  }
20628
20731
  } else if (format2 === "hwp" && detectOle2Format(buffer) === "hwp") {
20629
- const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-XQULU2I7.js");
20732
+ const { hwpToHwpx: hwpToHwpx2 } = await import("./to-hwpx-D7OMPDUQ.js");
20630
20733
  const hwpx = await hwpToHwpx2(new Uint8Array(buffer));
20631
20734
  buffer = hwpx.buffer.slice(hwpx.byteOffset, hwpx.byteOffset + hwpx.byteLength);
20632
20735
  } else {
@@ -20775,4 +20878,4 @@ export {
20775
20878
  parseHwpml,
20776
20879
  fillForm
20777
20880
  };
20778
- //# sourceMappingURL=chunk-Z5TDZDWU.js.map
20881
+ //# sourceMappingURL=chunk-4HJKBRZJ.js.map