kordoc 4.2.5 → 4.2.6

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 (93) hide show
  1. package/README.md +4 -0
  2. package/dist/{-G2JOUAZU.js → -UYYP67I6.js} +8 -8
  3. package/dist/{chunk-VSTUPUNH.js → chunk-5E7ZMWDF.js} +2 -2
  4. package/dist/{chunk-LHH7AT6J.cjs → chunk-5FS4IZWY.cjs} +2 -2
  5. package/dist/chunk-5FS4IZWY.cjs.map +1 -0
  6. package/dist/{chunk-R5DVJNXY.js → chunk-64DMMXFW.js} +2 -2
  7. package/dist/{chunk-WHCDNDDG.js → chunk-6KT4B4QX.js} +2 -2
  8. package/dist/{chunk-M4BQRAOM.cjs → chunk-6XVQSILN.cjs} +4 -4
  9. package/dist/chunk-6XVQSILN.cjs.map +1 -0
  10. package/dist/chunk-DCZVOIEO.cjs.map +1 -1
  11. package/dist/{chunk-VKVFHF5E.js → chunk-DSCSR6NE.js} +2 -2
  12. package/dist/{chunk-SPY7ZVBB.js → chunk-EGQQVYKL.js} +3 -3
  13. package/dist/chunk-GS7T56RP.cjs.map +1 -1
  14. package/dist/chunk-H7OWEYH2.cjs.map +1 -1
  15. package/dist/{chunk-4VRGN6MO.cjs → chunk-LIG666DX.cjs} +3 -3
  16. package/dist/chunk-LIG666DX.cjs.map +1 -0
  17. package/dist/{chunk-6AJGCOCS.js → chunk-N4BFHNLA.js} +2 -2
  18. package/dist/{chunk-JZIPR2PJ.js → chunk-NVPCKSNL.js} +2 -2
  19. package/dist/{chunk-PPRJ3TVL.js → chunk-O5JOHYCV.js} +2 -2
  20. package/dist/{chunk-XOOQ46DQ.js → chunk-QPPOC6OL.js} +2 -2
  21. package/dist/{chunk-PEKWJZDQ.js → chunk-SYJ6FPPQ.js} +2 -2
  22. package/dist/{chunk-TH4YAOOG.js → chunk-TZLLCYDN.js} +2 -2
  23. package/dist/{chunk-L7KFGFDA.js → chunk-VQ5NQBL2.js} +13 -12
  24. package/dist/{chunk-L7KFGFDA.js.map → chunk-VQ5NQBL2.js.map} +1 -1
  25. package/dist/{chunk-NTK7B6EU.js → chunk-YF6JUAM7.js} +3 -3
  26. package/dist/{chunk-CB3HDP4O.js → chunk-YHAB7UP6.js} +2 -2
  27. package/dist/{chunk-VUU26FTT.cjs → chunk-ZB3WT7XX.cjs} +9 -9
  28. package/dist/chunk-ZB3WT7XX.cjs.map +1 -0
  29. package/dist/chunks-G7YDTLNI.js +10 -0
  30. package/dist/cli.js +16 -16
  31. package/dist/formula-SB3NHDUM.cjs.map +1 -1
  32. package/dist/{image-ocr-C2VYH6L7.js → image-ocr-FXLX2GM6.js} +4 -4
  33. package/dist/{image-ocr-ILTRLOCF.js → image-ocr-WN3UO4UY.js} +4 -4
  34. package/dist/{image-ocr-RN77CC5P.cjs → image-ocr-YOUVLJIH.cjs} +9 -9
  35. package/dist/image-ocr-YOUVLJIH.cjs.map +1 -0
  36. package/dist/index.cjs +156 -155
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.js +9 -8
  39. package/dist/index.js.map +1 -1
  40. package/dist/mcp.js +14 -14
  41. package/dist/page-range-P7SDW6LR.cjs.map +1 -1
  42. package/dist/{parser-5TEQ6EFF.cjs → parser-AUMEO4OU.cjs} +24 -24
  43. package/dist/parser-AUMEO4OU.cjs.map +1 -0
  44. package/dist/{parser-7XDK53L6.js → parser-KIXK2IEX.js} +5 -5
  45. package/dist/{parser-FDOR727T.js → parser-KYSMRSMJ.js} +5 -5
  46. package/dist/pdf-ocr-2QOASWPI.js +12 -0
  47. package/dist/pdf-ocr-BUKZ5R4P.cjs +13 -0
  48. package/dist/pdf-ocr-BUKZ5R4P.cjs.map +1 -0
  49. package/dist/{pdf-ocr-4LO224RJ.js → pdf-ocr-NQFV46WZ.js} +4 -4
  50. package/dist/{profile-io-6SYG2B2L.js → profile-io-NKUXEPI4.js} +3 -3
  51. package/dist/{rasterize-PV7NU33W.js → rasterize-OT5TROD4.js} +2 -2
  52. package/dist/render-HQTKZ3ZE.js +10 -0
  53. package/dist/seal-KH6IL23B.js +10 -0
  54. package/dist/{watch-ZXCJZTSN.js → watch-6KMSCCM5.js} +8 -8
  55. package/package.json +1 -1
  56. package/dist/chunk-4VRGN6MO.cjs.map +0 -1
  57. package/dist/chunk-LHH7AT6J.cjs.map +0 -1
  58. package/dist/chunk-M4BQRAOM.cjs.map +0 -1
  59. package/dist/chunk-VUU26FTT.cjs.map +0 -1
  60. package/dist/chunks-ASAY2R5Q.js +0 -10
  61. package/dist/image-ocr-RN77CC5P.cjs.map +0 -1
  62. package/dist/parser-5TEQ6EFF.cjs.map +0 -1
  63. package/dist/pdf-ocr-5XGZH6D4.cjs +0 -13
  64. package/dist/pdf-ocr-5XGZH6D4.cjs.map +0 -1
  65. package/dist/pdf-ocr-ZEKXX54R.js +0 -12
  66. package/dist/render-ORPFUHVA.js +0 -10
  67. package/dist/seal-3AEDWS4F.js +0 -10
  68. /package/dist/{-G2JOUAZU.js.map → -UYYP67I6.js.map} +0 -0
  69. /package/dist/{chunk-VSTUPUNH.js.map → chunk-5E7ZMWDF.js.map} +0 -0
  70. /package/dist/{chunk-R5DVJNXY.js.map → chunk-64DMMXFW.js.map} +0 -0
  71. /package/dist/{chunk-WHCDNDDG.js.map → chunk-6KT4B4QX.js.map} +0 -0
  72. /package/dist/{chunk-VKVFHF5E.js.map → chunk-DSCSR6NE.js.map} +0 -0
  73. /package/dist/{chunk-SPY7ZVBB.js.map → chunk-EGQQVYKL.js.map} +0 -0
  74. /package/dist/{chunk-6AJGCOCS.js.map → chunk-N4BFHNLA.js.map} +0 -0
  75. /package/dist/{chunk-JZIPR2PJ.js.map → chunk-NVPCKSNL.js.map} +0 -0
  76. /package/dist/{chunk-PPRJ3TVL.js.map → chunk-O5JOHYCV.js.map} +0 -0
  77. /package/dist/{chunk-XOOQ46DQ.js.map → chunk-QPPOC6OL.js.map} +0 -0
  78. /package/dist/{chunk-PEKWJZDQ.js.map → chunk-SYJ6FPPQ.js.map} +0 -0
  79. /package/dist/{chunk-TH4YAOOG.js.map → chunk-TZLLCYDN.js.map} +0 -0
  80. /package/dist/{chunk-NTK7B6EU.js.map → chunk-YF6JUAM7.js.map} +0 -0
  81. /package/dist/{chunk-CB3HDP4O.js.map → chunk-YHAB7UP6.js.map} +0 -0
  82. /package/dist/{chunks-ASAY2R5Q.js.map → chunks-G7YDTLNI.js.map} +0 -0
  83. /package/dist/{image-ocr-C2VYH6L7.js.map → image-ocr-FXLX2GM6.js.map} +0 -0
  84. /package/dist/{image-ocr-ILTRLOCF.js.map → image-ocr-WN3UO4UY.js.map} +0 -0
  85. /package/dist/{parser-7XDK53L6.js.map → parser-KIXK2IEX.js.map} +0 -0
  86. /package/dist/{parser-FDOR727T.js.map → parser-KYSMRSMJ.js.map} +0 -0
  87. /package/dist/{pdf-ocr-4LO224RJ.js.map → pdf-ocr-2QOASWPI.js.map} +0 -0
  88. /package/dist/{pdf-ocr-ZEKXX54R.js.map → pdf-ocr-NQFV46WZ.js.map} +0 -0
  89. /package/dist/{profile-io-6SYG2B2L.js.map → profile-io-NKUXEPI4.js.map} +0 -0
  90. /package/dist/{rasterize-PV7NU33W.js.map → rasterize-OT5TROD4.js.map} +0 -0
  91. /package/dist/{render-ORPFUHVA.js.map → render-HQTKZ3ZE.js.map} +0 -0
  92. /package/dist/{seal-3AEDWS4F.js.map → seal-KH6IL23B.js.map} +0 -0
  93. /package/dist/{watch-ZXCJZTSN.js.map → watch-6KMSCCM5.js.map} +0 -0
package/dist/index.cjs CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
 
10
10
 
11
- var _chunkM4BQRAOMcjs = require('./chunk-M4BQRAOM.cjs');
11
+ var _chunk6XVQSILNcjs = require('./chunk-6XVQSILN.cjs');
12
12
 
13
13
 
14
14
  var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
@@ -27,7 +27,7 @@ var _chunkDCZVOIEOcjs = require('./chunk-DCZVOIEO.cjs');
27
27
 
28
28
 
29
29
 
30
- var _chunkLHH7AT6Jcjs = require('./chunk-LHH7AT6J.cjs');
30
+ var _chunk5FS4IZWYcjs = require('./chunk-5FS4IZWY.cjs');
31
31
 
32
32
 
33
33
  var _chunkGS7T56RPcjs = require('./chunk-GS7T56RP.cjs');
@@ -413,7 +413,7 @@ function comResultToParseResult(pages, pageCount, warnings) {
413
413
  var _xmldom = require('@xmldom/xmldom');
414
414
  var MAX_DECOMPRESS_SIZE = 256 * 1024 * 1024;
415
415
  var MAX_ZIP_ENTRIES = 500;
416
- var ZipBombError = class extends _chunkLHH7AT6Jcjs.KordocError {
416
+ var ZipBombError = class extends _chunk5FS4IZWYcjs.KordocError {
417
417
  constructor(message) {
418
418
  super(message);
419
419
  this.name = "ZipBombError";
@@ -429,7 +429,7 @@ function createSectionShared() {
429
429
  function createXmlParser(warnings) {
430
430
  return new (0, _xmldom.DOMParser)({
431
431
  onError(level, msg2) {
432
- if (level === "fatalError") throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
432
+ if (level === "fatalError") throw new (0, _chunk5FS4IZWYcjs.KordocError)(`XML \uD30C\uC2F1 \uC2E4\uD328: ${msg2}`);
433
433
  _optionalChain([warnings, 'optionalAccess', _3 => _3.push, 'call', _4 => _4({ code: "MALFORMED_XML", message: `XML ${level === "warning" ? "\uACBD\uACE0" : "\uC624\uB958"}: ${msg2}` })]);
434
434
  }
435
435
  });
@@ -506,10 +506,10 @@ async function extractHwpxStyles(zip, decompressed) {
506
506
  const xml = await file.async("text");
507
507
  if (decompressed) {
508
508
  decompressed.total += xml.length * 2;
509
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
509
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
510
510
  }
511
511
  const parser = createXmlParser();
512
- const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
512
+ const doc = parser.parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, xml), "text/xml");
513
513
  if (!doc.documentElement) continue;
514
514
  const domDoc = doc;
515
515
  parseCharProperties(domDoc, result.charProperties);
@@ -696,9 +696,9 @@ function detectHwpxHeadings(blocks, styleMap) {
696
696
  let level = 0;
697
697
  if (baseFontSize > 0 && _optionalChain([block, 'access', _11 => _11.style, 'optionalAccess', _12 => _12.fontSize])) {
698
698
  const ratio = block.style.fontSize / baseFontSize;
699
- if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H1) level = 1;
700
- else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H2) level = 2;
701
- else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H3) level = 3;
699
+ if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H1) level = 1;
700
+ else if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H2) level = 2;
701
+ else if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H3) level = 3;
702
702
  }
