kordoc 4.24.77 → 4.24.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{-5UTN72IU.js → -WCLMRO7B.js} +22 -22
- package/dist/{chunk-LHHZZVRD.cjs → chunk-22L7WGJE.cjs} +41 -38
- package/dist/chunk-22L7WGJE.cjs.map +1 -0
- package/dist/{chunk-CNUWB5NK.js → chunk-2DJI6DDM.js} +2 -2
- package/dist/{chunk-67WGWE23.js → chunk-3CQGKB62.js} +13 -10
- package/dist/chunk-3CQGKB62.js.map +1 -0
- package/dist/{chunk-EFLSK5JD.js → chunk-3G2BXR34.js} +2 -2
- package/dist/{chunk-DGOTUUCW.cjs → chunk-42P53WKD.cjs} +3 -3
- package/dist/{chunk-DGOTUUCW.cjs.map → chunk-42P53WKD.cjs.map} +1 -1
- package/dist/{chunk-7AWQXTSU.js → chunk-4DA67IZR.js} +2 -2
- package/dist/{chunk-SKP4XXCB.js → chunk-7B6W4I3A.js} +2 -2
- package/dist/{chunk-T424VUF7.js → chunk-7DD7G4BI.js} +2 -2
- package/dist/{chunk-GUTZU7XE.js → chunk-A6KTEOXE.js} +3 -3
- package/dist/{chunk-BFAGTWOT.js → chunk-ADPVFTTT.js} +24 -13
- package/dist/chunk-ADPVFTTT.js.map +1 -0
- package/dist/{chunk-QWK3DGUI.js → chunk-B6IV3WVP.js} +16 -16
- package/dist/{chunk-AMSLIVAC.js → chunk-B6OD2Z3R.js} +2 -2
- package/dist/{chunk-ENGSBT44.cjs → chunk-BJ365LX3.cjs} +3 -3
- package/dist/{chunk-ENGSBT44.cjs.map → chunk-BJ365LX3.cjs.map} +1 -1
- package/dist/{chunk-QJ7MMZUI.js → chunk-BWD4IPFG.js} +2 -2
- package/dist/{chunk-H7HRVW32.js → chunk-CKOSQJCH.js} +2 -2
- package/dist/{chunk-O5IIMWXC.cjs → chunk-CKVPN66T.cjs} +45 -34
- package/dist/chunk-CKVPN66T.cjs.map +1 -0
- package/dist/{chunk-6P3XVII7.js → chunk-CY3JNBY7.js} +3 -3
- package/dist/{chunk-P6GTNKAA.js → chunk-D6PDKX72.js} +5 -2
- package/dist/chunk-D6PDKX72.js.map +1 -0
- package/dist/{chunk-5TM34VJ5.js → chunk-DKIBSCFV.js} +2 -2
- package/dist/{chunk-UFTF2BO7.js → chunk-E4D3HKPN.js} +2 -2
- package/dist/{chunk-3FCFBMS5.cjs → chunk-E7ZG5NBU.cjs} +6 -6
- package/dist/{chunk-3FCFBMS5.cjs.map → chunk-E7ZG5NBU.cjs.map} +1 -1
- package/dist/{chunk-D4XGVKQV.js → chunk-EEUN7GWB.js} +6 -6
- package/dist/{chunk-UN3YZZNT.js → chunk-FI4SFNUZ.js} +2 -2
- package/dist/{chunk-HDDU4LP5.cjs → chunk-FOYPUNFB.cjs} +104 -104
- package/dist/{chunk-HDDU4LP5.cjs.map → chunk-FOYPUNFB.cjs.map} +1 -1
- package/dist/{chunk-OLO76CMN.js → chunk-FPJAA7GO.js} +12 -9
- package/dist/chunk-FPJAA7GO.js.map +1 -0
- package/dist/{chunk-Y2RWVFGG.js → chunk-GSBMOVCF.js} +7 -7
- package/dist/{chunk-BPMDM3JP.js → chunk-HNTRTZ2J.js} +2 -2
- package/dist/{chunk-K6YLVT6X.js → chunk-I5PYUR3W.js} +11 -11
- package/dist/{chunk-ZZNZGQRX.js → chunk-IPAKNA6R.js} +2 -2
- package/dist/{chunk-XY5BFX3H.js → chunk-IZFALQLA.js} +6 -6
- package/dist/{chunk-LGQ75OKH.js → chunk-JEVINS5E.js} +23 -12
- package/dist/chunk-JEVINS5E.js.map +1 -0
- package/dist/{chunk-UIHCY476.cjs → chunk-LPLU7527.cjs} +65 -59
- package/dist/chunk-LPLU7527.cjs.map +1 -0
- package/dist/{chunk-4MAW3JZO.js → chunk-MALK5PX5.js} +2 -2
- package/dist/{chunk-YSOXWADD.js → chunk-PSYI2EYA.js} +2 -2
- package/dist/{chunk-5XWGKCPA.js → chunk-Q2QT6AL6.js} +2 -2
- package/dist/{chunk-A7VTEP5R.js → chunk-RDDRHUSA.js} +5 -2
- package/dist/chunk-RDDRHUSA.js.map +1 -0
- package/dist/{chunk-F33LA2ET.js → chunk-RO577YPX.js} +10 -10
- package/dist/{chunk-CG4BCYQ2.js → chunk-TEWYIAFY.js} +2 -2
- package/dist/{chunk-DZX2B4CB.cjs → chunk-UP3KRRVN.cjs} +2 -2
- package/dist/{chunk-DZX2B4CB.cjs.map → chunk-UP3KRRVN.cjs.map} +1 -1
- package/dist/{chunk-ERMTVALW.js → chunk-VS5FCFDX.js} +2 -2
- package/dist/{chunk-5D25RVT5.js → chunk-VTXPEJDA.js} +12 -6
- package/dist/chunk-VTXPEJDA.js.map +1 -0
- package/dist/{chunk-7Y2RNRWL.js → chunk-W5FLEZV4.js} +5 -5
- package/dist/{chunk-AOBRIYGM.js → chunk-WHQXWZZK.js} +2 -2
- package/dist/{chunk-SAUEKG7G.js → chunk-XLR77IOC.js} +3 -3
- package/dist/{chunk-GCUP3CBW.js → chunk-Y3X53MRF.js} +12 -6
- package/dist/chunk-Y3X53MRF.js.map +1 -0
- package/dist/{chunk-JVM237XE.cjs → chunk-ZLHHSW2T.cjs} +97 -94
- package/dist/chunk-ZLHHSW2T.cjs.map +1 -0
- package/dist/chunks-6UAF6SYV.js +11 -0
- package/dist/cli.js +46 -46
- package/dist/{formula-YN4NKDPV.cjs → formula-HECGAXCQ.cjs} +9 -9
- package/dist/{formula-YN4NKDPV.cjs.map → formula-HECGAXCQ.cjs.map} +1 -1
- package/dist/{formula-P6EJMUKF.js → formula-JYXL5ZDG.js} +3 -3
- package/dist/{formula-37OIV2H3.js → formula-NBB34N4Y.js} +4 -4
- package/dist/generator-AZ3APW7A.js +11 -0
- package/dist/generator-FSH6G2BY.cjs +12 -0
- package/dist/{generator-6YDUW5RE.cjs.map → generator-FSH6G2BY.cjs.map} +1 -1
- package/dist/generator-WTZZ2OSI.js +18 -0
- package/dist/{hancom-GOOSRL7W.js → hancom-GSUBPFCZ.js} +2 -2
- package/dist/{hancom-547ZXYYE.js → hancom-GXUGVC5L.js} +2 -2
- package/dist/{hancom-LKRD7PXX.cjs → hancom-UUFWDLTN.cjs} +5 -5
- package/dist/{hancom-LKRD7PXX.cjs.map → hancom-UUFWDLTN.cjs.map} +1 -1
- package/dist/{image-ocr-6HQTBMLN.js → image-ocr-62D6HIBB.js} +11 -11
- package/dist/{image-ocr-RNY2H3HS.js → image-ocr-XSKOCOW7.js} +8 -8
- package/dist/{image-ocr-EZEOBMEQ.cjs → image-ocr-ZVU4TCW7.cjs} +36 -36
- package/dist/{image-ocr-EZEOBMEQ.cjs.map → image-ocr-ZVU4TCW7.cjs.map} +1 -1
- package/dist/index.cjs +1113 -1113
- package/dist/index.js +10 -10
- package/dist/mcp.js +37 -37
- package/dist/memo-A4PUH3YJ.js +17 -0
- package/dist/{model-bundle-ZYGK4G65.js → model-bundle-DPTHBESJ.js} +5 -5
- package/dist/{models-K65TUK4Q.js → models-O7M5SDJV.js} +5 -5
- package/dist/{parse-worker-v2-VOM4DPZV.js → parse-worker-v2-3ILBPY7P.js} +23 -23
- package/dist/{parser-6KOCPC6H.js → parser-EIOKEMXD.js} +95 -16
- package/dist/parser-EIOKEMXD.js.map +1 -0
- package/dist/{parser-SNW4ZFUX.js → parser-LGJVHF2C.js} +92 -13
- package/dist/parser-LGJVHF2C.js.map +1 -0
- package/dist/{parser-7V6AQMPT.cjs → parser-TGMBU6NM.cjs} +327 -248
- package/dist/parser-TGMBU6NM.cjs.map +1 -0
- package/dist/{pdf-ocr-2JDCK34V.js → pdf-ocr-OU7XVMJW.js} +9 -9
- package/dist/pdf-ocr-VKZPLCS7.cjs +43 -0
- package/dist/{pdf-ocr-A4GJJCT3.cjs.map → pdf-ocr-VKZPLCS7.cjs.map} +1 -1
- package/dist/{pdf-ocr-JNCOGFLO.js → pdf-ocr-VQGNNEFT.js} +6 -6
- package/dist/{profile-io-WHUZPJEM.js → profile-io-AEG7M5KV.js} +3 -3
- package/dist/{rasterize-XR5V2FQQ.js → rasterize-2TX6CRQY.js} +3 -3
- package/dist/{redact-doc-5FMV7KOY.js → redact-doc-UWXE2D52.js} +22 -22
- package/dist/{render-OKC4QJUY.js → render-3TPZAAY3.js} +12 -12
- package/dist/{rewrite-fallback-Y6ZUV6GG.js → rewrite-fallback-FVI3MVUH.js} +13 -13
- package/dist/seal-ZNN4P4IN.js +16 -0
- package/dist/{setup-Q6CIDVRW.js → setup-5SZWEMHX.js} +3 -3
- package/dist/to-hwpx-KHSK7PL3.cjs +16 -0
- package/dist/{to-hwpx-B7RPAOQC.cjs.map → to-hwpx-KHSK7PL3.cjs.map} +1 -1
- package/dist/{to-hwpx-BS2NFDUM.js → to-hwpx-KVCLOFIT.js} +4 -4
- package/dist/{to-hwpx-XFNMYMGR.js → to-hwpx-UNNR4Y7K.js} +7 -7
- package/dist/visual-UDZERIUK.js +40 -0
- package/dist/{watch-ADXQOSZY.js → watch-YCNXUIJL.js} +23 -23
- package/package.json +1 -1
- package/dist/chunk-5D25RVT5.js.map +0 -1
- package/dist/chunk-67WGWE23.js.map +0 -1
- package/dist/chunk-A7VTEP5R.js.map +0 -1
- package/dist/chunk-BFAGTWOT.js.map +0 -1
- package/dist/chunk-GCUP3CBW.js.map +0 -1
- package/dist/chunk-JVM237XE.cjs.map +0 -1
- package/dist/chunk-LGQ75OKH.js.map +0 -1
- package/dist/chunk-LHHZZVRD.cjs.map +0 -1
- package/dist/chunk-O5IIMWXC.cjs.map +0 -1
- package/dist/chunk-OLO76CMN.js.map +0 -1
- package/dist/chunk-P6GTNKAA.js.map +0 -1
- package/dist/chunk-UIHCY476.cjs.map +0 -1
- package/dist/chunks-QN364YXU.js +0 -11
- package/dist/generator-6YDUW5RE.cjs +0 -12
- package/dist/generator-C5FWPI6A.js +0 -18
- package/dist/generator-JX3OZYTO.js +0 -11
- package/dist/memo-RE3TCSXK.js +0 -17
- package/dist/parser-6KOCPC6H.js.map +0 -1
- package/dist/parser-7V6AQMPT.cjs.map +0 -1
- package/dist/parser-SNW4ZFUX.js.map +0 -1
- package/dist/pdf-ocr-A4GJJCT3.cjs +0 -43
- package/dist/seal-VMMMFVLG.js +0 -16
- package/dist/to-hwpx-B7RPAOQC.cjs +0 -16
- package/dist/visual-SECUV4LR.js +0 -40
- /package/dist/{-5UTN72IU.js.map → -WCLMRO7B.js.map} +0 -0
- /package/dist/{chunk-CNUWB5NK.js.map → chunk-2DJI6DDM.js.map} +0 -0
- /package/dist/{chunk-EFLSK5JD.js.map → chunk-3G2BXR34.js.map} +0 -0
- /package/dist/{chunk-7AWQXTSU.js.map → chunk-4DA67IZR.js.map} +0 -0
- /package/dist/{chunk-SKP4XXCB.js.map → chunk-7B6W4I3A.js.map} +0 -0
- /package/dist/{chunk-T424VUF7.js.map → chunk-7DD7G4BI.js.map} +0 -0
- /package/dist/{chunk-GUTZU7XE.js.map → chunk-A6KTEOXE.js.map} +0 -0
- /package/dist/{chunk-QWK3DGUI.js.map → chunk-B6IV3WVP.js.map} +0 -0
- /package/dist/{chunk-AMSLIVAC.js.map → chunk-B6OD2Z3R.js.map} +0 -0
- /package/dist/{chunk-QJ7MMZUI.js.map → chunk-BWD4IPFG.js.map} +0 -0
- /package/dist/{chunk-H7HRVW32.js.map → chunk-CKOSQJCH.js.map} +0 -0
- /package/dist/{chunk-6P3XVII7.js.map → chunk-CY3JNBY7.js.map} +0 -0
- /package/dist/{chunk-5TM34VJ5.js.map → chunk-DKIBSCFV.js.map} +0 -0
- /package/dist/{chunk-UFTF2BO7.js.map → chunk-E4D3HKPN.js.map} +0 -0
- /package/dist/{chunk-D4XGVKQV.js.map → chunk-EEUN7GWB.js.map} +0 -0
- /package/dist/{chunk-UN3YZZNT.js.map → chunk-FI4SFNUZ.js.map} +0 -0
- /package/dist/{chunk-Y2RWVFGG.js.map → chunk-GSBMOVCF.js.map} +0 -0
- /package/dist/{chunk-BPMDM3JP.js.map → chunk-HNTRTZ2J.js.map} +0 -0
- /package/dist/{chunk-K6YLVT6X.js.map → chunk-I5PYUR3W.js.map} +0 -0
- /package/dist/{chunk-ZZNZGQRX.js.map → chunk-IPAKNA6R.js.map} +0 -0
- /package/dist/{chunk-XY5BFX3H.js.map → chunk-IZFALQLA.js.map} +0 -0
- /package/dist/{chunk-4MAW3JZO.js.map → chunk-MALK5PX5.js.map} +0 -0
- /package/dist/{chunk-YSOXWADD.js.map → chunk-PSYI2EYA.js.map} +0 -0
- /package/dist/{chunk-5XWGKCPA.js.map → chunk-Q2QT6AL6.js.map} +0 -0
- /package/dist/{chunk-F33LA2ET.js.map → chunk-RO577YPX.js.map} +0 -0
- /package/dist/{chunk-CG4BCYQ2.js.map → chunk-TEWYIAFY.js.map} +0 -0
- /package/dist/{chunk-ERMTVALW.js.map → chunk-VS5FCFDX.js.map} +0 -0
- /package/dist/{chunk-7Y2RNRWL.js.map → chunk-W5FLEZV4.js.map} +0 -0
- /package/dist/{chunk-AOBRIYGM.js.map → chunk-WHQXWZZK.js.map} +0 -0
- /package/dist/{chunk-SAUEKG7G.js.map → chunk-XLR77IOC.js.map} +0 -0
- /package/dist/{chunks-QN364YXU.js.map → chunks-6UAF6SYV.js.map} +0 -0
- /package/dist/{formula-P6EJMUKF.js.map → formula-JYXL5ZDG.js.map} +0 -0
- /package/dist/{formula-37OIV2H3.js.map → formula-NBB34N4Y.js.map} +0 -0
- /package/dist/{generator-C5FWPI6A.js.map → generator-AZ3APW7A.js.map} +0 -0
- /package/dist/{generator-JX3OZYTO.js.map → generator-WTZZ2OSI.js.map} +0 -0
- /package/dist/{hancom-GOOSRL7W.js.map → hancom-GSUBPFCZ.js.map} +0 -0
- /package/dist/{hancom-547ZXYYE.js.map → hancom-GXUGVC5L.js.map} +0 -0
- /package/dist/{image-ocr-6HQTBMLN.js.map → image-ocr-62D6HIBB.js.map} +0 -0
- /package/dist/{image-ocr-RNY2H3HS.js.map → image-ocr-XSKOCOW7.js.map} +0 -0
- /package/dist/{memo-RE3TCSXK.js.map → memo-A4PUH3YJ.js.map} +0 -0
- /package/dist/{model-bundle-ZYGK4G65.js.map → model-bundle-DPTHBESJ.js.map} +0 -0
- /package/dist/{models-K65TUK4Q.js.map → models-O7M5SDJV.js.map} +0 -0
- /package/dist/{parse-worker-v2-VOM4DPZV.js.map → parse-worker-v2-3ILBPY7P.js.map} +0 -0
- /package/dist/{pdf-ocr-2JDCK34V.js.map → pdf-ocr-OU7XVMJW.js.map} +0 -0
- /package/dist/{pdf-ocr-JNCOGFLO.js.map → pdf-ocr-VQGNNEFT.js.map} +0 -0
- /package/dist/{profile-io-WHUZPJEM.js.map → profile-io-AEG7M5KV.js.map} +0 -0
- /package/dist/{rasterize-XR5V2FQQ.js.map → rasterize-2TX6CRQY.js.map} +0 -0
- /package/dist/{redact-doc-5FMV7KOY.js.map → redact-doc-UWXE2D52.js.map} +0 -0
- /package/dist/{render-OKC4QJUY.js.map → render-3TPZAAY3.js.map} +0 -0
- /package/dist/{rewrite-fallback-Y6ZUV6GG.js.map → rewrite-fallback-FVI3MVUH.js.map} +0 -0
- /package/dist/{seal-VMMMFVLG.js.map → seal-ZNN4P4IN.js.map} +0 -0
- /package/dist/{setup-Q6CIDVRW.js.map → setup-5SZWEMHX.js.map} +0 -0
- /package/dist/{to-hwpx-BS2NFDUM.js.map → to-hwpx-KVCLOFIT.js.map} +0 -0
- /package/dist/{to-hwpx-XFNMYMGR.js.map → to-hwpx-UNNR4Y7K.js.map} +0 -0
- /package/dist/{visual-SECUV4LR.js.map → visual-UDZERIUK.js.map} +0 -0
- /package/dist/{watch-ADXQOSZY.js.map → watch-YCNXUIJL.js.map} +0 -0
package/README.md
CHANGED
|
@@ -134,15 +134,15 @@ await writeFile("보고서.hwpx", Buffer.from(hwpx))
|
|
|
134
134
|
|
|
135
135
|
## 최근 업데이트
|
|
136
136
|
|
|
137
|
-
최신 배포: **[4.24.
|
|
137
|
+
최신 배포: **[4.24.79](https://github.com/chrisryugj/kordoc/releases/tag/v4.24.79)** · 2026-11-14
|
|
138
138
|
|
|
139
139
|
| 버전 | 주요 변경 | 수치 변화 |
|
|
140
140
|
| --- | --- | --- |
|
|
141
|
+
| 4.24.79 | PDF 띄운 숫자("- 10 -")·한자 뒤 줄 머리 조사·조사 꼴 어절 뒤 한 음절 조각·날짜 뒤 요일 괄호 · 괘선 없는 쪽 경계에서 갈린 표 행(두 줄 이름표·칸 안 번호 목록) · OCR 칸 없는 구간 행 사이 값 행 | PDF 글 어절 F1 99.149% → **99.159%** (19문서 상승, 결재문서 0.981 → **1**) · ODL 표 TEDS 98.015% → **98.053%** · 별표 PDF 재현율 99.982% → **99.983%** · KoOCR 0.90644 → **0.90653** · 문서별 하락 2(채점 산출물 — CHANGELOG) |
|
|
142
|
+
| 4.24.78 | PDF 자간 넓힌 한글 줄 거짓 공백("한 국 정부 가") · 레이아웃 표를 풀 때 사라지던 표 캡션 · HWP 아래 캡션 그림 순서 · 내어 쓴 번호 목록 꺾인 줄 · OCR 표 칸 "18 (18.2%)" | PDF 글 어절 F1 99.139% → **99.149%** (20문서 상승, MOU 보도자료 0.925 → **0.954**) · 점수 벤치 5,465문서 **전부 1** · KoOCR 약 설명서 쪽 CER 0.134 → **0.123** · 자체 벤치·KoOCR 문서별 하락 0 |
|
|
141
143
|
| 4.24.77 | PDF 거짓 공백(Microsoft Print To PDF·LibreOffice 문서도 반올림 전 좌표로 공백 판정) · 미리보기 분수 쌓아 그리기·경우 수식 한 줄 글 | PDF 글 어절 F1 9문서 상승(전통시장 보도자료 0.962 → **0.993**, 청년 종합투자 0.974 → **0.992**) · 자체 벤치·KoOCR 문서별 하락 0 |
|
|
142
144
|
| 4.24.76 | PDF 아이템 여럿으로 찍힌 위첨자 덩어리(연도 이름표·각주 참조) · 쪽 아래 각주 목록이 표로 서던 것 · 칸 안 두 줄 이름표 글자 엇갈림 | PDF 글 어절 F1 156775859 0.989 → **0.996**·156782262 → **1** · PDF 커버리지 11문서 상승(6902633 0.981 → **1**) · 자체 벤치·KoOCR 문서별 하락 0 |
|
|
143
145
|
| 4.24.75 | 시험지·수식 — 한컴 수식 붙여 쓴 명령·맨 항목 읽기, HWPX 수식도 HWP5 와 같은 변환, 생성 수식 상자 크기·⊥□상자 기호, 단 간격·단 구분선, PDF 시험지 쪽 틀이 표로 서던 것 | PDF 글 읽기 순서 99.398% → **99.463%** (시험지 0.877 → **0.952**) · 생성 수식 폭 오차 223% → **7.9%** · 시험지 수식 생성 왕복 **99.6%** |
|
|
144
|
-
| 4.24.74 | 문서 내 이미지·이미지 파일을 LLM API 가 받는 PNG·JPEG·WebP 로 정규화, TIFF·GIF·AVIF·BMP·HEIC·PCX·DCX 이미지 파일 입력(#210, @VerifiedIdiot) | LLM API 가 거부하는 문서 내 이미지 46% → **3.8%** · 자체 벤치·KoOCR 문서별 변화 0 |
|
|
145
|
-
| 4.24.73 | PDF 가운뎃점 꺾임(반각 ・·한 점 리더 ․·줄 머리 가운뎃점·붙임표) · 각주 별표·닫는 따옴표 뒤 조사 꺾임 | PDF 글 어절 F1 99.125% → **99.131%** · 자체 벤치 문서별 하락 0(정답 한계 1 — CHANGELOG) |
|
|
146
146
|
|
|
147
147
|
이전 버전과 상세 내용은 [변경 이력](CHANGELOG.md)에 있습니다.
|
|
148
148
|
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
usesGaejosikMunche,
|
|
54
54
|
usesLogicStructure,
|
|
55
55
|
validateHwpx
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-B6IV3WVP.js";
|
|
57
57
|
import {
|
|
58
58
|
blocksToPdf,
|
|
59
59
|
extractRenderedRegions,
|
|
@@ -64,16 +64,16 @@ import {
|
|
|
64
64
|
renderHwp5Pages,
|
|
65
65
|
renderHwpxToSvg,
|
|
66
66
|
renderSceneToHtml
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-RO577YPX.js";
|
|
68
68
|
import {
|
|
69
69
|
blocksToPages
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-B6OD2Z3R.js";
|
|
71
71
|
import {
|
|
72
72
|
extractClickHereFields,
|
|
73
73
|
patchHwp,
|
|
74
74
|
patchHwpx
|
|
75
|
-
} from "./chunk-
|
|
76
|
-
import "./chunk-
|
|
75
|
+
} from "./chunk-I5PYUR3W.js";
|
|
76
|
+
import "./chunk-CY3JNBY7.js";
|
|
77
77
|
import {
|
|
78
78
|
AGENCY_COMMON_NAME,
|
|
79
79
|
PRESET_ALIAS,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
markdownToHwpx,
|
|
84
84
|
normalizeGongmunPreset,
|
|
85
85
|
placeTotalRow
|
|
86
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-IZFALQLA.js";
|
|
87
87
|
import {
|
|
88
88
|
SPACE_EM_FIXED,
|
|
89
89
|
SPACE_EM_FONT,
|
|
@@ -92,15 +92,15 @@ import {
|
|
|
92
92
|
measureTextWidth,
|
|
93
93
|
simulateWrap,
|
|
94
94
|
simulateWrapKeepWord
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-CKOSQJCH.js";
|
|
96
96
|
import {
|
|
97
97
|
addMemoHwpx
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-EEUN7GWB.js";
|
|
99
99
|
import {
|
|
100
100
|
placeSealHwpx
|
|
101
|
-
} from "./chunk-
|
|
102
|
-
import "./chunk-
|
|
103
|
-
import "./chunk-
|
|
101
|
+
} from "./chunk-W5FLEZV4.js";
|
|
102
|
+
import "./chunk-7B6W4I3A.js";
|
|
103
|
+
import "./chunk-BWD4IPFG.js";
|
|
104
104
|
import {
|
|
105
105
|
ValueCursor,
|
|
106
106
|
applySplices,
|
|
@@ -114,14 +114,14 @@ import {
|
|
|
114
114
|
isLabelCell,
|
|
115
115
|
scanSectionXml
|
|
116
116
|
} from "./chunk-3AHL6YEA.js";
|
|
117
|
-
import "./chunk-
|
|
117
|
+
import "./chunk-Q2QT6AL6.js";
|
|
118
118
|
import {
|
|
119
119
|
convertToHwpx,
|
|
120
120
|
hwpToHwpx
|
|
121
|
-
} from "./chunk-
|
|
122
|
-
import "./chunk-
|
|
121
|
+
} from "./chunk-GSBMOVCF.js";
|
|
122
|
+
import "./chunk-Y3X53MRF.js";
|
|
123
123
|
import "./chunk-ZP2EW3YG.js";
|
|
124
|
-
import "./chunk-
|
|
124
|
+
import "./chunk-TEWYIAFY.js";
|
|
125
125
|
import "./chunk-WFKFG2RT.js";
|
|
126
126
|
import {
|
|
127
127
|
DEFAULT_REDACT_RULES,
|
|
@@ -130,10 +130,10 @@ import {
|
|
|
130
130
|
} from "./chunk-3WSNLH4B.js";
|
|
131
131
|
import {
|
|
132
132
|
blocksToChunks
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import "./chunk-
|
|
133
|
+
} from "./chunk-2DJI6DDM.js";
|
|
134
|
+
import "./chunk-E4D3HKPN.js";
|
|
135
135
|
import "./chunk-VQFA55IC.js";
|
|
136
|
-
import "./chunk-
|
|
136
|
+
import "./chunk-VS5FCFDX.js";
|
|
137
137
|
import "./chunk-EFQPEQ43.js";
|
|
138
138
|
import "./chunk-CK7LADMK.js";
|
|
139
139
|
import {
|
|
@@ -148,16 +148,16 @@ import {
|
|
|
148
148
|
import "./chunk-H7K5YHWQ.js";
|
|
149
149
|
import "./chunk-IIOBUTXH.js";
|
|
150
150
|
import "./chunk-QLZHIJWJ.js";
|
|
151
|
-
import "./chunk-
|
|
151
|
+
import "./chunk-IPAKNA6R.js";
|
|
152
152
|
import {
|
|
153
153
|
blocksToMarkdown,
|
|
154
154
|
flattenLayoutTables,
|
|
155
155
|
hasStructuredCellContent
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-RDDRHUSA.js";
|
|
157
157
|
import "./chunk-KFF47XZ7.js";
|
|
158
158
|
import {
|
|
159
159
|
VERSION
|
|
160
|
-
} from "./chunk-
|
|
160
|
+
} from "./chunk-4DA67IZR.js";
|
|
161
161
|
export {
|
|
162
162
|
AGENCY_COMMON_NAME,
|
|
163
163
|
BUILTIN_TEMPLATES,
|
|
@@ -271,4 +271,4 @@ export {
|
|
|
271
271
|
usesLogicStructure,
|
|
272
272
|
validateHwpx
|
|
273
273
|
};
|
|
274
|
-
//# sourceMappingURL=-
|
|
274
|
+
//# sourceMappingURL=-WCLMRO7B.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkUP3KRRVNcjs = require('./chunk-UP3KRRVN.cjs');
|
|
7
7
|
|
|
8
8
|
// src/script-tags.ts
|
|
9
9
|
var LITERAL_TAG = /<(?=\/?(?:u|sup|sub)>)/g;
|
|
@@ -727,12 +727,12 @@ var CELL_URL = new RegExp(String.raw`(?:(?<![A-Za-z])https?:\/\/|(?<![^\s(])www\
|
|
|
727
727
|
function gfmCellMarkdown(text) {
|
|
728
728
|
return text.replace(/\r\n|\r|\n/g, "<br>").replace(CELL_URL, (u) => u.replace(/\|/g, "%7C")).replace(/(?<!\\)\|/g, "\\|");
|
|
729
729
|
}
|
|
730
|
-
var GFM_PROTECTED = new RegExp(/!\[[^\]<>\n]*\]\([^)\s<>"'\x60:]*\)|\]\((?:https?:|mailto:|tel:|#)[^)\s<>"'\x60]*\)|(?<!\\)\$\$(?:\\[\s\S]|[^\\$])*\$\$|(?<!\\)\$(?:\\[^\n]|[^\\$\n])*\$/.source + `|(${
|
|
730
|
+
var GFM_PROTECTED = new RegExp(/!\[[^\]<>\n]*\]\([^)\s<>"'\x60:]*\)|\]\((?:https?:|mailto:|tel:|#)[^)\s<>"'\x60]*\)|(?<!\\)\$\$(?:\\[\s\S]|[^\\$])*\$\$|(?<!\\)\$(?:\\[^\n]|[^\\$\n])*\$/.source + `|(${_chunkUP3KRRVNcjs.BARE_URL})`, "gi");
|
|
731
731
|
function escapeGfm(text) {
|
|
732
732
|
const NUL = String.fromCharCode(0);
|
|
733
733
|
const spans = [];
|
|
734
734
|
const masked = text.replace(GFM_PROTECTED, (m, url, at, s) => {
|
|
735
|
-
if (url && !
|
|
735
|
+
if (url && !_chunkUP3KRRVNcjs.isGfmUrl.call(void 0, url, s, at + url.length)) return m;
|
|
736
736
|
spans.push(m);
|
|
737
737
|
return NUL + (spans.length - 1) + NUL;
|
|
738
738
|
});
|
|
@@ -794,15 +794,17 @@ function flattenLayoutTables(blocks) {
|
|
|
794
794
|
const hasNested = cells.some((row) => row.some((c) => _optionalChain([c, 'access', _17 => _17.blocks, 'optionalAccess', _18 => _18.some, 'call', _19 => _19((b) => b.type === "table" && b.table)])));
|
|
795
795
|
const isFormFrame = hasNested && totalTextLen <= FORM_FRAME_MAX_TEXT;
|
|
796
796
|
if (!isFormFrame && numCols < 4 && (totalNewlines > 5 || numRows <= 2 && totalTextLen > 300)) {
|
|
797
|
+
const caption = _optionalChain([block, 'access', _20 => _20.table, 'access', _21 => _21.captionBlocks, 'optionalAccess', _22 => _22.length]) ? block.table.captionBlocks : (_nullishCoalesce(block.table.caption, () => ( ""))).split("\n").map((l) => l.trim()).filter(Boolean).map((text) => ({ type: "paragraph", text, pageNumber: block.pageNumber }));
|
|
798
|
+
if (!block.table.captionBelow) result.push(...caption);
|
|
797
799
|
for (let r = 0; r < numRows; r++) {
|
|
798
800
|
for (let c = 0; c < numCols; c++) {
|
|
799
|
-
const cell = _optionalChain([cells, 'access',
|
|
801
|
+
const cell = _optionalChain([cells, 'access', _23 => _23[r], 'optionalAccess', _24 => _24[c]]);
|
|
800
802
|
if (!cell) continue;
|
|
801
|
-
if (_optionalChain([cell, 'access',
|
|
803
|
+
if (_optionalChain([cell, 'access', _25 => _25.blocks, 'optionalAccess', _26 => _26.length])) {
|
|
802
804
|
result.push(...flattenLayoutTables(cell.blocks));
|
|
803
805
|
continue;
|
|
804
806
|
}
|
|
805
|
-
const cellText = _optionalChain([cell, 'access',
|
|
807
|
+
const cellText = _optionalChain([cell, 'access', _27 => _27.text, 'optionalAccess', _28 => _28.trim, 'call', _29 => _29()]);
|
|
806
808
|
if (!cellText) continue;
|
|
807
809
|
for (const line of cellText.split("\n")) {
|
|
808
810
|
const trimmed = line.trim();
|
|
@@ -811,6 +813,7 @@ function flattenLayoutTables(blocks) {
|
|
|
811
813
|
}
|
|
812
814
|
}
|
|
813
815
|
}
|
|
816
|
+
if (block.table.captionBelow) result.push(...caption);
|
|
814
817
|
continue;
|
|
815
818
|
}
|
|
816
819
|
}
|
|
@@ -822,7 +825,7 @@ var RUNNING_HEADER_MAX_LEN = 40;
|
|
|
822
825
|
var RUNNING_HEADER_MIN_FREQ = 3;
|
|
823
826
|
function isRunningHeaderCandidate(block) {
|
|
824
827
|
if (block.type !== "paragraph" && block.type !== "heading") return false;
|
|
825
|
-
const text = _optionalChain([block, 'access',
|
|
828
|
+
const text = _optionalChain([block, 'access', _30 => _30.text, 'optionalAccess', _31 => _31.trim, 'call', _32 => _32()]);
|
|
826
829
|
if (!text || text.length > RUNNING_HEADER_MAX_LEN) return false;
|
|
827
830
|
return /^\d+\.\s/.test(text);
|
|
828
831
|
}
|
|
@@ -901,7 +904,7 @@ function assignTableIds(blocks) {
|
|
|
901
904
|
for (const t of tables) if (!t.markdownId) t.markdownId = `t${next++}`;
|
|
902
905
|
}
|
|
903
906
|
function blocksToMarkdown(blocks, options) {
|
|
904
|
-
const gfm = _optionalChain([options, 'optionalAccess',
|
|
907
|
+
const gfm = _optionalChain([options, 'optionalAccess', _33 => _33.tableFormat]) === "gfm";
|
|
905
908
|
if (gfm) assignTableIds(blocks);
|
|
906
909
|
const lines = [];
|
|
907
910
|
for (let i = 0; i < blocks.length; i++) {
|
|
@@ -925,13 +928,13 @@ function blocksToMarkdown(blocks, options) {
|
|
|
925
928
|
if (block.type === "list" && block.text) {
|
|
926
929
|
let listText = sanitizeText(block.text);
|
|
927
930
|
if (!listText) continue;
|
|
928
|
-
const num = _optionalChain([/^(\d{1,3}[.)])\s/, 'access',
|
|
931
|
+
const num = _optionalChain([/^(\d{1,3}[.)])\s/, 'access', _34 => _34.exec, 'call', _35 => _35(block.text.trim()), 'optionalAccess', _36 => _36[1]]);
|
|
929
932
|
if (num && listText.startsWith(num) && !/^\s/.test(listText.slice(num.length))) listText = `${num} ${listText.slice(num.length)}`;
|
|
930
933
|
const alreadyNumbered = block.listType === "ordered" && /^\d+\.\s/.test(listText);
|
|
931
934
|
const alreadyBulleted = block.listType !== "ordered" && /^-\s/.test(listText);
|
|
932
935
|
const prefix = alreadyNumbered || alreadyBulleted ? "" : block.listType === "ordered" ? "1. " : "- ";
|
|
933
936
|
const noteTable = noteTableMarkdown(block, gfm);
|
|
934
|
-
const own = prefix ? "" : _nullishCoalesce(_optionalChain([/^(?:\d+\.|-)\s+/, 'access',
|
|
937
|
+
const own = prefix ? "" : _nullishCoalesce(_optionalChain([/^(?:\d+\.|-)\s+/, 'access', _37 => _37.exec, 'call', _38 => _38(listText), 'optionalAccess', _39 => _39[0]]), () => ( ""));
|
|
935
938
|
lines.push(`${prefix}${own}${escapeItemHead(escapeGfm(listText.slice(own.length) + (block.footnoteText && !noteTable ? ` (\uC8FC: ${block.footnoteText})` : "")))}${noteTable}`);
|
|
936
939
|
if (block.children) {
|
|
937
940
|
for (const child of block.children) {
|
|
@@ -949,7 +952,7 @@ function blocksToMarkdown(blocks, options) {
|
|
|
949
952
|
if (lines.length && lines[lines.length - 1] !== "") lines.push("");
|
|
950
953
|
if (/^\[별표\s*\d+/.test(text)) {
|
|
951
954
|
const nextBlock = blocks[i + 1];
|
|
952
|
-
if (_optionalChain([nextBlock, 'optionalAccess',
|
|
955
|
+
if (_optionalChain([nextBlock, 'optionalAccess', _40 => _40.type]) === "paragraph" && nextBlock.text && /관련\)?$/.test(nextBlock.text)) {
|
|
953
956
|
lines.push("", `## ${escapeGfm(text)} ${escapeGfm(nextBlock.text)}`, "");
|
|
954
957
|
i++;
|
|
955
958
|
} else {
|
|
@@ -963,10 +966,10 @@ function blocksToMarkdown(blocks, options) {
|
|
|
963
966
|
}
|
|
964
967
|
const listHead = (md) => block.listDepth ? escapeItemHead(md) : md;
|
|
965
968
|
const noteTable = noteTableMarkdown(block, gfm);
|
|
966
|
-
if (_optionalChain([block, 'access',
|
|
969
|
+
if (_optionalChain([block, 'access', _41 => _41.spans, 'optionalAccess', _42 => _42.length])) {
|
|
967
970
|
let rendered = spansToMarkdown(block.spans);
|
|
968
971
|
if (block.href) {
|
|
969
|
-
const href =
|
|
972
|
+
const href = _chunkUP3KRRVNcjs.sanitizeHref.call(void 0, block.href);
|
|
970
973
|
if (href) rendered = `[${rendered}](${href})`;
|
|
971
974
|
}
|
|
972
975
|
if (block.footnoteText) rendered += noteTable || escapeGfm(` (\uC8FC: ${block.footnoteText})`);
|
|
@@ -974,7 +977,7 @@ function blocksToMarkdown(blocks, options) {
|
|
|
974
977
|
continue;
|
|
975
978
|
}
|
|
976
979
|
if (block.href) {
|
|
977
|
-
const href =
|
|
980
|
+
const href = _chunkUP3KRRVNcjs.sanitizeHref.call(void 0, block.href);
|
|
978
981
|
if (href) text = `[${text}](${href})`;
|
|
979
982
|
}
|
|
980
983
|
if (block.footnoteText && !noteTable) {
|
|
@@ -998,7 +1001,7 @@ function blocksToMarkdown(blocks, options) {
|
|
|
998
1001
|
return lines.join("\n").trim();
|
|
999
1002
|
}
|
|
1000
1003
|
function captionToMarkdown(table, gfm = false) {
|
|
1001
|
-
if (_optionalChain([table, 'access',
|
|
1004
|
+
if (_optionalChain([table, 'access', _43 => _43.captionBlocks, 'optionalAccess', _44 => _44.length])) {
|
|
1002
1005
|
return table.captionBlocks.flatMap((b) => {
|
|
1003
1006
|
if (b.type === "table" && b.table) {
|
|
1004
1007
|
const md = tableToMarkdown(b.table, gfm);
|
|
@@ -1013,7 +1016,7 @@ function captionToMarkdown(table, gfm = false) {
|
|
|
1013
1016
|
return caption ? [`**${escapeGfm(caption)}**`, ""] : [];
|
|
1014
1017
|
}
|
|
1015
1018
|
function captionToHtml(table) {
|
|
1016
|
-
if (_optionalChain([table, 'access',
|
|
1019
|
+
if (_optionalChain([table, 'access', _45 => _45.captionBlocks, 'optionalAccess', _46 => _46.length])) return cellInnerHtml({ text: "", colSpan: 1, rowSpan: 1, blocks: table.captionBlocks });
|
|
1017
1020
|
const cap = table.caption ? sanitizeText(table.caption) : "";
|
|
1018
1021
|
return cap ? escapeHtmlCellText(cap).replace(/\n/g, "<br>") : "";
|
|
1019
1022
|
}
|
|
@@ -1028,7 +1031,7 @@ function hasMergedCells(table) {
|
|
|
1028
1031
|
function hasNestedTables(table) {
|
|
1029
1032
|
for (const row of table.cells) {
|
|
1030
1033
|
for (const cell of row) {
|
|
1031
|
-
if (_optionalChain([cell, 'access',
|
|
1034
|
+
if (_optionalChain([cell, 'access', _47 => _47.blocks, 'optionalAccess', _48 => _48.some, 'call', _49 => _49((b) => b.type === "table" && b.table)])) return true;
|
|
1032
1035
|
}
|
|
1033
1036
|
}
|
|
1034
1037
|
return false;
|
|
@@ -1036,7 +1039,7 @@ function hasNestedTables(table) {
|
|
|
1036
1039
|
function hasStructuredCellContent(table) {
|
|
1037
1040
|
for (const row of table.cells) {
|
|
1038
1041
|
for (const cell of row) {
|
|
1039
|
-
if (_optionalChain([cell, 'access',
|
|
1042
|
+
if (_optionalChain([cell, 'access', _50 => _50.blocks, 'optionalAccess', _51 => _51.some, 'call', _52 => _52((b) => b.type === "table" && b.table || b.type === "separator" || hasNoteTable(b))])) return true;
|
|
1040
1043
|
}
|
|
1041
1044
|
}
|
|
1042
1045
|
return false;
|
|
@@ -1044,7 +1047,7 @@ function hasStructuredCellContent(table) {
|
|
|
1044
1047
|
function noteSuffix(b) {
|
|
1045
1048
|
return b.footnoteText ? ` (\uC8FC: ${b.footnoteText})` : "";
|
|
1046
1049
|
}
|
|
1047
|
-
var hasNoteTable = (b) => !!b.footnoteText && !!_optionalChain([b, 'access',
|
|
1050
|
+
var hasNoteTable = (b) => !!b.footnoteText && !!_optionalChain([b, 'access', _53 => _53.footnoteBlocks, 'optionalAccess', _54 => _54.some, 'call', _55 => _55((x) => x.type === "table" && x.table)]);
|
|
1048
1051
|
function noteTableHtml(b) {
|
|
1049
1052
|
if (!hasNoteTable(b)) return "";
|
|
1050
1053
|
const inner = cellInnerHtml({ text: "", colSpan: 1, rowSpan: 1, blocks: b.footnoteBlocks });
|
|
@@ -1060,19 +1063,19 @@ function noteTableMarkdown(b, gfm) {
|
|
|
1060
1063
|
return ` (\uC8FC: ${parts.filter(Boolean).join(" ")})`;
|
|
1061
1064
|
}
|
|
1062
1065
|
function visibleText(b) {
|
|
1063
|
-
return _optionalChain([b, 'access',
|
|
1066
|
+
return _optionalChain([b, 'access', _56 => _56.spans, 'optionalAccess', _57 => _57.some, 'call', _58 => _58((s) => s.placeholder)]) ? b.spans.filter((s) => !s.placeholder).map((s) => s.text).join("") : _nullishCoalesce(b.text, () => ( ""));
|
|
1064
1067
|
}
|
|
1065
1068
|
function escapeHtmlCellText(text) {
|
|
1066
|
-
return
|
|
1069
|
+
return _chunkUP3KRRVNcjs.escapeHtml.call(void 0, text).replace(/(\\)?<(\/?)(u|sup|sub)>/g, (_, esc, sl, tag) => esc ? `<${sl}${tag}>` : `<${sl}${tag}>`);
|
|
1067
1070
|
}
|
|
1068
1071
|
function cellInnerHtml(cell) {
|
|
1069
|
-
if (_optionalChain([cell, 'access',
|
|
1072
|
+
if (_optionalChain([cell, 'access', _59 => _59.blocks, 'optionalAccess', _60 => _60.length])) {
|
|
1070
1073
|
return cell.blocks.map((b) => {
|
|
1071
1074
|
if (b.type === "table" && b.table) {
|
|
1072
1075
|
const cap = captionToHtml(b.table);
|
|
1073
1076
|
return (cap ? cap + "<br>" : "") + tableToHtml(b.table);
|
|
1074
1077
|
}
|
|
1075
|
-
if (b.type === "image" && b.text) return `<img src="${
|
|
1078
|
+
if (b.type === "image" && b.text) return `<img src="${_chunkUP3KRRVNcjs.escapeHtml.call(void 0, b.text, true)}" alt="image">` + (_nullishCoalesce(b.qr, () => ( []))).map((v) => "<br>" + escapeHtmlCellText(v).replace(/\r?\n/g, "<br>")).join("");
|
|
1076
1079
|
const note = noteTableHtml(b);
|
|
1077
1080
|
const t = (sanitizeText(visibleText(b)) + (note ? "" : noteSuffix(b))).trim();
|
|
1078
1081
|
return ((t ? escapeHtmlCellText(t).replace(/\n/g, "<br>") : "") + note).trim();
|
|
@@ -1089,7 +1092,7 @@ function tableToHtml(table) {
|
|
|
1089
1092
|
const rowHtml = [];
|
|
1090
1093
|
for (let c = 0; c < numCols; c++) {
|
|
1091
1094
|
if (skip.has(`${r},${c}`)) continue;
|
|
1092
|
-
const cell = _optionalChain([cells, 'access',
|
|
1095
|
+
const cell = _optionalChain([cells, 'access', _61 => _61[r], 'optionalAccess', _62 => _62[c]]);
|
|
1093
1096
|
if (!cell) continue;
|
|
1094
1097
|
for (let dr = 0; dr < cell.rowSpan; dr++) {
|
|
1095
1098
|
for (let dc = 0; dc < cell.colSpan; dc++) {
|
|
@@ -1110,7 +1113,7 @@ function tableToHtml(table) {
|
|
|
1110
1113
|
return lines.join("\n");
|
|
1111
1114
|
}
|
|
1112
1115
|
function hasInlineCellBlocks(cell) {
|
|
1113
|
-
return !!_optionalChain([cell, 'access',
|
|
1116
|
+
return !!_optionalChain([cell, 'access', _63 => _63.blocks, 'optionalAccess', _64 => _64.some, 'call', _65 => _65((b) => _optionalChain([b, 'access', _66 => _66.spans, 'optionalAccess', _67 => _67.length]) || b.footnoteText || b.type === "image" && b.text)]);
|
|
1114
1117
|
}
|
|
1115
1118
|
function qrUrl(value) {
|
|
1116
1119
|
const v = value.trim();
|
|
@@ -1126,7 +1129,7 @@ function cellBlockToMarkdown(b) {
|
|
|
1126
1129
|
const url = qrUrl(v);
|
|
1127
1130
|
return "<br>" + (url ? `<${url}>` : escapeGfm(v).replace(/\r?\n/g, "<br>"));
|
|
1128
1131
|
}).join("");
|
|
1129
|
-
return _optionalChain([b, 'access',
|
|
1132
|
+
return _optionalChain([b, 'access', _68 => _68.spans, 'optionalAccess', _69 => _69.length]) ? spansToMarkdown(b.spans) + escapeGfm(noteSuffix(b)) : escapeGfm(sanitizeText(_nullishCoalesce(b.text, () => ( ""))) + noteSuffix(b));
|
|
1130
1133
|
}
|
|
1131
1134
|
function cellToMarkdown(cell, separator) {
|
|
1132
1135
|
if (!hasInlineCellBlocks(cell)) return escapeGfm(sanitizeText(cell.text));
|
|
@@ -1145,7 +1148,7 @@ function tableToGfm(table) {
|
|
|
1145
1148
|
return out.join("\n");
|
|
1146
1149
|
}
|
|
1147
1150
|
function gfmCellText(cell, parentId, nested, markerless) {
|
|
1148
|
-
if (!_optionalChain([cell, 'access',
|
|
1151
|
+
if (!_optionalChain([cell, 'access', _70 => _70.blocks, 'optionalAccess', _71 => _71.some, 'call', _72 => _72((b) => b.type === "table" && b.table || b.type === "separator")])) return cellToMarkdown(cell, "<br>");
|
|
1149
1152
|
let out = "";
|
|
1150
1153
|
let text = "";
|
|
1151
1154
|
let hasMarker = false;
|
|
@@ -1208,7 +1211,7 @@ function pipeTable(table, cellText, rowSpanFill) {
|
|
|
1208
1211
|
for (let r = 0; r < numRows; r++) {
|
|
1209
1212
|
for (let c = 0; c < numCols; c++) {
|
|
1210
1213
|
if (skip.has(`${r},${c}`)) continue;
|
|
1211
|
-
const cell = _optionalChain([cells, 'access',
|
|
1214
|
+
const cell = _optionalChain([cells, 'access', _73 => _73[r], 'optionalAccess', _74 => _74[c]]);
|
|
1212
1215
|
if (!cell) continue;
|
|
1213
1216
|
const text = cellText(cell);
|
|
1214
1217
|
display[r][c] = gfmCellMarkdown(text);
|
|
@@ -1252,7 +1255,7 @@ function anchorsOf(t) {
|
|
|
1252
1255
|
const covered = /* @__PURE__ */ new Set();
|
|
1253
1256
|
for (let r = 0; r < t.rows; r++) for (let c = 0; c < t.cols; c++) {
|
|
1254
1257
|
if (covered.has(r * t.cols + c)) continue;
|
|
1255
|
-
const cell = _optionalChain([t, 'access',
|
|
1258
|
+
const cell = _optionalChain([t, 'access', _75 => _75.cells, 'access', _76 => _76[r], 'optionalAccess', _77 => _77[c]]);
|
|
1256
1259
|
if (!cell) continue;
|
|
1257
1260
|
const rs = Math.max(1, Math.min(cell.rowSpan, t.rows - r)), cs = Math.max(1, Math.min(cell.colSpan, t.cols - c));
|
|
1258
1261
|
for (let dr = 0; dr < rs; dr++) for (let dc = 0; dc < cs; dc++) covered.add((r + dr) * t.cols + c + dc);
|
|
@@ -1281,7 +1284,7 @@ function toTex(s) {
|
|
|
1281
1284
|
}
|
|
1282
1285
|
function fractionPart(cell) {
|
|
1283
1286
|
const t = cell.text.trim();
|
|
1284
|
-
return !!t && !t.includes("\n") && !_optionalChain([cell, 'access',
|
|
1287
|
+
return !!t && !t.includes("\n") && !_optionalChain([cell, 'access', _78 => _78.blocks, 'optionalAccess', _79 => _79.length]) && t.replace(/<\/?(?:u|sup|sub)>/g, "").length <= FRACTION_MAX_CHARS && !/(?<!\\)\$/.test(t);
|
|
1285
1288
|
}
|
|
1286
1289
|
function mergeFractions(t, anchors, H, V) {
|
|
1287
1290
|
const at = /* @__PURE__ */ new Map();
|
|
@@ -1328,7 +1331,7 @@ function bandTable(t, anchors, V, H, r0, r1, keepEmptyCols) {
|
|
|
1328
1331
|
let list = anchors.filter((a) => a.r >= r0 && a.r <= r1).map((a) => ({ ...a, rs: Math.min(a.rs, r1 - a.r + 1) }));
|
|
1329
1332
|
const blank = (a) => {
|
|
1330
1333
|
if (CONTENT_CELLS.has(a.cell)) return false;
|
|
1331
|
-
if (!_optionalChain([a, 'access',
|
|
1334
|
+
if (!_optionalChain([a, 'access', _80 => _80.cell, 'access', _81 => _81.blocks, 'optionalAccess', _82 => _82.length])) return !a.cell.text.trim();
|
|
1332
1335
|
return a.cell.blocks.every((b) => (b.type === "paragraph" || b.type === "heading") && !visibleText(b).trim() && !b.footnoteText);
|
|
1333
1336
|
};
|
|
1334
1337
|
let lo = Infinity, hi = -Infinity;
|
|
@@ -1352,7 +1355,7 @@ function bandTable(t, anchors, V, H, r0, r1, keepEmptyCols) {
|
|
|
1352
1355
|
drop.push(r);
|
|
1353
1356
|
for (const a of starts) {
|
|
1354
1357
|
const e = CELL_EDGES.get(a.cell);
|
|
1355
|
-
const placeholder = _optionalChain([a, 'access',
|
|
1358
|
+
const placeholder = _optionalChain([a, 'access', _83 => _83.cell, 'access', _84 => _84.blocks, 'optionalAccess', _85 => _85.some, 'call', _86 => _86((b) => _optionalChain([b, 'access', _87 => _87.spans, 'optionalAccess', _88 => _88.some, 'call', _89 => _89((s) => s.placeholder)]))]);
|
|
1356
1359
|
if (a.rs > 1 && !placeholder && e && (e.t || e.b) && (e.l || e.r)) corners.add(a);
|
|
1357
1360
|
}
|
|
1358
1361
|
}
|
|
@@ -1421,7 +1424,7 @@ function textRow(row, out, pageNumber, keepEmptyCols) {
|
|
|
1421
1424
|
cells.length = 0;
|
|
1422
1425
|
};
|
|
1423
1426
|
for (const a of row) {
|
|
1424
|
-
if (_optionalChain([a, 'access',
|
|
1427
|
+
if (_optionalChain([a, 'access', _90 => _90.cell, 'access', _91 => _91.blocks, 'optionalAccess', _92 => _92.length])) {
|
|
1425
1428
|
flush();
|
|
1426
1429
|
out.push(...unframeLayoutTables(a.cell.blocks, keepEmptyCols));
|
|
1427
1430
|
continue;
|
|
@@ -1458,7 +1461,7 @@ function unframeTable(t, pageNumber, keepEmptyCols) {
|
|
|
1458
1461
|
}, pageNumber }];
|
|
1459
1462
|
}
|
|
1460
1463
|
const out = [];
|
|
1461
|
-
const caption = _optionalChain([t, 'access',
|
|
1464
|
+
const caption = _optionalChain([t, 'access', _93 => _93.captionBlocks, 'optionalAccess', _94 => _94.length]) ? t.captionBlocks : t.caption ? [{ type: "paragraph", text: t.caption, pageNumber }] : [];
|
|
1462
1465
|
if (!t.captionBelow) out.push(...caption);
|
|
1463
1466
|
const rowPage = (r) => {
|
|
1464
1467
|
const marks = anchors.filter((a) => a.r === r).map((a) => CELL_PAGES.get(a.cell)).filter((p) => p !== void 0);
|
|
@@ -1489,16 +1492,16 @@ function unframeLayoutTables(blocks, keepEmptyCols = false) {
|
|
|
1489
1492
|
const out = [];
|
|
1490
1493
|
for (const b of blocks) {
|
|
1491
1494
|
if (b.type !== "table" || !b.table) {
|
|
1492
|
-
if (_optionalChain([b, 'access',
|
|
1495
|
+
if (_optionalChain([b, 'access', _95 => _95.footnoteBlocks, 'optionalAccess', _96 => _96.length])) b.footnoteBlocks = unframeLayoutTables(b.footnoteBlocks, keepEmptyCols);
|
|
1493
1496
|
out.push(b);
|
|
1494
1497
|
continue;
|
|
1495
1498
|
}
|
|
1496
|
-
if (_optionalChain([b, 'access',
|
|
1499
|
+
if (_optionalChain([b, 'access', _97 => _97.table, 'access', _98 => _98.captionBlocks, 'optionalAccess', _99 => _99.length])) b.table.captionBlocks = unframeLayoutTables(b.table.captionBlocks, keepEmptyCols);
|
|
1497
1500
|
const flat = unframeTable(b.table, b.pageNumber, keepEmptyCols);
|
|
1498
1501
|
const kept = _nullishCoalesce(flat, () => ( [b]));
|
|
1499
1502
|
for (const k of kept) {
|
|
1500
1503
|
if (k.type === "table" && k.table) {
|
|
1501
|
-
for (const row of k.table.cells) for (const cell of row) if (_optionalChain([cell, 'access',
|
|
1504
|
+
for (const row of k.table.cells) for (const cell of row) if (_optionalChain([cell, 'access', _100 => _100.blocks, 'optionalAccess', _101 => _101.length])) cell.blocks = unframeLayoutTables(cell.blocks, keepEmptyCols);
|
|
1502
1505
|
}
|
|
1503
1506
|
out.push(k);
|
|
1504
1507
|
}
|
|
@@ -1560,4 +1563,4 @@ var HEADING_RATIO_H3 = 1.15;
|
|
|
1560
1563
|
|
|
1561
1564
|
|
|
1562
1565
|
exports.escapeLiteralTags = escapeLiteralTags; exports.wrapScript = wrapScript; exports.tidyScriptTags = tidyScriptTags; exports.plainScripts = plainScripts; exports.stripScriptTags = stripScriptTags; exports.WINGDINGS = WINGDINGS; exports.hangulOrdinal = hangulOrdinal; exports.circledNumber = circledNumber; exports.circledHangul = circledHangul; exports.hangulAmount = hangulAmount; exports.romanNumeral = romanNumeral; exports.enclosedNumber = enclosedNumber; exports.composeDigits = composeDigits; exports.pairedNumber = pairedNumber; exports.composeText = composeText; exports.mapPuaText = mapPuaText; exports.MAX_COLS = MAX_COLS; exports.MAX_ROWS = MAX_ROWS; exports.MAX_TABLE_CELLS = MAX_TABLE_CELLS; exports.buildTable = buildTable; exports.captionedText = captionedText; exports.convertTableToText = convertTableToText; exports.gfmCellMarkdown = gfmCellMarkdown; exports.escapeGfm = escapeGfm; exports.escapeLiteralDollar = escapeLiteralDollar; exports.sanitizeText = sanitizeText; exports.markNonLayoutTable = markNonLayoutTable; exports.flattenLayoutTables = flattenLayoutTables; exports.dedupeRunningHeaders = dedupeRunningHeaders; exports.assignTableIds = assignTableIds; exports.blocksToMarkdown = blocksToMarkdown; exports.hasStructuredCellContent = hasStructuredCellContent; exports.noteSuffix = noteSuffix; exports.noteTableHtml = noteTableHtml; exports.visibleText = visibleText; exports.escapeHtmlCellText = escapeHtmlCellText; exports.hasInlineCellBlocks = hasInlineCellBlocks; exports.cellToMarkdown = cellToMarkdown; exports.CELL_EDGES = CELL_EDGES; exports.CELL_PAGES = CELL_PAGES; exports.CONTENT_CELLS = CONTENT_CELLS; exports.CELL_BASELINES = CELL_BASELINES; exports.toTex = toTex; exports.unframeLayoutTables = unframeLayoutTables; exports.HEADING_RATIO_H1 = HEADING_RATIO_H1; exports.HEADING_RATIO_H2 = HEADING_RATIO_H2; exports.HEADING_RATIO_H3 = HEADING_RATIO_H3;
|
|
1563
|
-
//# sourceMappingURL=chunk-
|
|
1566
|
+
//# sourceMappingURL=chunk-22L7WGJE.cjs.map
|