703
703
  const compactText = text.replace(/\s+/g, "");
704
704
  if (/^제\d+[조장절편]/.test(compactText) && text.length <= 50) {
@@ -1623,7 +1623,7 @@ function needsGaejosikAssets(gongmun) {
1623
1623
  }
1624
1624
  function assertFiniteRange(name, value, min, max) {
1625
1625
  if (!Number.isFinite(value) || value < min || value > max) {
1626
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1626
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(`${name} must be a finite number between ${min} and ${max}`);
1627
1627
  }
1628
1628
  }
1629
1629
  function validateGongmunOptions(opts) {
@@ -1638,10 +1638,10 @@ function validateGongmunOptions(opts) {
1638
1638
  assertFiniteRange(`margins.${side}`, value, 0, 200);
1639
1639
  }
1640
1640
  if (opts.margins.left + opts.margins.right >= 210) {
1641
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("margins.left + margins.right must be less than 210");
1641
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("margins.left + margins.right must be less than 210");
1642
1642
  }
1643
1643
  if (opts.margins.top + opts.margins.bottom >= 297) {
1644
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1644
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("margins.top + margins.bottom must be less than 297");
1645
1645
  }
1646
1646
  }
1647
1647
  if (opts.sizes) {
@@ -1650,7 +1650,7 @@ function validateGongmunOptions(opts) {
1650
1650
  }
1651
1651
  }
1652
1652
  if (opts.approval && opts.approval.length > 6) {
1653
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("approval must contain at most 6 labels");
1653
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("approval must contain at most 6 labels");
1654
1654
  }
1655
1655
  }
1656
1656
  function incompatibleGongmunWarnings(opts) {
@@ -1915,7 +1915,7 @@ function resolveParaHeading(paraEl, ctx) {
1915
1915
 
1916
1916
  // src/hwpx/table-build.ts
1917
1917
  function buildTableWithCellMeta(state, keepAnchoredEmptyCols) {
1918
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1918
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, state.rows, { keepAnchoredEmptyCols });
1919
1919
  if (state.caption) table2.caption = state.caption;
1920
1920
  const anchors = [];
1921
1921
  {
@@ -1985,7 +1985,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
1985
1985
  const cell2 = parentTable.cell;
1986
1986
  (cell2.blocks ??= []).push(block);
1987
1987
  cell2.hasStructure = true;
1988
- let flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, newTable.rows);
1988
+ let flat = _chunk6XVQSILNcjs.convertTableToText.call(void 0, newTable.rows);
1989
1989
  if (newTable.caption) flat = newTable.caption + (flat ? "\n" + flat : "");
1990
1990
  if (flat) {
1991
1991
  const inlineJoin = newTable.inline === true && cell2.lineOpen === true;
@@ -2001,7 +2001,7 @@ function completeTable(newTable, tableStack, blocks, ctx) {
2001
2001
  // src/hwpx/section-walker.ts
2002
2002
  function parseSectionXml(xml, styleMap, warnings, sectionNum, shared) {
2003
2003
  const parser = createXmlParser(warnings);
2004
- const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
2004
+ const doc = parser.parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, xml), "text/xml");
2005
2005
  if (!doc.documentElement) return [];
2006
2006
  const ctx = { styleMap, warnings, sectionNum, shared: _nullishCoalesce(shared, () => ( createSectionShared())) };
2007
2007
  ctx.shared.track.deleteDepth = 0;
@@ -2107,8 +2107,8 @@ function walkSection(node, blocks, tableCtx, tableStack, ctx, depth = 0) {
2107
2107
  const cs = isNaN(rawCs) ? 1 : rawCs;
2108
2108
  const rawRs = parseInt(el.getAttribute("rowSpan") || "1", 10);
2109
2109
  const rs = isNaN(rawRs) ? 1 : rawRs;
2110
- tableCtx.cell.colSpan = clampSpan(cs, _chunkM4BQRAOMcjs.MAX_COLS);
2111
- tableCtx.cell.rowSpan = clampSpan(rs, _chunkM4BQRAOMcjs.MAX_ROWS);
2110
+ tableCtx.cell.colSpan = clampSpan(cs, _chunk6XVQSILNcjs.MAX_COLS);
2111
+ tableCtx.cell.rowSpan = clampSpan(rs, _chunk6XVQSILNcjs.MAX_ROWS);
2112
2112
  }
2113
2113
  break;
2114
2114
  case "p": {
@@ -2350,7 +2350,7 @@ function flattenSubListTable(el, ctx, depth) {
2350
2350
  const sink = [];
2351
2351
  const st = { rows: [], currentRow: [], cell: null };
2352
2352
  walkSection(el, sink, st, [], ctx, depth + 1);
2353
- let flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, st.rows);
2353
+ let flat = _chunk6XVQSILNcjs.convertTableToText.call(void 0, st.rows);
2354
2354
  if (st.caption) flat = st.caption + (flat ? "\n" + flat : "");
2355
2355
  return flat;
2356
2356
  }
@@ -2487,7 +2487,7 @@ function extractHyperlinkHref(fieldBegin) {
2487
2487
  let url = (ch.textContent || "").trim();
2488
2488
  if (!url) continue;
2489
2489
  url = url.replace(/^https?:\/\/(?=https?:\/\/)/i, "");
2490
- const safe = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, url);
2490
+ const safe = _chunk5FS4IZWYcjs.sanitizeHref.call(void 0, url);
2491
2491
  if (safe) return safe;
2492
2492
  }
2493
2493
  return void 0;
@@ -2647,7 +2647,7 @@ function extractParagraphInfo(para2, styleMap, ctx) {
2647
2647
  case "hyperlink": {
2648
2648
  const url = child.getAttribute("url") || child.getAttribute("href") || "";
2649
2649
  if (url) {
2650
- const safe = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, url);
2650
+ const safe = _chunk5FS4IZWYcjs.sanitizeHref.call(void 0, url);
2651
2651
  if (safe) href = safe;
2652
2652
  }
2653
2653
  walk(child, depth + 1);
@@ -2921,7 +2921,7 @@ function decompressStream(data) {
2921
2921
  return _zlib.inflateRawSync.call(void 0, data, opts);
2922
2922
  }
2923
2923
  function parseFileHeader(data) {
2924
- if (data.length < 40) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2924
+ if (data.length < 40) throw new (0, _chunk5FS4IZWYcjs.KordocError)("FileHeader\uAC00 \uB108\uBB34 \uC9E7\uC2B5\uB2C8\uB2E4 (\uCD5C\uC18C 40\uBC14\uC774\uD2B8)");
2925
2925
  const sig = data.subarray(0, 32).toString("utf8").replace(/\0+$/, "");
2926
2926
  return {
2927
2927
  signature: sig,
@@ -3370,13 +3370,13 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3370
3370
  }
3371
3371
  const allCandidates = resolvedPath ? [resolvedPath, ...candidates] : candidates;
3372
3372
  for (const path of allCandidates) {
3373
- if (_chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, path)) continue;
3373
+ if (_chunk5FS4IZWYcjs.isPathTraversal.call(void 0, path)) continue;
3374
3374
  const file = zip.file(path);
3375
3375
  if (!file) continue;
3376
3376
  try {
3377
3377
  const data = await file.async("uint8array");
3378
3378
  decompressed.total += data.length;
3379
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3379
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3380
3380
  const ext = path.includes(".") ? path.split(".").pop() || "png" : "png";
3381
3381
  const mimeType = imageExtToMime(ext);
3382
3382
  imageIndex++;
@@ -3386,7 +3386,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3386
3386
  usedPaths.add(path);
3387
3387
  break;
3388
3388
  } catch (err) {
3389
- if (err instanceof _chunkLHH7AT6Jcjs.KordocError) throw err;
3389
+ if (err instanceof _chunk5FS4IZWYcjs.KordocError) throw err;
3390
3390
  }
3391
3391
  }
3392
3392
  if (!img) _optionalChain([warnings, 'optionalAccess', _78 => _78.push, 'call', _79 => _79({ page: block.pageNumber, message: `\uC774\uBBF8\uC9C0 \uD30C\uC77C \uC5C6\uC74C: ${ref}`, code: "SKIPPED_IMAGE" })]);
@@ -3406,11 +3406,11 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3406
3406
  if (sweepUnreferenced) {
3407
3407
  const binEntries = zip.file(/(?:^|\/)BinData\//i);
3408
3408
  for (const file of binEntries) {
3409
- if (file.dir || usedPaths.has(file.name) || _chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, file.name)) continue;
3409
+ if (file.dir || usedPaths.has(file.name) || _chunk5FS4IZWYcjs.isPathTraversal.call(void 0, file.name)) continue;
3410
3410
  try {
3411
3411
  const data = await file.async("uint8array");
3412
3412
  decompressed.total += data.length;
3413
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3413
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3414
3414
  const ext = file.name.includes(".") ? file.name.split(".").pop() || "" : "";
3415
3415
  let mimeType = imageExtToMime(ext);
3416
3416
  if (mimeType === "application/octet-stream") {
@@ -3424,7 +3424,7 @@ async function extractImagesFromZip(zip, blocks, decompressed, warnings, sweepUn
3424
3424
  images.push(img);
3425
3425
  blocks.push({ type: "image", text: filename, imageData: { data, mimeType, filename: file.name } });
3426
3426
  } catch (err) {
3427
- if (err instanceof _chunkLHH7AT6Jcjs.KordocError) throw err;
3427
+ if (err instanceof _chunk5FS4IZWYcjs.KordocError) throw err;
3428
3428
  _optionalChain([warnings, 'optionalAccess', _80 => _80.push, 'call', _81 => _81({ message: `\uC774\uBBF8\uC9C0 \uCD94\uCD9C \uC2E4\uD328: ${file.name}`, code: "SKIPPED_IMAGE" })]);
3429
3429
  }
3430
3430
  }
@@ -3475,7 +3475,7 @@ function extractFromBrokenZip(buffer) {
3475
3475
  }
3476
3476
  const nameBytes = data.slice(pos + 30, pos + 30 + nameLen);
3477
3477
  const name = new TextDecoder().decode(nameBytes);
3478
- if (_chunkLHH7AT6Jcjs.isPathTraversal.call(void 0, name)) {
3478
+ if (_chunk5FS4IZWYcjs.isPathTraversal.call(void 0, name)) {
3479
3479
  pos = fileStart + compSize;
3480
3480
  continue;
3481
3481
  }
@@ -3493,16 +3493,16 @@ function extractFromBrokenZip(buffer) {
3493
3493
  continue;
3494
3494
  }
3495
3495
  totalDecompressed += content.length * 2;
3496
- if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3496
+ if (totalDecompressed > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC");
3497
3497
  sectionNum++;
3498
3498
  blocks.push(...parseSectionXml(content, void 0, warnings, sectionNum, shared));
3499
3499
  } catch (e16) {
3500
3500
  continue;
3501
3501
  }
3502
3502
  }
3503
- if (blocks.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3503
+ if (blocks.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC190\uC0C1\uB41C HWPX\uC5D0\uC11C \uC139\uC158 \uB370\uC774\uD130\uB97C \uBCF5\uAD6C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3504
3504
  applyPageText(blocks, shared);
3505
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
3505
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
3506
3506
  return { markdown, blocks, warnings: warnings.length > 0 ? warnings : void 0 };
3507
3507
  }
3508
3508
  async function readKordocLayout(zip) {
@@ -3527,18 +3527,18 @@ async function resolveSectionPaths(zip) {
3527
3527
  if (paths.length > 0) return paths;
3528
3528
  }
3529
3529
  const sectionFiles = zip.file(/[Ss]ection\d+\.xml$/);
3530
- return sectionFiles.map((f) => f.name).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
3530
+ return sectionFiles.map((f) => f.name).sort(_chunk5FS4IZWYcjs.compareSectionPaths);
3531
3531
  }
3532
3532
  function parseSectionPathsFromManifest(xml) {
3533
3533
  const parser = createXmlParser();
3534
- const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
3534
+ const doc = parser.parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, xml), "text/xml");
3535
3535
  const items = doc.getElementsByTagName("opf:item");
3536
3536
  const spine = doc.getElementsByTagName("opf:itemref");
3537
3537
  const idToHref = /* @__PURE__ */ new Map();
3538
3538
  for (let i = 0; i < items.length; i++) {
3539
3539
  const item = items[i];
3540
3540
  const id = item.getAttribute("id") || "";
3541
- const href = _chunkLHH7AT6Jcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3541
+ const href = _chunk5FS4IZWYcjs.normalizeSectionHref.call(void 0, item.getAttribute("href") || "");
3542
3542
  if (id && href) idToHref.set(id, href);
3543
3543
  }
3544
3544
  if (spine.length > 0) {
@@ -3549,7 +3549,7 @@ function parseSectionPathsFromManifest(xml) {
3549
3549
  }
3550
3550
  if (ordered.length > 0) return ordered;
3551
3551
  }
3552
- return Array.from(idToHref.values()).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
3552
+ return Array.from(idToHref.values()).sort(_chunk5FS4IZWYcjs.compareSectionPaths);
3553
3553
  }
3554
3554
 
3555
3555
  // src/hwpx/metadata.ts
@@ -3562,7 +3562,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3562
3562
  const xml = await file.async("text");
3563
3563
  if (decompressed) {
3564
3564
  decompressed.total += xml.length * 2;
3565
- if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3565
+ if (decompressed.total > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3566
3566
  }
3567
3567
  parseDublinCoreMetadata(xml, metadata);
3568
3568
  if (metadata.title || metadata.author) return;
@@ -3572,7 +3572,7 @@ async function extractHwpxMetadata(zip, metadata, decompressed) {
3572
3572
  }
3573
3573
  function parseDublinCoreMetadata(xml, metadata) {
3574
3574
  const parser = createXmlParser();
3575
- const doc = parser.parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, xml), "text/xml");
3575
+ const doc = parser.parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, xml), "text/xml");
3576
3576
  if (!doc.documentElement) return;
3577
3577
  const getText = (tagNames) => {
3578
3578
  for (const tag of tagNames) {
@@ -3597,7 +3597,7 @@ function parseDublinCoreMetadata(xml, metadata) {
3597
3597
 
3598
3598
  // src/hwpx/parser.ts
3599
3599
  async function parseHwpxDocument(buffer, options) {
3600
- _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3600
+ _chunk5FS4IZWYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
3601
3601
  let zip;
3602
3602
  try {
3603
3603
  zip = await _jszip2.default.loadAsync(buffer);
@@ -3606,7 +3606,7 @@ async function parseHwpxDocument(buffer, options) {
3606
3606
  }
3607
3607
  const actualEntryCount = Object.keys(zip.files).length;
3608
3608
  if (actualEntryCount > MAX_ZIP_ENTRIES) {
3609
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3609
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uC5D4\uD2B8\uB9AC \uC218 \uCD08\uACFC (ZIP bomb \uC758\uC2EC)");
3610
3610
  }
3611
3611
  const manifestFile = zip.file("META-INF/manifest.xml");
3612
3612
  if (manifestFile) {
@@ -3618,7 +3618,7 @@ async function parseHwpxDocument(buffer, options) {
3618
3618
  return comResultToParseResult(pages, pageCount, warnings2);
3619
3619
  }
3620
3620
  }
3621
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3621
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("DRM \uC554\uD638\uD654\uB41C HWPX \uD30C\uC77C\uC785\uB2C8\uB2E4. Windows + \uD55C\uCEF4 \uC624\uD53C\uC2A4 \uC124\uCE58 \uC2DC \uC790\uB3D9 \uCD94\uCD9C\uB429\uB2C8\uB2E4.");
3622
3622
  }
3623
3623
  }
3624
3624
  const decompressed = { total: 0 };
@@ -3627,7 +3627,7 @@ async function parseHwpxDocument(buffer, options) {
3627
3627
  const styleMap = await extractHwpxStyles(zip, decompressed);
3628
3628
  const warnings = [];
3629
3629
  const sectionPaths = await resolveSectionPaths(zip);
3630
- if (sectionPaths.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3630
+ if (sectionPaths.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
3631
3631
  metadata.pageCount = sectionPaths.length;
3632
3632
  const pageFilter = _optionalChain([options, 'optionalAccess', _90 => _90.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sectionPaths.length) : null;
3633
3633
  const totalTarget = pageFilter ? pageFilter.size : sectionPaths.length;
@@ -3656,7 +3656,7 @@ async function parseHwpxDocument(buffer, options) {
3656
3656
  const images = await extractImagesFromZip(zip, blocks, decompressed, warnings, !pageFilter);
3657
3657
  detectHwpxHeadings(blocks, styleMap);
3658
3658
  const outline = blocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
3659
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
3659
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
3660
3660
  return { markdown, blocks, metadata, outline: outline.length > 0 ? outline : void 0, warnings: warnings.length > 0 ? warnings : void 0, images: images.length > 0 ? images : void 0 };
3661
3661
  }
3662
3662
 
@@ -4835,7 +4835,7 @@ function parseHwp5Document(buffer, options) {
4835
4835
  lenientCfb = parseLenientCfb(buffer);
4836
4836
  warnings.push({ message: "\uC190\uC0C1\uB41C CFB \uCEE8\uD14C\uC774\uB108 \u2014 lenient \uBAA8\uB4DC\uB85C \uBCF5\uAD6C", code: "LENIENT_CFB_RECOVERY" });
4837
4837
  } catch (e22) {
4838
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4838
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("CFB \uCEE8\uD14C\uC774\uB108 \uD30C\uC2F1 \uC2E4\uD328 (strict \uBC0F lenient \uBAA8\uB450)");
4839
4839
  }
4840
4840
  }
4841
4841
  const findStream = (path) => {
@@ -4846,11 +4846,11 @@ function parseHwp5Document(buffer, options) {
4846
4846
  return lenientCfb.findStream(path);
4847
4847
  };
4848
4848
  const headerData = findStream("/FileHeader");
4849
- if (!headerData) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4849
+ if (!headerData) throw new (0, _chunk5FS4IZWYcjs.KordocError)("FileHeader \uC2A4\uD2B8\uB9BC \uC5C6\uC74C");
4850
4850
  const header = parseFileHeader(headerData);
4851
- if (header.signature !== "HWP Document File") throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4852
- if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4853
- if (header.flags & FLAG_DRM) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4851
+ if (header.signature !== "HWP Document File") throw new (0, _chunk5FS4IZWYcjs.KordocError)("HWP \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
4852
+ if (header.flags & FLAG_ENCRYPTED) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC554\uD638\uD654\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4853
+ if (header.flags & FLAG_DRM) throw new (0, _chunk5FS4IZWYcjs.KordocError)("DRM \uBCF4\uD638\uB41C HWP\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
4854
4854
  const compressed = (header.flags & FLAG_COMPRESSED) !== 0;
4855
4855
  const distribution = (header.flags & FLAG_DISTRIBUTION) !== 0;
4856
4856
  const metadata = {
@@ -4859,7 +4859,7 @@ function parseHwp5Document(buffer, options) {
4859
4859
  if (cfb) extractHwp5Metadata(cfb, metadata);
4860
4860
  const docInfo = cfb ? parseDocInfoStream(cfb, compressed) : parseDocInfoFromStream(findStream("/DocInfo"), compressed);
4861
4861
  const sections = distribution ? cfb ? findViewTextSections(cfb, compressed) : findViewTextSectionsLenient(lenientCfb, compressed) : cfb ? findSections(cfb) : findSectionsLenient(lenientCfb, compressed);
4862
- if (sections.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4862
+ if (sections.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC139\uC158 \uC2A4\uD2B8\uB9BC\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
4863
4863
  metadata.pageCount = sections.length;
4864
4864
  const pageFilter = _optionalChain([options, 'optionalAccess', _95 => _95.pages]) ? _chunkDCZVOIEOcjs.parsePageRange.call(void 0, options.pages, sections.length) : null;
4865
4865
  const totalTarget = pageFilter ? pageFilter.size : sections.length;
@@ -4874,22 +4874,22 @@ function parseHwp5Document(buffer, options) {
4874
4874
  const sectionData = sections[si];
4875
4875
  const data = !distribution && compressed ? decompressStream(Buffer.from(sectionData)) : Buffer.from(sectionData);
4876
4876
  totalDecompressed += data.length;
4877
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4877
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
4878
4878
  const records = readRecords(data);
4879
4879
  const sectionBlocks = parseSection(records, docInfo, warnings, si + 1, doc);
4880
4880
  bodyBlocks.push(...sectionBlocks);
4881
4881
  parsedSections++;
4882
4882
  _optionalChain([options, 'optionalAccess', _97 => _97.onProgress, 'optionalCall', _98 => _98(parsedSections, totalTarget)]);
4883
4883
  } catch (secErr) {
4884
- if (secErr instanceof _chunkLHH7AT6Jcjs.KordocError) throw secErr;
4884
+ if (secErr instanceof _chunk5FS4IZWYcjs.KordocError) throw secErr;
4885
4885
  warnings.push({ page: si + 1, message: `\uC139\uC158 ${si + 1} \uD30C\uC2F1 \uC2E4\uD328: ${secErr instanceof Error ? secErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "PARTIAL_PARSE" });
4886
4886
  }
4887
4887
  }
4888
4888
  const blocks = [...doc.headerBlocks, ...bodyBlocks, ...doc.footerBlocks];
4889
4889
  const images = cfb ? extractHwp5Images(cfb.FileIndex, blocks, warnings, !pageFilter) : extractHwp5ImagesLenient(lenientCfb, blocks, warnings, !pageFilter);
4890
- let flatBlocks = _chunkM4BQRAOMcjs.flattenLayoutTables.call(void 0, blocks);
4890
+ let flatBlocks = _chunk6XVQSILNcjs.flattenLayoutTables.call(void 0, blocks);
4891
4891
  if (_optionalChain([options, 'optionalAccess', _99 => _99.dedupeRunningHeaders])) {
4892
- const deduped = _chunkM4BQRAOMcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4892
+ const deduped = _chunk6XVQSILNcjs.dedupeRunningHeaders.call(void 0, flatBlocks);
4893
4893
  const removed = flatBlocks.length - deduped.length;
4894
4894
  if (removed > 0) warnings.push({ message: `\uBC18\uBCF5 \uB7EC\uB2DD \uD5E4\uB354 ${removed}\uAC1C \uC81C\uAC70`, code: "HIDDEN_TEXT_FILTERED" });
4895
4895
  flatBlocks = deduped;
@@ -4898,10 +4898,10 @@ function parseHwp5Document(buffer, options) {
4898
4898
  detectHwp5Headings(flatBlocks, docInfo);
4899
4899
  }
4900
4900
  const outline = flatBlocks.filter((b) => b.type === "heading" && b.level && b.text).map((b) => ({ level: b.level, text: b.text, pageNumber: b.pageNumber }));
4901
- let markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, flatBlocks);
4901
+ let markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, flatBlocks);
4902
4902
  if (_optionalChain([options, 'optionalAccess', _100 => _100.inlineImages]) && images.length > 0) {
4903
4903
  try {
4904
- markdown = _chunkM4BQRAOMcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4904
+ markdown = _chunk6XVQSILNcjs.inlineImagesIntoMarkdown.call(void 0, markdown, images, { compress: true });
4905
4905
  } catch (inlineErr) {
4906
4906
  warnings.push({ message: `\uC774\uBBF8\uC9C0 \uC778\uB77C\uC778 \uC2E4\uD328 \u2014 \uC6D0\uBCF8 \uD30C\uC77C \uCC38\uC870\uB85C \uD3F4\uBC31: ${inlineErr instanceof Error ? inlineErr.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`, code: "SKIPPED_IMAGE" });
4907
4907
  }
@@ -4965,9 +4965,9 @@ function detectHwp5Headings(blocks, docInfo) {
4965
4965
  let level = 0;
4966
4966
  if (_optionalChain([block, 'access', _105 => _105.style, 'optionalAccess', _106 => _106.fontSize]) && baseFontSize > 0) {
4967
4967
  const ratio = block.style.fontSize / baseFontSize;
4968
- if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H1) level = 1;
4969
- else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H2) level = 2;
4970
- else if (ratio >= _chunkLHH7AT6Jcjs.HEADING_RATIO_H3) level = 3;
4968
+ if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H1) level = 1;
4969
+ else if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H2) level = 2;
4970
+ else if (ratio >= _chunk5FS4IZWYcjs.HEADING_RATIO_H3) level = 3;
4971
4971
  }
4972
4972
  if (/^제\d+[장절편]\s/.test(text) && text.length <= 50) {
4973
4973
  if (level === 0) level = 2;
@@ -5052,7 +5052,7 @@ function findSectionsLenient(lcfb, compressed) {
5052
5052
  if (!raw) break;
5053
5053
  const content = compressed ? decompressStream(raw) : raw;
5054
5054
  totalDecompressed += content.length;
5055
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5055
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5056
5056
  sections.push({ idx: i, content });
5057
5057
  }
5058
5058
  if (sections.length === 0) {
@@ -5064,7 +5064,7 @@ function findSectionsLenient(lcfb, compressed) {
5064
5064
  if (raw) {
5065
5065
  const content = compressed ? decompressStream(raw) : raw;
5066
5066
  totalDecompressed += content.length;
5067
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5067
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5068
5068
  sections.push({ idx, content });
5069
5069
  }
5070
5070
  }
@@ -5081,7 +5081,7 @@ function findViewTextSectionsLenient(lcfb, compressed) {
5081
5081
  try {
5082
5082
  const content = decryptViewText(raw, compressed);
5083
5083
  totalDecompressed += content.length;
5084
- if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5084
+ if (totalDecompressed > MAX_TOTAL_DECOMPRESS) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uCD1D \uC555\uCD95 \uD574\uC81C \uD06C\uAE30 \uCD08\uACFC (decompression bomb \uC758\uC2EC)");
5085
5085
  sections.push({ idx: i, content });
5086
5086
  } catch (e27) {
5087
5087
  break;
@@ -5184,7 +5184,7 @@ function parseParagraph(records, start, end, ctx) {
5184
5184
  const ctrl = ctrls[r.ctrlIdx];
5185
5185
  if (!_optionalChain([ctrl, 'optionalAccess', _113 => _113.href]) || r.end <= r.start) continue;
5186
5186
  if (applied.some(([s, e]) => r.start < e && r.end > s)) continue;
5187
- const href = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, ctrl.href);
5187
+ const href = _chunk5FS4IZWYcjs.sanitizeHref.call(void 0, ctrl.href);
5188
5188
  if (!href) continue;
5189
5189
  const anchor = text.slice(r.start, r.end);
5190
5190
  if (!anchor.trim()) continue;
@@ -5420,8 +5420,8 @@ function parseTableControl(ctrl, records, ctx) {
5420
5420
  let tableIdx = -1;
5421
5421
  for (let i2 = childStart; i2 < childEnd; i2++) {
5422
5422
  if (records[i2].tagId === TAG_TABLE && records[i2].data.length >= 8) {
5423
- rows = Math.min(records[i2].data.readUInt16LE(4), _chunkM4BQRAOMcjs.MAX_ROWS);
5424
- cols = Math.min(records[i2].data.readUInt16LE(6), _chunkM4BQRAOMcjs.MAX_COLS);
5423
+ rows = Math.min(records[i2].data.readUInt16LE(4), _chunk6XVQSILNcjs.MAX_ROWS);
5424
+ cols = Math.min(records[i2].data.readUInt16LE(6), _chunk6XVQSILNcjs.MAX_COLS);
5425
5425
  tableIdx = i2;
5426
5426
  break;
5427
5427
  }
@@ -5470,7 +5470,7 @@ function parseTableControl(ctrl, records, ctx) {
5470
5470
  return table3;
5471
5471
  }
5472
5472
  const cellRows = arrangeCells(rows, cols, cells);
5473
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5473
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: ctx.doc.keepTrailingEmptyCols });
5474
5474
  if (caption && table2.rows > 0) table2.caption = caption;
5475
5475
  return table2.rows > 0 ? table2 : null;
5476
5476
  }
@@ -5487,8 +5487,8 @@ function parseCell(records, lhIdx, end, ctx) {
5487
5487
  rowAddr = rec.data.readUInt16LE(10);
5488
5488
  const cs = rec.data.readUInt16LE(12);
5489
5489
  const rs = rec.data.readUInt16LE(14);
5490
- if (cs > 0) colSpan = Math.min(cs, _chunkM4BQRAOMcjs.MAX_COLS);
5491
- if (rs > 0) rowSpan = Math.min(rs, _chunkM4BQRAOMcjs.MAX_ROWS);
5490
+ if (cs > 0) colSpan = Math.min(cs, _chunk6XVQSILNcjs.MAX_COLS);
5491
+ if (rs > 0) rowSpan = Math.min(rs, _chunk6XVQSILNcjs.MAX_ROWS);
5492
5492
  }
5493
5493
  const blocks = ctx.depth < MAX_NEST_DEPTH ? parseParagraphList(records, lhIdx + 1, end, { ...ctx, depth: ctx.depth + 1 }) : [];
5494
5494
  const parts = [];
@@ -5498,7 +5498,7 @@ function parseCell(records, lhIdx, end, ctx) {
5498
5498
  parts.push(`![image](hwp5bin:${b.text})`);
5499
5499
  hasStructure = true;
5500
5500
  } else if (b.type === "table" && b.table) {
5501
- const flat = _chunkM4BQRAOMcjs.convertTableToText.call(void 0, b.table.cells);
5501
+ const flat = _chunk6XVQSILNcjs.convertTableToText.call(void 0, b.table.cells);
5502
5502
  if (flat) parts.push(flat);
5503
5503
  hasStructure = true;
5504
5504
  } else if (b.text) {
@@ -17993,7 +17993,7 @@ function getTextContent(el) {
17993
17993
  return _nullishCoalesce(_optionalChain([el, 'access', _129 => _129.textContent, 'optionalAccess', _130 => _130.trim, 'call', _131 => _131()]), () => ( ""));
17994
17994
  }
17995
17995
  function parseXml(text) {
17996
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, text), "text/xml");
17996
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, text), "text/xml");
17997
17997
  }
17998
17998
  function collectRichText(root) {
17999
17999
  let out = "";
@@ -18228,7 +18228,7 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18228
18228
  cellRows.push(row);
18229
18229
  }
18230
18230
  if (cellRows.length > 0) {
18231
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18231
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18232
18232
  if (table2.rows > 0) {
18233
18233
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18234
18234
  }
@@ -18236,12 +18236,12 @@ function sheetToBlocks(sheetName, grid, merges, maxRow, maxCol, sheetIndex, keep
18236
18236
  return blocks;
18237
18237
  }
18238
18238
  async function parseXlsxDocument(buffer, options) {
18239
- _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18239
+ _chunk5FS4IZWYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE4);
18240
18240
  const zip = await _jszip2.default.loadAsync(buffer);
18241
18241
  const warnings = [];
18242
18242
  const workbookFile = zip.file("xl/workbook.xml");
18243
18243
  if (!workbookFile) {
18244
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18244
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 XLSX \uD30C\uC77C: xl/workbook.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
18245
18245
  }
18246
18246
  let sharedStrings = [];
18247
18247
  const ssFile = zip.file("xl/sharedStrings.xml");
@@ -18250,7 +18250,7 @@ async function parseXlsxDocument(buffer, options) {
18250
18250
  }
18251
18251
  const { sheets, date1904 } = parseWorkbook(await workbookFile.async("text"));
18252
18252
  if (sheets.length === 0) {
18253
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18253
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("XLSX \uD30C\uC77C\uC5D0 \uC2DC\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4");
18254
18254
  }
18255
18255
  let dateXfs = /* @__PURE__ */ new Map();
18256
18256
  const stylesFile = zip.file("xl/styles.xml");
@@ -18330,7 +18330,7 @@ async function parseXlsxDocument(buffer, options) {
18330
18330
  } catch (e29) {
18331
18331
  }
18332
18332
  }
18333
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
18333
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
18334
18334
  return { markdown, blocks, metadata, warnings: warnings.length > 0 ? warnings : void 0 };
18335
18335
  }
18336
18336
 
@@ -18781,11 +18781,11 @@ function processGlobals(records) {
18781
18781
  const xfFmtIds = [];
18782
18782
  const firstBof = records[0];
18783
18783
  if (!firstBof || firstBof.opcode !== OP_BOF) {
18784
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18784
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("XLS: \uCCAB \uB808\uCF54\uB4DC\uAC00 BOF\uAC00 \uC544\uB2D8");
18785
18785
  }
18786
18786
  const bof = decodeBof(firstBof.data);
18787
18787
  if (!bof || bof.dt !== DT_GLOBALS) {
18788
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18788
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("XLS: Globals \uC11C\uBE0C\uC2A4\uD2B8\uB9BC BOF \uB204\uB77D");
18789
18789
  }
18790
18790
  let i = 1;
18791
18791
  while (i < records.length) {
@@ -18920,7 +18920,7 @@ function sheetToBlocks2(sheetName, sheet, sheetIndex, keepAnchoredEmptyCols) {
18920
18920
  cellRows.push(row);
18921
18921
  }
18922
18922
  if (cellRows.length > 0) {
18923
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18923
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols });
18924
18924
  if (table2.rows > 0) {
18925
18925
  blocks.push({ type: "table", table: table2, pageNumber: sheetIndex + 1 });
18926
18926
  }
@@ -18933,21 +18933,21 @@ async function parseXlsDocument(buffer, options) {
18933
18933
  try {
18934
18934
  cfb = parseLenientCfb(buf);
18935
18935
  } catch (e) {
18936
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
18936
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
18937
18937
  `XLS: OLE2 \uC2DC\uADF8\uB2C8\uCC98 \uAC80\uC99D \uC2E4\uD328 \u2014 ${e instanceof Error ? e.message : "\uC54C \uC218 \uC5C6\uB294 \uC624\uB958"}`
18938
18938
  );
18939
18939
  }
18940
18940
  const wb = _nullishCoalesce(cfb.findStream("/Workbook"), () => ( cfb.findStream("/Book")));
18941
18941
  if (!wb) {
18942
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18942
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("XLS: Workbook \uC2A4\uD2B8\uB9BC\uC774 \uC5C6\uC74C (BIFF5 \uB610\uB294 \uBE44\uD45C\uC900 \uD30C\uC77C)");
18943
18943
  }
18944
18944
  const records = readRecords2(wb);
18945
18945
  if (records.length === 0) {
18946
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18946
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("XLS: \uC2DC\uADF8\uB2C8\uCC98 \uB808\uCF54\uB4DC\uAC00 \uC5C6\uC74C (Workbook \uC2A4\uD2B8\uB9BC \uC190\uC0C1)");
18947
18947
  }
18948
18948
  const firstBof = decodeBof(records[0].data);
18949
18949
  if (firstBof && firstBof.vers !== 1536) {
18950
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
18950
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
18951
18951
  `XLS: BIFF8(0x0600)\uB9CC \uC9C0\uC6D0 \u2014 \uBCF8 \uD30C\uC77C\uC740 0x${firstBof.vers.toString(16)}`
18952
18952
  );
18953
18953
  }
@@ -19015,7 +19015,7 @@ async function parseXlsDocument(buffer, options) {
19015
19015
  pageCount: totalSheets
19016
19016
  };
19017
19017
  return {
19018
- markdown: _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, allBlocks),
19018
+ markdown: _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, allBlocks),
19019
19019
  blocks: allBlocks,
19020
19020
  metadata,
19021
19021
  warnings: warnings.length > 0 ? warnings : void 0
@@ -19471,7 +19471,7 @@ function getAttr(el, localName2) {
19471
19471
  return null;
19472
19472
  }
19473
19473
  function parseXml2(text) {
19474
- return new (0, _xmldom.DOMParser)().parseFromString(_chunkLHH7AT6Jcjs.stripDtd.call(void 0, text), "text/xml");
19474
+ return new (0, _xmldom.DOMParser)().parseFromString(_chunk5FS4IZWYcjs.stripDtd.call(void 0, text), "text/xml");
19475
19475
  }
19476
19476
  function parseStyles(xml) {
19477
19477
  const doc = parseXml2(xml);
@@ -19629,7 +19629,7 @@ function fieldUrlFromInstr(instr) {
19629
19629
  function makeLink(text, rawHref) {
19630
19630
  if (!text) return "";
19631
19631
  if (!rawHref) return text;
19632
- const href = _chunkLHH7AT6Jcjs.sanitizeHref.call(void 0, rawHref);
19632
+ const href = _chunk5FS4IZWYcjs.sanitizeHref.call(void 0, rawHref);
19633
19633
  return href ? `[${text}](${href})` : text;
19634
19634
  }
19635
19635
  function collectInline(p, footnotes, rels) {
@@ -19823,7 +19823,7 @@ ${cell2.text}` : cell2.text;
19823
19823
  return { text: cell2.text, colSpan: cell2.colSpan, rowSpan, colAddr: cell2.col, rowAddr: r };
19824
19824
  })
19825
19825
  );
19826
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19826
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keepEmptyCols });
19827
19827
  if (table2.rows === 0 || table2.cols === 0) return null;
19828
19828
  return { type: "table", table: table2 };
19829
19829
  }
@@ -19925,12 +19925,12 @@ function emitParagraphImages(p, imageMap, linked, out) {
19925
19925
  }
19926
19926
  }
19927
19927
  async function parseDocxDocument(buffer, options) {
19928
- _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19928
+ _chunk5FS4IZWYcjs.precheckZipSize.call(void 0, buffer, MAX_DECOMPRESS_SIZE5);
19929
19929
  const zip = await _jszip2.default.loadAsync(buffer);
19930
19930
  const warnings = [];
19931
19931
  const docFile = zip.file("word/document.xml");
19932
19932
  if (!docFile) {
19933
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19933
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC720\uD6A8\uD558\uC9C0 \uC54A\uC740 DOCX \uD30C\uC77C: word/document.xml\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
19934
19934
  }
19935
19935
  let rels = /* @__PURE__ */ new Map();
19936
19936
  const relsFile = zip.file("word/_rels/document.xml.rels");
@@ -19977,7 +19977,7 @@ async function parseDocxDocument(buffer, options) {
19977
19977
  const doc = parseXml2(docXml);
19978
19978
  const body = findElements(doc, "body");
19979
19979
  if (body.length === 0) {
19980
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
19980
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("DOCX \uBCF8\uBB38(w:body)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
19981
19981
  }
19982
19982
  const { imageMap, images } = await buildImageMap(zip, rels, doc, warnings);
19983
19983
  const linkedImages = /* @__PURE__ */ new Set();
@@ -20028,7 +20028,7 @@ async function parseDocxDocument(buffer, options) {
20028
20028
  }
20029
20029
  }
20030
20030
  const outline = blocks.filter((b) => b.type === "heading").map((b) => ({ level: _nullishCoalesce(b.level, () => ( 2)), text: _nullishCoalesce(b.text, () => ( "")) }));
20031
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
20031
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
20032
20032
  return {
20033
20033
  markdown,
20034
20034
  blocks,
@@ -20051,7 +20051,7 @@ function parseHwpmlDocument(buffer, options) {
20051
20051
  }
20052
20052
  const text = new TextDecoder("utf-8").decode(buffer).replace(/^\uFEFF/, "");
20053
20053
  const normalized = text.replace(/&nbsp;/g, "&#160;");
20054
- const xml = _chunkLHH7AT6Jcjs.stripDtd.call(void 0, normalized);
20054
+ const xml = _chunk5FS4IZWYcjs.stripDtd.call(void 0, normalized);
20055
20055
  const warnings = [];
20056
20056
  const parser = new (0, _xmldom.DOMParser)({
20057
20057
  onError: (_level, msg2) => {
@@ -20091,7 +20091,7 @@ function parseHwpmlDocument(buffer, options) {
20091
20091
  parseSection2(el, blocks, paraShapeMap, sectionIdx, warnings, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _178 => _178.keepTrailingEmptyCols]), () => ( false)));
20092
20092
  }
20093
20093
  const outline = blocks.filter((b) => b.type === "heading" && b.text).map((b) => ({ level: _nullishCoalesce(b.level, () => ( 1)), text: b.text, pageNumber: b.pageNumber }));
20094
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
20094
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
20095
20095
  return {
20096
20096
  markdown,
20097
20097
  blocks,
@@ -20236,7 +20236,7 @@ function parseTable2(el, blocks, paraShapeMap, sectionNum, warnings, keep) {
20236
20236
  const r = Math.min(Math.max(_nullishCoalesce(cell2.rowAddr, () => ( 0)), 0), rowCount - 1);
20237
20237
  cellRows[r].push(cell2);
20238
20238
  }
20239
- const table2 = _chunkM4BQRAOMcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20239
+ const table2 = _chunk6XVQSILNcjs.buildTable.call(void 0, cellRows, { keepAnchoredEmptyCols: keep });
20240
20240
  const caption = extractShapeCaption(el);
20241
20241
  if (caption.text && caption.before) {
20242
20242
  blocks.push({ type: "paragraph", text: caption.text, pageNumber: sectionNum });
@@ -21618,19 +21618,19 @@ function parseCentralDirectory(buf) {
21618
21618
  }
21619
21619
  }
21620
21620
  }
21621
- if (eocdOffset < 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21621
+ if (eocdOffset < 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP EOCD\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21622
21622
  const totalEntries = view.getUint16(eocdOffset + 10, true);
21623
21623
  const cdSize = view.getUint32(eocdOffset + 12, true);
21624
21624
  const cdOffset = view.getUint32(eocdOffset + 16, true);
21625
- if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21625
+ if (cdOffset === 4294967295 || totalEntries === 65535) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21626
21626
  if (eocdOffset >= 20 && view.getUint32(eocdOffset - 20, true) === ZIP64_EOCD_LOC_SIG) {
21627
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21627
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21628
21628
  }
21629
21629
  const decoder = new TextDecoder("utf-8");
21630
21630
  const entries = [];
21631
21631
  let pos = cdOffset;
21632
21632
  for (let i = 0; i < totalEntries; i++) {
21633
- if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21633
+ if (view.getUint32(pos, true) !== CD_SIG) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP Central Directory \uC190\uC0C1");
21634
21634
  const flags = view.getUint16(pos + 8, true);
21635
21635
  const method = view.getUint16(pos + 10, true);
21636
21636
  const crc = view.getUint32(pos + 16, true);
@@ -21641,7 +21641,7 @@ function parseCentralDirectory(buf) {
21641
21641
  const commentLen = view.getUint16(pos + 32, true);
21642
21642
  const localOffset = view.getUint32(pos + 42, true);
21643
21643
  if (compSize === 4294967295 || uncompSize === 4294967295 || localOffset === 4294967295) {
21644
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21644
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP64\uB294 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4");
21645
21645
  }
21646
21646
  const name = decoder.decode(buf.subarray(pos + 46, pos + 46 + nameLen));
21647
21647
  const cdEnd = pos + 46 + nameLen + extraLen + commentLen;
@@ -21670,11 +21670,11 @@ function patchZipEntries(original, replacements, additions) {
21670
21670
  const { entries, cdOffset, eocdOffset } = parseCentralDirectory(original);
21671
21671
  const view = new DataView(original.buffer, original.byteOffset, original.byteLength);
21672
21672
  for (const name of replacements.keys()) {
21673
- if (!entries.some((e) => e.name === name)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21673
+ if (!entries.some((e) => e.name === name)) throw new (0, _chunk5FS4IZWYcjs.KordocError)(`ZIP\uC5D0 \uC5C6\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21674
21674
  }
21675
21675
  if (additions) {
21676
21676
  for (const name of additions.keys()) {
21677
- if (entries.some((e) => e.name === name)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21677
+ if (entries.some((e) => e.name === name)) throw new (0, _chunk5FS4IZWYcjs.KordocError)(`ZIP\uC5D0 \uC774\uBBF8 \uC788\uB294 \uC5D4\uD2B8\uB9AC: ${name}`);
21678
21678
  }
21679
21679
  }
21680
21680
  const byLocal = [...entries].sort((a, b) => a.localOffset - b.localOffset);
@@ -21693,7 +21693,7 @@ function patchZipEntries(original, replacements, additions) {
21693
21693
  offset += seg.length;
21694
21694
  continue;
21695
21695
  }
21696
- if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21696
+ if (view.getUint32(e.localOffset, true) !== LOCAL_SIG) throw new (0, _chunk5FS4IZWYcjs.KordocError)("ZIP \uB85C\uCEEC \uD5E4\uB354 \uC2DC\uADF8\uB2C8\uCC98 \uBD88\uC77C\uCE58");
21697
21697
  const nameLen = view.getUint16(e.localOffset + 26, true);
21698
21698
  const extraLen = view.getUint16(e.localOffset + 28, true);
21699
21699
  const headerLen = 30 + nameLen + extraLen;
@@ -21701,7 +21701,7 @@ function patchZipEntries(original, replacements, additions) {
21701
21701
  const hview = new DataView(header.buffer, header.byteOffset, header.byteLength);
21702
21702
  const method = e.method;
21703
21703
  if (method !== 0 && method !== 8) {
21704
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
21704
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(`\uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 ZIP \uC555\uCD95 \uBC29\uC2DD(method=${method}): ${e.name} \u2014 STORE(0)/DEFLATE(8)\uB9CC \uAD50\uCCB4 \uAC00\uB2A5`);
21705
21705
  }
21706
21706
  const compData = method === 0 ? newData : new Uint8Array(_zlib.deflateRawSync.call(void 0, newData));
21707
21707
  const crc = crc32(newData);
@@ -21802,7 +21802,7 @@ async function fillHwpx(hwpxBuffer, values, blockedLabels) {
21802
21802
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
21803
21803
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort();
21804
21804
  if (sectionPaths.length === 0) {
21805
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21805
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
21806
21806
  }
21807
21807
  const warnings = [];
21808
21808
  const normalizedValues = normalizeValues(values, warnings);
@@ -22539,7 +22539,7 @@ function assertSequentialIds(rows, label, startId) {
22539
22539
  const m = rows[i].match(/\bid="(\d+)"/);
22540
22540
  const got = m ? Number(m[1]) : NaN;
22541
22541
  if (got !== startId + i) {
22542
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
22542
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
22543
22543
  `\uB0B4\uBD80 \uC624\uB958: ${label} id \uD30C\uD2F0\uC158 \uB4DC\uB9AC\uD504\uD2B8 \u2014 ${startId + i} \uC704\uCE58\uC5D0 id=${m ? m[1] : "?"} \uBC29\uCD9C. id \uC0C1\uC218(gen-ids)\uC640 \uC2E4\uC81C \uBC29\uCD9C \uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4 (GJ_CHAR_COUNT\uB958 \uCE74\uC6B4\uD2B8\xB7base \uC0B0\uC220 \uD655\uC778)`
22544
22544
  );
22545
22545
  }
@@ -22623,7 +22623,7 @@ function buildCharProperties(theme, gongmun, ratioVariants = [], extraCharPrXmls
22623
22623
  }
22624
22624
  const expectedBase = charVariantBase(richAssets, !!gongmun);
22625
22625
  if (rows.length !== expectedBase) {
22626
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
22626
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
22627
22627
  `\uB0B4\uBD80 \uC624\uB958: charPr \uAE30\uBCF8 \uBE14\uB85D \uBC29\uCD9C \uC218(${rows.length}) \u2260 charVariantBase(${expectedBase}) \u2014 gen-header \uBC29\uCD9C \uD589\uACFC gen-ids \uCE74\uC6B4\uD2B8 \uC0C1\uC218\uAC00 \uC5B4\uAE0B\uB0AC\uB2E4`
22628
22628
  );
22629
22629
  }
@@ -22671,11 +22671,12 @@ ${base2.join("\n")}
22671
22671
  paraPr(6, { align: "LEFT", lineSpacing: ls, indent: 600, keepWord: true }),
22672
22672
  paraPr(7, { align: "LEFT", lineSpacing: ls, indent: 600, keepWord: true })
22673
22673
  ];
22674
+ const listAlign = gongmun.numbering === "gaejosik" || gongmun.numbering === "report" ? "LEFT" : "JUSTIFY";
22674
22675
  for (let d = 0; d < GONGMUN_LIST_LEVELS; d++) {
22675
22676
  const { left, indent } = levelIndent(d, gongmun.bodyHeight, gongmun.numbering, gongmun.sizes, gongmun.bullet2, usesAsteriskThird(gongmun.preset));
22676
22677
  const sectionGap = gongmun.numbering === "gaejosik" || gongmun.numbering === "report" ? gaejosikSpaceBefore(d, gongmun.bodyHeight) : 0;
22677
22678
  const keepNext = (gongmun.numbering === "gaejosik" || gongmun.numbering === "report") && d === 0;
22678
- base.push(paraPr(GONGMUN_LIST_BASE + d, { align: "JUSTIFY", lineSpacing: ls, left, indent, spaceBefore: sectionGap, keepWord: true, keepWithNext: keepNext }));
22679
+ base.push(paraPr(GONGMUN_LIST_BASE + d, { align: listAlign, lineSpacing: ls, left, indent, spaceBefore: sectionGap, keepWord: true, keepWithNext: keepNext }));
22679
22680
  }
22680
22681
  base.push(paraPr(GONGMUN_CENTER, { align: "CENTER", lineSpacing: ls, keepWord: true }));
22681
22682
  base.push(paraPr(GONGMUN_RIGHT, { align: "RIGHT", lineSpacing: ls, keepWord: true }));
@@ -22685,7 +22686,7 @@ ${base2.join("\n")}
22685
22686
  const cham = gaejosikChamIndent(gongmun.bodyHeight, gongmun.sizes);
22686
22687
  const toc = gaejosikTocItemIndent(gongmun.bodyHeight, gongmun.sizes);
22687
22688
  base.push(
22688
- paraPr(GJ_PARA_CHAM, { align: "JUSTIFY", lineSpacing: ls, left: cham.left, indent: cham.indent, spaceBefore: gaejosikSpaceBefore(3, gongmun.bodyHeight), keepWord: true }),
22689
+ paraPr(GJ_PARA_CHAM, { align: "LEFT", lineSpacing: ls, left: cham.left, indent: cham.indent, spaceBefore: gaejosikSpaceBefore(3, gongmun.bodyHeight), keepWord: true }),
22689
22690
  paraPr(GJ_PARA_COVER, { align: "CENTER", lineSpacing: 130, keepWord: true }),
22690
22691
  paraPr(GJ_PARA_TOC_ITEM, { align: "LEFT", lineSpacing: 160, left: toc.left, indent: toc.indent, spaceBefore: 1800, keepWord: true }),
22691
22692
  // 장 헤더는 다음 문단과 같은 쪽에 — 쪽 하단 고아 헤더 방지 (실렌더 확인 이슈)
@@ -22697,7 +22698,7 @@ ${base2.join("\n")}
22697
22698
  for (let d = 0; d < GONGMUN_LIST_LEVELS; d++) {
22698
22699
  const { left } = levelIndent(d, gongmun.bodyHeight, gongmun.numbering, gongmun.sizes, gongmun.bullet2, usesAsteriskThird(gongmun.preset));
22699
22700
  const sectionGap = gongmun.numbering === "gaejosik" || gongmun.numbering === "report" ? gaejosikSpaceBefore(d, gongmun.bodyHeight) : 0;
22700
- base.push(paraPr(GONGMUN_LIST_PLAIN_BASE + d, { align: "JUSTIFY", lineSpacing: ls, left, indent: 0, spaceBefore: sectionGap, keepWord: true }));
22701
+ base.push(paraPr(GONGMUN_LIST_PLAIN_BASE + d, { align: listAlign, lineSpacing: ls, left, indent: 0, spaceBefore: sectionGap, keepWord: true }));
22701
22702
  }
22702
22703
  base.push(paraPr(GONGMUN_PARA_APPROVAL, { align: "CENTER", lineSpacing: 100, keepWord: true }));
22703
22704
  for (let vi = 0; vi < listIndentVariants.length; vi++) {
@@ -22705,7 +22706,7 @@ ${base2.join("\n")}
22705
22706
  const { left } = levelIndent(depth, gongmun.bodyHeight, gongmun.numbering, gongmun.sizes, gongmun.bullet2, usesAsteriskThird(gongmun.preset));
22706
22707
  const sectionGap = gongmun.numbering === "gaejosik" || gongmun.numbering === "report" ? gaejosikSpaceBefore(depth, gongmun.bodyHeight) : 0;
22707
22708
  const keepNext = (gongmun.numbering === "gaejosik" || gongmun.numbering === "report") && depth === 0;
22708
- base.push(paraPr(GONGMUN_LIST_VARIANT_BASE + vi, { align: "JUSTIFY", lineSpacing: ls, left, indent: -widthHu, spaceBefore: sectionGap, keepWord: true, keepWithNext: keepNext }));
22709
+ base.push(paraPr(GONGMUN_LIST_VARIANT_BASE + vi, { align: listAlign, lineSpacing: ls, left, indent: -widthHu, spaceBefore: sectionGap, keepWord: true, keepWithNext: keepNext }));
22709
22710
  }
22710
22711
  assertSequentialIds(base, "paraPr", 0);
22711
22712
  return `<hh:paraProperties itemCnt="${base.length}">
@@ -23518,7 +23519,7 @@ function escapeGfm(text) {
23518
23519
  }
23519
23520
  var HWP_SHAPE_ALT_TEXT_RE = /^(?:모서리가 둥근 |둥근 )?(?:사각형|직사각형|정사각형|원|타원|삼각형|이등변 삼각형|직각 삼각형|선|직선|곡선|화살표|굵은 화살표|이중 화살표|오각형|육각형|팔각형|별|[4-8]점별|십자|십자형|구름|구름형|마름모|도넛|평행사변형|사다리꼴|부채꼴|호|반원|물결|번개|하트|빗금|블록 화살표|수식|표|그림|개체|그리기\s?개체|묶음\s?개체|글상자|수식\s?개체|OLE\s?개체)\s?입니다\.?$/gm;
23520
23521
  function sanitizeText(text) {
23521
- let result = _chunkM4BQRAOMcjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23522
+ let result = _chunk6XVQSILNcjs.mapPuaText.call(void 0, text).replace(/[\u{F0000}-\u{FFFFD}]/gu, "").replace(HWP_SHAPE_ALT_TEXT_RE, "").replace(/ +/g, " ").trim();
23522
23523
  if (result.length <= 30 && result.includes(" ")) {
23523
23524
  const tokens = result.split(" ");
23524
23525
  const koreanSingleCharCount = tokens.filter((t) => t.length === 1 && /[가-힯ㄱ-ㆎ]/.test(t)).length;
@@ -23690,7 +23691,7 @@ function parseHtmlTable(raw) {
23690
23691
  const cs = parseInt(_optionalChain([attrs, 'access', _285 => _285.match, 'call', _286 => _286(/colspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _287 => _287[1]]) || "1", 10);
23691
23692
  const rs = parseInt(_optionalChain([attrs, 'access', _288 => _288.match, 'call', _289 => _289(/rowspan\s*=\s*["']?(\d+)/i), 'optionalAccess', _290 => _290[1]]) || "1", 10);
23692
23693
  cellStart = m.index + m[0].length;
23693
- cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunkM4BQRAOMcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunkM4BQRAOMcjs.MAX_ROWS) };
23694
+ cellInfo = { colSpan: clampSpan(isNaN(cs) ? 1 : cs, _chunk6XVQSILNcjs.MAX_COLS), rowSpan: clampSpan(isNaN(rs) ? 1 : rs, _chunk6XVQSILNcjs.MAX_ROWS) };
23694
23695
  } else if (cellStart >= 0 && cellInfo && currentRow) {
23695
23696
  currentRow.push({ inner: raw.slice(cellStart, m.index), colSpan: cellInfo.colSpan, rowSpan: cellInfo.rowSpan });
23696
23697
  cellStart = -1;
@@ -24346,8 +24347,8 @@ function layoutHtmlRows(rows) {
24346
24347
  let c = 0;
24347
24348
  for (const cell2 of rows[r].cells) {
24348
24349
  while (occupied.has(`${r},${c}`)) c++;
24349
- const colSpan = clampSpan(cell2.colSpan, _chunkM4BQRAOMcjs.MAX_COLS);
24350
- const rowSpan = clampSpan(cell2.rowSpan, _chunkM4BQRAOMcjs.MAX_ROWS);
24350
+ const colSpan = clampSpan(cell2.colSpan, _chunk6XVQSILNcjs.MAX_COLS);
24351
+ const rowSpan = clampSpan(cell2.rowSpan, _chunk6XVQSILNcjs.MAX_ROWS);
24351
24352
  placed.push({ r, c, colSpan, rowSpan, inner: cell2.inner, isHeader: rows[r].tag === "th" });
24352
24353
  for (let dr = 0; dr < rowSpan; dr++) {
24353
24354
  for (let dc = 0; dc < colSpan; dc++) occupied.add(`${r + dr},${c + dc}`);
@@ -25944,11 +25945,11 @@ function buildFloatPicXml(itemId, sizeHu, posXHu, posYHu, ids) {
25944
25945
  return `<hp:pic xmlns:hc="http://www.hancom.co.kr/hwpml/2011/core" id="${ids.id}" zOrder="0" numberingType="PICTURE" textWrap="IN_FRONT_OF_TEXT" textFlow="BOTH_SIDES" lock="0" dropcapstyle="None" href="" groupLevel="0" instid="${ids.instid}" reverse="0"><hp:offset x="0" y="0"/><hp:orgSz width="${w}" height="${h}"/><hp:curSz width="${w}" height="${h}"/><hp:flip horizontal="0" vertical="0"/><hp:rotationInfo angle="0" centerX="${Math.round(w / 2)}" centerY="${Math.round(h / 2)}" rotateimage="1"/><hp:renderingInfo><hc:transMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:scaMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/><hc:rotMatrix e1="1" e2="0" e3="0" e4="0" e5="1" e6="0"/></hp:renderingInfo><hp:imgRect><hc:pt0 x="0" y="0"/><hc:pt1 x="${w}" y="0"/><hc:pt2 x="${w}" y="${h}"/><hc:pt3 x="0" y="${h}"/></hp:imgRect><hp:imgClip left="0" right="${w}" top="0" bottom="${h}"/><hp:inMargin left="0" right="0" top="0" bottom="0"/><hp:imgDim dimwidth="${w}" dimheight="${h}"/><hc:img binaryItemIDRef="${itemId}" bright="0" contrast="0" effect="REAL_PIC" alpha="0"/><hp:effects/><hp:sz width="${w}" widthRelTo="ABSOLUTE" height="${h}" heightRelTo="ABSOLUTE" protect="0"/><hp:pos treatAsChar="0" affectLSpacing="0" flowWithText="0" allowOverlap="1" holdAnchorAndSO="0" vertRelTo="PARA" horzRelTo="COLUMN" vertAlign="TOP" horzAlign="LEFT" vertOffset="${posYHu}" horzOffset="${posXHu}"/><hp:outMargin left="0" right="0" top="0" bottom="0"/><hp:shapeComment>kordoc seal</hp:shapeComment></hp:pic>`;
25945
25946
  }
25946
25947
  async function placeSealHwpx(hwpxBuffer, ops) {
25947
- if (ops.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25948
+ if (ops.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("place_seal: \uBC30\uCE58\uD560 \uB3C4\uC7A5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4");
25948
25949
  const u8 = new Uint8Array(hwpxBuffer);
25949
25950
  const zip = await _jszip2.default.loadAsync(hwpxBuffer);
25950
25951
  const sectionPaths = Object.keys(zip.files).filter((name) => /[Ss]ection\d+\.xml$/i.test(name)).sort((a, b) => Number(_nullishCoalesce(_optionalChain([a, 'access', _392 => _392.match, 'call', _393 => _393(/(\d+)\.xml$/i), 'optionalAccess', _394 => _394[1]]), () => ( 0))) - Number(_nullishCoalesce(_optionalChain([b, 'access', _395 => _395.match, 'call', _396 => _396(/(\d+)\.xml$/i), 'optionalAccess', _397 => _397[1]]), () => ( 0))));
25951
- if (sectionPaths.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25952
+ if (sectionPaths.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("HWPX\uC5D0\uC11C \uC139\uC158 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4");
25952
25953
  const manifestPath = Object.keys(zip.files).find((name) => /\.hpf$/i.test(name));
25953
25954
  const headerPath = Object.keys(zip.files).find((name) => /(^|\/)header\.xml$/i.test(name));
25954
25955
  const styles = headerPath ? parseRenderStyles(await zip.file(headerPath).async("text")) : null;
@@ -25989,11 +25990,11 @@ async function placeSealHwpx(hwpxBuffer, ops) {
25989
25990
  const manifestItems = [];
25990
25991
  const placed = [];
25991
25992
  for (const op of ops) {
25992
- if (!op.anchor) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25993
- if (!op.image || op.image.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25993
+ if (!op.anchor) throw new (0, _chunk5FS4IZWYcjs.KordocError)("place_seal: anchor \uBB38\uAD6C\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25994
+ if (!op.image || op.image.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("place_seal: \uB3C4\uC7A5 \uC774\uBBF8\uC9C0\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4");
25994
25995
  const ext = (_nullishCoalesce(op.ext, () => ( "png"))).toLowerCase();
25995
- if (!MIME[ext]) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
25996
- if (!imageMagicMatches(op.image, ext)) throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
25996
+ if (!MIME[ext]) throw new (0, _chunk5FS4IZWYcjs.KordocError)(`place_seal: \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uC774\uBBF8\uC9C0 \uD655\uC7A5\uC790 .${ext} (png/jpg/bmp/gif)`);
25997
+ if (!imageMagicMatches(op.image, ext)) throw new (0, _chunk5FS4IZWYcjs.KordocError)(`place_seal: \uC774\uBBF8\uC9C0 \uB0B4\uC6A9\uC774 .${ext} \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 (\uB9E4\uC9C1\uBC14\uC774\uD2B8 \uBD88\uC77C\uCE58)`);
25997
25998
  const wantOcc = _nullishCoalesce(op.occurrence, () => ( 0));
25998
25999
  let found = null;
25999
26000
  let total = 0;
@@ -26026,7 +26027,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26026
26027
  }
26027
26028
  }
26028
26029
  }
26029
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
26030
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
26030
26031
  `place_seal: \uC575\uCEE4 "${op.anchor}" ${wantOcc}\uBC88\uC9F8 \uB4F1\uC7A5\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4 (\uBCF8\uBB38 \uB0B4 ${total}\uD68C \uB4F1\uC7A5 \u2014 occurrence 0..${Math.max(0, total - 1)})`
26031
26032
  );
26032
26033
  }
@@ -26034,7 +26035,7 @@ async function placeSealHwpx(hwpxBuffer, ops) {
26034
26035
  const xml = sectionXmls[si];
26035
26036
  const run = anchorRunInfo(xml, site.para, op.anchor);
26036
26037
  if (!run) {
26037
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26038
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(`place_seal: \uC575\uCEE4 "${op.anchor}" \uBB38\uB2E8\uC5D0\uC11C run\uC744 \uCC3E\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4`);
26038
26039
  }
26039
26040
  const charPrHeight = _nullishCoalesce(_optionalChain([styles, 'optionalAccess', _398 => _398.charPr, 'access', _399 => _399.get, 'call', _400 => _400(run.charPr), 'optionalAccess', _401 => _401.height]), () => ( 1e3));
26040
26041
  const fontPt = charPrHeight / 100;
@@ -26312,7 +26313,7 @@ function pick(map, keys) {
26312
26313
  return out;
26313
26314
  }
26314
26315
  async function hwpxToProfile(input) {
26315
- const buf = input instanceof ArrayBuffer ? input : _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
26316
+ const buf = input instanceof ArrayBuffer ? input : _chunk5FS4IZWYcjs.toArrayBuffer.call(void 0, input);
26316
26317
  const zip = await _jszip2.default.loadAsync(buf);
26317
26318
  const parser = createXmlParser();
26318
26319
  const headerFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( _optionalChain([zip, 'access', _423 => _423.file, 'call', _424 => _424(/[Hh]eader\.xml$/), 'optionalAccess', _425 => _425[0]])));
@@ -27231,7 +27232,7 @@ async function resolveSectionEntryNames(zip) {
27231
27232
  const paths = sectionPathsFromManifest(xml).filter((p) => zip.file(p) !== null);
27232
27233
  if (paths.length > 0) return paths;
27233
27234
  }
27234
- return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
27235
+ return Object.keys(zip.files).filter((n) => /[Ss]ection\d+\.xml$/.test(n)).sort(_chunk5FS4IZWYcjs.compareSectionPaths);
27235
27236
  }
27236
27237
  function sectionPathsFromManifest(xml) {
27237
27238
  const attr = (tag, name) => {
@@ -27241,7 +27242,7 @@ function sectionPathsFromManifest(xml) {
27241
27242
  const idToHref = /* @__PURE__ */ new Map();
27242
27243
  for (const m of xml.matchAll(/<opf:item(\s(?:"[^"]*"|'[^']*'|[^>"'])*?)\/?>/g)) {
27243
27244
  const id = attr(m[1], "id");
27244
- const href = _chunkLHH7AT6Jcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27245
+ const href = _chunk5FS4IZWYcjs.normalizeSectionHref.call(void 0, attr(m[1], "href"));
27245
27246
  if (id && href) idToHref.set(id, href);
27246
27247
  }
27247
27248
  const ordered = [];
@@ -27250,7 +27251,7 @@ function sectionPathsFromManifest(xml) {
27250
27251
  if (href) ordered.push(href);
27251
27252
  }
27252
27253
  if (ordered.length > 0) return ordered;
27253
- return Array.from(idToHref.values()).sort(_chunkLHH7AT6Jcjs.compareSectionPaths);
27254
+ return Array.from(idToHref.values()).sort(_chunk5FS4IZWYcjs.compareSectionPaths);
27254
27255
  }
27255
27256
 
27256
27257
  // src/roundtrip/patcher.ts
@@ -27361,9 +27362,9 @@ function buildOrigUnits(blocks) {
27361
27362
  if (block.type === "paragraph" && block.text && /^\[별표\s*\d+/.test(sanitizeText(block.text))) {
27362
27363
  const next = blocks[i + 1];
27363
27364
  if (_optionalChain([next, 'optionalAccess', _458 => _458.type]) === "paragraph" && next.text && /관련\)?$/.test(next.text)) consume = 2;
27364
- chunk = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27365
+ chunk = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks.slice(i, i + consume));
27365
27366
  } else {
27366
- chunk = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, [block]);
27367
+ chunk = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, [block]);
27367
27368
  }
27368
27369
  if (chunk) {
27369
27370
  const subUnits = splitMarkdownUnits(chunk);
@@ -28966,12 +28967,12 @@ function blocksToChunks(blocks, options) {
28966
28967
  let run = null;
28967
28968
  const flushRun = () => {
28968
28969
  if (!run) return;
28969
- push("text", run.breadcrumb, _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
28970
+ push("text", run.breadcrumb, _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, run.blocks), [run.start, run.end], run.page);
28970
28971
  run = null;
28971
28972
  };
28972
28973
  for (let i = 0; i < blocks.length; i++) {
28973
28974
  const block = blocks[i];
28974
- const md2 = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, [block]);
28975
+ const md2 = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, [block]);
28975
28976
  if (!md2) continue;
28976
28977
  if (block.type === "heading") {
28977
28978
  flushRun();
@@ -29441,13 +29442,13 @@ async function htmlToPdf(html, options) {
29441
29442
  try {
29442
29443
  puppeteer = await Promise.resolve().then(() => _interopRequireWildcard(require("puppeteer-core")));
29443
29444
  } catch (e32) {
29444
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
29445
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
29445
29446
  "PDF \uC0DD\uC131\uC5D0 puppeteer-core\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4. \uC124\uCE58: npm install puppeteer-core"
29446
29447
  );
29447
29448
  }
29448
29449
  const executablePath = _nullishCoalesce(process.env.PUPPETEER_EXECUTABLE_PATH, () => ( findChromiumPath()));
29449
29450
  if (!executablePath) {
29450
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)(
29451
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)(
29451
29452
  "Chromium \uC2E4\uD589 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. PUPPETEER_EXECUTABLE_PATH \uD658\uACBD\uBCC0\uC218\uB97C \uC124\uC815\uD558\uC138\uC694."
29452
29453
  );
29453
29454
  }
@@ -29506,7 +29507,7 @@ async function markdownToPdf(markdown, options) {
29506
29507
  return htmlToPdf(html, options);
29507
29508
  }
29508
29509
  async function blocksToPdf(blocks, options) {
29509
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks);
29510
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks);
29510
29511
  return markdownToPdf(markdown, options);
29511
29512
  }
29512
29513
 
@@ -30400,15 +30401,15 @@ function renderSectionToPages(root, geom, ctxBase, doReflow, reflowMode) {
30400
30401
  async function renderHwpxToSvg(input, options) {
30401
30402
  const maxImg = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _555 => _555.maxImageBytes]), () => ( 40 * 1024 * 1024));
30402
30403
  const ab = input instanceof Uint8Array ? input.buffer.slice(input.byteOffset, input.byteOffset + input.byteLength) : input;
30403
- _chunkLHH7AT6Jcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30404
+ _chunk5FS4IZWYcjs.precheckZipSize.call(void 0, ab, MAX_DECOMPRESS_SIZE, MAX_ZIP_ENTRIES);
30404
30405
  let zip;
30405
30406
  try {
30406
30407
  zip = await _jszip2.default.loadAsync(input);
30407
30408
  } catch (e33) {
30408
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30409
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("HWPX(ZIP) \uD615\uC2DD\uC774 \uC544\uB2D9\uB2C8\uB2E4 \u2014 \uB80C\uB354\uB294 HWPX\uB9CC \uC9C0\uC6D0");
30409
30410
  }
30410
30411
  const secFiles = zip.file(/Contents\/section\d+\.xml$/i).sort((a, b) => a.name.localeCompare(b.name));
30411
- if (secFiles.length === 0) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30412
+ if (secFiles.length === 0) throw new (0, _chunk5FS4IZWYcjs.KordocError)("Contents/section0.xml \uC5C6\uC74C \u2014 HWPX\uAC00 \uC544\uB2C8\uAC70\uB098 \uC190\uC0C1\uB428");
30412
30413
  const warnings = [];
30413
30414
  const headFile = _nullishCoalesce(zip.file("Contents/header.xml"), () => ( zip.file("Contents/head.xml")));
30414
30415
  const styles = headFile ? parseRenderStyles(await headFile.async("string")) : { charPr: /* @__PURE__ */ new Map(), paraAlign: /* @__PURE__ */ new Map(), paraGeom: /* @__PURE__ */ new Map(), borderFill: /* @__PURE__ */ new Map() };
@@ -30416,7 +30417,7 @@ async function renderHwpxToSvg(input, options) {
30416
30417
  const secXmls = [];
30417
30418
  for (const f of secFiles) {
30418
30419
  const xml = await f.async("string");
30419
- if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30420
+ if (xml.length > MAX_DECOMPRESS_SIZE) throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC139\uC158 XML\uC774 \uD5C8\uC6A9 \uD06C\uAE30\uB97C \uCD08\uACFC");
30420
30421
  secXmls.push(xml);
30421
30422
  }
30422
30423
  const binmap = /* @__PURE__ */ new Map();
@@ -30489,9 +30490,9 @@ async function renderHwpxToSvg(input, options) {
30489
30490
  }
30490
30491
  if (rendered.length === 0) {
30491
30492
  if (noCacheSkipped) {
30492
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
30493
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uC870\uD310 \uCE90\uC2DC(linesegarray) \uC5C6\uC74C \u2014 \uD55C\uCEF4\uC5D0\uC11C \uC800\uC7A5\uD55C HWPX\uB9CC \uB80C\uB354 \uAC00\uB2A5 (reflow \uC635\uC158\uC73C\uB85C \uD569\uC131 \uB80C\uB354 \uAC00\uB2A5)");
30493
30494
  }
30494
- throw new (0, _chunkLHH7AT6Jcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30495
+ throw new (0, _chunk5FS4IZWYcjs.KordocError)("\uB80C\uB354\uD560 \uAD6C\uC5ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4 \u2014 HWPX\uAC00 \uC190\uC0C1\uB418\uC5C8\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4");
30495
30496
  }
30496
30497
  const GAP = 2400;
30497
30498
  const clipDefs = [];
@@ -30527,13 +30528,13 @@ async function parse(input, options) {
30527
30528
  if (typeof input === "string") {
30528
30529
  try {
30529
30530
  const buf = await _promises.readFile.call(void 0, input);
30530
- buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, buf);
30531
+ buffer = _chunk5FS4IZWYcjs.toArrayBuffer.call(void 0, buf);
30531
30532
  } catch (err) {
30532
30533
  const msg2 = err instanceof Error && "code" in err && err.code === "ENOENT" ? `\uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4: ${input}` : `\uD30C\uC77C \uC77D\uAE30 \uC2E4\uD328: ${input}`;
30533
30534
  return { success: false, fileType: "unknown", error: msg2, code: "PARSE_ERROR" };
30534
30535
  }
30535
30536
  } else if (Buffer.isBuffer(input)) {
30536
- buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
30537
+ buffer = _chunk5FS4IZWYcjs.toArrayBuffer.call(void 0, input);
30537
30538
  } else {
30538
30539
  buffer = input;
30539
30540
  }
@@ -30567,18 +30568,18 @@ async function parse(input, options) {
30567
30568
  }
30568
30569
  async function parseImage(buffer, options) {
30569
30570
  try {
30570
- const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-RN77CC5P.cjs")));
30571
+ const { parseImageDocument } = await Promise.resolve().then(() => _interopRequireWildcard(require("./image-ocr-YOUVLJIH.cjs")));
30571
30572
  const { blocks, warnings } = await parseImageDocument(buffer, options);
30572
30573
  return {
30573
30574
  success: true,
30574
30575
  fileType: "image",
30575
- markdown: _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, blocks),
30576
+ markdown: _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, blocks),
30576
30577
  blocks,
30577
30578
  warnings: warnings.length ? warnings : void 0,
30578
30579
  pageCount: 1
30579
30580
  };
30580
30581
  } catch (err) {
30581
- return { success: false, fileType: "image", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30582
+ return { success: false, fileType: "image", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30582
30583
  }
30583
30584
  }
30584
30585
  async function parseHwp3(buffer, options) {
@@ -30586,7 +30587,7 @@ async function parseHwp3(buffer, options) {
30586
30587
  const { markdown, blocks, metadata, outline, warnings } = parseHwp3Document(buffer, options);
30587
30588
  return { success: true, fileType: "hwp3", markdown, blocks, metadata, outline, warnings };
30588
30589
  } catch (err) {
30589
- return { success: false, fileType: "hwp3", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30590
+ return { success: false, fileType: "hwp3", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30590
30591
  }
30591
30592
  }
30592
30593
  async function parseHwpx(buffer, options) {
@@ -30594,7 +30595,7 @@ async function parseHwpx(buffer, options) {
30594
30595
  const { markdown, blocks, metadata, outline, warnings, images } = await parseHwpxDocument(buffer, options);
30595
30596
  return { success: true, fileType: "hwpx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _562 => _562.length]) ? images : void 0 };
30596
30597
  } catch (err) {
30597
- return { success: false, fileType: "hwpx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30598
+ return { success: false, fileType: "hwpx", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30598
30599
  }
30599
30600
  }
30600
30601
  async function parseHwp(buffer, options) {
@@ -30619,13 +30620,13 @@ async function parseHwp(buffer, options) {
30619
30620
  }
30620
30621
  return { success: true, fileType: "hwp", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _564 => _564.length]) ? images : void 0 };
30621
30622
  } catch (err) {
30622
- return { success: false, fileType: "hwp", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30623
+ return { success: false, fileType: "hwp", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30623
30624
  }
30624
30625
  }
30625
30626
  async function parsePdf(buffer, options) {
30626
30627
  let parsePdfDocument;
30627
30628
  try {
30628
- const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-5TEQ6EFF.cjs")));
30629
+ const mod = await Promise.resolve().then(() => _interopRequireWildcard(require("./parser-AUMEO4OU.cjs")));
30629
30630
  parsePdfDocument = mod.parsePdfDocument;
30630
30631
  } catch (e35) {
30631
30632
  return {
@@ -30640,7 +30641,7 @@ async function parsePdf(buffer, options) {
30640
30641
  return { success: true, fileType: "pdf", markdown, blocks, metadata, outline, warnings, isImageBased, pageQuality, qualitySummary, images };
30641
30642
  } catch (err) {
30642
30643
  const isImageBased = err instanceof Error && "isImageBased" in err ? true : void 0;
30643
- return { success: false, fileType: "pdf", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err), isImageBased };
30644
+ return { success: false, fileType: "pdf", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err), isImageBased };
30644
30645
  }
30645
30646
  }
30646
30647
  async function parseXlsx(buffer, options) {
@@ -30648,7 +30649,7 @@ async function parseXlsx(buffer, options) {
30648
30649
  const { markdown, blocks, metadata, warnings } = await parseXlsxDocument(buffer, options);
30649
30650
  return { success: true, fileType: "xlsx", markdown, blocks, metadata, warnings };
30650
30651
  } catch (err) {
30651
- return { success: false, fileType: "xlsx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30652
+ return { success: false, fileType: "xlsx", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30652
30653
  }
30653
30654
  }
30654
30655
  async function parseXls(buffer, options) {
@@ -30656,7 +30657,7 @@ async function parseXls(buffer, options) {
30656
30657
  const { markdown, blocks, metadata, warnings } = await parseXlsDocument(buffer, options);
30657
30658
  return { success: true, fileType: "xls", markdown, blocks, metadata, warnings };
30658
30659
  } catch (err) {
30659
- return { success: false, fileType: "xls", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30660
+ return { success: false, fileType: "xls", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30660
30661
  }
30661
30662
  }
30662
30663
  async function parseDocx(buffer, options) {
@@ -30664,7 +30665,7 @@ async function parseDocx(buffer, options) {
30664
30665
  const { markdown, blocks, metadata, outline, warnings, images } = await parseDocxDocument(buffer, options);
30665
30666
  return { success: true, fileType: "docx", markdown, blocks, metadata, outline, warnings, images: _optionalChain([images, 'optionalAccess', _565 => _565.length]) ? images : void 0 };
30666
30667
  } catch (err) {
30667
- return { success: false, fileType: "docx", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30668
+ return { success: false, fileType: "docx", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30668
30669
  }
30669
30670
  }
30670
30671
  async function parseHwpml(buffer, options) {
@@ -30672,16 +30673,16 @@ async function parseHwpml(buffer, options) {
30672
30673
  const { markdown, blocks, metadata, outline, warnings } = parseHwpmlDocument(buffer, options);
30673
30674
  return { success: true, fileType: "hwpml", markdown, blocks, metadata, outline, warnings };
30674
30675
  } catch (err) {
30675
- return { success: false, fileType: "hwpml", error: _chunkLHH7AT6Jcjs.sanitizeError.call(void 0, err), code: _chunkLHH7AT6Jcjs.classifyError.call(void 0, err) };
30676
+ return { success: false, fileType: "hwpml", error: _chunk5FS4IZWYcjs.sanitizeError.call(void 0, err), code: _chunk5FS4IZWYcjs.classifyError.call(void 0, err) };
30676
30677
  }
30677
30678
  }
30678
30679
  async function fillForm(input, values, outputFormat = "markdown") {
30679
30680
  let buffer;
30680
30681
  if (typeof input === "string") {
30681
30682
  const buf = await _promises.readFile.call(void 0, input);
30682
- buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, buf);
30683
+ buffer = _chunk5FS4IZWYcjs.toArrayBuffer.call(void 0, buf);
30683
30684
  } else if (Buffer.isBuffer(input)) {
30684
- buffer = _chunkLHH7AT6Jcjs.toArrayBuffer.call(void 0, input);
30685
+ buffer = _chunk5FS4IZWYcjs.toArrayBuffer.call(void 0, input);
30685
30686
  } else {
30686
30687
  buffer = input;
30687
30688
  }
@@ -30707,7 +30708,7 @@ async function fillForm(input, values, outputFormat = "markdown") {
30707
30708
  throw new Error(`\uC11C\uC2DD \uD30C\uC2F1 \uC2E4\uD328: ${parsed.error}`);
30708
30709
  }
30709
30710
  const fill = fillFormFields(parsed.blocks, values);
30710
- const markdown = _chunkM4BQRAOMcjs.blocksToMarkdown.call(void 0, fill.blocks);
30711
+ const markdown = _chunk6XVQSILNcjs.blocksToMarkdown.call(void 0, fill.blocks);
30711
30712
  if (outputFormat === "hwpx") {
30712
30713
  const hwpxBuffer = await markdownToHwpx(markdown);
30713
30714
  return { output: hwpxBuffer, format: "hwpx", fill };
@@ -30781,5 +30782,5 @@ async function fillForm(input, values, outputFormat = "markdown") {
30781
30782
 
30782
30783
 
30783
30784
 
30784
- exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunkLHH7AT6Jcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunkM4BQRAOMcjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30785
+ exports.DEFAULT_REDACT_RULES = DEFAULT_REDACT_RULES; exports.HwpxSession = HwpxSession; exports.PRESET_ALIAS = PRESET_ALIAS; exports.SPACE_EM_FIXED = SPACE_EM_FIXED; exports.SPACE_EM_FONT = SPACE_EM_FONT; exports.VERSION = _chunk5FS4IZWYcjs.VERSION; exports.ValueCursor = ValueCursor; exports.applySplices = applySplices; exports.blocksToChunks = blocksToChunks; exports.blocksToMarkdown = _chunk6XVQSILNcjs.blocksToMarkdown; exports.blocksToPdf = blocksToPdf; exports.buildParagraphSplices = buildParagraphSplices; exports.buildRangeSplices = buildRangeSplices; exports.charWidthEm1000 = charWidthEm1000; exports.compare = compare; exports.detectFormat = detectFormat; exports.detectOle2Format = detectOle2Format; exports.detectZipFormat = detectZipFormat; exports.diffBlocks = diffBlocks; exports.extractFormFields = extractFormFields; exports.extractFormSchema = extractFormSchema; exports.fillForm = fillForm; exports.fillFormFields = fillFormFields; exports.fillHwpx = fillHwpx; exports.fillWithUniqueGuard = fillWithUniqueGuard; exports.fitRatioForFewerLines = fitRatioForFewerLines; exports.formatFillValue = formatFillValue; exports.gongmunLintWarnings = gongmunLintWarnings; exports.hwpxToProfile = hwpxToProfile; exports.incompatibleGongmunWarnings = incompatibleGongmunWarnings; exports.inferFieldType = inferFieldType; exports.isHwpxFile = isHwpxFile; exports.isKnownFont = isKnownFont; exports.isLabelCell = isLabelCell; exports.isOldHwpFile = isOldHwpFile; exports.isPdfFile = isPdfFile; exports.isZipFile = isZipFile; exports.lintGongmunText = lintGongmunText; exports.markdownToHwpx = markdownToHwpx; exports.markdownToPdf = markdownToPdf; exports.measureTextWidth = measureTextWidth; exports.normalizeGongmunPreset = normalizeGongmunPreset; exports.openHwpxDocument = openHwpxDocument; exports.parse = parse; exports.parseDocx = parseDocx; exports.parseHwp = parseHwp; exports.parseHwp3 = parseHwp3; exports.parseHwpml = parseHwpml; exports.parseHwpx = parseHwpx; exports.parseImage = parseImage; exports.parsePdf = parsePdf; exports.parseXls = parseXls; exports.parseXlsx = parseXlsx; exports.patchHwp = patchHwp; exports.patchHwpx = patchHwpx; exports.patchHwpxBlocks = patchHwpxBlocks; exports.placeSealHwpx = placeSealHwpx; exports.redactMarkdown = redactMarkdown; exports.redactText = redactText; exports.renderHtml = renderHtml; exports.renderHwpxToSvg = renderHwpxToSvg; exports.scanSectionXml = scanSectionXml; exports.simulateWrap = simulateWrap; exports.simulateWrapKeepWord = simulateWrapKeepWord; exports.unknownFontWarnings = unknownFontWarnings; exports.validateHwpx = validateHwpx;
30785
30786
  //# sourceMappingURL=index.cjs.map