@capyclaw/offline-ddr0 0.0.0-stage → 1.9.1
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/LICENSE +21 -0
- package/README.md +441 -2
- package/client/client.js +603 -0
- package/cordis.patch.yml +13 -0
- package/docs/STORAGE-MIGRATION.md +136 -0
- package/lib/atomic.mjs +40 -0
- package/lib/http-cache.mjs +42 -0
- package/lib/inbox.mjs +64 -0
- package/lib/media.mjs +242 -0
- package/lib/migrate-json.mjs +101 -0
- package/lib/mirror-index.mjs +105 -0
- package/lib/mirror.mjs +123 -0
- package/lib/proxy.mjs +188 -0
- package/lib/remote.mjs +158 -0
- package/lib/render.mjs +93 -0
- package/lib/repository.mjs +71 -0
- package/lib/store.mjs +610 -0
- package/lib/surface.mjs +74 -0
- package/lib/sync-ui.mjs +108 -0
- package/lib/sync.mjs +433 -0
- package/lib/wire.mjs +211 -0
- package/lib/workstore-repository.mjs +316 -0
- package/lib/workstore.mjs +348 -0
- package/mirror/files/00001.html +2045 -0
- package/mirror/files/00002.json +1 -0
- package/mirror/files/00003.json +1 -0
- package/mirror/files/00004.json +1 -0
- package/mirror/files/00005.json +1 -0
- package/mirror/files/00006.json +1 -0
- package/mirror/files/00007.json +1 -0
- package/mirror/files/00008.json +1 -0
- package/mirror/files/00009.json +1 -0
- package/mirror/files/00010.json +1 -0
- package/mirror/files/00011.json +1 -0
- package/mirror/files/00012.json +1 -0
- package/mirror/files/00013.json +1 -0
- package/mirror/files/00014.json +1 -0
- package/mirror/files/00015.json +1 -0
- package/mirror/files/00016.json +1 -0
- package/mirror/files/00017.json +1 -0
- package/mirror/files/00018.json +1 -0
- package/mirror/files/00019.json +1 -0
- package/mirror/files/00020.json +1 -0
- package/mirror/files/00021.json +1 -0
- package/mirror/files/00022.json +1 -0
- package/mirror/files/00023.js +205 -0
- package/mirror/files/00024.json +1 -0
- package/mirror/files/00025.json +1 -0
- package/mirror/files/00026.json +1 -0
- package/mirror/files/00027.js +51 -0
- package/mirror/files/00028.json +1 -0
- package/mirror/files/00029.json +1 -0
- package/mirror/files/00030.json +1 -0
- package/mirror/files/00031.json +1 -0
- package/mirror/files/00032.json +1 -0
- package/mirror/files/00033.json +1 -0
- package/mirror/files/00034.json +1 -0
- package/mirror/files/00035.json +1 -0
- package/mirror/files/00036.json +1 -0
- package/mirror/files/00037.json +1 -0
- package/mirror/files/00038.json +1 -0
- package/mirror/files/00039.json +1 -0
- package/mirror/files/00040.js +2311 -0
- package/mirror/files/00041.json +1 -0
- package/mirror/files/00042.json +1 -0
- package/mirror/files/00043.json +1 -0
- package/mirror/files/00044.json +1 -0
- package/mirror/files/00045.js +575 -0
- package/mirror/files/00046.json +1 -0
- package/mirror/files/00047.js +575 -0
- package/mirror/files/00048.js +575 -0
- package/mirror/files/00049.json +1 -0
- package/mirror/files/00050.json +1 -0
- package/mirror/files/00051.json +1 -0
- package/mirror/files/00052.json +1 -0
- package/mirror/files/00053.js +575 -0
- package/mirror/files/00054.json +1 -0
- package/mirror/files/00055.json +1 -0
- package/mirror/files/00056.js +575 -0
- package/mirror/files/00057.json +1 -0
- package/mirror/files/00058.json +1 -0
- package/mirror/files/00059.js +360 -0
- package/mirror/files/00060.json +1 -0
- package/mirror/files/00061.json +1 -0
- package/mirror/files/00062.json +1 -0
- package/mirror/files/00063.json +1 -0
- package/mirror/files/00064.json +1 -0
- package/mirror/files/00065.js +144 -0
- package/mirror/files/00066.js +7 -0
- package/mirror/files/00067.json +1 -0
- package/mirror/files/00068.json +1 -0
- package/mirror/files/00069.json +1 -0
- package/mirror/files/00070.json +1 -0
- package/mirror/files/00071.json +1 -0
- package/mirror/files/00072.json +1 -0
- package/mirror/files/00073.js +1 -0
- package/mirror/files/00074.json +1 -0
- package/mirror/files/00075.json +1 -0
- package/mirror/files/00076.json +1 -0
- package/mirror/files/00077.js +45 -0
- package/mirror/files/00078.js +1348 -0
- package/mirror/files/00079.json +1 -0
- package/mirror/files/00080.json +1 -0
- package/mirror/files/00081.js +1 -0
- package/mirror/files/00082.json +1 -0
- package/mirror/files/00083.json +1 -0
- package/mirror/files/00084.js +7 -0
- package/mirror/files/00085.json +1 -0
- package/mirror/files/00086.json +1 -0
- package/mirror/files/00087.js +7 -0
- package/mirror/files/00088.json +1 -0
- package/mirror/files/00089.json +1 -0
- package/mirror/files/00090.js +7 -0
- package/mirror/files/00091.json +1 -0
- package/mirror/files/00092.json +1 -0
- package/mirror/files/00093.js +102 -0
- package/mirror/files/00094.json +1 -0
- package/mirror/files/00095.json +1 -0
- package/mirror/files/00096.json +1 -0
- package/mirror/files/00097.json +1 -0
- package/mirror/files/00098.json +1 -0
- package/mirror/files/00099.json +1 -0
- package/mirror/files/00100.json +1 -0
- package/mirror/files/00101.js +102 -0
- package/mirror/files/00102.json +1 -0
- package/mirror/files/00103.json +1 -0
- package/mirror/files/00104.json +1 -0
- package/mirror/files/00105.json +1 -0
- package/mirror/files/00106.json +1 -0
- package/mirror/files/00107.js +110 -0
- package/mirror/files/00108.json +1 -0
- package/mirror/files/00109.json +1 -0
- package/mirror/files/00110.json +1 -0
- package/mirror/files/00111.json +1 -0
- package/mirror/files/00112.json +1 -0
- package/mirror/files/00113.json +1 -0
- package/mirror/files/00114.json +1 -0
- package/mirror/files/00115.json +1 -0
- package/mirror/files/00116.json +1 -0
- package/mirror/files/00117.json +1 -0
- package/mirror/files/00118.json +1 -0
- package/mirror/files/00119.json +1 -0
- package/mirror/files/00120.json +1 -0
- package/mirror/files/00121.json +1 -0
- package/mirror/files/00122.json +1 -0
- package/mirror/files/00123.json +1 -0
- package/mirror/files/00124.json +1 -0
- package/mirror/files/00125.json +1 -0
- package/mirror/files/00126.json +1 -0
- package/mirror/files/00127.json +1 -0
- package/mirror/files/00128.json +1 -0
- package/mirror/files/00129.json +1 -0
- package/mirror/files/00130.json +1 -0
- package/mirror/files/00131.json +1 -0
- package/mirror/files/00132.js +110 -0
- package/mirror/files/00133.json +1 -0
- package/mirror/files/00134.json +1 -0
- package/mirror/files/00135.json +1 -0
- package/mirror/files/00136.json +1 -0
- package/mirror/files/00137.js +26 -0
- package/mirror/files/00138.json +1 -0
- package/mirror/files/00139.json +1 -0
- package/mirror/files/00140.json +1 -0
- package/mirror/files/00141.json +1 -0
- package/mirror/files/00142.json +1 -0
- package/mirror/files/00143.json +1 -0
- package/mirror/files/00144.js +26 -0
- package/mirror/files/00145.json +1 -0
- package/mirror/files/00146.json +1 -0
- package/mirror/files/00147.js +29 -0
- package/mirror/files/00148.json +1 -0
- package/mirror/files/00149.json +1 -0
- package/mirror/files/00150.js +23 -0
- package/mirror/files/00151.json +1 -0
- package/mirror/files/00152.json +1 -0
- package/mirror/files/00153.js +719 -0
- package/mirror/files/00154.js +9575 -0
- package/mirror/files/00155.js +108 -0
- package/mirror/files/00156.js +379 -0
- package/mirror/files/00157.js +48 -0
- package/mirror/files/00158.json +16 -0
- package/mirror/manifest.json +1582 -0
- package/node_modules/@capyclaw/asset-service/README.md +48 -0
- package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/asset-service/package.json +59 -0
- package/node_modules/@capyclaw/asset-service/src/index.mjs +310 -0
- package/node_modules/@capyclaw/foundation/README.md +51 -0
- package/node_modules/@capyclaw/foundation/abi/assets.mjs +26 -0
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +88 -0
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
- package/node_modules/@capyclaw/foundation/abi/index.mjs +50 -0
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +352 -0
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +258 -0
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
- package/node_modules/@capyclaw/foundation/abi/version.mjs +140 -0
- package/node_modules/@capyclaw/foundation/abi/visibility.mjs +90 -0
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
- package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +72 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +120 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +38 -0
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +88 -0
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +54 -0
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +187 -0
- package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +195 -0
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +115 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +198 -0
- package/node_modules/@capyclaw/foundation/package.json +53 -0
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
- package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
- package/node_modules/@capyclaw/plugin-kit/package.json +71 -0
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat.mjs +26 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +60 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/static.mjs +79 -0
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +664 -0
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
- package/node_modules/@capyclaw/service-host/README.md +86 -0
- package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
- package/node_modules/@capyclaw/service-host/package.json +60 -0
- package/node_modules/@capyclaw/service-host/src/index.mjs +570 -0
- package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
- package/node_modules/@capyclaw/suite-kit/README.md +289 -0
- package/node_modules/@capyclaw/suite-kit/bin/dsh-domain.mjs +98 -0
- package/node_modules/@capyclaw/suite-kit/bin/dsh-suite.mjs +174 -0
- package/node_modules/@capyclaw/suite-kit/client/embed.js +35 -0
- package/node_modules/@capyclaw/suite-kit/domain.schema.json +129 -0
- package/node_modules/@capyclaw/suite-kit/package.json +58 -0
- package/node_modules/@capyclaw/suite-kit/src/activation-registry.mjs +184 -0
- package/node_modules/@capyclaw/suite-kit/src/artifacts.mjs +131 -0
- package/node_modules/@capyclaw/suite-kit/src/capability.mjs +181 -0
- package/node_modules/@capyclaw/suite-kit/src/compose.mjs +201 -0
- package/node_modules/@capyclaw/suite-kit/src/domain.mjs +138 -0
- package/node_modules/@capyclaw/suite-kit/src/embed.mjs +81 -0
- package/node_modules/@capyclaw/suite-kit/src/host.mjs +230 -0
- package/node_modules/@capyclaw/suite-kit/src/index.mjs +24 -0
- package/node_modules/@capyclaw/suite-kit/src/manifest.mjs +263 -0
- package/node_modules/@capyclaw/suite-kit/src/orchestration.mjs +100 -0
- package/node_modules/@capyclaw/suite-kit/src/profile.mjs +584 -0
- package/node_modules/@capyclaw/suite-kit/src/surface.mjs +28 -0
- package/node_modules/@capyclaw/suite-kit/suite.schema.json +128 -0
- package/node_modules/@capyclaw/work-store/README.md +83 -0
- package/node_modules/@capyclaw/work-store/STANDARD.md +263 -0
- package/node_modules/@capyclaw/work-store/cordis.patch.yml +3 -0
- package/node_modules/@capyclaw/work-store/dsh-suite.json +33 -0
- package/node_modules/@capyclaw/work-store/icon.svg +7 -0
- package/node_modules/@capyclaw/work-store/lib/host.mjs +21 -0
- package/node_modules/@capyclaw/work-store/package.json +68 -0
- package/node_modules/@capyclaw/work-store/src/backend.mjs +90 -0
- package/node_modules/@capyclaw/work-store/src/db.mjs +199 -0
- package/node_modules/@capyclaw/work-store/src/envelope.mjs +132 -0
- package/node_modules/@capyclaw/work-store/src/index.mjs +571 -0
- package/node_modules/@capyclaw/work-store/src/interop.mjs +70 -0
- package/node_modules/@capyclaw/work-store/src/refs.mjs +99 -0
- package/node_modules/@capyclaw/work-store/src/routes.mjs +135 -0
- package/package.json +82 -4
- package/plugin.mjs +644 -0
- package/static/index.html +2068 -0
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @caps flow-kit,work-caps
|
|
3
|
+
* Canvas 文档编辑器(完整版)——
|
|
4
|
+
* 单文件 IIFE 应用:完整编辑器(工具栏 + 全部元素类型 + 表格 + 图片 +
|
|
5
|
+
* 公式 + 控件 + 超链接 + 注释...)、只读显示、programmatic API
|
|
6
|
+
* window.CanvasApp(mount/unmount/load/dump/getText/getHTML/exec/
|
|
7
|
+
* undo/redo/setMode/print/事件订阅),供宿主作品与 Agent 直接调用。
|
|
8
|
+
* 不内置拼写检查(入口构建期剥离);编辑态就绪 = 完整离线可用。
|
|
9
|
+
* 上游引擎:canvas-editor v1.1.0 + 本区补丁 c1d34cd1
|
|
10
|
+
* (hufe921/canvas-editor,MIT,https://github.com/hufe921/canvas-editor)
|
|
11
|
+
*/
|
|
12
|
+
(function(){try{if(typeof document<`u`){var e=document.createElement(`style`);e.setAttribute(`id`,`canvas-full-editor-style`),e.appendChild(document.createTextNode(`.ce-select-control-popup{z-index:1;box-sizing:border-box;background-color:#fff;border:1px solid #e4e7ed;border-radius:4px;min-width:69px;max-width:160px;max-height:225px;margin:5px 0;position:absolute;overflow-y:auto;box-shadow:0 2px 12px #0000001a}.ce-select-control-popup ul{box-sizing:border-box;margin:0;padding:3px 0;list-style:none}.ce-select-control-popup ul li{white-space:nowrap;text-overflow:ellipsis;color:#666;box-sizing:border-box;cursor:pointer;height:36px;padding:0 20px;font-size:13px;line-height:36px;position:relative;overflow:hidden}.ce-select-control-popup ul li:hover{background-color:#eef2fd}.ce-select-control-popup ul li.active{color:var(--COLOR-HOVER,#5175f4);font-weight:700}.ce-calculator{z-index:1;box-sizing:border-box;background-color:#fff;border:1px solid #e4e7ed;border-radius:4px;width:200px;margin:5px 0;padding:8px;position:absolute;box-shadow:0 2px 12px #0000001a}.ce-calculator-display{text-align:right;box-sizing:border-box;text-overflow:ellipsis;background-color:#f5f7fa;border:1px solid #e4e7ed;border-radius:4px;width:100%;height:40px;margin-bottom:8px;padding:0 10px;font-size:16px;line-height:40px;overflow:hidden}.ce-calculator-buttons{grid-template-columns:repeat(4,1fr);gap:4px;display:grid}.ce-calculator-button{cursor:pointer;box-sizing:border-box;background-color:#fff;border:1px solid #e4e7ed;border-radius:4px;width:100%;height:36px;font-size:14px;transition:all .2s}.ce-calculator-button:hover{background-color:#eef2fd;border-color:#c6d1ff}.ce-calculator-button:active{background-color:#e1e8ff}.ce-calculator-button.operator{background-color:#f5f7fa}.ce-calculator-button.operator:hover{background-color:#eef2fd}.ce-calculator-button.equal{background-color:var(--COLOR-HOVER,#5175f4);color:#fff;border-color:var(--COLOR-HOVER,#5175f4)}.ce-calculator-button.equal:hover{background-color:var(--COLOR-HOVER,#6a84ff);border-color:var(--COLOR-HOVER,#6a84ff)}.ce-calculator-button.utility{background-color:#f0f2f5}.ce-calculator-button.utility:hover{background-color:#e6e8eb}.ce-date-container{z-index:1;color:#606266;-webkit-user-select:none;user-select:none;background:#fff;border:1px solid #e4e7ed;border-radius:4px;width:300px;padding:10px;display:none;position:absolute;left:0;right:0;overflow:hidden;box-shadow:0 2px 12px #0000001a}.ce-date-container.active{display:block}.ce-date-wrap{display:none}.ce-date-wrap.active{display:block}.ce-date-wrap.year-mode .ce-date-week,.ce-date-wrap.year-mode .ce-date-day,.ce-date-wrap.month-mode .ce-date-week,.ce-date-wrap.month-mode .ce-date-day{display:none}.ce-date-title{text-align:center;color:#606266;justify-content:center;align-items:center;font-size:16px;display:flex}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){cursor:pointer;font-family:cursive}.ce-date-title>span:not(.ce-date-title__now):hover{color:#5175f4}.ce-date-title .ce-date-title__pre-year,.ce-date-title .ce-date-title__pre-month{width:15%}.ce-date-title .ce-date-title__now{width:40%}.ce-date-title .ce-date-title__year-label,.ce-date-title .ce-date-title__month-label{cursor:pointer;white-space:nowrap}.ce-date-title .ce-date-title__year-label:hover,.ce-date-title .ce-date-title__month-label:hover{color:#5175f4}.ce-date-title .ce-date-title__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{border-bottom:1px solid #e4e7ed;justify-content:center;width:100%;margin-top:15px;padding-bottom:5px;display:flex}.ce-date-week>span{text-align:center;color:#606266;width:14.2857%;font-size:14px;list-style:none}.ce-date-day{flex-wrap:wrap;align-items:center;width:100%;margin-top:5px;display:flex}.ce-date-day>div{text-align:center;color:#606266;cursor:pointer;border-radius:4px;width:14.2857%;height:40px;font-size:14px;line-height:40px}.ce-date-day>div:hover{color:#5175f4;opacity:.8}.ce-date-day>div.active{color:#5175f4;font-weight:700}.ce-date-day>div.disable{color:#c0c4cc}.ce-date-day>div.select{color:#fff;background-color:#5175f4}.ce-year-wrap{flex-wrap:wrap;align-items:center;width:100%;min-height:280px;margin-top:15px;display:none}.ce-year-wrap.active{display:flex}.ce-year-wrap>div{text-align:center;color:#606266;cursor:pointer;border-radius:4px;width:33.3333%;height:60px;font-size:14px;line-height:60px}.ce-year-wrap>div:hover{color:#5175f4;opacity:.8}.ce-year-wrap>div.active{color:#5175f4;font-weight:700}.ce-year-wrap>div.select{color:#fff;background-color:#5175f4}.ce-month-wrap{flex-wrap:wrap;align-items:center;width:100%;min-height:280px;margin-top:15px;display:none}.ce-month-wrap.active{display:flex}.ce-month-wrap>div{text-align:center;color:#606266;cursor:pointer;border-radius:4px;width:33.3333%;height:60px;font-size:14px;line-height:60px}.ce-month-wrap>div:hover{color:#5175f4;opacity:.8}.ce-month-wrap>div.active{color:#5175f4;font-weight:700}.ce-month-wrap>div.select{color:#fff;background-color:#5175f4}.ce-time-wrap{height:286px;padding:10px;display:none}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{text-align:center;width:33.3%;height:100%}.ce-time-wrap>li>span{display:inline-block;transform:translateY(-5px)}.ce-time-wrap>li>ol{border:1px solid #e2e2e2;height:calc(100% - 20px);position:relative;overflow-y:auto}.ce-time-wrap>li:first-child>ol{border-right:0}.ce-time-wrap>li:last-child>ol{border-left:0}.ce-time-wrap>li>ol>li{cursor:pointer;line-height:30px;transition:all .3s}.ce-time-wrap>li>ol>li:hover{background-color:#eaeaea}.ce-time-wrap>li>ol>li.active{color:#fff;background:#5175f4}.ce-date-menu{border-top:1px solid #e4e7ed;justify-content:flex-end;align-items:center;width:100%;height:28px;padding-top:10px;display:flex;position:relative}.ce-date-menu button{white-space:nowrap;cursor:pointer;color:#606266;appearance:none;text-align:center;box-sizing:border-box;-webkit-user-select:none;user-select:none;background:#fff;border:1px solid #dcdfe6;border-radius:3px;outline:none;margin:0 0 0 10px;padding:7px 15px;font-size:12px;font-weight:500;line-height:1;transition:all .1s;display:inline-block}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid #0000;margin-left:0;position:absolute;left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{z-index:0;background-color:#fff;border:1px solid #ebecf0;position:absolute}.ce-block-item .ce-resizer-selection{width:100%;height:100%}.ce-block-item .ce-resizer-mask{z-index:1;background-color:#0000;position:absolute;inset:0}.ce-table-tool__row{background-color:#e2e6ed;border-radius:6.5px;width:12px;position:absolute;overflow:hidden}.ce-table-tool__row .ce-table-tool__row__item{cursor:pointer;width:100%;transition:all .3s;position:relative}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";background-color:#c0c6cf;width:8px;height:1px;position:absolute;bottom:0;left:2px}.ce-table-tool__row .ce-table-tool__row__item:hover{background-color:#dadce0}.ce-table-tool__row .ce-table-tool__row__item:last-child:after{display:none}.ce-table-tool__quick__add{cursor:pointer;background-color:#e2e6ed;border-radius:50%;width:16px;height:16px;position:absolute}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.ce-table-tool__select{cursor:pointer;border-radius:3px;width:16px;height:18px;position:absolute}.ce-table-tool__select:hover{background-color:#e2e6ed}.ce-table-tool__select:after{content:":::";color:#aaaaab;position:absolute;top:50%;left:50%;transform:translate(-75%,-50%)rotate(-90deg)}.ce-table-tool__col{background-color:#e2e6ed;border-radius:6.5px;height:12px;display:flex;position:absolute;overflow:hidden}.ce-table-tool__col .ce-table-tool__col__item{cursor:pointer;height:100%;transition:all .3s;position:relative}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";z-index:1;background-color:#c0c6cf;width:1px;height:8px;position:absolute;top:2px;left:-1px}.ce-table-tool__col .ce-table-tool__col__item:hover{background-color:#dadce0}.ce-table-tool__col .ce-table-tool__col__item:first-child:after{display:none}.ce-table-tool__row .ce-table-tool__row__item.active,.ce-table-tool__col .ce-table-tool__col__item.active{background-color:#c4d7fa}.ce-table-tool__col .ce-table-tool__anchor{z-index:9;cursor:col-resize;width:10px;height:12px;position:absolute;right:-5px}.ce-table-tool__row .ce-table-tool__anchor{z-index:9;cursor:row-resize;width:12px;height:10px;position:absolute;bottom:-5px;left:0}.ce-table-anchor__line{z-index:9;border:1px dotted #000;position:absolute}.ce-table-tool__border{z-index:1;pointer-events:none;background:0 0;position:absolute}.ce-table-tool__border__row{cursor:row-resize;pointer-events:auto;position:absolute}.ce-table-tool__border__col{cursor:col-resize;pointer-events:auto;position:absolute}.ce-area-tool__border{z-index:1;cursor:row-resize;background:0 0;position:absolute}.ce-area-tool__border:hover{background-color:#0000001a}.ce-area-anchor__line{z-index:9;border:1px dotted #000;position:absolute}.ce-resizer-selection{pointer-events:none;border:1px solid;position:absolute}.ce-resizer-selection .resizer-handle{z-index:9;box-sizing:border-box;pointer-events:initial;border:2px solid #fff;border-radius:5px;width:10px;height:10px;position:absolute;box-shadow:0 1px 4px #0000004d}.ce-resizer-selection .handle-0{cursor:nw-resize}.ce-resizer-selection .handle-1{cursor:n-resize}.ce-resizer-selection .handle-2{cursor:ne-resize}.ce-resizer-selection .handle-3{cursor:e-resize}.ce-resizer-selection .handle-4{cursor:se-resize}.ce-resizer-selection .handle-5{cursor:s-resize}.ce-resizer-selection .handle-6{cursor:sw-resize}.ce-resizer-selection .handle-7{cursor:w-resize}.ce-resizer-size-view{white-space:nowrap;z-index:9;opacity:.9;background-color:#000;border-radius:4px;align-items:center;height:20px;padding:0 5px;display:flex;position:absolute;top:-30px;left:0}.ce-resizer-size-view span{color:#fff;font-size:12px}.ce-resizer-image{opacity:.5;position:absolute}.ce-image-previewer{z-index:1000;background:#f2f4f7;justify-content:center;align-items:center;width:100%;height:100%;animation:.3s previewerAnimation;display:flex;position:fixed;top:0;left:0;overflow:hidden}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{z-index:99;cursor:pointer;background:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M23.97%207l1.415%201.414-7.779%207.778%207.779%207.779-1.414%201.414-7.779-7.779-7.778%207.779L7%2023.97l7.778-7.779L7%208.414%208.414%207l7.778%207.778L23.971%207z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e") 0 0/100% 100% no-repeat;border-radius:50%;width:24px;height:24px;transition:all .3s;display:inline-block;position:absolute;top:30px;right:50px}.ce-image-previewer .image-close:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-container{position:relative}.ce-image-previewer .ce-image-container img{cursor:move;position:relative}.ce-image-previewer .ce-image-menu{z-index:99;justify-content:center;align-items:center;height:50px;display:flex;position:absolute;bottom:50px}.ce-image-previewer .ce-image-menu i{cursor:pointer;background-repeat:no-repeat;background-size:100% 100%;border-radius:50%;width:32px;height:32px;margin:0 8px;transition:all .3s;display:inline-block}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M14%2014v-4h2v4h4v2h-4v4h-2v-4h-4v-2h4zm8.749%2010.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M22.749%2024.163A11.952%2011.952%200%200115%2027C8.373%2027%203%2021.627%203%2015S8.373%203%2015%203s12%205.373%2012%2012c0%202.954-1.067%205.658-2.837%207.749l4.908%204.908-1.414%201.414-4.908-4.908zM15%2025c5.523%200%2010-4.477%2010-10S20.523%205%2015%205%205%209.477%205%2015s4.477%2010%2010%2010zm-5-11h10v2H10v-2z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.rotate{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M16%204c6.627%200%2012%205.373%2012%2012a11.97%2011.97%200%2001-4%208.944V23h-.86A9.968%209.968%200%200026%2016c0-5.523-4.477-10-10-10S6%2010.477%206%2016c0%205.185%203.947%209.449%209%209.95v2.009C8.84%2027.451%204%2022.291%204%2016%204%209.373%209.373%204%2016%204z'%20fill-rule='nonzero'/%3e%3cpath%20d='M19.879%2027.328l1.767-6.717%204.95%204.95z'/%3e%3c/g%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.original-size{background-image:url("data:image/svg+xml,%3csvg%20width='32'%20height='32'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%204h24v24H4V4zm2%202v20h20V6H6zm4%205h2v10h-2V11zm5%202h2v2h-2v-2zm0%204h2v2h-2v-2zm5-6h2v10h-2V11z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-download{background-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.5%2015v3.5h15V15H21v5H3v-5h1.5zm8.232-11.226v9.196l4.05-4.05%201.06%201.06-5.834%205.834-5.833-5.833%201.06-1.06%203.998%203.996V3.774h1.5z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu .image-navigate{justify-content:center;align-items:center;display:flex}.ce-image-previewer .ce-image-menu i.image-pre{background-image:url("data:image/svg+xml,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M12.5%204.063L6.875%2010l5.625%205.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu i.image-next{background-image:url("data:image/svg+xml,%3csvg%20width='20'%20height='20'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.5%204.063L13.125%2010%207.5%2015.938'%20stroke='%233D4757'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e")}.ce-image-previewer .ce-image-menu .image-count{color:#000;font-size:20px}.ce-image-previewer .ce-image-menu i.disabled{cursor:not-allowed;opacity:.5}.ce-contextmenu-container{z-index:9;background:#fff;border:1px solid #e2e6ed;border-radius:2px;padding:4px;display:none;position:fixed;overflow:hidden auto;box-shadow:0 2px 12px #38383833}.ce-contextmenu-content{flex-direction:column;display:flex}.ce-contextmenu-content .ce-contextmenu-sub-item:after{content:"";background:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M0%200h16v16H0z'/%3e%3cg%20fill='%23767C85'%3e%3cpath%20d='M7%2012.243l-.707-.707%204.243-4.243.707.707z'/%3e%3cpath%20d='M6.293%204.464L7%203.757%2011.243%208l-.707.707z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");width:16px;height:16px;position:absolute;right:12px}.ce-contextmenu-content .ce-contextmenu-item{white-space:nowrap;box-sizing:border-box;cursor:pointer;align-items:center;min-width:140px;height:30px;padding:0 32px 0 16px;display:flex}.ce-contextmenu-content .ce-contextmenu-item.hover{background:#1937580a}.ce-contextmenu-content .ce-contextmenu-item span{color:#3d4757;white-space:nowrap;text-overflow:ellipsis;max-width:300px;font-size:12px;overflow:hidden}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;text-align:right;flex:1;height:30px;margin-left:20px;line-height:30px}.ce-contextmenu-content .ce-contextmenu-item i{vertical-align:middle;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;width:16px;height:16px;margin-right:8px;display:inline-block}.ce-contextmenu-divider{background-color:#e2e6ed;height:1px;margin:4px 16px}.ce-contextmenu-print{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M12%204h-1V2H5v2H4V2a1%201%200%20011-1h6a1%201%200%20011%201v2zm0%205v4a1%201%200%2001-1%201H5a1%201%200%2001-1-1V9h1v4h6V9h1z'/%3e%3cpath%20d='M12%2012v-1h2V5H2v6h2v1H2a1%201%200%2001-1-1V5a1%201%200%20011-1h12a1%201%200%20011%201v6a1%201%200%2001-1%201h-2z'/%3e%3cpath%20d='M3%208h10v1H3zm8-2h2v1h-2z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_插入图片-16px-'%3e%3cg%20id='Group-19'%20transform='translate(1%201)'%3e%3cpath%20id='Combined-Shape'%20class='st0'%20d='M1%200h12c.6%200%201%20.4%201%201v11c0%20.6-.4%201-1%201H1c-.6%200-1-.4-1-1V1c0-.6.4-1%201-1zm0%201v11h12V1H1z'/%3e%3ccircle%20id='椭圆形'%20class='st0'%20cx='10'%20cy='4'%20r='1'/%3e%3cpath%20id='Path'%20class='st0'%20d='M8.5%2011.2l-4-4.1L1%2010.7V9.2c1.7-1.6%202.7-2.5%203-2.8.4-.5.7-.4%201%200L8.5%2010%2011%207.3c.4-.5.6-.5%201-.1l2%202.8v1.5l-2.5-3.4-3%203.1z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-image-change{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(2%204)'%20fill='%233D4757'%3e%3ccircle%20fill-rule='nonzero'%20cx='3'%20cy='1'%20r='1'/%3e%3cpath%20d='M7.473%208.223L3.47%204.107%200%207.667v-1.5C1.715%204.6%202.707%203.664%202.975%203.358c.402-.457.651-.39%201.042%200L7.473%207%209.96%204.349c.414-.462.62-.462%201.011-.071L13%207.06v1.5l-2.51-3.41-3.017%203.072z'/%3e%3c/g%3e%3cpath%20d='M6%201.5H1.5v12h13v-4V13a.5.5%200%2001-.5.5H2a.5.5%200%2001-.5-.5V2a.5.5%200%2001.5-.5h4zm8.5%208V6l-.5.5h1l-.5-.5v3.5zM6%201.5h4L9.5%201v1l.5-.5H6z'%20stroke='%233D4757'/%3e%3cpath%20d='M13.085%201.316l-3.814%204a1%201%200%20001.458%201.368l3.815-4a1%201%200%2010-1.459-1.368z'%20fill='%233D4757'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%233D4757'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M4%207v1h2V7zm-3%20.5L4%205v5zM1%201h12v1H1zm0%2012h12v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-top-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M8%205H7v3h1zm-.5-3L10%205H5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='10.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-bottom-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M7%2011h1V8H7zm.5%203L5%2011h5z'/%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='2.5'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-left-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M11%207v1h3V7zm-3%20.5L11%205v5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%204%207.5)'%20x='-2'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-insert-right-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M5%208V7H2v1zm3-.5L5%2010V5z'/%3e%3crect%20stroke='%233D4757'%20transform='rotate(90%2012%207.5)'%20x='6'%20y='6'%20width='12'%20height='3'%20rx='1'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%206.5h6v2h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M2%2012h11v1H2zM2%202h11v1H2zm.63%203L7%209.35l-.635.65L2%205.63z'/%3e%3cpath%20fill='%233D4757'%20d='M2%209.363L6.355%205%207%205.707%202.695%2010z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-row{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M8.5%205.5h6v4h-6z'/%3e%3cpath%20fill='%233D4757'%20d='M1%2013h12v1H1zM1%201h12v1H1zm0%204h1v1H1zm1%201h1v1H2zm1%201h1v1H3zm1-1h1v1H4zm1-1h1v1H5zM4%208h1v1H4zM2%208h1v1H2zm3%201h1v1H5zM1%209h1v1H1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-col{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23929AA8'%20d='M5.5%207.5v-6h4v6z'/%3e%3cpath%20fill='%233D4757'%20d='M13%2015V3h1v12zM1%2015V3h1v12zm4%200v-1h1v1zm1-1v-1h1v1zm1-1v-1h1v1zm-1-1v-1h1v1zm-1-1v-1h1v1zm3%201v-1h1v1zm0%202v-1h1v1zm1-3v-1h1v1zm0%204v-1h1v1z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-delete-table{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M14%2013h-1v-3H2v3H1v-3a1%201%200%20011-1h11a1%201%200%20011%201v3z'%20fill-rule='nonzero'/%3e%3cpath%20d='M5.625%202L10%206.375%209.375%207%205%202.625z'/%3e%3cpath%20d='M5%206.375L9.375%202l.625.625L5.625%207z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M8%207.5L10%206v3zm-1%200L5%206v3z'/%3e%3cpath%20d='M9%207h3v1H9zM3%207h3v1H3z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-merge-cancel-cell{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6%201v1H2v11h4v1H2a1%201%200%2001-1-1V2a1%201%200%20011-1h4zm3%200h4a1%201%200%20011%201v11a1%201%200%2001-1%201H9v-1h4V2H9V1z'/%3e%3cpath%20fill-rule='nonzero'%20d='M6%201h1v4H6zm2%200h1v4H8z'/%3e%3cpath%20d='M3%207.5L5%206v3zm9%200L10%206v3z'/%3e%3cpath%20d='M4%207h3v1H4zm4%200h3v1H8z'/%3e%3cpath%20fill-rule='nonzero'%20d='M8%2010h1v4H8zm-2%200h1v4H6z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-table-auto-fit-content{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M2%202h12a1%201%200%20011%201v10a1%201%200%2001-1%201H2a1%201%200%2001-1-1V3a1%201%200%20011-1zm0%201v10h12V3H2z'/%3e%3cpath%20d='M5%206.5L3%208l2%201.5v-3zm6%200L13%208l-2%201.5v-3z'/%3e%3cpath%20d='M5%207.5h6v1H5z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-table-auto-fit-page{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M3%201h10a1%201%200%20011%201v12a1%201%200%2001-1%201H3a1%201%200%2001-1-1V2a1%201%200%20011-1zm0%201v12h10V2H3z'/%3e%3cpath%20d='M6%205.5L4%207l2%201.5v-3zm4%200L12%207l-2%201.5v-3z'/%3e%3cpath%20d='M6%206.5h4v1H6z'/%3e%3cpath%20d='M4%209h8v1H4zm0%202h8v1H4z'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-vertical-align{background-image:url("data:image/svg+xml,%3csvg%20height='16'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2zm0-3h8v1H2zm0-3h12v1H2zm0-6h12v1H2zm0%203h8v1H2z'%20fill='%233d4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%208H7v6h1zm-.5-3L10%208H5zM2%203h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-middle{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%2012H7v3h1zm-.5-3l2.5%203H5zM7%203h1V0H7zm.5%203L5%203h5zM2%207h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-vertical-align-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%209h1V3H7zm.5%203L5%209h5zM2%2013h11v1H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.ce-contextmenu-border-all{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M3%208h11v1H3z'/%3e%3cpath%20fill='%233D4757'%20d='M9%203v11H8V3z'/%3e%3c/svg%3e")}.ce-contextmenu-border-empty{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-dash{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M13%203h-1V2h1a1%201%200%20011%201v1h-1V3zm-3-1v1H8.5v2h-1V3H6V2h4zM4%202v1H3v1H2V3a1%201%200%20011-1h1zM2%206h1v1.5h2v1H3V10H2V6zm0%206h1v1h1v1H3a1%201%200%2001-1-1v-1zm4%202v-1h1.5v-2h1v2H10v1H6zm6%200v-1h1v-1h1v1a1%201%200%2001-1%201h-1zm2-4h-1V8.5h-2v-1h2V6h1v4zM8.5%207.5v-1h-1v1h-1v1h1v1h1v-1h1v-1h-1z'%20fill='%23000000'/%3e%3c/svg%3e")}.ce-contextmenu-border-external{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%233D4757'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%23AAACB0'/%3e%3c/svg%3e")}.ce-contextmenu-border-internal{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M9%205V3H8v2h1zm0%209v-2H8v2h1zM5%208H3v1h2V8zm9%200h-2v1h2V8zM9%207v1h1v1H9v1H8V9H7V8h1V7h1z'%20fill='%233D4757'/%3e%3c/svg%3e")}.ce-contextmenu-border-td{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20d='M8.5%202.5%20v6%20h-6'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-top{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%203%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-left{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M3%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-bottom{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M2.5%2014%20h12'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-right{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'/%3e%3cpath%20stroke='%233D4757'%20stroke-width='2'%20d='M14%203%20v11'/%3e%3c/svg%3e")}.ce-contextmenu-border-td-forward{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M14%203%20l-11%2011'%20/%3e%3c/svg%3e")}.ce-contextmenu-border-td-back{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2.5%203a.5.5%200%2001.5-.5h11a.5.5%200%2001.5.5v11a.5.5%200%2001-.5.5H3a.5.5%200%2001-.5-.5V3z'%20stroke='%23AAACB0'%20/%3e%3cpath%20stroke='%233D4757'%20d='M3%203%20l11%2011'%20/%3e%3c/svg%3e")}.ce-hyperlink-popup{color:#3d4757;z-index:1;text-align:center;background:#fff;border-radius:2px;padding:12px 16px;display:none;position:absolute;box-shadow:0 2px 12px #626b8433}.ce-hyperlink-popup a{white-space:nowrap;text-overflow:ellipsis;cursor:pointer;color:#00f;border-bottom-style:solid;border-bottom-width:1px;min-width:100px;max-width:300px;font-size:12px;text-decoration:none;display:inline-block;overflow:hidden}.ce-zone-indicator>div{color:#000;transform-origin:0 0;background:#dae7fc;padding:3px 6px;font-size:12px;position:absolute}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{z-index:0;display:block;position:absolute}.ce-zone-indicator-border__top{border-top:2px dashed #eee}.ce-zone-indicator-border__bottom{border-top:2px dashed #eee;width:100%}.ce-zone-indicator-border__left{border-left:2px dashed #eee}.ce-zone-indicator-border__right{border-right:2px dashed #eee}.ce-zone-tip{white-space:nowrap;opacity:.9;z-index:9;-webkit-user-select:none;user-select:none;pointer-events:none;background-color:#000;border-radius:4px;outline:none;align-items:center;height:30px;padding:0 5px;transition:all .3s;display:none;position:fixed;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-magnifier{pointer-events:none;z-index:9999;border-radius:50%;display:none;position:fixed;box-shadow:0 4px 12px #00000040}.ce-sr-only{z-index:-1;clip:rect(0, 0, 0, 0);clip-path:inset(50%);white-space:nowrap;pointer-events:none;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;top:0;left:0;overflow:hidden}.ce-trace-popup{color:#3d4757;z-index:1;pointer-events:none;background:#fff;border-radius:4px;padding:8px 12px;font-size:12px;line-height:1.6;display:none;position:absolute;box-shadow:0 2px 12px #626b8433}.ce-trace-popup__list{flex-direction:column;gap:6px;display:flex}.ce-trace-popup__item{white-space:nowrap;align-items:center;gap:8px;display:flex}.ce-trace-popup__type{font-size:13px;font-weight:600}.ce-trace-popup__author,.ce-trace-popup__time{color:#6b7280}.ce-hint-popup{color:#000;z-index:1;word-break:break-word;pointer-events:none;background:#fff;border-radius:4px;max-width:280px;padding:6px 10px;font-size:12px;line-height:1.6;display:none;position:absolute;box-shadow:0 2px 12px #626b8433}.ce-hint-popup__text{white-space:pre-wrap}.ce-ruler{z-index:2;-webkit-user-select:none;user-select:none;pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0}.ce-ruler-x{pointer-events:auto;display:block;position:sticky;top:0;box-shadow:0 1px 3px #0000001a}.ce-ruler-y{pointer-events:auto;position:absolute;top:0;left:0;box-shadow:1px 0 3px #0000001a}.ce-page-container{position:relative}.ce-ruler-guideline{pointer-events:none;border-left:1px dashed #595959;width:0;position:absolute;top:0;bottom:0}.ce-inputarea{letter-spacing:0;z-index:-1;resize:none;color:#0000;-webkit-user-select:none;user-select:none;caret-color:#0000;background-color:#0000;border:none;outline:none;width:100px;min-width:0;height:30px;min-height:0;margin:0;padding:0;font-size:12px;position:absolute;top:0;left:0;overflow:hidden}.ce-cursor{pointer-events:none;background-color:#000;outline:none;width:1px;height:20px;position:absolute;left:0;right:0}.ce-cursor.ce-cursor--animation{animation-name:cursorAnimation;animation-duration:1s;animation-iteration-count:infinite}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{opacity:.5;pointer-events:none;position:absolute}::-webkit-scrollbar{width:16px;height:16px;overflow:visible}::-webkit-scrollbar-button{width:0;height:0}::-webkit-scrollbar-corner{background:0 0}::-webkit-scrollbar-thumb{background-color:#ddd;background-clip:padding-box;border:4px solid #f2f4f7;border-radius:8px;min-height:24px}::-webkit-scrollbar-thumb:hover{background-color:#c9c9c9}::-webkit-scrollbar-track{background:#f2f4f7 padding-box padding-box}*{margin:0;padding:0}body{background-color:#f2f4f7}ul{list-style:none}.menu{z-index:9;background:#f2f4f7;justify-content:center;align-items:center;width:100%;height:60px;display:flex;position:fixed;top:0;box-shadow:0 2px 4px #0000}.menu-divider{background-color:#cfd2d8;width:1px;height:16px;margin:0 8px;display:inline-block}.menu-item{align-items:center;height:24px;display:flex;position:relative}.menu-item>div{cursor:pointer;justify-content:center;align-items:center;width:24px;height:24px;margin:0 2px;display:flex}.menu-item>div:hover{background:#1937580a}.menu-item>div.active{background:#19375814}.menu-item i{background-repeat:no-repeat;background-size:100% 100%;width:16px;height:16px;display:inline-block}.menu-item>div>span{border:1px solid #e2e6ed;width:16px;height:3px;display:inline-block}.menu-item .select{-webkit-user-select:none;user-select:none;border:none;font-size:12px;line-height:24px}.menu-item .select:after{content:"";border:3px solid #0000;border-top-color:#767c85;border-bottom:0 #0000;width:0;height:0;position:absolute;top:11px;right:2px}.menu-item .options{background:#fff;border:1px solid #e2e6ed;border-radius:2px;width:70px;padding:10px;font-size:14px;display:none;position:absolute;top:25px;left:0;box-shadow:0 2px 12px #38383833}.menu-item .options.visible{display:block}.menu-item .options li{-webkit-user-select:none;user-select:none;margin:5px 0;padding:5px;transition:all .3s}.menu-item .options li:hover{background-color:#ebecef}.menu-item .options li.active{background-color:#e2e6ed}.menu-item .menu-item__font{width:65px;position:relative}.menu-item .menu-item__size{text-align:center;width:50px;position:relative}.menu-item__font .select,.menu-item__size .select{width:100%;height:100%}.menu-item__undo.no-allow,.menu-item__redo.no-allow,.menu-item>div.disable{color:#c0c4cc;cursor:not-allowed;opacity:.4;pointer-events:none}.menu-item__undo i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%202.763v7.544l-4.29-3.73zM13%2014v-3a4%204%200%2000-4-4H6V6h3a5%205%200%20015%205v3h-1z'%20fill='%233D4757'/%3e%3c/svg%3e")}.menu-item__redo i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%2014v-3a4%204%200%20014-4h3V6H7a5%205%200%2000-5%205v3h1zm7.016-11.282v7.543l4.29-3.73z'%20fill='%233D4757'/%3e%3c/svg%3e")}.menu-item__painter i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M7.5%202v2.5H4a.5.5%200%2000-.5.5v2a.5.5%200%2000.5.5h9a.5.5%200%2000.5-.5V5a.5.5%200%2000-.5-.5H9.5V2a.5.5%200%2000-.5-.5H8a.5.5%200%2000-.5.5z'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M13%207h1v4h-1z'/%3e%3cpath%20d='M11%2013a2%202%200%20002-2V8.764A3%203%200%20118.764%2013H11z'%20fill='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M1%2013h10v1H1z'/%3e%3cpath%20d='M1%2013a2%202%200%20002-2V8.764A3%203%200%20011%2014v-1z'%20fill='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M3%207h1v4H3z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__format i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M8.213%2013H6.8l6.636-6.636-4.243-4.243-7.07%207.071L5.928%2013H4.515L1.06%209.546a.5.5%200%20010-.707L8.839%201.06a.5.5%200%2001.707%200l4.95%204.95a.5.5%200%20010%20.707L8.213%2013z'%20fill-rule='nonzero'/%3e%3cpath%20d='M4.536%206.364l4.95%204.95-.707.707-4.95-4.95zM4.521%2013h10.03v1H5.496z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__size-add i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M6.215%203.29H7.64L11.855%2014H10.52l-1.14-3H4.46l-1.14%203H2L6.215%203.29zM4.85%209.965h4.14L6.965%204.61h-.06L4.85%209.965z'/%3e%3cpath%20d='M12%204V2h1v2h2v1h-2v2h-1V5h-2V4h2z'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__size-minus i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20fill-rule='nonzero'%20d='M11%204h4v1h-4z'/%3e%3cpath%20d='M6.215%203.29H7.64L11.855%2014H10.52l-1.14-3H4.46l-1.14%203H2L6.215%203.29zM4.85%209.965h4.14L6.965%204.61h-.06L4.85%209.965z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__bold i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.131%206.9c2.035%200%202.569-.9%202.569-1.869%200-.968-.64-1.831-2.623-1.831H5.2v3.7h2.931zm.524%205.9c2.045%200%202.545-1.305%202.545-2.3%200-.985-.506-2.4-2.81-2.4H5.2v4.7h3.455zM4%202h4.71c2.367%200%203.19%201.583%203.19%203s-.325%201.852-1.1%202.5c1.2.5%201.569%201.379%201.6%203%20.03%201.606-.586%203.5-3.769%203.5H4V2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__italic i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.017%203L8.08%2013H9v1H6v-1h1.182L9%203H8V2h3v1h-.983z'%20fill='%233D4757'/%3e%3c/svg%3e")}.menu-item .menu-item__underline{width:30px;position:relative}.menu-item__underline>i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%202v6a3%203%200%20106%200V2h1v6a4%204%200%2011-8%200V2h1zM4%2013h8v1H4z'%20fill='%233D4757'/%3e%3c/svg%3e");flex-shrink:0}.menu-item__underline .select{width:100%;height:100%}.menu-item .menu-item__underline .options{width:128px}.menu-item .menu-item__underline li{padding:1px 5px}.menu-item__underline li i{pointer-events:none}.menu-item__underline li[data-decoration-style=solid]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h118v1H4z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__underline li[data-decoration-style=double]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h118v1H4zm0%203h118v1H4z'/%3e%3c/svg%3e")}.menu-item__underline li[data-decoration-style=dashed]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h4v1H4zm5%200h4v1H9zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h3v1h-3z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__underline li[data-decoration-style=dotted]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h1v1H4zm12%200h1v1h-1zM6%2010h1v1H6zm12%200h1v1h-1zM8%2010h1v1H8zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__underline li[data-decoration-style=wavy]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='none'%20stroke='%23000000'%20d='M4%2010%20Q6%208,8%2010%20T12%2010%20T16%2010%20T20%2010%20T24%2010%20T28%2010%20T32%2010%20T36%2010%20T40%2010%20T44%2010%20T48%2010%20T52%2010%20T56%2010%20T60%2010%20T64%2010%20T68%2010%20T72%2010%20T76%2010%20T80%2010%20T84%2010%20T88%2010%20T92%2010%20T96%2010%20T100%2010%20T104%2010%20T108%2010%20T112%2010%20T116%2010%20T120%2010%20T124%2010'/%3e%3c/svg%3e")}.menu-item__strikeout i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M10.42%207.903H6.692a9.182%209.182%200%2001-.41-.172%205.54%205.54%200%2001-.814-.447%202.955%202.955%200%2001-.655-.595%202.728%202.728%200%2001-.44-.777%202.877%202.877%200%2001-.162-1.006c0-.472.094-.888.282-1.25.188-.36.453-.663.793-.907s.747-.43%201.22-.558A5.97%205.97%200%20018.063%202c.504%200%20.95.049%201.337.147.387.097.725.23%201.013.398.287.169.53.365.73.59a3.337%203.337%200%2001.772%201.486c.03.13.054.255.073.379h-1.276a2.393%202.393%200%2000-.22-.615%202.315%202.315%200%2000-.59-.724%202.467%202.467%200%2000-.834-.44%203.376%203.376%200%2000-1.005-.146%204.69%204.69%200%2000-.958.097%202.77%202.77%200%2000-.839.314%201.765%201.765%200%2000-.597.566c-.152.233-.229.518-.229.854%200%20.348.086.642.258.884.171.241.401.449.689.622.287.174.615.323.983.448s.749.247%201.142.367c.31.097.62.196.934.297a8.439%208.439%200%2001.973.38zm1.376%201c.175.217.315.466.418.746.105.285.158.612.158.98%200%20.554-.104%201.041-.312%201.462-.207.42-.496.772-.867%201.054-.37.282-.81.495-1.32.64A6.12%206.12%200%20018.205%2014c-.543%200-1.071-.09-1.586-.273a4.44%204.44%200%2001-1.374-.773%203.873%203.873%200%2001-.97-1.217%203.695%203.695%200%2001-.395-1.612h1.27c.028.407.122.78.282%201.12a2.835%202.835%200%20001.581%201.465c.363.138.76.207%201.192.207.387%200%20.758-.042%201.112-.126a2.85%202.85%200%2000.938-.399%202.01%202.01%200%2000.647-.708c.16-.29.241-.642.241-1.054%200-.337-.087-.623-.261-.86a2.333%202.333%200%2000-.69-.61%204.651%204.651%200%2000-.495-.257h2.099z'/%3e%3cpath%20d='M3%207h10v1H3z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__superscript i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_superscript'%3e%3cpath%20id='_x32_'%20class='st0'%20d='M15%206.3V7h-3c0-.3.1-.5.3-.8.2-.2.5-.6%201-1%20.3-.2.6-.5.7-.6.1-.2.2-.3.2-.5s-.1-.3-.2-.4c-.1-.1-.2-.1-.4-.1s-.3%200-.4.1-.2.3-.2.6l-.9-.1c.1-.4.2-.7.5-.9s.6-.3%201-.3.8.1%201%20.3c.3.2.4.5.4.8%200%20.2%200%20.4-.1.5s-.2.4-.4.5c-.1.1-.3.3-.6.5s-.4.4-.4.5c-.1.1-.1.2-.2.3l1.7-.1z'/%3e%3cpath%20id='合并形状'%20class='st0'%20d='M7.4%208.5l4%205.5H10L6.7%209.4%203.4%2014H2l4-5.5L2%203h1.4l3.3%204.6L10%203h1.3L7.4%208.5z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__subscript i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_subscript'%3e%3cpath%20id='_x32_'%20class='st0'%20d='M15%2013.3v.7h-3c0-.3.1-.5.3-.8.2-.2.5-.6%201-1%20.4-.3.6-.5.7-.7.1-.2.2-.3.2-.5s-.1-.3-.2-.4c-.1-.1-.2-.1-.4-.1s-.3%200-.4.1-.2.4-.2.7l-.9-.1c.1-.4.2-.7.5-.9.3-.2.6-.3%201-.3s.8.1%201%20.3c.3.2.4.5.4.8%200%20.2%200%20.4-.1.5-.1.2-.2.3-.3.5-.1.1-.3.3-.6.5s-.4.4-.5.4c-.1.1-.1.2-.2.3H15z'/%3e%3cpath%20id='合并形状'%20class='st0'%20d='M7.2%208.5l4%205.5H9.8L6.5%209.4%203.2%2014H1.8l4-5.5-4-5.5h1.4l3.3%204.6L9.8%203h1.3L7.2%208.5z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__color,.menu-item__highlight{flex-direction:column;display:flex}.menu-item__color #color,.menu-item__highlight #highlight{visibility:hidden;appearance:none;outline:none;width:1px;height:1px}.menu-item__color i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7.997%203.429L6.398%208h3.2L7.997%203.429zM8.497%202L12%2012h-1L9.949%209h-3.9L5%2012H4L7.496%202h1z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__color span{background-color:#000}.menu-item__highlight i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M13.31%205h-1.92a2.203%202.203%200%2000-.39-.034c-.135%200-.27.012-.402.034H10v.18c-.578.256-1%20.714-1%201.214v1.928c0%20.196.117.43.3.658v1.23a3.543%203.543%200%2001-.3-.4V11H8V1h1v4.265C9%204.763%2010%204%2010.942%204c1.19%200%201.92.422%202.367%201zM2%206c-.03-.498-.175-2%202.5-2C7.11%204%207%205%207%206.902V11H5.984v-.993c.38.662-.115.993-1.484.993C2.708%2011%202%209.931%202%209c0-1.428.447-2%202.5-2h1.484c0-1%20.031-2-1.484-2-1.533%200-1.577.485-1.577%201H2zm2.5%202C3.601%208%203%207.768%203%209c0%201.31.438%201%201.5%201%20.617%200%201.484-.665%201.484-1.847V8H4.5z'/%3e%3cpath%20d='M13.085%206.316l-2.814%203a1%201%200%20101.458%201.368l2.815-3a1%201%200%2000-1.459-1.368z'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__highlight span{background-color:#ff0}.menu-item .menu-item__title{width:60px;position:relative}.menu-item__title .select{width:calc(100% - 20px);height:100%}.menu-item__title i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M14%201a1%201%200%20011%201v12a1%201%200%2001-1%201H2a1%201%200%2001-1-1V2a1%201%200%20011-1h12zm0%201H2v12h12V2z'%20fill-rule='nonzero'/%3e%3cpath%20fill-rule='nonzero'%20d='M4%2011h8v1H4zm0-3h4v1H4zm0-3h2v1H4z'/%3e%3cpath%20d='M9%205h1v4H9z'/%3e%3cpath%20d='M7%205h5v1H7z'/%3e%3c/g%3e%3c/svg%3e");transform:translate(-5px)}.menu-item__title .options{width:80px}.menu-item__left i{background-image:url("data:image/svg+xml,%3csvg%20height='16'%20viewBox='0%200%2016%2016'%20width='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2zm0-3h8v1H2zm0-3h12v1H2zm0-6h12v1H2zm0%203h8v1H2z'%20fill='%233d4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__center i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2v-1zm2-3h8v1H4v-1zM2%207h12v1H2V7zm0-6h12v1H2V1zm2%203h8v1H4V4z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__right i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2v-1zm4-3h8v1H6v-1zM2%207h12v1H2V7zm0-6h12v1H2V1zm4%203h8v1H6V4z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__alignment i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2013h12v1H2v-1zm0-3h12v1H2v-1zm0-3h12v1H2V7zm0-6h12v1H2V1zm0%203h12v1H2V4z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__justify i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20stroke='%233D4757'%20fill='%233D4757'%20d='M2%2010.5H14M2%2013.5H14'%20stroke-linecap='round'%20stroke-linejoin='miter'%3e%3c/path%3e%3cpath%20stroke='%233D4757'%20fill='%233D4757'%20d='M14%203.5L12%201.5M14%203.5L12%205.5M14%203.5L2%203.5M4%201.5L2%203.5M2%203.5L4%205.5'%20stroke-linecap='round'%20stroke-linejoin='miter'%3e%3c/path%3e%3c/svg%3e")}.menu-item__row-margin{position:relative}.menu-item__row-margin i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%2014h12v1H2v-1zm7-5h5v1H9V9zm0-3h5v1H9V6zM2%201h12v1H2V1zm2.5%203L7%207H2zm0%208L7%209H2z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__spacing{position:relative}.menu-item__spacing i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M2%200.5l4%202-4%202v-4zM8%201h6v1H8V1zM2%207h12v1H2V7zM2%2010h12v1H2v-1zM2%2013h12v1H2v-1z'%20fill='%233D4757'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__spacing .options{width:240px;padding:12px}.menu-item__spacing .options .spacing-option{justify-content:space-between;align-items:center;margin-bottom:10px;display:flex}.menu-item__spacing .options .spacing-option:last-child{margin-bottom:0}.menu-item__spacing .options .spacing-option__label{color:#3d4757;-webkit-user-select:none;user-select:none;white-space:nowrap}.menu-item__spacing .options .tabstop-clear{color:#4b7bff;cursor:pointer;background:0 0;border:none;padding:0;font-size:12px}.menu-item__spacing .options .tabstop-rows{flex-direction:column;gap:6px;margin-bottom:8px;display:flex}.menu-item__spacing .options .tabstop-row{align-items:center;gap:6px;display:flex}.menu-item__spacing .options .tabstop-row input{color:#3d4757;border:1px solid #e2e6ed;border-radius:2px;outline:none;flex:1;width:0;min-width:0;height:22px;padding:0 6px;font-size:12px}.menu-item__spacing .options .tabstop-row select{color:#3d4757;background:#fff;border:1px solid #e2e6ed;border-radius:2px;outline:none;height:22px;font-size:12px}.menu-item__spacing .options .tabstop-row__delete{color:#8a93a3;cursor:pointer;background:0 0;border:none;flex:none;justify-content:center;align-items:center;width:20px;height:20px;padding:0;display:flex}.menu-item__spacing .options .tabstop-row__delete:hover{color:#e05a5a}.menu-item__spacing .options .tabstop-add{color:#4b7bff;cursor:pointer;background:0 0;border:none;border-radius:2px;width:100%;height:26px;font-size:12px}.menu-item__spacing .options .tabstop-add:hover{background:#f5f6f7}.menu-item__spacing .options .spacing-option__stepper{border:1px solid #e2e6ed;border-radius:2px;align-items:center;display:flex;overflow:hidden}.menu-item__spacing .options .spacing-option__stepper button{color:#3d4757;cursor:pointer;background:#f5f6f7;border:none;width:22px;height:22px;padding:0;font-size:12px;line-height:1}.menu-item__spacing .options .spacing-option__stepper button:hover{background:#ebecef}.menu-item__spacing .options .spacing-option__stepper input{text-align:center;color:#3d4757;appearance:textfield;border:none;border-left:1px solid #e2e6ed;border-right:1px solid #e2e6ed;outline:none;width:46px;height:22px;padding:0;font-size:12px}.menu-item__spacing .options .spacing-option__stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.menu-item__spacing .options .spacing-option__stepper input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.menu-item__list{position:relative}.menu-item__list i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M7%2012h7v1H7zm0-5h7v1H7zm0-5h7v1H7zM3%204V2H2V1h2v3h1v1H2V4h1z'/%3e%3cpath%20d='M2%206h3v1H2V6zm0%203h3v1H2V9z'%20fill='%234F4F4F'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M4.5%206L5%207l-2.5%203L2%209z'/%3e%3cpath%20d='M4%2014l-1-2H2v-1h3v1H4l1%202v1H2v-1h2z'%20fill='%233D4757'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__list .options{width:110px}.menu-item__list .options>ul>li *{pointer-events:none}.menu-item__list .options>ul>li li{margin-left:18px}.menu-item__list .options>ul>li[data-list-style=checkbox] li::marker{font-size:11px}.menu-item__image i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_0-公共_x2F_02工具栏_x2F_插入图片-16px-'%3e%3cg%20id='Group-19'%20transform='translate(1%201)'%3e%3cpath%20id='Combined-Shape'%20class='st0'%20d='M1%200h12c.6%200%201%20.4%201%201v11c0%20.6-.4%201-1%201H1c-.6%200-1-.4-1-1V1c0-.6.4-1%201-1zm0%201v11h12V1H1z'/%3e%3ccircle%20id='椭圆形'%20class='st0'%20cx='10'%20cy='4'%20r='1'/%3e%3cpath%20id='Path'%20class='st0'%20d='M8.5%2011.2l-4-4.1L1%2010.7V9.2c1.7-1.6%202.7-2.5%203-2.8.4-.5.7-.4%201%200L8.5%2010%2011%207.3c.4-.5.6-.5%201-.1l2%202.8v1.5l-2.5-3.4-3%203.1z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.menu-item__image input{display:none}.menu-item__table{position:relative}.menu-item__table i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3crect%20x='.5'%20y='.5'%20width='12'%20height='12'%20rx='1'%20transform='translate(1%201)'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M2%209h12v1H2zm0-4h12v1H2z'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M5%201h1v13H5zm4%200h1v13H9z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item .menu-item__table__collapse{box-sizing:border-box;z-index:99;cursor:auto;background:#fff;border:1px solid #e2e6ed;border-radius:2px;width:270px;height:310px;padding:14px 27px;display:none;position:absolute;top:25px;left:0;box-shadow:0 2px 12px #38383833}.menu-item .menu-item__table__collapse .table-close{cursor:pointer;position:absolute;top:5px;right:10px}.menu-item .menu-item__table__collapse .table-close:hover{color:#7d7e80}.menu-item .menu-item__table__collapse:hover{background:#fff}.menu-item .menu-item__table__collapse .table-title{border-bottom:1px solid #e2e6ed;justify-content:flex-start;padding-bottom:5px;display:flex}.table-title span{color:#3d4757;margin:0;font-size:12px;display:inline}.table-panel{cursor:pointer}.table-panel .table-row{pointer-events:none;flex-wrap:nowrap;margin-top:10px;display:flex}.table-panel .table-cel{box-sizing:border-box;pointer-events:none;background:#fff;border:1px solid #e2e6ed;width:16px;height:16px;margin-right:6px;position:relative}.table-panel .table-cel.active{background:#4991f226;border:1px solid #4991f233}.table-panel .table-row .table-cel:last-child{margin-right:0}.menu-item__hyperlink i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20transform='rotate(45%205.5%2013.328)'%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M7%206H6V3.515a2.5%202.5%200%2010-5%200V6H0V3.515a3.5%203.5%200%20117%200V6zm0%204v2.5a3.5%203.5%200%2001-7%200V10h1v2.5a2.5%202.5%200%20105%200V10h1z'%20fill-rule='nonzero'/%3e%3crect%20x='3.062'%20y='5.209'%20width='1'%20height='5.5'%20rx='.5'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__separator{position:relative}.menu-item__separator>i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.9%202.8l2.01%202.506c.2.25.58.25.78%200L8.7%202.799l2.01%202.507c.2.25.58.25.78%200l2.4-2.993-.78-.626-2.01%202.507-2.01-2.507a.5.5%200%2000-.78%200L6.3%204.194%204.29%201.687a.5.5%200%2000-.78%200l-2.4%203%20.78.625L3.9%202.8zM1%208h13v1H1zm0%204h3v1H1zm5%200h3v1H6zm5%200h3v1h-3z'%20fill='%233D4757'/%3e%3c/svg%3e")}.menu-item .menu-item__separator .options{width:128px}.menu-item .menu-item__separator li{padding:1px 5px}.menu-item__separator li i{pointer-events:none}.menu-item__separator li[data-separator="0,0"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h118v1H4z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__separator li[data-separator="1,1"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h1v1H4zm12%200h1v1h-1zM6%2010h1v1H6zm12%200h1v1h-1zM8%2010h1v1H8zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm2%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1zm12%200h1v1h-1zm-10%200h1v1h-1z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__separator li[data-separator="3,1"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h4v1H4zm5%200h4v1H9zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h4v1h-4zm5%200h3v1h-3z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__separator li[data-separator="4,4"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5%2010h4v1H5zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4zm8%200h4v1h-4z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__separator li[data-separator="7,3,3,3"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h6v1H4zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3zm6%200h6v1h-6zm9%200h3v1h-3z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__separator li[data-separator="6,2,2,2,2,2"]{background-image:url("data:image/svg+xml,%3csvg%20width='126'%20height='20'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4%2010h5v1H4zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2zm4%200h5v1h-5zm7%200h2v1h-2zm4%200h2v1h-2z'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.menu-item__watermark>i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3crect%20stroke='%233D4757'%20x='2.5'%20y='1.5'%20width='11'%20height='13'%20rx='1'/%3e%3cpath%20d='M4%207h8v1H4V7zm0-2h8v1H4V5zm0%206h8v1H4v-1zm0-2h8v1H4V9z'%20fill='%23909AA9'%20fill-rule='nonzero'/%3e%3cpath%20d='M6%205.623c.36-.354.936-.638%202-.604%201.785.057%202-.008%202%201.894v4.098H8.984v-.993c1.046.662.885.993-.484.993-1.792%200-2.5-1.068-2.5-2%200-1.427.447-2%202.5-2h.484c0-1-.006-1.007-.984-1-.978.008-1.419.437-2%20.437v-.825zm2.5%202.389c-.899%200-1.5-.232-1.5%201%200%201.31.438%201%201.5%201%20.617%200%20.484-.665.484-1.848v-.152H8.5z'%20fill='%233D4757'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__watermark{position:relative}.menu-item__codeblock i{background-image:url("data:image/svg+xml,%3csvg%20width='14'%20height='14'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20stroke='%23525C6F'%20stroke-linejoin='round'%20d='M4%204.5L1.5%207%204%209.5M10%204.5L12.5%207%2010%209.5'%3e%3c/path%3e%3crect%20fill='%23525C6F'%20transform='scale(1%20-1)%20rotate(70%2016.711%200)'%20x='2.671'%20y='6.53'%20width='8'%20height='1'%20rx='.2'%3e%3c/rect%3e%3c/g%3e%3c/svg%3e")}.menu-item__page-break i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:none;stroke:%233d4757}.st1{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_1-文字_x2F_02插入_x2F_分页-16px'%3e%3cpath%20id='矩形'%20class='st0'%20d='M5.5%202.5h7c.6%200%201%20.4%201%201v3c0%20.6-.4%201-1%201h-7c-.6%200-1-.4-1-1v-3c0-.6.4-1%201-1z'/%3e%3cpath%20id='三角形'%20class='st1'%20d='M4%208.5L1%206v5z'/%3e%3cpath%20id='合并形状'%20class='st0'%20d='M10.8%209.5H5c-.3%200-.5.2-.5.5v4c0%20.3.2.5.5.5h8c.3%200%20.5-.2.5-.5v-1.8l-2.7-2.7z'/%3e%3cpath%20id='矩形_1_'%20class='st1'%20d='M10%2010h1v3h-1z'/%3e%3cpath%20id='矩形-copy-2'%20class='st1'%20d='M10%2012h3v1h-3z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__control{position:relative}.menu-item__control i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M9.793%201.5H3a.5.5%200%2000-.5.5v12a.5.5%200%2000.5.5h9a.5.5%200%2000.5-.5V4.207L9.793%201.5z'%20stroke='%233D4757'/%3e%3cg%20fill='%233D4757'%3e%3cpath%20d='M7%207h1v5H7z'/%3e%3cpath%20d='M5%207h5v1H5z'/%3e%3c/g%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M9%202h1v3H9z'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M9%204h3v1H9z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__checkbox i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_1-文字_x2F_01开始_x2F_任务列表-16px'%3e%3cpath%20id='合并形状'%20class='st0'%20d='M10.1%202H2v11h11V8.7l1-1V13c0%20.6-.4%201-1%201H2c-.6%200-1-.4-1-1V2c0-.6.4-1%201-1h9.1l-1%201z'/%3e%3cpath%20id='路径'%20class='st0'%20d='M7.7%208.5l5.7-5.8.9.8-6.1%205.9-.5.5-3.9-3.4.8-.7z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__radio i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='12'%20cy='12'%20r='10'%20stroke='%233d4757'%20stroke-width='1.5'%20fill='none'%20/%3e%3ccircle%20cx='12'%20cy='12'%20r='3.5'%20fill='%233d4757'%20/%3e%3c/svg%3e")}.menu-item__latex i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M9%2013.5H2.982a.5.5%200%2001-.404-.794l3.208-4.412a.5.5%200%20000-.588L2.578%203.294a.5.5%200%2001.404-.794H9'%20stroke='%233D4757'/%3e%3cpath%20d='M14.447%207l.809.588-2.139%202.942%202.139%202.942-.81.588-1.946-2.68-1.947%202.68-.809-.588%202.138-2.942-2.138-2.942.81-.588L12.5%209.679%2014.447%207z'%20fill='%233D4757'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__date{position:relative}.menu-item__date i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M7.5%2014.154a5.654%205.654%200%20100-11.308%205.654%205.654%200%20000%2011.308zm0%20.846a6.5%206.5%200%20110-13%206.5%206.5%200%20010%2013z'%20fill-rule='nonzero'/%3e%3cpath%20d='M8%208h4v1H7V4h1v4z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item__date .options{width:160px}.menu-item__block i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%3e%3cpath%20d='M8.923%2011v1h-2A2%202%200%20015%2010.55c.328-.15.638-.335.923-.55a1%201%200%20001%201h2zm0-6h-2a1%201%200%2000-1%201A4.997%204.997%200%20005%205.45%202%202%200%20016.923%204h2v1z'/%3e%3cpath%20d='M4%2010a2%202%200%20100-4%202%202%200%20000%204zm0%201a3%203%200%20110-6%203%203%200%20010%206zm6-9a1%201%200%2000-1%201v3a1%201%200%20001%201h3a1%201%200%20001-1V3a1%201%200%2000-1-1h-3zm0-1h3a2%202%200%20012%202v3a2%202%200%2001-2%202h-3a2%202%200%2001-2-2V3a2%202%200%20012-2zm0%2010a1%201%200%2000-1%201v1a1%201%200%20001%201h3a1%201%200%20001-1v-1a1%201%200%2000-1-1h-3zm0-1h3a2%202%200%20012%202v1a2%202%200%2001-2%202h-3a2%202%200%2001-2-2v-1a2%202%200%20012-2z'/%3e%3c/g%3e%3c/svg%3e")}.menu-item .menu-item__control .options{width:55px}.menu-item__search{position:relative}.menu-item__search i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3ccircle%20stroke='%233D4757'%20cx='6'%20cy='6'%20r='4.5'/%3e%3cpath%20d='M10.061%2010.968L8.707%209.414l.707-.707%201.514%201.457.435-.404%202.632%202.462a1.154%201.154%200%2001.05%201.635%201.184%201.184%200%2001-1.655.064l-2.788-2.527.46-.426z'%20fill='%233D4757'%20fill-rule='nonzero'/%3e%3c/g%3e%3c/svg%3e")}.menu-item .menu-item__search__collapse{box-sizing:border-box;z-index:99;background:#fff;width:260px;height:108px;display:none;position:absolute;top:25px;left:0;box-shadow:0 5px 5px #e3dfdf}.menu-item .menu-item__search__collapse:hover{background:#fff}.menu-item .menu-item__search__collapse>div{border-radius:4px;justify-content:space-between;align-items:center;width:250px;height:36px;padding:0 5px;line-height:36px;display:flex}.menu-item .menu-item__search__collapse>div input[type=text]{appearance:none;box-sizing:border-box;color:#606266;background-color:#fff;background-image:none;border:1px solid #ebebeb;border-radius:4px;outline:none;width:205px;height:27px;padding:0 5px;line-height:27px;display:inline-block}.menu-item .menu-item__search__collapse>div span{color:#dcdfe6;border:0;height:100%;padding:0 10px;font-size:25px;display:inline-block}.menu-item .menu-item__search__collapse__replace button{white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #e2e6ed;border-radius:2px;margin-left:4px;padding:0 6px;font-size:12px;line-height:22px;display:inline-block}.menu-item .menu-item__search__collapse__replace button:hover{background:#1937580a}.menu-item .menu-item__search__collapse__search{position:relative}.menu-item .menu-item__search__collapse__search label{color:#3d4757;font-size:12px;position:absolute;right:110px}.menu-item .menu-item__search__collapse__search>input{padding:5px 90px 5px 5px!important}.menu-item .menu-item__search__collapse__search>div{border-left:1px solid #e2e6ed;justify-content:center;align-items:center;width:28px;height:27px;transition:all .5s;display:flex;position:absolute}.menu-item .menu-item__search__collapse__search>div:hover{background-color:#1937580a}.menu-item .menu-item__search__collapse__search i{width:6px;height:8px;transform:translateY(1px)}.menu-item .menu-item__search__collapse__search .arrow-left{right:76px}.menu-item .menu-item__search__collapse__search .arrow-left i{background:url("data:image/svg+xml,%3csvg%20width='4'%20height='7'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%236F6F6F'%20d='M0%203.5L4%200v7z'%20fill-rule='evenodd'/%3e%3c/svg%3e") no-repeat}.menu-item .menu-item__search__collapse__search .arrow-right{right:48px}.menu-item .menu-item__search__collapse__search .arrow-right i{background:url("data:image/svg+xml,%3csvg%20width='4'%20height='7'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill='%236F6F6F'%20d='M4%203.5L0%200v7z'%20fill-rule='evenodd'/%3e%3c/svg%3e") no-repeat}.menu-item__search__collapse__option{justify-content:flex-start!important}.menu-item .menu-item__search__collapse__option .search-option-item{align-items:center;margin-right:10px;display:flex}.menu-item .menu-item__search__collapse__option label{cursor:pointer;margin-left:4px;font-size:12px}.menu-item__print i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M12%204h-1V2H5v2H4V2a1%201%200%20011-1h6a1%201%200%20011%201v2zm0%205v4a1%201%200%2001-1%201H5a1%201%200%2001-1-1V9h1v4h6V9h1z'/%3e%3cpath%20d='M12%2012v-1h2V5H2v6h2v1H2a1%201%200%2001-1-1V5a1%201%200%20011-1h12a1%201%200%20011%201v6a1%201%200%2001-1%201h-2z'/%3e%3cpath%20d='M3%208h10v1H3zm8-2h2v1h-2z'/%3e%3c/g%3e%3c/svg%3e")}.catalog{width:250px;padding:0 20px 40px;position:fixed;top:100px;bottom:0;left:0}.catalog .catalog__header{border-bottom:1px solid #e2e6ed;justify-content:space-between;align-items:center;height:48px;display:flex}.catalog .catalog__header span{color:#3d4757;font-size:14px;font-weight:700}.catalog .catalog__header i{cursor:pointer;background:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e") no-repeat;width:16px;height:16px;transition:all .2s;display:inline-block}.catalog .catalog__header>div:hover{background:#ebeef1}.catalog__main{height:calc(100% - 60px);padding:10px 0;overflow:hidden auto}.catalog__main .catalog-item{box-sizing:border-box;width:100%;padding-left:10px}.catalog__main>.catalog-item{padding-left:0}.catalog__main .catalog-item .catalog-item__content{white-space:nowrap;text-overflow:ellipsis;width:100%;overflow:hidden}.catalog__main .catalog-item .catalog-item__content:hover>span{color:#4991f2}.catalog__main .catalog-item .catalog-item__content span{color:#3d4757;white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:12px;line-height:30px}.editor>div{margin:80px auto}.editor .ce-ruler-x{top:60px}.ce-page-container canvas,.ce-page-container>svg{box-shadow:0 2px 12px #9ea1a566}.comment{width:250px;height:650px;position:fixed;top:200px;left:50%;overflow-y:auto;transform:translate(420px)}.comment-line-toggle{color:#475266;-webkit-user-select:none;user-select:none;justify-content:flex-end;align-items:center;gap:6px;width:250px;font-size:12px;display:flex;position:fixed;top:172px;left:50%;transform:translate(420px)}.comment-line-toggle__switch{width:28px;height:16px;display:inline-block;position:relative}.comment-line-toggle__switch input{display:none}.comment-line-toggle__switch i{cursor:pointer;background:#c0c6cf;border-radius:8px;transition:all .2s;position:absolute;inset:0}.comment-line-toggle__switch i:before{content:"";background:#fff;border-radius:50%;width:12px;height:12px;transition:all .2s;position:absolute;top:2px;left:2px}.comment-line-toggle__switch input:checked+i{background:#e99d00}.comment-line-toggle__switch input:checked+i:before{transform:translate(12px)}.comment-line{pointer-events:none;width:100%;height:100%;position:fixed;inset:0}.comment-line path{fill:none;stroke:#c0c6cf;stroke-width:1px}.comment-line path.active{stroke:#e99d00}.comment-item{cursor:pointer;background:#fff;border:1px solid #e2e6ed;border-radius:8px;margin-bottom:20px;padding:15px;font-size:14px;transition:all .5s;position:relative}.comment-item:hover{border-color:#c0c6cf;box-shadow:0 2px 12px #0000001a}.comment-item.active{border-color:#e99d00;box-shadow:0 2px 12px #0000001a}.comment-item__title{color:#c1c6ce;align-items:center;height:22px;display:flex;position:relative}.comment-item__title span:first-child{background-color:#dbdbdb;border-radius:999px;width:4px;height:16px;margin-right:5px;display:inline-block}.comment-item__title span:nth-child(2){white-space:nowrap;text-overflow:ellipsis;width:200px;overflow:hidden}.comment-item__title i{cursor:pointer;background:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e") no-repeat;width:16px;height:16px;position:absolute;top:-8px;right:-8px}.comment-item__title i:hover{opacity:.6}.comment-item__info{justify-content:space-between;align-items:center;height:28px;display:flex}.comment-item__info>span:first-child{font-weight:600}.comment-item__info>span:last-child{color:#c1c6ce}.comment-item__content{line-height:22px}.footer{z-index:9;box-sizing:border-box;background:#f2f4f7;justify-content:space-between;align-items:center;width:100%;height:30px;padding:0 4px 0 20px;font-size:12px;display:flex;position:fixed;bottom:0;left:0}.footer>div:first-child{align-items:center;height:100%;display:flex}.footer .catalog-mode,.footer .page-mode{align-items:center;display:flex}.footer .catalog-mode{padding:1px;position:relative}.footer .catalog-mode i{cursor:pointer;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%3e%3cpath%20d='M13%200c.552%200%201%20.48%201%201.071V13.93c0%20.59-.448%201.07-1%201.07H3c-.552%200-1-.48-1-1.071V1.07C2%20.48%202.448%200%203%200h10zm0%201H3v13h10V1z'/%3e%3cpath%20d='M5%2010v1H4v-1h1zm6%200v1H6v-1h5zM5%207v1H4V7h1zm6%200v1H6V7h5zM5%204v1H4V4h1zm6%200v1H6V4h5z'/%3e%3c/g%3e%3c/svg%3e");width:16px;height:16px;margin-right:5px;display:inline-block}.footer .page-mode{padding:1px;position:relative}.footer .page-mode i{cursor:pointer;background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(2%200)'%3e%3crect%20stroke='%233D4757'%20x='.5'%20y='.5'%20width='11'%20height='8'%20rx='1'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M2%203h4v1H2zm0%202h8v1H2z'/%3e%3c/g%3e%3cg%20fill='%233D4757'%20fill-rule='nonzero'%3e%3cpath%20d='M14%2014h-1v-5H3v5H2V9h12v5z'/%3e%3cpath%20d='M4%2011h4v1H4zm0%202h8v1H4z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e");width:16px;height:16px;margin-right:5px;display:inline-block}.footer .options{background:#fff;border:1px solid #e2e6ed;border-radius:2px;width:70px;padding:10px;font-size:14px;display:none;position:absolute;bottom:25px;left:0;box-shadow:0 2px 12px #38383833}.footer .options.visible{display:block}.footer .options li{-webkit-user-select:none;user-select:none;text-align:center;cursor:pointer;margin:5px 0;padding:5px;transition:all .3s}.footer .options li:hover{background-color:#ebecef}.footer .options li.active{background-color:#e2e6ed}.footer>div:first-child>span{letter-spacing:1px;align-items:center;margin-right:5px;line-height:16px;display:flex}.footer>div:last-child{justify-content:space-between;align-items:center;display:flex}.footer>div:last-child>div{justify-content:center;align-items:center;width:24px;height:24px;display:flex}.footer>div:last-child>div:hover{background:#1937580a}.footer>div:last-child i{cursor:pointer;width:16px;height:16px;display:inline-block}.footer .editor-option i{background-image:url("data:image/svg+xml,%3csvg%20viewBox='0%200%201084%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%3e%3cpath%20d='M1072.147851%20406.226367c-6.331285-33.456782-26.762037-55.073399-52.047135-55.073399-0.323417%200-0.651455%200.003081-0.830105%200.009241l-4.655674%200c-73.124722%200-132.618162-59.491899-132.618162-132.618162%200-23.731152%2011.447443-50.336101%2011.546009-50.565574%2013.104573-29.498767%203.023185-65.672257-23.427755-84.127081l-1.601687-1.127342-134.400039-74.661726-1.700252-0.745401c-8.753836-3.805547-18.334698-5.735272-28.479231-5.735272-20.789593%200-41.235746%208.344174-54.683758%2022.306575-14.741683%2015.216028-65.622973%2058.649474-104.721083%2058.649474-39.450789%200-90.633935-44.286652-105.438762-59.784516-13.518857-14.247316-34.128258-22.753199-55.127302-22.753199-9.945862%200-19.354234%201.861961-27.958682%205.531982l-1.746455%200.74078-139.141957%2076.431283-1.643269%201.139662c-26.537186%2018.437884-36.675557%2054.579032-23.584845%2084.062398%200.115506%200.264895%2011.579891%2026.725075%2011.579891%2050.634877%200%2073.126262-59.491899%20132.618162-132.618162%20132.618162l-4.581749%200c-0.318797-0.00616-0.636055-0.01078-0.951772-0.01078-25.260456%200-45.672728%2021.618157-52.002472%2055.0811-0.462025%202.453354-11.313456%2060.622322-11.313456%20106.117939%200%2045.494078%2010.85143%20103.659965%2011.314996%20106.119479%206.334365%2033.458322%2026.758957%2055.076479%2052.036353%2055.076479%200.320337%200%200.651455-0.00616%200.842426-0.012321l4.655674%200c73.126262%200%20132.618162%2059.491899%20132.618162%20132.616622%200%2023.760413-11.444363%2050.333021-11.546009%2050.565574-13.093793%2029.474125-3.041666%2065.646075%2023.395414%2084.151722l1.569346%201.093459%20131.838879%2073.726895%201.675611%200.7377c8.750757%203.84251%2018.305437%205.790715%2028.397607%205.790715%2021.082208%200%2041.676209-8.706094%2055.0888-23.290689%2018.724339-20.347588%2069.527086-62.362616%20107.04815-62.362616%2040.625872%200%2092.72537%2047.100385%20107.759669%2063.583903%2013.441852%2014.831008%2034.176001%2023.689571%2055.470741%2023.695731l0.00616%200c9.895039%200%2019.27877-1.883523%2027.893999-5.598205l1.711034-0.73924%20136.659342-75.531873%201.617088-1.128882c26.492523-18.456365%2036.601633-54.600594%2023.538642-84.016195-0.115506-0.267974-11.595291-27.082374-11.595291-50.67646%200-73.124722%2059.49344-132.616622%20132.618162-132.616622l4.517066-0.00154c0.300316%200.00616%200.599092%200.009241%200.899409%200.009241%2025.331299-0.00154%2045.785153-21.619697%2052.107197-55.054918%200.112426-0.589852%2011.325776-59.507301%2011.325776-106.14104C1083.464388%20466.640776%201072.609877%20408.67356%201072.147851%20406.226367zM377.486862%20945.656142l-115.32764-64.487932c5.082277-13.052211%2015.437801-43.51815%2015.437801-75.017486%200-109.382917-84.176364-199.816642-192.587488-208.134635-2.647404-15.427021-8.873963-54.967133-8.873963-85.667166%200-30.65691%206.223479-70.232445%208.869343-85.671786%20108.415744-8.311832%20192.592108-98.745557%20192.592108-208.134635%200-31.416171-10.300081-61.797405-15.371577-74.854236l122.721583-67.40331c0.003081%200%200.00462%200.00154%200.007701%200.00154%204.423121%204.518606%2022.121764%2022.080182%2046.558275%2039.493911%2039.929754%2028.46229%2077.952885%2042.894416%20113.014434%2042.894416%2034.716571%200%2072.437845-14.151831%20112.115025-42.06431%2024.282503-17.07953%2041.896442-34.302288%2046.308782-38.74543%200.009241-0.00154%200.018481-0.00462%200.026182-0.00616l118.301542%2065.726159c-5.077657%2013.055291-15.416239%2043.499669-15.416239%2074.958962%200%20109.389077%2084.174824%20199.822802%20192.590568%20208.134635%202.645865%2015.462442%208.872423%2055.107281%208.872423%2085.671786%200%2030.687711-6.223479%2070.241685-8.869343%2085.673326C890.042174%20606.334084%20805.86427%20696.767809%20805.86427%20806.158426c0%2031.450053%2010.317022%2061.851309%2015.393138%2074.903519l-119.783103%2066.198965c-5.168521-5.490399-22.603811-23.363073-46.740005-41.288109-40.701336-30.224145-79.662378-45.549521-115.800446-45.549521-35.79155%200-74.458435%2015.038919-114.927219%2044.694774C400.22004%20922.554885%20382.666163%20940.255068%20377.486862%20945.656142zM731.271848%20511.646647c0-105.803762-86.081448-191.88059-191.888289-191.88059-105.803762%200-191.88059%2086.076827-191.88059%20191.88059%200%20105.803762%2086.076827%20191.882129%20191.88059%20191.882129C645.19194%20703.528777%20731.271848%20617.450409%20731.271848%20511.646647zM539.383558%20395.903184c63.825696%200%20115.751164%2051.922387%20115.751164%20115.743463%200%2063.825696-51.925468%20115.751164-115.751164%20115.751164-63.821076%200-115.743463-51.925468-115.743463-115.751164C423.640095%20447.824031%20475.562482%20395.903184%20539.383558%20395.903184z'%20fill='%23000000'%3e%3c/path%3e%3c/svg%3e")}.footer .page-scale-minus i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3%207h10v2H3z'%20fill='%23636363'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.footer .page-scale-add i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M7%207V3h2v4h4v2H9v4H7V9H3V7h4z'%20fill='%23636363'%20fill-rule='evenodd'/%3e%3c/svg%3e")}.footer .page-scale-percentage{cursor:pointer;-webkit-user-select:none;user-select:none}.footer .fullscreen i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M3%203h1v4H3z'/%3e%3cpath%20d='M3%203h4v1H3zm10%2010h-1V9h1z'/%3e%3cpath%20d='M13%2013H9v-1h4z'/%3e%3c/g%3e%3c/svg%3e")}.footer .fullscreen.exist i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M9%209h1v4H9z'/%3e%3cpath%20d='M9%209h4v1H9zM7%207H6V3h1z'/%3e%3cpath%20d='M7%207H3V6h4z'/%3e%3c/g%3e%3c/svg%3e")}.footer .paper-margin i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3crect%20stroke='%233D4757'%20x='2.5'%20y='1.5'%20width='11'%20height='13'%20rx='1'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M3%204h10v1H3zm0%207h10v1H3z'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M5%2014V2h1v12zm5%200V2h1v12z'/%3e%3c/g%3e%3c/svg%3e")}.footer .column-config{cursor:pointer}.footer .column-config i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3crect%20stroke='%233D4757'%20x='2.5'%20y='1.5'%20width='11'%20height='13'%20rx='1'/%3e%3cpath%20fill='%233D4757'%20fill-rule='nonzero'%20d='M7.5%2014V2h1v12z'/%3e%3c/g%3e%3c/svg%3e")}.footer .ruler-toggle{cursor:pointer}.footer .ruler-toggle i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3crect%20stroke='%233D4757'%20x='1.5'%20y='4.5'%20width='13'%20height='7'%20rx='1'/%3e%3cpath%20stroke='%233D4757'%20d='M4.5%204.5v3M7.5%204.5v4M10.5%204.5v3'/%3e%3c/g%3e%3c/svg%3e")}.footer .spellcheck{cursor:pointer;position:relative}.footer .spellcheck>i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20stroke='%233D4757'%20stroke-linecap='round'%20stroke-linejoin='round'%3e%3cpath%20d='m1%2011%203.5-8L8%2011M2.3%208h4.4M9%209l2%202%204-5'/%3e%3c/g%3e%3c/svg%3e")}.footer .spellcheck .options{right:0;left:unset;width:112px;padding:8px}.footer .spellcheck-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;display:flex}.footer .spellcheck-toggle__input{cursor:pointer;margin:0}.footer .backend-switch>i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%3e%3cpath%20d='M13%200c.552%200%201%20.48%201%201.071V13.93c0%20.59-.448%201.07-1%201.07H3c-.552%200-1-.48-1-1.071V1.07C2%20.48%202.448%200%203%200h10zm0%201H3v13h10V1z'/%3e%3c/g%3e%3cpath%20d='M4%205h8m-2-2%202%202-2%202m0%203H4m2-2-2%202%202%202'%20fill='none'%20stroke='%233D4757'%20stroke-width='1'/%3e%3c/svg%3e")}.footer .backend-switch .options{right:unset;width:86px;left:0}.footer .editor-mode{cursor:pointer;-webkit-user-select:none;user-select:none;position:absolute;left:50%;transform:translate(-50%)}.footer .editor-mode .options{white-space:nowrap;width:max-content;min-width:90px;bottom:calc(100% + 4px);left:50%;transform:translate(-50%)}.footer .trace-mode-item{justify-content:space-between;align-items:center;gap:8px;display:flex}.footer .trace-toggle{cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:4px;display:flex}.footer .trace-toggle__input{cursor:pointer;margin:0}.footer .trace-toggle__input:disabled{cursor:not-allowed}.footer .trace-toggle__input:disabled+span{opacity:.5}.footer .paper-size{position:relative}.footer .paper-size i{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cg%20fill-rule='nonzero'%3e%3cpath%20d='M10.793%201.5L13.5%204.207V14L3%2014.5%202.5%202l8.293-.5z'%20stroke='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M10%202h1v3h-1z'/%3e%3cpath%20fill='%233D4757'%20d='M10%204h3v1h-3z'/%3e%3c/g%3e%3cpath%20d='M7%203v1H5v2H4V3h3z'%20fill='%233D4757'/%3e%3cpath%20fill='%233D4757'%20d='M5.169%203.43l6.62%208.784-.799.602-6.62-8.785z'/%3e%3cpath%20d='M9%2013v-1h2v-2h1v3H9z'%20fill='%233D4757'/%3e%3c/g%3e%3c/svg%3e")}.footer .paper-size .options{right:0;left:unset}.footer .paper-direction{position:relative}.footer .paper-direction i{background-image:url("data:image/svg+xml,%3csvg%20version='1.1'%20id='图层_1'%20xmlns='http://www.w3.org/2000/svg'%20x='0'%20y='0'%20viewBox='0%200%2016%2016'%20xml:space='preserve'%3e%3cstyle%3e.st0{fill:%233d4757}%3c/style%3e%3cg%20id='_x30_1-文字_x2F_04页面_x2F_纸张方向-16px'%3e%3cg%20id='编组'%20transform='translate(1%201)'%3e%3cpath%20id='合并形状'%20class='st0'%20d='M14%206v7c0%20.6-.4%201-1%201H4c-.6%200-1-.4-1-1V6c0-.6.4-1%201-1h9c.6%200%201%20.4%201%201zm-1%200H4v7h9V6z'/%3e%3cpath%20id='路径'%20class='st0'%20d='M9%204H8V1H1v9h1v1H1c-.6%200-1-.4-1-1V1c0-.6.4-1%201-1h7c.6%200%201%20.4%201%201v3z'/%3e%3cpath%20id='矩形'%20class='st0'%20d='M11%207h1v5h-1z'/%3e%3cpath%20id='矩形-copy-2'%20class='st0'%20d='M2%202h5v1H2z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e")}.footer .paper-direction .options{right:0;left:unset}.footer .paper-direction .options .option-caption{color:#a0a4ab;cursor:default;border-top:1px solid #e2e6ed;padding-top:8px;font-size:12px}.footer .paper-direction .options .option-caption:hover{background-color:#0000}.ce-contextmenu-signature{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20fill='%233D4757'%20d='M2%2013h12v1H2z'/%3e%3cpath%20fill='%234B5463'%20fill-rule='nonzero'%20d='M5.26%208.458l2.23%201.28L6%2012H3z'/%3e%3cpath%20d='M5.666%206.149L4.31%208.168l4.045%202.48%201.503-2.159-4.192-2.34zm1.106-4.156l-1.986%203.44%206.3%203.648%202.037-2.943-6.351-4.145z'%20stroke='%234B5463'/%3e%3c/g%3e%3c/svg%3e")}.ce-contextmenu-word-tool{background-image:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233D4757'%20fill-rule='evenodd'%3e%3cpath%20d='M1%200h1v15H1zm5%204h7v1H6zm-3%206h7v1H3z'/%3e%3cpath%20d='M1%200h4v1H1zm10%2014h4v1h-4zM3%207h10v1H3z'/%3e%3cpath%20d='M14%200h1v15h-1zM8%200l3%203V0zm6%200h-3v1h3zM8%2015l-3-3v3zm-6-1h3v1H2z'/%3e%3c/g%3e%3c/svg%3e")}.spellcheck-popup{z-index:100;color:#3b4351;background:#fff;border:1px solid #e3e6eb;border-radius:4px;min-width:120px;padding:4px 0;font-size:12px;position:fixed;box-shadow:0 2px 8px #1e232b1f}.spellcheck-popup__title,.spellcheck-popup__item{box-sizing:border-box;text-align:left;width:100%;padding:5px 12px;display:block}.spellcheck-popup__title{color:#7c8494;border-bottom:1px solid #f0f1f4}.spellcheck-popup__item{color:inherit;font:inherit;cursor:pointer;background:0 0;border:0}.spellcheck-popup__item:hover{background:#f5f6f8}.dialog-mask{opacity:.5;z-index:99;background:#000;width:100%;height:100%;position:fixed;top:0;left:0}.dialog-container{z-index:999;justify-content:center;align-items:center;margin:0;display:flex;position:fixed;inset:0;overflow:auto}.dialog{background:#fff;border:1px solid #e2e6ed;border-radius:2px;padding:0 30px 30px;position:absolute;box-shadow:0 2px 12px #38383833}.dialog-title{border-bottom:1px solid #e2e6ed;justify-content:space-between;align-items:center;height:60px;margin-bottom:30px;display:flex;position:relative}.dialog-title i{cursor:pointer;background:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e");width:16px;height:16px;display:inline-block}.dialog-option__item{justify-content:space-between;align-items:center;margin-bottom:18px;display:flex}.dialog-option__item span{color:#3d4757;margin-right:12px;font-size:14px;position:relative}.dialog-option__item input,.dialog-option__item textarea,.dialog-option__item select{box-sizing:border-box;appearance:none;-webkit-user-select:none;user-select:none;border:1px solid #d3d3d3;border-radius:2px;outline:none;width:276px;height:30px;min-height:30px;padding:5px;font-family:inherit}.dialog-option__item input:focus,.dialog-option__item textarea:focus{border-color:#4991f2}.dialog-option__item--require:before{content:"*";color:#f56c6c;margin-right:4px;position:absolute;left:-8px}.dialog-menu{justify-content:flex-end;align-items:center;display:flex}.dialog-menu button{white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #e2e6ed;border-radius:2px;padding:0 16px;line-height:22px;display:inline-block;position:relative}.dialog-menu button:hover{background:#1937580a}.dialog-menu__cancel{margin-right:16px}.dialog-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.dialog-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}.signature-mask{opacity:.5;z-index:99;background:#000;width:100%;height:100%;position:fixed;top:0;left:0}.signature-container{z-index:999;justify-content:center;align-items:center;margin:0;display:flex;position:fixed;inset:0;overflow:auto}.signature{background:#fff;border:1px solid #e2e6ed;border-radius:2px;padding:0 30px 30px;position:absolute;box-shadow:0 2px 12px #38383833}.signature-title{border-bottom:1px solid #e2e6ed;justify-content:space-between;align-items:center;height:60px;margin-bottom:15px;display:flex;position:relative}.signature-title i{cursor:pointer;background:url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.9%208.192l4.242%204.243-.707.707L8.192%208.9%203.95%2013.142l-.707-.707%204.242-4.243L3.243%203.95l.707-.707%204.242%204.242%204.243-4.242.707.707L8.9%208.192z'%20fill='%236A6A6A'%20fill-rule='evenodd'/%3e%3c/svg%3e");width:16px;height:16px;display:inline-block}.signature-operation>div{cursor:pointer;color:#3d4757;-webkit-user-select:none;user-select:none;align-items:center;display:inline-flex}.signature-operation>div:hover{color:#6e7175}.signature-operation>div i{width:24px;height:24px;display:inline-block}.signature-operation__undo{background:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8%206h5.5a7%207%200%20010%2014v-2a5%205%200%20000-10H8v3L4%207l4-4v3z'%20fill='%233d4757'%20fill-rule='evenodd'/%3e%3c/svg%3e") no-repeat}.signature-operation__trash{background:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20fill='%233d4757'%20fill-rule='evenodd'%3e%3cpath%20d='M17%203v4h4v2h-2v13H6V9H4V7h4V3h9zm0%206H8v11h9V9zm-2-4h-5v2h5V5z'%20fill-rule='nonzero'/%3e%3cpath%20d='M10%2010h2v7h-2zm3%200h2v7h-2z'/%3e%3c/g%3e%3c/svg%3e") no-repeat}.signature-operation>div span{margin:0 5px;font-size:12px}.signature-canvas{-webkit-user-select:none;user-select:none;margin:15px 0}.signature-canvas canvas{background:#f3f5f7}.signature-menu{justify-content:flex-end;align-items:center;display:flex}.signature-menu button{white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #e2e6ed;border-radius:2px;padding:0 16px;line-height:22px;display:inline-block;position:relative}.signature-menu button:hover{background:#1937580a}.signature-menu__cancel{margin-right:16px}.signature-menu button[type=submit]{color:#fff;background:#4991f2;border-color:#4991f2}.signature-menu button[type=submit]:hover{background:#5b9cf3;border-color:#5b9cf3}.overflow-hidden{overflow:hidden!important}.canvas-full-host{background:#f2f4f7;width:100%;height:100%;position:relative;overflow:auto}/*$vite$:1*/`)),document.head.appendChild(e)}}catch(e){console.error(`vite-plugin-css-injected-by-js`,e)}})();
|
|
13
|
+
(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=o((()=>{})),f,p=o((()=>{f=`1.1.0`})),m,h,g,_,v,y,b,x=o((()=>{m=function(e){return e.HALF=`half`,e.ONE_THIRD=`one-third`,e.QUARTER=`quarter`,e}({}),h=function(e){return e.ARABIC=`arabic`,e.CHINESE=`chinese`,e}({}),g=function(e){return e.INLINE=`inline`,e.BLOCK=`block`,e.SURROUND=`surround`,e.FLOAT_TOP=`float-top`,e.FLOAT_BOTTOM=`float-bottom`,e}({}),_=function(e){return e.BEFORE=`before`,e.AFTER=`after`,e.OUTER_BEFORE=`outer-before`,e.OUTER_AFTER=`outer-after`,e}({}),v=function(e){return e.BEFORE=`before`,e.AFTER=`after`,e}({}),y=function(e){return e.ROW=`row`,e.COLUMN=`column`,e}({}),b=function(e){return e.CHECK=`check`,e.CROSS=`cross`,e}({})})),S,C,w,T,E,D=o((()=>{x(),S=` `,C=[`·`,`、`,`:`,`:`,`,`,`,`,`.`,`。`,`;`,`;`,`?`,`?`,`!`,`!`],w=[`·`,`、`,`,`,`。`,`;`,`:`,`?`,`!`,`…`,`—`,`~`,`)`,`】`,`》`,`〉`,`」`,`』`,`”`,`’`],T={[m.HALF]:1/2,[m.ONE_THIRD]:1/3,[m.QUARTER]:1/4},E={ENGLISH:`A-Za-z`,SPANISH:`A-Za-zÁÉÍÓÚáéíóúÑñÜü`,FRENCH:`A-Za-zÀÂÇàâçÉéÈèÊêËëÎîÏïÔôÙùÛûŸÿ`,GERMAN:`A-Za-zÄäÖöÜüß`,RUSSIAN:`А-Яа-яЁё`,PORTUGUESE:`A-Za-zÁÉÍÓÚáéíóúÃÕãõÇç`,ITALIAN:`A-Za-zÀàÈèÉéÌìÍíÎîÓóÒòÙù`,DUTCH:`A-Za-zÀàÁáÂâÄäÈèÉéÊêËëÌìÍíÎîÏïÓóÒòÔôÖöÙùÛûÜü`,SWEDISH:`A-Za-zÅåÄäÖö`,GREEK:`ΑαΒβΓγΔδΕεΖζΗηΘθΙιΚκΛλΜμΝνΞξΟοΠπΡρΣσςΤτΥυΦφΧχΨψΩω`}})),O,k=o((()=>{O=function(e){return e.LEFT=`left`,e.CENTER=`center`,e.RIGHT=`right`,e.ALIGNMENT=`alignment`,e.JUSTIFY=`justify`,e}({})})),A,j,M,N,P,F,I,L,R,z=o((()=>{A=function(e){return e.COMPONENT=`component`,e.MENU=`menu`,e.MAIN=`main`,e.FOOTER=`footer`,e.CONTEXTMENU=`contextmenu`,e.POPUP=`popup`,e.CATALOG=`catalog`,e.COMMENT=`comment`,e}({}),j=function(e){return e.PAGE=`page`,e.TABLE=`table`,e}({}),M=function(e){return e.EDIT=`edit`,e.CLEAN=`clean`,e.READONLY=`readonly`,e.FORM=`form`,e.PRINT=`print`,e.DESIGN=`design`,e.GRAFFITI=`graffiti`,e.TRACE=`trace`,e}({}),N=function(e){return e.HEADER=`header`,e.MAIN=`main`,e.FOOTER=`footer`,e}({}),P=function(e){return e.PAGING=`paging`,e.CONTINUITY=`continuity`,e}({}),F=function(e){return e.VERTICAL=`vertical`,e.HORIZONTAL=`horizontal`,e}({}),I=function(e){return e.BREAK_ALL=`break-all`,e.BREAK_WORD=`break-word`,e}({}),L=function(e){return e.SPEED=`speed`,e.COMPATIBILITY=`compatibility`,e}({}),R=function(e){return e.CANVAS=`canvas`,e.SVG=`svg`,e}({})})),ee,te=o((()=>{z(),ee=class{draw;options;layoutMap;constructor(e){this.draw=e,this.options=e.getOptions(),this.layoutMap=new Map}computeLayout(e,t){if(!t)return null;let n=Math.max(1,Math.floor(t.count));if(n===1)return null;let r=(t.gap??this.options.column.gap)*this.options.scale,i=e/n*.5,a=Math.max(0,Math.min(r,i)),o=(e-a*(n-1))/n,s=[];for(let e=0;e<n;e++)s.push(e*(o+a));return{count:n,width:o,gap:a,separator:t.separator??!1,offsets:s}}compute(){this.layoutMap.set(F.VERTICAL,this.computeLayout(this.draw.getInnerWidth(F.VERTICAL),this.options.column)),this.layoutMap.set(F.HORIZONTAL,this.computeLayout(this.draw.getInnerWidth(F.HORIZONTAL),this.options.column))}getLayout(e=this.options.paperDirection){return this.layoutMap.get(e)||null}setConfig(e){!e||e.count<=1?this.options.column={...this.options.column,count:1}:this.options.column={...this.options.column,...e,count:Math.max(1,Math.floor(e.count))}}getOffset(e,t){let n=this.getLayout(t);return!n||e===void 0||e<0||e>=n.count?0:n.offsets[e]}drawSeparator(e,t){let n=this.draw.getPageDirection(t),r=this.getLayout(n);if(!r||!r.separator||r.count<2)return;let{column:i,scale:a}=this.options,{margins:o,height:s}=this.draw.getPageSize(t),c=o[3],l=o[0]+this.draw.getHeader().getExtraHeight(t),u=s-o[2]-this.draw.getFooter().getExtraHeight(t);e.save(),e.strokeStyle=i.separatorColor,e.lineWidth=i.separatorWidth*a,e.beginPath();for(let t=1;t<r.count;t++){let n=c+r.offsets[t]-r.gap/2;e.moveTo(n+.5,l),e.lineTo(n+.5,u)}e.stroke(),e.restore()}}})),B,V=o((()=>{B=function(e){return e.TEXT=`text`,e.IMAGE=`image`,e.TABLE=`table`,e.HYPERLINK=`hyperlink`,e.SUPERSCRIPT=`superscript`,e.SUBSCRIPT=`subscript`,e.SEPARATOR=`separator`,e.PAGE_BREAK=`pageBreak`,e.CONTROL=`control`,e.AREA=`area`,e.CHECKBOX=`checkbox`,e.RADIO=`radio`,e.LATEX=`latex`,e.TAB=`tab`,e.DATE=`date`,e.BLOCK=`block`,e.TITLE=`title`,e.LIST=`list`,e.LABEL=`label`,e}({})})),ne,re=o((()=>{D(),V(),ne=class e{draw;snapshotMap;lastLayoutSignature=null;dirtyElementList=null;dirtyStartIndex=1/0;dirtyEndIndex=0;isLayoutDirty=!1;constructor(e){this.draw=e,this.snapshotMap=new WeakMap}recordSnapshot(e,t,n){if(n?.listId&&n.value===``&&!n.listWrap){let e=t.listIndexMap.get(n.listId);e===0?t.listIndexMap.delete(n.listId):e!=null&&t.listIndexMap.set(n.listId,e-1)}this.snapshotMap.set(e,t)}markRangeDirty(e,t,n,r){if(e!==this.draw.getElementList())return;let i=r-n;this.dirtyElementList===e?(t<this.dirtyStartIndex?(this.dirtyStartIndex+=i,this.dirtyEndIndex+=i):t>this.dirtyStartIndex&&t<this.dirtyEndIndex&&i>0&&(this.dirtyEndIndex+=i),this.dirtyStartIndex=Math.min(this.dirtyStartIndex,t),this.dirtyEndIndex=Math.max(this.dirtyEndIndex,t+Math.max(n,r,1))):(this.dirtyElementList=e,this.dirtyStartIndex=t,this.dirtyEndIndex=t+Math.max(n,r,1))}markFullDirty(){this.isLayoutDirty=!0}consumeDirtyRange(){let e=this.dirtyElementList,t=this.dirtyStartIndex,n=this.dirtyEndIndex,r=this.isLayoutDirty;if(this.dirtyElementList=null,this.dirtyStartIndex=1/0,this.dirtyEndIndex=0,this.isLayoutDirty=!1,!r&&e&&e===this.draw.getElementList()&&Number.isFinite(t))return{startIndex:Math.max(t,0),endIndex:Math.min(n+1,e.length)}}findPageNoOfRow(e){let t=this.draw.getPageRowList();for(let n=0;n<t.length;n++)if(t[n].includes(e))return n}tryCompute(t,n){let r=n.elementList,i=this.draw.getPosition().getPositionContext(),a=this.draw.getZone(),o=this.draw.getRawRowList();if(!t||!this.draw.getOptions().incrementalCompute||i?.isTable||a.isHeaderActive()||a.isFooterActive()||!Number.isInteger(t.startIndex)||!Number.isInteger(t.endIndex)||t.startIndex<0||t.endIndex>r.length||t.startIndex>=t.endIndex||o.length===0||r.length===0||(this.draw.getColumnLayout()?.count||1)>1||(n.surroundElementList?.length||0)>0||this.draw.getIsControlMinWidthPlaceholder()||this.draw.getIsElementListTruncated()||this.lastLayoutSignature===null||this.lastLayoutSignature!==this.getLayoutSignature())return null;let s=this._findRowIndexOfElement(o,Math.max(t.startIndex-1,0));if(s<0)return null;let c=o[s],l=c.startIndex,u=this.snapshotMap.get(c);if(!u)return null;let d=new Map;for(let e=s+1;e<o.length;e++){let t=o[e].elementList[0];t&&d.set(t,e)}let f=-1,p=-1,m=!1,h=s>0?o[s-1]:null,g=this.draw.computeRowList({...n,resume:{startIndex:l,state:u,preRowLastElement:h?.elementList[h.elementList.length-1],shouldAbort:(t,n)=>n-l>e.MAX_CASCADE_ELEMENT||this._isComplexElement(t)?(m=!0,!0):!1,converge:(e,n,r)=>{if(r<t.endIndex)return!1;let i=d.get(n);if(i==null)return!1;let a=this.snapshotMap.get(o[i]);return!a||!this._isStructuralEqual(e,a)?!1:(f=i,p=r,!0)}}});if(m)return null;let _=g.slice();_.length&&_[0].elementList.length===0&&_.shift();let v=f>=0;if(v){let e=_[_.length-1];if(!e||e.elementList.length!==1||e.elementList[0]!==r[p])return null;_.pop()}if(!_.length)return null;let y=v?f:o.length,b=[...o.slice(0,s),..._,...o.slice(y)];if(y<o.length){let e=p-l-(o[y].startIndex-l);for(let t=s+_.length;t<b.length;t++)b[t].startIndex+=e,b[t].rowIndex=b[t-1].rowIndex+1}return{rowList:b,firstChangedRow:b[s]}}observeLayout(){this.lastLayoutSignature=this.getLayoutSignature()}getLayoutSignature(){let e=this.draw.getOptions(),t=this.draw.getHeader(),n=this.draw.getFooter();return JSON.stringify({scale:e.scale,defaultSize:e.defaultSize,defaultTabWidth:e.defaultTabWidth,wordBreak:e.wordBreak,hangPunctuation:e.hangPunctuation,pageMode:e.pageMode,paperDirection:e.paperDirection,margins:e.margins,width:e.width,height:e.height,innerWidth:this.draw.getInnerWidth(),columnCount:this.draw.getColumnLayout()?.count||1,headerDisabled:e.header.disabled,headerElementCount:t?.getElementList().length??0,footerDisabled:e.footer.disabled,footerElementCount:n?.getElementList().length??0})}_findRowIndexOfElement(e,t){let n=0,r=e.length-1,i=-1;for(;n<=r;){let a=n+r>>1;e[a].startIndex<=t?(i=a,n=a+1):r=a-1}return i}_isComplexElement(e){return e.type===B.TABLE||e.type===B.PAGE_BREAK||e.type===B.BLOCK||e.type===B.SEPARATOR||e.type===B.IMAGE||e.type===B.LATEX||!!e.control||!!e.controlComponent||!!e.areaId||!!e.isControlMinWidthPlaceholder}_isStructuralEqual(e,t){if(e.direction!==t.direction||e.innerWidth!==t.innerWidth||e.startX!==t.startX||e.pageHeight!==t.pageHeight||e.column!==t.column||e.controlRealWidth!==t.controlRealWidth||e.margins[0]!==t.margins[0]||e.margins[1]!==t.margins[1]||e.margins[2]!==t.margins[2]||e.margins[3]!==t.margins[3]||e.listIndexMap.size!==t.listIndexMap.size)return!1;for(let[n,r]of e.listIndexMap)if(t.listIndexMap.get(n)!==r)return!1;return!0}static MAX_CASCADE_ELEMENT=2e3}})),H,U,ie,ae,W,G=o((()=>{H=function(e){return e.TEXT=`text`,e.SELECT=`select`,e.CHECKBOX=`checkbox`,e.RADIO=`radio`,e.DATE=`date`,e.NUMBER=`number`,e}({}),U=function(e){return e.PREFIX=`prefix`,e.POSTFIX=`postfix`,e.PRE_TEXT=`preText`,e.POST_TEXT=`postText`,e.PLACEHOLDER=`placeholder`,e.VALUE=`value`,e.CHECKBOX=`checkbox`,e.RADIO=`radio`,e}({}),ie=function(e){return e.ROW_START=`rowStart`,e.VALUE_START=`valueStart`,e}({}),ae=function(e){return e.ACTIVE=`active`,e.INACTIVE=`inactive`,e}({}),W=function(e){return e.NUMBER=`number`,e.OPERATOR=`operator`,e.UTILITY=`utility`,e.EQUAL=`equal`,e}({})})),oe,se,ce=o((()=>{oe=function(e){return e.LEFT=`left`,e.CENTER=`center`,e.RIGHT=`right`,e}({}),se=function(e){return e.NONE=`none`,e.DOT=`dot`,e.HYPHEN=`hyphen`,e.UNDERLINE=`underline`,e}({})})),le,ue,de,fe,pe,me,he,ge,_e=o((()=>{D(),le=/[0-9.]/,ue=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,de=/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uD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uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,fe=RegExp(`${de.source}|${ue.source}`,`g`),pe=/[、,。?!;:……「」“”‘’*()【】〔〕〖〗〘〙〚〛《》———﹝﹞–—\\/·.,!?;:`~<>()[\]{}'"|]/,me=RegExp(`^[
|
|
14
|
+
]`),he=/[^0-9\+\-\.eE,]/,ge=/\s/}));function ve(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(this,r)},t)}}function ye(e,t){let n=0,r;return function(...i){let a=Date.now();a-n>=t?(window.clearTimeout(r),e.apply(this,i),n=a):(window.clearTimeout(r),r=window.setTimeout(()=>{e.apply(this,i),n=a},t))}}function K(e){if(typeof structuredClone==`function`)return structuredClone(e);if(!e||typeof e!=`object`)return e;let t={};return Array.isArray(e)?t=e.map(e=>K(e)):Object.keys(e).forEach(n=>{t[n]=K(e[n])}),t}function be(e){return e&&e.nodeType===1&&e.tagName.toLowerCase()===`body`}function xe(e,t,n){if(e&&!be(e))for(e=n?e:e.parentNode;e;){if(!t||t(e)||be(e))return t&&!t(e)&&be(e)?null:e;e=e.parentNode}return null}function q(){function e(){return((1+Math.random())*65536|0).toString(16).substring(1)}return e()+e()+`-`+e()+`-`+e()+`-`+e()+`-`+e()+e()+e()}function Se(e){let t=[];if(Intl.Segmenter){let n=new Intl.Segmenter().segment(e);for(let{segment:e}of n)t.push(e)}else{let n=new Map;for(let t of e.matchAll(fe))n.set(t.index,t[0]);let r=0;for(;r<e.length;){let i=n.get(r);i?(t.push(i),r+=i.length):(t.push(e[r]),r++)}}return t}function Ce(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.click()}function we(e,t){Te(3,e,t)}function Te(e,t,n){let r=0,i=0;t.addEventListener(`click`,function(t){r=new Date().getTime()-i<300?r+1:0,i=new Date().getTime(),r>=e-1&&(n(t),r=0)})}function Ee(e){return Object.prototype.toString.call(e)===`[object Object]`}function De(e){return Array.isArray(e)}function Oe(e){return Object.prototype.toString.call(e)===`[object Number]`}function ke(e){return Object.prototype.toString.call(e)===`[object String]`}function Ae(e,t){if(Ee(e)&&Ee(t)){let n=t;for(let[t,r]of Object.entries(e))t!==`__proto__`&&t!==`constructor`&&t!==`prototype`&&(n[t]=n[t]?Ae(r,n[t]):r)}else De(e)&&De(t)&&t.push(...e);return t}function je(e){setTimeout(()=>{e()},0)}function Me(e){let t=[`零`,`一`,`二`,`三`,`四`,`五`,`六`,`七`,`八`,`九`],n=[``,`十`,`百`,`千`,`万`,`十`,`百`,`千`,`亿`,`十`,`百`,`千`,`万`,`十`,`百`,`千`,`亿`];if(!e||isNaN(e))return`零`;let r=e.toString().split(``),i=``;for(let e=0;e<r.length;e++){let a=r.length-1-e;i=`${n[e]}${i}`,i=`${t[Number(r[a])]}${i}`}return i=i.replace(/零(千|百|十)/g,`零`).replace(/十零/g,`十`),i=i.replace(/零+/g,`零`),i=i.replace(/零亿/g,`亿`).replace(/零万/g,`万`),i=i.replace(/亿万/g,`亿`),i=i.replace(/零+$/,``),i=i.replace(/^一十/g,`十`),i}function Ne(e,t,n){for(let r=0;r<e.length;r++){let i=e[r],a=t[i];a===void 0?delete n[i]:n[i]=a}}function Pe(e,t){if(t.length&&e.length)for(let n=e.length-1;n>=0;n--)t.includes(e[n])&&e.splice(n,1)}function Fe(e,t){let n={};for(let r in e)t.includes(r)&&(n[r]=e[r]);return n}function Ie(e,t){let n={};for(let r in e)t.includes(r)||(n[r]=e[r]);return n}function Le(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCharCode(e));return window.btoa(n.join(``))}function Re(e){let t=e.parentElement;for(;t;){let e=window.getComputedStyle(t).getPropertyValue(`overflow-y`);if(t.scrollHeight>t.clientHeight&&(e===`auto`||e===`scroll`))return t;t=t.parentElement}return document.documentElement}function ze(e,t){return e.length===t.length&&!e.some(e=>!t.includes(e))}function Be(e,t){if(!Ee(e)||!Ee(t))return!1;let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&!n.some(n=>t[n]!==e[n])}function Ve(e,t){let n=e.x,r=e.x+e.width,i=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,c=t.y,l=t.y+t.height;return!(n>s||r<o||i>l||a<c)}function He(e){return e==null}function Ue(e){return new Promise((t,n)=>{let r=new Image;r.onload=()=>t(r),r.onerror=n,r.src=e})}function We(e){return e.replace(/\r\n|\r/g,`
|
|
15
|
+
`)}function Ge(e,t,n=0){let r=Math.max(0,Math.floor(n));if(r>=e.length)return typeof t==`string`&&t===``?{index:e.length,length:0}:{index:-1,length:0};if(typeof t==`string`){if(t===``)return{index:r,length:0};let n=e.indexOf(t,r);return n===-1?{index:-1,length:0}:{index:n,length:t.length}}let i=t.flags,a=i.includes(`g`)?i:i+`g`,o=new RegExp(t.source,a);o.lastIndex=r;let s=o.exec(e);return s?{index:s.index,length:s[0].length}:{index:-1,length:0}}function Ke(e,t){if(!t){e.scrollTop=0;return}let n=[],r=t.offsetParent;for(;r&&e!==r&&e.contains(r);)n.push(r),r=r.offsetParent;let i=t.offsetTop+n.reduce((e,t)=>e+t.offsetTop,0),a=i+t.offsetHeight,o=e.scrollTop,s=o+e.clientHeight;i<o?e.scrollTop=i:a>s&&(e.scrollTop=a-e.clientHeight)}var J=o((()=>{_e()})),qe,Je=o((()=>{qe=class e{static sandbox=[`allow-scripts`,`allow-same-origin`];static allow=[`fullscreen`];element;iframe=null;isReadonly;constructor(e){this.element=e,this.isReadonly=!1}getIframe(){return this.iframe}_defineIframeProperties(e){Object.defineProperties(e,{parent:{get:()=>null},__POWERED_BY_CANVAS_EDITOR__:{get:()=>!0}})}render(t){let{iframeBlock:n}=this.element.block||{},r=document.createElement(`iframe`);r.setAttribute(`data-id`,this.element.id),r.sandbox.add(...n?.sandbox||e.sandbox),r.setAttribute(`allow`,[n?.allow||e.allow].join(` `)),r.style.border=`none`,r.style.width=`100%`,r.style.height=`100%`,n?.src?r.src=n.src:n?.srcdoc&&(r.srcdoc=n.srcdoc),t.append(r),this._defineIframeProperties(r.contentWindow),this.iframe=r}setReadonly(e){this.iframe&&this.isReadonly!==e&&(this.isReadonly=e,e?(this.iframe.style.pointerEvents=`none`,this.iframe.setAttribute(`tabindex`,`-1`)):(this.iframe.style.pointerEvents=``,this.iframe.removeAttribute(`tabindex`)))}}})),Ye,Xe,Ze,Qe=o((()=>{Ye=`editor-component`,Xe=`ce-clipboard`,Ze={print:{imagePreviewerDisabled:!1,backgroundDisabled:!1,filterEmptyControl:!0,areaHideDisabled:!1},readonly:{imagePreviewerDisabled:!1},form:{controlDeletableDisabled:!1}}})),$e,et=o((()=>{Qe(),V(),J(),$e=class{draw;options;imageCache;pendingImageMap;container;floatImageContainer;floatImage;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.imageCache=new Map,this.pendingImageMap=new Map,this.floatImageContainer=null,this.floatImage=null}getOriginalMainImageList(){let e=[],t=n=>{for(let r of n)if(r.type===B.TABLE){let e=r.trList;for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.tdList.length;e++){let n=r.tdList[e];t(n.value)}}}else r.type===B.IMAGE&&e.push(r)};return t(this.draw.getOriginalMainElementList()),e}_countImagesBeforeTarget(e,t){let n=0;for(let r of e){if(r===t)return-1;if(r.type===B.TABLE){let e=r.trList;for(let r of e)for(let e of r.tdList){let r=this._countImagesBeforeTarget(e.value,t);if(r<0)return-1;n+=r}}else r.type===B.IMAGE&&n++}return n}createFloatImage(e){let{scale:t}=this.options,n=this.floatImageContainer,r=this.floatImage;n||(n=document.createElement(`div`),n.classList.add(`ce-float-image`),this.container.append(n),this.floatImageContainer=n),r||(r=document.createElement(`img`),n.append(r),this.floatImage=r),n.style.display=`none`,r.style.width=`${e.width*t}px`,r.style.height=`${e.height*t}px`;let{x:i,y:a}=this.draw.getPageOffset(this.draw.getPageNo()),o=this.draw.getPosition(),s=o.getFloatPositionByElement(e);if(!s)return;let{x:c,y:l}=o.getFloatPositionCoordinate(s);n.style.left=`${c+i}px`,n.style.top=`${a+l}px`,r.src=e.value}dragFloatImage(e,t){if(!this.floatImageContainer)return;this.floatImageContainer.style.display=`block`;let n=parseFloat(this.floatImageContainer.style.left)+e,r=parseFloat(this.floatImageContainer.style.top)+t;this.floatImageContainer.style.left=`${n}px`,this.floatImageContainer.style.top=`${r}px`}destroyFloatImage(){this.floatImageContainer&&(this.floatImageContainer.style.display=`none`)}addImageObserver(e){this.draw.getImageObserver().add(e)}getFallbackImage(e,t){let n=`<svg xmlns="http://www.w3.org/2000/svg" width="${e}" height="${t}" viewBox="0 0 ${e} ${t}">
|
|
16
|
+
<rect width="${e}" height="${t}" fill="url(#mosaic)" />
|
|
17
|
+
<defs>
|
|
18
|
+
<pattern id="mosaic" x="${(e-Math.ceil(e/8)*8)/2}" y="${(t-Math.ceil(t/8)*8)/2}" width="16" height="16" patternUnits="userSpaceOnUse">
|
|
19
|
+
<rect width="8" height="8" fill="#cccccc" />
|
|
20
|
+
<rect width="8" height="8" fill="#cccccc" transform="translate(8, 8)" />
|
|
21
|
+
</pattern>
|
|
22
|
+
</defs>
|
|
23
|
+
</svg>`,r=new Image;return r.src=`data:image/svg+xml;base64,${Le(n)}`,r}_drawImageWithCrop(e,t,n,r,i,a,o){if(n.imgCrop){let{x:s,y:c,width:l,height:u}=n.imgCrop;e.drawImage(t,s,c,l,u,r,i,a,o)}else e.drawImage(t,r,i,a,o)}_renderCaption(e,t,n,r,i,a){if(!t.imgCaption?.value)return;let{scale:o,imgCaption:s}=this.options,c=t.imgCaption.value;if(c.includes(`{imageNo}`)){let e=this.draw.getOriginalMainElementList(),n=Math.max(this._countImagesBeforeTarget(e,t),0)+1;c=c.replace(/\{imageNo\}/g,String(n))}let l=(t.imgCaption.size||s.size)*o,u=t.imgCaption.font||s.font,d=t.imgCaption.color||s.color,f=`${l}px ${u}`;e.save(),e.font=f,e.fillStyle=d,e.textAlign=`center`;let p=c,m=this.draw.getTextMeasurer().measureText(c,f);if(m.width>i){let e=0,t=c.length;for(;e<t;){let n=Math.ceil((e+t)/2),r=c.substring(0,n);this.draw.getTextMeasurer().measureText(r+`...`,f).width<=i?e=n:t=n-1}p=c.substring(0,e)+`...`}let h=(t.imgCaption.top??s.top)*o,g=r+a+h+m.actualBoundingBoxAscent,_=n+i/2;e.fillText(p,_,g),e.restore()}render(e,t,n,r){let{scale:i}=this.options,a=t.width*i,o=t.height*i;if(this.imageCache.has(t.value)){let i=this.imageCache.get(t.value);this._drawImageWithCrop(e,i,t,n,r,a,o),this._renderCaption(e,t,n,r,a,o)}else{let e=this.draw.getRenderCount(),n=this.pendingImageMap.get(t.value);if(n){n.renderCount=e;return}let r={renderCount:e};this.pendingImageMap.set(t.value,r);let i=e=>{this.imageCache.set(t.value,e),this.pendingImageMap.delete(t.value),r.renderCount===this.draw.getRenderCount()&&this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})},s=new Promise((e,n)=>{let r=new Image;r.setAttribute(`crossOrigin`,`Anonymous`),r.src=t.value,r.onload=()=>{i(r),e(t)},r.onerror=e=>{let t=this.getFallbackImage(a,o);t.onload=()=>i(t),n(e)}});this.addImageObserver(s)}}}}));function tt(e){return it[e]??nt(e),it[e]}function nt(e){let t=at[e];if(t==null)return;let n=t.substring(3,5),r=1*n.charCodeAt(0)-rt,i=1*n.charCodeAt(1)-rt,a=t.substring(5),o=[[]],s=1/0,c=-1/0,l=1/0,u=-1/0,d=0;for(;d<a.length;){let e=a.substring(d,d+2);if(e==` R`)o.push([]);else{let t=e.charCodeAt(0)-rt-r,n=e.charCodeAt(1)-rt;s=Math.min(n,s),c=Math.max(n,c),l=Math.min(t,l),u=Math.max(t,u),o[o.length-1].push([t,n])}d+=2}it[e]={w:i-r,xmin:l,xmax:u,ymin:s,ymax:c,polylines:o}}var rt,it,at,ot=o((()=>{rt=82,it={},at={1:` 9MWRMNV RRMVV RPSTS`,2:` 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV`,3:` 11MXVNTMRMPNOPOSPURVTVVU`,4:` 12MWOMOV ROMRMTNUPUSTURVOV`,5:` 12MWOMOV ROMUM ROQSQ ROVUV`,6:` 9MVOMOV ROMUM ROQSQ`,7:` 15MXVNTMRMPNOPOSPURVTVVUVR RSRVR`,8:` 9MWOMOV RUMUV ROQUQ`,9:` 3PTRMRV`,10:` 7NUSMSTRVPVOTOS`,11:` 9MWOMOV RUMOS RQQUV`,12:` 6MVOMOV ROVUV`,13:` 12LXNMNV RNMRV RVMRV RVMVV`,14:` 9MWOMOV ROMUV RUMUV`,15:` 14MXRMPNOPOSPURVSVUUVSVPUNSMRM`,16:` 10MWOMOV ROMSMUNUQSROR`,17:` 17MXRMPNOPOSPURVSVUUVSVPUNSMRM RSTVW`,18:` 13MWOMOV ROMSMUNUQSROR RRRUV`,19:` 13MWUNSMQMONOOPPTRUSUUSVQVOU`,20:` 6MWRMRV RNMVM`,21:` 9MXOMOSPURVSVUUVSVM`,22:` 6MWNMRV RVMRV`,23:` 12LXNMPV RRMPV RRMTV RVMTV`,24:` 6MWOMUV RUMOV`,25:` 7MWNMRQRV RVMRQ`,26:` 9MWUMOV ROMUM ROVUV`,27:` 9MWRMNV RRMVV RPSTS`,28:` 16MWOMOV ROMSMUNUPSQ ROQSQURUUSVOV`,29:` 6MVOMOV ROMUM`,30:` 9MWRMNV RRMVV RNVVV`,31:` 12MWOMOV ROMUM ROQSQ ROVUV`,32:` 9MWUMOV ROMUM ROVUV`,33:` 9MWOMOV RUMUV ROQUQ`,34:` 20MXRMPNOPOSPURVSVUUVSVPUNSMRM RQQTR RTQQR`,35:` 3PTRMRV`,36:` 9MWOMOV RUMOS RQQUV`,37:` 6MWRMNV RRMVV`,38:` 12LXNMNV RNMRV RVMRV RVMVV`,39:` 9MWOMOV ROMUV RUMUV`,40:` 12MWOMUM RPQTR RTQPR ROVUV`,41:` 14MXRMPNOPOSPURVSVUUVSVPUNSMRM`,42:` 9MWOMOV RUMUV ROMUM`,43:` 10MWOMOV ROMSMUNUQSROR`,44:` 10MWOMRQOV ROMUM ROVUV`,45:` 6MWRMRV RNMVM`,46:` 15MWNONNOMPMQNRPRV RVOVNUMTMSNRP`,47:` 13LXRMRV RPONPNSPTTTVSVPTOPO`,48:` 6MWOMUV RUMOV`,49:` 12LXRMRV RNOOPOSQTSTUSUPVO`,50:` 13MXOVQVOROPPNRMSMUNVPVRTVVV`,200:` 12MWRMPNOPOSPURVTUUSUPTNRM`,201:` 4MWPORMRV`,202:` 9MWONQMSMUNUPTROVUV`,203:` 15MWONQMSMUNUPSQ RRQSQURUUSVQVOU`,204:` 7MWSMSV RSMNSVS`,205:` 14MWPMOQQPRPTQUSTURVQVOU RPMTM`,206:` 14MWTMRMPNOPOSPURVTUUSTQRPPQOS`,207:` 6MWUMQV ROMUM`,208:` 19MWQMONOPQQSQUPUNSMQM RQQOROUQVSVUUURSQ`,209:` 14MWUPTRRSPROPPNRMTNUPUSTURVPV`,210:` 6PURURVSVSURU`,211:` 7PUSVRVRUSUSWRY`,212:` 12PURPRQSQSPRP RRURVSVSURU`,213:` 13PURPRQSQSPRP RSVRVRUSUSWRY`,214:` 12PURMRR RSMSR RRURVSVSURU`,215:` 17NWPNRMSMUNUPRQRRSRSQUP RRURVSVSURU`,216:` 3PTRMRQ`,217:` 6NVPMPQ RTMTQ`,218:` 10NVQMPNPPQQSQTPTNSMQM`,219:` 16MWUNSMQMONOPQQTRUSUUSVQVOU RRLRW`,220:` 3MWVLNW`,221:` 7OVTLRNQPQSRUTW`,222:` 7NUPLRNSPSSRUPW`,223:` 3PTRLRW`,224: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RWR`,754:` 26MWMRMQNOONQMSMUNVOWQWR RPNTN ROOUO RNPVP RNQVQ RMRWR`,755:` 14LRLFLRRRLF RLIPQ RLLOR RLOMQ`,756:` 10MWRKQMOPMR RRKSMUPWR`,757:` 11MWWRWQVOUNSMQMONNOMQMR`,758:` 13G]]R]P\\MZJWHTGPGMHJJHMGPGR`,759:` 11MWMRMSNUOVQWSWUVVUWSWR`,760:` 7LXLPNRQSSSVRXP`,761:` 6RURUTTURTPRO`,762:` 7RVRRUPVNVLUKTK`,763:` 7NRRROPNNNLOKPK`,764:` 21MWWHVGTFQFOGNHMJMLNNOOUSVTWVWXVZU[S\\P\\N[MZ`,765:` 21G]IWHVGTGQHOINKMMMONPOTUUVWWYW[V\\U]S]P\\N[M`,766:` 31G]RRTUUVWWYW[V\\U]S]Q\\O[NYMWMUNTOPUOVMWKWIVHUGSGQHOINKMMMONPORR`,767:` 22H\\KFK[ RHF[FQP[Z RZV[Y\\[ RZVZY RWYZY RWYZZ\\[`,768:" 30KYUARBPCNELHKLKRLUNWQXSXVWXUYR RKPLMNKQJSJVKXMYPYVXZV]T_R`Oa",796:` 3>f>RfR`,797:" 3D`D``D",798:` 3RRR>Rf`,799:" 3D`DD``",800:" 3D`DR`R",801:` 3F^FY^K`,802:` 3KYK^YF`,803:" 3RRRDR`",804:` 3KYKFY^`,805:` 3F^FK^Y`,806:` 3KYKRYR`,807:` 3MWMWWM`,808:` 3RRRKRY`,809:` 3MWMMWW`,810:` 8GRRGPGMHJJHMGPGR`,811:` 8GRGRGTHWJZM\\P]R]`,812:` 8R]R]T]W\\ZZ\\W]T]R`,813:` 8R]]R]P\\MZJWHTGRG`,814:" 9D`DOGQKSPTTTYS]Q`O",815:" 9PUUDSGQKPPPTQYS]U`",816:" 9OTODQGSKTPTTSYQ]O`",817:" 9D`DUGSKQPPTPYQ]S`U",818:` 5KYRJYNKVRZ`,819:` 5JZJRNKVYZR`,820:` 5KYKVKNYVYN`,821:` 5JZLXJPZTXL`,822:` 23JZJ]L]O\\Q[TXUVVSVOULTJSIQIPJOLNONSOVPXS[U\\X]Z]`,823:` 23I]]Z]X\\U[SXPVOSNONLOJPIQISJTLUOVSVVUXT[Q\\O]L]J`,824:` 23JZZGXGUHSIPLONNQNUOXPZQ[S[TZUXVUVQUNTLQIOHLGJG`,825:` 23G[GJGLHOIQLTNUQVUVXUZT[S[QZPXOUNQNNOLPISHUGXGZ`,826:` 21E[EPFRHTJUMVQVUUXSZP[NZLWLSMQNNPLSKVKYL\\M^`,827:` 19EYETHVKWPWSVVTXQYNYLXKVKSLPNNQMTMYN\\P_`,828:` 26OUQOOQOSQUSUUSUQSOQO RQPPQPSQTSTTSTQSPQP RRQQRRSSRRQ`,829:` 11RWRMSMUNVOWQWSVUUVSWRW`,830:" 9D`DRJR RORUR RZR`R",831:" 5D`DUDO`O`U",832:` 6JZRDJR RRDZR`,833:" 9D`DR`R RJYZY RP`T`",834:" 9D`DR`R RDRRb R`RRb",840:` 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK`,841:` 6LXLLLXXXXLLL`,842:` 5KYRJKVYVRJ`,843:` 6LXRHLRR\\XRRH`,844:` 12JZRIPOJOOSMYRUWYUSZOTORI`,845:` 6KYRKRY RKRYR`,846:` 6MWMMWW RWMMW`,847:` 9MWRLRX RMOWU RWOMU`,850:` 35NVQNOONQNSOUQVSVUUVSVQUOSNQN ROQOS RPPPT RQOQU RRORU RSOSU RTPTT RUQUS`,851:` 27NVNNNVVVVNNN ROOOU RPOPU RQOQU RRORU RSOSU RTOTU RUOUU`,852:` 17MWRLMUWURL RROOT RROUT RRRQT RRRST`,853:` 17LULRUWUMLR RORTU RORTO RRRTS RRRTQ`,854:` 17MWRXWOMORX RRUUP RRUOP RRRSP RRRQP`,855:` 17OXXROMOWXR RURPO RURPU RRRPQ RRRPS`,856:` 22LXRLNWXPLPVWRL RRRRL RRRLP RRRNW RRRVW RRRXP`,857:` 11RYRKRY RRKYNRQ RSMVNSO`,860:` 13MW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NWRKRX RSKSX RPKUK RPXUX`,1010:` 19LXSKSURWQX RTKTUSWQXPXNWMUNTOUNV RQKVK`,1011:` 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX`,1012:` 14KXOKOX RPKPX RMKRK RMXWXWTVX`,1013:` 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX`,1014:` 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX`,1015:` 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK`,1016:` 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX`,1017:` 47KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RPWPUQTSTTUUZV[W[XZ RTUUXVZW[`,1018:` 37JZNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX RSRTSUWVXWXXW RSRUSVWWX`,1019:` 32KZVMWKWOVMULSKQKOLNMNOOPQQTRVSWT RNNOOQPTQVRWSWVVWTXRXPWOVNTNXOV`,1020:` 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX`,1021:` 20J[NKNUOWQXTXVWWUWK ROKOUPWQX RLKQK RUKYK`,1022:` 15KYMKRX RNKRU RWKRX RKKPK RTKYK`,1023:` 24I[LKOX RMKOT RRKOX RRKUX RSKUT RXKUX RJKOK RVKZK`,1024:` 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX`,1025:` 20LYNKRRRX ROKSR RWKSRSX RLKQK RTKYK RPXUX`,1026:` 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX`,1027:` 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX`,1028:` 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX`,1029:` 14KXOKOX RPKPX RMKWKWOVK RMXRX`,1030:` 15KYRKLX RRMWX RRKXX RMWVW RLXXX`,1031:` 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX`,1032:` 16LYVKNX RWKOX ROKNONKWK RNXWXWTVX`,1033:` 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX`,1034:` 44KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK RQOQT RTOTT RQQTQ RQRTR`,1035:` 12NWRKRX RSKSX RPKUK RPXUX`,1036:` 27JZNKNX ROKOX RWKOS RQQVX RRQWX RLKQK RTKYK RLXQX RTXYX`,1037:` 15KYRKMX RRNVX RRKWX RKXPX RTXYX`,1038:` 30I\\MKMX RNNRX RNKRU RWKRX RWKWX RXKXX RKKNK RWKZK RKXOX RUXZX`,1039:` 21JZNKNX ROMVX ROKVV RVKVX RLKOK RTKXK RLXPX`,1040:` 36JZMJLM RXJWM RPPOS RUPTS RMVLY RXVWY RMKWK RMLWL RPQTQ RPRTR RMWWW RMXWX`,1041:` 32KZQKOLNMMPMSNVOWQXTXVWWVXSXPWMVLTKQK RQKOMNPNSOVQX RTXVVWSWPVMTK`,1042:` 21J[NKNX ROKOX RVKVX RWKWX RLKYK RLXQX RTXYX`,1043:` 25JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXQX`,1044:` 20K[MKRQ RNKSQMX RMKWKXOVK RNWWW RMXWXXTVX`,1045:` 16KZRKRX RSKSX RNKMOMKXKXOWK RPXUX`,1046:` 33KZMONLOKPKQLRORX RXOWLVKUKTLSOSX RMONMOLPLQMRO RXOWMVLULTMSO RPXUX`,1047:` 40KZRKRX RSKSX RQNNOMQMRNTQUTUWTXRXQWOTNQN RQNOONQNROTQU RTUVTWRWQVOTN RPKUK RPXUX`,1048:` 21KZNKVX ROKWX RWKNX RLKQK RTKYK RLXQX RTXYX`,1049:` 33J[RKRX RSKSX RLPMONOOSQU RTUVSWOXOYP RMONROTQUTUVTWRXO RPKUK RPXUX`,1050:` 35KZMVNXQXMRMONMOLQKTKVLWMXOXRTXWXXV ROUNRNOOMQK RTKVMWOWRVU RNWPW RUWWW`,1051:` 18KYTKKX RSMTX RTKUX RNTTT RIXNX RRXWX`,1052:` 34JYPKLX RQKMX RNKUKWLWNVPSQ RUKVLVNUPSQ ROQRQTRUSUUTWQXJX RRQTSTUSWQX`,1053:` 25KXVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUU RRKPMOONRNVPX`,1054:` 26JYPKLX RQKMX RNKTKVLWNWQVTUVTWQXJX RTKULVNVQUTTVSWQX`,1055:` 22JYPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXTXUUSX`,1056:` 20JXPKLX RQKMX RSORS RNKXKWNWK ROQRQ RJXOX`,1057:` 33KYVLWLXKWNVLTKRKPLOMNOMRMUNWPXRXTWUVVS RRKPMOONRNVPX RRXTVUS RSSXS`,1058:` 27J[PKLX RQKMX RXKTX RYKUX RNKSK RVK[K ROQVQ RJXOX RRXWX`,1059:` 12NWTKPX RUKQX RRKWK RNXSX`,1060:` 19LXUKRUQWPX RVKSURWPXOXMWLUMTNUMV RSKXK`,1061:` 27JZPKLX RQKMX RYKOR RRPTX RSPUX RNKSK RVK[K RJXOX RRXWX`,1062:` 14KXQKMX RRKNX ROKTK RKXUXVUTX`,1063:` 30I\\OKKX ROMPX RPKQV RYKPX RYKUX RZKVX RMKPK RYK\\K RIXMX RSXXX`,1064:` 21JZPKLX RPKTX RQKTU RXKTX RNKQK RVKZK RJXNX`,1065:` 32KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK`,1066:` 24JYPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RJXOX`,1067:` 46KYRKPLOMNOMRMUNWPXRXTWUVVTWQWNVLTKRK RRKPMOONRNVPX RRXTVUTVQVMTK ROWOVPUQURVRZS[T[UZ RRVSZT[`,1068:` 35JZPKLX RQKMX RNKUKWLXMXOWQTROR RUKWMWOVQTR RSRTWUXVXWW RSRTSUWVX RJXOX`,1069:` 28KZWLXLYKXNWLUKRKPLOMOOPPUSVT RONPOURVSVVUWSXPXNWMULXMWNW`,1070:` 16KZTKPX RUKQX RPKNNOKZKYNYK RNXSX`,1071:` 20J[PKMUMWOXSXUWVUYK RQKNUNWOX RNKSK RWK[K`,1072:` 15KYOKPX RPKQV RYKPX RMKRK RVK[K`,1073:` 24I[NKMX ROKNV RTKMX RTKSX RUKTV RZKSX RLKQK RXK\\K`,1074:` 21KZPKTX RQKUX RYKLX RNKSK RVK[K RJXOX RRXWX`,1075:` 20LYPKRQPX RQKSQ RYKSQQX RNKSK RVK[K RNXSX`,1076:` 16LYXKLX RYKMX RQKONPKYK RLXUXVUTX`,1101:` 32LZQOPPPQOQOPQOTOVQVWWXXX RTOUQUWWX RURRSPTOUOWPXSXTWUU RRSPUPWQX`,1102:` 29JYNKNX ROKOX RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLKOK`,1103:` 24LXVQUQURVRVQUPSOQOOPNRNUOWQXSXUWVV RQOPPOROUPWQX`,1104:` 32L[VKVX RWKWX RVRUPSOQOOPNRNUOWQXSXUWVU RQOPPOROUPWQX RTKWK RVXYX`,1105:` 26LXOSVSVRUPSOQOOPNRNUOWQXSXUWVV RUSUQSO RQOPPOROUPWQX`,1106:` 20LWTKULUMVMVLTKRKPMPX RRKQMQX RNOSO RNXSX`,1107:` 42LYQOOQOSQUSUUSUQSOQO RQOPQPSQU RSUTSTQSO RTPUOVO RPTOUOXPYTYVZ ROWPXTXVYV[T\\P\\N[NYPX`,1108:` 28J[NKNX ROKOX RORPPROTOVPWRWX RTOUPVRVX RLKOK RLXQX RTXYX`,1109:` 18NWRKRLSLSKRK RRORX RSOSX RPOSO RPXUX`,1110:` 23NWSKSLTLTKSK RSOSZR\\ RTOTZR\\P\\O[OZPZP[O[ RQOTO`,1111:` 27JZNKNX ROKOX RWOOU RRSVX RSSWX RLKOK RTOYO RLXQX RTXYX`,1112:` 12NWRKRX RSKSX RPKSK RPXUX`,1113:` 44F_JOJX RKOKX RKRLPNOPORPSRSX RPOQPRRRX RSRTPVOXOZP[R[X RXOYPZRZX RHOKO RHXMX RPXUX RXX]X`,1114:` 28J[NONX ROOOX RORPPROTOVPWRWX RTOUPVRVX RLOOO RLXQX RTXYX`,1115:` 28LYQOOPNRNUOWQXTXVWWUWRVPTOQO RQOPPOROUPWQX RTXUWVUVRUPTO`,1116:` 32JYNON\\ ROOO\\ RORPPROTOVPWRWUVWTXRXPWOU RTOUPVRVUUWTX RLOOO RL\\Q\\`,1117:` 29KYUOU\\ RVOV\\ RURTPROPONPMRMUNWPXRXTWUU RPOOPNRNUOWPX RS\\X\\`,1118:` 22KXOOOX RPOPX RPRQPSOUOVPVQUQUPVP RMOPO RMXRX`,1119:` 26LYTOUPUQVQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWOVPVPWQX`,1120:` 14LWPKPVRXTXUWUV RQKQVRX RNOTO`,1121:` 28J[NONUOWQXSXUWVU ROOOUPWQX RVOVX RWOWX RLOOO RTOWO RVXYX`,1122:` 15KYNORX ROORV RVORX RLOQO RTOXO`,1123:` 24I[LOOX RMOOU RROOX RROUX RSOUU RXOUX RJOOO RVOZO`,1124:` 21KYNOUX ROOVX RVONX RLOQO RTOXO RLXPX RSXXX`,1125:` 23KYNORX ROORV RVORXP[N\\M\\L[LZMZM[L[ RLOQO RTOXO`,1126:` 16LXUONX RVOOX ROONQNOVO RNXVXVVUX`,1127:` 32K[QOOPNQMSMUNWPXQXSWUUWRXO RQOOQNSNUOWPX RQOSOUPWWXX RSOTPVWXXYX`,1128:` 40KXRKPMOOMUK\\ RQLPNNTL\\ RRKTKVLVNUPRQ RTKULUNTPRQ RRQTRUTUVTWRXQXOWNT RRQSRTTTVRX`,1129:` 19KYLQNOPORPSSSXR\\ RLQNPPPRQSS RWOVRSXQ\\`,1130:` 39KYSOQOOPNQMSMUNWPXRXTWUVVTVRUPRNQLQKRJTJUKVM RQOOQNSNVPX RRXTVUTUQSO RQLRKTKVM`,1131:` 27LXVPTOQOOPOQPRRS RQOPPPQRS RRSOTNUNWPXSXUW RRSPTOUOWPX`,1132:` 28LWRKQLQMSNVNVMSNPOOPNRNTOVPWRXSYS[R\\P\\O[ RSNQOPPOROTPVRX`,1133:` 26IYJRKPLONOOPOQMX RMONPNQLX ROQPPROTOVPVRS\\ RTOUPURR\\`,1134:` 35IYJSKQLPNPOQOVPX RMPNQNUOWPXQXSWTVUTVQVNULTKRKQLQNRPURWS RQXSVTTUQUNTK`,1135:` 13NWROPVPWQXSXUWVU RSOQVQWRX`,1136:` 26KYOOLX RPOMX RUOVPWPVOTORQOR RORPSRWTXVWWU RORQSSWTX`,1137:` 15LXLKNKPLWX RNKOLVX RRPMX RRPNX`,1138:` 26KZOOK\\ RPOL\\ RNUNWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX`,1139:` 19JYNOMX ROONUMX RVRVOWOVRTUQWNXMX RLOOO`,1140:` 36MXRKQLQMSNVN RTNQOPPPRRSUS RTNROQPQRRS RSSPTOUOWQXSYTZT[S\\Q\\ RSSQTPUPWQX`,1141:` 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO`,1142:` 20IZPPMX RPPNX RTPSX RTPTX RKQMOXO RKQMPXP`,1143:` 29JXSOQOOPNQMSJ\\ RQOOQNSK\\ RSOUPVRVTUVTWRXPXNWMU RSOUQUTTVRX`,1144:` 28K[YOQOOPNQMSMUNWPXRXTWUVVTVRUPYP RQOOQNSNVPX RRXTVUTUQSO`,1145:` 14KZSPQX RSPRX RMQOOXO RMQOPXP`,1146:` 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP`,1147:` 35KZOPNQMSMUNWPXRXUWWUXRXPWOUOTPSRRUO\\ RMUNVPWRWUVWTXR RXQWPUPSR RRUQXP\\`,1148:` 17KXMONOPPS[T\\ RNOOPR[T\\U\\ RVOTRNYL\\`,1149:` 28I[TKQ\\ RUKP\\ RJRKPLONOOPOVPWSWUVWT RMONPNTOWPXSXUWWTXRYO`,1150:` 36JZNPPPPONPMQLSLUMWNXPXQWRUSR RLUNWPWRU RRRRWSXUXWVXTXRWPVOVPWP RRUSWUWWV`,1151:` 32KZVOTVTWUXWXXWYU RWOUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX`,1152:` 32JXOKMR RPKNRNVPX RNROPQOSOUPVRVTUVTWRXPXNWMUMR RSOUQUTTVRX RMKPK`,1153:` 22KXUPUQVQUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX`,1154:` 35KZWKTVTWUXWXXWYU RXKUVUWVX RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RUKXK`,1155:` 23KWNURTTSURUPSOQOOPNQMSMUNWPXRXTWUV RQOOQNSNVPX`,1156:` 23MXWKXLXKVKTLSNPYO[N\\ RVKULTNQYP[N\\L\\L[M\\ RPOVO`,1157:` 34KYVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX`,1158:` 29KZPKLX RQKMX ROQPPROTOVPVRUUUWVX RTOUPURTUTWUXWXXWYU RNKQK`,1159:` 26MWSKSLTLTKSK RNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU`,1160:` 26MWTKTLULUKTK RORPPQOSOTPTRRYQ[O\\M\\M[N\\ RROSPSRQYP[O\\`,1161:` 32KXPKLX RQKMX RVPUQVQVPUOTORQPROR RORPSQWRXTXUWVU RORQSRWSX RNKQK`,1162:` 16NVSKPVPWQXSXTWUU RTKQVQWRX RQKTK`,1163:` 46F^GRHPIOKOLPLQJX RJOKPKQIX RLQMPOOQOSPSQQX RQORPRQPX RSQTPVOXOZPZRYUYWZX RXOYPYRXUXWYX[X\\W]U`,1164:` 33J[KRLPMOOOPPPQNX RNOOPOQMX RPQQPSOUOWPWRVUVWWX RUOVPVRUUUWVXXXYWZU`,1165:` 28KXQOOPNQMSMUNWPXRXTWUVVTVRUPSOQO RQOOQNSNVPX RRXTVUTUQSO`,1166:` 35JYKRLPMOOOPPPQM\\ RNOOPOQL\\ RPQROTOVPWRWTVVUWSXQXOVOT RTOVQVTUVSX RJ\\O\\`,1167:` 28KYVOR\\ RWOS\\ RUSUQSOQOOPNQMSMUNWPXRXTV RQOOQNSNVPX RP\\U\\`,1168:` 22LXMRNPOOQORPRQPX RPOQPQQOX RRQSPUOVOWPWQVQWP`,1169:` 24LYVPVQWQVPTOQOOPORQSTTVU ROQQRTSVTVWTXQXOWNVOVOW`,1170:` 16NWSKPVPWQXSXTWUU RTKQVQWRX RPOUO`,1171:` 33IZJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVTWUXWXXWYU RWOUVUWVX`,1172:` 24JXKRLPMOOOPPPROUOWPX RNOOPORNUNWPXQXSWUUVRVOUOVP`,1173:` 37H\\IRJPKOMONPNRMUMWNX RLOMPMRLULWNXOXQWRV RTORVRWTX RUOSVSWTXUXWWYUZRZOYOZP`,1174:` 38JZMRNPPOROSPSR RQORPRRQUPWNXMXLWLVMVLW RXPWQXQXPWOVOTPSRRURWSX RQUQWRXTXVWWU`,1175:` 35IYJRKPLONOOPORNUNWOX RMONPNRMUMWOXQXSWTV RVOTVSYR[ RWOUVTYR[P\\M\\L[M[N\\`,1176:` 27KYWOWPVQNVMWMX RNQOOROUQ ROPRPUQVQ RNVOVRWUW ROVRXUXVV`,1177:` 39H[RKSLSMTMTLRKOKMLLNLX ROKNLMNMX RXKYLYMZMZLXKVKTMTX RVKUMUX RJOWO RJXOX RRXWX`,1178:` 29J[UKVLWLWKQKOLNNNX RQKPLONOX RVOVX RWOWX RLOWO RLXQX RTXYX`,1179:` 27J[WKQKOLNNNX RQKPLONOX RUKVLVX RWKWX RL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YVYWZX RIOZO`,1196:` 20MWNROPPOROSPSRRURWSX RQORPRRQUQWRXTXUWVU`,1200:` 28LYQKOLNONTOWQXTXVWWTWOVLTKQK RQKPLOOOTPWQX RTXUWVTVOULTK`,1201:` 10LYPNSKSX RRLRX ROXVX`,1202:` 35LYOMONNNNMOLQKTKVLWNVPTQQROSNUNX RTKULVNUPTQ RNWOVPVSWVWWV RPVSXVXWVWU`,1203:` 39LYOMONNNNMOLQKTKVLWNVPTQ RTKULVNUPTQ RRQTQVRWTWUVWTXQXOWNVNUOUOV RTQURVTVUUWTX`,1204:` 13LYSMSX RTKTX RTKMTXT RQXVX`,1205:` 33LYOKNQ ROKVK ROLSLVK RNQOPQOTOVPWRWUVWTXQXOWNVNUOUOV RTOUPVRVUUWTX`,1206:` 36LYVMVNWNWMVLTKRKPLOMNPNUOWQXTXVWWUWSVQTPQPNR RRKPMOPOUPWQX RTXUWVUVSUQTP`,1207:` 22LYNKNO RVMRTPX RWKTQQX RNMPKRKUM RNMPLRLUMVM`,1208:` 51LYQKOLNNOPQQTQVPWNVLTKQK RQKPLONPPQQ RTQUPVNULTK RQQORNTNUOWQXTXVWWUWTVRTQ RQQPROTOUPWQX RTXUWVUVTURTQ`,1209:` 36LYOVOUNUNVOWQXSXUWVVWSWNVLTKQKOLNNNPORQSTSWQ RSXUVVSVNULTK RQKPLONOPPRQS`,1210:` 6NVRVQWRXSWRV`,1211:` 8NVSWRXQWRVSWSYQ[`,1212:` 12NVROQPRQSPRO RRVQWRXSWRV`,1213:` 14NVROQPRQSPRO RSWRXQWRVSWSYQ[`,1214:` 15NVRKQLRSSLRK RRLRO RRVQWRXSWRV`,1215:` 29LYNNONOONONNOLQKTKVLWNWOVQSRRSRTST RTKVMVPUQSR RRWRXSXSWRW`,1216:` 6OVRKRP RSKRP`,1217:` 12LXOKOP RPKOP RUKUP RVKUP`,1218:` 10MWQKPLPNQOSOTNTLSKQK`,1219:` 9MWRJRP ROKUO RUKOO`,1220:` 3KZXHM\\`,1221:` 16MWUHSJQMPPPTQWSZU\\ RSJRLQPQTRXSZ`,1222:` 16MWOHQJSMTPTTSWQZO\\ RQJRLSPSTRXQZ`,1223:` 12MWPHP\\ RQHQ\\ RPHUH RP\\U\\`,1224:` 12MWSHS\\ RTHT\\ ROHTH RO\\T\\`,1225:` 38LWSHQIPJPLRNSP RQIPL RSNRQ RPJQLSNSPRQPRRSSTSVQXPZ RRSSV RPXQ[ RSTRVPXPZQ[S\\`,1226:` 38MXQHSITJTLRNQP RSITL RQNRQ RTJSLQNQPRQTRRSQTQVSXTZ RRSQV RTXS[ RQTRVTXTZS[Q\\`,1227:` 4MWTHPRT\\`,1228:` 4MWPHTRP\\`,1229:` 3OURHR\\`,1230:` 6MWPHP\\ RTHT\\`,1231:` 3I[LRXR`,1232:` 6I[RLRX RLRXR`,1233:` 9JZRMRX RMRWR RMXWX`,1234:` 9JZRMRX RMMWM RMRWR`,1235:` 6JZMMWW RWMMW`,1236:` 6NVRQQRRSSRRQ`,1237:` 15I[RLQMRNSMRL RLRXR RRVQWRXSWRV`,1238:` 6I[LPXP RLTXT`,1239:` 9I[WLMX RLPXP RLTXT`,1240:` 9I[LNXN RLRXR RLVXV`,1241:` 4JZWLMRWX`,1242:` 4JZMLWRMX`,1243:` 10JZWKMOWS RMTWT RMXWX`,1244:` 10JZMKWOMS RMTWT RMXWX`,1245:` 21H[YUWUUTTSRPQOONNNLOKQKRLTNUOUQTRSTPUOWNYN`,1246:` 16JZLTLRMPOPUSWSXR RLRMQOQUTWTXRXP`,1247:` 8JZMSRPWS RMSRQWS`,1248:` 7NVSKPO RSKTLPO`,1249:` 7NVQKTO RQKPLTO`,1250:` 14LXNKOMQNSNUMVK RNKONQOSOUNVK`,1251:` 8NVSLRMQLRKSLSNQP`,1252:` 8NVSKQMQORPSORNQO`,1253:` 8NVQLRMSLRKQLQNSP`,1254:` 8NVQKSMSORPQORNSO`,1256:` 11JZWMQMONNOMQMSNUOVQWWW`,1257:` 11JZMMMSNUOVQWSWUVVUWSWM`,1258:` 11JZMMSMUNVOWQWSVUUVSWMW`,1259:` 11JZMWMQNOONQMSMUNVOWQWW`,1260:` 14JZWMQMONNOMQMSNUOVQWWW RMRUR`,1261:` 13I[TOUPXRUTTU RUPWRUT RLRWR`,1262:` 13MWRMRX ROPPORLTOUP RPORMTO`,1263:` 13I[POOPLROTPU ROPMROT RMRXR`,1264:` 13MWRLRW ROTPURXTUUT RPURWTU`,1265:` 37KYVSUPSOQOOPNQMSMUNWPXRXTWUVVTWQWNVLTKQKPLQLRK RQOOQNSNVPX RRXTVUTVQVNULTK`,1266:` 15JZLKRX RMKRV RXKRX RLKXK RNLWL`,1267:` 10G[IOLORW RKORX R[FRX`,1268:` 26I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[`,1269:` 40I[XIXJYJYIXHVHTJSLROQUPYO[ RUITKSORUQXPZN\\L\\K[KZLZL[ RQNOONQNSOUQVSVUUVSVQUOSNQN`,1270:` 26H\\ZRYTWUVUTTSSQPPONNMNKOJQJRKTMUNUPTQSSPTOVNWNYOZQZR`,1271:` 26JZXKLX ROKPLPNOOMOLNLLMKOKSLVLXK RUTTUTWUXWXXWXUWTUT`,1272:` 41J[YPXPXQYQYPXOWOVPUTTVSWQXOXMWLVLTMSORRPSNSLRKPKOLONPQUWWXXXYW ROXMVMTOR RONPPVWWX`,1273:` 29J[UPSOQOPQPRQTSTUS RUOUSVTXTYRYQXNVLSKRKOLMNLQLRMUOWRXSXVW`,1274:` 34KZQHQ\\ RTHT\\ RWLVLVMWMWLUKPKNLNNOPVSWT RNNOOVRWTWVVWTXQXOWNVNUOUOVNV`,1275:` 12KYRKN\\ RVKR\\ RNQWQ RMVVV`,1276:` 40LXTLSLSMTMTLSKQKPLPNQPTRUS RPNQOTQUSUUSW RQPOROTPVSXTY ROTPUSWTYT[S\\Q\\P[PZQZQ[P[`,1277:` 29LXRKQLRMSLRK RRMRQ RRQQSRVSSRQ RRVR\\ RPOONNOOPPOTOUNVOUPTO`,1278:` 42LXRMSLRKQLRMRQQRSURV RRQSRQURVRZQ[R\\S[RZ RPOONNOOPPOTOUNVOUPTO RPXOWNXOYPXTXUWVXUYTX`,1279:` 12LYVKVX RNKVK RQQVQ RNXVX`,1281:` 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRQQRRSSRRQ`,1282:` 33LYQKPLPMQN RTKULUMTN RRNPOOQORPTRUSUUTVRVQUOSNRN RRURY RSUSY ROWVW`,1283:` 23LYRKPLONOOPQRRSRUQVOVNULSKRK RRRRX RSRSX ROUVU`,1284:` 24H\\QKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK RRKRY RKRYR`,1285:` 25JYRRPQOQMRLTLUMWOXPXRWSUSTRR RWMRR RRMWMWR RRMVNWR`,1286:` 25JZLLMKOKQLRNRPQRPSNT ROKPLQNQQPS RVKUX RWKTX RNTXT`,1287:` 27JYNKNU ROKNR RNROPQOSOUPVQVTTVTXUYVYWX RSOUQUTTV RLKOK`,1288:` 27LYONRKRQ RVNSKSQ RRQPROTOUPWRXSXUWVUVTURSQ RRTRUSUSTRT`,1289:` 27JZRKRY RMKMPNRPSTSVRWPWK RLMMKNM RQMRKSM RVMWKXM ROVUV`,1290:` 27JYNKNX ROKOX RLKSKVLWNWOVQSROR RSKULVNVOUQSR RLXVXVUUX`,1291:` 20LYWKTKQLONNQNSOVQXTYWY RWKTLRNQQQSRVTXWY`,1292:` 23JZRRPQOQMRLTLUMWOXPXRWSUSTRR RSLQQ RWMRR RXQSS`,1293:` 12KYPMTW RTMPW RMPWT RWPMT`,1294:` 34J[OUMULVLXMYOYPXPVNTMRMONMOLQKTKVLWMXOXRWTUVUXVYXYYXYVXUVU RNMPLULWM`,1295:` 34J[OOMOLNLLMKOKPLPNNPMRMUNWOXQYTYVXWWXUXRWPUNULVKXKYLYNXOVO RNWPXUXWW`,1401:` 21F^KHK\\ RLHL\\ RXHX\\ RYHY\\ RHH\\H RH\\O\\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QNROSNRM RR[QZRYSZS\\R^Q_`,2214:` 15MWRFQHRTSHRF RRHRN RRYQZR[SZRY`,2215:` 32I[MJNKMLLKLJMHNGPFSFVGWHXJXLWNVORQRT RSFUGVHWJWLVNTP RRYQZR[SZRY`,2216:` 6NVRFQM RSFQM`,2217:` 12JZNFMM ROFMM RVFUM RWFUM`,2218:` 14KYQFOGNINKOMQNSNUMVKVIUGSFQF`,2219:` 9JZRFRR RMIWO RWIMO`,2220:` 3G][BIb`,2221:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",2222:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",2223:` 12KYOBOb RPBPb ROBVB RObVb`,2224:` 12KYTBTb RUBUb RNBUB RNbUb`,2225:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",2226:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",2227:` 4KYUBNRUb`,2228:` 4KYOBVROb`,2229:` 3NVRBRb`,2230:` 6KYOBOb RUBUb`,2231:` 3E_IR[R`,2232:` 6E_RIR[ RIR[R`,2233:` 9F^RJR[ RJRZR RJ[Z[`,2234:` 9F^RJR[ RJJZJ RJRZR`,2235:` 6G]KKYY RYKKY`,2236:` 6MWRQQRRSSRRQ`,2237:` 15E_RIQJRKSJRI RIR[R RRYQZR[SZRY`,2238:` 6E_IO[O RIU[U`,2239:` 9E_YIK[ RIO[O RIU[U`,2240:` 9E_IM[M RIR[R RIW[W`,2241:` 4F^ZIJRZ[`,2242:` 4F^JIZRJ[`,2243:` 10F^ZFJMZT RJVZV RJ[Z[`,2244:` 10F^JFZMJT RJVZV RJ[Z[`,2245:` 21F_[WYWWVUTRPQOONMNKOJQJSKUMVOVQURTUPWNYM[M`,2246:` 24F^IU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` 48F^[ILIJJILINJPLQNQPPQNQLPJ[J RIMJOKPMQ RQMPKOJMI RIXXXZW[U[SZQXPVPTQSSSUTWIW R[TZRYQWP RSTTVUWWX`,2305:` 48F]OUMTLTJUIWIXJZL[M[OZPXPWOUJPINIKJILHOGSGWHYJZLZOYRVUUWUYV[X[YZZX RMSKPJNJKKILH RSGVHXJYLYOXRVU`,2306:` 48G_HKKHMKMV RJILLLV RMKPHRKRU ROIQLQU RRKUHWKW[ RTIVLV[ RWKZH[J\\M\\P[SZUXWUYP[ RYIZJ[M[PZSYUWWTYP[`,2307:` 41F^ISMSLRKOKMLJNHQGSGVHXJYMYOXRWS[S RITOTMRLOLMMJOHQG RSGUHWJXMXOWRUT[T RKXYX RKYYY`,2308:` 30F_GLJIMLMX RIJLMLX RMLPISLSX ROJRMRX RSLVIYLYW[Y RUJXMXXZZ]W`,2309:` 33G]ZIJY RZIWJQJ RXKUKQJ RZIYLYR RXKXNYR RQRJR RPSMSJR RQRQY RPSPVQY`,2310:` 33F^HOJKOU RJMOWRPWPZO[M[KZIXHWHUITKTMUPVRWUWXUZ RWHVIUKUMWQXTXWWYUZ`,2311:` 36F^IOLLPN RKMOORLUN RQMTOWLYN RVMXO[L RIULRPT RKSOURRUT RQSTUWRYT RVSXU[R`,2312:` 48F^JHNJPLQOQRPUNWJY RJHMIOJQLRO RRRQUOWMXJY RZHWIUJSLRO RRRSUUWWXZY RZHVJTLSOSRTUVWZY RIP[P RIQ[Q`,2317:` 12NVQQQSSSSQQQ RQQSS RSQQS`,2318:` 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY`,2319:` 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT`,2320:` 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR`,2321:` 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR`,2322:` 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT`,2323:` 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV`,2324:` 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV`,2325:` 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU`,2326:` 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L`,2327:` 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ`,2328:` 49JZMLWX RMLONQOTOVNWMWKUKUMTO RONTO RQOWM RVKVN RULWL RWXUVSUPUNVMWMYOYOWPU RUVPU RSUMW RNVNY RMXOX`,2329:` 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLWY`,2330:" 86A^GfHfIeIdHcGcFdFfGhIiKiNhPfQdR`RUQ;Q4R/S-U,V,X-Y/Y3X6W8U;P?JCHEFHEJDNDREVGYJ[N\\R\\V[XZZW[T[PZMYKWITHPHMIKKJNJRKUMW RGdGeHeHdGd RU;Q?LCIFGIFKENERFVGXJ[ RR\\U[WZYWZTZPYMXKVITH",2331:"103EfNSOUQVSVUUVSVQUOSNQNOONPMSMVNYP[S\\V\\Y[[Y\\W]T]P\\MZJXIUHRHOIMJKLIOHSHXI]KaMcPeTfYf]e`cba RKLJNIRIXJ\\L`NbQdUeYe]d_cba RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU RaLaNcNcLaL RbLbN RaMcM RaVaXcXcVaV RbVbX RaWcW",2332:" 30D`H@Hd RM@Md RW@Wd R\\@\\d RMMWK RMNWL RMOWM RMWWU RMXWV RMYWW",2367:` 12NVQQQSSSSQQQ RQQSS RSQQS`,2368:` 18JZMPQRTTVVWYW[V]U^ RMQST RMRPSTUVWWY`,2369:` 18JZWKVMTOPQMR RSPMS RUFVGWIWKVNTPQRMT`,2370:` 32H\\PMMNLOKQKSLUMVPWT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RTNVOWQWRVTUU RUUWVXXX[W]U_R` RUVWW RSVTVVWWYW\\V^",3429:" 62J[PIOLNNMOKP RPIPXQYO[ ROONOONOXNYOZPYOX RKPNPNXMYO[ RPPUMWNXPXRWTSV RUNWO RTNVOWQWRVTUU RUUWVXXX[W]U_R` RUVWW RSVTVVWWYW\\V^",3501:` 60G]LINGPFRFSGZW[X]X RQGRHYXZZ[YYX RNGPGQHXXYZZ[[[]X RLMMLOKPKQL RPLPM RMLOLPN RG[IYKXNXPY RJYNYOZ RG[JZMZN[PY RRJLX RNSVS`,3502:`110F^HHJFMFOGQF RKGNG RHHJGLHOHQF RMKLLKNKOIOHPHRIQKQKW RLMLU RIPLP RMKMTLVKW RRIQJPLPU RQKQS RRIRRQTPU RRIXFZG[I[KYMUO RXGZIZK RVGXHYIYLWN RWNZP[R[X RYPZRZW RWNXOYQYX RJ[MYPXTXWY RLZOYTYVZ RJ[NZSZU[WYYX[X RUOUX RURYR RUUYU`,3503:` 69E]NGLHJJILHOHSIVJXMZP[S[VZXYZW[U RJKINISKWNYQZTZWY RNGLIKKJNJRKUNXQYTYWXYW[U RPJPV RQJQT RRIRSQUPV RPJRIUFWGYGZF RTGVHXH RSHUIWIYHZF RWIWX`,3504:` 72G^IFWFYGZIZX RKGWGYIYW RIFJGLHWHXIXX ROKNLMNMOKOJPJRKQMQMV RNMNT RKPNP ROKOSNUMV RI[LYOXSXVY RKZNYSYUZ RI[MZRZT[VYXXZX RRHRX RRMTNVNXM RRSTRVRXS`,3505:` 94G]IHKFMFOGQF RLGNG RIHKGMHOHQF RNKMLLNLOJOIPIRJQLQLW RMMMU RJPMP RNKNTMVLW RQMRJSHTGVFXF[G RTHVGXGZH RRJSIUHWHYI[G RQURRSPTOVOXP RTPVPWQ RRRSQUQVRXP RK[NYRXWX[Y RMZPYWYZZ RK[OZVZY[[Y RQMQX`,3506:` 91F]JHLFOFQGSF RMGPG RJHLGNHQHSF RPKOLNNNOLOKPKRLQNQNV ROMOT RLPOP RP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ZY`,3703:` 57H\\LHMHOGPFRGVHXH ROHQG RLHNIPIRG RVHVO RWIWN RXHXOVOSPQQ RQPSQVRXRXY RWSWX RVRVY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY`,3704:` 41H\\UFKPKUTU RVUZU[V[TZU RLPLT RMNMU RTGTXRY RUJVHUGUYWZ RUFWHVJVXXYYY RRYSYUZV[WZYY`,3705:` 53H\\LFLO RLFXF RMGVG RLHUHWGXF RVLUMSNOOLO RSNTNVOVY RUMWNWX RVLWMYNZNXOXY RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY`,3706:` 59H\\LHLXJY RMIMXPZ RNHNXPYQZ RLHNHRGTFUGWHXH RSGUH RRGTIVIXH RNPOPSOUNVM RSOTOVPVY RUNWPWX RVMWNYOZOXPXY RJYLYNZO[QZVYXY`,3707:` 38H\\KHMFPGUGZF RLGOHTHWG RKHOIRIVHZF RZFYHWKSOQRPUPXQ[ RRQQTQWRZ RUMSPRSRVSYQ[`,3708:` 71H\\LILO RMJMN RNINO RLINISHUGVF RSHTHVIVO RUGWHWN RVFWGYHZHXIXO RLONOVRXR RXOVONRLR RLRLXJY RMSMXPZ RNRNXPYQZ RVRVY RWSWX RXRXY RJYLYNZO[QZVYXY`,3709:` 60H\\LHLQJR RMIMROS RNHNQPRQR RLHNHSGUF RSGTHVIVY RTGWIWX RUFVGXHZHXIXY RJRKRMSNTOSQRUQVQ RKYMXOXQYRZ ROYQZ RKYMYOZP[RZVYXY`,3710:` 11LXRXPZR[TZRX RRYQZSZRY`,3711:` 14LXR^R\\PZRXSZS\\R^P_ RRYQZR[RY`,3712:` 22LXRMPORPTORM RRNQOSORN RRXPZR[TZRX RRYQZSZRY`,3713:` 25LXRMPORPTORM RRNQOSORN RR^R\\PZRXSZS\\R^P_ RRYQZR[RY`,3714:` 30LXRFQGOHQIRT RRISHRGQHRIRT RRFSGUHSIRT RRXPZR[TZRX RRYQZSZRY`,3715:` 51I[LJMHNGQFSFVGWHXJXL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RPaNa RTVUWU^T`Sa"}}));function st(e,t=`math`){let n=e.charCodeAt(0);if(65<=n&&n<=90){let e=n-65;return t==`text`||t==`rm`?e+2001:t==`tt`?e+501:t==`bf`||t==`bb`?e+3001:t==`sf`?e+2501:t==`frak`?e+3301:t==`scr`||t==`cal`?e+2551:e+2051}if(97<=n&&n<=122){let e=n-97;return t==`text`||t==`rm`?e+2101:t==`tt`?e+601:t==`bf`||t==`bb`?e+3101:t==`sf`?e+2601:t==`frak`?e+3401:t==`scr`||t==`cal`?e+2651:e+2151}if(48<=n&&n<=57){let e=n-48;return t==`it`?e+2750:t==`bf`?e+3200:t==`tt`?e+700:e+2200}return{".":2210,",":2211,":":2212,";":2213,"!":2214,"?":2215,"'":2216,'"':2217,"*":2219,"/":2220,"-":2231,"+":2232,"=":2238,"<":2241,">":2242,"~":2246,"@":2273,"\\":804}[e]}var Y,ct=o((()=>{Y={"\\frac":{glyph:0,arity:2,flags:{}},"\\binom":{glyph:0,arity:2,flags:{}},"\\sqrt":{glyph:2267,arity:1,flags:{opt:!0,xfl:!0,yfl:!0}},"^":{glyph:0,arity:1,flags:{}},_:{glyph:0,arity:1,flags:{}},"(":{glyph:2221,arity:0,flags:{yfl:!0}},")":{glyph:2222,arity:0,flags:{yfl:!0}},"[":{glyph:2223,arity:0,flags:{yfl:!0}},"]":{glyph:2224,arity:0,flags:{yfl:!0}},"\\langle":{glyph:2227,arity:0,flags:{yfl:!0}},"\\rangle":{glyph:2228,arity:0,flags:{yfl:!0}},"|":{glyph:2229,arity:0,flags:{yfl:!0}},"\\|":{glyph:2230,arity:0,flags:{yfl:!0}},"\\{":{glyph:2225,arity:0,flags:{yfl:!0}},"\\}":{glyph:2226,arity:0,flags:{yfl:!0}},"\\#":{glyph:2275,arity:0,flags:{}},"\\$":{glyph:2274,arity:0,flags:{}},"\\&":{glyph:2273,arity:0,flags:{}},"\\%":{glyph:2271,arity:0,flags:{}},"\\begin":{glyph:0,arity:1,flags:{}},"\\end":{glyph:0,arity:1,flags:{}},"\\left":{glyph:0,arity:1,flags:{}},"\\right":{glyph:0,arity:1,flags:{}},"\\middle":{glyph:0,arity:1,flags:{}},"\\cdot":{glyph:2236,arity:0,flags:{}},"\\pm":{glyph:2233,arity:0,flags:{}},"\\mp":{glyph:2234,arity:0,flags:{}},"\\times":{glyph:2235,arity:0,flags:{}},"\\div":{glyph:2237,arity:0,flags:{}},"\\leqq":{glyph:2243,arity:0,flags:{}},"\\geqq":{glyph:2244,arity:0,flags:{}},"\\leq":{glyph:2243,arity:0,flags:{}},"\\geq":{glyph:2244,arity:0,flags:{}},"\\propto":{glyph:2245,arity:0,flags:{}},"\\sim":{glyph:2246,arity:0,flags:{}},"\\equiv":{glyph:2240,arity:0,flags:{}},"\\dagger":{glyph:2277,arity:0,flags:{}},"\\ddagger":{glyph:2278,arity:0,flags:{}},"\\ell":{glyph:662,arity:0,flags:{}},"\\vec":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overrightarrow":{glyph:2261,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\overleftarrow":{glyph:2263,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\bar":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\overline":{glyph:2231,arity:1,flags:{hat:!0,xfl:!0}},"\\widehat":{glyph:2247,arity:1,flags:{hat:!0,xfl:!0,yfl:!0}},"\\hat":{glyph:2247,arity:1,flags:{hat:!0}},"\\acute":{glyph:2248,arity:1,flags:{hat:!0}},"\\grave":{glyph:2249,arity:1,flags:{hat:!0}},"\\breve":{glyph:2250,arity:1,flags:{hat:!0}},"\\tilde":{glyph:2246,arity:1,flags:{hat:!0}},"\\underline":{glyph:2231,arity:1,flags:{mat:!0,xfl:!0}},"\\not":{glyph:2220,arity:1,flags:{}},"\\neq":{glyph:2239,arity:1,flags:{}},"\\ne":{glyph:2239,arity:1,flags:{}},"\\exists":{glyph:2279,arity:0,flags:{}},"\\in":{glyph:2260,arity:0,flags:{}},"\\subset":{glyph:2256,arity:0,flags:{}},"\\supset":{glyph:2258,arity:0,flags:{}},"\\cup":{glyph:2257,arity:0,flags:{}},"\\cap":{glyph:2259,arity:0,flags:{}},"\\infty":{glyph:2270,arity:0,flags:{}},"\\partial":{glyph:2265,arity:0,flags:{}},"\\nabla":{glyph:2266,arity:0,flags:{}},"\\aleph":{glyph:2077,arity:0,flags:{}},"\\wp":{glyph:2190,arity:0,flags:{}},"\\therefore":{glyph:740,arity:0,flags:{}},"\\mid":{glyph:2229,arity:0,flags:{}},"\\sum":{glyph:2402,arity:0,flags:{big:!0}},"\\prod":{glyph:2401,arity:0,flags:{big:!0}},"\\bigoplus":{glyph:2284,arity:0,flags:{big:!0}},"\\bigodot":{glyph:2281,arity:0,flags:{big:!0}},"\\int":{glyph:2412,arity:0,flags:{yfl:!0}},"\\oint":{glyph:2269,arity:0,flags:{yfl:!0}},"\\oplus":{glyph:1284,arity:0,flags:{}},"\\odot":{glyph:1281,arity:0,flags:{}},"\\perp":{glyph:738,arity:0,flags:{}},"\\angle":{glyph:739,arity:0,flags:{}},"\\triangle":{glyph:842,arity:0,flags:{}},"\\Box":{glyph:841,arity:0,flags:{}},"\\rightarrow":{glyph:2261,arity:0,flags:{}},"\\to":{glyph:2261,arity:0,flags:{}},"\\leftarrow":{glyph:2263,arity:0,flags:{}},"\\gets":{glyph:2263,arity:0,flags:{}},"\\circ":{glyph:902,arity:0,flags:{}},"\\bigcirc":{glyph:904,arity:0,flags:{}},"\\bullet":{glyph:828,arity:0,flags:{}},"\\star":{glyph:856,arity:0,flags:{}},"\\diamond":{glyph:743,arity:0,flags:{}},"\\ast":{glyph:728,arity:0,flags:{}},"\\log":{glyph:0,arity:0,flags:{txt:!0}},"\\ln":{glyph:0,arity:0,flags:{txt:!0}},"\\exp":{glyph:0,arity:0,flags:{txt:!0}},"\\mod":{glyph:0,arity:0,flags:{txt:!0}},"\\lim":{glyph:0,arity:0,flags:{txt:!0,big:!0}},"\\sin":{glyph:0,arity:0,flags:{txt:!0}},"\\cos":{glyph:0,arity:0,flags:{txt:!0}},"\\tan":{glyph:0,arity:0,flags:{txt:!0}},"\\csc":{glyph:0,arity:0,flags:{txt:!0}},"\\sec":{glyph:0,arity:0,flags:{txt:!0}},"\\cot":{glyph:0,arity:0,flags:{txt:!0}},"\\sinh":{glyph:0,arity:0,flags:{txt:!0}},"\\cosh":{glyph:0,arity:0,flags:{txt:!0}},"\\tanh":{glyph:0,arity:0,flags:{txt:!0}},"\\csch":{glyph:0,arity:0,flags:{txt:!0}},"\\sech":{glyph:0,arity:0,flags:{txt:!0}},"\\coth":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsin":{glyph:0,arity:0,flags:{txt:!0}},"\\arccos":{glyph:0,arity:0,flags:{txt:!0}},"\\arctan":{glyph:0,arity:0,flags:{txt:!0}},"\\arccsc":{glyph:0,arity:0,flags:{txt:!0}},"\\arcsec":{glyph:0,arity:0,flags:{txt:!0}},"\\arccot":{glyph:0,arity:0,flags:{txt:!0}},"\\text":{glyph:0,arity:1,flags:{}},"\\mathnormal":{glyph:0,arity:1,flags:{}},"\\mathrm":{glyph:0,arity:1,flags:{}},"\\mathit":{glyph:0,arity:1,flags:{}},"\\mathbf":{glyph:0,arity:1,flags:{}},"\\mathsf":{glyph:0,arity:1,flags:{}},"\\mathtt":{glyph:0,arity:1,flags:{}},"\\mathfrak":{glyph:0,arity:1,flags:{}},"\\mathcal":{glyph:0,arity:1,flags:{}},"\\mathbb":{glyph:0,arity:1,flags:{}},"\\mathscr":{glyph:0,arity:1,flags:{}},"\\rm":{glyph:0,arity:1,flags:{}},"\\it":{glyph:0,arity:1,flags:{}},"\\bf":{glyph:0,arity:1,flags:{}},"\\sf":{glyph:0,arity:1,flags:{}},"\\tt":{glyph:0,arity:1,flags:{}},"\\frak":{glyph:0,arity:1,flags:{}},"\\cal":{glyph:0,arity:1,flags:{}},"\\bb":{glyph:0,arity:1,flags:{}},"\\scr":{glyph:0,arity:1,flags:{}},"\\quad":{glyph:0,arity:0,flags:{}},"\\,":{glyph:0,arity:0,flags:{}},"\\.":{glyph:0,arity:0,flags:{}},"\\;":{glyph:0,arity:0,flags:{}},"\\!":{glyph:0,arity:0,flags:{}},"\\alpha":{glyph:2127,flags:{}},"\\beta":{glyph:2128,flags:{}},"\\gamma":{glyph:2129,flags:{}},"\\delta":{glyph:2130,flags:{}},"\\varepsilon":{glyph:2131,flags:{}},"\\zeta":{glyph:2132,flags:{}},"\\eta":{glyph:2133,flags:{}},"\\vartheta":{glyph:2134,flags:{}},"\\iota":{glyph:2135,flags:{}},"\\kappa":{glyph:2136,flags:{}},"\\lambda":{glyph:2137,flags:{}},"\\mu":{glyph:2138,flags:{}},"\\nu":{glyph:2139,flags:{}},"\\xi":{glyph:2140,flags:{}},"\\omicron":{glyph:2141,flags:{}},"\\pi":{glyph:2142,flags:{}},"\\rho":{glyph:2143,flags:{}},"\\sigma":{glyph:2144,flags:{}},"\\tau":{glyph:2145,flags:{}},"\\upsilon":{glyph:2146,flags:{}},"\\varphi":{glyph:2147,flags:{}},"\\chi":{glyph:2148,flags:{}},"\\psi":{glyph:2149,flags:{}},"\\omega":{glyph:2150,flags:{}},"\\epsilon":{glyph:2184,flags:{}},"\\theta":{glyph:2185,flags:{}},"\\phi":{glyph:2186,flags:{}},"\\varsigma":{glyph:2187,flags:{}},"\\Alpha":{glyph:2027,flags:{}},"\\Beta":{glyph:2028,flags:{}},"\\Gamma":{glyph:2029,flags:{}},"\\Delta":{glyph:2030,flags:{}},"\\Epsilon":{glyph:2031,flags:{}},"\\Zeta":{glyph:2032,flags:{}},"\\Eta":{glyph:2033,flags:{}},"\\Theta":{glyph:2034,flags:{}},"\\Iota":{glyph:2035,flags:{}},"\\Kappa":{glyph:2036,flags:{}},"\\Lambda":{glyph:2037,flags:{}},"\\Mu":{glyph:2038,flags:{}},"\\Nu":{glyph:2039,flags:{}},"\\Xi":{glyph:2040,flags:{}},"\\Omicron":{glyph:2041,flags:{}},"\\Pi":{glyph:2042,flags:{}},"\\Rho":{glyph:2043,flags:{}},"\\Sigma":{glyph:2044,flags:{}},"\\Tau":{glyph:2045,flags:{}},"\\Upsilon":{glyph:2046,flags:{}},"\\Phi":{glyph:2047,flags:{}},"\\Chi":{glyph:2048,flags:{}},"\\Psi":{glyph:2049,flags:{}},"\\Omega":{glyph:2050,flags:{}}}}));function lt(e){e=e.replace(/\n/g,` `);let t=0,n=[],r=``;for(;t<e.length;)e[t]==` `?r.length&&(n.push(r),r=``):e[t]==`\\`?r.length==1&&r[0]==`\\`?(r+=e[t],n.push(r),r=``):(r.length&&n.push(r),r=e[t]):/[A-Za-z0-9\.]/.test(e[t])?r+=e[t]:(r.length&&r!=`\\`&&(n.push(r),r=``),r+=e[t],n.push(r),r=``),t++;return r.length&&n.push(r),n}function ut(e){return{type:Y[e]?`symb`:`char`,mode:`math`,text:e,chld:[],bbox:null}}function dt(e){let t=0,n={type:`node`,text:``,mode:`math`,chld:[],bbox:null};function r(){if(e[t]!=`[`)return null;let n=0,r=t;for(;r<e.length;){if(e[r]==`[`)n++;else if(e[r]==`]`&&(n--,!n))break;r++}let i=dt(e.slice(t+1,r));return t=r,i}function i(n){let r=t,i=r,a=0,o=0,s=[];for(;r<e.length;){if(e[r]==`{`)a||(i=r),a++;else if(e[r]==`}`){if(a--,!a&&(s.push(dt(e.slice(i+1,r))),o++,o==n))break}else if(a==0&&(s.push(ut(e[r])),o++,o==n))break;r++}return t=r,s}for(t=0;t<e.length;t++){let a=Y[e[t]],o={type:``,text:e[t],mode:`math`,chld:[],bbox:null};if(a){if(a.arity){t++,o.type=`func`;let e=null;a.flags.opt&&(e=r(),e&&t++),o.chld=i(a.arity),e&&o.chld.push(e)}else o.type=`symb`}else e[t]==`{`?(o.type=`node`,o.text=``,o.chld=i(1)):o.type=`char`;n.chld.push(o)}return n.chld.length==1&&(n=n.chld[0]),n}function ft(e){let t=0;for(;t<e.length;){if(e[t].text==`\\begin`){let n;for(n=t;n<e.length&&e[n].text!=`\\end`;n++);let r=e.splice(t+1,n-(t+1));ft(r),e[t].text=e[t].chld[0].text,e[t].chld=r,e.splice(t+1,1)}t++}}function pt(e,t,n,r,i,a){if(n??=t,e.bbox){a&&(e.bbox.x*=t,e.bbox.y*=n),e.bbox.w*=t,e.bbox.h*=n;for(let r=0;r<e.chld.length;r++)pt(e.chld[r],t,n,0,0,!0);e.bbox.x+=r,e.bbox.y+=i}}function mt(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a=0;a<e.length;a++)e[a].bbox&&(t=Math.min(t,e[a].bbox.x),r=Math.min(r,e[a].bbox.y),n=Math.max(n,e[a].bbox.x+e[a].bbox.w),i=Math.max(i,e[a].bbox.y+e[a].bbox.h));return{x:t,y:r,w:n-t,h:i-r}}function ht(e){if(!e.length)return null;let t=mt(e);for(let n=0;n<e.length;n++)e[n].bbox&&(e[n].bbox.x-=t.x,e[n].bbox.y-=t.y);return{type:`node`,text:``,mode:`math`,chld:e,bbox:t}}function gt(e,t=`center`){for(let t=0;t<e.length;t++)if(e[t].text==`^`||e[t].text==`'`){let n=0,r=t;for(;r>0&&(e[r].text==`^`||e[r].text==`_`||e[r].text==`'`);)r--;n=e[r].bbox.y,e[t].text==`'`?e[t].bbox.y=n:(pt(e[t],xt.SUB_SUP_SCALE,null,0,0),Y[e[r].text]&&Y[e[r].text].flags.big?e[t].bbox.y=n-e[t].bbox.h:e[r].text==`\\int`?e[t].bbox.y=n:e[t].bbox.y=n-e[t].bbox.h/2)}else if(e[t].text==`_`){let n=1,r=t;for(;r>0&&(e[r].text==`^`||e[r].text==`_`||e[r].text==`'`);)r--;n=e[r].bbox.y+e[r].bbox.h,pt(e[t],xt.SUB_SUP_SCALE,null,0,0),Y[e[r].text]&&Y[e[r].text].flags.big?e[t].bbox.y=n:e[r].text==`\\int`?e[t].bbox.y=n-e[t].bbox.h:e[t].bbox.y=n-e[t].bbox.h/2}function n(t,n,r,i,a){let o=t,s=a,c=1/0,l=-1/0;for(;i>0?o<e.length:o>=0;){if(e[o].text==n)s++;else if(e[o].text==r){if(s--,s==0)break}else e[o].text==`^`||e[o].text==`_`||e[o].bbox&&(c=Math.min(c,e[o].bbox.y),l=Math.max(l,e[o].bbox.y+e[o].bbox.h));o+=i}return[c,l]}for(let t=0;t<e.length;t++)if(e[t].text==`\\left`){let[r,i]=n(t,`\\left`,`\\right`,1,0);r!=1/0&&i!=-1/0&&(e[t].bbox.y=r,pt(e[t],1,(i-r)/e[t].bbox.h,0,0))}else if(e[t].text==`\\right`){let[r,i]=n(t,`\\right`,`\\left`,-1,0);r!=1/0&&i!=-1/0&&(e[t].bbox.y=r,pt(e[t],1,(i-r)/e[t].bbox.h,0,0))}else if(e[t].text==`\\middle`){let[r,i]=n(t,`\\right`,`\\left`,-1,1),[a,o]=n(t,`\\left`,`\\right`,1,1),s=Math.min(r,a),c=Math.max(i,o);s!=1/0&&c!=-1/0&&(e[t].bbox.y=s,pt(e[t],1,(c-s)/e[t].bbox.h,0,0))}if(!e.some(e=>e.text==`&`||e.text==`\\\\`))return;let r=[],i=[],a=[];for(let t=0;t<e.length;t++)e[t].text==`&`?(i.push(a),a=[]):e[t].text==`\\\\`?(a.length&&(i.push(a),a=[]),r.push(i),i=[]):a.push(e[t]);a.length&&i.push(a),i.length&&r.push(i);let o=[],s=[];for(let e=0;e<r.length;e++){let t=[];for(let n=0;n<r[e].length;n++){let i=ht(r[e][n]);i&&(o[n]=o[n]||0,o[n]=Math.max(i.bbox.w+1,o[n])),t[n]=i}s.push(t)}let c=[];for(let e=0;e<s.length;e++){let t=1/0,n=-1/0;for(let r=0;r<s[e].length;r++)s[e][r]&&(t=Math.min(t,s[e][r].bbox.y),n=Math.max(n,s[e][r].bbox.y+s[e][r].bbox.h));c.push([t,n])}for(let e=0;e<c.length;e++)(c[e][0]==1/0||c[e][1]==1/0)&&(c[e][0]=e==0?0:c[e-1][1],c[e][1]=c[e][0]+2);for(let e=1;e<s.length;e++){let t=c[e-1][1]-c[e][0]+xt.LINE_SPACING;for(let n=0;n<s[e].length;n++)s[e][n]&&(s[e][n].bbox.y+=t);c[e][0]+=t,c[e][1]+=t}e.splice(0,e.length);for(let n=0;n<s.length;n++){let r=0;for(let i=0;i<s[n].length;i++){let a=s[n][i];a?(a.bbox.x+=r,r+=o[i]-a.bbox.w,t==`center`?a.bbox.x+=(o[i]-a.bbox.w)/2:t==`left`||(t==`right`||t==`equation`&&i!=s[n].length-1)&&(a.bbox.x+=o[i]-a.bbox.w),e.push(a)):r+=o[i]}}}function _t(e,t=`math`){let n={"\\text":`text`,"\\mathnormal":`math`,"\\mathrm":`rm`,"\\mathit":`it`,"\\mathbf":`bf`,"\\mathsf":`sf`,"\\mathtt":`tt`,"\\mathfrak":`frak`,"\\mathcal":`cal`,"\\mathbb":`bb`,"\\mathscr":`scr`,"\\rm":`rm`,"\\it":`it`,"\\bf":`bf`,"\\sf":`tt`,"\\tt":`tt`,"\\frak":`frak`,"\\cal":`cal`,"\\bb":`bb`,"\\scr":`scr`}[e.text]??t;if(!e.chld.length){if(Y[e.text]){if(Y[e.text].flags.big)e.bbox=e.text==`\\lim`?{x:0,y:0,w:3.5,h:2}:{x:0,y:-.5,w:3,h:3};else if(Y[e.text].flags.txt){let t=0;for(let n=1;n<e.text.length;n++)t+=tt(st(e.text[n],`text`)).w;t/=16,e.bbox={x:0,y:0,w:t,h:2}}else if(Y[e.text].glyph){let t=tt(Y[e.text].glyph).w;t/=16,e.bbox=e.text==`\\int`||e.text==`\\oint`?{x:0,y:-1.5,w:t,h:5}:{x:0,y:0,w:t,h:2}}else e.bbox={x:0,y:0,w:1,h:2}}else{let t=0;for(let r=0;r<e.text.length;r++)tt(st(e.text[r],n))&&(t+=n==`tt`?16:tt(st(e.text[r],n)).w);t/=16,e.bbox={x:0,y:0,w:t,h:2}}e.mode=n}else if(e.text==`\\frac`){let t=e.chld[0],n=e.chld[1],r=xt.FRAC_SCALE;_t(t),_t(n),t.bbox.x=0,t.bbox.y=0,n.bbox.x=0,n.bbox.y=0;let i=Math.max(t.bbox.w,n.bbox.w)*r;pt(t,r,null,(i-t.bbox.w*r)/2,0),pt(n,r,null,(i-n.bbox.w*r)/2,t.bbox.h+xt.FRAC_SPACING),e.bbox={x:0,y:-t.bbox.h+1-xt.FRAC_SPACING/2,w:i,h:t.bbox.h+n.bbox.h+xt.FRAC_SPACING}}else if(e.text==`\\binom`){let t=e.chld[0],n=e.chld[1];_t(t),_t(n),t.bbox.x=0,t.bbox.y=0,n.bbox.x=0,n.bbox.y=0;let r=Math.max(t.bbox.w,n.bbox.w);pt(t,1,null,(r-t.bbox.w)/2+1,0),pt(n,1,null,(r-n.bbox.w)/2+1,t.bbox.h),e.bbox={x:0,y:-t.bbox.h+1,w:r+2,h:t.bbox.h+n.bbox.h}}else if(e.text==`\\sqrt`){let t=e.chld[0];_t(t);let n=e.chld[1],r=0;n&&(_t(n),r=Math.max(n.bbox.w*xt.SQRT_MAG_SCALE-.5,0),pt(n,xt.SQRT_MAG_SCALE,null,0,.5)),pt(t,1,null,1+r,.5),e.bbox={x:0,y:2-t.bbox.h-.5,w:t.bbox.w+1+r,h:t.bbox.h+.5}}else if(Y[e.text]&&Y[e.text].flags.hat){let t=e.chld[0];_t(t);let n=t.bbox.y-.5;t.bbox.y=.5,e.bbox={x:0,y:n,w:t.bbox.w,h:t.bbox.h+.5}}else if(Y[e.text]&&Y[e.text].flags.mat){let t=e.chld[0];_t(t),e.bbox={x:0,y:0,w:t.bbox.w,h:t.bbox.h+.5}}else{let r=0,i=0,a=1;for(let o=0;o<e.chld.length;o++){let s=e.chld[o],c={"\\quad":2,"\\,":6/18,"\\:":8/18,"\\;":10/18,"\\!":-6/18}[s.text]??null;if(s.text==`\\\\`)i+=a,r=0,a=1;else if(s.text!=`&`){if(c!=null)r+=c;else{if(_t(s,n),pt(s,1,null,r,i),s.text==`^`||s.text==`_`||s.text==`'`){let t=o;for(;t>0&&(e.chld[t].text==`^`||e.chld[t].text==`_`||e.chld[t].text==`'`);)t--;let n=Y[e.chld[t].text]&&Y[e.chld[t].text].flags.big;if(s.text==`'`){let n=t+1,i=0;for(;n<o;)e.chld[n].text==`'`&&i++,n++;s.bbox.x=e.chld[t].bbox.x+e.chld[t].bbox.w+s.bbox.w*i,r=Math.max(r,s.bbox.x+s.bbox.w)}else if(n){let n=e.chld[t].bbox.x+(e.chld[t].bbox.w-s.bbox.w*xt.SUB_SUP_SCALE)/2;s.bbox.x=n,r=Math.max(r,e.chld[t].bbox.x+e.chld[t].bbox.w+(s.bbox.w*xt.SUB_SUP_SCALE-e.chld[t].bbox.w)/2)}else s.bbox.x=e.chld[t].bbox.x+e.chld[t].bbox.w,r=Math.max(r,s.bbox.x+s.bbox.w*xt.SUB_SUP_SCALE)}else r+=s.bbox.w;t==`text`&&(r+=1),a=Math.max(s.bbox.y+s.bbox.h-i,a)}}}i+=a;let o={bmatrix:[`[`,`]`],pmatrix:[`(`,`)`],Bmatrix:[`\\{`,`\\}`],cases:[`\\{`]},s={bmatrix:`center`,pmatrix:`center`,Bmatrix:`center`,cases:`left`,matrix:`center`,aligned:`equation`}[e.text]??`left`,c=!!o[e.text],l=!!o[e.text]&&o[e.text].length>1;gt(e.chld,s);let u=mt(e.chld);e.text==`\\text`&&(--u.x,u.w+=2);for(let t=0;t<e.chld.length;t++)pt(e.chld[t],1,null,-u.x+(c?1.5:0),-u.y);e.bbox={x:0,y:0,w:u.w+1.5*Number(c)+1.5*Number(l),h:u.h},c&&e.chld.unshift({type:`symb`,text:o[e.text][0],mode:e.mode,chld:[],bbox:{x:0,y:0,w:1,h:u.h}}),l&&e.chld.push({type:`symb`,text:o[e.text][1],mode:e.mode,chld:[],bbox:{x:u.w+2,y:0,w:1,h:u.h}}),(c||l||e.text==`matrix`)&&(e.type=`node`,e.text=``,e.bbox.y-=(e.bbox.h-2)/2)}}function vt(e){function t(e,n,r){let i=[];if(e.bbox){if(n+=e.bbox.x,r+=e.bbox.y,e.text==`\\frac`){let t=e.chld[1].bbox.y-(e.chld[0].bbox.y+e.chld[0].bbox.h),a={type:`symb`,mode:e.mode,text:`\\bar`,bbox:{x:n,y:r+(e.chld[1].bbox.y-t/2)-t/2,w:e.bbox.w,h:t},chld:[]};i.push(a)}else if(e.text==`\\sqrt`){let t=e.chld[0].bbox.y,a=Math.max(0,e.chld[0].bbox.x-e.chld[0].bbox.h/2),o={type:`symb`,mode:e.mode,text:`\\sqrt`,bbox:{x:n+a,y:r+t/2,w:e.chld[0].bbox.x-a,h:e.bbox.h-t/2},chld:[]};i.push(o),i.push({type:`symb`,text:`\\bar`,mode:e.mode,bbox:{x:n+e.chld[0].bbox.x,y:r,w:e.bbox.w-e.chld[0].bbox.x,h:t},chld:[]})}else if(e.text==`\\binom`){let t=Math.min(e.chld[0].bbox.x,e.chld[1].bbox.x),a={type:`symb`,mode:e.mode,text:`(`,bbox:{x:n,y:r,w:t,h:e.bbox.h},chld:[]};i.push(a),i.push({type:`symb`,text:`)`,mode:e.mode,bbox:{x:n+e.bbox.w-t,y:r,w:t,h:e.bbox.h},chld:[]})}else if(Y[e.text]&&Y[e.text].flags.hat){let t=e.chld[0].bbox.y,a={type:`symb`,mode:e.mode,text:e.text,bbox:{x:n,y:r,w:e.bbox.w,h:t},chld:[]};i.push(a)}else if(Y[e.text]&&Y[e.text].flags.mat){let t=e.chld[0].bbox.h,a={type:`symb`,text:e.text,mode:e.mode,bbox:{x:n,y:r+t,w:e.bbox.w,h:e.bbox.h-t},chld:[]};i.push(a)}else if(e.type!=`node`&&e.text!=`^`&&e.text!=`_`){let t={type:e.type==`func`?`symb`:e.type,text:e.text,mode:e.mode,bbox:{x:n,y:r,w:e.bbox.w,h:e.bbox.h},chld:[]};i.push(t)}}for(let a=0;a<e.chld.length;a++){let o=t(e.chld[a],n,r);i.push(...o)}return i}let n=t(e,-e.bbox.x,-e.bbox.y);e.type=`node`,e.text=``,e.chld=n}function yt(e){let t=[];for(let n=0;n<e.chld.length;n++){let r=e.chld[n],i=r.bbox.h/2,a=!1;if(Y[r.text]&&Y[r.text].flags.hat&&!Y[r.text].flags.xfl&&!Y[r.text].flags.yfl&&(i*=4,a=!0),Y[r.text]&&Y[r.text].glyph){let e=tt(Y[r.text].glyph);for(let n=0;n<e.polylines.length;n++){let o=[];for(let t=0;t<e.polylines[n].length;t++){let s=e.polylines[n][t][0],c=e.polylines[n][t][1];if(Y[r.text].flags.xfl)s=(s-e.xmin)/Math.max(e.xmax-e.xmin,1)*r.bbox.w,s+=r.bbox.x;else if(e.w/16*i>r.bbox.w)s=s/Math.max(e.w,1)*r.bbox.w,s+=r.bbox.x;else{s=s/16*i;let t=(r.bbox.w-e.w/16*i)/2;s+=r.bbox.x+t}if(Y[r.text].flags.yfl)c=(c-e.ymin)/Math.max(e.ymax-e.ymin,1)*r.bbox.h,c+=r.bbox.y;else{if(c=c/16*i,a){let t=(e.ymax+e.ymin)/2;c-=t/16*i}c+=r.bbox.y+r.bbox.h/2}o.push([s,c])}t.push(o)}}else if(Y[r.text]&&Y[r.text].flags.txt||r.type==`char`){let e=r.bbox.x,n=!!(Y[r.text]&&Y[r.text].flags.txt);for(let a=Number(n);a<r.text.length;a++){let o=tt(st(r.text[a],n?`text`:r.mode));if(!o)console.warn(`unmapped character: `+r.text[a]);else{for(let n=0;n<o.polylines.length;n++){let a=[];for(let t=0;t<o.polylines[n].length;t++){let s=o.polylines[n][t][0],c=o.polylines[n][t][1];s/=16,c/=16,s*=i,c*=i,r.mode==`tt`&&(o.w>16?s*=16/o.w:s+=(16-o.w)/2/16),s+=e,c+=r.bbox.y+r.bbox.h/2,a.push([s,c])}t.push(a)}r.mode==`tt`?e+=i:e+=o.w/16*i}}}}return t}function bt(e){return Math.round(e*100)/100}var xt,St,Ct=o((()=>{ot(),ct(),xt={SUB_SUP_SCALE:.5,SQRT_MAG_SCALE:.5,FRAC_SCALE:.85,LINE_SPACING:.5,FRAC_SPACING:.4},St=class{_latex;_tree;_tokens;_polylines;constructor(e){this._latex=e,this._tokens=lt(e),this._tree=dt(this._tokens),ft(this._tree.chld),_t(this._tree),vt(this._tree),this._polylines=yt(this._tree)}resolveScale(e){if(e==null)return[16,16,16,16];let t=e.SCALE_X??16,n=e.SCALE_Y??16;if(e.MIN_CHAR_H!=null){let r=0;for(let e=0;e<this._tree.chld.length;e++){let t=this._tree.chld[e];(t.type==`char`||Y[t.text]&&(Y[t.text].flags.txt||!Object.keys(Y[t.text].flags).length))&&(r=Math.min(t.bbox.h,r))}let i=Math.max(1,e.MIN_CHAR_H/r);t*=i,n*=i}if(e.MAX_W!=null){let r=t;t=Math.min(t,e.MAX_W/this._tree.bbox.w),n*=t/r}if(e.MAX_H!=null){let r=n;n=Math.min(n,e.MAX_H/this._tree.bbox.h),t*=n/r}return[e.MARGIN_X??t,e.MARGIN_Y??n,t,n]}polylines(e){e||={};let t=[],[n,r,i,a]=this.resolveScale(e);for(let e=0;e<this._polylines.length;e++){t.push([]);for(let o=0;o<this._polylines[e].length;o++){let[s,c]=this._polylines[e][o];t[t.length-1].push([n+s*i,r+c*a])}}return t}pathd(e){e||={};let t=``,[n,r,i,a]=this.resolveScale(e);for(let e=0;e<this._polylines.length;e++)for(let o=0;o<this._polylines[e].length;o++){let[s,c]=this._polylines[e][o];t+=o?`L`:`M`,t+=`${bt(n+s*i)} ${bt(r+c*a)}`}return t}svg(e){e||={};let[t,n,r,i]=this.resolveScale(e),a=bt(this._tree.bbox.w*r+t*2),o=bt(this._tree.bbox.h*i+n*2),s=`<svg
|
|
24
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
25
|
+
width="${a}" height="${o}"
|
|
26
|
+
fill="none" stroke="${e.FG_COLOR??`black`}" stroke-width="${e.STROKE_W??1}"
|
|
27
|
+
stroke-linecap="round" stroke-linejoin="round"
|
|
28
|
+
>`;e.BG_COLOR&&(s+=`<rect x="0" y="0" width="${a}" height="${o}" fill="${e.BG_COLOR}" stroke="none"></rect>`),s+=`<path d="`;for(let e=0;e<this._polylines.length;e++){s+=`M`;for(let a=0;a<this._polylines[e].length;a++){let[o,c]=this._polylines[e][a];s+=bt(t+o*r)+` `+bt(n+c*i)+` `}}return s+=`"/>`,s+=`</svg>`,{svg:`data:image/svg+xml;base64,${window.btoa(s)}`,width:Math.ceil(a),height:Math.ceil(o)}}pdf(e){e||={};let[t,n,r,i]=this.resolveScale(e),a=bt(this._tree.bbox.w*r+t*2),o=bt(this._tree.bbox.h*i+n*2),s=`%PDF-1.1\n%%¥±ë\n1 0 obj\n<< /Type /Catalog\n/Pages 2 0 R\n>>endobj
|
|
29
|
+
2 0 obj\n<< /Type /Pages\n/Kids [3 0 R]\n/Count 1\n/MediaBox [0 0 ${a} ${o}]\n>>\nendobj
|
|
30
|
+
3 0 obj\n<< /Type /Page\n/Parent 2 0 R\n/Resources\n<< /Font\n<< /F1\n<< /Type /Font
|
|
31
|
+
/Subtype /Type1\n/BaseFont /Times-Roman\n>>\n>>\n>>\n/Contents [`,c=``,l=4;for(let a=0;a<this._polylines.length;a++){c+=`${l} 0 obj \n<< /Length 0 >>\n stream\n 1 j 1 J ${e.STROKE_W??1} w\n`;for(let e=0;e<this._polylines[a].length;e++){let[s,l]=this._polylines[a][e];c+=`${bt(t+s*r)} ${bt(o-(n+l*i))} ${e?`l`:`m`} `}c+=`
|
|
32
|
+
S
|
|
33
|
+
endstream
|
|
34
|
+
endobj
|
|
35
|
+
`,s+=`${l} 0 R `,l++}return s+=`]
|
|
36
|
+
>>
|
|
37
|
+
endobj
|
|
38
|
+
`,c+=`
|
|
39
|
+
trailer
|
|
40
|
+
<< /Root 1 0 R
|
|
41
|
+
/Size 0
|
|
42
|
+
>>startxref
|
|
43
|
+
|
|
44
|
+
%%EOF
|
|
45
|
+
`,s+c}boxes(e){e||={};let[t,n,r,i]=this.resolveScale(e),a=[];for(let e=0;e<this._tree.chld.length;e++){let{x:o,y:s,w:c,h:l}=this._tree.chld[e].bbox;a.push({x:t+o*r,y:n+s*i,w:c*r,h:l*i})}return a}box(e){e||={};let[t,n,r,i]=this.resolveScale(e);return{x:t+this._tree.bbox.x*r,y:n+this._tree.bbox.y*i,w:this._tree.bbox.w*r,h:this._tree.bbox.h*i}}}})),wt,Tt=o((()=>{et(),Ct(),wt=class extends $e{latexDraw;pendingLaTexMap;constructor(e){super(e),this.latexDraw=e,this.pendingLaTexMap=new Map}static convertLaTextToSVG(e){return new St(e).svg({SCALE_X:10,SCALE_Y:10,MARGIN_X:0,MARGIN_Y:0})}render(e,t,n,r){let{scale:i}=this.options,a=t.width*i,o=t.height*i;if(this.imageCache.has(t.value)){let i=this.imageCache.get(t.value);e.drawImage(i,n,r,a,o)}else{let e=this.latexDraw.getRenderCount(),n=this.pendingLaTexMap.get(t.value);if(n){n.renderCount=e;return}let r={renderCount:e};this.pendingLaTexMap.set(t.value,r);let i=new Promise((e,n)=>{let i=new Image;i.src=t.laTexSVG,i.onload=()=>{this.imageCache.set(t.value,i),this.pendingLaTexMap.delete(t.value),r.renderCount===this.latexDraw.getRenderCount()&&this.latexDraw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),e(t)},i.onerror=e=>{this.pendingLaTexMap.delete(t.value),n(e)}});this.addImageObserver(i)}}}})),Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt=o((()=>{V(),Et=[`bold`,`color`,`highlight`,`font`,`size`,`italic`,`underline`,`strikeout`,`textDecoration`],Dt=[`rowFlex`,`rowMargin`,`spacingBefore`,`spacingAfter`,`indentLeft`,`indentRight`,`indentFirstLine`,`tabStops`],Ot=[`trace`],kt=[`hint`],At=[`rowFlex`,`rowMargin`,`spacingBefore`,`spacingAfter`,`indentLeft`,`indentRight`,`indentFirstLine`,`tabStops`,`level`,`title`],jt=[`type`,`font`,`size`,`bold`,`color`,`italic`,`highlight`,`underline`,`strikeout`,`rowFlex`,`url`,`areaId`,`hyperlinkId`,`dateId`,`dateFormat`,`groupIds`,`rowMargin`,`spacingBefore`,`spacingAfter`,`indentLeft`,`indentRight`,`indentFirstLine`,`tabStops`,`textDecoration`],Mt=`id.type.font.size.bold.color.italic.highlight.underline.strikeout.rowFlex.rowMargin.spacingBefore.spacingAfter.indentLeft.indentRight.indentFirstLine.tabStops.dashArray.trList.tableToolDisabled.borderType.borderColor.translateX.width.height.url.colgroup.valueList.control.checkbox.radio.dateFormat.block.level.title.listType.listStyle.listWrap.listLevel.groupIds.conceptId.imgDisplay.imgFloatPosition.imgToolDisabled.imgPreviewDisabled.imgCrop.imgCaption.textDecoration.extension.externalId.areaId.area.hide.label.labelId.lineWidth.trace.paperDirection.hint`.split(`.`),Nt=[`conceptId`,`extension`,`externalId`,`verticalAlign`,`backgroundColor`,`borderColor`,`borderWidth`,`borderTypes`,`slashTypes`,`disabled`,`deletable`],Pt=[`tdId`,`trId`,`tableId`],Ft=[`level`,`titleId`,`title`],It=[`listId`,`listType`,`listStyle`,`listLevel`],Lt=[`control`,`controlId`,`controlComponent`],Rt=[`font`,`size`,`bold`,`highlight`,`italic`,`strikeout`],zt=[`areaId`,`area`],Bt=[...Pt,...Ft,...It,...zt],Vt=[B.TEXT,B.HYPERLINK,B.SUBSCRIPT,B.SUPERSCRIPT,B.CONTROL,B.DATE],Ht=[B.IMAGE,B.LATEX],Ut=[B.BLOCK,B.PAGE_BREAK,B.SEPARATOR,B.TABLE],Wt=[`HR`,`TABLE`,`UL`,`OL`],Gt=[B.TITLE,B.LIST]})),qt,Jt,Yt,Xt=o((()=>{qt=function(e){return e.UL=`ul`,e.OL=`ol`,e}({}),Jt=function(e){return e.DISC=`disc`,e.CIRCLE=`circle`,e.SQUARE=`square`,e.CHECKBOX=`checkbox`,e}({}),Yt=function(e){return e.DISC=`disc`,e.CIRCLE=`circle`,e.SQUARE=`square`,e.DECIMAL=`decimal`,e.CHECKBOX=`checkbox`,e}({})})),Zt,Qt,$t,en,tn=o((()=>{Xt(),Zt={inheritStyle:!1},Qt={[Jt.DISC]:`•`,[Jt.CIRCLE]:`◦`,[Jt.SQUARE]:`▫︎`,[Jt.CHECKBOX]:`☑️`},$t={[qt.OL]:`ol`,[qt.UL]:`ul`},en={[Yt.DISC]:`disc`,[Yt.CIRCLE]:`circle`,[Yt.SQUARE]:`square`,[Yt.DECIMAL]:`decimal`,[Yt.CHECKBOX]:`checkbox`}})),nn,rn=o((()=>{nn=function(e){return e.FIRST=`first`,e.SECOND=`second`,e.THIRD=`third`,e.FOURTH=`fourth`,e.FIFTH=`fifth`,e.SIXTH=`sixth`,e}({})})),an,on,sn,cn,ln=o((()=>{rn(),an={defaultFirstSize:26,defaultSecondSize:24,defaultThirdSize:22,defaultFourthSize:20,defaultFifthSize:18,defaultSixthSize:16},on={[nn.FIRST]:`defaultFirstSize`,[nn.SECOND]:`defaultSecondSize`,[nn.THIRD]:`defaultThirdSize`,[nn.FOURTH]:`defaultFourthSize`,[nn.FIFTH]:`defaultFifthSize`,[nn.SIXTH]:`defaultSixthSize`},sn={[nn.FIRST]:1,[nn.SECOND]:2,[nn.THIRD]:3,[nn.FOURTH]:4,[nn.FIFTH]:5,[nn.SIXTH]:6},cn={H1:nn.FIRST,H2:nn.SECOND,H3:nn.THIRD,H4:nn.FOURTH,H5:nn.FIFTH,H6:nn.SIXTH}})),un,dn=o((()=>{un=function(e){return e.IFRAME=`iframe`,e.VIDEO=`video`,e}({})})),fn,pn=o((()=>{fn=function(e){return e.INSERTED=`inserted`,e.DELETED=`deleted`,e}({})})),mn,hn,gn,_n=o((()=>{mn=function(e){return e.ALL=`all`,e.EMPTY=`empty`,e.EXTERNAL=`external`,e.INTERNAL=`internal`,e.DASH=`dash`,e}({}),hn=function(e){return e.TOP=`top`,e.RIGHT=`right`,e.BOTTOM=`bottom`,e.LEFT=`left`,e}({}),gn=function(e){return e.FORWARD=`forward`,e.BACK=`back`,e}({})})),vn,yn,bn=o((()=>{vn=function(e){return e.CONTAIN=`contain`,e.COVER=`cover`,e}({}),yn=function(e){return e.REPEAT=`repeat`,e.NO_REPEAT=`no-repeat`,e.REPEAT_X=`repeat-x`,e.REPEAT_Y=`repeat-y`,e}({})})),xn,Sn=o((()=>{bn(),xn={color:`#FFFFFF`,image:``,size:vn.COVER,repeat:yn.NO_REPEAT,applyPageNumbers:[]}})),Cn,wn=o((()=>{Cn=function(e){return e.TOP=`top`,e.MIDDLE=`middle`,e.BOTTOM=`bottom`,e}({})})),Tn,En=o((()=>{x(),wn(),Tn={width:14,height:14,gap:5,lineWidth:1,fillStyle:`#ffffff`,strokeStyle:`#000000`,checkFillStyle:`#5175f4`,checkStrokeStyle:`#5175f4`,checkMarkColor:`#ffffff`,markType:b.CHECK,verticalAlign:Cn.BOTTOM}})),Dn,On=o((()=>{Dn={placeholderColor:`#9c9b9b`,bracketColor:`#000000`,prefix:`{`,postfix:`}`,borderWidth:1,borderColor:`#000000`,activeBackgroundColor:``,disabledBackgroundColor:``,existValueBackgroundColor:``,noValueBackgroundColor:``,errorBackgroundColor:`#FFECE8`}})),kn,An=o((()=>{kn={width:1,color:`#000000`,dragWidth:2,dragColor:`#0000FF`,dragFloatImageDisabled:!1}})),jn,Mn=o((()=>{x(),jn={bottom:30,inactiveAlpha:1,maxHeightRadio:m.HALF,disabled:!1,editable:!0,disabledPages:[]}})),Nn,Pn=o((()=>{Nn={opacity:.1,backgroundColor:`#E99D00`,activeOpacity:.5,activeBackgroundColor:`#E99D00`,disabled:!1,deletable:!0}})),Fn,In=o((()=>{x(),Fn={top:30,inactiveAlpha:1,maxHeightRadio:m.HALF,disabled:!1,editable:!0,disabledPages:[]}})),Ln,Rn=o((()=>{Ln={defaultColor:`#1976d2`,defaultBackgroundColor:`#e3f2fd`,defaultBorderRadius:4,defaultPadding:[4,4,4,4]}})),zn,Bn=o((()=>{zn={color:`#666666`,font:`Microsoft YaHei`,size:12,top:5}})),Vn,Hn=o((()=>{Vn={disabled:!0,color:`#CCCCCC`,lineWidth:1.5}})),Un,Wn=o((()=>{Un={font:`Microsoft YaHei`,fontSize:12,lineDash:[3,1]}})),Gn,Kn,qn=o((()=>{x(),k(),Gn={PAGE_NO:`{pageNo}`,PAGE_COUNT:`{pageCount}`},Kn={bottom:60,size:12,font:`Microsoft YaHei`,color:`#000000`,rowFlex:O.CENTER,format:Gn.PAGE_NO,numberType:h.ARABIC,disabled:!1,startPageNo:1,fromPageNo:0,maxPageNo:null}})),Jn,Yn=o((()=>{Jn={data:``,color:`#DCDFE6`,opacity:1,size:16,font:`Microsoft YaHei`}})),Xn,Zn=o((()=>{wn(),Xn={width:14,height:14,gap:5,lineWidth:1,fillStyle:`#5175f4`,strokeStyle:`#000000`,verticalAlign:Cn.BOTTOM}})),Qn,$n=o((()=>{Qn={lineWidth:1,strokeStyle:`#000000`}})),er,tr=o((()=>{er={tdPadding:[0,5,5,5],defaultTrMinHeight:42,defaultColMinWidth:40,defaultBorderColor:`#000000`,overflow:!1}})),nr,rr,ir=o((()=>{nr=function(e){return e.TEXT=`text`,e.IMAGE=`image`,e}({}),rr=function(e){return e.BOTTOM=`bottom`,e.TOP=`top`,e}({})})),ar,or=o((()=>{x(),ir(),ar={data:``,type:nr.TEXT,width:0,height:0,color:`#AEB5C0`,opacity:.3,size:200,font:`Microsoft YaHei`,repeat:!1,gap:[10,10],numberType:h.ARABIC,layer:rr.BOTTOM}})),sr,cr=o((()=>{sr={tipDisabled:!0}})),lr,ur=o((()=>{lr=function(e){return e.PAGE=`page`,e.CONTINUITY=`continuity`,e}({})})),dr,fr=o((()=>{ur(),dr={size:12,font:`Microsoft YaHei`,color:`#000000`,disabled:!0,right:20,type:lr.CONTINUITY}})),pr,mr=o((()=>{pr={disabled:!0,size:120,zoom:2,borderColor:`#efefef`}})),hr,gr=o((()=>{hr={disabled:!0}})),_r,vr=o((()=>{_r={count:1,gap:20,separator:!1,separatorColor:`#000000`,separatorWidth:1}})),yr,br=o((()=>{yr={disabled:!0,backgroundColor:`#fff`,color:`#000000`,fontSize:12,maxWidth:280}})),xr,Sr=o((()=>{xr={color:`#000000`,lineWidth:1,padding:[0,5,0,5],disabled:!0}})),Cr,wr=o((()=>{Cr={top:0,left:5}})),Tr,Er=o((()=>{Tr={defaultLineColor:`#000000`,defaultLineWidth:2}})),Dr,Or=o((()=>{Dr={disabled:!0,color:`#CCCCCC`,radius:1}})),kr,Ar=o((()=>{kr={disabled:!0,insertColor:`#2B5CE6`,deleteColor:`#E03F3F`,author:``,lineWidth:2}})),jr,Mr=o((()=>{jr={disabled:!0,height:26}})),Nr,Pr=o((()=>{Nr={disabled:!0,color:`#FF0000`}}));function Fr(e={}){let t={incrementalCompute:!1,...e.lab},n={...er,...e.table},r={...Fn,...e.header},i={...jn,...e.footer},a={...Kn,...e.pageNumber},o={...ar,...e.watermark},s={...Dn,...e.control},c={...Tn,...e.checkbox},l={...Xn,...e.radio},u={...kn,...e.cursor},d={...an,...e.title},f={...Jn,...e.placeholder},p={...Nn,...e.group},m={...Un,...e.pageBreak},h={...sr,...e.zone},g={...xn,...e.background},_={...Vn,...e.lineBreak},v={...Dr,...e.whiteSpace},y={...Qn,...e.separator},b={...dr,...e.lineNumber},x={...xr,...e.pageBorder},S={...Cr,...e.badge},C={...Tr,...e.graffiti},w={...Ln,...e.label},T={...zn,...e.imgCaption},D={...Zt,...e.list},O={...pr,...e.magnifier},k={...hr,...e.accessibility},A={..._r,...e.column},j={...kr,...e.trace},N={...jr,...e.ruler},z={...yr,...e.hint},ee={...Nr,...e.spellcheck},te={print:{...Ze.print,...e.modeRule?.print},readonly:{...Ze.readonly,...e.modeRule?.readonly},form:{...Ze.form,...e.modeRule?.form}};return{mode:M.EDIT,locale:`zhCN`,defaultType:`TEXT`,defaultColor:`#000000`,defaultFont:`Microsoft YaHei`,defaultSize:16,minSize:5,maxSize:72,defaultRowMargin:1,defaultBasicRowMarginHeight:8,defaultTabWidth:32,width:794,height:1123,scale:1,pageGap:20,underlineColor:`#000000`,strikeoutColor:`#FF0000`,rangeAlpha:.6,rangeColor:`#AECBFA`,rangeMinWidth:5,searchMatchAlpha:.6,searchMatchColor:`#FFFF00`,searchNavigateMatchColor:`#AAD280`,highlightAlpha:.6,highlightMarginHeight:8,resizerColor:`#4182D9`,resizerSize:5,marginIndicatorSize:35,marginIndicatorColor:`#BABABA`,margins:[100,120,100,120],pageMode:P.PAGING,renderMode:L.SPEED,backend:R.CANVAS,defaultHyperlinkColor:`#0000FF`,paperDirection:F.VERTICAL,inactiveAlpha:.6,historyMaxRecordCount:100,wordBreak:I.BREAK_WORD,hangPunctuation:!1,incrementalCompute:!0,printPixelRatio:3,maskMargin:[0,0,0,0],letterClass:[E.ENGLISH],contextMenuDisableKeys:[],shortcutDisableKeys:[],scrollContainerSelector:``,pageOuterSelectionDisable:!1,displayOnly:!1,...e,lab:t,table:n,header:r,footer:i,pageNumber:a,watermark:o,control:s,checkbox:c,radio:l,cursor:u,title:d,placeholder:f,group:p,pageBreak:m,zone:h,background:g,lineBreak:_,whiteSpace:v,separator:y,lineNumber:b,pageBorder:x,badge:S,modeRule:te,graffiti:C,label:w,imgCaption:T,list:D,magnifier:O,accessibility:k,column:A,trace:j,ruler:N,hint:z,spellcheck:ee}}var Ir=o((()=>{Sn(),En(),D(),On(),An(),Mn(),Pn(),In(),Rn(),Bn(),Hn(),Wn(),qn(),Yn(),Zn(),$n(),tr(),ln(),or(),cr(),fr(),tn(),mr(),gr(),vr(),br(),Sr(),z(),wr(),Qe(),Er(),Or(),Ar(),Mr(),Pr()}));function Lr(e){let t=e.trace;return t?.[t.length-1]?.type===fn.DELETED}function Rr(e){let t=K(e),n=e=>e.filter(e=>{if(Lr(e))return!1;e.valueList&&=n(e.valueList),e.control?.value&&(e.control.value=n(e.control.value));for(let t of e.trList||[])for(let e of t.tdList)e.value=n(e.value);return!0});return n(t)}function zr(e){let t=Rr(e),n=e=>{for(let t of e){delete t.trace,t.valueList&&n(t.valueList),t.control?.value&&n(t.control.value);for(let e of t.trList||[])for(let t of e.tdList)n(t.value)}};return n(t),t}function Br(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=Se(r.value);for(let e=0;e<i.length;e++)t.push({...r,value:i[e]})}return t}function Vr(e,t){let{isHandleFirstElement:n=!0,isForceCompensation:r=!1,editorOptions:i}=t,a=e[0];a?.type!==B.LIST&&(r||n&&(a?.type&&a.type!==B.TEXT||!me.test(a?.value)))&&e.unshift({value:``});let o=0;for(;o<e.length;){let n=e[o];if(n.type===B.TITLE){e.splice(o,1);let r=n.valueList||[];if(Vr(r,{...t,isHandleFirstElement:!1,isForceCompensation:!1}),r.length){let t=n.titleId||q(),a=i.title;for(let i=0;i<r.length;i++){let s=r[i];s.title=n.title,n.hint&&!s.hint&&(s.hint=n.hint),n.level&&(s.titleId=t,s.level=n.level),qr(s)&&(s.size||=a[on[s.level]],s.bold===void 0&&(s.bold=!0)),e.splice(o,0,s),o++}}o--}else if(n.type===B.LIST){e.splice(o,1);let r=n.valueList||[];if(Vr(r,{...t,isHandleFirstElement:!0,isForceCompensation:!1}),r.length){let t=n.listId||q(),i=new Map([[0,t]]);for(let t=0;t<r.length;t++){let a=r[t],s=a.listLevel??n.listLevel??0;a.listId||=i.get(s)||q(),i.set(s,a.listId),Array.from(i.keys()).forEach(e=>{e>s&&i.delete(e)}),a.listType=a.listType||n.listType,a.listStyle=a.listStyle||n.listStyle,a.listLevel=s,n.hint&&!a.hint&&(a.hint=n.hint),e.splice(o,0,a),o++}e[o]&&(e[o].valueList?.length?!me.test(e[o].valueList[0].value):!me.test(e[o].value))&&(e.splice(o,0,{value:``}),o++)}o--}else if(n.type===B.AREA){e.splice(o,1);let r=n?.valueList||[];if(Vr(r,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),r.length){let t=q();for(let i=0;i<r.length;i++){let a=r[i];if(a.areaId=n.areaId||t,a.area=n.area,a.areaIndex=i,n.hint&&!a.hint&&(a.hint=n.hint),a.type===B.TABLE){let e=a.trList;for(let r=0;r<e.length;r++){let i=e[r];for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e].value;for(let e=0;e<r.length;e++){let i=r[e];i.areaId=n.areaId||t,i.area=n.area}}}}e.splice(o,0,a),o++}}o--}else if(n.type===B.TABLE){let e=n.id||q();if(n.id=e,n.trList){let{table:{defaultTrMinHeight:r,defaultColMinWidth:a},margins:o}=i;if(!n.colgroup?.length&&n.trList.length){let e=n.trList[0].tdList.reduce((e,t)=>e+t.colspan,0),t=i.width-o[1]-o[3],r=Math.max(t/e,a);n.colgroup=[];for(let t=0;t<e;t++)n.colgroup.push({width:r})}for(let i=0;i<n.trList.length;i++){let a=n.trList[i],o=a.id||q();a.id=o,(!a.minHeight||a.minHeight<r)&&(a.minHeight=r),a.height<a.minHeight&&(a.height=a.minHeight);for(let n=0;n<a.tdList.length;n++){let r=a.tdList[n],i=r.id||q();r.id=i,Vr(r.value,{...t,isHandleFirstElement:!0,isForceCompensation:!0}),!r.value[0].size&&r.value[1]?.size&&qr(r.value[1])&&(r.value[0].size=r.value[1].size);for(let t=0;t<r.value.length;t++){let n=r.value[t];n.tdId=i,n.trId=o,n.tableId=e}}}}}else if(n.type===B.HYPERLINK){e.splice(o,1);let t=Br(n.valueList||[]);if(t.length){let r=q();for(let i=0;i<t.length;i++){let a=t[i];a.type=n.type,a.url=n.url,a.hyperlinkId=r,n.hint&&!a.hint&&(a.hint=n.hint),e.splice(o,0,a),o++}}o--}else if(n.type===B.DATE){e.splice(o,1);let t=Br(n.valueList||[]);if(t.length){let r=q();for(let i=0;i<t.length;i++){let a=t[i];a.type=n.type,a.dateFormat=n.dateFormat,a.dateId=r,e.splice(o,0,a),o++}}o--}else if(n.type===B.CONTROL){if(!n.control){o++;continue}let{prefix:r,postfix:a,preText:s,postText:c,value:l,placeholder:u,code:d,type:f,valueSets:p}=n.control,{editorOptions:{control:m,checkbox:h,radio:g}}=t,_=n.controlId||q();e.splice(o,1);let v=Fe(n,[...Bt,...Dt,...Ot,...kt]),y=Fe(n.control,Rt),b={...y,color:i.control.bracketColor},x=Se(r||m.prefix);for(let t=0;t<x.length;t++){let r=x[t];e.splice(o,0,{...v,...b,controlId:_,value:r,type:n.type,control:n.control,controlComponent:U.PREFIX}),o++}if(s){let t=Se(s);for(let r=0;r<t.length;r++){let i=t[r];e.splice(o,0,{...v,...y,controlId:_,value:i,type:n.type,control:n.control,controlComponent:U.PRE_TEXT}),o++}}if(l&&l.length||f===H.CHECKBOX||f===H.RADIO||f===H.SELECT&&d&&(!l||!l.length)){let r=l?K(l):[];if(f===H.CHECKBOX){let t=d?d.split(`,`):[];if(Array.isArray(p)&&p.length){let i=r.reduce((e,t)=>e.concat(t.value.split(``).map(e=>({...t,value:e}))),[]),a=0;for(let r=0;r<p.length;r++){let s=p[r];e.splice(o,0,{...v,...y,controlId:_,value:``,type:n.type,control:n.control,controlComponent:U.CHECKBOX,checkbox:{code:s.code,value:t.includes(s.code)}}),o++;let c=Se(s.value);for(let t=0;t<c.length;t++){let r=c[t],s=t===c.length-1;e.splice(o,0,{...v,...y,...i[a],controlId:_,value:r===`
|
|
46
|
+
`?``:r,letterSpacing:s?h.gap:0,control:n.control,controlComponent:U.VALUE}),a++,o++}}}}else if(f===H.RADIO){if(Array.isArray(p)&&p.length){let t=r.reduce((e,t)=>e.concat(t.value.split(``).map(e=>({...t,value:e}))),[]),i=0;for(let r=0;r<p.length;r++){let a=p[r];e.splice(o,0,{...v,...y,controlId:_,value:``,type:n.type,control:n.control,controlComponent:U.RADIO,radio:{code:a.code,value:d===a.code}}),o++;let s=Se(a.value);for(let r=0;r<s.length;r++){let a=s[r],c=r===s.length-1;e.splice(o,0,{...v,...y,...t[i],controlId:_,value:a===`
|
|
47
|
+
`?``:a,letterSpacing:c?g.gap:0,control:n.control,controlComponent:U.VALUE}),i++,o++}}}}else{if((!l||!l.length)&&Array.isArray(p)&&p.length){let e=p.find(e=>e.code===d);e&&(r=[{value:e.value}])}Vr(r,{...t,isHandleFirstElement:!1,isForceCompensation:!1});for(let t=0;t<r.length;t++){let i=r[t],a=i.value,s=!!i.controlId&&i.controlId!==_;e.splice(o,0,{...v,...y,...i,...s?{}:{controlId:_,control:n.control,controlComponent:U.VALUE},value:a===`
|
|
48
|
+
`?``:a,type:i.type||B.TEXT}),o++}}}else if(u){let t={...y,color:i.control.placeholderColor},r=Se(u);for(let i=0;i<r.length;i++){let a=r[i];e.splice(o,0,{...v,...t,controlId:_,value:a===`
|
|
49
|
+
`?``:a,type:n.type,control:n.control,controlComponent:U.PLACEHOLDER}),o++}}if(c){let t=Se(c);for(let r=0;r<t.length;r++){let i=t[r];e.splice(o,0,{...v,...y,controlId:_,value:i,type:n.type,control:n.control,controlComponent:U.POST_TEXT}),o++}}let S=Se(a||m.postfix);for(let t=0;t<S.length;t++){let r=S[t];e.splice(o,0,{...v,...b,controlId:_,value:r,type:n.type,control:n.control,controlComponent:U.POSTFIX}),o++}o--}else if((!n.type||Vt.includes(n.type))&&n.value?.length>1){e.splice(o,1);let t=Se(n.value);for(let r=0;r<t.length;r++)e.splice(o+r,0,{...n,value:t[r]});n=e[o]}if((n.value===`
|
|
50
|
+
`||n.value==`\r
|
|
51
|
+
`)&&(n.value=``),(n.type===B.IMAGE||n.type===B.BLOCK)&&(n.id=n.id||q()),n.type===B.LATEX){let{svg:e,width:t,height:r}=wt.convertLaTextToSVG(n.value);n.width=n.width||t,n.height=n.height||r,n.laTexSVG=e,n.id=n.id||q()}o++}}function Hr(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(i!==`value`&&!(i===`groupIds`&&Array.isArray(e[i])&&Array.isArray(t[i])&&ze(e[i],t[i]))){if(i===`trace`){let n=e[i]||[],r=t[i]||[];if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if(t.type!==i.type||t.author!==i.author||t.timestamp!==i.timestamp)return!1}}else if(e[i]!==t[i])return!1}}return!0}function Ur(e,t={}){let{extraPickAttrs:n}=t,r=[...Mt];n&&r.push(...n);let i={value:e.value===``?`
|
|
52
|
+
`:e.value};return r.forEach(t=>{let n=e[t];n!==void 0&&(i[t]=n)}),i}function X(e,t={}){let{extraPickAttrs:n,isClassifyArea:r=!1,isClone:i=!0,isListValue:a=!1}=t,o=i?K(e):e,s=[],c=0;for(;c<o.length;){let e=o[c];if(c===0&&e.value===``&&!e.listId&&(!e.type||e.type===B.TEXT)){c++;continue}if(e.areaId){let n=e.areaId,i=e.area,a=[];for(;c<o.length;){let e=o[c];if(n!==e.areaId){c--;break}delete e.area,delete e.areaId,a.push(e),c++}let l=X(a,t);if(r){let t={type:B.AREA,value:``,areaId:n,area:i};t.valueList=l,e=t}else{s.splice(c,0,...l);continue}}else if(e.titleId&&e.level){let n=e.titleId;if(n){let r=e.level,i={type:B.TITLE,title:e.title,titleId:n,value:``,level:r},a=[];for(;c<o.length;){let e=o[c];if(n!==e.titleId){c--;break}delete e.level,delete e.title,a.push(e),c++}i.valueList=X(a,t),e=i}}else if(!a&&e.listId&&e.listType){let n=e.listId;if(n){let r=e.listType,i=e.listStyle,a={type:B.LIST,value:``,listId:n,listType:r,listStyle:i},s=[];for(;c<o.length;){let e=o[c];if(!e.listId||r!==e.listType){c--;break}delete e.listType,delete e.listStyle,s.push(e),c++}a.valueList=X(s,{...t,isListValue:!0}),e=a}}else if(e.type===B.TABLE){if(e.trList)for(let r=0;r<e.trList.length;r++){let i=e.trList[r];n?.includes(`id`)||delete i.id;for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e],a={colspan:r.colspan,rowspan:r.rowspan,value:X(r.value,{...t,isClassifyArea:!0})};Nt.forEach(e=>{let t=r[e];t!==void 0&&(a[e]=t)}),n?.forEach(e=>{if(e===`value`)return;let t=r[e];t!==void 0&&(a[e]=t)}),i.tdList[e]=a}}}else if(e.type===B.HYPERLINK){let n=e.hyperlinkId;if(n){let r={type:B.HYPERLINK,value:``,url:e.url},i=[];for(;c<o.length;){let e=o[c];if(n!==e.hyperlinkId){c--;break}delete e.type,delete e.url,i.push(e),c++}r.valueList=X(i,t),e=r}}else if(e.type===B.DATE){let n=e.dateId;if(n){let r={type:B.DATE,value:``,dateFormat:e.dateFormat},i=[];for(;c<o.length;){let e=o[c];if(n!==e.dateId){c--;break}delete e.type,delete e.dateFormat,i.push(e),c++}r.valueList=X(i,t),e=r}}else if(e.controlId){let r=e.controlId;if(e.controlComponent===U.PREFIX){let i=[],a=!1,s=c;for(;s<o.length;){let e=o[s];if(e.controlId===r){if(e.controlComponent===U.VALUE&&(delete e.control,delete e.controlId,i.push(e)),e.controlComponent===U.POSTFIX){a=!0,s++;break}s++}else if(e.controlComponent===U.PREFIX){let n=s;for(;n<o.length;){let t=o[n];if(t.controlId===e.controlId&&t.controlComponent===U.POSTFIX)break;n++}let r=X(o.slice(s,Math.min(n+1,o.length)),t)[0];r&&i.push(r),s=n+1}else break}if(a){let a=Fe(e,Rt),o={...e.control,...a},l={...Fe(e,Dt),type:B.CONTROL,value:``,control:o,controlId:r,trace:e.trace};l.control.value=X(i,t),e=Ur(l,{extraPickAttrs:n}),c+=s-c-1}}if(e.controlComponent&&(delete e.control,delete e.controlId,e.controlComponent!==U.VALUE&&e.controlComponent!==U.PRE_TEXT&&e.controlComponent!==U.POST_TEXT)){c++;continue}}let i=Ur(e,{extraPickAttrs:n});if(!e.type||e.type===B.TEXT||e.type===B.SUBSCRIPT||e.type===B.SUPERSCRIPT)for(;c<o.length;){let e=o[c+1];if(c++,e&&Hr(i,Ur(e,{extraPickAttrs:n}))){let t=e.value===``?`
|
|
53
|
+
`:e.value;i.value+=t}else break}else c++;s.push(i)}return s}function Wr(e){switch(window.getComputedStyle(e).textAlign){case`left`:case`start`:return O.LEFT;case`center`:return O.CENTER;case`right`:case`end`:return O.RIGHT;case`justify`:return O.ALIGNMENT;case`justify-all`:return O.JUSTIFY;default:return O.LEFT}}function Gr(e){return e===O.ALIGNMENT?`justify`:e}function Kr(e){switch(e){case O.LEFT:return`flex-start`;case O.CENTER:return`center`;case O.RIGHT:return`flex-end`;case O.ALIGNMENT:case O.JUSTIFY:return`space-between`;default:return`flex-start`}}function qr(e){return!e.type||Vt.includes(e.type)}function Jr(e){return!e.type||e.type===B.TEXT}function Yr(e){return e.filter(e=>qr(e)).map(e=>e.value).join(``).replace(RegExp(``,`g`),``)}function Xr(e,t){let n=e[t];if(!n)return null;let r=e[t+1];return!n.listId&&n.value===``&&r&&r.value!==``&&n.areaId===r.areaId?r:n}function Zr(e,t,n,r){let i=Xr(e,n);if(!i)return;let{isBreakWhenWrap:a=!1,editorOptions:o,ignoreContextKeys:s=[]}=r||{},{mode:c}=o||{};c!==M.DESIGN&&i.title?.disabled&&(i=Ie(i,Ft));let l=!1;for(let o=0;o<t.length;o++){let c=t[o];if(a&&!i.listId&&me.test(c.value)&&(l=!0),l||!i.listId&&c.type===B.LIST){let e=[...Pt,...Dt,...zt];Pe(e,s),Ne(e,i,c),c.valueList?.forEach(t=>{Ne(e,i,t)});continue}c.valueList?.length&&Zr(e,c.valueList,n,r);let u=[...Bt];si(c)||u.push(...Dt),Pe(u,s),Ne(u,i,c)}}function Qr(e,t){let n=`span`;e.type===B.SUPERSCRIPT?n=`sup`:e.type===B.SUBSCRIPT&&(n=`sub`);let r=document.createElement(n);return r.style.fontFamily=e.font||t.defaultFont,e.rowFlex&&(r.style.textAlign=Gr(e.rowFlex)),e.color&&(r.style.color=e.color),e.bold&&(r.style.fontWeight=`600`),e.italic&&(r.style.fontStyle=`italic`),r.style.fontSize=`${e.size||t.defaultSize}px`,e.highlight&&(r.style.backgroundColor=e.highlight),e.underline&&(r.style.textDecoration=`underline`,r.style.textDecorationStyle=e.textDecoration?.style||`solid`),e.strikeout&&(r.style.textDecoration+=` line-through`),e.type&&r.setAttribute(`data-type`,e.type),e.rowMargin&&(r.style.lineHeight=(e.rowMargin??t.defaultRowMargin).toString()),r.innerText=e.value.replace(RegExp(``,`g`),`
|
|
54
|
+
`),r}function $r(e){let t=0,n=new Map;for(let r=0;r<e.length;r++){let i=e[r];if(r===0){if(i.checkbox)continue;i.value=i.value.replace(me,``)}if(i.listWrap){let e=n.get(t)||[];e.push(i),n.set(t,e)}else{let e=i.value.split(`
|
|
55
|
+
`);for(let r=0;r<e.length;r++){r>0&&(t+=1);let a=e[r],o=n.get(t)||[];o.push({...i,value:a}),n.set(t,o)}}}return n}function ei(e){let t=[];if(!e.length)return t;let n=e[0]?.rowFlex||null;t.push({rowFlex:n,data:[e[0]]});for(let r=1;r<e.length;r++){let i=e[r],a=i.rowFlex||null;n===a&&!si(i)&&!si(e[r-1])?t[t.length-1].data.push(i):(t.push({rowFlex:a,data:[i]}),n=a)}for(let e=0;e<t.length;e++){let n=t[e];n.data=X(n.data)}return t}function ti(e,t){let n=Fr(t);function r(e){let i=document.createElement(`div`);for(let a=0;a<e.length;a++){let o=e[a];if(o.type===B.TABLE){let e=document.createElement(`table`);e.setAttribute(`cellSpacing`,`0`),e.setAttribute(`cellpadding`,`0`),e.setAttribute(`border`,`0`);let r=`${o.borderWidth??1}px solid ${o.borderColor||n.table.defaultBorderColor}`;!o.borderType||o.borderType===mn.ALL?(e.style.borderTop=r,e.style.borderLeft=r):o.borderType===mn.EXTERNAL&&(e.style.border=r),e.style.width=`${o.width}px`;let a=document.createElement(`colgroup`);for(let e=0;e<o.colgroup.length;e++){let t=o.colgroup[e],n=document.createElement(`col`);n.setAttribute(`width`,`${t.width}`),a.append(n)}e.append(a);let s=o.trList;for(let i=0;i<s.length;i++){let a=document.createElement(`tr`),c=s[i];a.style.height=`${c.height}px`;for(let e=0;e<c.tdList.length;e++){let i=document.createElement(`td`),s=c.tdList[e],l=s.borderColor||s.borderWidth?`${s.borderWidth??o.borderWidth??1}px solid ${s.borderColor||o.borderColor||n.table.defaultBorderColor}`:r;o.borderType&&o.borderType!==mn.ALL||(i.style.borderBottom=i.style.borderRight=l),i.colSpan=s.colspan,i.rowSpan=s.rowspan,i.style.verticalAlign=s.verticalAlign||`top`,s.borderTypes?.includes(hn.TOP)&&(i.style.borderTop=l),s.borderTypes?.includes(hn.RIGHT)&&(i.style.borderRight=l),s.borderTypes?.includes(hn.BOTTOM)&&(i.style.borderBottom=l),s.borderTypes?.includes(hn.LEFT)&&(i.style.borderLeft=l),i.innerHTML=ti(s.value,t).innerHTML,s.backgroundColor&&(i.style.backgroundColor=s.backgroundColor),a.append(i)}e.append(a)}i.append(e)}else if(o.type===B.HYPERLINK){let e=document.createElement(`a`);e.innerText=o.valueList.map(e=>e.value).join(``),o.url&&(e.href=o.url),i.append(e)}else if(o.type===B.TITLE){let e=document.createElement(`h${sn[o.level]}`);e.innerHTML=r(o.valueList).innerHTML,i.append(e)}else if(o.type===B.LIST){let e=document.createElement($t[o.listType]);o.listStyle&&(e.style.listStyleType=en[o.listStyle]),$r(X(o.valueList)).forEach(t=>{let n=document.createElement(`li`);n.innerHTML=r(t).innerHTML,e.append(n)}),i.append(e)}else if(o.type===B.IMAGE){let e=document.createElement(`img`);o.value&&(e.src=o.value,e.width=o.width,e.height=o.height),i.append(e)}else if(o.type===B.BLOCK){if(o.block?.type===un.VIDEO){let e=o.block.videoBlock?.src;if(e){let n=document.createElement(`video`);n.style.display=`block`,n.controls=!0,n.src=e,n.width=o.width||t?.width||window.innerWidth,n.height=o.height,i.append(n)}}else if(o.block?.type===un.IFRAME){let{src:e,srcdoc:n,sandbox:r,allow:a}=o.block.iframeBlock||{};if(e||n){let s=document.createElement(`iframe`);s.sandbox.add(...r||qe.sandbox),s.setAttribute(`allow`,[a||qe.allow].join(` `)),s.style.display=`block`,s.style.border=`none`,e?s.src=e:n&&(s.srcdoc=n),s.width=`${o.width||t?.width||window.innerWidth}`,s.height=`${o.height}`,i.append(s)}}}else if(o.type===B.SEPARATOR){let e=document.createElement(`hr`);o.dashArray?.length&&e.setAttribute(`data-dash-array`,o.dashArray.join(`,`)),i.append(e)}else if(o.type===B.CHECKBOX){let e=document.createElement(`input`);e.type=`checkbox`,o.checkbox?.value&&e.setAttribute(`checked`,`true`),i.append(e)}else if(o.type===B.RADIO){let e=document.createElement(`input`);e.type=`radio`,o.radio?.value&&e.setAttribute(`checked`,`true`),i.append(e)}else if(o.type===B.TAB){let e=document.createElement(`span`);e.innerHTML=`${S}${S}`,i.append(e)}else if(o.type===B.CONTROL){let e=document.createElement(`span`);e.innerHTML=r(o.control?.value||[]).innerHTML,i.append(e)}else if(o.type===B.PAGE_BREAK){let e=document.createElement(`div`);e.style.breakAfter=`page`,i.append(e)}else if(!o.type||o.type===B.LATEX||Vt.includes(o.type)){let t=``;if(t=o.type===B.DATE?o.valueList?.map(e=>e.value).join(``)||``:o.value,!t)continue;let r=Qr(o,n);e[a-1]?.type===B.TITLE&&(t=t.replace(/^\n/,``)),r.innerText=t.replace(RegExp(``,`g`),`
|
|
56
|
+
`),i.append(r)}}return i}let i=document.createElement(`div`),a=ei(e);for(let e=0;e<a.length;e++){let t=a[e],n=!t.rowFlex||t.rowFlex===O.LEFT,o=document.createElement(`div`);if(!n){let e=t.data[0];si(e)?(o.style.display=`flex`,o.style.justifyContent=Kr(e.rowFlex)):(o.style.textAlign=Gr(t.rowFlex),t.rowFlex===`justify`&&(o.style.textAlignLast=`justify`))}o.innerHTML=r(t.data).innerHTML,n?o.childNodes.forEach(e=>{i.append(e.cloneNode(!0))}):i.append(o)}return i}function ni(e){if(!e||e.nodeType!==3)return null;let t=e.parentNode,n=t.nodeName===`FONT`?t.parentNode:t,r=Wr(n),i=e.textContent,a=window.getComputedStyle(n);if(!i||n.nodeName===`STYLE`)return null;let o={value:i,color:a.color,bold:Number(a.fontWeight)>500,italic:a.fontStyle.includes(`italic`),size:Math.floor(parseFloat(a.fontSize))};return n.nodeName===`SUB`||a.verticalAlign===`sub`?o.type=B.SUBSCRIPT:(n.nodeName===`SUP`||a.verticalAlign===`super`)&&(o.type=B.SUPERSCRIPT),r!==O.LEFT&&(o.rowFlex=r),a.backgroundColor!==`rgba(0, 0, 0, 0)`&&(o.highlight=a.backgroundColor),a.textDecorationLine.includes(`underline`)&&(o.underline=!0),a.textDecorationLine.includes(`line-through`)&&(o.strikeout=!0),o}function ri(e,t){let n=[];function r(e){if(e.nodeType===3){let t=ni(e);t&&n.push(t)}else if(e.nodeType===1){let i=e.childNodes;for(let e=0;e<i.length;e++){let a=i[e];if(a.nodeName===`BR`)n.push({value:`
|
|
57
|
+
`});else if(a.nodeName===`A`){let e=a,t=e.innerText;t&&n.push({type:B.HYPERLINK,value:``,valueList:[{value:t}],url:e.href})}else if(/H[1-6]/.test(a.nodeName)){let e=ri(ci(a,`div`).outerHTML,t);n.push({value:``,type:B.TITLE,level:cn[a.nodeName],valueList:e}),a.nextSibling&&!Wt.includes(a.nextSibling.nodeName)&&n.push({value:`
|
|
58
|
+
`})}else if(a.nodeName===`UL`||a.nodeName===`OL`){let e=a,r={value:``,type:B.LIST,valueList:[]};a.nodeName===`OL`?r.listType=qt.OL:(r.listType=qt.UL,r.listStyle=e.style.listStyleType);let i=(e,n)=>{let r=q(),a=e.tagName===`OL`?qt.OL:qt.UL,o=e.tagName===`OL`?void 0:e.style.listStyleType,s=[];return Array.from(e.children).forEach(e=>{let c=e;if(c.tagName!==`LI`)return;let l=c.cloneNode(!0);l.querySelectorAll(`ul,ol`).forEach(e=>e.remove());let u=ri(l.innerHTML,t);u.forEach(e=>{e.value===`
|
|
59
|
+
`&&(e.listWrap=!0),e.listId=r,e.listType=a,o&&(e.listStyle=o),e.listLevel=n}),u.unshift({value:`
|
|
60
|
+
`,listId:r,listType:a,...o?{listStyle:o}:{},listLevel:n}),s.push(...u),Array.from(c.querySelectorAll(`:scope > ul, :scope > ol`)).forEach(e=>{s.push(...i(e,n+1))})}),s};r.valueList=i(e,0),n.push(r)}else if(a.nodeName===`HR`)n.push({value:`
|
|
61
|
+
`,type:B.SEPARATOR});else if(a.nodeName===`IMG`){let{src:e,width:t,height:r}=a;e&&t&&r&&n.push({width:t,height:r,value:e,type:B.IMAGE,rowFlex:Wr(a.parentElement)})}else if(a.nodeName===`VIDEO`){let{src:e,width:t,height:r}=a;e&&t&&r&&n.push({value:``,type:B.BLOCK,block:{type:un.VIDEO,videoBlock:{src:e}},width:t,height:r})}else if(a.nodeName===`IFRAME`){let{src:e,srcdoc:t,width:r,height:i}=a;(e||t)&&r&&i&&n.push({value:``,type:B.BLOCK,block:{type:un.IFRAME,iframeBlock:{src:e,srcdoc:t}},width:parseInt(r),height:parseInt(i)})}else if(a.nodeName===`TABLE`){let e=a,r={type:B.TABLE,value:`
|
|
62
|
+
`,colgroup:[],trList:[]},i=e.querySelectorAll(`colgroup col`);if(e.querySelectorAll(`tr`).forEach(e=>{let n=Number(window.getComputedStyle(e).height.replace(`px`,``)),i={height:n,minHeight:n,tdList:[]};e.querySelectorAll(`th,td`).forEach(e=>{let n=e,r=ri(n.innerHTML,t),a={colspan:n.colSpan,rowspan:n.rowSpan,value:r,verticalAlign:window.getComputedStyle(e).verticalAlign,width:parseFloat(window.getComputedStyle(e).width)};n.style.backgroundColor&&(a.backgroundColor=n.style.backgroundColor),i.tdList.push(a)}),r.trList.push(i)}),r.trList.length){let e=r.trList[0].tdList.reduce((e,t)=>e+t.colspan,0),a=Math.ceil(t.innerWidth/e);for(let t=0;t<e;t++){let e=i[t]?.getAttribute(`width`);r.colgroup.push({width:e?parseFloat(e):a})}n.push(r)}}else if(a.nodeName===`INPUT`&&a.type===U.CHECKBOX)n.push({type:B.CHECKBOX,value:``,checkbox:{value:a.checked}});else if(a.nodeName===`INPUT`&&a.type===U.RADIO)n.push({type:B.RADIO,value:``,radio:{value:a.checked}});else if(r(a),a.nodeType===1&&e!==i.length-1){let e=a;window.getComputedStyle(e).display===`block`&&!/(\n|\r\n)$/.test(e.textContent)&&n.push({value:`
|
|
63
|
+
`})}}}}let i=document.createElement(`div`);document.body.appendChild(i);let a=i.attachShadow({mode:`open`}),o=document.createElement(`div`);o.innerHTML=e,a.appendChild(o);let s=[];return o.childNodes.forEach(e=>{e.nodeType!==1&&!e.textContent?.trim()&&s.push(e)}),s.forEach(e=>e.remove()),r(o),i.remove(),n}function ii(e,t={}){function n(e){let t=``;for(let r=0;r<e.length;r++){let i=e[r];if(i.type===B.TABLE){t+=`
|
|
64
|
+
`;let e=i.trList;for(let r=0;r<e.length;r++){let i=e[r];for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e],a=n(X(r.value,{isClone:!1})),o=e===0,s=i.tdList.length-1===e;t+=`${o?``:` `}${a}${s?`
|
|
65
|
+
`:``}`}}}else if(i.type===B.TAB)t+=` `;else if(i.type===B.HYPERLINK)t+=i.valueList.map(e=>e.value).join(``);else if(i.type===B.TITLE)t+=`${n(X(i.valueList,{isClone:!1}))}`;else if(i.type===B.LIST){let e=$r(X(i.valueList,{isClone:!1})),r=``;i.listType===qt.UL&&(r=Qt[i.listStyle]),e.forEach((i,a)=>{let o=e.size-1===a;t+=`\n${r||`${a+1}.`}${n(i)}${o?`
|
|
66
|
+
`:``}`})}else if(i.type===B.CHECKBOX)t+=i.checkbox?.value?`☑`:`□`;else if(i.type===B.RADIO)t+=i.radio?.value?`☉`:`○`;else if(!i.type||i.type===B.LATEX||Vt.includes(i.type)){let e=``;if(i.type===B.CONTROL){let t=i.control.value?.[0]?.value||``;e=t?`${i.control?.preText||``}${t}${i.control?.postText||``}`:``}else e=i.type===B.DATE?i.valueList?.map(e=>e.value).join(``)||``:i.value;t+=e.replace(RegExp(``,`g`),`
|
|
67
|
+
`)}}return t}return n(X(e,{isClone:t.isClone!==!1}))}function ai(e){if(!e||typeof e!=`object`)return e;if(Array.isArray(e)){let t=e,n=Array(t.length);for(let e=0;e<t.length;e++)n[e]=ai(t[e]);return n}let t={};for(let n in e){if(n===`metrics`||n===`style`)continue;let r=e[n];t[n]=r&&typeof r==`object`?ai(r):r}return t}function oi(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=ai(e[n]);return t}function si(e){return!!e?.type&&(Ut.includes(e.type)||e.imgDisplay===g.INLINE)}function ci(e,t){let n=document.createElement(t);for(let t=0;t<e.attributes.length;t++){let r=e.attributes[t];n.setAttribute(r.name,r.value)}return n.innerHTML=e.innerHTML,n}function li(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n];r.imgDisplay===g.SURROUND&&t.push(r)}return t}function ui(e,t){for(let n=e.length-1;n>=0;n--)e[n].imgFloatPosition?.pageNo===t&&e.splice(n,1)}function di(e,t,n=_.BEFORE,r){if(!e[t]?.hide&&!e[t]?.control?.hide&&!e[t]?.area?.hide&&!r?.(e[t]))return t;let i=t;if(n===_.BEFORE)for(i=t-1;i>0;){if(!e[i]?.hide&&!e[i]?.control?.hide&&!e[i]?.area?.hide&&!r?.(e[i]))return i;i--}else for(i=t+1;i<e.length;){if(!e[i]?.hide&&!e[i]?.control?.hide&&!e[i]?.area?.hide&&!r?.(e[i]))return i;i++}return i}function fi(e,t,n,r){let i=t+n;if(i<0||i>=e.length||e[i].controlId===r)return i;for(;i>=0&&i<e.length;){if(e[i].controlId===r)return i;i+=n}return i}function pi(e,t){let n=e[t]?.controlId;if(!n)return null;let r=t;for(;r>0;){let t=e[r];if(t.controlId!==n||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;r--}let i=e[r-1]?.controlId;return i&&i!==n?pi(e,r-1):n}function mi(e,t){for(let n of e){if(t(n),n.type===B.TABLE)for(let e of n.trList||[])for(let n of e.tdList)mi(n.value,t);n.valueList&&mi(n.valueList,t)}}function hi(e,t){let n=e[t+1];return n&&n.value!==``&&!n.listWrap?n:e[t]}var gi=o((()=>{J(),Je(),Tt(),D(),Kt(),tn(),_e(),ln(),dn(),x(),G(),z(),V(),Xt(),k(),pn(),_n(),Ir()}));function _i(e){return e.reduce((e,t)=>e+t.width,0)}function vi(e,t,n){let r=_i(e);for(;r>t;){let i=e.filter(e=>e.width>n);if(!i.length)return;let a=_i(i),o=t-(r-a);if(o<=0){i.forEach(e=>e.width=n);return}let s=o/a;i.forEach(e=>{e.width=Math.max(n,e.width*s)});let c=_i(e);if(c>=r)return;r=c}}function yi(e,t){let n=_i(e);if(!n||n===t)return;let r=t/n;for(let t=0;t<e.length;t++)e[t].width*=r}var bi=o((()=>{})),xi,Si=o((()=>{D(),x(),G(),V(),z(),k(),ce(),gi(),bi(),xi=class{draw;controlMinWidthPlaceholderElementListSet=new WeakSet;constructor(e){this.draw=e}consumeControlMinWidthPlaceholders(e){if(this.controlMinWidthPlaceholderElementListSet.has(e)){for(let t=e.length-1;t>=0;t--)e[t].isControlMinWidthPlaceholder&&e.splice(t,1);this.controlMinWidthPlaceholderElementListSet.delete(e)}}markControlMinWidthPlaceholders(e){this.controlMinWidthPlaceholderElementListSet.add(e)}getIsControlMinWidthPlaceholder(e){return this.controlMinWidthPlaceholderElementListSet.has(e)}computeRowList(e){let t=this.draw,{innerWidth:n,elementList:r,isPagingMode:i=!1,isFromTable:a=!1,startX:o=0,startY:s=0,pageHeight:c=0,surroundElementList:l=[]}=e,u=t.getOptions(),{defaultSize:d,scale:f,imgCaption:p,table:{tdPadding:m,defaultColMinWidth:h,overflow:_},defaultTabWidth:v,hangPunctuation:b}=u,x=t.getDefaultBasicRowMarginHeight(),S=document.createElement(`canvas`).getContext(`2d`),C=t.getTextParticle(),w=t.getListParticle();this.consumeControlMinWidthPlaceholders(r);let T=w.computeListStyle(S,r),E=e.resume?.startIndex??0,D=v*f,k=r[E],A=0,j=!0,M=!e.resume||k?.value===``&&!k?.listWrap;if(!M){let e=0;for(let t=E-1;t>=0;t--){let n=r[t];if(n.value===``&&!n.listWrap){e=t;break}}let t=r[e]?.value===``&&!r[e].listWrap?e+1:e;for(let e=t;e<E;e++){let t=r[e];if(t.type===B.TAB)A+=D;else if(t.value!==``)break}}let N=hi(r,E),P=M?(N?.indentLeft??0)+(N?.indentFirstLine??0):k?.indentLeft??0,F=Math.max(P,0)*f+(M?0:A),L=[],R=i&&!a?t.getColumnLayout():null,z=!!R&&R.count>1;if(r.length){let t={width:0,height:0,ascent:0,elementList:[],startIndex:E,rowIndex:e.resume?.state.rowIndex??0,rowFlex:r[E]?.rowFlex||r[E+1]?.rowFlex,...z?{columnIndex:0}:{}};F>0&&(t.offsetX=F),L.push(t)}let ee=o,te=s,V=0,ne=u.paperDirection,re=t.getMargins(ne),H=n,ae=o,W=c,G=s;i&&!a&&(G=re[0]+t.getHeader().getExtraHeight(0),te=G);let se=new Map,ce=0,le=0,ue=0;if(e.resume){let n=e.resume.state;ee=n.x,te=n.y,V=n.pageNo,G=n.pageStartY,ne=n.direction,re=n.margins,H=n.innerWidth,ae=n.startX,W=n.pageHeight,ue=n.column,ce=n.controlRealWidth;for(let[e,t]of n.listIndexMap)se.set(e,t);R=t.getColumnLayout(ne),z=!!R&&R.count>1}let de=u.incrementalCompute&&!a&&t.isMainElementList(r),fe=(e,t,n)=>({rowIndex:e,x:t,y:te,pageNo:V,pageStartY:G,direction:ne,margins:re,innerWidth:H,startX:ae,pageHeight:W,column:ue,controlRealWidth:n,listIndexMap:new Map(se)});de&&L.length&&t.getIncrementalRowComputer().recordSnapshot(L[0],fe(L[0].rowIndex,ee,ce));for(let n=E;n<r.length;n++){let o=L[L.length-1],s=r[n];if(e.resume?.shouldAbort?.(s,n))break;j&&(s.type===B.TAB?A+=D:s.value!==``&&(j=!1));let c=ce,v=t.getElementRowMargin(s),w={width:0,height:0,boundingBoxAscent:0,boundingBoxDescent:0},k=o.offsetX||s.listId&&(T.get(s.listId)||0)+(s.listLevel?t.getListParticle().LIST_INDENT_WIDTH*s.listLevel*f:0)||0,M=(z&&R?R.width:H)-k-(s.indentRight||0)*f,N=o.elementList.length===1;if(ee+=N?k:0,te+=N&&o.offsetY||0,(s.hide||s.control?.hide||s.area?.hide&&!t.isAreaHideDisabled()||t.getTraceParticle().isTraceHidden(s))&&!t.isDesignMode()){let t=o.elementList[o.elementList.length-1]||(n===E?e.resume?.preRowLastElement:void 0);w.height=t?.metrics.height||d*f,w.boundingBoxAscent=t?.metrics.boundingBoxAscent||0,w.boundingBoxDescent=t?.metrics.boundingBoxDescent||0}else if(s.type===B.IMAGE||s.type===B.LATEX){if(s.imgDisplay===g.SURROUND||s.imgDisplay===g.FLOAT_TOP||s.imgDisplay===g.FLOAT_BOTTOM)w.width=0,w.height=0,w.boundingBoxDescent=0;else{let e=s.width*f,t=s.height*f;if(e>M){let n=t*M/e;s.width=M/f,s.height=n/f,w.width=M,w.height=n,w.boundingBoxDescent=n}else w.width=e,w.height=t,w.boundingBoxDescent=t;if(s.imgCaption?.value){let e=((s.imgCaption.size||p.size)+(s.imgCaption.top??p.top))*f;w.boundingBoxAscent+=e}}}else if(s.type===B.TABLE){let e=m[1]+m[3],a=m[0]+m[2],o=s.trList,c=a+d+v*2/f;for(let e=0;e<o.length;e++){let t=o[e];t.height=Math.max(c,t.minHeight||0),t.minHeight=t.height}_||(vi(s.colgroup,t.getOriginalInnerWidth(),h),s.translateX=0),t.getTableParticle().computeRowColInfo(s);for(let t=0;t<o.length;t++){let n=o[t];for(let r=0;r<n.tdList.length;r++){let s=n.tdList[r],c=this.computeRowList({innerWidth:(s.width-e)*f,elementList:s.value,isFromTable:!0,isPagingMode:i}),l=c.reduce((e,t)=>e+t.height,0);s.rowList=c;let u=l/f+a;if(s.height<u){let e=u-s.height,n=o[t+s.rowspan-1];n.height+=e,n.tdList.forEach(t=>{t.height+=e,t.realHeight?t.realHeight+=e:t.realHeight=t.height})}let d=0,p=0,m=0;for(;m<s.rowspan;){let e=o[m+t]||o[t];d+=e.minHeight,p+=e.height,m++}s.realMinHeight=d,s.realHeight=p,s.mainHeight=u}}let l=t.getTableParticle().getTrListGroupByCol(o);for(let e=0;e<l.length;e++){let t=l[e],n=-1;for(let e=0;e<t.tdList.length;e++){let r=t.tdList[e],i=r.realHeight,a=r.mainHeight,o=r.realMinHeight,s=a<o?i-o:i-a;(!~n||s<n)&&(n=s)}if(n>0){let t=o[e];t.height-=n,t.tdList.forEach(e=>{e.height-=n,e.realHeight-=n})}}t.getTableParticle().computeRowColInfo(s);let u=t.getTableParticle().getTableHeight(s),p=t.getTableParticle().getTableWidth(s);s.width=p,s.height=u;let g=p*f,y=u*f;w.width=g,w.height=y,w.boundingBoxDescent=y,w.boundingBoxAscent=-v,r[n+1]?.type===B.TABLE&&(w.boundingBoxAscent-=v)}else if(s.type===B.SEPARATOR){let{separator:{lineWidth:e}}=u,t=s.lineWidth||e;s.width=M/f,w.width=M,w.height=t*f,w.boundingBoxAscent=-v,w.boundingBoxDescent=-v+w.height}else if(s.type===B.PAGE_BREAK)s.width=M/f,w.width=M,w.height=d;else if(s.type===B.RADIO||s.controlComponent===U.RADIO){let{width:e,height:t,gap:n}=u.radio,r=e+n*2;s.width=r,w.width=r*f,w.height=t*f}else if(s.type===B.CHECKBOX||s.controlComponent===U.CHECKBOX){let{width:e,height:t,gap:n}=u.checkbox,r=e+n*2;s.width=r,w.width=r*f,w.height=t*f}else if(s.type===B.TAB){let e=z&&R&&R.offsets[ue]||0,t=ee-ae-e,i=this._getHitTabStop(r,n,t,f);if(s.tabLeader=i?.leader,i&&i.type!==oe.LEFT){let e=this._getTabRunWidth(r,n+1,S,C,f),a=i.type===oe.CENTER?e/2:e;w.width=Math.max(i.position*f-t-a,0)}else w.width=i?i.position*f-t:D-t%D;w.height=d*f,w.boundingBoxDescent=0,w.boundingBoxAscent=C.getBasisWordBoundingBoxAscent(S,S.font)}else if(s.isControlMinWidthPlaceholder){w.width=(s.width||0)*f,w.height=d*f,S.font=t.getElementFont(s);let e=C.measureBasisWord(S,s.font);w.boundingBoxAscent=e.actualBoundingBoxAscent*f,w.boundingBoxDescent=e.actualBoundingBoxDescent*f}else if(s.type===B.BLOCK){if(!s.width)w.width=M;else{let e=s.width*f;w.width=Math.min(e,M)}w.height=s.height*f,w.boundingBoxDescent=w.height,w.boundingBoxAscent=0}else if(s.type===B.LABEL){let{defaultSize:e,label:{defaultPadding:n}}=u;S.font=t.getElementFont(s);let r=C.measureText(S,s);w.width=(r.width+n[1]+n[3])*f,w.height=(s.size||e)*f,w.boundingBoxDescent=0,w.boundingBoxAscent=(n[0]+r.actualBoundingBoxAscent)*f}else{let e=s.size||d;(s.type===B.SUPERSCRIPT||s.type===B.SUBSCRIPT)&&(s.actualSize=Math.ceil(e*.6)),w.height=(s.actualSize||e)*f,S.font=t.getElementFont(s),w.width=C.measureText(S,s).width*f,s.letterSpacing&&(w.width+=s.letterSpacing*f);let n=C.measureBasisWord(S,s.font);w.boundingBoxAscent=n.actualBoundingBoxAscent*f,w.boundingBoxDescent=n.actualBoundingBoxDescent*f,s.type===B.SUPERSCRIPT?w.boundingBoxAscent+=w.height/2:s.type===B.SUBSCRIPT&&(w.boundingBoxDescent+=w.height/2)}let P=!s.hide&&!t.getTraceParticle().isTraceHidden(s)&&(s.imgDisplay!==g.INLINE&&s.type===B.IMAGE||s.type===B.LATEX)?w.height+v:w.boundingBoxAscent+v,F=v+w.boundingBoxAscent+w.boundingBoxDescent+v,pe=Object.assign(s,{metrics:w,left:0,style:t.getElementFont(s,f),hang:!1});if(pe.control?.minWidth&&!pe.isControlMinWidthPlaceholder&&!t.getTraceParticle().isTraceHidden(pe)&&(pe.controlComponent&&(ce+=w.width),pe.controlComponent===U.POSTFIX)){let e=pe.control.minWidth*f-ce,i=Math.max(M-o.width-pe.metrics.width,0);t.getControl().setMinWidthControlInfo({row:o,rowElement:pe,availableWidth:M,controlRealWidth:ce});let a=e-i,s=[];for(;a>0;){let e=Math.min(a,M);s.push({...pe,value:``,width:e/f,left:0,isControlMinWidthPlaceholder:!0}),a-=e}s.length&&(r.splice(n+1,0,...s),this.markControlMinWidthPlaceholders(r)),ce=0}let me=r[n-1],he=r[n+1],ge=o.width+w.width+le;if(u.wordBreak===I.BREAK_WORD&&(!me?.type||me?.type===B.TEXT)&&(!s.type||s.type===B.TEXT)){let e=`${me?.value||``}${s.value}`;if(t.isWordLike(e)){let{width:e,endElement:t}=C.measureWord(S,r,n),i=e*f;t&&i<=M&&(ge+=i,he=t)}let i=b&&this._isHangPunctuation(he)?0:C.measurePunctuationWidth(S,he);ge+=i*f}s.listId&&s.value===``&&!s.listWrap&&(se.has(s.listId)?se.set(s.listId,(se.get(s.listId)??0)+1):se.set(s.listId,0));let _e=t.getPosition().setSurroundPosition({pageNo:V,rowElement:pe,row:o,rowElementRect:{x:ee,y:te,height:F,width:w.width},availableWidth:M,surroundElementList:l});ee=_e.x,ge+=_e.rowIncreaseWidth,ee+=w.width;let ve=s.type===B.SEPARATOR||s.type===B.TABLE||me?.type===B.TABLE||me?.type===B.BLOCK||s.type===B.BLOCK||me?.type===B.PAGE_BREAK||me?.imgDisplay===g.INLINE||s.imgDisplay===g.INLINE||me?.listId!==s.listId||me?.areaId!==s.areaId&&!(s.area?.hide&&!t.isAreaHideDisabled())||s.control?.flexDirection===y.COLUMN&&(s.controlComponent===U.CHECKBOX||s.controlComponent===U.RADIO)&&me?.controlComponent===U.VALUE||n!==0&&s.value===``&&!(s.area?.hide&&!t.isAreaHideDisabled()),ye=ge>M,K=ve||ye;if(b&&ye&&!ve&&o.width>0&&this._isHangPunctuation(s))o.elementList.push(pe),pe.hang=!0,le+=w.width,o.height<F&&(o.height=F,o.ascent=P);else if(K){le=0;let e={width:w.width,height:F,startIndex:n,elementList:[pe],ascent:P,rowIndex:o.rowIndex+1,rowFlex:r[n]?.rowFlex||r[n+1]?.rowFlex,isPageBreak:s.type===B.PAGE_BREAK,...z?{columnIndex:ue}:{}};e.isPageBreak&&s.paperDirection&&(e.paperDirection=s.paperDirection);let i=!1;if(pe.controlComponent!==U.PREFIX&&pe.control?.indentation===ie.VALUE_START){let n=o.elementList.findIndex(e=>e.controlId===pe.controlId&&e.controlComponent!==U.PREFIX);if(~n){let r=t.getPosition().computeRowPosition({row:o,innerWidth:H})[n];r&&(e.offsetX=r.coordinate.leftTop[0],i=!0)}}s.listId&&(e.isList=!0,e.offsetX=(e.offsetX||0)+(T.get(s.listId)||0)+(s.listLevel?t.getListParticle().LIST_INDENT_WIDTH*s.listLevel*f:0),e.listIndex=se.get(s.listId)??0);let c=s.value===``&&!s.listWrap;if(c&&(A=0,j=!0),!i){let t=c?hi(r,n):s,i=t?.indentLeft,a=c?t?.indentFirstLine:0,o=c?0:A,l=Math.max((i||0)+(a||0),0)*f+o;l>0&&(e.offsetX=(e.offsetX||0)+l)}e.offsetY=!a&&s.area?.top&&s.areaId!==r[n-1]?.areaId?s.area.top*f:0,s.value===``&&!s.listWrap&&(e.offsetY+=(s.spacingBefore||r[n+1]?.spacingBefore||0)*f),L.push(e)}else e.resume&&o.elementList.length===0&&n!==0&&(s.listId&&(o.isList=!0,o.offsetX=(T.get(s.listId)||0)+(s.listLevel?t.getListParticle().LIST_INDENT_WIDTH*s.listLevel*f:0),o.listIndex=se.get(s.listId)??0),o.offsetY=!a&&s.area?.top&&s.areaId!==r[n-1]?.areaId?s.area.top*f:0),o.width+=w.width,n===0&&(si(r[1])||r[1]?.areaId)?(o.height=x,o.ascent=x):o.height<F&&(o.height=F,o.ascent=P),o.elementList.push(pe);if(K||n===r.length-1){if(K&&s.value===``&&!s.listWrap){let e=(r[n-1]?.spacingAfter||0)*f;e&&(o.spacingAfter=e,o.height+=e)}if(!t.isDesignMode()&&o.height>0){let e=o.elementList.filter(e=>e.value!==``);e.length>0&&e.every(e=>e.hide||e.control?.hide||e.area?.hide&&!t.isAreaHideDisabled()||t.getTraceParticle().isTraceHidden(e))&&(o.height=0)}if(o.isWidthNotEnough=ye&&!ve,!o.isSurround&&(me?.rowFlex===O.JUSTIFY||me?.rowFlex===O.ALIGNMENT&&o.isWidthNotEnough)){let e=(o.elementList[0]?.value===``?o.elementList.slice(1):o.elementList).filter(e=>!e.hang),t=(M-o.width)/(e.length-1);for(let n=0;n<e.length-1;n++){let r=e[n];r.metrics.width+=t}o.width=M}}if(K){let r=R&&R.offsets[ue]||0;if(ee=ae+r,te+=o.height,i&&!a&&W){let e=s.type===B.PAGE_BREAK,n=s.paperDirection||u.paperDirection;e&&n!==ne&&(ne=n,re=t.getMargins(ne),H=t.getWidth(ne)-re[1]-re[3],ae=re[3],W=t.getHeight(ne),R=t.getColumnLayout(ne),z=!!R&&R.count>1);let r=t.getMainOuterHeight(V,ne);(te-G+r+F>W||e)&&(!e&&z&&R&&ue<R.count-1?(ue+=1,te=G,ee=ae+(R.offsets[ue]||0)):(ui(l,V),V+=1,ue=0,G=re[0]+t.getHeader().getExtraHeight(V),te=G,ee=ae+(R&&R.offsets[0]||0)))}let d=L[L.length-1];d&&z&&d.columnIndex!==void 0&&(d.columnIndex=ue),pe.left=0;let f=t.getPosition().setSurroundPosition({pageNo:V,rowElement:pe,row:d,rowElementRect:{x:ee,y:te,height:F,width:w.width},availableWidth:M,surroundElementList:l});if(ee=f.x,ee+=w.width,de&&d){let r=fe(d.rowIndex,f.x,c);if(t.getIncrementalRowComputer().recordSnapshot(d,r,pe),e.resume?.converge?.(r,pe,n))break}}}return t.getArea().applyMinHeight(L),L}computePageList(e){let{rowList:t,pageMode:n,paperDirection:r,maxPageNo:i}=e,a=e.elementList,o=!1,s=[[]],c=[r],l=0;if(n===P.CONTINUITY)return s[0]=t,{pageRowList:s,pageDirectionList:c,elementList:a,isElementListTruncated:o};let u=r,d=this.draw.getHeight(u),f=this.draw.getMainOuterHeight(0,u),p;for(let e=0;e<t.length;e++){let n=t[e],m=n.offsetY||0;if(p!==void 0&&n.columnIndex!==void 0&&n.columnIndex>0&&n.columnIndex!==p)f=this.draw.getMainOuterHeight(l,u)+n.height+m,s[l].push(n);else if(n.height+m+f>d||t[e-1]?.isPageBreak){let h=n.areaPadding;if(h&&!t[e-1]?.isPageBreak){let r=n.height-h.height,a=d-f-m;if(r<=a){let o=n.height-a,m=t[e+1];o>0&&(m?(m.offsetY=(m.offsetY||0)+o,m.areaPaddingCarry={areaId:h.areaId,height:o}):(!Number.isInteger(i)||l<i)&&(n.areaPaddingCarry={areaId:h.areaId,height:o},c[l+1]=u,s.push([])));let g=a-r;n.height=a,n.areaPadding=g?{areaId:h.areaId,height:g}:void 0,f=d,s[l].push(n),p=n.columnIndex;continue}}if(Number.isInteger(i)&&l>=i){let e=n.tableFragment,t=a[n.startIndex];a=e&&t?.type===B.TABLE&&this.draw.getTablePaging().truncateTableByFragment(t,e,a)?a.slice(0,n.startIndex+1):a.slice(0,n.startIndex),o=!0;break}l++;let g=t[e-1];g?.isPageBreak&&(u=g.paperDirection||r,d=this.draw.getHeight(u)),c[l]=u,f=this.draw.getMainOuterHeight(l,u)+n.height+m,s.push([n])}else f+=n.height+m,s[l].push(n);p=n.columnIndex}return{pageRowList:s,pageDirectionList:c,elementList:a,isElementListTruncated:o}}_getHitTabStop(e,t,n,r){let i;for(let n=t;n>=0;n--){let r=e[n];if(r.tabStops){i=r.tabStops;break}if(n!==t&&r.value===``&&!r.listWrap)break}if(!i?.length)return;let a;for(let e of i)e.position*r>n+.5&&(!a||e.position<a.position)&&(a=e);return a}_isHangPunctuation(e){return!!e&&w.includes(e.value)&&(!e.type||e.type===B.TEXT)&&!e.controlId&&!e.controlComponent}_getTabRunWidth(e,t,n,r,i){let a=0;for(let o=t;o<e.length;o++){let t=e[o],s=!!t.hide||!!t.control?.hide;if(t.value===``||t.type===B.TAB||t.type&&t.type!==B.TEXT||t.control||t.controlComponent)break;if(s)continue;let c=r.measureText(n,t);a+=c.width*i,t.letterSpacing&&(a+=t.letterSpacing*i)}return a}}})),Ci,wi=o((()=>{D(),Ci=class{ctx;cache;constructor(e){this.ctx=e??document.createElement(`canvas`).getContext(`2d`),this.cache=new Map}measure(e,t,n){let r=n??this.ctx,i=this.measureText(e.value,t,r);return e.width?{...i,width:e.width}:i}measureText(e,t,n){let r=n??this.ctx;r.font=t;let i=`${e}${r.font}`,a=this.cache.get(i);if(a)return a;let o=r.measureText(e),s={width:o.width,actualBoundingBoxAscent:o.actualBoundingBoxAscent,actualBoundingBoxDescent:o.actualBoundingBoxDescent,actualBoundingBoxLeft:o.actualBoundingBoxLeft,actualBoundingBoxRight:o.actualBoundingBoxRight,fontBoundingBoxAscent:o.fontBoundingBoxAscent,fontBoundingBoxDescent:o.fontBoundingBoxDescent};return this.cache.set(i,s),s}measureBasis(e,t){let n=t??this.ctx;n.save();let r=this.measure({value:`中`},e,n);return n.restore(),r}}})),Ti,Ei=o((()=>{Ti=class{render(e,t){let n=t.getOperations();for(let t=0;t<n.length;t++){let r=n[t];if(r.type===`set`){let t=r.value;e[r.property]=this._isRenderPattern(t)?e.createPattern(t.image,t.repetition):t}else if(r.type!==`beginGroup`&&r.type!==`endGroup`){let t=r.type===`fillText`?r.args.slice(0,3):r.args;e[r.type](...t)}}}_isRenderPattern(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`pattern`}}})),Di,Oi=o((()=>{Di=class{pageContainer;visibilityObserver;constructor(e){this.pageContainer=e,this.visibilityObserver=null}create(e,t,n,r,i){let a=document.createElement(`canvas`);a.style.width=`${t}px`,a.style.height=`${n}px`,a.style.display=`block`,a.style.backgroundColor=`#ffffff`,a.style.marginLeft=`auto`,a.style.marginRight=`auto`,a.style.marginBottom=`${r}px`,a.setAttribute(`data-index`,String(e)),this.pageContainer.append(a),a.width=t*i,a.height=n*i,a.style.cursor=`text`;let o=a.getContext(`2d`);return this.initializeContext(o,i),{page:a,ctx:o}}initializeContext(e,t){e.scale(t,t),e.letterSpacing=`0px`,e.wordSpacing=`0px`,e.direction=`ltr`}resize(e,t,n,r,i,a={}){let{gap:o,updateCssHeight:s=!0}=a;e.style.width=`${n}px`,s&&(e.style.height=`${r}px`),o!==void 0&&(e.style.marginBottom=`${o}px`);let c=s?r:Number.parseFloat(e.style.height)||r,l=Math.floor(n*i),u=Math.floor(c*i);(e.width!==l||e.height!==u)&&(e.width=l,e.height=u,this.initializeContext(t,i))}resizeHeight(e,t,n,r){e.style.height=`${n}px`,e.height=n*r,this.initializeContext(t,r)}observeVisibility(e,t){this.disconnectVisibility(),this.visibilityObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(Number(e.target.dataset.index))})}),e.forEach(e=>this.visibilityObserver.observe(e))}disconnectVisibility(){this.visibilityObserver?.disconnect(),this.visibilityObserver=null}}})),ki,Ai=o((()=>{Ei(),Oi(),ki=class{canvas;surface;renderer;pageList;constructor(e){this.canvas=this,this.surface=new Di(e),this.renderer=new Ti,this.pageList=[]}create(e,t,n,r,i){let{page:a}=this.surface.create(e,t,n,r,i);this.pageList.push(a)}resize(e,t,n,r,i={}){this.surface.resize(this.getPage(e),this.getContext(e),t,n,r,i)}resizeHeight(e,t,n){this.surface.resizeHeight(this.getPage(e),this.getContext(e),t,n)}renderPage(e,t){this.renderer.render(this.getContext(e),t)}observeVisibility(e){this.surface.observeVisibility(this.pageList,e)}disconnectVisibility(){this.surface.disconnectVisibility()}getPage(e){return this.pageList[e]}getPageList(){return this.pageList}getContext(e){return this.getPage(e).getContext(`2d`)}destroy(){this.disconnectVisibility()}}})),ji,Mi,Ni=o((()=>{ji=Math.PI*2,Mi=class{commands=[];currentPoint=null;subpathStart=null;moveTo(e,t){this.commands.push(`M ${this._number(e)} ${this._number(t)}`),this.currentPoint={x:e,y:t},this.subpathStart={x:e,y:t}}lineTo(e,t){this.currentPoint?(this.commands.push(`L ${this._number(e)} ${this._number(t)}`),this.currentPoint={x:e,y:t}):this.moveTo(e,t)}rect(e,t,n,r){this.commands.push(`M ${this._number(e)} ${this._number(t)} H ${this._number(e+n)} V ${this._number(t+r)} H ${this._number(e)} Z`),this.currentPoint={x:e,y:t},this.subpathStart={x:e,y:t}}closePath(){this.subpathStart&&(this.commands.push(`Z`),this.currentPoint={...this.subpathStart})}quadraticCurveTo(e,t,n,r){this.currentPoint||this.moveTo(e,t),this.commands.push(`Q ${this._number(e)} ${this._number(t)} ${this._number(n)} ${this._number(r)}`),this.currentPoint={x:n,y:r}}bezierCurveTo(e,t,n,r,i,a){this.currentPoint||this.moveTo(e,t),this.commands.push(`C ${this._number(e)} ${this._number(t)} ${this._number(n)} ${this._number(r)} ${this._number(i)} ${this._number(a)}`),this.currentPoint={x:i,y:a}}arc(e,t,n,r,i,a=!1){if(n<0)throw Error(`Arc radius must not be negative`);let o={x:e+n*Math.cos(r),y:t+n*Math.sin(r)};if(this._connectTo(o),n===0){this.lineTo(e,t);return}let s=i-r;if(!a&&s>=ji||a&&s<=-ji){let i={x:e+n*Math.cos(r+Math.PI),y:t+n*Math.sin(r+Math.PI)},s=+!a;this._arcTo(i,n,1,s),this._arcTo(o,n,1,s);return}let c=a?-s:s;if(c%=ji,c<0&&(c+=ji),c===0)return;let l={x:e+n*Math.cos(i),y:t+n*Math.sin(i)};this._arcTo(l,n,+(c>Math.PI),+!a)}getPathData(){return this.commands.join(` `)}_connectTo(e){this.currentPoint?(this.currentPoint.x!==e.x||this.currentPoint.y!==e.y)&&this.lineTo(e.x,e.y):this.moveTo(e.x,e.y)}_arcTo(e,t,n,r){this.commands.push(`A ${this._number(t)} ${this._number(t)} 0 ${n} ${r} ${this._number(e.x)} ${this._number(e.y)}`),this.currentPoint=e}_number(e){return String(Math.abs(e)<1e-12?0:e)}}}));function Pi(e){let{image:t,repetition:n,resource:r}=e,i=r?`resource:${r.key}:${r.revision??``}`:`content:${Ii(t)}`,{width:a,height:o}=Li(t);return`${i}:${n}:${a}x${o}`}function Fi(e,t,n=`svg`){return`${n}-${e}-${Ri(t)}`}function Ii(e){let t=e,n=t.currentSrc||t.src;if(typeof n==`string`&&n)return n;if(typeof t.toDataURL==`function`)try{return t.toDataURL()}catch{throw Error(`Pattern image requires an explicit resource identity when its content cannot be read`)}throw Error(`Pattern image requires an explicit resource identity or stable serializable content`)}function Li(e){let t=e;return{width:t.naturalWidth||t.videoWidth||Number(t.width)||0,height:t.naturalHeight||t.videoHeight||Number(t.height)||0}}function Ri(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(36)}var zi=o((()=>{})),Bi,Vi,Hi=o((()=>{Ni(),zi(),Bi={start:`start`,left:`start`,center:`middle`,right:`end`,end:`end`},Vi=class{compile(e,t=`svg`){let n={key:`root`,kind:`group`,attributes:{},children:[]},r=[n],i=[new Map],a=new Map,o=new Map,s=this._createInitialState(),c=[],l=new Mi,u=()=>{for(let e=r.length-1;e>=0;e--)if(r[e].kind===`page`)return r[e];return r[r.length-1]},d=e=>{if(!this._isRenderPattern(e))return e;let n=u(),r=Pi(e),i=o.get(n);i||(i=new Map,o.set(n,i));let a=i.get(r);if(!a){a=Fi(`pattern`,r,t),i.set(r,a);let o={key:a,kind:`pattern`,cacheKey:a,attributes:{href:e.image,...Li(e.image),repetition:e.repetition,patternUnits:`userSpaceOnUse`},children:[]};(n.defs||=[]).push(o)}return`url(#${a})`},f=(e,t,n,a)=>{let o=r[r.length-1],c=i[i.length-1],l=c.get(e)||0;c.set(e,l+1);let u={...t};if(a||s.transform.join(`,`)!==`1,0,0,1,0,0`){let e=a?this._multiplyMatrix(s.transform,a):s.transform;u.transform=this._serializeMatrix(e)}s.clipId&&!u[`clip-path`]&&(u[`clip-path`]=`url(#${s.clipId})`);let d=`${o.key}:${n?`source:${n.key}`:`${e}:${l}`}`;if(o.children.some(e=>e.key===d))throw Error(`Duplicate sibling scene key: ${d}`);o.children.push({key:d,kind:e,attributes:u,children:[]})},p=e=>{let t=l.getPathData();if(!t)return;let n=e?{d:t,fill:`none`,stroke:d(s.strokeStyle),"fill-rule":`nonzero`,opacity:s.globalAlpha,"stroke-width":s.lineWidth,"stroke-linecap":s.lineCap,"stroke-linejoin":s.lineJoin,"stroke-dasharray":s.lineDash.length?s.lineDash.join(` `):`none`}:{d:t,fill:d(s.fillStyle),"fill-rule":`nonzero`,opacity:s.globalAlpha};f(`path`,n)};for(let n of e.getOperations())if(n.type===`beginGroup`){let e=r[r.length-1],t;if(n.kind===`layer`){for(let t=r.length-1;t>=0;t--)if(r[t].kind===`page`){e=r[t];break}t=e.children.find(e=>e.key===n.key&&e.kind===`layer`)}if(!t){if(e.children.some(e=>e.key===n.key))throw Error(`Duplicate sibling scene key: ${n.key}`);t={key:n.key,kind:n.kind,attributes:{},children:[]},e.children.push(t)}r.push(t),i.push(new Map)}else if(n.type===`endGroup`){if(r.length===1)throw Error(`Unexpected endGroup operation`);r.pop(),i.pop()}else if(n.type===`set`)n.property in s&&(s[n.property]=n.value);else if(n.type===`save`)c.push({...s,lineDash:[...s.lineDash],transform:[...s.transform]});else if(n.type===`restore`){let e=c.pop();if(!e)throw Error(`Unexpected restore operation`);s=e}else if(n.type===`setLineDash`)s.lineDash=[...n.args[0]];else if(n.type===`translate`){let[e,t]=n.args;s.transform=this._multiplyMatrix(s.transform,[1,0,0,1,e,t])}else if(n.type===`scale`){let[e,t]=n.args;s.transform=this._multiplyMatrix(s.transform,[e,0,0,t,0,0])}else if(n.type===`rotate`){let[e]=n.args,t=Math.cos(e),r=Math.sin(e);s.transform=this._multiplyMatrix(s.transform,[t,r,-r,t,0,0])}else if(n.type===`beginPath`)l=new Mi;else if(n.type===`moveTo`)l.moveTo(...n.args);else if(n.type===`lineTo`)l.lineTo(...n.args);else if(n.type===`rect`)l.rect(...n.args);else if(n.type===`closePath`)l.closePath();else if(n.type===`quadraticCurveTo`)l.quadraticCurveTo(...n.args);else if(n.type===`bezierCurveTo`)l.bezierCurveTo(...n.args);else if(n.type===`arc`)l.arc(...n.args);else if(n.type===`fill`)p(!1);else if(n.type===`stroke`)p(!0);else if(n.type===`clip`){let e=u(),n=a.get(e)||0;a.set(e,n+1);let r=Fi(`clip`,`${e.key}:${n}`,t),i={d:l.getPathData(),"clip-rule":`nonzero`};s.transform.join(`,`)!==`1,0,0,1,0,0`&&(i.transform=this._serializeMatrix(s.transform));let o={key:r,kind:`clipPath`,attributes:s.clipId?{intersects:`url(#${s.clipId})`}:{},children:[{key:`${r}:path`,kind:`path`,attributes:i,children:[]}]};(e.defs||=[]).push(o),s.clipId=r}else if(n.type===`fillRect`){let[e,t,r,i]=n.args;f(`rect`,{x:e,y:t,width:r,height:i,fill:d(s.fillStyle),opacity:s.globalAlpha})}else if(n.type===`strokeRect`){let[e,t,r,i]=n.args;f(`rect`,{x:e,y:t,width:r,height:i,fill:`none`,stroke:d(s.strokeStyle),opacity:s.globalAlpha,"stroke-width":s.lineWidth,"stroke-linecap":s.lineCap,"stroke-linejoin":s.lineJoin,"stroke-dasharray":s.lineDash.length?s.lineDash.join(` `):`none`})}else if(n.type===`fillText`){let[e,t,r,i]=n.args;f(`text`,{x:t,y:r,text:e,fill:d(s.fillStyle),opacity:s.globalAlpha,font:s.font,"dominant-baseline":s.textBaseline,"text-anchor":Bi[s.textAlign],"xml:space":`preserve`},i)}else if(n.type===`drawImage`){let[e,...r]=n.args,i=r.slice(-4),o={href:e,x:i[0],y:i[1],width:i[2],height:i[3],opacity:s.globalAlpha,preserveAspectRatio:`none`},c;if(r.length===8){let[n,i,l,d,f,p,m,h]=r,g=m/l,_=h/d,v=Li(e);o.x=0,o.y=0,o.width=v.width,o.height=v.height,c=[g,0,0,_,f-n*g,p-i*_];let y=u(),b=a.get(y)||0;a.set(y,b+1);let x=Fi(`clip`,`${y.key}:${b}`,t),S={x:f,y:p,width:m,height:h};s.transform.join(`,`)!==`1,0,0,1,0,0`&&(S.transform=this._serializeMatrix(s.transform));let C={key:x,kind:`clipPath`,attributes:s.clipId?{intersects:`url(#${s.clipId})`}:{},children:[{key:`${x}:rect`,kind:`rect`,attributes:S,children:[]}]};(y.defs||=[]).push(C),o[`clip-path`]=`url(#${x})`}f(`image`,o,void 0,c)}if(r.length>1)throw Error(`Unclosed render group: ${r[r.length-1].key}`);if(c.length)throw Error(`Unclosed save operation`);return n}_createInitialState(){return{fillStyle:`#000000`,strokeStyle:`#000000`,font:`10px sans-serif`,globalAlpha:1,textAlign:`start`,textBaseline:`alphabetic`,lineWidth:1,lineCap:`butt`,lineJoin:`miter`,lineDash:[],transform:[1,0,0,1,0,0]}}_isRenderPattern(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`pattern`}_multiplyMatrix(e,t){let[n,r,i,a,o,s]=e,[c,l,u,d,f,p]=t;return[n*c+i*l,r*c+a*l,n*u+i*d,r*u+a*d,n*f+i*p+o,r*f+a*p+s]}_serializeMatrix(e){return`matrix(${e.map(e=>Math.abs(e)<1e-12?0:e).join(` `)})`}}})),Ui,Wi,Gi,Ki=o((()=>{Ui=`http://www.w3.org/2000/svg`,Wi=new Set([`page`,`layer`,`group`,`row`,`table-fragment`,`repeat-header`]),Gi=class{patternHrefs=new Map;create(e){let t=Wi.has(e.kind)?`g`:e.kind,n=document.createElementNS(Ui,t);return this.patch(n,null,e),n}patch(e,t,n){let r=t?this._getAttributes(t):{},i=this._getAttributes(n);for(let t of Object.keys(r))t in i||e.removeAttribute(t);for(let[t,n]of Object.entries(i))r[t]!==n&&e.setAttribute(t,n);let a=t?.attributes.font,o=n.attributes.font;if(a!==o&&(e.style.font=o==null?``:String(o)),n.kind===`text`){let r=t?.kind===`text`?t.attributes.text:void 0,i=n.attributes.text;r!==i&&(e.textContent=i==null?``:String(i))}n.kind===`pattern`&&this._patchPatternImage(e,n)}getChildren(e){return e.children}_patchPatternImage(e,t){let n=e.querySelector(`:scope > image`);n||(n=document.createElementNS(Ui,`image`),e.append(n));let{href:r,width:i,height:a}=t.attributes,o={href:this._getPatternImageHref(t,r),x:0,y:0,width:i,height:a,preserveAspectRatio:`none`};for(let[e,t]of Object.entries(o))if(t==null)n.removeAttribute(e);else{let r=String(t);n.getAttribute(e)!==r&&n.setAttribute(e,r)}}_getAttributes(e){let t={};(e.kind===`clipPath`||e.kind===`pattern`)&&(t.id=e.key);for(let[n,r]of Object.entries(e.attributes)){if(r==null||n===`text`||n===`font`||e.kind===`pattern`&&(n===`href`||n===`repetition`))continue;let i=n===`href`?e.kind===`pattern`?this._getPatternImageHref(e,r):this._getImageHref(r):r;i!=null&&(t[n]=String(i))}return t}_getPatternImageHref(e,t){if(!e.cacheKey)return this._getImageHref(t);let n=this.patternHrefs.get(e.cacheKey);if(n)return this.patternHrefs.delete(e.cacheKey),this.patternHrefs.set(e.cacheKey,n),n;let r=this._getImageHref(t);if(r){if(this.patternHrefs.size>=32){let e=this.patternHrefs.keys().next().value;e&&this.patternHrefs.delete(e)}this.patternHrefs.set(e.cacheKey,r)}return r}_getImageHref(e){if(typeof e==`string`)return e;if(typeof HTMLImageElement<`u`&&e instanceof HTMLImageElement)return e.currentSrc||e.src;if(typeof HTMLCanvasElement<`u`&&e instanceof HTMLCanvasElement)return e.toDataURL()}}})),qi,Ji=o((()=>{Ki(),qi=class{factory=new Gi;elements=new WeakMap;rootScenes=new WeakMap;definitionElements=new WeakMap;reconcile(e,t,n=this.rootScenes.get(e)){return this._reconcileChildren(e,n?[n]:[],[t]),this.rootScenes.set(e,t),this.elements.get(t)}_mount(e){let t=this.factory.create(e);return this.elements.set(e,t),this._reconcileDefinitions(t,null,e),this._reconcileChildren(t,[],this.factory.getChildren(e)),t}_patch(e,t,n){return this.factory.patch(e,t,n),this._reconcileDefinitions(e,t,n),this._reconcileChildren(e,this.factory.getChildren(t),this.factory.getChildren(n)),this.elements.delete(t),this.elements.set(n,e),e}_reconcileDefinitions(e,t,n){let r=t&&`defs`in t&&t.defs||[],i=`defs`in n&&n.defs||[],a=this.definitionElements.get(e);i.length?(a||(a=document.createElementNS(Ui,`defs`),e.insertBefore(a,e.firstChild),this.definitionElements.set(e,a)),this._reconcileChildren(a,r,i)):a&&(a.remove(),this.definitionElements.delete(e))}_reconcileChildren(e,t,n){let r=new Map(t.map(e=>[e.key,e])),i=new Set,a=n.map(e=>{let t=r.get(e.key);if(t&&t.kind===e.kind){i.add(t);let n=this.elements.get(t);return t===e?n:this._patch(n,t,e)}return this._mount(e)});for(let e of t)i.has(e)||this.elements.get(e)?.remove();let o=this.definitionElements.get(e);a.forEach((t,n)=>{let r=n?a[n-1].nextSibling:o?o.nextSibling:e.firstChild;r!==t&&e.insertBefore(t,r)})}}})),Yi,Xi,Zi=o((()=>{Hi(),Ji(),Yi=0,Xi=class{compiler;reconciler;resourceScopes;constructor(){this.compiler=new Vi,this.reconciler=new qi,this.resourceScopes=new WeakMap}render(e,t){let n=this.compiler.compile(t,this._getResourceScope(e));this.reconciler.reconcile(e,n)}_getResourceScope(e){let t=this.resourceScopes.get(e);return t||(t=`svg-host-${++Yi}`,this.resourceScopes.set(e,t)),t}}})),Qi,$i=o((()=>{Ki(),Qi=class{pageContainer;visibilityObserver;constructor(e){this.pageContainer=e,this.visibilityObserver=null}create(e,t,n,r){let i=document.createElementNS(Ui,`svg`);return i.style.width=`${t}px`,i.style.height=`${n}px`,i.style.display=`block`,i.style.backgroundColor=`#ffffff`,i.style.marginLeft=`auto`,i.style.marginRight=`auto`,i.style.marginBottom=`${r}px`,i.style.cursor=`text`,i.style.userSelect=`none`,i.setAttribute(`data-index`,String(e)),i.setAttribute(`viewBox`,`0 0 ${t} ${n}`),this.pageContainer.append(i),{page:i}}resize(e,t,n,r={}){let{gap:i,updateCssHeight:a=!0}=r;e.style.width=`${t}px`,a&&(e.style.height=`${n}px`),i!==void 0&&(e.style.marginBottom=`${i}px`);let o=`0 0 ${t} ${a?n:Number.parseFloat(e.style.height)||n}`;e.getAttribute(`viewBox`)!==o&&e.setAttribute(`viewBox`,o)}resizeHeight(e,t){e.style.height=`${t}px`;let n=`0 0 ${Number.parseFloat(e.style.width)} ${t}`;e.getAttribute(`viewBox`)!==n&&e.setAttribute(`viewBox`,n)}observeVisibility(e,t){this.disconnectVisibility(),this.visibilityObserver=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&t(Number(e.target.getAttribute(`data-index`)))})}),e.forEach(e=>this.visibilityObserver.observe(e))}disconnectVisibility(){this.visibilityObserver?.disconnect(),this.visibilityObserver=null}}})),ea,ta=o((()=>{Zi(),$i(),ea=class{canvas=null;surface;renderer;pageList;renderedPages;pendingPages;frameId;constructor(e){this.surface=new Qi(e),this.renderer=new Xi,this.pageList=[],this.renderedPages=new WeakSet,this.pendingPages=new Map,this.frameId=null}create(e,t,n,r,i){let{page:a}=this.surface.create(e,t,n,r);this.pageList.push(a)}resize(e,t,n,r,i={}){this.surface.resize(this.getPage(e),t,n,i)}resizeHeight(e,t,n){this.surface.resizeHeight(this.getPage(e),t)}renderPage(e,t){let n=this.getPage(e);this.renderedPages.has(n)?(this.pendingPages.set(n,t),this.frameId===null&&(this.frameId=requestAnimationFrame(()=>this.flush()))):(this.renderer.render(n,t),this.renderedPages.add(n))}flush(){this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null);let e=Array.from(this.pendingPages);this.pendingPages.clear();for(let[t,n]of e)this.renderer.render(t,n)}observeVisibility(e){this.surface.observeVisibility(this.pageList,e)}disconnectVisibility(){this.surface.disconnectVisibility()}getPage(e){return this.pageList[e]}getPageList(){return this.pageList}destroy(){this.disconnectVisibility(),this.frameId!==null&&(cancelAnimationFrame(this.frameId),this.frameId=null),this.pendingPages.clear()}}}));function na(e=R.CANVAS,t){if(e===R.CANVAS)return new ki(t);if(e===R.SVG)return new ea(t);throw Error(`Unsupported render backend: ${e}`)}var ra=o((()=>{z(),Ai(),ta()})),ia,aa=o((()=>{ia=class{operations;state;stateStack;constructor(){this.operations=[],this.state={lineWidth:1,lineDash:[]},this.stateStack=[]}getOperations(){return this.operations}get lineWidth(){return this.state.lineWidth}set lineWidth(e){this.state.lineWidth=e,this.set(`lineWidth`,e)}set fillStyle(e){this.set(`fillStyle`,e)}set strokeStyle(e){this.set(`strokeStyle`,e)}set font(e){this.set(`font`,e)}set globalAlpha(e){this.set(`globalAlpha`,e)}set textAlign(e){this.set(`textAlign`,e)}set textBaseline(e){this.set(`textBaseline`,e)}set lineCap(e){this.set(`lineCap`,e)}set lineJoin(e){this.set(`lineJoin`,e)}setLineDash(e){this.state.lineDash=[...e],this.record(`setLineDash`,e)}getLineDash(){return[...this.state.lineDash]}createPattern(e,t,n){return{type:`pattern`,image:e,repetition:t,resource:n}}beginGroup(e,t){this.operations.push({type:`beginGroup`,key:e,kind:t})}endGroup(){this.operations.push({type:`endGroup`})}save(){this.stateStack.push({...this.state}),this.record(`save`)}restore(){let e=this.stateStack.pop();e&&(this.state=e),this.record(`restore`)}fillRect(e,t,n,r){this.record(`fillRect`,e,t,n,r)}beginPath(){this.record(`beginPath`)}moveTo(e,t){this.record(`moveTo`,e,t)}lineTo(e,t){this.record(`lineTo`,e,t)}arc(e,t,n,r,i,a){this.record(`arc`,e,t,n,r,i,a)}quadraticCurveTo(e,t,n,r){this.record(`quadraticCurveTo`,e,t,n,r)}bezierCurveTo(e,t,n,r,i,a){this.record(`bezierCurveTo`,e,t,n,r,i,a)}rect(e,t,n,r){this.record(`rect`,e,t,n,r)}closePath(){this.record(`closePath`)}fill(){this.record(`fill`)}strokeRect(e,t,n,r){this.record(`strokeRect`,e,t,n,r)}scale(e,t){this.record(`scale`,e,t)}rotate(e){this.record(`rotate`,e)}clip(){this.record(`clip`)}fillText(e,t,n){this.record(`fillText`,e,t,n)}fillTextWithSource(e,t,n,r){this.record(`fillText`,e,t,n,r)}translate(e,t){this.record(`translate`,e,t)}stroke(){this.record(`stroke`)}drawImage(e,...t){this.record(`drawImage`,e,...t)}set(e,t){this.operations.push({type:`set`,property:e,value:t})}record(e,...t){this.operations.push({type:e,args:t})}}}));function oa(e){return`source-text:${e}`}function sa(e){return`page:${e}`}function ca(e,t){return`${sa(e)}:layer:${t}`}function la(e,t){return`zone:${t}:${e}`}function ua(e){let{zoneKey:t,containerKey:n,occurrence:r}=e;return`row:${t}:${n}:${r}`}function da(e){let{containerKey:t,tableId:n,tablePath:r,startTrIndex:i,endTrIndex:a,startSplitTrOffset:o,endSplitTrHeight:s}=e;return`fragment:${t}:${JSON.stringify([n??``,r,i,a,o??0,s??0])}`}function fa(e){let{fragmentKey:t,trIndex:n,tdIndex:r,tdId:i}=e;return`repeat:${t}:${n}:${r}:${i??``}`}var pa=o((()=>{})),ma,ha=o((()=>{ma=function(e){return e.UP=`top`,e.DOWN=`down`,e.LEFT=`left`,e.RIGHT=`right`,e}({})})),ga,_a,va,ya,ba=o((()=>{ga=typeof navigator<`u`&&/Mac OS X/.test(navigator.userAgent),_a=typeof navigator<`u`&&/iPad|iPhone/.test(navigator.userAgent),va=/Mobile|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),ya=typeof navigator<`u`&&/Firefox/.test(navigator.userAgent)}));function xa(e){localStorage.setItem(Xe,JSON.stringify({text:e.text,elementList:e.elementList}))}function Sa(){let e=localStorage.getItem(Xe);return e?JSON.parse(e):null}function Ca(){localStorage.removeItem(Xe)}async function wa(e,t,n){if(!e&&!t&&!n.length)return;let r=new Blob([e],{type:`text/plain`}),i=new Blob([t],{type:`text/html`});if(window.ClipboardItem){let e=new ClipboardItem({[r.type]:r,[i.type]:i});await window.navigator.clipboard.write([e])}else{let e=document.createElement(`div`);e.setAttribute(`contenteditable`,`true`),e.innerHTML=t,document.body.append(e);let n=window.getSelection(),r=document.createRange(),i=document.createElement(`span`);i.innerText=`
|
|
68
|
+
`,e.append(i),r.selectNodeContents(e),n?.removeAllRanges(),n?.addRange(r),document.execCommand(`copy`),e.remove()}xa({text:e,elementList:n})}async function Ta(e,t){let n=Rr(e),r=ti(n,t);document.body.append(r);let i=r.innerText;r.remove();let a=r.innerHTML;(i||a||n.length)&&await wa(i,a,X(n,{isClone:!1}))}function Ea(e){let t=!1;for(let n=0;n<e.items.length;n++)if(e.items[n].kind===`file`){t=!0;break}return t}var Da=o((()=>{Qe(),gi()}));function Oa(e,t){let n=e.getDraw();if(n.isReadonly()||n.isDisabled()||n.getControl().getIsDisabledPasteControl())return;let r=n.getRange(),{startIndex:i}=r.getRange(),a=n.getElementList();if(~i&&!r.getIsSelectAll()){let e=a[i];if(e?.titleId||e?.listId){let n=0;for(;n<t.length;){let r=t[n];if(e.titleId&&/^\n/.test(r.value))break;if(Gt.includes(r.type)){if(t.splice(n,1),r.valueList)for(let e=0;e<r.valueList.length;e++){let i=r.valueList[e];i.value!==``&&i.value!==`
|
|
69
|
+
`&&(t.splice(n,0,i),n++)}n--}n++}}Zr(a,t,i,{isBreakWhenWrap:!0,editorOptions:n.getOptions()})}mi(t,e=>{delete e.trace}),n.insertElementList(t)}function ka(e,t){let n=e.getDraw();n.isReadonly()||n.isDisabled()||Oa(e,ri(t,{innerWidth:n.getOriginalInnerWidth()}))}function Aa(e,t){let n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;let{pasteImage:r}=n.getOverride();if(r&&r(t)?.preventDefault!==!1)return;let{startIndex:i}=n.getRange().getRange(),a=n.getElementList(),o=new FileReader;o.readAsDataURL(t),o.onload=()=>{let e=new Image,t=o.result;e.src=t,e.onload=()=>{let r={value:t,type:B.IMAGE,width:e.width,height:e.height};~i&&Zr(a,[r],i,{editorOptions:n.getOptions()}),n.insertElementList([r])}}}function ja(e,t){let n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;let r=t.clipboardData;if(!r)return;let{paste:i}=n.getOverride();if(i&&i(t)?.preventDefault!==!1)return;if(!Ea(r)){let t=r.getData(`text`),n=Sa();if(n&&We(t)===We(n.text)){Oa(e,n.elementList);return}}Ca();let a=!1;for(let e=0;e<r.items.length;e++)if(r.items[e].type===`text/html`){a=!0;break}for(let t=0;t<r.items.length;t++){let n=r.items[t];if(n.kind===`string`){if(n.type===`text/plain`&&!a){n.getAsString(t=>{e.input(t)});break}if(n.type===`text/html`&&a){n.getAsString(t=>{ka(e,t)});break}}else if(n.kind===`file`&&n.type.includes(`image`)){let t=n.getAsFile();t&&Aa(e,t)}}}async function Ma(e,t){let n=e.getDraw();if(n.isReadonly()||n.isDisabled())return;let{paste:r}=n.getOverride();if(r&&r()?.preventDefault!==!1)return;let i=await navigator.clipboard.readText(),a=Sa();if(a&&We(i)===We(a.text))Oa(e,a.elementList);else if(Ca(),t?.isPlainText)i&&e.input(i);else{let t=await navigator.clipboard.read(),n=!1;for(let e of t)if(e.types.includes(`text/html`)){n=!0;break}for(let r of t)if(r.types.includes(`text/plain`)&&!n){let t=await(await r.getType(`text/plain`)).text();t&&e.input(t)}else if(r.types.includes(`text/html`)&&n){let t=await(await r.getType(`text/html`)).text();t&&ka(e,t)}else if(r.types.some(e=>e.startsWith(`image/`))){let t=r.types.find(e=>e.startsWith(`image/`));Aa(e,await r.getType(t))}}}var Na=o((()=>{D(),Kt(),V(),Da(),gi(),J()})),Pa,Fa=o((()=>{Qe(),Na(),Pa=class{draw;container;agentCursorDom;canvasEvent;eventBus;constructor(e,t){this.draw=e,this.container=e.getContainer(),this.canvasEvent=t,this.eventBus=e.getEventBus();let n=document.createElement(`textarea`);n.autocomplete=`off`,n.classList.add(`ce-inputarea`),n.innerText=``,this.agentCursorDom=n,e.getOptions().displayOnly||(this.container.append(n),n.onkeydown=e=>this._keyDown(e),n.oninput=this._input.bind(this),n.onpaste=e=>this._paste(e),n.addEventListener(`compositionstart`,this._compositionstart.bind(this)),n.addEventListener(`compositionend`,this._compositionend.bind(this)))}getAgentCursorDom(){return this.agentCursorDom}_keyDown(e){this.canvasEvent.keydown(e)}_input(e){let t=e.data;t&&this.canvasEvent.input(t),this.eventBus.isSubscribe(`input`)&&this.eventBus.emit(`input`,e)}_paste(e){this.draw.isReadonly()||e.clipboardData&&(ja(this.canvasEvent,e),e.preventDefault())}_compositionstart(){this.canvasEvent.compositionstart()}_compositionend(e){this.canvasEvent.compositionend(e)}}})),Ia,La=o((()=>{An(),Qe(),ha(),J(),ba(),Fa(),Ia=class{ANIMATION_CLASS=`ce-cursor--animation`;draw;container;options;position;cursorDom;cursorAgent;blinkTimeout;hitLineStartIndex;constructor(e,t){this.draw=e,this.container=e.getContainer(),this.position=e.getPosition(),this.options=e.getOptions(),this.cursorDom=document.createElement(`div`),this.cursorDom.classList.add(`ce-cursor`),this.options.displayOnly||this.container.append(this.cursorDom),this.cursorAgent=new Pa(e,t),this.blinkTimeout=null}getCursorDom(){return this.cursorDom}getAgentDom(){return this.cursorAgent.getAgentCursorDom()}getAgentIsActive(){return this.getAgentDom()===document.activeElement}getAgentDomValue(){return this.getAgentDom().value}clearAgentDomValue(){this.getAgentDom().value=``}getHitLineStartIndex(){return this.hitLineStartIndex}_blinkStart(){this.cursorDom.classList.add(this.ANIMATION_CLASS)}_blinkStop(){this.cursorDom.classList.remove(this.ANIMATION_CLASS)}_setBlinkTimeout(){this._clearBlinkTimeout(),this.blinkTimeout=window.setTimeout(()=>{this._blinkStart()},500)}_clearBlinkTimeout(){this.blinkTimeout&&=(this._blinkStop(),window.clearTimeout(this.blinkTimeout),null)}focus(){if(va&&this.draw.isReadonly())return;let e=this.cursorAgent.getAgentCursorDom();document.activeElement!==e&&(e.focus({preventScroll:!0}),e.setSelectionRange(0,0))}drawCursor(e){let t=this.position.getCursorPosition();if(!t)return;let{scale:n,cursor:r}=this.options,{color:i,width:a,isShow:o=!0,isBlink:s=!0,isFocus:c=!0,hitLineStartIndex:l}={...r,...e};this.hitLineStartIndex=l,l&&(t=this.position.getPositionList()[l]);let{metrics:u,coordinate:{leftTop:d,rightTop:f},ascent:p,pageNo:m}=t,h=this.draw.getZone().isMainActive()?m:this.draw.getPageNo(),{x:g,y:_}=this.draw.getPageOffset(h),v=12*n,y=Math.min(u.height/4,v),b=u.height+y*2,x=this.cursorAgent.getAgentCursorDom();c&&setTimeout(()=>{this.focus()});let S=u.boundingBoxDescent<0?0:u.boundingBoxDescent,C=d[1]+p+S-(b-y)+_,w=(l?d[0]:f[0])+g;if(x.style.left=`${w}px`,x.style.top=`${C+b-v}px`,!o){this.recoveryCursor();return}let T=this.cursorDom.style.top,E=this.draw.isReadonly();this.cursorDom.style.width=`${a*n}px`,this.cursorDom.style.backgroundColor=i,this.cursorDom.style.left=`${w}px`,this.cursorDom.style.top=`${C}px`,this.cursorDom.style.display=E?`none`:`block`,this.cursorDom.style.height=`${b}px`,s?this._setBlinkTimeout():this._clearBlinkTimeout(),c&&je(()=>{this.moveCursorToVisible({cursorPosition:t,direction:parseInt(T)>C?ma.UP:ma.DOWN})})}recoveryCursor(){this.cursorDom.style.display=`none`,this._clearBlinkTimeout()}moveCursorToVisible(e){let{cursorPosition:t,direction:n}=e;if(!t||!n)return;let r=this.draw.getZone().isMainActive()?t.pageNo:this.draw.getPageNo(),{coordinate:{leftTop:i,leftBottom:a}}=t,o=Re(this.container),s={left:0,right:0,top:0,bottom:0},c=o===document.documentElement;if(c)s.right=window.innerWidth,s.bottom=window.innerHeight;else{let{left:e,right:t,top:n,bottom:r}=o.getBoundingClientRect();s.left=e,s.right=t,s.top=n,s.bottom=r}let l=this.draw.getPageOffset(r).y+this.container.getBoundingClientRect().top,u=n===ma.UP,d=a[0]+(c?0:s.left),f=u?i[1]+l:a[1]+l,{maskMargin:p}=this.options;if(s.top+=p[0],s.bottom-=p[2],!(d>=s.left&&d<=s.right&&f>=s.top&&f<=s.bottom)){let{scrollLeft:e,scrollTop:t}=o;u?o.scroll(e,t-(s.top-f)):o.scroll(e,t+f-s.bottom)}}}})),Ra,za=o((()=>{Ra=function(e){return e[e.LEFT=0]=`LEFT`,e[e.CENTER=1]=`CENTER`,e[e.RIGHT=2]=`RIGHT`,e}({})}));function Ba(e){return ga?e.metaKey:e.ctrlKey}var Va=o((()=>{ba()})),Z,Ha=o((()=>{Z=function(e){return e.Delete=`Delete`,e.Backspace=`Backspace`,e.ALT=`Alt`,e.Enter=`Enter`,e.Left=`ArrowLeft`,e.Right=`ArrowRight`,e.Up=`ArrowUp`,e.Down=`ArrowDown`,e.Home=`Home`,e.End=`End`,e.ESC=`Escape`,e.TAB=`Tab`,e.META=`Meta`,e.LEFT_BRACKET=`[`,e.RIGHT_BRACKET=`]`,e.COMMA=`,`,e.PERIOD=`.`,e.LEFT_ANGLE_BRACKET=`<`,e.RIGHT_ANGLE_BRACKET=`>`,e.EQUAL=`=`,e.MINUS=`-`,e.PLUS=`+`,e.A=`a`,e.B=`b`,e.C=`c`,e.D=`d`,e.E=`e`,e.F=`f`,e.G=`g`,e.H=`h`,e.I=`i`,e.J=`j`,e.K=`k`,e.L=`l`,e.M=`m`,e.N=`n`,e.O=`o`,e.P=`p`,e.Q=`q`,e.R=`r`,e.S=`s`,e.T=`t`,e.U=`u`,e.V=`v`,e.W=`w`,e.X=`x`,e.Y=`y`,e.Z=`z`,e.A_UPPERCASE=`A`,e.B_UPPERCASE=`B`,e.C_UPPERCASE=`C`,e.D_UPPERCASE=`D`,e.E_UPPERCASE=`E`,e.F_UPPERCASE=`F`,e.G_UPPERCASE=`G`,e.H_UPPERCASE=`H`,e.I_UPPERCASE=`I`,e.J_UPPERCASE=`J`,e.K_UPPERCASE=`K`,e.L_UPPERCASE=`L`,e.M_UPPERCASE=`M`,e.N_UPPERCASE=`N`,e.O_UPPERCASE=`O`,e.P_UPPERCASE=`P`,e.Q_UPPERCASE=`Q`,e.R_UPPERCASE=`R`,e.S_UPPERCASE=`S`,e.T_UPPERCASE=`T`,e.U_UPPERCASE=`U`,e.V_UPPERCASE=`V`,e.W_UPPERCASE=`W`,e.X_UPPERCASE=`X`,e.Y_UPPERCASE=`Y`,e.Z_UPPERCASE=`Z`,e.ZERO=`0`,e.ONE=`1`,e.TWO=`2`,e.THREE=`3`,e.FOUR=`4`,e.FIVE=`5`,e.SIX=`6`,e.SEVEN=`7`,e.EIGHT=`8`,e.NINE=`9`,e}({})})),Ua,Wa=o((()=>{G(),Ha(),Ua=class{element;control;constructor(e,t){this.element=e,this.control=t}setElement(e){this.element=e}getElement(){return this.element}getCode(){return this.element.control?.code||null}getValue(){let e=this.control.getElementList(),{startIndex:t}=this.control.getRange(),n=e[t],r=[],i=t;for(;i>0;){let t=e[i];if(t.controlId!==n.controlId||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;t.controlComponent===U.VALUE&&r.unshift(t),i--}let a=t+1;for(;a<e.length;){let t=e[a];if(t.controlId!==n.controlId||t.controlComponent===U.POSTFIX||t.controlComponent===U.POST_TEXT)break;t.controlComponent===U.VALUE&&r.push(t),a++}return r}setValue(){return-1}setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;let{control:r}=this.element,i=t.elementList||this.control.getElementList(),{startIndex:a}=t.range||this.control.getRange(),o=i[a],s=a;for(;s>0;){let t=i[s];if(t.controlId!==o.controlId||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;if(t.controlComponent===U.CHECKBOX){let n=t.checkbox;n.value=e.includes(n.code)}s--}let c=a+1;for(;c<i.length;){let t=i[c];if(t.controlId!==o.controlId||t.controlComponent===U.POSTFIX||t.controlComponent===U.POST_TEXT)break;if(t.controlComponent===U.CHECKBOX){let n=t.checkbox;n.value=e.includes(n.code)}c++}r.code=e.join(`,`),this.control.repaintControl({curIndex:a,isSetCursor:!1}),this.control.emitControlContentChange({context:t})}keydown(e){if(this.control.getIsDisabledControl())return null;let t=this.control.getRange();this.control.shrinkBoundary();let{startIndex:n,endIndex:r}=t;return e.key===Z.Backspace||e.key===Z.Delete?this.control.removeControl(n):r}cut(){return-1}}})),Ga,Ka=o((()=>{G(),Wa(),Ga=class extends Ua{setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;let{control:r}=this.element,i=t.elementList||this.control.getElementList(),{startIndex:a}=t.range||this.control.getRange(),o=i[a],s=a;for(;s>0;){let t=i[s];if(t.controlId!==o.controlId||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;if(t.controlComponent===U.RADIO){let n=t.radio;n.value=e.includes(n.code)}s--}let c=a+1;for(;c<i.length;){let t=i[c];if(t.controlId!==o.controlId||t.controlComponent===U.POSTFIX||t.controlComponent===U.POST_TEXT)break;if(t.controlComponent===U.RADIO){let n=t.radio;n.value=e.includes(n.code)}c++}r.code=e.join(`,`),this.control.repaintControl({curIndex:a,isSetCursor:!1}),this.control.emitControlContentChange({context:t})}}}));function qa(e,t){let n=e.target;if(!(n instanceof Element))return null;let r=n;for(;r&&r.parentElement!==t;){if(r===t)return null;r=r.parentElement}if(!r?.hasAttribute(`data-index`))return null;let i=Number(r.getAttribute(`data-index`));if(!Number.isInteger(i)||!(r instanceof HTMLElement||r instanceof SVGSVGElement))return null;let a=r.getBoundingClientRect(),o=(r instanceof HTMLElement?r.clientWidth:0)||a.width,s=(r instanceof HTMLElement?r.clientHeight:0)||a.height,c=a.width?o/a.width:1,l=a.height?s/a.height:1;return{x:(e.clientX-a.left)*c,y:(e.clientY-a.top)*l,pageNo:i,page:r}}var Ja=o((()=>{}));function Ya(e){let t=e.getDraw(),n=t.getPosition(),r=t.getRange();e.isAllowDrag=!0,e.cacheRange=K(r.getRange()),e.cacheElementList=t.getElementList(),e.cachePositionList=n.getPositionList(),e.cachePositionContext=n.getPositionContext()}function Xa(e,t){let{checkbox:n,control:r}=e;if(!r)t.getCheckboxParticle().setSelect(e);else{let e=r?.code?r.code.split(`,`):[];if(n?.value){let t=e.findIndex(e=>e===n.code);~t&&e.splice(t,1)}else n?.code&&e.push(n.code);let i=t.getControl().getActiveControl();i instanceof Ua&&i.setSelect(e)}}function Za(e,t){let{radio:n,control:r}=e;if(!r)t.getRadioParticle().setSelect(e);else{let e=n?.code?[n.code]:[],r=t.getControl().getActiveControl();r instanceof Ga&&r.setSelect(e)}}function Qa(e,t){let n=t.getDraw(),r=qa(e,n.getPageContainer());if(!r)return;let i=n.isReadonly(),a=n.getRange(),o=n.getPosition(),s=a.getRange();if(e.button===Ra.RIGHT&&(s.isCrossRowCol||!a.getIsCollapsed()))return;if(!t.isAllowDrag&&!i&&s.startIndex!==s.endIndex&&a.getIsPointInRange(r.x,r.y)){Ya(t);return}n.setPageNo(r.pageNo),t.isAllowSelection=!0;let c=K(o.getPositionContext()),l=o.adjustPositionContext({x:r.x,y:r.y});if(!l)return;let{index:u,isDirectHit:d,isCheckbox:f,isRadio:p,isImage:m,isLabel:h,isTable:_,tableId:v,trIndex:y,tdIndex:b,tablePath:x,tdValueIndex:S,hitLineStartIndex:C}=l;t.mouseDownStartPosition={...l,index:_?S:u,x:r.x,y:r.y};let w=n.getElementList(),T=o.getPositionList(),E=_?S:u,D=w[E],O=!!(d&&m),k=!!(d&&f),A=!!(d&&p),j=!!(d&&h);if(~u){let r=E,s=E,l=E;if(e.shiftKey){let{startIndex:e,endIndex:n}=a.getRange();if(~e&&o.getPositionContext().tdId===c.tdId){let i=o.getCursorPosition()?.index,a=e!==n&&i===n?n:e;l=a,E>a?r=a:s=a,t.mouseDownStartPosition.index=a}}a.setRange(r,s);let u=r!==s;if(o.setCursorPosition(T[l]),i=n.isReadonly(),k&&!i)Xa(D,n);else if(A&&!i)Za(D,n);else if(D.controlComponent===U.VALUE&&(D.control?.type===H.CHECKBOX||D.control?.type===H.RADIO)){let e=E;for(;e>0;){let t=w[e];if(t.controlComponent===U.CHECKBOX){Xa(t,n);break}if(t.controlComponent===U.RADIO){Za(t,n);break}e--}}else n.render({curIndex:E,isCompute:!1,isSubmitHistory:!1,isSetCursor:!u&&!O&&!k&&!A});u&&n.getCursor().drawCursor({isShow:!1}),C&&!u&&t.getDraw().getCursor().drawCursor({hitLineStartIndex:C})}let N=n.getEventBus();j&&N.isSubscribe(`labelMousedown`)&&N.emit(`labelMousedown`,{evt:e,element:D});let P=n.getPreviewer();if(P.clearResizer(),O){let r={dragDisable:i||!D.controlId&&n.getMode()===M.FORM};D.type===B.LATEX&&(r.mime=`svg`,r.srcKey=`laTexSVG`),P.drawResizer(D,T[E],r),n.getCursor().drawCursor({isShow:!1}),Ya(t),(D.imgDisplay===g.SURROUND||D.imgDisplay===g.FLOAT_TOP||D.imgDisplay===g.FLOAT_BOTTOM)&&n.getImageParticle().createFloatImage(D),N.isSubscribe(`imageMousedown`)&&N.emit(`imageMousedown`,{evt:e,element:D})}let F=n.getTableTool();F.dispose(),_&&!i&&n.getMode()!==M.FORM&&F.render();let I=n.getAreaTool();I.dispose(),!i&&n.getMode()!==M.FORM&&I.render();let L=n.getHyperlinkParticle();if(L.clearHyperlinkPopup(),D.type===B.HYPERLINK&&(Ba(e)?L.openHyperlink(D):L.drawHyperlinkPopup(D,T[E])),n.getZone().isMainActive()&&d&&N.isSubscribe(`spellcheckClick`)){let t=_?{tableId:v,tableIndex:u,trIndex:y,tdIndex:b,tablePath:x}:void 0,r=n.getSpellcheck().getRangeByIndex(E,t);r&&N.emit(`spellcheckClick`,{evt:e,range:r})}let R=n.getDateParticle();R.clearDatePicker(),D.type===B.DATE&&!i&&R.renderDatePicker(D,T[E])}var $a=o((()=>{x(),z(),V(),za(),G(),J(),Va(),Wa(),Ka(),Ja()}));function eo(e){let t=q();return Reflect.set(e,`dragId`,t),t}function to(e,t){return t.findIndex(t=>t.dragId===e)}function no(e,t,n,r,i){let a=n.getDraw(),o=a.getPosition();if(e.imgDisplay===g.SURROUND||e.imgDisplay===g.FLOAT_TOP||e.imgDisplay===g.FLOAT_BOTTOM){let a=t.x-n.mouseDownStartPosition.x,s=t.y-n.mouseDownStartPosition.y,c=e.imgFloatPosition,l=r?.isTable,u=i.isTable,d=c.x+a,f=c.y+s,p=t.pageNo;if(l&&!u){let e=r?.index;if(e!==void 0){let t=o.getOriginalPositionList()[e];if(t){let[e,n]=t.coordinate.leftTop;d=c.x+e+a,f=c.y+n+s}}}else if(!l&&u){let e=i.index;if(e!==void 0){let t=o.getOriginalPositionList()[e];if(t){let[e,n]=t.coordinate.leftTop;d=c.x+a-e,f=c.y+s-n}}}e.imgFloatPosition={...c,x:d,y:f,pageNo:p}}a.getImageParticle().destroyFloatImage()}function ro(e,t){if(t.isAllowDrop){let n=t.getDraw(),r=qa(e,n.getPageContainer());if(!r)return;if(n.isReadonly()||n.isDisabled()){t.mousedown(e);return}let i=n.getPosition(),a=i.getPositionList(),o=i.getPositionContext(),s=n.getRange(),c=t.cacheRange,l=t.cacheElementList,u=t.cachePositionList,d=t.cachePositionContext,f=s.getRange(),p=c.startIndex===c.endIndex,m=p?c.startIndex-1:c.startIndex,h=c.endIndex;if(f.startIndex>=m&&f.endIndex<=h&&t.cachePositionContext?.tdId===o.tdId){n.clearSideEffect();let e=!1,i=!1;if(p){let a=l[h];if(a.type===B.IMAGE||a.type===B.LATEX){if(no(a,r,t,t.cachePositionContext,o),a.imgDisplay===g.SURROUND||a.imgDisplay===g.FLOAT_TOP||a.imgDisplay===g.FLOAT_BOTTOM)n.getPreviewer().drawResizer(a),e=!0;else{let e=u[h];n.getPreviewer().drawResizer(a,e)}i=a.imgDisplay===g.SURROUND}}s.replaceRange({...c}),n.render({isCompute:i,isSubmitHistory:e,isSetCursor:!1});return}let _=l.slice(m+1,h+1),v=_.find(e=>e.controlId);if(v){let e=l[m+1],t=l[h];if((e.controlId&&e.controlComponent!==U.PREFIX||t.controlId&&t.controlComponent!==U.POSTFIX)&&(e.controlId!==t.controlId||e.controlComponent!==U.PREFIX||t.controlComponent!==U.POSTFIX)&&(e.control?.type!==H.TEXT||e.controlComponent!==U.VALUE||t.control?.type!==H.TEXT||t.controlComponent!==U.VALUE)){n.render({curIndex:f.startIndex,isCompute:!1,isSubmitHistory:!1});return}}let y=n.getControl(),b=n.getElementList(),x=!v||!!b[f.startIndex].controlId||!y.getIsElementListContainFullControl(_),S=n.getOptions(),C=_.map(e=>{if(!e.type||e.type===B.TEXT){let t={value:e.value},n=[...Et];return x||n.push(...Lt),n.forEach(n=>{let r=e[n];r!==void 0&&(t[n]=r)}),t}{let t=K(e);return x&&(t=Ie(t,Lt)),Vr([t],{isHandleFirstElement:!1,editorOptions:S}),t}});Zr(b,C,f.startIndex,{editorOptions:n.getOptions()}),mi(C,e=>{delete e.trace}),n.getTraceParticle().markElementListInserted(C);let w=l[m],T=u[m],E=eo(l[m]),D=eo(l[h]),O=C.length,k=f.startIndex,A=k+O,j=y.getActiveControl();if(j&&l[k].controlComponent!==U.POSTFIX?(A=j.setValue(C),k=A-O):n.spliceElementList(b,k+1,0,C),!~A){n.render({isSetCursor:!1});return}let M=eo(b[k]),N=eo(b[A]),P=to(E,l),F=to(D,l),I=l[F];if(I.controlId&&I.controlComponent!==U.POSTFIX)s.replaceRange({...c,startIndex:P,endIndex:F}),y.getActiveControl()?.cut();else{let e=!0;if(d?.isTable){let{tableId:t,trIndex:r,tdIndex:i}=d;e=!n.getOriginalElementList().some(e=>e.id===t&&e?.trList?.[r]?.tdList?.[i]?.deletable===!1)}e&&n.deleteElementList(l,P+1,F-P,{tdDeletable:e})}let L=b[f.startIndex],R=a[f.startIndex],z=o.index;z&&(L.tableId&&!w.tableId?T.index<z&&(z-=O):!L.tableId&&w.tableId&&R.index<z&&(z+=O),i.setPositionContext({...o,index:z}));let ee=to(M,b),te=to(N,b);s.setRange(p?te:ee,te,f.tableId,f.startTdIndex,f.endTdIndex,f.startTrIndex,f.endTrIndex),n.clearSideEffect();let V=null;if(p){let e=n.getElementList()[te];(e.type===B.IMAGE||e.type===B.LATEX)&&(no(e,r,t,t.cachePositionContext,o),V=e)}if(n.render({isSetCursor:!1}),j?y.emitControlContentChange():w.controlId&&y.emitControlContentChange({context:{range:c,elementList:l},controlElement:w}),V){if(V.imgDisplay===g.SURROUND||V.imgDisplay===g.FLOAT_TOP||V.imgDisplay===g.FLOAT_BOTTOM)n.getPreviewer().drawResizer(V);else{let e=i.getPositionList()[te];n.getPreviewer().drawResizer(V,e)}}}else t.isAllowDrag&&t.cacheRange?.startIndex!==t.cacheRange?.endIndex&&t.mousedown(e)}var io=o((()=>{Kt(),x(),G(),V(),J(),gi(),Ja()}));function ao(e,t){let n=t.getDraw();if(n.getTraceParticle().clearTracePopup(),!n.getOptions().pageOuterSelectionDisable)return;let{x:r,y:i,width:a,height:o}=n.getPageContainer().getBoundingClientRect();e.x>=r&&e.x<=r+a&&e.y>=i&&e.y<=i+o||t.setIsAllowSelection(!1)}var oo=o((()=>{}));function so(e,t){let n=t.getDraw();n.getTraceParticle().handleMouseMove(e),n.getHintParticle().handleMouseMove(e);let r=qa(e,n.getPageContainer());if(!r)return;if(t.isAllowDrag){let{x:i,y:a}=r,{startIndex:o,endIndex:s}=t.cacheRange,c=t.cachePositionList;for(let e=o+1;e<=s;e++){let{coordinate:{leftTop:t,rightBottom:n}}=c[e];if(i>=t[0]&&i<=n[0]&&a>=t[1]&&a<=n[1])return}let l=t.cacheRange?.startIndex;if(l){let r=t.cacheElementList[l];r?.type===B.IMAGE&&(r.imgDisplay===g.SURROUND||r.imgDisplay===g.FLOAT_TOP||r.imgDisplay===g.FLOAT_BOTTOM)&&(n.getPreviewer().clearResizer(),n.getImageParticle().dragFloatImage(e.movementX,e.movementY))}t.dragover(e),t.isAllowDrop=!0;return}if(!t.isAllowSelection||!t.mouseDownStartPosition)return;n.setPageNo(r.pageNo);let i=n.getPosition(),a=i.getPositionByXY({x:r.x,y:r.y,pageNo:r.pageNo});if(!~a.index)return;let{index:o,isTable:s,tdValueIndex:c,tdIndex:l,trIndex:u,tableId:d,trId:f,tdId:p,tablePath:m}=a,{index:h,isTable:_,tdIndex:v,trIndex:y,tableId:b}=t.mouseDownStartPosition,x=s?c:o,S=n.getRange();if(s&&_&&b===d&&(l!==v||u!==y))S.setRange(x,x,d,v,l,y,u),i.setPositionContext({isTable:s,index:o,trIndex:u,tdIndex:l,tdId:p,trId:f,tableId:d,tablePath:m});else{let e=~x?x:0;if((_||s)&&b!==d)return;let t=h;if(t>e&&([t,e]=[e,t]),t===e)return;let r=n.getElementList(),i=r[t+1],a=r[e];if(i?.controlComponent===U.PLACEHOLDER&&a?.controlComponent===U.PLACEHOLDER&&i.controlId===a.controlId)return;S.setRange(t,e)}n.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}var co=o((()=>{x(),G(),V(),Ja()}));function lo(e){let t=e.getDraw(),n=t.getTraceParticle(),r=t.getRange(),i=r.getRange(),a=t.getElementList(),o=i.startIndex,s=a[o];if(!s||!s.hide&&!s.control?.hide&&!s.area?.hide&&!n.isTraceHidden(s))return;let c=!1;for(;o>0;){let e=a[o],r=e.hide||e.control?.hide||e.area?.hide,i=n.isTraceHidden(e);if(!r&&!i){c=!0;break}let s;if(r?e.controlId?s=t.getControl().removeControl(o):(t.spliceElementList(a,o,1),s=o-1):s=e.controlId?t.getControl().getControlStartIndex(a,o,e.controlId)-1:o-1,s===null||s<0)break;o=s}if(c&&o!==i.startIndex){i.startIndex=o,i.endIndex=o,r.replaceRange(i);let e=t.getPosition(),n=e.getPositionList();e.setCursorPosition(n[o])}}function uo(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getRange();if(!r.getIsCanInput())return;r.getIsCollapsed()&&lo(t);let i=n.getControl(),{startIndex:a,endIndex:o,isCrossRowCol:s}=r.getRange(),c;if(s){let e=n.getTableParticle().getRangeRowCol();if(!e)return;let t=!1;for(let r=0;r<e.length;r++){let i=e[r];for(let e=0;e<i.length;e++){let r=i[e];r.value.length>1&&(n.deleteElementList(r.value,1,r.value.length-1,{tdDeletable:r.deletable!==!1}),t=!0)}}c=t?0:null}else if(i.getActiveControl()&&i.getIsRangeCanCaptureEvent())c=i.keydown(e),c&&i.emitControlContentChange();else{let t=n.getPosition().getCursorPosition();if(!t)return;let{index:i}=t,s=r.getIsCollapsed(),l=n.getElementList();if(s&&i===0){let t=l[i];if(t.value===``){t.listId&&(t.listLevel?n.getListParticle().decreaseListLevel():n.getListParticle().unsetList()),e.preventDefault();return}}let u=l[a];if(s&&u.value===``&&!u.listWrap){let e=r.getRangeParagraphElementList();if(e){let t=l[a-1];n.setElementProperty(e,{rowFlex:t?.rowFlex,rowMargin:t?.rowMargin})}}let d=u.value===``?l[a-1]:u,f=l[o+1];if(d?.titleId&&f?.titleId&&d.level===f.level&&d.titleId!==f.titleId){let e=d.titleId,t=f.titleId,r=o+1,i=r;for(;r<l.length&&l[r]?.titleId===t;)r++;n.setElementProperty(l.slice(i,r),{titleId:e})}s?n.deleteElementList(l,i,1):n.deleteElementList(l,a+1,o-a),c=s?i-1:a}n.getGlobalEvent().setCanvasEventAbility(),c===null?(r.setRange(a,a),n.render({curIndex:a,isSubmitHistory:!1})):(r.setRange(c,c),n.render({curIndex:c}))}var fo=o((()=>{D()}));function po(e){let t=e.getDraw(),n=t.getTraceParticle(),r=t.getRange(),i=r.getRange(),a=t.getElementList(),o=i.startIndex+1,s=a[o];if(!s||!s.hide&&!s.control?.hide&&!s.area?.hide&&!n.isTraceHidden(s))return;let c=!1;for(;o<a.length;){let e=a[o],r=e.hide||e.control?.hide||e.area?.hide,i=n.isTraceHidden(e);if(!r&&!i){c=!0;break}let s;if(r?e.controlId?s=t.getControl().removeControl(o):(t.spliceElementList(a,o,1),s=o):s=e.controlId?t.getControl().getControlEndIndex(a,o,e.controlId)+1:o+1,s===null||s>=a.length)break;o=s}if(c&&o>i.startIndex+1){i.startIndex=o-1,i.endIndex=o-1,r.replaceRange(i);let e=t.getPosition(),n=e.getPositionList();e.setCursorPosition(n[o-1])}}function mo(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getRange();if(!r.getIsCanInput())return;let{isCrossRowCol:i}=r.getRange(),{startIndex:a,endIndex:o}=r.getRange(),s=r.getIsCollapsed(),c=n.getElementList(),l=n.getControl();if(s){po(t);let e=r.getRange();a=e.startIndex,o=e.endIndex}let u;if(i){let e=n.getTableParticle().getRangeRowCol();if(!e)return;let t=!1;for(let r=0;r<e.length;r++){let i=e[r];for(let e=0;e<i.length;e++){let r=i[e];r.value.length>1&&(n.deleteElementList(r.value,1,r.value.length-1,{tdDeletable:r.deletable!==!1}),t=!0)}}u=t?0:null}else if(l.getActiveControl()&&l.getIsRangeWithinControl())u=l.keydown(e),u&&l.emitControlContentChange();else if(s&&c[o+1]?.controlId)u=l.removeControl(o+1);else{let e=n.getPosition(),t=e.getCursorPosition();if(!t)return;let{index:i}=t,s=e.getPositionContext();if(s.isDirectHit&&s.isImage)n.deleteElementList(c,i,1),u=i-1;else{let e=r.getIsCollapsed();if(!e)n.deleteElementList(c,a+1,o-a);else{let e=c[i+1];if(!e)return;if(e.value===``&&!e.listWrap){let{rowFlex:t,rowMargin:r}=c[i],a=i+1;for(;a<c.length;){let t=c[a];if(a>i+1&&(t.value===``&&!t.listWrap||t.listId!==e.listId||t.titleId!==e.titleId))break;a++}n.setElementProperty(c.slice(i+1,a),{rowFlex:t,rowMargin:r})}n.deleteElementList(c,i+1,1)}u=e?i:a}}n.getGlobalEvent().setCanvasEventAbility(),u===null?(r.setRange(a,a),n.render({curIndex:a,isSubmitHistory:!1})):(r.setRange(u,u),n.render({curIndex:u}))}var ho=o((()=>{D()}));function go(e,t,n,r){let i=e[n],a=e[n-1];return r&&n>0&&i?.listId&&i.value===``&&a?.listId&&a.listId!==i.listId?n-1:t}function _o(e,t,n){if(t.listId&&t.listLevel===void 0)for(let r=n;r>=0;r--){let n=e[r];if(n.listId!==t.listId)break;if(n.listLevel!==void 0){t.listLevel=n.listLevel;break}}}function vo(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getRange();if(!r.getIsCanInput())return;let{startIndex:i,endIndex:a}=r.getRange(),o=r.getIsCollapsed(),s=n.getElementList(),c=s[i],l=s[a];if(o&&l.listId&&l.value===``&&s[a+1]?.listId!==l.listId){l.listLevel?n.getListParticle().decreaseListLevel():n.getListParticle().unsetList();return}let u={value:``};e.shiftKey&&c.listId&&(u.listWrap=!0);let d=go(s,i,a,o);if(Zr(s,[u],d,{isBreakWhenWrap:!0,editorOptions:n.getOptions()}),e.shiftKey&&l.areaId&&l.areaId!==s[a+1]?.areaId&&(u=Ie(u,zt)),(!s[i+1]?.titleId||c.titleId&&c.titleId===s[i+1]?.titleId)&&!(l.titleId&&l.titleId!==s[a+1]?.titleId)){let e=r.getRangeAnchorStyle(s,d);if(e){let t=[...Dt];e.controlComponent!==U.POSTFIX&&t.push(...Et),t.forEach(t=>{let n=e[t];n!==void 0&&(u[t]=n)})}}_o(s,u,d);let f=n.getControl(),p=f.getActiveControl();n.getTraceParticle().markElementListInserted([u]);let m;if(p&&f.getIsRangeWithinControl())m=f.setValue([u]),f.emitControlContentChange();else{let e=n.getPosition().getCursorPosition();if(!e)return;let{index:t}=e,r=d!==i;if(o){let e=r?a:t+1;if(n.spliceElementList(s,e,0,[u]),l.titleId&&s[e+1]?.titleId===l.titleId){let t=q(),r=e+1,i=r;for(;r<s.length&&s[r]?.titleId===l.titleId;)r++;n.setElementProperty(s.slice(i,r),{titleId:t})}m=r?a:t+1}else{let e=i+1;n.deleteElementList(s,e,a-i),n.spliceElementList(s,e,0,[u]),m=i+1}}~m&&(r.setRange(m,m),n.render({curIndex:m})),e.preventDefault()}var yo=o((()=>{D(),Kt(),G(),J(),gi()}));function bo(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getPosition(),i=r.getCursorPosition();if(!i)return;let a=r.getPositionContext(),{index:o}=i;if(o<=0&&!a.isTable)return;let s=n.getRange(),{startIndex:c,endIndex:l}=s.getRange(),u=s.getIsCollapsed(),d=n.getElementList(),f=n.getControl();if(n.getMode()===M.FORM&&f.getActiveControl()&&(d[o]?.controlComponent===U.PREFIX||d[o]?.controlComponent===U.PRE_TEXT)){f.initNextControl({direction:ma.UP});return}let p=1;if(ga?e.altKey:e.ctrlKey){let t=n.getLetterReg(),r=e.shiftKey&&!u&&c===i?.index?l:c;if(t.test(d[r]?.value)){let e=r-1;for(;e>0;){let n=d[e];if(!t.test(n.value))break;p++,e--}}}let m=c-p,h=m,g=m;if(e.shiftKey&&i&&(c===l?g=l:c===i.index?(h=c,g=l-p):(h=m,g=l)),!e.shiftKey){let e=d[c];if(e.type===B.TABLE){let t=e.trList,i=t.length-1,a=t[i],o=a.tdList.length-1,s=a.tdList[o];r.setPositionContext({isTable:!0,index:c,trIndex:i,tdIndex:o,tdId:s.id,trId:a.id,tableId:e.id}),h=s.value.length-1,g=h,n.getTableTool().render()}else if(e.tableId&&c===0){let t=n.getOriginalElementList()[a.index].trList;outer:for(let i=0;i<t.length;i++){let o=t[i];if(o.id!==e.trId)continue;let s=o.tdList;for(let o=0;o<s.length;o++)if(s[o].id===e.tdId){if(i===0&&o===0)r.setPositionContext({isTable:!1}),h=a.index-1,g=h,n.getTableTool().dispose();else{let s=i,c=o-1;c<0&&(s=i-1,c=t[s].tdList.length-1);let l=t[s],u=l.tdList[c];r.setPositionContext({isTable:!0,index:a.index,trIndex:s,tdIndex:c,tdId:u.id,trId:l.id,tableId:e.tableId}),h=u.value.length-1,g=h,n.getTableTool().render()}break outer}}}}if(!~h||!~g)return;let v=n.getTraceParticle(),y=n.getElementList();h=di(y,h,_.BEFORE,e=>v.isTraceHidden(e)),g=di(y,g,_.BEFORE,e=>v.isTraceHidden(e)),s.setRange(h,g);let b=h===g;if(n.render({curIndex:b?h:void 0,isSetCursor:b,isSubmitHistory:!1,isCompute:!1}),b){let e=r.getPositionList(),t=e[h];if(t?.isLastLetter&&t.value!==``&&h+1<e.length){let t=e[h+1],r=y[h],i=y[h+1];t.value!==``&&!si(i)&&r.listId===i.listId&&n.getCursor().drawCursor({hitLineStartIndex:h+1})}}e.preventDefault()}var xo=o((()=>{Dp(),D(),x(),G(),V(),ha(),gi(),ba()}));function So(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getPosition(),i=r.getCursorPosition();if(!i)return;let{index:a}=i,o=r.getPositionList(),s=r.getPositionContext();if(a>o.length-1&&!s.isTable)return;let c=n.getRange(),{startIndex:l,endIndex:u}=c.getRange(),d=c.getIsCollapsed(),f=n.getElementList(),p=n.getControl();if(n.getMode()===M.FORM&&p.getActiveControl()&&(f[a+1]?.controlComponent===U.POSTFIX||f[a+1]?.controlComponent===U.POST_TEXT)){p.initNextControl({direction:ma.DOWN});return}let m=1;if(ga?e.altKey:e.ctrlKey){let t=n.getLetterReg(),r=e.shiftKey&&!d&&l===i?.index?u:l;if(t.test(f[r+1]?.value)){let e=r+2;for(;e<f.length;){let n=f[e];if(!t.test(n.value))break;m++,e++}}}let h=u+m,g=h,v=h;if(e.shiftKey&&i&&(l===u?g=l:l===i.index?(g=l,v=h):(g=l+m,v=u)),!e.shiftKey){let e=f[u],t=f[u+1];if(t?.type===B.TABLE){let e=t.trList[0],i=e.tdList[0];r.setPositionContext({isTable:!0,index:u+1,trIndex:0,tdIndex:0,tdId:i.id,trId:e.id,tableId:t.id}),g=0,v=0,n.getTableTool().render()}else if(e.tableId&&!t){let t=n.getOriginalElementList()[s.index].trList;outer:for(let i=0;i<t.length;i++){let a=t[i];if(a.id!==e.trId)continue;let o=a.tdList;for(let a=0;a<o.length;a++)if(o[a].id===e.tdId){if(i===t.length-1&&a===o.length-1)r.setPositionContext({isTable:!1}),g=s.index,v=g,f=n.getElementList(),n.getTableTool().dispose();else{let c=i,l=a+1;l>o.length-1&&(c=i+1,l=0);let u=t[c],d=u.tdList[l];r.setPositionContext({isTable:!0,index:s.index,trIndex:c,tdIndex:l,tdId:d.id,trId:u.id,tableId:e.tableId}),g=0,v=g,n.getTableTool().render()}break outer}}}}let y=f.length-1;if(g>y||v>y)return;let b=n.getTraceParticle(),x=n.getElementList();g=di(x,g,_.AFTER,e=>b.isTraceHidden(e)),v=di(x,v,_.AFTER,e=>b.isTraceHidden(e)),c.setRange(g,v);let S=g===v;if(n.render({curIndex:S?g:void 0,isSetCursor:S,isSubmitHistory:!1,isCompute:!1}),S){let e=o[g];if(e?.isLastLetter&&e.value!==``&&g+1<o.length){let e=o[g+1],t=f[g],r=f[g+1];e.value!==``&&!si(r)&&t.listId===r.listId&&n.getCursor().drawCursor({hitLineStartIndex:g+1})}}e.preventDefault()}var Co=o((()=>{D(),x(),G(),z(),V(),ha(),gi(),ba()}));function wo(e,t){let n=t.getDraw();if(n.isReadonly())return;e.preventDefault();let r=n.getControl();if(r.getActiveControl()&&r.getIsRangeWithinControl()){r.initNextControl({direction:e.shiftKey?ma.UP:ma.DOWN});return}let i=n.getRange(),a=n.getElementList(),{startIndex:o,endIndex:s}=i.getRange(),c=i.getIsCollapsed(),l=a[s],u=a[s-1];if(c&&l?.listId&&!l.listWrap&&(l.value===``||u?.value===``&&!u?.listWrap&&u.listId===l.listId)){e.shiftKey?n.getListParticle().decreaseListLevel():n.getListParticle().increaseListLevel();return}if(c&&!l?.listId&&(s===0||l?.value===``||u?.value===``&&!u?.listWrap)){let{defaultTabWidth:t}=n.getOptions(),r=i.getRangeParagraphElementList();if(r){let i=r.find(e=>e.value!==``)??r[0],a=i?.indentLeft||0,o=i?.indentFirstLine||0,c=Math.max(Math.floor(n.getInnerWidth()/t)-2,0),l=(e,n)=>(n>0?Math.min(Math.floor(e/t)+1,c):Math.max(Math.ceil(e/t)-1,0))*t,u=a,d=o;e.shiftKey?a>0?u=l(a,-1):o>0&&(d=l(o,-1)):o<=0?d=l(o,1):u=l(a,1),r.forEach(e=>{e.indentLeft=u,e.indentFirstLine=d}),n.render({curIndex:s,isSetCursor:!0})}return}let d=i.getRangeAnchorStyle(a,s),f={...d?Fe(d,Et):null,type:B.TAB,value:``};Zr(a,[f],o,{editorOptions:n.getOptions()}),n.insertElementList([f])}var To=o((()=>{D(),Kt(),V(),ha(),J(),gi()}));function Eo(e){let{positionList:t,index:n,isUp:r,rowNo:i,cursorX:a}=e,o=-1,s=[];if(r){let e=n-1;for(;e>=0;){let n=t[e];if(e--,n.rowNo!==i){if(s[0]&&s[0].rowNo!==n.rowNo)break;s.unshift(n)}}}else{let e=n+1;for(;e<t.length;){let n=t[e];if(e++,n.rowNo!==i){if(s[0]&&s[0].rowNo!==n.rowNo)break;s.push(n)}}}for(let e=0;e<s.length;e++){let t=s[e],{coordinate:{leftTop:[n],rightTop:[r]}}=t;if(e===s.length-1&&(o=t.index),!(a<n||a>r)){o=t.index;break}}return o}function Do(e,t){let n=t.getDraw();if(n.isReadonly())return;e.preventDefault();let r=n.getPosition(),i=r.getCursorPosition();if(!i)return;let a=n.getRange(),{startIndex:o,endIndex:s}=a.getRange(),c=r.getPositionList(),l=e.key===Z.Up,u=-1,d=-1,f=r.getPositionContext();if(!e.shiftKey&&f.isTable&&(l&&i.rowIndex===0||!l&&i.rowIndex===n.getRowCount()-1)){let{index:e,trIndex:t,tdIndex:i,tableId:a}=f;if(l){if(t===0)r.setPositionContext({isTable:!1}),u=e-1,d=u,n.getTableTool().dispose();else{let o=-1,s=-1,c=n.getOriginalElementList()[e].trList,l=c[t].tdList[i].colIndex;outer:for(let e=t-1;e>=0;e--){let t=c[e].tdList;for(let n=0;n<t.length;n++){let r=t[n];if(r.colIndex===l||r.colIndex+r.colspan-1>=l&&r.colIndex<=l){o=e,s=n;break outer}}}if(!~o||!~s)return;let f=c[o],p=f.tdList[s];r.setPositionContext({isTable:!0,index:e,trIndex:o,tdIndex:s,tdId:p.id,trId:f.id,tableId:a}),u=p.value.length-1,d=u,n.getTableTool().render()}}else{let o=n.getOriginalElementList()[e].trList;if(t===o.length-1)r.setPositionContext({isTable:!1}),u=e,d=u,n.getTableTool().dispose();else{let s=-1,c=-1,l=o[t].tdList[i].colIndex;outer:for(let e=t+1;e<o.length;e++){let t=o[e].tdList;for(let n=0;n<t.length;n++){let r=t[n];if(r.colIndex===l||r.colIndex+r.colspan-1>=l&&r.colIndex<=l){s=e,c=n;break outer}}}if(!~s||!~c)return;let f=o[s],p=f.tdList[c];r.setPositionContext({isTable:!0,index:e,trIndex:s,tdIndex:c,tdId:p.id,trId:f.id,tableId:a}),u=p.value.length-1,d=u,n.getTableTool().render()}}}else{let t=i;e.shiftKey&&(t=o===i.index?c[s]:c[o]);let{index:a,rowNo:f,rowIndex:p,coordinate:{rightTop:[m]}}=t;if(l&&p===0||!l&&p===n.getRowCount()-1)return;let h=Eo({positionList:c,index:a,rowNo:f,isUp:l,cursorX:m});if(h<0)return;let g=n.getElementList()[h],_=e.shiftKey&&l&&g.type===B.TABLE?Math.max(h-1,0):h;if(u=_,d=_,e.shiftKey&&(o===s?l?d=s:u=o:o===i.index?u=o:d=s),g.type===B.TABLE&&!e.shiftKey){let{scale:e}=n.getOptions(),t=n.getMargins(),i=g.trList,a=-1,o=-1,s=-1;if(l)outer:for(let n=i.length-1;n>=0;n--){let r=i[n].tdList;for(let i=0;i<r.length;i++){let c=r[i],u=c.x*e+t[3],d=c.width*e;if(m>=u&&m<=u+d){let e=c.positionList,t=e[e.length-1],r=Eo({positionList:e,index:t.index+1,rowNo:t.rowNo-1,isUp:l,cursorX:m})||t.index;a=n,o=i,s=r;break outer}}}else outer:for(let n=0;n<i.length;n++){let r=i[n].tdList;for(let i=0;i<r.length;i++){let c=r[i],u=c.x*e+t[3],d=c.width*e;if(m>=u&&m<=u+d){let e=c.positionList,t=Eo({positionList:e,index:-1,rowNo:-1,isUp:l,cursorX:m})||0;a=n,o=i,s=t;break outer}}}if(~a&&~o&&~s){let e=i[a],t=e.tdList[o];r.setPositionContext({isTable:!0,index:h,trIndex:a,tdIndex:o,tdId:t.id,trId:e.id,tableId:g.id}),u=s,d=u,c=r.getPositionList(),n.getTableTool().render()}}}if(!~u||!~d)return;u>d&&([u,d]=[d,u]),a.setRange(u,d);let p=u===d;if(n.render({curIndex:p?u:void 0,isSetCursor:p,isSubmitHistory:!1,isCompute:!1}),!p){let e=u===i.index?d:u;n.getCursor().moveCursorToVisible({cursorPosition:c[e],direction:l?ma.UP:ma.DOWN})}}var Oo=o((()=>{V(),Ha(),ha()}));function ko(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getPosition(),i=r.getCursorPosition();if(!i)return;let a=n.getRange(),{startIndex:o,endIndex:s}=a.getRange(),c=r.getPositionList(),l=i;e.shiftKey&&o!==s&&(l=o===i.index?c[s]:c[o]);let{rowNo:u}=l,d=l.index;for(let e=l.index-1;e>=0&&c[e].rowNo===u;e--)d=e;let f=c[d].value!==``;f&&d--;let p=d,m=d;e.shiftKey&&(o===s?(p=d,m=o):o===i.index?(p=o,m=d):(p=d,m=s)),p>m&&([p,m]=[m,p]),a.setRange(p,m);let h=p===m;n.render({curIndex:h?p:void 0,isSetCursor:h,isSubmitHistory:!1,isCompute:!1}),f&&n.getCursor().drawCursor({hitLineStartIndex:d+1}),e.preventDefault()}var Ao=o((()=>{D()}));function jo(e,t){let n=t.getDraw();if(n.isReadonly())return;let r=n.getPosition(),i=r.getCursorPosition();if(!i)return;let a=n.getRange(),{startIndex:o,endIndex:s}=a.getRange(),c=r.getPositionList(),l=i;e.shiftKey&&o!==s&&(l=o===i.index?c[s]:c[o]);let{rowNo:u}=l;n.getCursor().getHitLineStartIndex()!==void 0&&u++;let d=l.index;for(let e=l.index+1;e<c.length&&c[e].rowNo===u;e++)d=e;let f=d,p=d;e.shiftKey&&(o===s||o===i.index?(f=o,p=d):(f=d,p=s)),f>p&&([f,p]=[p,f]),a.setRange(f,p);let m=f===p;n.render({curIndex:m?f:void 0,isSetCursor:m,isSubmitHistory:!1,isCompute:!1}),e.preventDefault()}var Mo=o((()=>{}));function No(e,t){if(t.isComposing)return;let n=t.getDraw();if(e.key===Z.Backspace)uo(e,t);else if(e.key===Z.Delete)mo(e,t);else if(e.key===Z.Enter)vo(e,t);else if(e.key===Z.Left)ga&&e.metaKey?ko(e,t):bo(e,t);else if(e.key===Z.Right)ga&&e.metaKey?jo(e,t):So(e,t);else if(e.key===Z.Up||e.key===Z.Down)Do(e,t);else if(e.key===Z.Home)ko(e,t);else if(e.key===Z.End)jo(e,t);else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.Z){if(n.isReadonly()&&n.getMode()!==M.FORM)return;n.getHistoryManager().undo(),e.preventDefault()}else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.Y){if(n.isReadonly()&&n.getMode()!==M.FORM)return;n.getHistoryManager().redo(),e.preventDefault()}else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.C)t.copy(),e.preventDefault();else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.X)t.cut(),e.preventDefault();else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.A)t.selectAll(),e.preventDefault();else if(Ba(e)&&e.key.toLocaleLowerCase()===Z.S){if(n.isReadonly())return;let t=n.getListener();t.saved&&t.saved(n.getValue());let r=n.getEventBus();r.isSubscribe(`saved`)&&r.emit(`saved`,n.getValue()),e.preventDefault()}else if(e.key===Z.ESC){t.clearPainterStyle();let r=n.getZone();r.isMainActive()||r.setZone(N.MAIN),e.preventDefault()}else e.key===Z.TAB&&wo(e,t)}var Po=o((()=>{z(),Ha(),ba(),Va(),fo(),ho(),yo(),xo(),Co(),To(),Oo(),Ao(),Mo()}));function Fo(e,t){let n=t.getDraw();if(n.isReadonly()||n.isDisabled())return;let r=n.getPosition().getCursorPosition();if(!e||!r)return;let i=t.isComposing;if(i&&t.compositionInfo?.value===e)return;let a=n.getRange();if(!a.getIsCanInput())return;let o=a.getDefaultStyle()||t.compositionInfo?.defaultStyle||null;Io(t),i||n.getCursor().clearAgentDomValue();let{TEXT:s,HYPERLINK:c,SUBSCRIPT:l,SUPERSCRIPT:u,DATE:d,TAB:f}=B,p=e.replaceAll(`
|
|
70
|
+
`,``),{startIndex:m,endIndex:h}=a.getRange(),g=n.getElementList(),_=a.getRangeAnchorStyle(g,h);if(!_)return;let v=n.isDesignMode(),y=Se(p).map(e=>{let t={value:e};if(v||!_.title?.disabled&&!_.control?.disabled){let e=g[h+1];(!_.type||_.type===s||_.type===c&&e?.type===c||_.type===d&&e?.type===d||_.type===l&&e?.type===l||_.type===u&&e?.type===u)&&jt.forEach(n=>{if(n===`groupIds`&&!e?.groupIds)return;let r=_[n];r!==void 0&&(t[n]=r)}),(o||_.type===f)&&Et.forEach(e=>{let n=o?.[e]||_[e];n!==void 0&&(t[e]=n)}),i&&(t.underline=!0)}return t});n.getTraceParticle().markElementListInserted(y);let b=n.getControl();if(b.getIsRangeWithinControl()&&!b.getActiveControl()&&(b.initControl(),!b.getActiveControl()))return;let x;if(b.getActiveControl()&&b.getIsRangeWithinControl())x=b.setValue(y),i||b.emitControlContentChange();else{let e=m+1;m!==h&&(n.getOptions().trace.disabled?n.spliceElementList(g,e,h-m):n.deleteElementList(g,e,h-m)),Zr(g,y,m,{editorOptions:n.getOptions()}),n.spliceElementList(g,e,0,y),x=m+y.length}~x&&(a.setRange(x,x),n.render({curIndex:x,isSubmitHistory:!i}),e&&n.getAccessibility().input(e)),i&&~x&&(t.compositionInfo={elementList:g,value:p,startIndex:x-y.length,endIndex:x,defaultStyle:o})}function Io(e){if(!e.compositionInfo)return;let{elementList:t,startIndex:n,endIndex:r}=e.compositionInfo;t.splice(n+1,r-n);let i=e.getDraw();i.getIncrementalRowComputer().markRangeDirty(t,n+1,r-n,0),i.getRange().setRange(n,n),e.compositionInfo=null}var Lo=o((()=>{D(),Kt(),V(),J(),gi()}));async function Ro(e){let t=e.getDraw(),n=t.getRange(),{startIndex:r,endIndex:i}=n.getRange();if(!~r&&!~i||t.isReadonly()||!n.getIsCanInput())return;let a=t.getElementList(),o=r,s=i;if(r===i){let e=t.getPosition().getPositionList(),n=e[r],i=n.rowNo,a=n.pageNo,c=[];for(let t=0;t<e.length;t++){let n=e[t];if(n.pageNo>a)break;n.pageNo===a&&n.rowNo===i&&c.push(t)}let l=c[0]-1;o=l<0?0:l,s=c[c.length-1]}let c=t.getOptions();await Ta(a.slice(o+1,s+1),c);let l=t.getControl(),u;l.getActiveControl()&&l.getIsRangeWithinControl()?(u=l.cut(),l.emitControlContentChange()):(t.deleteElementList(a,o+1,s-o),u=o),n.setRange(u,u),t.render({curIndex:u})}var zo=o((()=>{Da()}));async function Bo(e,t){let n=e.getDraw(),{copy:r}=n.getOverride();if(r&&r()?.preventDefault!==!1)return;let i=n.getRange(),a=null;if(i.getRange().isCrossRowCol){let e=i.getRangeTableElement();if(!e)return;let t=n.getTableParticle().getRangeRowCol();if(!t)return;let r={type:B.TABLE,value:``,colgroup:[],trList:[]},o=t[0],s=o[0].colIndex,c=o[o.length-1],l=c.colIndex+c.colspan-1;for(let t=s;t<=l;t++)r.colgroup.push(e.colgroup[t]);for(let n=0;n<t.length;n++){let i=t[n],a=e.trList[i[0].rowIndex],o={tdList:[],height:a.height,minHeight:a.minHeight};for(let e=0;e<i.length;e++)o.tdList.push(i[e]);r.trList.push(o)}a=X([r])}else a=i.getIsCollapsed()?i.getRangeRowElementList():i.getSelectionElementList();t?.isPlainText&&a?.length&&(a=[{value:ii(Rr(a))}]),a?.length&&await Ta(a,n.getOptions())}var Vo=o((()=>{V(),Da(),gi()}));function Ho(e,t){let{drop:n}=t.getDraw().getOverride();if(n&&n(e)?.preventDefault!==!1)return;e.preventDefault();let r=e.dataTransfer?.getData(`text`);if(r)t.input(r);else{let n=e.dataTransfer?.files;if(!n)return;for(let e=0;e<n.length;e++){let r=n[e];r.type.startsWith(`image`)&&Aa(t,r)}}}var Uo=o((()=>{Na()}));function Wo(e){if(!Intl.Segmenter)return null;let t=e.getDraw(),n=t.getPosition().getCursorPosition();if(!n)return null;let r=t.getRange().getRangeParagraphInfo();if(!r)return null;let i=r?.elementList?.map(e=>!e.type||e.type!==B.CONTROL&&Vt.includes(e.type)?e.value:``).join(``)||``;if(!i)return null;let a=n.isFirstLetter||t.getCursor().getHitLineStartIndex()?n.index+1:n.index,o=r.startIndex,s=new Intl.Segmenter(void 0,{granularity:`word`}).segment(i),c=-1,l=-1;for(let{segment:e,index:t,isWordLike:n}of s){let r=t+o;if(n&&a>=r&&a<r+e.length){c=r-1,l=c+e.length;break}}return~c&&~l?{startIndex:c,endIndex:l}:null}function Go(e){let t=e.getDraw(),n=t.getPosition().getCursorPosition();if(!n)return null;let{value:r,index:i}=n,a=t.getLetterReg(),o=0,s=0,c=le.test(r);if(c||a.test(r)){let e=t.getElementList(),n=i-1;for(;n>0;){let t=e[n].value;if(c&&le.test(t)||!c&&a.test(t))o++,n--;else break}let r=i+1;for(;r<e.length;){let t=e[r].value;if(c&&le.test(t)||!c&&a.test(t))s++,r++;else break}}let l=i-o-1;return l<0?null:{startIndex:l,endIndex:i+s}}function Ko(e,t){let n=e.getDraw(),r=qa(t,n.getPageContainer());if(!r)return;let i=n.getPosition(),a=i.getPositionByXY({x:r.x,y:r.y,pageNo:r.pageNo});if(a.isImage&&a.isDirectHit){let e=n.getElementList(),r=n.getEventBus(),i=e[a.index];if(r.isSubscribe(`imageDblclick`)&&r.emit(`imageDblclick`,{evt:t,element:i}),i.imgPreviewDisabled)return;n.getPreviewer().render();return}if(n.getIsPagingMode()&&!~a.index&&a.zone){n.getZone().setZone(a.zone),n.clearSideEffect(),i.setPositionContext({isTable:!1});return}if((a.isCheckbox||a.isRadio)&&a.isDirectHit)return;let o=n.getRange(),s=Wo(e)||Go(e);s&&(o.setRange(s.startIndex,s.endIndex),n.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),o.setRangeStyle())}function qo(e){let t=e.getDraw(),n=t.getControl();if(n.getActiveControl()&&n.selectValue())return;let r=t.getPosition().getCursorPosition();if(!r)return;let{index:i}=r,a=t.getElementList(),o=0,s=0,c=i-1;for(;c>0;){let e=a[c],t=a[c-1];if(e.value===``&&!e.listWrap||e.listId!==t?.listId||e.titleId!==t?.titleId)break;o++,c--}let l=i+1;for(;l<a.length;){let e=a[l],t=a[l+1];if(e.value===``&&!e.listWrap||e.listId!==t?.listId||e.titleId!==t?.titleId)break;s++,l++}let u=t.getRange(),d=i-o-1;if(a[d]?.value!==``&&--d,d<0)return;let f=i+s+1;(a[f]?.value===``||f>a.length-1)&&--f,u.setRange(d,f),t.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}var Jo,Yo=o((()=>{D(),Kt(),_e(),V(),Ja(),Jo={dblclick:Ko,threeClick:qo}}));function Xo(e){e.isComposing=!0}function Zo(e,t){e.isComposing=!1;let n=e.getDraw();if(t.data)ya?setTimeout(()=>{e.compositionInfo&&Fo(t.data,e)},1):e.compositionInfo&&Fo(t.data,e);else{Io(e);let{endIndex:t}=n.getRange().getRange();n.render({curIndex:t,isSubmitHistory:!1})}n.getCursor().clearAgentDomValue()}var Qo,$o=o((()=>{ba(),Lo(),Qo={compositionstart:Xo,compositionend:Zo}}));function es(e,t){let n=t.getDraw();if(n.isReadonly())return;e.preventDefault();let r=qa(e,n.getPageContainer());if(!r)return;n.setPageNo(r.pageNo);let i=n.getPosition(),a=i.adjustPositionContext({x:r.x,y:r.y});if(!a)return;let{isTable:o,tdValueIndex:s,index:c}=a,l=i.getPositionList(),u=o?s:c;~c&&(n.getRange().setRange(u,u),i.setCursorPosition(l[u]));let d=n.getCursor(),{cursor:{dragColor:f,dragWidth:p,dragFloatImageDisabled:m}}=n.getOptions();if(m){let e=t.cacheRange&&t.cacheElementList?.[t.cacheRange.startIndex];if(e?.type===B.IMAGE&&(e.imgDisplay===g.FLOAT_TOP||e.imgDisplay===g.FLOAT_BOTTOM||e.imgDisplay===g.SURROUND))return}d.drawCursor({width:p,color:f,isBlink:!1,isFocus:!1})}var ts,ns=o((()=>{x(),V(),Ja(),ts={dragover:es}})),rs,is=o((()=>{Kt(),J(),$a(),io(),oo(),co(),Po(),Lo(),zo(),Vo(),Uo(),Yo(),$o(),ns(),ba(),rs=class{isAllowSelection;isComposing;compositionInfo;isAllowDrag;isAllowDrop;cacheRange;cacheElementList;cachePositionList;cachePositionContext;mouseDownStartPosition;draw;pageContainer;pageList;range;position;constructor(e){this.draw=e,this.pageContainer=e.getPageContainer(),this.pageList=e.getPageList(),this.range=this.draw.getRange(),this.position=this.draw.getPosition(),this.isAllowSelection=!1,this.isComposing=!1,this.compositionInfo=null,this.isAllowDrag=!1,this.isAllowDrop=!1,this.cacheRange=null,this.cacheElementList=null,this.cachePositionList=null,this.cachePositionContext=null,this.mouseDownStartPosition=null}getDraw(){return this.draw}register(){this.pageContainer.addEventListener(`click`,this.click.bind(this)),this.pageContainer.addEventListener(`mousedown`,this.mousedown.bind(this)),this.pageContainer.addEventListener(`mouseup`,this.mouseup.bind(this)),this.pageContainer.addEventListener(`mouseleave`,this.mouseleave.bind(this)),this.pageContainer.addEventListener(`mousemove`,this.mousemove.bind(this)),this.pageContainer.addEventListener(`dblclick`,this.dblclick.bind(this)),this.pageContainer.addEventListener(`dragover`,this.dragover.bind(this)),this.pageContainer.addEventListener(`drop`,this.drop.bind(this)),we(this.pageContainer,this.threeClick.bind(this))}setIsAllowSelection(e){this.isAllowSelection=e,e||this.applyPainterStyle()}setIsAllowDrag(e){this.isAllowDrag=e,this.isAllowDrop=e}clearPainterStyle(){this.pageList.forEach(e=>{e.style.cursor=`text`}),this.draw.setPainterStyle(null)}applyPainterStyle(){let e=this.draw.getPainterStyle();if(!e||this.draw.isReadonly()||this.draw.isDisabled())return;let t=this.range.getSelection();if(!t){let e=Wo(this);e&&(t=this.draw.getElementList().slice(e.startIndex+1,e.endIndex+1))}if(!t)return;let n=At,r=Object.keys(e).filter(e=>!n.includes(e));t.forEach(t=>{r.forEach(n=>{let r=n;Reflect.set(t,r,e[r])})});let i=this.range.getRangeParagraphElementList();if(i&&i.length===t.length&&i.every(e=>t.includes(e))){let t=e.level?q():null;this.draw.setElementProperty(i,{rowFlex:e.rowFlex,rowMargin:e.rowMargin}),e.level&&t?this.draw.setElementProperty(i,{level:e.level,title:e.title,titleId:t}):this.draw.deleteElementProperty(i,[`level`,`title`,`titleId`])}this.draw.render({isSetCursor:!1});let a=this.draw.getPainterOptions();a&&a.isDblclick||this.clearPainterStyle()}selectAll(){if(this.position.getPositionContext().isTable)this.draw.getTableOperate().tableSelectAll();else{let e=this.position.getPositionList();this.range.setRange(0,e.length-1),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}}mousemove(e){so(e,this)}mousedown(e){Qa(e,this)}click(){_a&&!this.draw.isReadonly()&&this.draw.getCursor().getAgentDom().focus()}mouseup(e){ro(e,this)}mouseleave(e){ao(e,this)}keydown(e){No(e,this)}dblclick(e){Jo.dblclick(this,e)}threeClick(){Jo.threeClick(this)}input(e){Fo(e,this)}async cut(){await Ro(this)}async copy(e){await Bo(this,e)}compositionstart(){Qo.compositionstart(this)}compositionend(e){Qo.compositionend(this,e)}drop(e){Ho(e,this)}dragover(e){ts.dragover(e,this)}}})),as,os=o((()=>{as={PAGE_SCALE:`pageScale`}})),ss,cs=o((()=>{Qe(),J(),os(),ss=class{draw;options;cursor;canvasEvent;range;previewer;tableTool;areaTool;hyperlinkParticle;hintParticle;control;magnifier;dateParticle;imageParticle;dprMediaQueryList;constructor(e,t){this.draw=e,this.options=e.getOptions(),this.canvasEvent=t,this.cursor=null,this.range=e.getRange(),this.previewer=e.getPreviewer(),this.tableTool=e.getTableTool(),this.areaTool=e.getAreaTool(),this.hyperlinkParticle=e.getHyperlinkParticle(),this.hintParticle=e.getHintParticle(),this.dateParticle=e.getDateParticle(),this.imageParticle=e.getImageParticle(),this.control=e.getControl(),this.magnifier=e.getMagnifier(),this.dprMediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)}register(){this.cursor=this.draw.getCursor(),this.addEvent()}addEvent(){window.addEventListener(`blur`,this.clearSideEffect),document.addEventListener(`mousedown`,this.clearSideEffect),document.addEventListener(`mouseup`,this.setCanvasEventAbility),document.addEventListener(`wheel`,this.setPageScale,{passive:!1}),document.addEventListener(`visibilitychange`,this._handleVisibilityChange),this.dprMediaQueryList.addEventListener(`change`,this._handleDprChange)}removeEvent(){window.removeEventListener(`blur`,this.clearSideEffect),document.removeEventListener(`mousedown`,this.clearSideEffect),document.removeEventListener(`mouseup`,this.setCanvasEventAbility),document.removeEventListener(`wheel`,this.setPageScale),document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),this.dprMediaQueryList.removeEventListener(`change`,this._handleDprChange)}clearSideEffect=e=>{if(!this.cursor)return;let t=e?.composedPath()[0]||e.target,n=this.draw.getPageList();xe(t,e=>n.includes(e),!0)||(xe(t,e=>!!e&&e.nodeType===1&&!!e.getAttribute(`editor-component`),!0)?this.watchCursorActive():(this.cursor.recoveryCursor(),this.range.recoveryRangeStyle(),this.previewer.clearResizer(),this.tableTool.dispose(),this.areaTool.dispose(),this.hyperlinkParticle.clearHyperlinkPopup(),this.hintParticle.clearHintPopup(),this.control.destroyControl(),this.dateParticle.clearDatePicker(),this.imageParticle.destroyFloatImage(),this.magnifier.hide()))};setCanvasEventAbility=()=>{this.canvasEvent.setIsAllowDrag(!1),this.canvasEvent.setIsAllowSelection(!1)};watchCursorActive(){this.range.getIsCollapsed()&&setTimeout(()=>{this.cursor?.getAgentIsActive()||this.cursor?.drawCursor({isFocus:!1,isBlink:!1})})}setPageScale=e=>{if(this.options.shortcutDisableKeys.includes(as.PAGE_SCALE)||!e.ctrlKey)return;e.preventDefault();let{scale:t}=this.options;if(e.deltaY<0){let e=t*10+1;e<=30&&this.draw.setPageScale(e/10)}else{let e=t*10-1;e>=5&&this.draw.setPageScale(e/10)}};_handleVisibilityChange=()=>{if(document.visibilityState===`visible`){let e=this.range.getRange(),t=!!~e.startIndex&&!!~e.endIndex&&e.startIndex===e.endIndex;this.range.replaceRange(e),this.draw.render({isSetCursor:t,isCompute:!1,isSubmitHistory:!1,curIndex:e.startIndex})}};_handleDprChange=()=>{this.draw.setPageDevicePixel()}}})),ls,us=o((()=>{ls=class{undoStack=[];redoStack=[];maxRecordCount;constructor(e){this.maxRecordCount=e.getOptions().historyMaxRecordCount+1}undo(){if(this.undoStack.length>1){let e=this.undoStack.pop();this.redoStack.push(e),this.undoStack.length&&this.undoStack[this.undoStack.length-1]()}}redo(){if(this.redoStack.length){let e=this.redoStack.pop();this.undoStack.push(e),e()}}execute(e){for(this.undoStack.push(e),this.redoStack.length&&(this.redoStack=[]);this.undoStack.length>this.maxRecordCount;)this.undoStack.shift()}isCanUndo(){return this.undoStack.length>1}isCanRedo(){return!!this.redoStack.length}isStackEmpty(){return!this.undoStack.length&&!this.redoStack.length}recovery(){this.undoStack=[],this.redoStack=[]}popUndo(){return this.undoStack.pop()}}})),ds,fs=o((()=>{Dp(),D(),G(),z(),J(),x(),gi(),ds=class{cursorPosition;positionContext;positionList;tablePagingPositionList;tablePagingPositionMap;floatPositionList;pagePositionCacheList;draw;eventBus;options;constructor(e){this.positionList=[],this.tablePagingPositionList=[],this.tablePagingPositionMap=new Map,this.floatPositionList=[],this.pagePositionCacheList=[],this.cursorPosition=null,this.positionContext={isTable:!1,isControl:!1},this.draw=e,this.eventBus=e.getEventBus(),this.options=e.getOptions()}getFloatPositionList(){return this.floatPositionList}getTablePagingPositionList(){return this.tablePagingPositionList}getTableFragmentPosition(e,t,n){let r=this.tablePagingPositionMap.get(t);if(!r?.length)return null;let i=r.filter(t=>t.index===e);if(i.length<=1)return i[0]||null;if(n){let{coordinate:{leftTop:e,rightBottom:t}}=n,r=i.find(n=>{let{leftTop:r,rightTop:i,leftBottom:a}=n.coordinate;return e[0]>=r[0]&&t[0]<=i[0]&&e[1]>=r[1]&&t[1]<=a[1]});if(r)return r}return i[0]}getTablePositionList(e){return this.getTableTdByContext(e,this.positionContext)?.positionList||[]}getTableTdByContext(e,t){let n=t.tablePath?.length?t.tablePath:this._getTablePathByContext(t),r=e,i=null;for(let e=0;e<n.length;e++){let{index:t,trIndex:a,tdIndex:o}=n[e];if(i=r[t]?.trList?.[a]?.tdList[o]||null,!i)return null;r=i.value}return i}buildTablePositionContext(e,t,n,r){let i=t.trList[n],a=i.tdList[r],o=e.tablePath?.length?e.tablePath.map((e,o,s)=>o===s.length-1?{...e,trIndex:n,tdIndex:r,tdId:a.id,trId:i.id,tableId:t.id}:e):void 0;return{...e,isTable:!0,trIndex:n,tdIndex:r,tdId:a.id,trId:i.id,tableId:t.id,tablePath:o}}getTableElementByContext(e,t){let n=t.tablePath?.length?t.tablePath:this._getTablePathByContext(t),r=e,i=null;for(let e=0;e<n.length;e++){let{index:t,trIndex:a,tdIndex:o}=n[e];if(i=r[t]||null,!i)return null;if(e===n.length-1)break;let s=i.trList?.[a]?.tdList[o];if(!s)return null;r=s.value}return i}getTableElementPositionByContext(e,t,n){let r=n.tablePath?.length?n.tablePath:this._getTablePathByContext(n),i=e,a=t,o=null;for(let e=0;e<r.length;e++){let{index:t,trIndex:n,tdIndex:s}=r[e];o=a[t]||null;let c=i[t];if(!o||!c)return null;if(e===r.length-1)break;let l=c.trList?.[n]?.tdList[s];if(!l)return null;i=l.value,a=l.positionList||[]}if(o?.tableFragment){let t=this.getTableTdByContext(e,n),r=this.getCursorPosition(),i=!!t&&!!r&&!!t.positionList?.includes(r),a=i?r.pageNo:t?.positionList?.[0]?.pageNo;if(a!==void 0){let e=this.getTableFragmentPosition(o.index,a,i?r:t?.positionList?.[0]);if(e)return e}}return o}_getTablePathByContext(e){let{isTable:t,index:n,trIndex:r,tdIndex:i,tdId:a,trId:o,tableId:s}=e;return!t||n===void 0||r===void 0||i===void 0?[]:[{index:n,trIndex:r,tdIndex:i,tdId:a,trId:o,tableId:s}]}getPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalElementList()):this.getOriginalPositionList()}getMainPositionList(){return this.positionContext.isTable?this.getTablePositionList(this.draw.getOriginalMainElementList()):this.positionList}getOriginalPositionList(){let e=this.draw.getZone(),t=this.draw.getPageDirection(this.draw.getPageNo());return e.isHeaderActive()?this.draw.getHeader().getPositionList(t):e.isFooterActive()?this.draw.getFooter().getPositionList(t):this.positionList}getOriginalMainPositionList(){return this.positionList}getSelectionPositionList(){let{startIndex:e,endIndex:t}=this.draw.getRange().getRange();return e===t?null:this.getPositionList().slice(e+1,t+1)}setPositionList(e){this.positionList=e}setFloatPositionList(e){this.floatPositionList=e}getFloatPositionByElement(e){return this.floatPositionList.find(t=>t.element===e)||null}getFloatPositionCoordinate(e){let{scale:t}=this.options,n=e.element.imgFloatPosition,r=n.x*t,i=n.y*t,{index:a,isTable:o,zone:s}=e;if(o&&a!==void 0){let t,n=this.draw.getPageDirection(e.pageNo??this.draw.getPageNo());t=s===N.HEADER?this.draw.getHeader().getPositionList(n):s===N.FOOTER?this.draw.getFooter().getPositionList(n):this.positionList;let o=t[a];if(o?.tableFragment&&(o=this.getTableFragmentPosition(a,e.pageNo,e.position)||o),o){let{coordinate:{leftTop:[e,t]}}=o;r+=e,i+=t}}return{x:r,y:i}}computePageRowPosition(e){let{positionList:t,rowList:n,pageNo:r,startX:i,startY:a,startRowIndex:o,startIndex:s,innerWidth:c,zone:l,tablePosition:u}=e,{scale:d,table:{tdPadding:f}}=this.options,p=i,m=a,h=s,_=this.draw.getTraceParticle(),v=this.draw.getColumnLayout(),y;for(let s=0;s<n.length;s++){let b=n[s];y!==void 0&&b.columnIndex!==void 0&&b.columnIndex>0&&b.columnIndex!==y&&(m=a),y=b.columnIndex;let x=v&&b.columnIndex!==void 0&&b.columnIndex>=0,S=x&&v&&v.offsets[b.columnIndex]||0,C=x&&v?v.width:c;if(p+=S,!b.isSurround){let e=(hi(b.elementList,0)?.indentRight||0)*this.options.scale,t=b.width+(b.offsetX||0)+e;b.rowFlex===O.CENTER?p+=(C-t)/2:b.rowFlex===O.RIGHT&&(p+=C-t)}p+=b.offsetX||0,m+=b.offsetY||0;let w=p,T=m;for(let n=0;n<b.elementList.length;n++){let i=b.elementList[n];b.tableFragment&&(h=b.startIndex+n);let a=i.metrics,c=!i.hide&&!_.isTraceHidden(i)&&(i.imgDisplay!==g.INLINE&&i.type===B.IMAGE||i.type===B.LATEX)?b.ascent-a.height:b.ascent;i.left&&(p+=i.left),i.translateX&&(p+=i.translateX*d);let v={pageNo:r,index:h,value:i.value,rowIndex:o+s,rowNo:e.isTable?o+s:s,metrics:a,left:i.left||0,ascent:c,lineHeight:b.height,isFirstLetter:n===0,isLastLetter:n===b.elementList.length-1,columnIndex:b.columnIndex,coordinate:{leftTop:[p,m],leftBottom:[p,m+b.height],rightTop:[p+a.width,m],rightBottom:[p+a.width,m+b.height]}};if(i.imgDisplay===g.SURROUND||i.imgDisplay===g.FLOAT_TOP||i.imgDisplay===g.FLOAT_BOTTOM){let n=t[t.length-1];if(n&&(v.metrics=n.metrics,v.coordinate=n.coordinate),!i.imgFloatPosition){let e=u?.coordinate.leftTop;i.imgFloatPosition={x:e?p-e[0]:p,y:e?m-e[1]:m,pageNo:r}}this.floatPositionList.push({pageNo:r,element:i,position:v,isTable:e.isTable,index:e.index,tdIndex:e.tdIndex,trIndex:e.trIndex,tdValueIndex:h,zone:l})}let y=b.tableFragment;if(y){v.tableFragment=y,b.fragmentPosition=v,this.tablePagingPositionList.push(v);let e=this.tablePagingPositionMap.get(r)||[];e.push(v),this.tablePagingPositionMap.set(r,e),y.startTrIndex===0&&!y.startSplitTrOffset&&t.push(v)}else t.push(v);if(h++,p+=a.width,i.type===B.TABLE&&!i.hide&&!_.isTraceHidden(i)){let e=f[1]+f[3],t=y?this.draw.getTableParticle().getFragmentTdList(i,y):i.trList.flatMap(e=>e.tdList);for(let n of t){let t=!1,a=!1,o=0,s=n.height;if(y){if([o,s]=this.draw.getTableParticle().getTdWindowInFragment(n,i,y),s<=o)continue;t=o>0||s<n.height,a=o>0}let c=n.rowList,u=0,g=0;if(t){let e=this.draw.getTableParticle().getTdVisibleRowListByWindow(n,o,s);c=e.rowList,u=e.startIndex,g=e.startRowIndex}a||(n.positionList=[]);let _=n.positionList,b=y?this.draw.getTableParticle().getTdWindowOffsetY(o,y):0,x=this.computePageRowPosition({positionList:_,rowList:c,pageNo:r,startRowIndex:g,startIndex:u,startX:(n.x+f[3])*d+w+(i.translateX||0)*d,startY:(n.y+f[0])*d+T+b,innerWidth:(n.width-e)*d,isTable:!0,index:h-1,tdIndex:n.tdIndex,trIndex:n.rowIndex,zone:l,tablePosition:v});t||this._offsetTdPositionByVerticalAlign(n,_),p=x.x,m=x.y}if(y?.repeatTrIndexes?.length){b.repeatTdPositionList=[];let t=0;for(let n of y.repeatTrIndexes){let a=i.trList[n];for(let o=0;o<a.tdList.length;o++){let s=a.tdList[o],c=[];this.computePageRowPosition({positionList:c,rowList:s.rowList,pageNo:r,startRowIndex:0,startIndex:0,startX:(s.x+f[3])*d+w+(i.translateX||0)*d,startY:(t+f[0])*d+T,innerWidth:(s.width-e)*d,isTable:!0,index:h-1,tdIndex:o,trIndex:n,zone:l,tablePosition:v}),this._offsetTdPositionByVerticalAlign(s,c),b.repeatTdPositionList.push({td:s,positionList:c})}t+=a.height}}p=w,m=T}}p=i,m+=b.height}return{x:p,y:m,index:h}}_offsetTdPositionByVerticalAlign(e,t){if(e.verticalAlign!==Cn.MIDDLE&&e.verticalAlign!==Cn.BOTTOM)return;let{scale:n,table:{tdPadding:r}}=this.options,i=r[0]+r[2],a=e.rowList.reduce((e,t)=>e+t.height,0),o=(e.height-i)*n-a,s=e.verticalAlign===Cn.MIDDLE?o/2:o;Math.floor(s)>0&&t.forEach(e=>{let{coordinate:{leftTop:t,leftBottom:n,rightBottom:r,rightTop:i}}=e;t[1]+=s,n[1]+=s,r[1]+=s,i[1]+=s})}computePositionList(e){let t=this.draw.getPageRowList(),n=e?.fromPageNo??0,r=this.pagePositionCacheList,i=n>0&&r.length>=n&&t.length>n;if(i){let e=r.slice(0,n);this.positionList=e.flatMap(e=>e.positionList),this.floatPositionList=[...this.floatPositionList,...e.flatMap(e=>e.floatPositionList)],this.tablePagingPositionList=e.flatMap(e=>e.tablePagingPositionList);for(let e of[...this.tablePagingPositionMap.keys()])e>=n&&this.tablePagingPositionMap.delete(e);this.pagePositionCacheList=e}else this.positionList=[],this.tablePagingPositionList=[],this.tablePagingPositionMap.clear(),this.pagePositionCacheList=[];let a=i?n:0,o=this.draw.getHeader(),s=0;for(let e=0;e<a;e++)s+=t[e]?.length||0;for(let e=a;e<t.length;e++){let n=t[e];if(!n?.length){this.pagePositionCacheList.push({positionList:[],floatPositionList:[],tablePagingPositionList:[]});continue}let r=n[0].startIndex,{margins:i,innerWidth:a}=this.draw.getPageSize(e),c=i[3],l=i[0]+o.getExtraHeight(e),u=this.positionList.length,d=this.floatPositionList.length,f=this.tablePagingPositionList.length;this.computePageRowPosition({positionList:this.positionList,rowList:n,pageNo:e,startRowIndex:s,startIndex:r,startX:c,startY:l,innerWidth:a}),s+=n.length,this.pagePositionCacheList.push({positionList:this.positionList.slice(u),floatPositionList:this.floatPositionList.slice(d),tablePagingPositionList:this.tablePagingPositionList.slice(f)})}}computeRowPosition(e){let{row:t,innerWidth:n}=e,r=[];return this.computePageRowPosition({positionList:r,innerWidth:n,rowList:[K(t)],pageNo:0,startX:0,startY:0,startIndex:0,startRowIndex:0}),r}setCursorPosition(e){this.cursorPosition=e}getCursorPosition(){return this.cursorPosition}getPositionContext(){return this.positionContext}setPositionContext(e){this.eventBus.emit(`positionContextChange`,{value:e,oldValue:this.positionContext}),this.positionContext=e}_getColumnIndexByX(e){let t=this.draw.getColumnLayout();if(!t)return;let n=e-this.draw.getMargins()[3];for(let e=0;e<t.count;e++){let r=t.offsets[e],i=e<t.count-1?t.offsets[e+1]:r+t.width;if(n>=r&&n<i)return e}return t.count-1}_getTableChildPositionByXY(e){let{x:t,y:n,pageNo:r,element:i,index:a,tablePosition:o}=e,{scale:s}=this.options,c=o.tableFragment,l=c?this.draw.getTableParticle().getFragmentTdList(i,c):i.trList.flatMap(e=>e.tdList);for(let e of l){let l=e.rowIndex,u=e.tdIndex,d=i.trList[l];if(c){let[t,r]=this.draw.getTableParticle().getTdWindowInFragment(e,i,c);if(r<=t)continue;let a=o.coordinate.leftTop[1]+e.y*s+this.draw.getTableParticle().getTdWindowOffsetY(t,c),l=a+(r-t)*s;if(n<a||n>l)continue}let f=this.getPositionByXY({x:t,y:n,td:e,pageNo:r,tablePosition:o,isTable:!0,elementList:e.value,positionList:e.positionList});if(~f.index){let{index:t,isTable:n,hitLineStartIndex:r,tablePath:o=[]}=f,s={index:a,trIndex:l,tdIndex:u,tdId:e.id,trId:d.id,tableId:i.id};if(n)return{...f,index:a,tablePath:[s,...o],hitLineStartIndex:r};let c=e.value[t];return{index:a,isCheckbox:f.isCheckbox||c.type===B.CHECKBOX||c.controlComponent===U.CHECKBOX,isRadio:c.type===B.RADIO||c.controlComponent===U.RADIO,isControl:!!c.controlId,isImage:f.isImage,isDirectHit:f.isDirectHit,isTable:!0,tdIndex:u,trIndex:l,tdValueIndex:t,tdId:e.id,trId:d.id,tableId:i.id,tablePath:[s],hitLineStartIndex:r}}}return null}getPositionByXY(e){let{x:t,y:n,isTable:r}=e,{elementList:i,positionList:a}=e;i||=this.draw.getOriginalElementList(),a||=this.getOriginalPositionList();let o=this.draw.getZone(),s=e.pageNo??this.draw.getPageNo(),c=o.isMainActive(),l=s;if(!r){let t=this.getFloatPositionByXY({...e,imgDisplays:[g.FLOAT_TOP,g.SURROUND]});if(t)return t}for(let e=0;e<a.length;e++){let{index:r,pageNo:o,left:u,isFirstLetter:d,coordinate:{leftTop:f,rightTop:p,leftBottom:m}}=a[e];if(c){if(l!==o)continue;if(o>l)break}if(f[0]-u<=t&&p[0]>=t&&f[1]<=n&&m[1]>=n){let o=e,c=i[e];if(c.type===B.TABLE){let i=this._getTableChildPositionByXY({x:t,y:n,pageNo:s,element:c,index:r,tablePosition:a[e]});if(i)return i}if(c.type===B.IMAGE||c.type===B.LATEX)return{index:o,isDirectHit:!0,isImage:!0};if(c.type===B.CHECKBOX||c.controlComponent===U.CHECKBOX)return{index:o,isDirectHit:!0,isCheckbox:!0};if(c.type===B.LABEL)return{index:o,isDirectHit:!0,isLabel:!0};if(c.type===B.TAB&&c.listStyle===Yt.CHECKBOX){let e=o-1;for(;e>0;){let t=i[e];if(t.value===``&&t.listStyle===Yt.CHECKBOX)break;e--}return{index:e,isDirectHit:!0,isCheckbox:!0}}if(c.type===B.RADIO||c.controlComponent===U.RADIO)return{index:o,isDirectHit:!0,isRadio:!0};let l;if(i[r].value!==``){let n=p[0]-f[0];t<f[0]+n/2&&(o=e-1,d&&(l=e))}return{isDirectHit:!0,hitLineStartIndex:l,index:o,isControl:!!c.controlId}}}if(!r&&c){let e=this.tablePagingPositionMap.get(s)||[];for(let r of e){let{index:e,coordinate:{leftTop:a,rightTop:o,leftBottom:c}}=r;if(a[0]<=t&&o[0]>=t&&a[1]<=n&&c[1]>=n){let a=i[e];if(a?.type===B.TABLE){let i=this._getTableChildPositionByXY({x:t,y:n,pageNo:s,element:a,index:e,tablePosition:r});if(i)return i}}}}if(!r){let t=this.getFloatPositionByXY({...e,imgDisplays:[g.FLOAT_BOTTOM]});if(t)return t}let u=!1,d=-1,f;if(r){let{scale:r}=this.options,{td:i,tablePosition:a}=e;if(i&&a){let{leftTop:e}=a.coordinate,o=a.tableFragment,s=0;if(o){let e=o.startSplitTrOffset&&i.trIndex>o.startTrIndex?o.startSplitTrOffset:0;s=(o.repeatHeight-o.skipHeight-e)*r}let c=i.x*r+e[0],l=i.y*r+e[1]+s,u=i.width*r,f=i.height*r;if(!(c<t&&t<c+u&&l<n&&n<l+f))return{index:d}}}let p=c?a.filter(e=>e.isLastLetter&&e.pageNo===l):a.filter(e=>e.isLastLetter),m=this._getColumnIndexByX(t),h=m===void 0?p:p.filter(e=>e.columnIndex===void 0||m===e.columnIndex),_=this.draw.getOriginalRowList();for(let e=0;e<h.length;e++){let{index:r,rowNo:o,rowIndex:s,coordinate:{leftTop:p,leftBottom:m}}=h[e],g=_[s]?.offsetY||0;if(n>p[1]-g&&n<=m[1]){let e=c?a.findIndex(e=>e.pageNo===l&&e.rowNo===o):a.findIndex(e=>e.rowNo===o),s=i[e],m=a[e],h=n<=p[1],g=s.listStyle===Yt.CHECKBOX?this.draw.getMargins()[3]:m.coordinate.leftTop[0];if(h||t<g)~e?m.value===``?d=e:(d=e-1,f=e):d=r;else{if(s.listStyle===Yt.CHECKBOX&&t<p[0])return{index:e,isDirectHit:!0,isCheckbox:!0};d=r}u=!0;break}}if(!u){if(this.draw.getIsPagingMode()){let e=this.draw.getHeader(),t=e.isDisabled(s),r=t?0:e.getHeaderTop(s)+e.getHeight(s),i=this.draw.getFooter(),a=i.isDisabled(s),{height:o}=this.draw.getPageSize(s),l=a?o:o-(i.getFooterBottom(s)+i.getHeight(s));if(c){if(!t&&n<r)return{index:-1,zone:N.HEADER};if(!a&&n>l)return{index:-1,zone:N.FOOTER}}else if(n<=l&&n>=r)return{index:-1,zone:N.MAIN}}let e=this.draw.getMargins();if(n<=e[0])for(let n=0;n<a.length;n++){let r=a[n];if(r.pageNo!==l||r.rowNo!==0)continue;let{leftTop:i,rightTop:o}=r.coordinate;if(t<=e[3]||t>=i[0]&&t<=o[0]||a[n+1]?.rowNo!==0)return{index:r.index}}else{let n=h[h.length-1];if(n){let r=n.rowNo;for(let n=0;n<a.length;n++){let i=a[n];if(i.pageNo!==l||i.rowNo!==r)continue;let{leftTop:o,rightTop:s}=i.coordinate;if(t<=e[3]||t>=o[0]&&t<=s[0]||a[n+1]?.rowNo!==r)return{index:i.index}}}}return{index:h[h.length-1]?.index||a.length-1}}return{hitLineStartIndex:f,index:d,isControl:!!i[d]?.controlId}}getFloatPositionByXY(e){let{x:t,y:n}=e,r=e.pageNo??this.draw.getPageNo(),i=this.draw.getZone().getZone(),{scale:a}=this.options;for(let o=0;o<this.floatPositionList.length;o++){let{position:s,element:c,isTable:l,index:u,trIndex:d,tdIndex:f,tdValueIndex:p,zone:m,pageNo:h}=this.floatPositionList[o];if(r===h&&c.type===B.IMAGE&&c.imgDisplay&&e.imgDisplays.includes(c.imgDisplay)&&(!m||m===i)){let{x:e,y:r}=this.getFloatPositionCoordinate(this.floatPositionList[o]),i=c.width*a,m=c.height*a;if(t>=e&&t<=e+i&&n>=r&&n<=r+m)return l?{index:u,isDirectHit:!0,isImage:!0,isTable:l,trIndex:d,tdIndex:f,tdValueIndex:p,tdId:c.tdId,trId:c.trId,tableId:c.tableId}:{index:s.index,isDirectHit:!0,isImage:!0}}}}adjustPositionContext(e){let t=this.getPositionByXY(e);if(!~t.index)return null;if(t.isControl&&this.draw.getMode()!==M.READONLY){let{index:e,isTable:n,trIndex:r,tdIndex:i,tdValueIndex:a}=t,{newIndex:o}=this.draw.getControl().moveCursor({index:e,isTable:n,trIndex:r,tdIndex:i,tdValueIndex:a});n?t.tdValueIndex=o:t.index=o}let{index:n,isCheckbox:r,isRadio:i,isControl:a,isImage:o,isLabel:s,isDirectHit:c,isTable:l,trIndex:u,tdIndex:d,tdId:f,trId:p,tableId:m,tablePath:h}=t;return this.setPositionContext({isTable:l||!1,isCheckbox:r||!1,isRadio:i||!1,isControl:a||!1,isImage:o||!1,isLabel:s||!1,isDirectHit:c||!1,index:n,trIndex:u,tdIndex:d,tdId:f,trId:p,tableId:m,tablePath:h}),t}setSurroundPosition(e){let{scale:t}=this.options,{pageNo:n,row:r,rowElement:i,rowElementRect:a,surroundElementList:o,availableWidth:s}=e,c=a.x,l=0;if(o.length&&!si(i)&&!i.control?.minWidth)for(let e=0;e<o.length;e++){let u=o[e],d=u.imgFloatPosition;if(d.pageNo!==n)continue;let f={...d,x:d.x*t,y:d.y*t,width:u.width*t,height:u.height*t};if(Ve(a,f)){r.isSurround=!0;let e=f.width+f.x-a.x;if(i.left=e,r.width+=e,l+=e,c=f.x+f.width,r.width+i.metrics.width>s){i.left=0,r.width-=l;break}}}return{x:c,rowIncreaseWidth:l}}}})),ps,ms=o((()=>{Dp(),D(),Kt(),G(),z(),gi(),ps=class{draw;options;range;listener;eventBus;position;historyManager;defaultStyle;constructor(e){this.draw=e,this.options=e.getOptions(),this.listener=e.getListener(),this.eventBus=e.getEventBus(),this.position=e.getPosition(),this.historyManager=e.getHistoryManager(),this.range={startIndex:-1,endIndex:-1},this.defaultStyle=null}getRange(){return this.range}clearRange(){this.setRange(-1,-1)}setDefaultStyle(e){this.defaultStyle=e?{...this.defaultStyle,...e}:null}getDefaultStyle(){return this.defaultStyle}getRangeAnchorStyle(e,t){let n=Xr(e,t);return n?{...n,...this.defaultStyle}:null}getIsRangeChange(e,t,n,r,i,a,o){return this.range.startIndex!==e||this.range.endIndex!==t||this.range.tableId!==n||this.range.startTdIndex!==r||this.range.endTdIndex!==i||this.range.startTrIndex!==a||this.range.endTrIndex!==o}getIsCollapsed(){let{startIndex:e,endIndex:t}=this.range;return e===t}getIsSelection(){let{startIndex:e,endIndex:t}=this.range;return!~e&&!~t?!1:e!==t}getSelection(){let{startIndex:e,endIndex:t}=this.range;if(e===t)return null;let n=this.draw.getElementList();return n.slice(n[e]?.value===``?e:e+1,t+1)}getSelectionElementList(){if(this.range.isCrossRowCol){let e=this.draw.getTableParticle().getRangeRowCol();if(!e)return null;let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.length;e++){let n=r[e];t.push(...n.value)}}return t}return this.getSelection()}getTextLikeSelection(){let e=this.getSelection();return e?e.filter(e=>!e.type||Vt.includes(e.type)):null}getTextLikeSelectionElementList(){let e=this.getSelectionElementList();return e?e.filter(e=>!e.type||Vt.includes(e.type)):null}getRangeRow(){let{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;let n=this.position.getPositionList(),r=new Map;for(let i=e;i<t+1;i++){let{pageNo:e,rowNo:t}=n[i],a=r.get(e);a?a.has(t)||a.add(t):r.set(e,new Set([t]))}return r}getRangeRowElementList(){let{startIndex:e,endIndex:t,isCrossRowCol:n}=this.range;if(!~e&&!~t)return null;if(n)return this.getSelectionElementList();let r=this.getRangeRow();if(!r)return null;let i=this.position.getPositionList(),a=this.draw.getElementList(),o=[];for(let e=0;e<i.length;e++){let t=i[e],n=r.get(t.pageNo);n&&n.has(t.rowNo)&&o.push(a[e])}return o}getRangeParagraph(){let{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;let n=this.position.getPositionList(),r=this.draw.getElementList(),i=new Map,a=e;for(;a>=0;){let{pageNo:e,rowNo:t}=n[a],o=i.get(e);o||(o=[],i.set(e,o)),o.includes(t)||o.unshift(t);let s=r[a],c=r[a-1];if(s.value===``&&!s.listWrap||s.listId!==c?.listId||s.titleId!==c?.titleId)break;a--}let o=e===t;if(!o){let r=e+1;for(;r<t;){let{pageNo:e,rowNo:t}=n[r],a=i.get(e);a||(a=[],i.set(e,a)),a.includes(t)||a.push(t),r++}}let s=t;for(o&&r[e].value===``&&(s+=1);s<n.length;){let e=r[s],t=r[s+1];if(e.value===``&&!e.listWrap||e.listId!==t?.listId||e.titleId!==t?.titleId)break;let{pageNo:a,rowNo:o}=n[s],c=i.get(a);c||(c=[],i.set(a,c)),c.includes(o)||c.push(o),s++}return i}getRangeParagraphInfo(){let{startIndex:e,endIndex:t}=this.range;if(!~e&&!~t)return null;let n=-1,r=[],i=this.getRangeParagraph();if(!i)return null;let a=this.draw.getElementList(),o=this.position.getPositionList();for(let e=0;e<o.length;e++){let t=o[e],s=i.get(t.pageNo);s&&s.includes(t.rowNo)&&(~n||(n=t.index),r.push(a[e]))}return r.length?{elementList:r,startIndex:n}:null}getRangeParagraphElementList(){return this.range.isCrossRowCol?this.getSelectionElementList():this.getRangeParagraphInfo()?.elementList||null}getRangeTableElement(){let e=this.position.getPositionContext();return e.isTable?this.draw.getOriginalElementList()[e.index]:null}getIsSelectAll(){let e=this.draw.getElementList(),{startIndex:t,endIndex:n}=this.range;return t===0&&e.length-1===n&&!this.position.getPositionContext().isTable}getIsPointInRange(e,t){let{startIndex:n,endIndex:r}=this.range,i=this.position.getPositionList();for(let a=n+1;a<=r&&i[a];a++){let{coordinate:{leftTop:n,rightBottom:r}}=i[a];if(e>=n[0]&&e<=r[0]&&t>=n[1]&&t<=r[1])return!0}return!1}getKeywordRangeList(e){let t=this.draw.getSearch().getMatchList(e,this.draw.getOriginalElementList()),n=new Map;for(let e of t){let t=n.get(e.groupId);if(t)t.endIndex+=1;else{let{type:t,groupId:r,tableId:i,index:a,tdIndex:o,trIndex:s}=e,c={startIndex:a,endIndex:a};t===j.TABLE&&(c.tableId=i,c.startTdIndex=o,c.endTdIndex=o,c.startTrIndex=s,c.endTrIndex=s),n.set(r,c)}}let r=[];return n.forEach(e=>{r.push(e)}),r}getIsCanInput(){let{startIndex:e,endIndex:t}=this.getRange();if(!~e&&!~t)return!1;let n=this.draw.getElementList(),r=n[e];if(e===t)return(r.controlComponent!==U.PRE_TEXT||n[e+1]?.controlComponent!==U.PRE_TEXT)&&r.controlComponent!==U.POST_TEXT;let i=n[t];return!r.controlId&&!i.controlId||(!r.controlId||r.controlComponent===U.POSTFIX)&&(!i.controlId||i.controlComponent===U.POSTFIX)||!!r.controlId&&i.controlId===r.controlId&&i.controlComponent!==U.PRE_TEXT&&i.controlComponent!==U.POST_TEXT&&i.controlComponent!==U.POSTFIX}setRange(e,t,n,r,i,a,o){let s=this.getIsRangeChange(e,t,n,r,i,a,o);s&&(this.range.startIndex=e,this.range.endIndex=t,this.range.tableId=n,this.range.startTdIndex=r,this.range.endTdIndex=i,this.range.startTrIndex=a,this.range.endTrIndex=o,this.range.isCrossRowCol=!!(r||i||a||o),this.setDefaultStyle(null)),this.range.zone=this.draw.getZone().getZone();let c=this.draw.getControl();~e&&~t&&this.draw.getElementList()[e]?.controlId?c.initControl():(c.destroyControl(),s&&this.eventBus.isSubscribe(`rangeChange`)&&this.eventBus.emit(`rangeChange`,this.range))}replaceRange(e){this.setRange(e.startIndex,e.endIndex,e.tableId,e.startTdIndex,e.endTdIndex,e.startTrIndex,e.endTrIndex)}shrinkRange(){let{startIndex:e,endIndex:t}=this.range;e!==t&&(~e||~t)&&this.replaceRange({...this.range,startIndex:t})}setRangeStyle(){let e=this.listener.rangeStyleChange,t=this.eventBus.isSubscribe(`rangeStyleChange`);if(!e&&!t)return;let{startIndex:n,endIndex:r,isCrossRowCol:i}=this.range;if(!~n&&!~r)return;let a;if(i)a=this.draw.getOriginalElementList()[this.position.getPositionContext().index];else{let e=~r?r:0,t=this.draw.getElementList();a=this.getRangeAnchorStyle(t,e)}if(!a)return;let o=this.getSelection()||[a],s=a.type||B.TEXT,c=a.font||this.options.defaultFont,l=a.size||this.options.defaultSize,u=!~o.findIndex(e=>!e.bold),d=!~o.findIndex(e=>!e.italic),f=!~o.findIndex(e=>!e.underline&&!e.control?.underline),p=!~o.findIndex(e=>!e.strikeout),m=a.color||null,h=a.highlight||null,g=a.rowFlex||null,_=a.rowMargin??this.options.defaultRowMargin,v=a.spacingBefore??0,y=a.spacingAfter??0,b=a.indentLeft??0,x=a.indentRight??0,S=a.indentFirstLine??0,C=a.tabStops||null,w=a.dashArray||[],T=a.level||null,E=a.listType||null,D=a.listStyle||null,O=f&&a.textDecoration||null,k=!!this.draw.getPainterStyle(),A={type:s,undo:this.historyManager.isCanUndo(),redo:this.historyManager.isCanRedo(),painter:k,font:c,size:l,bold:u,italic:d,underline:f,strikeout:p,color:m,highlight:h,rowFlex:g,rowMargin:_,spacingBefore:v,spacingAfter:y,indentLeft:b,indentRight:x,indentFirstLine:S,tabStops:C,dashArray:w,level:T,listType:E,listStyle:D,groupIds:a.groupIds||null,textDecoration:O,extension:a.extension??null};e&&e(A),t&&this.eventBus.emit(`rangeStyleChange`,A)}recoveryRangeStyle(){let e=this.listener.rangeStyleChange,t=this.eventBus.isSubscribe(`rangeStyleChange`);if(!e&&!t)return;let n=this.options.defaultFont,r=this.options.defaultSize,i=this.options.defaultRowMargin,a=!!this.draw.getPainterStyle(),o={type:null,undo:this.historyManager.isCanUndo(),redo:this.historyManager.isCanRedo(),painter:a,font:n,size:r,bold:!1,italic:!1,underline:!1,strikeout:!1,color:null,highlight:null,rowFlex:null,rowMargin:i,spacingBefore:0,spacingAfter:0,indentLeft:0,indentRight:0,indentFirstLine:0,tabStops:null,dashArray:[],level:null,listType:null,listStyle:null,groupIds:null,textDecoration:null,extension:null};e&&e(o),t&&this.eventBus.emit(`rangeStyleChange`,o)}shrinkBoundary(e={}){let t=e.elementList||this.draw.getElementList(),n=e.range||this.getRange(),{startIndex:r,endIndex:i}=n;if(!~r&&!~i)return;let a=t[r],o=t[i];if(r===i){if(a.controlComponent===U.PLACEHOLDER){let e=r-1;for(;e>0;){let r=t[e];if(r.controlId!==a.controlId||r.controlComponent===U.PREFIX||r.controlComponent===U.PRE_TEXT){n.startIndex=e,n.endIndex=e;break}e--}}}else{if(a.controlComponent===U.PLACEHOLDER||o.controlComponent===U.PLACEHOLDER){let e=i-1;for(;e>0;){let r=t[e];if(r.controlId!==o.controlId||r.controlComponent===U.PREFIX||r.controlComponent===U.PRE_TEXT){n.startIndex=e,n.endIndex=e;return}e--}}if(a.controlComponent===U.PREFIX){let e=r+1;for(;e<t.length;){let r=t[e];if(r.controlId!==a.controlId||r.controlComponent===U.VALUE){n.startIndex=e-1;break}if(r.controlComponent===U.PLACEHOLDER){n.startIndex=e-1,n.endIndex=e-1;return}e++}}if(o.controlComponent!==U.VALUE){let e=r-1;for(;e>0;){let r=t[e];if(r.controlId!==a.controlId||r.controlComponent===U.VALUE){n.startIndex=e;break}if(r.controlComponent===U.PLACEHOLDER){n.startIndex=e,n.endIndex=e;return}e--}}}}render(e,t,n,r,i){e.save(),e.globalAlpha=this.options.rangeAlpha,e.fillStyle=this.options.rangeColor,e.fillRect(t,n,r,i),e.restore()}toString(){let e=this.getTextLikeSelection();return e?e.filter(e=>!Lr(e)).map(e=>e.value).join(``).replace(RegExp(``,`g`),``):``}}})),hs,gs=o((()=>{bn(),hs=class{draw;options;imageCache;constructor(e){this.draw=e,this.options=e.getOptions(),this.imageCache=new Map}_renderBackgroundColor(e,t,n,r){e.save(),e.fillStyle=t,e.fillRect(0,0,n,r),e.restore()}_drawImage(e,t,n,r){let{background:i,scale:a}=this.options;if(i.size===vn.CONTAIN){let o=t.width*a,s=t.height*a;if(!i.repeat||i.repeat===yn.NO_REPEAT)e.drawImage(t,0,0,o,s);else{let c=0,l=0,u=i.repeat===yn.REPEAT||i.repeat===yn.REPEAT_X?Math.ceil(n*a/o):1,d=i.repeat===yn.REPEAT||i.repeat===yn.REPEAT_Y?Math.ceil(r*a/s):1;for(let n=0;n<u;n++){for(let n=0;n<d;n++)e.drawImage(t,c,l,o,s),l+=s;l=0,c+=o}}}else e.drawImage(t,0,0,n*a,r*a)}_renderBackgroundImage(e,t,n){let{background:r}=this.options,i=this.imageCache.get(r.image);if(i)this._drawImage(e,i,t,n);else{let i=new Image;i.setAttribute(`crossOrigin`,`Anonymous`),i.src=r.image,i.onload=()=>{this.imageCache.set(r.image,i),this._drawImage(e,i,t,n),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}}render(e,t){let{background:{image:n,color:r,applyPageNumbers:i}}=this.options;if(n&&(!i?.length||i.includes(t))){let{width:t,height:n}=this.options;this._renderBackgroundImage(e,t,n)}else{let n=this.draw.getCanvasWidth(t),i=this.draw.getCanvasHeight(t);this._renderBackgroundColor(e,r,n,i)}}}})),_s,vs=o((()=>{_s=class{fillRect;fillColor;fillDecorationStyle;constructor(){this.fillRect=this.clearFillInfo()}clearFillInfo(){return this.fillColor=void 0,this.fillDecorationStyle=void 0,this.fillRect={x:0,y:0,width:0,height:0},this.fillRect}recordFillInfo(e,t,n,r,i,a,o){let s=!this.fillRect.width;!s&&(this.fillColor!==a||this.fillDecorationStyle!==o)?(this.render(e),this.clearFillInfo(),this.recordFillInfo(e,t,n,r,i,a,o)):(s&&(this.fillRect.x=t,this.fillRect.y=n),i&&this.fillRect.height<i&&(this.fillRect.height=i),this.fillRect.width+=r,this.fillColor=a,this.fillDecorationStyle=o)}}})),ys,bs=o((()=>{vs(),ys=class extends _s{options;constructor(e){super(),this.options=e.getOptions()}render(e){if(!this.fillRect.width)return;let{highlightAlpha:t}=this.options,{x:n,y:r,width:i,height:a}=this.fillRect;e.save(),e.globalAlpha=t,e.fillStyle=this.fillColor,e.fillRect(n,r,i,a),e.restore(),this.clearFillInfo()}}})),xs,Ss=o((()=>{z(),xs=class{draw;options;constructor(e){this.draw=e,this.options=e.getOptions()}render(e,t){let{marginIndicatorColor:n,pageMode:r}=this.options,{width:i,height:a,margins:o}=this.draw.getPageSize(t),s=r===P.CONTINUITY?this.draw.getCanvasHeight(t)/this.draw.getPagePixelRatio():a,c=this.draw.getMarginIndicatorSize();e.save(),e.translate(.5,.5),e.strokeStyle=n,e.beginPath();let l=[o[3],o[0]],u=[i-o[1],o[0]],d=[o[3],s-o[2]],f=[i-o[1],s-o[2]];e.moveTo(l[0]-c,l[1]),e.lineTo(...l),e.lineTo(l[0],l[1]-c),e.moveTo(u[0]+c,u[1]),e.lineTo(...u),e.lineTo(u[0],u[1]-c),e.moveTo(d[0]-c,d[1]),e.lineTo(...d),e.lineTo(d[0],d[1]+c),e.moveTo(f[0]+c,f[1]),e.lineTo(...f),e.lineTo(f[0],f[1]+c),e.stroke(),e.restore()}}})),Cs,ws=o((()=>{D(),Kt(),G(),z(),V(),J(),Cs=class{draw;options;position;range;searchKeyword;searchNavigateIndex;searchOptions;searchMatchList;constructor(e){this.draw=e,this.options=e.getOptions(),this.position=e.getPosition(),this.range=e.getRange(),this.searchNavigateIndex=null,this.searchOptions=null,this.searchKeyword=null,this.searchMatchList=[]}getSearchKeyword(){return this.searchKeyword}setSearchKeyword(e,t){this.searchKeyword=e,this.searchNavigateIndex=null,this.searchOptions=t||null}getSearchMatchGroupStartIndex(e){let t=this.searchMatchList[e];if(!t)return null;let n=e;for(;n>0&&this.searchMatchList[n-1].groupId===t.groupId;)n--;return n}searchNavigatePre(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let e=this.searchNavigateIndex-1,t=!1,n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;e>=0;){if(n!==this.searchMatchList[e].groupId){t=!0,this.searchNavigateIndex=this.getSearchMatchGroupStartIndex(e);break}e--}if(!t){if(this.searchMatchList[this.searchMatchList.length-1].groupId===n)return null;this.searchNavigateIndex=this.getSearchMatchGroupStartIndex(this.searchMatchList.length-1)}}return this.searchNavigateIndex}searchNavigateNext(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let e=this.searchNavigateIndex+1,t=!1,n=this.searchMatchList[this.searchNavigateIndex].groupId;for(;e<this.searchMatchList.length;){if(n!==this.searchMatchList[e].groupId){t=!0,this.searchNavigateIndex=e;break}e++}if(!t){if(this.searchMatchList[0].groupId===n)return null;this.searchNavigateIndex=0}}return this.searchNavigateIndex}searchNavigateScrollIntoView(e){let{coordinate:{leftTop:t,leftBottom:n,rightTop:r},pageNo:i}=e,{x:a,y:o}=this.draw.getPageOffset(i),s=document.createElement(`div`);s.style.position=`absolute`,s.style.width=`${r[0]-t[0]+50}px`,s.style.height=`${n[1]-t[1]+50}px`,s.style.left=`${t[0]+a}px`,s.style.top=`${t[1]+o}px`,this.draw.getContainer().append(s),s.scrollIntoView(!1),s.remove()}getSearchNavigateIndexList(){if(this.searchNavigateIndex===null||!this.searchKeyword)return[];let e=this.searchMatchList[this.searchNavigateIndex];if(!e)return[];let t=[],n=this.searchNavigateIndex;for(;n<this.searchMatchList.length&&this.searchMatchList[n].groupId===e.groupId;)t.push(n),n++;return t}getSearchMatchList(){return this.searchMatchList}getSearchNavigateInfo(){if(!this.searchKeyword||!this.searchMatchList.length)return null;let e=this.searchNavigateIndex===null?null:this.searchMatchList[this.searchNavigateIndex]?.groupId,t=0,n=0,r=null;for(let i=0;i<this.searchMatchList.length;i++){let a=this.searchMatchList[i];r!==a.groupId&&(r=a.groupId,n+=1,e===r&&(t=n))}return{index:t,count:n}}getMatchList(e,t){let{isRegEnable:n=!1,isIgnoreCase:r=!0}=this.searchOptions||{},i=r?e.toLocaleLowerCase():e,a=[],o=[],s=t.length,c=[];for(let e=0;e<s;e++)t[e].type===B.TABLE&&c.push(e);let l=0,u=0;for(;u<s-1;){let e=c.length?c[l]:s,n=t.slice(u,e);n.length&&o.push({index:u,type:j.PAGE,elementList:n});let r=t[e];r&&o.push({index:e,type:j.TABLE,elementList:[r]}),u=e+1,l++}let d=this.draw.getTraceParticle();function f(e,t,i,o){if(!e)return;let s=i.map(e=>!e.type||Vt.includes(e.type)&&e.controlComponent!==U.CHECKBOX&&e.controlComponent!==U.RADIO&&!e.hide&&!e.control?.hide&&!e.area?.hide&&!d.isTraceHidden(e)?e.value:``).filter(Boolean).join(``);r&&(s=s.toLocaleLowerCase());let c=[],l=n?new RegExp(e):e,{index:u,length:f}=Ge(s,l);for(;u!==-1&&f!==0;){c.push({index:u,length:f});let e=Ge(s,l,u+f);u=e.index,f=e.length}for(let e=0;e<c.length;e++){let{index:n,length:r}=c[e],i=q();for(let e=0;e<r;e++){let r=n+e+(o?.startIndex||0);a.push({type:t,index:r,groupId:i,...o})}}}for(let e=0;e<o.length;e++){let t=o[e];if(t.type===j.TABLE){let e=t.elementList[0];for(let n=0;n<e.trList.length;n++){let r=e.trList[n];for(let a=0;a<r.tdList.length;a++){let o=r.tdList[a],s={tableId:e.id,tableIndex:t.index,trIndex:n,tdIndex:a,tdId:o.id};f(i,t.type,o.value,s)}}}else f(i,t.type,t.elementList,{startIndex:t.index})}return a}compute(e){let t=this.searchOptions?.isLimitSelection&&!this.range.getIsCollapsed(),n=t?this.range.getSelectionElementList():this.draw.getOriginalElementList();if(!n?.length||(this.searchMatchList=this.getMatchList(e,n),!t||!this.searchMatchList.length))return;let{startIndex:r}=this.range.getRange(),i=r+1;for(let e of this.searchMatchList)e.type===j.TABLE?e.tableIndex+=i:e.index+=i}render(e,t){if(!this.searchMatchList||!this.searchMatchList.length||!this.searchKeyword)return;let{searchMatchAlpha:n,searchMatchColor:r,searchNavigateMatchColor:i}=this.options,a=this.position.getOriginalPositionList(),o=this.draw.getOriginalElementList();e.save(),e.globalAlpha=n;for(let n=0;n<this.searchMatchList.length;n++){let s=this.searchMatchList[n],c=null;if(s.type===j.TABLE){let{tableIndex:e,trIndex:t,tdIndex:n,index:r}=s;c=o[e]?.trList[t].tdList[n]?.positionList[r]}else c=a[s.index];if(!c)continue;let{coordinate:{leftTop:l,leftBottom:u,rightTop:d},pageNo:f}=c;if(f!==t)continue;if(this.getSearchNavigateIndexList().includes(n)){e.fillStyle=i;let t=this.searchMatchList[n-1];t&&t.groupId===s.groupId||this.searchNavigateScrollIntoView(c)}else e.fillStyle=r;let p=l[0],m=l[1],h=d[0]-l[0],g=u[1]-l[1];e.fillRect(p,m,h,g)}e.restore()}replace(e,t){if(this.draw.isReadonly()||e==null)return;let n=this.getSearchMatchList(),r=t?.index;if(Oe(r)){let e=[];n.forEach(t=>{let n=e[e.length-1];!n||n[0].groupId!==t.groupId?e.push([t]):n.push(t)}),n=e[r]}if(!n?.length)return;let i=this.draw.isDesignMode();if(!this.draw.getOptions().trace.disabled){this.replaceWithTrace(e,n);return}let a=0,o=0,s=``,c=``,l=-1,u=this.draw.getOriginalElementList();for(let t=0;t<n.length;t++){let r=n[t];if(r.type===j.TABLE){let{tableIndex:n,trIndex:d,tdIndex:f,index:p,tdId:m}=r;c&&m!==c&&(o=0),c=m;let h=u[n+a].trList[d].tdList[f].value,g=p+o,_=h[g];if(!i&&(_?.control?.deletable===!1||_?.title?.deletable===!1)||_.type===B.CONTROL&&_.controlComponent!==U.VALUE)continue;if(e===``){this.draw.spliceElementList(h,g,1),o--,~l||(l=t);continue}if(s===r.groupId){this.draw.spliceElementList(h,g,1),o--;continue}~l||(l=t);for(let t=0;t<e.length;t++){let n=e[t];t===0?_.value=n:(this.draw.spliceElementList(h,g+t,0,[{..._,value:n}]),o++)}}else{let n=r.index+a,o=u[n];if(!i&&(o?.control?.deletable===!1||o?.title?.deletable===!1)||o.type===B.CONTROL&&o.controlComponent!==U.VALUE)continue;if(e===``){this.draw.spliceElementList(u,n,1),a--,~l||(l=t);continue}if(~l||(l=t),s===r.groupId){this.draw.spliceElementList(u,n,1),a--;continue}for(let t=0;t<e.length;t++){let r=e[t];t===0?o.value=r:(this.draw.spliceElementList(u,n+t,0,[{...o,value:r}]),a++)}}s=r.groupId}if(!~l)return;let d=n[l],f=d.index+(e.length-1);if(d.type===j.TABLE){let{tableIndex:e,trIndex:t,tdIndex:n,index:r}=d,i=u[e].trList[t].tdList[n].value[r];this.position.setPositionContext({isTable:!0,index:e,trIndex:t,tdIndex:n,tdId:i.tdId,trId:i.trId,tableId:i.tableId})}else this.position.setPositionContext({isTable:!1});this.draw.getRange().setRange(f,f),this.draw.render({curIndex:f})}replaceWithTrace(e,t){let n=[];for(let e of t){let t=n[n.length-1];!t||t[0].groupId!==e.groupId?n.push([e]):t.push(e)}let r=this.draw.getOriginalElementList(),i=null,a=-1;for(let t=n.length-1;t>=0;t--){let o=n[t],s=o[0],c,l=!0;if(s.type===j.TABLE){let{tableIndex:e,trIndex:t,tdIndex:n}=s,i=r[e].trList[t].tdList[n];c=i.value,l=i.deletable!==!1}else c=r;let u=s.index;if(c.slice(u,u+o.length).some(e=>e.type===B.CONTROL&&e.controlComponent!==U.VALUE))continue;let d=(this.draw.deleteElementList(c,u,o.length,{tdDeletable:l})||[])[0];if(!d)continue;let f=c.indexOf(d,u);if(e){let t=e.split(``).map(e=>{let t={...d,value:e};return delete t.trace,t});this.draw.getTraceParticle().markElementListInserted(t),this.draw.spliceElementList(c,f,0,t)}i=s,a=e?f+e.length-1:Math.max(f-1,0)}if(i){if(i.type===j.TABLE){let{tableIndex:e,trIndex:t,tdIndex:n,tdId:a,tableId:o}=i;this.position.setPositionContext({isTable:!0,index:e,trIndex:t,tdIndex:n,tdId:a,trId:r[e].trList[t].id,tableId:o})}else this.position.setPositionContext({isTable:!1});this.draw.getRange().setRange(a,a),this.draw.render({curIndex:a})}}}})),Ts,Es=o((()=>{D(),Kt(),V(),J(),Ts=class{options;draw;position;segmenter;spellcheckRangeList;constructor(e){this.draw=e,this.options=e.getOptions(),this.position=e.getPosition(),this.segmenter=null,this.spellcheckRangeList=[]}_isElementHidden(e){return!!(e.hide||e.control?.hide||e.area?.hide||this.draw.getTraceParticle().isTraceHidden(e))}getSpellcheckRangeList(){return this.options.spellcheck.disabled&&(this.spellcheckRangeList=[]),this.spellcheckRangeList}_appendWordList(e,t,n,r,i){if(!this.segmenter)return;let a=[],o=[],s=0;for(let r=t;r<n;r++){let t=e[r],n=!this._isElementHidden(t)&&(!t.type||t.type!==B.CONTROL&&Vt.includes(t.type))?t.value:``;a.push(n),s+=n.length,o.push(s-1)}let c=a.join(``),l=0;for(let{segment:e,index:n,isWordLike:a}of this.segmenter.segment(c)){if(!a)continue;for(;o[l]<n;)l++;let s=l,c=n+e.length-1;for(;o[l]<c;)l++;r.push({word:e,startIndex:t+s,endIndex:t+l,...i})}}_collectWordList(e,t,n){let r=0;for(let i=0;i<e.length;i++){let a=e[i];if(a.type===B.TABLE){if(this._appendWordList(e,r,i,t,n),!this._isElementHidden(a)){let e=a.trList||[];for(let r=0;r<e.length;r++){let o=e[r],s=o.tdList;for(let e=0;e<s.length;e++){let c=s[e],l=[...n?.tablePath||[],{index:i,trIndex:r,tdIndex:e,tdId:c.id,trId:o.id,tableId:a.id}];this._collectWordList(c.value,t,{tableId:a.id,tableIndex:l[0].index,trIndex:r,tdIndex:e,tablePath:l})}}}r=i+1}}this._appendWordList(e,r,e.length,t,n)}getSpellcheckWordList(){if(this.options.spellcheck.disabled||(!this.segmenter&&Intl.Segmenter&&(this.segmenter=new Intl.Segmenter(void 0,{granularity:`word`})),!this.segmenter))return[];let e=this.draw.getOriginalMainElementList(),t=[];return this._collectWordList(e,t),t}setSpellcheckRangeList(e){let t=!this.options.spellcheck.disabled&&e?e.filter(e=>{let t=e.tableId===void 0&&e.tableIndex===void 0&&e.trIndex===void 0&&e.tdIndex===void 0||typeof e.tableId==`string`&&Number.isInteger(e.tableIndex)&&Number.isInteger(e.trIndex)&&Number.isInteger(e.tdIndex);return Number.isInteger(e.startIndex)&&Number.isInteger(e.endIndex)&&e.startIndex>=0&&e.startIndex<=e.endIndex&&t}):[];return!t.length&&!this.spellcheckRangeList.length?!1:(this.spellcheckRangeList=t,!0)}_isSameTablePath(e,t){if(!e)return!0;if(!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let r=e[n],i=t[n];if(r.index!==i.index||r.trIndex!==i.trIndex||r.tdIndex!==i.tdIndex||r.tableId!==i.tableId)return!1}return!0}getRangeByIndex(e,t){if(this.options.spellcheck.disabled)return null;for(let n of this.spellcheckRangeList)if(n.tableId===t?.tableId&&n.tableIndex===t?.tableIndex&&n.trIndex===t?.trIndex&&n.tdIndex===t?.tdIndex&&this._isSameTablePath(n.tablePath,t?.tablePath)&&!(e<n.startIndex||e>n.endIndex))return n;return null}_drawWave(e,t,n,r){if(r<=0)return;let{scale:i}=this.options,a=1.2*i,o=n+a,s=2*i,c=t+r,l=t,u=1;for(e.beginPath(),e.moveTo(l,o);l<c;){let t=Math.min(l+s,c);e.quadraticCurveTo((l+t)/2,o+a*u,t,o),u*=-1,l=t}e.stroke()}render(e,t){if(this.options.spellcheck.disabled||!this.spellcheckRangeList.length)return;let n=this.position.getOriginalMainPositionList(),r=this.draw.getOriginalMainElementList();e.save(),e.strokeStyle=this.options.spellcheck.color,e.lineWidth=this.options.scale;for(let i of this.spellcheckRangeList){let a=n;if(i.tableIndex!==void 0&&(a=this.position.getTableTdByContext(r,{isTable:!0,index:i.tableIndex,tableId:i.tableId,trIndex:i.trIndex,tdIndex:i.tdIndex,tablePath:i.tablePath})?.positionList||[]),i.startIndex>=a.length)continue;let o=Math.min(i.endIndex,a.length-1),s=a[i.startIndex]?.pageNo,c=a[o]?.pageNo;if(Oe(s)&&Oe(c)&&(t<s||t>c))continue;let l=-1,u=0,d=0,f=()=>{~l&&(this._drawWave(e,l,u,d-l),l=-1)};for(let e=i.startIndex;e<=o;e++){let n=a[e];if(!n)continue;let{pageNo:r,ascent:i,metrics:{boundingBoxDescent:o},coordinate:{leftTop:s,rightTop:c}}=n;if(r!==t){f();continue}let p=s[1]+i+o;~l?(p===u||(f(),l=s[0],u=p),d=c[0]):(l=s[0],u=p,d=c[0])}f()}e.restore()}}})),Ds,Os=o((()=>{vs(),Ds=class extends _s{options;constructor(e){super(),this.options=e.getOptions()}render(e){if(!this.fillRect.width)return;let{scale:t,strikeoutColor:n}=this.options,{x:r,y:i,width:a}=this.fillRect;e.save(),e.lineWidth=t,e.strokeStyle=this.fillColor||n;let o=i+.5;e.beginPath(),e.moveTo(r,o),e.lineTo(r+a,o),e.stroke(),e.restore(),this.clearFillInfo()}}})),ks,As,js=o((()=>{ks=function(e){return e.SOLID=`solid`,e.DOUBLE=`double`,e.DASHED=`dashed`,e.DOTTED=`dotted`,e.WAVY=`wavy`,e}({}),As=function(e){return e.SOLID=`solid`,e.DASHED=`dashed`,e.DOTTED=`dotted`,e}({})})),Ms,Ns=o((()=>{vs(),js(),Ms=class extends _s{options;constructor(e){super(),this.options=e.getOptions()}_drawLine(e,t,n,r,i){let a=t+r;switch(e.beginPath(),i){case As.DASHED:e.setLineDash([3,1]);break;case As.DOTTED:e.setLineDash([1,1])}e.moveTo(t,n),e.lineTo(a,n),e.stroke()}_drawDouble(e,t,n,r){let i=t+r,a=n+3*this.options.scale;e.beginPath(),e.moveTo(t,n),e.lineTo(i,n),e.stroke(),e.beginPath(),e.moveTo(t,a),e.lineTo(i,a),e.stroke()}_drawWave(e,t,n,r){let{scale:i}=this.options,a=1.2*i,o=1/i,s=n+2*a;e.beginPath();for(let n=0;n<r;n++){let r=a*Math.sin(o*n);e.lineTo(t+n,s+r)}e.stroke()}render(e){if(!this.fillRect.width)return;let{underlineColor:t,scale:n}=this.options,{x:r,y:i,width:a}=this.fillRect;e.save(),e.strokeStyle=this.fillColor||t,e.lineWidth=n;let o=Math.floor(i+2*e.lineWidth)+.5;switch(this.fillDecorationStyle){case ks.WAVY:this._drawWave(e,r,o,a);break;case ks.DOUBLE:this._drawDouble(e,r,o,a);break;case ks.DASHED:this._drawLine(e,r,o,a,As.DASHED);break;case ks.DOTTED:this._drawLine(e,r,o,a,As.DOTTED);break;default:this._drawLine(e,r,o,a)}e.restore(),this.clearFillInfo()}}})),Ps,Fs=o((()=>{Dp(),D(),ce(),aa(),pa(),Ps=class{draw;options;ctx;curX;curY;text;curStyle;curColor;curSourceElement;sourceKeys;sourceKeyId;textMeasurer;constructor(e){this.draw=e,this.options=e.getOptions(),this.ctx=new ia,this.curX=-1,this.curY=-1,this.text=``,this.curStyle=``,this.sourceKeys=new WeakMap,this.sourceKeyId=0,this.textMeasurer=e.getTextMeasurer()}measureBasisWord(e,t){return this.textMeasurer.measureBasis(t,e)}measureWord(e,t,n){let r=this.draw.getLetterReg(),i=0,a=null,o=n;for(;o<t.length;){let n=t[o];if(n.type&&n.type!==B.TEXT||!r.test(n.value)){a=n;break}i+=this.measureText(e,n).width,o++}return{width:i,endElement:a}}measurePunctuationWidth(e,t){return!t||!C.includes(t.value)?0:(e.font=this.draw.getElementFont(t),this.measureText(e,t).width)}measureText(e,t){return this.textMeasurer.measure(t,e.font,e)}getBasisWordBoundingBoxAscent(e,t){return this.measureBasisWord(e,t).actualBoundingBoxAscent}complete(){this._render(),this.text=``}renderTabLeader(e,t,n,r){let i=t.tabLeader,a=t.metrics.width;if(!a||!i||i===se.NONE)return;let{scale:o,defaultColor:s,underlineColor:c}=this.options;if(e.save(),i===se.UNDERLINE){e.strokeStyle=t.color||c,e.lineWidth=o;let i=Math.floor(r+2*e.lineWidth)+.5;e.beginPath(),e.moveTo(n,i),e.lineTo(n+a,i),e.stroke()}else{let c=i===se.DOT?`.`:`-`;e.font=t.style,e.fillStyle=t.color||s;let l=this.textMeasurer.measureText(c,e.font).width*o;if(l>0){let t=Math.floor(a/l);if(t>0){let i=c.repeat(t),s=this.textMeasurer.measureText(i,e.font).width*o;e.fillText(i,n+(a-s)/2,r)}}}e.restore()}record(e,t,n,r){this.ctx=e,this.options.renderMode===L.COMPATIBILITY?(this._setCurXY(n,r),this.text=t.value,this.curStyle=t.style,this.curColor=t.color,this.curSourceElement=t,this.complete()):(this.text||(this._setCurXY(n,r),this.curSourceElement=t),(this.curStyle&&t.style!==this.curStyle||t.color!==this.curColor)&&(this.complete(),this._setCurXY(n,r),this.curSourceElement=t),this.text+=t.value,this.curStyle=t.style,this.curColor=t.color)}_setCurXY(e,t){this.curX=e,this.curY=t}_getSourceKey(e){let t=this.sourceKeys.get(e);return t||(t=oa(++this.sourceKeyId),this.sourceKeys.set(e,t)),t}_render(){this.text&&~this.curX&&~this.curY&&(this.ctx.save(),this.ctx.font=this.curStyle,this.ctx.fillStyle=this.curColor||this.options.defaultColor,this.curSourceElement&&this.ctx.fillTextWithSource?this.ctx.fillTextWithSource(this.text,this.curX,this.curY,{key:this._getSourceKey(this.curSourceElement)}):this.ctx.fillText(this.text,this.curX,this.curY),this.ctx.restore())}}})),Is,Ls=o((()=>{qn(),x(),k(),J(),Is=class e{draw;options;constructor(e){this.draw=e,this.options=e.getOptions()}static formatNumberPlaceholder(e,t,n,r){let i=r===h.CHINESE?Me(t):`${t}`;return e.replace(n,i)}render(t,n){let{scale:r,pageNumber:{size:i,font:a,color:o,rowFlex:s,numberType:c,format:l,startPageNo:u,fromPageNo:d}}=this.options;if(n<d)return;let f=l,p=new RegExp(Gn.PAGE_NO);p.test(f)&&(f=e.formatNumberPlaceholder(f,n+u-d,p,c));let m=new RegExp(Gn.PAGE_COUNT);m.test(f)&&(f=e.formatNumberPlaceholder(f,this.draw.getPageCount()-d,m,c));let{width:h,height:g,margins:_}=this.draw.getPageSize(n),v=g-this.draw.getPageNumberBottom(),y=`${i*r}px ${a}`;t.save(),t.fillStyle=o,t.font=y;let b=0,{width:x}=this.draw.getTextMeasurer().measureText(f,y);b=s===O.CENTER?(h-x)/2:s===O.RIGHT?h-x-_[1]:_[3],t.fillText(f,b,v),t.restore()}}})),Rs,zs=o((()=>{J(),Rs=class{draw;options;scrollContainer;constructor(e){this.draw=e,this.options=e.getOptions(),this.scrollContainer=this.getScrollContainer(),setTimeout(()=>{window.scrollY||this._observer()}),this._addEvent()}getScrollContainer(){return this.options.scrollContainerSelector&&document.querySelector(this.options.scrollContainerSelector)||document}_addEvent(){this.scrollContainer.addEventListener(`scroll`,this._observer)}removeEvent(){this.scrollContainer.removeEventListener(`scroll`,this._observer)}getElementVisibleInfo(e){let t=e.getBoundingClientRect(),n=this.scrollContainer===document?Math.max(document.documentElement.clientHeight,window.innerHeight):this.scrollContainer.clientHeight,r=Math.min(t.bottom,n)-Math.max(t.top,0);return{intersectionHeight:r>0?r:0}}getPageVisibleInfo(){let e=this.draw.getPageList(),t=[],n=0,r=0;for(let i=0;i<e.length;i++){let a=e[i],{intersectionHeight:o}=this.getElementVisibleInfo(a);if(r&&!o)break;o&&t.push(i),o>r&&(r=o,n=i)}return{intersectionPageNo:n,visiblePageNoList:t}}_observer=ve(()=>{let{intersectionPageNo:e,visiblePageNoList:t}=this.getPageVisibleInfo();this.draw.setIntersectionPageNo(e),this.draw.setVisiblePageNoList(t)},150)}})),Bs,Vs=o((()=>{ha(),Bs=class{step=5;thresholdPoints=[70,40,10,20];selectionContainer;rangeManager;requestAnimationFrameId;isMousedown;isMoving;clientWidth;clientHeight;containerRect;pageContainer;constructor(e){this.rangeManager=e.getRange(),this.pageContainer=e.getPageContainer();let{scrollContainerSelector:t}=e.getOptions();this.selectionContainer=t&&document.querySelector(t)||document,this.requestAnimationFrameId=null,this.isMousedown=!1,this.isMoving=!1,this.clientWidth=0,this.clientHeight=0,this.containerRect=null,this._addEvent()}_addEvent(){let e=this.selectionContainer;e.addEventListener(`mousedown`,this._mousedown),e.addEventListener(`mousemove`,this._mousemove),e.addEventListener(`mouseup`,this._mouseup),document.addEventListener(`mouseleave`,this._mouseup)}removeEvent(){let e=this.selectionContainer;e.removeEventListener(`mousedown`,this._mousedown),e.removeEventListener(`mousemove`,this._mousemove),e.removeEventListener(`mouseup`,this._mouseup),document.removeEventListener(`mouseleave`,this._mouseup)}_mousedown=()=>{if(this.isMousedown=!0,this.clientWidth=this.selectionContainer instanceof Document?document.documentElement.clientWidth:this.selectionContainer.clientWidth,this.clientHeight=this.selectionContainer instanceof Document?document.documentElement.clientHeight:this.selectionContainer.clientHeight,!(this.selectionContainer instanceof Document)){let e=this.selectionContainer.getBoundingClientRect();this.containerRect=e}};_mouseup=()=>{this.isMousedown=!1,this._stopMove()};_mousemove=e=>{if(!this.isMousedown||this.rangeManager.getIsCollapsed()||!this.pageContainer.contains(e.target))return;let{x:t,y:n}=e;this.containerRect&&(t-=this.containerRect.x,n-=this.containerRect.y),n<this.thresholdPoints[0]?this._startMove(ma.UP):this.clientHeight-n<=this.thresholdPoints[1]?this._startMove(ma.DOWN):t<this.thresholdPoints[2]?this._startMove(ma.LEFT):this.clientWidth-t<this.thresholdPoints[3]?this._startMove(ma.RIGHT):this._stopMove()};_move(e){let t=this.selectionContainer instanceof Document?window:this.selectionContainer,n=this.selectionContainer instanceof Document?window.scrollX:t.scrollLeft,r=this.selectionContainer instanceof Document?window.scrollY:t.scrollTop;e===ma.DOWN?t.scrollTo(n,r+this.step):e===ma.UP?t.scrollTo(n,r-this.step):e===ma.LEFT?t.scrollTo(n-this.step,r):t.scrollTo(n+this.step,r),this.requestAnimationFrameId=window.requestAnimationFrame(this._move.bind(this,e))}_startMove(e){this.isMoving||(this.isMoving=!0,this._move(e))}_stopMove(){this.requestAnimationFrameId&&(window.cancelAnimationFrame(this.requestAnimationFrameId),this.requestAnimationFrameId=null,this.isMoving=!1)}}})),Hs,Us=o((()=>{Dp(),_n(),J(),Hs=class{draw;range;options;fragmentContentHeightCache;tdLineHeightPrefixCache;fragmentTdListCache;constructor(e){this.draw=e,this.range=e.getRange(),this.options=e.getOptions(),this.fragmentContentHeightCache=new WeakMap,this.tdLineHeightPrefixCache=new WeakMap,this.fragmentTdListCache=new WeakMap}getTrListGroupByCol(e){let t=K(e);for(let n=0;n<e.length;n++){let e=t[n];for(let r=e.tdList.length-1;r>=0;r--){let{rowspan:i,rowIndex:a,colIndex:o}=e.tdList[r],s=a+i-1;if(s!==n){let n=e.tdList.splice(r,1)[0];t[s]?.tdList.splice(o,0,n)}}}return t}getRangeRowCol(){let e=this.draw.getPosition(),t=e.getPositionContext(),{isTable:n,trIndex:r,tdIndex:i}=t;if(!n)return null;let{isCrossRowCol:a,startTdIndex:o,endTdIndex:s,startTrIndex:c,endTrIndex:l}=this.range.getRange(),u=this.draw.getOriginalElementList(),d=e.getTableElementByContext(u,t);if(!d)return null;let f=d.trList;if(!a)return[[f[r].tdList[i]]];let p=f[c].tdList[o],m=f[l].tdList[s];(p.x>m.x||p.y>m.y)&&([p,m]=[m,p]);let h=p.colIndex,g=m.colIndex+(m.colspan-1),_=p.rowIndex,v=m.rowIndex+(m.rowspan-1),y=[];for(let e=0;e<f.length;e++){let t=f[e],n=[];for(let e=0;e<t.tdList.length;e++){let r=t.tdList[e],i=r.colIndex,a=r.rowIndex;i>=h&&i<=g&&a>=_&&a<=v&&n.push(r)}n.length&&y.push(n)}return y.length?y:null}_drawOuterBorder(e){let{ctx:t,startX:n,startY:r,width:i,height:a,isDrawFullBorder:o,borderExternalWidth:s}=e,{scale:c}=this.options,l=t.lineWidth;s&&(t.lineWidth=s*c),t.beginPath();let u=Math.round(n),d=Math.round(r);t.translate(.5,.5),o?t.rect(u,d,i,a):(t.moveTo(u,d+a),t.lineTo(u,d),t.lineTo(u+i,d)),t.stroke(),s&&(t.lineWidth=l),t.translate(-.5,-.5)}getFragmentTdList(e,t){let n=this.fragmentTdListCache.get(t);if(n)return n;let{startTrIndex:r,endTrIndex:i,carriedTds:a}=t,o=[...a||[]],s=e.trList;for(let e=r;e<i;e++)o.push(...s[e].tdList);return this.fragmentTdListCache.set(t,o),o}_getDrawTdList(e,t){let{scale:n}=this.options,r=e.trList,i=[];if(!t){for(let e of r)for(let t of e.tdList)i.push({td:t,offsetY:0,height:t.height*n,isRepeat:!1,isCarried:!1});return i}let{startTrIndex:a,repeatTrIndexes:o}=t;if(o?.length){let e=0;for(let t of o){let a=r[t];for(let t of a.tdList)i.push({td:t,offsetY:(e-t.y)*n,height:t.height*n,isRepeat:!0,isCarried:!1});e+=a.height}}for(let r of this.getFragmentTdList(e,t)){let[o,s]=this.getTdWindowInFragment(r,e,t);s<=o||i.push({td:r,offsetY:this.getTdWindowOffsetY(o,t),height:(s-o)*n,isRepeat:!1,isCarried:r.rowIndex<a})}return i}_drawSlash(e,t,n,r){let{scale:i}=this.options,{td:a,offsetY:o,height:s}=t;e.save();let c=a.width*i,l=Math.round(a.x*i+n),u=Math.round(a.y*i+r+o);e.beginPath(),a.slashTypes?.includes(gn.FORWARD)&&(e.moveTo(l+c,u),e.lineTo(l,u+s)),a.slashTypes?.includes(gn.BACK)&&(e.moveTo(l,u),e.lineTo(l+c,u+s)),e.stroke(),e.restore()}_drawBorder(e,t,n,r,i,a){let{colgroup:o,trList:s,borderType:c,borderColor:l,borderWidth:u=1,borderExternalWidth:d}=t;if(!o||!s)return;let{scale:f,table:{defaultBorderColor:p}}=this.options,m=t.width*f,h=a?(a.repeatHeight+this.getFragmentContentHeight(t,a))*f:t.height*f,g=c===mn.EMPTY,_=c===mn.EXTERNAL,v=c===mn.INTERNAL;e.save(),c===mn.DASH&&e.setLineDash([3,3]),e.lineWidth=u*f,e.strokeStyle=l||p,!g&&!v&&this._drawOuterBorder({ctx:e,startX:n,startY:r,width:m,height:h,borderExternalWidth:d,isDrawFullBorder:_});let y=[];for(let t of i){let{td:i,offsetY:c,height:l}=t;if(i.slashTypes?.length&&this._drawSlash(e,t,n,r),i.borderColor!==void 0||i.borderWidth!==void 0){y.push(t);continue}if(!i.borderTypes?.length&&(g||_))continue;let p=i.width*f,m=Math.round(i.x*f+n+p),h=Math.round(i.y*f+r+c);if(e.translate(.5,.5),e.beginPath(),i.borderTypes?.includes(hn.TOP)&&(e.moveTo(m-p,h),e.lineTo(m,h),e.stroke()),i.borderTypes?.includes(hn.RIGHT)&&(e.moveTo(m,h),e.lineTo(m,h+l),e.stroke()),i.borderTypes?.includes(hn.BOTTOM)&&(e.moveTo(m,h+l),e.lineTo(m-p,h+l),e.stroke()),i.borderTypes?.includes(hn.LEFT)&&(e.moveTo(m-p,h),e.lineTo(m-p,h+l),e.stroke()),!g&&!_){if((!v||i.colIndex+i.colspan<o.length)&&(e.moveTo(m,h),e.lineTo(m,h+l),d&&d!==u&&i.colIndex+i.colspan===o.length)){let t=e.lineWidth;e.lineWidth=d*f,e.stroke(),e.beginPath(),e.lineWidth=t}if(!v||i.rowIndex+i.rowspan<s.length){let t=i.rowIndex+i.rowspan===(a?.endTrIndex??s.length),n=d&&d!==u&&t;if(n&&(e.stroke(),e.beginPath()),e.moveTo(m,h+l),e.lineTo(m-p,h+l),n){let t=e.lineWidth;e.lineWidth=d*f,e.stroke(),e.beginPath(),e.lineWidth=t}}e.stroke()}e.translate(-.5,-.5)}for(let t of y){let{td:i,offsetY:a,height:o}=t,s=i.width*f,c=Math.round(i.x*f+n+s),d=Math.round(i.y*f+r+a);e.save(),e.lineWidth=(i.borderWidth??u)*f,e.strokeStyle=i.borderColor||l||p,e.translate(.5,.5),e.beginPath(),i.borderTypes?.length?(i.borderTypes.includes(hn.TOP)&&(e.moveTo(c-s,d),e.lineTo(c,d)),i.borderTypes.includes(hn.RIGHT)&&(e.moveTo(c,d),e.lineTo(c,d+o)),i.borderTypes.includes(hn.BOTTOM)&&(e.moveTo(c,d+o),e.lineTo(c-s,d+o)),i.borderTypes.includes(hn.LEFT)&&(e.moveTo(c-s,d),e.lineTo(c-s,d+o))):e.rect(c-s,d,s,o),e.stroke(),e.restore()}e.restore()}_drawBackgroundColor(e,t,n,r){let{scale:i}=this.options;for(let{td:a,offsetY:o,height:s}of r){if(!a.backgroundColor)continue;e.save();let r=a.width*i,c=Math.round(a.x*i+t),l=Math.round(a.y*i+n+o);e.fillStyle=a.backgroundColor,e.fillRect(c,l,r,s),e.restore()}}getTableWidth(e){return e.colgroup.reduce((e,t)=>e+t.width,0)}getFragmentTrHeight(e,t,n){if(!n)return e.height;let r=e.height;return t===n.startTrIndex&&n.startSplitTrOffset&&(r-=n.startSplitTrOffset),t===n.endTrIndex-1&&n.endSplitTrHeight!==void 0&&(r-=Math.max(0,e.height-n.endSplitTrHeight)),r}getFragmentContentHeight(e,t){let n=this.fragmentContentHeightCache.get(t);if(n!==void 0)return n;let{startTrIndex:r,endTrIndex:i,startSplitTrOffset:a,endSplitTrHeight:o}=t,s=e.trList,c=0;for(let e=r;e<i;e++){let t=s[e].height;e===r&&a&&(t-=a),e===i-1&&o!==void 0&&(t-=Math.max(0,s[e].height-o)),c+=t}return this.fragmentContentHeightCache.set(t,c),c}getTdWindowInFragment(e,t,n){let{skipHeight:r,startSplitTrOffset:i}=n,a=r+(i??0),o=a+this.getFragmentContentHeight(t,n);return[Math.max(0,a-e.y),Math.min(e.height,o-e.y)]}getTdWindowOffsetY(e,t){let{scale:n}=this.options;return(e-t.skipHeight-(t.startSplitTrOffset??0)+t.repeatHeight)*n}getTdVisibleRowListByWindow(e,t,n){let r=e.rowList,[i,a]=this.getTdLineRangeBySplitWindow(e,t,n);return{rowList:r.slice(i,a),startIndex:r[i]?.startIndex??0,startRowIndex:i}}getTdLineRangeBySplitWindow(e,t,n){let{scale:r}=this.options,i=e.rowList||[],a=this.tdLineHeightPrefixCache.get(i);if(!a){let{table:{tdPadding:e}}=this.options;a=[e[0]*r];for(let e=0;e<i.length;e++)a.push(a[e]+i[e].height);this.tdLineHeightPrefixCache.set(i,a)}let o=t*r,s=n*r,c=e=>{let t=0,n=i.length;for(;t<n;){let r=t+n+1>>1;a[r]<=e?t=r:n=r-1}return t};return[c(o),c(s)]}getTableHeight(e){let t=e.trList;return t?.length?this.getTdListByColIndex(t,0).reduce((e,t)=>e+t.height,0):0}getRowCountByColIndex(e,t){return this.getTdListByColIndex(e,t).reduce((e,t)=>e+t.rowspan,0)}getTdListByColIndex(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].tdList;for(let e=0;e<i.length;e++){let r=i[e],a=r.colIndex,o=a+r.colspan-1;t>=a&&t<=o&&n.push(r)}}return n}getTdListByRowIndex(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].tdList;for(let e=0;e<i.length;e++){let r=i[e],a=r.rowIndex,o=a+r.rowspan-1;t>=a&&t<=o&&n.push(r)}}return n}computeRowColInfo(e){let{colgroup:t,trList:n}=e;if(!t||!n)return;let r=0;for(let e=0;e<n.length;e++){let i=n[e],a=n.length-1===e,o=0;for(let s=0;s<i.tdList.length;s++){let c=i.tdList[s],l=0;if(n.length>1&&e!==0){let a=i.tdList[s-1],o=a?a.colIndex+a.colspan:s;for(let i=o;i<t.length;i++)if(this.getRowCountByColIndex(n.slice(0,e),i)===e){l=i;let e=0;for(let n=0;n<i;n++)e+=t[n].width;r=e;break}}else{let e=i.tdList[s-1];e&&(l=e.colIndex+e.colspan)}let u=0;for(let e=0;e<c.colspan;e++)u+=t[e+l].width;let d=0;for(let t=0;t<c.rowspan;t++){let r=n[t+e]||n[e];d+=r.height}(o===0||o>d)&&(o=d);let f=i.tdList.length-1===s,p=a;if(!p&&c.rowspan>1){let t=n.length-1-e;p=c.rowspan-1===t}let m=a&&f;c.isLastRowTd=f,c.isLastColTd=p,c.isLastTd=m,c.x=r;let h=0;for(let t=0;t<e;t++){let e=n[t].tdList;for(let t=0;t<e.length;t++){let n=e[t];if(l>=n.colIndex&&l<n.colIndex+n.colspan){h+=n.height;break}}}c.y=h,c.width=u,c.height=d,c.rowIndex=e,c.colIndex=l,c.trIndex=e,c.tdIndex=s,r+=u,f&&!m&&(r=0)}}}drawRange(e,t,n,r,i){let{scale:a,rangeAlpha:o,rangeColor:s}=this.options,{type:c,trList:l}=t;if(!l||c!==B.TABLE)return;let{isCrossRowCol:u,tableId:d,startTdIndex:f,endTdIndex:p,startTrIndex:m,endTrIndex:h}=this.range.getRange();if(!u||d!==t.id)return;let g=l[m].tdList[f],_=l[h].tdList[p];(g.x>_.x||g.y>_.y)&&([g,_]=[_,g]);let v=g.colIndex,y=_.colIndex+(_.colspan-1),b=g.rowIndex,x=_.rowIndex+(_.rowspan-1);e.save();let S=this._getDrawTdList(t,i);for(let{td:t,offsetY:i,height:c,isRepeat:l}of S){if(l)continue;let u=t.colIndex,d=t.rowIndex;if(u>=v&&u<=y&&d>=b&&d<=x){let l=t.x*a,u=t.y*a+i,d=t.width*a;e.globalAlpha=o,e.fillStyle=s,e.fillRect(l+n,u+r,d,c)}}e.restore()}render(e,t,n,r,i){let a=this._getDrawTdList(t,i);this._drawBackgroundColor(e,n,r,a),this._drawBorder(e,t,n,r,a,i)}}})),Ws,Gs=o((()=>{V(),D(),Ws=class{draw;options;tableParticle;constructor(e){this.draw=e,this.options=e.getOptions(),this.tableParticle=e.getTableParticle()}splitTableRowAcrossPages(e){let{scale:t}=this.options,n=this.draw.getColumnLayout(this.options.paperDirection)?.count||1,r=n>1,i=this.options.paperDirection,a=this.draw.getHeight(i),o=0,s=0,c=this.draw.getMainOuterHeight(0,i),l=[],u=!1;for(let d=0;d<e.length;d++){let f=e[d],p=f.elementList[0],m=p?.trList,h=!!e[d-1]?.isPageBreak,g=h?e[d-1].paperDirection||this.options.paperDirection:null,_=()=>{r&&s<n-1?s++:(o++,s=0),c=this.draw.getMainOuterHeight(o,i)},v=()=>{r&&f.columnIndex!==void 0&&f.columnIndex>s&&!u&&(s=f.columnIndex,c=this.draw.getMainOuterHeight(o,i)),(f.height+(f.offsetY||0)+c>a||h)&&(g&&(i=g,a=this.draw.getHeight(i)),_()),r&&(f.columnIndex=s),c+=f.height+(f.offsetY||0),l.push(f)},y=p?.type===B.TABLE&&(p.hide||p.control?.hide||p.area?.hide&&!this.draw.isAreaHideDisabled()||this.draw.getTraceParticle().isTraceHidden(p))&&!this.draw.isDesignMode();if(f.elementList.length!==1||p?.type!==B.TABLE||!m?.length||y){v();continue}let b=this.draw.getElementRowMargin(p),x=b*2,S=[0];for(let e=0;e<m.length;e++)S.push(S[e]+m[e].height);let C=[];for(let e of m)for(let t of e.tdList)t.rowspan>1&&C.push(t);let w=e=>m[e].tdList.every(e=>!!e.rowList?.length),T=e=>{let t=[...m[e].tdList];for(let n of C)n.rowIndex<e&&n.rowIndex+n.rowspan>e&&t.push(n);return t},{table:{tdPadding:E},defaultSize:D}=this.options,O=E[0]+E[2]+D,k=(e,n,r)=>{let i=S[e],a=0,o=!1,s=0;for(let c of T(e)){let e=Math.min(c.height,i+n-c.y),l=Math.max(0,r-c.y);if(e<=l)continue;let[u,d]=this.tableParticle.getTdLineRangeBySplitWindow(c,l,e);a=Math.max(a,d-u),d<c.rowList.length&&(o=!0);let f=c.rowList.slice(0,d).reduce((e,t)=>e+t.height,0),p=c.y+E[0]+E[2]+f/t-i;s=Math.max(s,p)}return{fit:a,hasRemaining:o,consumedHeight:s}},A=o,j=s,M=c;r&&f.columnIndex!==void 0&&f.columnIndex>s&&(j=f.columnIndex,M=this.draw.getMainOuterHeight(A,i));let N=()=>{r&&j<n-1?j++:(A++,j=0),M=this.draw.getMainOuterHeight(A,i)};if(h)g&&(i=g,a=this.draw.getHeight(i)),N();else if(M+m[0].height*t+x>a){let e=a-M-x,{fit:n,hasRemaining:r,consumedHeight:i}=w(0)?k(0,e/t,0):{fit:0,hasRemaining:!1,consumedHeight:0},o=-1;n>=1&&(r?(o=Math.min(i,e/t),m[0].height-o<O&&(o=m[0].height-O)):m[0].height-e/t>=O&&(o=e/t)),o<=0&&N()}let P=p.height*t;if(M+x+P<=a){v();continue}let F=[],I=0,L=0,R=A,z=j,ee=M,te=[],V=0,ne=!1;for(;I<m.length;){let e=F.length===0;if(!e&&(r&&z<n-1?z++:(R++,z=0),ee=this.draw.getMainOuterHeight(R,i),F.length===1)){for(let e=0;e<F[0].endTrIndex;e++){let t=m[e];t.pagingRepeat&&(te.push(e),V+=t.height)}te.length&&a-ee-x-V*t<O*t&&(te.length=0,V=0)}let o=x+(e?0:V*t),s=a-ee-o;if(s<O*t){ne=!0;break}let c=S[I]+L;if(L>0&&(m[I].height-L)*t>s){let e=L+s/t,{fit:n,hasRemaining:r,consumedHeight:i}=k(I,e,c),a=e;n>=1&&r&&(a=Math.min(i,e),m[I].height-a<O&&(a=Math.max(L+1,m[I].height-O))),a<=L&&(a=L+1),F.push({startTrIndex:I,endTrIndex:I+1,startSplitTrOffset:L,endSplitTrHeight:a,columnIndex:z}),L=a;continue}let l=L>0?(m[I].height-L)*t:0,u=L>0?I+1:I,d,f=!1,p=!1;for(;;){if(u>=m.length){p=!0;break}let e=m[u].height*t;if(l+e<=s){l+=e,u++;continue}let n=s-l;if(w(u)){let{fit:e,hasRemaining:r,consumedHeight:i}=k(u,n/t,c),a=-1;if(e>=1&&(r?(a=Math.min(i,n/t),m[u].height-a<O&&(a=m[u].height-O)):m[u].height-n/t>=O&&(a=n/t)),a>0){d=a;break}}u<=I&&(F.length?(u=m.length,p=!0):f=!0);break}if(f){ne=!0;break}if(F.push({startTrIndex:I,endTrIndex:d===void 0?u:u+1,startSplitTrOffset:L||void 0,endSplitTrHeight:d,columnIndex:z}),I=u,L=d??0,p)break}if(ne){v();continue}u=!0;let re=f.elementList[0],H=0,U=0;for(let e=0;e<F.length;e++){let n=F[e],i=e===0,a=!i&&te.length?te:void 0,o=a?V:0,s=(this.tableParticle.getFragmentContentHeight(p,n)+o)*t;l.push({...f,height:s+b,offsetY:i?f.offsetY:0,isList:i?f.isList:!1,...r?{columnIndex:n.columnIndex}:{},elementList:[{...re,metrics:{width:re.metrics.width,height:s,boundingBoxAscent:re.metrics.boundingBoxAscent,boundingBoxDescent:s}}],tableFragment:{startTrIndex:n.startTrIndex,endTrIndex:n.endTrIndex,skipHeight:H,repeatHeight:o,repeatTrIndexes:a,startSplitTrOffset:n.startSplitTrOffset,endSplitTrHeight:n.endSplitTrHeight,carriedTds:C.length?C.filter(e=>e.rowIndex<n.startTrIndex&&e.rowIndex+e.rowspan>n.startTrIndex):void 0}});let c=F[e+1]?.startTrIndex??0;for(;U<c;)H+=m[U].height,U++}o=R,s=z;let ie=l[l.length-1];c=this.draw.getMainOuterHeight(o,i)+ie.height+(ie.offsetY||0)}for(let e=0;e<l.length;e++)l[e].rowIndex=e;return l}truncateTableByFragment(e,t,n){let{startTrIndex:r,startSplitTrOffset:i,skipHeight:a}=t,o=e.trList,s=new Set,c=r;if(i){let e=o[r];for(let t of e.tdList)this._trimTdContentToWindow(t,i)&&s.add(t),t.height=i;e.height=i,e.minHeight=Math.min(e.minHeight??i,i);let t=a+i;for(let e=0;e<r;e++)for(let n of o[e].tdList){if(n.rowIndex+n.rowspan<=r)continue;let e=t-n.y;e>=n.height||this._trimTdContentToWindow(n,e)&&s.add(n)}c=r+1}if(!c)return!1;let l=[0];for(let e=0;e<c;e++)l.push(l[e]+o[e].height);for(let e=0;e<c;e++)for(let t of o[e].tdList)t.rowIndex+t.rowspan>c&&(t.rowspan=c-t.rowIndex),t.height=l[t.rowIndex+t.rowspan]-l[t.rowIndex];return e.trList=o.slice(0,c),e.height=this.tableParticle.getTableHeight(e),this._repairTableContextAfterTruncate(e,c,s,n),!0}_trimTdContentToWindow(e,t){let n=e.value.length,{scale:r,table:{tdPadding:i}}=this.options,[,a]=this.tableParticle.getTdLineRangeBySplitWindow(e,0,Math.max(0,t)),o=e.rowList,s=i[0]+i[2],c=0,l=0;for(let e=0;e<a;e++){let n=c+o[e].height/r;if(s+n>t)break;c=n,l=e+1}a=l;let u=a<o.length?o[a].startIndex:e.value.length;if(!u){let{trId:t,tableId:n}=e.value[0]||{};return e.value=[{value:``,tdId:e.id,trId:t,tableId:n}],e.rowList=this.draw.computeRowList({innerWidth:(e.width-(i[1]+i[3]))*r,elementList:e.value,isFromTable:!0,isPagingMode:this.draw.getIsPagingMode()}),!0}return e.value=e.value.slice(0,u),e.rowList=o.slice(0,a),u<n}_repairTableContextAfterTruncate(e,t,n,r){let i=this.draw.getRange().getRange();if(i.isCrossRowCol&&i.tableId===e.id&&((i.startTrIndex??0)>=t||(i.endTrIndex??0)>=t)){let e=this.draw.getPosition().getTableTdByContext(r,this.draw.getPosition().getPositionContext()),t=Math.max(0,(e?.value.length??1)-1);this.draw.getRange().setRange(t,t)}let a=this.draw.getPosition().getPositionContext();if(!a.isTable)return;let o=a.tablePath?.[0],s=o?o.index:a.index,c=o?o.trIndex:a.trIndex;if(s===void 0||r[s]!==e)return;let l=o?.trIndex??a.trIndex,u=o?.tdIndex??a.tdIndex,d=l!==void 0&&u!==void 0?e.trList?.[l]?.tdList[u]:void 0;if(d&&n.has(d)&&this.draw.getPosition().setPositionContext({isTable:!0,index:a.index,trIndex:a.trIndex,tdIndex:a.tdIndex,tdId:a.tdId,trId:a.trId,tableId:a.tableId,tablePath:a.tablePath}),c!==void 0&&c>=t){let n=this.tableParticle.getTdListByRowIndex(e.trList,t-1),r=n[n.length-1];if(r){let t={isTable:!0,index:s,tablePath:o?[o]:void 0};this.draw.getPosition().setPositionContext(this.draw.getPosition().buildTablePositionContext(t,e,r.rowIndex,r.tdIndex)),this.draw.getRange().setRange(Math.max(0,r.value.length-1),Math.max(0,r.value.length-1))}else this.draw.getPosition().setPositionContext({isTable:!1})}else if(o&&!this.draw.getPosition().getTableTdByContext(r,a)){let t={isTable:!0,index:s,tablePath:[o]};this.draw.getPosition().setPositionContext(this.draw.getPosition().buildTablePositionContext(t,e,o.trIndex,o.tdIndex))}let f=this.draw.getPosition().getTableTdByContext(r,this.draw.getPosition().getPositionContext());if(f){let e=f.value.length-1,{startIndex:t,endIndex:n,isCrossRowCol:r}=this.draw.getRange().getRange();!r&&e>=0&&(t>e||n>e)&&this.draw.getRange().setRange(Math.min(t,e),Math.min(n,e))}}}})),Ks,qs=o((()=>{Ks=function(e){return e.ROW=`row`,e.COL=`col`,e}({})})),Js,Ys=o((()=>{Qe(),z(),qs(),Js=class{MIN_TD_WIDTH=20;ROW_COL_OFFSET=18;ROW_COL_QUICK_WIDTH=16;ROW_COL_QUICK_OFFSET=5;ROW_COL_QUICK_POSITION=this.ROW_COL_OFFSET+(this.ROW_COL_OFFSET-this.ROW_COL_QUICK_WIDTH)/2;BORDER_VALUE=4;TABLE_SELECT_OFFSET=20;draw;canvas;options;position;range;container;toolRowContainer;toolRowAddBtn;toolColAddBtn;toolTableSelectBtn;toolColContainer;toolBorderContainer;anchorLine;mousedownX;mousedownY;lastAnchorKey;anchorPageNo;constructor(e){this.draw=e,this.canvas=e.getPage(),this.options=e.getOptions(),this.position=e.getPosition(),this.range=e.getRange(),this.container=e.getContainer(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null,this.anchorLine=null,this.mousedownX=0,this.mousedownY=0,this.lastAnchorKey=null,this.anchorPageNo=0}dispose(){this.toolRowContainer?.remove(),this.toolRowAddBtn?.remove(),this.toolColAddBtn?.remove(),this.toolTableSelectBtn?.remove(),this.toolColContainer?.remove(),this.toolBorderContainer?.remove(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null,this.lastAnchorKey=null}render(){let e=this.position.getPositionContext(),{isTable:t}=e;if(!t)return;let n=this.draw.getOriginalElementList(),r=this.position.getOriginalPositionList(),i=this.position.getTableElementByContext(n,e),a=this.position.getTableElementPositionByContext(n,r,e);if(!i||!a||this.draw.isReadonly()||this.draw.getMode()===M.FORM||i.tableToolDisabled&&!this.draw.isDesignMode()){this.dispose();return}let{scale:o,table:{overflow:s}}=this.options,{colgroup:c,trList:l}=i,{coordinate:{leftTop:u}}=a,d=a.tableFragment,f=d?.startTrIndex??0,p=d?.endTrIndex??l.length,m=`${o}:${u[0]}:${u[1]}:${a.metrics.height}:${f}:${p}:${d?.startSplitTrOffset??0}:${d?.endSplitTrHeight??0}`;for(let e=f;e<p;e++)m+=`:${l[e].height}`;for(let e of c||[])m+=`:${e.width}`;let h=`${i.id}:${a.pageNo}:${e.trIndex}:${e.tdIndex}:${m}`;if(h===this.lastAnchorKey)return;this.dispose(),this.anchorPageNo=a.pageNo;let{x:g,y:_}=this.draw.getPageOffset(a.pageNo),v=_,y=u[0]+g,b=u[1]+v,x=this.draw.getTd();if(!x)return;this.lastAnchorKey=h;let S=x.rowIndex,C=x.colIndex,w=a.metrics.height,T=i.width*o,E=document.createElement(`div`);E.classList.add(`ce-table-tool__select`),E.style.left=`${y}px`,E.style.top=`${b}px`,E.style.transform=`translate(-${this.TABLE_SELECT_OFFSET*o}px, ${-this.TABLE_SELECT_OFFSET*o}px)`,E.onclick=()=>{this.draw.getTableOperate().tableSelectAll()},this.container.append(E),this.toolTableSelectBtn=E;let D=document.createElement(`div`);D.classList.add(`ce-table-tool__row`),D.style.transform=`translateX(-${this.ROW_COL_OFFSET*o}px)`;for(let t=f;t<p;t++){let n=this.draw.getTableParticle().getFragmentTrHeight(l[t],t,d)*o,r=document.createElement(`div`);r.classList.add(`ce-table-tool__row__item`),t===S&&r.classList.add(`active`),r.onclick=()=>{let n=this.draw.getTableParticle().getTdListByRowIndex(l,t),r=n[0],a=n[n.length-1];this.position.setPositionContext(this.position.buildTablePositionContext(e,i,r.trIndex,r.tdIndex)),this.range.setRange(0,0,i.id,r.tdIndex,a.tdIndex,r.trIndex,a.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(D,t-f)};let a=document.createElement(`div`);a.classList.add(`ce-table-tool__anchor`),a.onmousedown=e=>{this._mousedown({evt:e,element:i,index:t,order:Ks.ROW})},r.append(a),r.style.height=`${n}px`,D.append(r)}D.style.left=`${y}px`,D.style.top=`${b+(d?.repeatHeight||0)*o}px`,this.container.append(D),this.toolRowContainer=D;let O=document.createElement(`div`);O.classList.add(`ce-table-tool__quick__add`),O.style.left=`${y}px`,O.style.top=`${b+w}px`,O.style.transform=`translate(-${this.ROW_COL_QUICK_POSITION*o}px, ${this.ROW_COL_QUICK_OFFSET*o}px)`,O.onclick=()=>{let t=l.length-1;for(;t>0&&!l[t].tdList.length;)t--;this.position.setPositionContext(this.position.buildTablePositionContext(e,i,t,0)),this.draw.getTableOperate().insertTableBottomRow()},this.container.append(O),this.toolRowAddBtn=O;let k=c.map(e=>e.width),A=document.createElement(`div`);A.classList.add(`ce-table-tool__col`),A.style.transform=`translateY(-${this.ROW_COL_OFFSET*o}px)`;for(let t=0;t<k.length;t++){let n=k[t]*o,r=document.createElement(`div`);r.classList.add(`ce-table-tool__col__item`),t===C&&r.classList.add(`active`),r.onclick=()=>{let n=this.draw.getTableParticle().getTdListByColIndex(l,t),r=n[0],a=n[n.length-1];this.position.setPositionContext(this.position.buildTablePositionContext(e,i,r.trIndex,r.tdIndex)),this.range.setRange(0,0,i.id,r.tdIndex,a.tdIndex,r.trIndex,a.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(A,t)};let a=document.createElement(`div`);a.classList.add(`ce-table-tool__anchor`),a.onmousedown=e=>{this._mousedown({evt:e,element:i,index:t,order:Ks.COL})},r.append(a),r.style.width=`${n}px`,A.append(r)}A.style.left=`${y}px`,A.style.top=`${b}px`,this.container.append(A),this.toolColContainer=A;let j=document.createElement(`div`);j.classList.add(`ce-table-tool__quick__add`),j.style.left=`${y+T}px`,j.style.top=`${b}px`,j.style.transform=`translate(${this.ROW_COL_QUICK_OFFSET*o}px, -${this.ROW_COL_QUICK_POSITION*o}px)`,j.onclick=()=>{this.position.setPositionContext(this.position.buildTablePositionContext(e,i,0,l[0].tdList.length-1||0)),this.draw.getTableOperate().insertTableRightCol()},this.container.append(j),this.toolColAddBtn=j;let N=document.createElement(`div`);N.classList.add(`ce-table-tool__border`),N.style.height=`${w}px`,N.style.width=`${T}px`,N.style.left=`${y}px`,N.style.top=`${b}px`;let P=d?this.draw.getTableParticle().getFragmentTdList(i,d):l.flatMap(e=>e.tdList);for(let e of P){let t=e.height,n=0;if(d){let[r,a]=this.draw.getTableParticle().getTdWindowInFragment(e,i,d);t=a-r,n=this.draw.getTableParticle().getTdWindowOffsetY(r,d)}let r=document.createElement(`div`);r.classList.add(`ce-table-tool__border__row`),r.style.width=`${e.width*o}px`,r.style.height=`${this.BORDER_VALUE}px`,r.style.top=`${(e.y+t)*o+n-this.BORDER_VALUE/2}px`,r.style.left=`${e.x*o}px`,r.onmousedown=t=>{this._mousedown({evt:t,element:i,index:e.rowIndex+e.rowspan-1,order:Ks.ROW})},N.appendChild(r);let a=document.createElement(`div`);if(a.classList.add(`ce-table-tool__border__col`),a.style.width=`${this.BORDER_VALUE}px`,a.style.height=`${t*o}px`,a.style.top=`${e.y*o+n}px`,a.style.left=`${(e.x+e.width)*o-this.BORDER_VALUE/2}px`,a.onmousedown=t=>{this._mousedown({evt:t,element:i,index:e.colIndex+e.colspan-1,order:Ks.COL})},N.appendChild(a),s&&e.colIndex===0){let r=document.createElement(`div`);r.classList.add(`ce-table-tool__border__col`),r.style.width=`${this.BORDER_VALUE}px`,r.style.height=`${t*o}px`,r.style.top=`${e.y*o+n}px`,r.style.left=`${e.x*o-this.BORDER_VALUE/2}px`,r.onmousedown=e=>{this._mousedown({evt:e,element:i,index:0,isLeftStartBorder:!0,order:Ks.COL})},N.appendChild(r)}}this.container.append(N),this.toolBorderContainer=N}_setAnchorActive(e,t){let n=e.children;for(let e=0;e<n.length;e++){let r=n[e];e===t?r.classList.add(`active`):r.classList.remove(`active`)}}_mousedown(e){let{evt:t,index:n,order:r,element:i,isLeftStartBorder:a}=e;this.canvas=this.draw.getPage();let{scale:o,table:{overflow:s}}=this.options,{width:c,height:l}=this.draw.getPageSize(this.anchorPageNo),{x:u,y:d}=this.draw.getPageOffset(this.anchorPageNo);this.mousedownX=t.x,this.mousedownY=t.y;let f=t.target,p=this.canvas.getBoundingClientRect(),m=window.getComputedStyle(f).cursor;document.body.style.cursor=m,this.canvas.style.cursor=m;let h=0,g=0,_=document.createElement(`div`);_.classList.add(`ce-table-anchor__line`),r===Ks.ROW?(_.classList.add(`ce-table-anchor__line__row`),_.style.width=`${c}px`,h=u,g=d+this.mousedownY-p.top):(_.classList.add(`ce-table-anchor__line__col`),_.style.height=`${l}px`,h=this.mousedownX-p.left,g=d),_.style.left=`${h}px`,_.style.top=`${g}px`,this.container.append(_),this.anchorLine=_;let v=0,y=0,b=e=>{let t=this._mousemove(e,r,h,g);t&&(v=t.dx,y=t.dy)};document.addEventListener(`mousemove`,b),document.addEventListener(`mouseup`,()=>{let e=!1,t=v/o,c=y/o;if(r===Ks.ROW){let t=i.trList,r=t[n]||t[n-1],{defaultTrMinHeight:a}=this.options.table;c<0&&r.height+c<a&&(c=a-r.height),c&&(r.height+=c,r.minHeight=r.height,e=!0)}else{let{colgroup:r}=i;if(r&&t){if(s&&a)r[n].width-t<=this.MIN_TD_WIDTH&&(t=r[n].width-this.MIN_TD_WIDTH),r[n].width-=t,i.width-=t,i.translateX=(i.translateX||0)+t,e=!0;else{let a=this.draw.getOriginalInnerWidth(),o=r[n].width;t<0&&o+t<this.MIN_TD_WIDTH&&(t=this.MIN_TD_WIDTH-o);let c=r[n+1]?.width;t>0&&c&&c-t<this.MIN_TD_WIDTH&&(t=c-this.MIN_TD_WIDTH);let l=o+t;if(!s&&n===r.length-1){let e=0;for(let i=0;i<r.length;i++){let a=r[i];i===n+1&&(e-=t),i===n&&(e+=l),i!==n&&(e+=a.width)}e>a&&(t=a-i.width)}t&&(r.length-1!==n&&(r[n+1].width-=t),r[n].width+=t,e=!0)}}}e&&this.draw.render({isSetCursor:!1}),_.remove(),document.removeEventListener(`mousemove`,b),document.body.style.cursor=``,this.canvas.style.cursor=`text`},{once:!0}),t.preventDefault()}_mousemove(e,t,n,r){if(!this.anchorLine)return null;let i=e.x-this.mousedownX,a=e.y-this.mousedownY;return t===Ks.ROW?this.anchorLine.style.top=`${r+a}px`:this.anchorLine.style.left=`${n+i}px`,e.preventDefault(),{dx:i,dy:a}}}})),Xs,Zs=o((()=>{Qe(),D(),z(),ce(),Xs=class{MM_PX=96/25.4;HANDLE_HIT_TOLERANCE=7;MIN_INNER_SIZE=100;MIN_INNER_SIZE_INDENT=100;draw;options;container;rulerContainer;canvasX;ctxX;canvasY;ctxY;dragSide;dragStartPosition;dragOriginMargins;dragIndentTarget;dragOriginIndents;isIndentApplied;dragTabStopIndex;dragOriginTabStops;dragOriginTabStopX;isTabStopApplied;isTabStopDragOutside;guideline;indentMarkerPositionCache;tabStopPositionCache;mousemoveHandler;mouseupHandler;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.rulerContainer=null,this.canvasX=null,this.ctxX=null,this.canvasY=null,this.ctxY=null,this.dragSide=null,this.dragStartPosition=0,this.dragOriginMargins=null,this.dragIndentTarget=null,this.dragOriginIndents=null,this.isIndentApplied=!1,this.dragTabStopIndex=null,this.dragOriginTabStops=null,this.dragOriginTabStopX=0,this.isTabStopApplied=!1,this.isTabStopDragOutside=!1,this.guideline=null,this.indentMarkerPositionCache=null,this.tabStopPositionCache=[],this.mousemoveHandler=this._dragMargin.bind(this),this.mouseupHandler=this._stopDrag.bind(this)}isEnable(){return!this.options.ruler.disabled}_createDOM(){let e=document.createElement(`canvas`);e.classList.add(`ce-ruler-y`);let t=document.createElement(`canvas`);t.classList.add(`ce-ruler-x`);let n=document.createElement(`div`);n.classList.add(`ce-ruler`),n.append(e,t),n.addEventListener(`mousedown`,t=>{t.preventDefault(),t.stopPropagation(),!this.options.displayOnly&&(t.target===e?this._mousedownY(t):this._mousedownX(t))}),n.addEventListener(`mousemove`,t=>{this.options.displayOnly||(t.target===e?this._updateCursorY(t):this._updateCursorX(t))}),n.addEventListener(`mouseleave`,()=>this._resetCursor()),this.container.insertBefore(n,this.draw.getPageContainer()),this.rulerContainer=n,this.canvasX=t,this.ctxX=t.getContext(`2d`),this.canvasY=e,this.ctxY=e.getContext(`2d`)}setEnabled(e){this.options.ruler.disabled=!e,this.render()}dispose(){this._stopDrag(),this._removeGuideline(),this.indentMarkerPositionCache=null,this.tabStopPositionCache=[],this.rulerContainer?.remove(),this.rulerContainer=null,this.canvasX=null,this.ctxX=null,this.canvasY=null,this.ctxY=null}render(){if(!this.isEnable()){this.rulerContainer&&(this.rulerContainer.style.display=`none`);return}this.rulerContainer||this._createDOM();let e=this.rulerContainer;this.options.pageMode===P.PAGING?(e.style.display=`block`,this._renderX(),this._renderY()):e.style.display=`none`}_renderX(){let e=this.canvasX,t=this.ctxX,{height:n}=this.options.ruler,r=this.draw.getWidth(),i=this.draw.getPagePixelRatio();e.style.width=`${r}px`,e.style.height=`${n}px`,e.width=r*i,e.height=n*i,t.scale(i,i),t.fillStyle=`#ffffff`,t.fillRect(0,0,r,n);let a=this.draw.getMargins(),o=this.options.scale;t.fillStyle=`#f2f2f2`,t.fillRect(0,0,a[3],n),t.fillRect(r-a[1],0,a[1],n),t.strokeStyle=`#999999`,t.fillStyle=`#666666`,t.font=`8px sans-serif`,t.textAlign=`center`,t.beginPath();let s=this.MM_PX*o,c=Math.floor(r/s);for(let e=0;e<=c;e++){let i=Math.round(e*s)+.5,a=e%10==0,o=a?8:e%5==0?5:3;t.moveTo(i,n),t.lineTo(i,n-o),a&&e>0&&i>=8&&i<=r-8&&t.fillText(String(e/10),i,17)}t.stroke(),t.beginPath(),t.strokeStyle=`#e0e0e0`,t.moveTo(0,n-.5),t.lineTo(r,n-.5),t.stroke();let l=this._getParagraphIndents();if(l){let e=this._getIndentMarkerPositions(l);this.indentMarkerPositionCache=e,this._drawIndentMarker(t,e.firstLineX,`firstLine`),this._drawIndentMarker(t,e.leftX,`left`),this._drawIndentMarker(t,e.rightX,`right`)}else this.indentMarkerPositionCache=null;let u=this._getParagraphTabStops();this.tabStopPositionCache=u.map(e=>({x:a[3]+e.position*o,type:e.type})),this.tabStopPositionCache.forEach((e,n)=>{this.isTabStopDragOutside&&n===this.dragTabStopIndex||this._drawTabStopMark(t,e)})}_renderY(){let e=this.canvasY,t=this.ctxY,n=this.options.ruler.height,r=this.draw.getHeight(),i=this.draw.getPagePixelRatio();e.style.width=`${n}px`,e.style.height=`${r}px`,e.width=n*i,e.height=r*i,t.scale(i,i),t.fillStyle=`#ffffff`,t.fillRect(0,0,n,r);let a=this.draw.getMargins(),o=this.options.scale;t.fillStyle=`#f2f2f2`,t.fillRect(0,0,n,a[0]),t.fillRect(0,r-a[2],n,a[2]),t.strokeStyle=`#999999`,t.fillStyle=`#666666`,t.font=`8px sans-serif`,t.textAlign=`center`,t.beginPath();let s=this.MM_PX*o,c=Math.floor(r/s);for(let e=0;e<=c;e++){let i=Math.round(e*s)+.5,a=e%10==0,o=a?8:e%5==0?5:3;t.moveTo(n,i),t.lineTo(n-o,i),a&&e>0&&i>=8&&i<=r-8&&(t.save(),t.translate(16,i),t.rotate(-Math.PI/2),t.fillText(String(e/10),0,0),t.restore())}t.stroke(),t.beginPath(),t.strokeStyle=`#e0e0e0`,t.moveTo(n-.5,0),t.lineTo(n-.5,r),t.stroke()}_getParagraphElementList(){let{startIndex:e,endIndex:t}=this.draw.getRange().getRange();return!~e&&!~t?null:this.draw.getRange().getRangeParagraphElementList()}_getParagraphIndents(){let e=this._getParagraphElementList()??this._getFirstParagraphElementList(),t=this._getIndentAnchor(e);return t?{paragraphElementList:e,left:t.indentLeft||0,firstLine:t.indentFirstLine||0,right:t.indentRight||0}:null}_getFirstParagraphElementList(){let e=this.draw.getElementList(),t=[];for(let n of e)if(t.push(n),t.length>1&&n.value===``&&!n.listWrap)break;return t}_getIndentAnchor(e){return e.find(e=>e.value!==``)??e[0]}_getParagraphTabStops(){let e=this._getParagraphElementList()??this._getFirstParagraphElementList();return this._getIndentAnchor(e)?.tabStops??[]}_getIndentMarkerPositions(e){let t=this.draw.getMargins(),n=this.options.scale;return{firstLineX:t[3]+(e.left+e.firstLine)*n,leftX:t[3]+e.left*n,rightX:this.draw.getWidth()-t[1]-e.right*n}}_drawIndentMarker(e,t,n){e.beginPath(),n===`firstLine`?(e.moveTo(t-5,2),e.lineTo(t+5,2),e.lineTo(t+5,5),e.lineTo(t,10.5),e.lineTo(t-5,5)):(e.moveTo(t,17),e.lineTo(t+5,21),e.lineTo(t+5,25.5),e.lineTo(t-5,25.5),e.lineTo(t-5,21)),e.closePath(),e.fillStyle=`#ffffff`,e.fill(),e.strokeStyle=`#7a7a7a`,e.stroke()}_drawTabStopMark(e,t){let{x:n,type:r}=t;e.fillStyle=`#ffffff`,e.fillRect(n-5,17,10,8),e.beginPath(),r===oe.CENTER?(e.moveTo(n-3.5,18),e.lineTo(n+3.5,18),e.moveTo(n,18),e.lineTo(n,24.5)):r===oe.RIGHT?(e.moveTo(n-3.5,18),e.lineTo(n+3.5,18),e.lineTo(n-3.5,24.5)):(e.moveTo(n-3.5,18),e.lineTo(n+3.5,18),e.lineTo(n+3.5,24.5)),e.strokeStyle=`#666666`,e.stroke()}_getHitIndentTarget(e,t){let n=this.indentMarkerPositionCache;if(!n)return null;if(t<11.5&&Math.abs(e-n.firstLineX)<=this.HANDLE_HIT_TOLERANCE)return`firstLine`;if(t>=16){if(Math.abs(e-n.leftX)<=this.HANDLE_HIT_TOLERANCE)return`left`;if(Math.abs(e-n.rightX)<=this.HANDLE_HIT_TOLERANCE)return`right`}return null}_getHitTabStopIndex(e,t){if(t<16)return-1;let n=this.tabStopPositionCache;for(let t=0;t<n.length;t++)if(Math.abs(e-n[t].x)<=this.HANDLE_HIT_TOLERANCE)return t;return-1}_addTabStop(e){let t=this._getParagraphElementList();if(!t)return;let n=this._getIndentAnchor(t);if(!n)return;let r=this.options.scale,i=this.draw.getMargins(),a=this.draw.getWidth(),o=Math.round((e-i[3])/r),s=Math.round((a-i[1]-i[3])/r);if(o<=0||o>s||(n.tabStops||[]).some(e=>Math.abs(e.position-o)<2))return;let c=[...n.tabStops||[],{position:o,type:oe.LEFT}].sort((e,t)=>e.position-t.position);t.forEach(e=>{e.tabStops=c.map(e=>({...e}))}),this.draw.render({isSetCursor:!1})}_showGuideline(e){if(!this.guideline){let e=document.createElement(`div`);e.classList.add(`ce-ruler-guideline`),this.draw.getPageContainer().append(e),this.guideline=e}this.guideline.style.left=`${e}px`}_removeGuideline(){this.guideline?.remove(),this.guideline=null}_getHitMarginSideX(e){let t=this.draw.getWidth(),n=this.draw.getMargins();return Math.abs(e-n[3])<=this.HANDLE_HIT_TOLERANCE?`left`:Math.abs(e-(t-n[1]))<=this.HANDLE_HIT_TOLERANCE?`right`:null}_getHitMarginSideY(e){let t=this.draw.getHeight(),n=this.draw.getMargins();return Math.abs(e-n[0])<=this.HANDLE_HIT_TOLERANCE?`top`:Math.abs(e-(t-n[2]))<=this.HANDLE_HIT_TOLERANCE?`bottom`:null}_getRelativeX(e){if(!this.rulerContainer)return 0;let t=this.rulerContainer.getBoundingClientRect();return e.clientX-t.left}_getRelativeY(e){if(!this.canvasY)return 0;let t=this.canvasY.getBoundingClientRect();return e.clientY-t.top}_getRelativeYOnCanvasX(e){if(!this.canvasX)return 0;let t=this.canvasX.getBoundingClientRect();return e.clientY-t.top}_isMarginDragDisabled(){let e=this.draw.getMode();return this.draw.isReadonly()||e===M.PRINT||e===M.FORM}_startDrag(e,t){this.dragSide=e,this.dragStartPosition=t,this.dragOriginMargins=[...this.draw.getOriginalMargins()],this.draw.getRange().clearRange(),this.draw.getCursor().drawCursor({isShow:!1}),document.addEventListener(`mousemove`,this.mousemoveHandler),document.addEventListener(`mouseup`,this.mouseupHandler)}_startIndentDrag(e,t){let n=this._getParagraphElementList();if(!n)return;let r=this._getIndentAnchor(n);r&&(this.dragIndentTarget=e,this.dragStartPosition=t,this.dragOriginIndents={left:r.indentLeft||0,firstLine:r.indentFirstLine||0,right:r.indentRight||0},this.isIndentApplied=!1,document.addEventListener(`mousemove`,this.mousemoveHandler),document.addEventListener(`mouseup`,this.mouseupHandler))}_startTabStopDrag(e,t){let n=this._getParagraphElementList();if(!n)return;let r=this._getIndentAnchor(n);r&&(this.dragTabStopIndex=e,this.dragStartPosition=t,this.dragOriginTabStops=(r.tabStops||[]).map(e=>({...e})),this.dragOriginTabStopX=this.tabStopPositionCache[e]?.x??0,this.isTabStopApplied=!1,this.isTabStopDragOutside=!1,document.addEventListener(`mousemove`,this.mousemoveHandler),document.addEventListener(`mouseup`,this.mouseupHandler))}_mousedownX(e){if(this._isMarginDragDisabled())return;let t=this._getRelativeX(e),n=this._getRelativeYOnCanvasX(e),r=this._getHitTabStopIndex(t,n);if(r>=0){this._startTabStopDrag(r,e.clientX);return}let i=this._getHitIndentTarget(t,n);if(i){this._startIndentDrag(i,e.clientX);return}let a=this._getHitMarginSideX(t);a?this._startDrag(a,e.clientX):n>=16&&this._addTabStop(t)}_mousedownY(e){if(this._isMarginDragDisabled())return;let t=this._getHitMarginSideY(this._getRelativeY(e));t&&this._startDrag(t,e.clientY)}_updateCursorX(e){if(!this.canvasX)return;let t=this._getRelativeX(e),n=this._getRelativeYOnCanvasX(e),r=this._getHitTabStopIndex(t,n),i=r>=0?null:this._getHitIndentTarget(t,n),a=r>=0||i?null:this._getHitMarginSideX(t);this.canvasX.style.cursor=r>=0||i?`pointer`:a?`col-resize`:`default`}_updateCursorY(e){if(!this.canvasY)return;let t=this._getHitMarginSideY(this._getRelativeY(e));this.canvasY.style.cursor=t?`row-resize`:`default`}_resetCursor(){this.canvasX&&(this.canvasX.style.cursor=`default`),this.canvasY&&(this.canvasY.style.cursor=`default`)}_dragIndent(e){let t=this.dragIndentTarget,n=this.dragOriginIndents;if(!t||!n)return;let r=this._getParagraphElementList();if(!r)return;let i=this.options.scale,a=(e.clientX-this.dragStartPosition)/i,o=t===`right`?-1:1,s=(e,t,n)=>{let r=Math.round(e+a*o);return Math.min(Math.max(r,t),Math.max(n,t))},c=this.draw.getOriginalWidth(),l=this.draw.getOriginalMargins(),u=c-l[3]-l[1],d=u-n.right-this.MIN_INNER_SIZE_INDENT,f,p;t===`left`?(f=`indentLeft`,p=s(n.left,0,d)):t===`firstLine`?(f=`indentFirstLine`,p=s(n.firstLine,-n.left,d)):(f=`indentRight`,p=s(n.right,0,u-n.left-this.MIN_INNER_SIZE_INDENT)),r.forEach(e=>{e[f]=p}),this.isIndentApplied=!0,this.draw.render({isSubmitHistory:!1,isSetCursor:!1});let m=this._getParagraphIndents();if(m){let e=this._getIndentMarkerPositions({...m,[f]:p}),t=f===`indentLeft`?e.leftX:f===`indentFirstLine`?e.firstLineX:e.rightX;this._showGuideline(t)}}_dragTabStop(e){let t=this.dragTabStopIndex,n=this.dragOriginTabStops;if(t===null||!n||!this.rulerContainer)return;let r=this._getParagraphElementList();if(!r)return;let i=this.rulerContainer.getBoundingClientRect();if(this.isTabStopDragOutside=e.clientY<i.top-4||e.clientY>i.bottom+4,this.isTabStopDragOutside){this._removeGuideline(),this._renderX();return}let a=this.options.scale,o=this.draw.getMargins(),s=this.draw.getWidth()-o[1]-o[3],c=e.clientX-this.dragStartPosition,l=Math.round(Math.min(Math.max((this.dragOriginTabStopX+c-o[3])/a,0),s/a)),u=n.map((e,n)=>n===t?{...e,position:l}:{...e});r.forEach(e=>{e.tabStops=u.map(e=>({...e}))}),this.isTabStopApplied=!0,this.draw.render({isSubmitHistory:!1,isSetCursor:!1}),this._showGuideline(o[3]+l*a)}_dragMargin(e){if(this.dragTabStopIndex!==null){this._dragTabStop(e);return}if(this.dragIndentTarget){this._dragIndent(e);return}if(!this.dragSide||!this.dragOriginMargins||!this.rulerContainer)return;let t=this.options.scale,n=[...this.dragOriginMargins];if(this.dragSide===`left`||this.dragSide===`right`){let r=this.draw.getOriginalWidth(),i=(e.clientX-this.dragStartPosition)/t;this.dragSide===`left`?n[3]=this.clampMargin(n[3]+i,r-n[1]-this.MIN_INNER_SIZE):n[1]=this.clampMargin(n[1]-i,r-n[3]-this.MIN_INNER_SIZE)}else{let r=this.draw.getOriginalHeight(),i=(e.clientY-this.dragStartPosition)/t;this.dragSide===`top`?n[0]=this.clampMargin(n[0]+i,r-n[2]-this.MIN_INNER_SIZE):n[2]=this.clampMargin(n[2]-i,r-n[0]-this.MIN_INNER_SIZE)}this._setDisplayedMargins(n.map(e=>Math.round(e)))}_stopDrag(){if(this.dragTabStopIndex!==null){let e=this.dragTabStopIndex,t=this.dragOriginTabStops,n=this._getParagraphElementList(),r=n?this._getIndentAnchor(n):void 0;if(t&&r&&n){if(this.isTabStopDragOutside){let r=t.filter((t,n)=>n!==e);n.forEach(e=>{e.tabStops=r.length?r.map(e=>({...e})):void 0}),this.draw.render({isSetCursor:!1})}else this.isTabStopApplied&&this.draw.render({isSetCursor:!1})}this.dragTabStopIndex=null,this.dragOriginTabStops=null,this.isTabStopApplied=!1,this.isTabStopDragOutside=!1,this._removeGuideline()}let e=!!this.dragIndentTarget;this.dragIndentTarget=null,this.dragOriginIndents=null,e&&(this._removeGuideline(),this.isIndentApplied&&(this.isIndentApplied=!1,this.draw.render({isSetCursor:!1}))),document.removeEventListener(`mousemove`,this.mousemoveHandler),document.removeEventListener(`mouseup`,this.mouseupHandler),this.dragSide&&(this.dragSide=null,this.dragStartPosition=0,this.dragOriginMargins=null)}clampMargin(e,t){return Math.min(Math.max(e,0),Math.max(t,0))}_setDisplayedMargins(e){let{paperDirection:t,margins:n}=this.options,r=t===F.VERTICAL?e:[e[3],e[0],e[1],e[2]];r.join()!==n.join()&&this.draw.setPaperMargin(r)}}})),Qs,$s=o((()=>{Qe(),Qs=class{draw;options;container;hyperlinkPopupContainer;hyperlinkDom;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer();let{hyperlinkPopupContainer:t,hyperlinkDom:n}=this._createHyperlinkPopupDom();this.hyperlinkDom=n,this.hyperlinkPopupContainer=t}_createHyperlinkPopupDom(){let e=document.createElement(`div`);e.classList.add(`ce-hyperlink-popup`);let t=document.createElement(`a`);return t.target=`_blank`,t.rel=`noopener`,e.append(t),this.container.append(e),{hyperlinkPopupContainer:e,hyperlinkDom:t}}drawHyperlinkPopup(e,t){let{coordinate:{leftTop:[n,r]},lineHeight:i}=t,{x:a,y:o}=this.draw.getPageOffset(this.draw.getPageNo());this.hyperlinkPopupContainer.style.display=`block`,this.hyperlinkPopupContainer.style.left=`${n+a}px`,this.hyperlinkPopupContainer.style.top=`${r+o+i}px`;let s=e.url||`#`;this.hyperlinkDom.href=s,this.hyperlinkDom.title=s,this.hyperlinkDom.innerText=s}clearHyperlinkPopup(){this.hyperlinkPopupContainer.style.display=`none`}openHyperlink(e){let t=window.open(e.url,`_blank`);t&&(t.opener=null)}render(e,t,n,r){e.save(),e.font=t.style,t.color||=this.options.defaultHyperlinkColor,e.fillStyle=t.color,t.underline===void 0&&(t.underline=!0),e.fillText(t.value,n,r),e.restore()}}})),ec,tc=o((()=>{Qe(),Ja(),ec=class{draw;options;container;hintPopupContainer;hintDom;lastHoverKey;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.lastHoverKey=``;let{popup:t,hintDom:n}=this._createHintPopupDom();this.hintPopupContainer=t,this.hintDom=n}_createHintPopupDom(){let e=document.createElement(`div`);e.classList.add(`ce-hint-popup`);let t=document.createElement(`span`);return t.classList.add(`ce-hint-popup__text`),e.append(t),this.container.append(e),{popup:e,hintDom:t}}_getElementHint(e){return e?.hint||``}drawHintPopup(e,t){let n=e.position,r=e.td;if(!n&&!r){this.clearHintPopup();return}let i,a,o;if(n){let{coordinate:{leftTop:[e,t]},lineHeight:r}=n;i=e,a=t,o=r}else i=r.x||0,a=r.y||0,o=r.rowList?.[0]?.height||0;let{x:s,y:c}=this.draw.getPageOffset(t),{backgroundColor:l,color:u,fontSize:d,maxWidth:f}=this.options.hint;this.hintDom.innerText=e.hint,this.hintPopupContainer.style.background=l,this.hintPopupContainer.style.color=u,this.hintPopupContainer.style.fontSize=`${d}px`,this.hintPopupContainer.style.maxWidth=`${f}px`;let p=i+s,m=a+c+o+6;this.hintPopupContainer.style.left=`${p}px`,this.hintPopupContainer.style.top=`${m}px`,this.hintPopupContainer.style.display=`block`;let h=this.hintPopupContainer.getBoundingClientRect(),{height:g}=h,_=window.innerWidth,v=window.innerHeight;if(h.right>_&&(p=Math.max(0,p-(h.right-_))),h.bottom>v){let e=a+c-g-6;m=e>=0?e:Math.max(0,m-(h.bottom-v))}this.hintPopupContainer.style.left=`${p}px`,this.hintPopupContainer.style.top=`${m}px`}clearHintPopup(){this.hintPopupContainer.style.display=`none`,this.lastHoverKey=``}handleMouseMove(e){if(this.options.hint.disabled)return;let t=qa(e,this.draw.getPageContainer());if(!t){this.clearHintPopup();return}this.draw.setPageNo(t.pageNo);let n=this.draw.getPosition(),r=n.getPositionByXY({x:t.x,y:t.y,pageNo:t.pageNo});if(!~r.index){this.clearHintPopup();return}let i=this.draw.getOriginalElementList(),a=i[r.index],o=a,s=n.getOriginalPositionList()[r.index],c,l=String(r.index);r.isTable&&r.tdValueIndex!==void 0&&(c=n.getTableTdByContext(i,{...r,isTable:!0})||void 0,o=c?.value[r.tdValueIndex],s=c?.positionList?.[r.tdValueIndex],l=`${r.tablePath?.map(e=>`${e.index}:${e.trIndex}:${e.tdIndex}`).join(`/`)}:${r.tdValueIndex}`);let u=this._getElementHint(o);!u&&c?.hint&&(u=c.hint),!u&&a?.hint&&(u=a.hint),!u||!o&&!c?this.clearHintPopup():this.lastHoverKey!==l&&(this.drawHintPopup({hint:u,position:s,td:c},t.pageNo),this.lastHoverKey=l)}}})),nc,rc=o((()=>{Qe(),z(),V(),pn(),gi(),Ja(),nc=class{draw;options;container;tracePopupContainer;listDom;lastHoverKey;strikeoutState=null;underlineState=null;currentRow=null;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.lastHoverKey=``;let{popup:t,listDom:n}=this._createTracePopupDom();this.tracePopupContainer=t,this.listDom=n}_createTracePopupDom(){let e=document.createElement(`div`);e.classList.add(`ce-trace-popup`);let t=document.createElement(`div`);return t.classList.add(`ce-trace-popup__list`),e.append(t),this.container.append(e),{popup:e,listDom:t}}drawTracePopup(e,t,n){let r=e.trace;if(!r?.length||!t){this.clearTracePopup();return}let{coordinate:{leftTop:[i,a]},lineHeight:o}=t,{x:s,y:c}=this.draw.getPageOffset(n);this.tracePopupContainer.style.display=`block`,this.tracePopupContainer.style.left=`${i+s}px`,this.tracePopupContainer.style.top=`${a+c+o}px`;let{insertColor:l,deleteColor:u}=this.options.trace,d=this.draw.getI18n(),f=d.t(`trace.author`),p=d.t(`trace.time`);this.listDom.innerHTML=``;let m=document.createDocumentFragment();for(let e of r){let t=e.type===fn.INSERTED,n=document.createElement(`div`);n.classList.add(`ce-trace-popup__item`);let r=document.createElement(`span`);if(r.classList.add(`ce-trace-popup__type`),r.innerText=d.t(t?`trace.insert`:`trace.delete`),r.style.color=t?l:u,n.append(r),e.author){let t=document.createElement(`span`);t.classList.add(`ce-trace-popup__author`),t.innerText=`${f}: ${e.author}`,n.append(t)}if(e.timestamp){let t=document.createElement(`span`);t.classList.add(`ce-trace-popup__time`),t.innerText=`${p}: ${new Date(e.timestamp).toLocaleString()}`,n.append(t)}m.append(n)}this.listDom.append(m)}clearTracePopup(){this.tracePopupContainer.style.display=`none`,this.lastHoverKey=``}handleMouseMove(e){if(!this.draw.isTraceMode())return;let t=qa(e,this.draw.getPageContainer());if(!t){this.clearTracePopup();return}this.draw.setPageNo(t.pageNo);let n=this.draw.getPosition(),r=n.getPositionByXY({x:t.x,y:t.y,pageNo:t.pageNo});if(!~r.index){this.clearTracePopup();return}let i=this.draw.getOriginalElementList(),a=i[r.index],o=n.getOriginalPositionList()[r.index],s=String(r.index);if(r.isTable&&r.tdValueIndex!==void 0){let e=n.getTableTdByContext(i,{...r,isTable:!0});a=e?.value[r.tdValueIndex],o=e?.positionList?.[r.tdValueIndex],s=`${r.tablePath?.map(e=>`${e.index}:${e.trIndex}:${e.tdIndex}`).join(`/`)}:${r.tdValueIndex}`}a?.trace?.length?this.lastHoverKey!==s&&(this.drawTracePopup(a,o,t.pageNo),this.lastHoverKey=s):this.clearTracePopup()}_getTraceFlags(e){let t=e?.trace||[];return{hasInsert:t.some(e=>e.type===fn.INSERTED),hasDelete:t.some(e=>e.type===fn.DELETED)}}render(e){if(!this.draw.isTraceMode())return;let{ctx:t,element:n,x:r,y:i,curRow:a,metrics:o,offsetY:s,scale:c}=e;this.currentRow!==a&&(this._flushStrikeout(t,c),this._flushUnderline(t,c),this.currentRow=a);let{hasInsert:l,hasDelete:u}=this._getTraceFlags(n);if(u){let e=this.draw.getTextMeasurer().measureBasis(this.draw.getElementFont(n)),t=i+s+e.actualBoundingBoxDescent*c-o.height/2;n.type===B.SUBSCRIPT?t+=this.draw.getSubscriptParticle().getOffsetY(n):n.type===B.SUPERSCRIPT&&(t+=this.draw.getSuperscriptParticle().getOffsetY(n)),this.strikeoutState?this.strikeoutState.width+=o.width:this.strikeoutState={x:r,y:t+.5,width:o.width}}else this.strikeoutState&&this._flushStrikeout(t,c);if(l){let e=this.draw.getElementRowMargin(n),t=n.left||0,s=0;n.type===B.SUBSCRIPT&&(s=this.draw.getSubscriptParticle().getOffsetY(n));let l=r-t,u=a.height-(a.spacingAfter||0),d=Math.floor(i+u-e+s+2*c)+.5;this.underlineState?this.underlineState.width+=o.width+t:this.underlineState={x:l,y:d,width:o.width+t}}else this.underlineState&&this._flushUnderline(t,c)}flush(e){let t=this.options.scale;this._flushStrikeout(e,t),this._flushUnderline(e,t),this.currentRow=null}_flushStrikeout(e,t){this.strikeoutState&&=(e.save(),e.lineWidth=this.options.trace.lineWidth*t,e.strokeStyle=this.options.trace.deleteColor,e.lineCap=`butt`,e.beginPath(),e.moveTo(this.strikeoutState.x,this.strikeoutState.y),e.lineTo(this.strikeoutState.x+this.strikeoutState.width,this.strikeoutState.y),e.stroke(),e.restore(),null)}_flushUnderline(e,t){this.underlineState&&=(e.save(),e.lineWidth=this.options.trace.lineWidth*t,e.strokeStyle=this.options.trace.insertColor,e.lineCap=`butt`,e.beginPath(),e.moveTo(this.underlineState.x,this.underlineState.y),e.lineTo(this.underlineState.x+this.underlineState.width,this.underlineState.y),e.stroke(),e.restore(),null)}isTraceHidden(e){let t=e.trace;return t?.[t.length-1]?.type===fn.DELETED&&!this.draw.isTraceMode()}_markElementList(e,t){if(this.options.trace.disabled)return;let n=this.options.trace.author,r=Date.now();mi(e,e=>{let i=e.trace||[];i[i.length-1]?.type!==t&&(e.trace=[...i,{type:t,author:n,timestamp:r}])})}markElementListInserted(e){this._markElementList(e,fn.INSERTED)}markElementListDeleted(e,t){let n=e;if(!t?.isIgnoreDeletedRule&&!this.draw.isDesignMode()&&!this.draw.getControl().getIsRangeWithinControl()){let r=this.draw.getMode(),i=t?.tdDeletable??this.draw.getTd()?.deletable,{group:a,modeRule:o}=this.options;n=e.filter(e=>e.hide||e.control?.hide||e.area?.hide||i!==!1&&e.control?.deletable!==!1&&(!e.controlId||r!==M.FORM||!o[r].controlDeletableDisabled)&&e.title?.deletable!==!1&&(a.deletable!==!1||!e.groupIds?.length)&&(e.area?.deletable!==!1||e.areaIndex!==0))}return this._markElementList(n,fn.DELETED),n}}})),ic,ac=o((()=>{ic=class{options;constructor(e){this.options=e.getOptions()}render(e,t,n,r){let{scale:i,label:{defaultBackgroundColor:a,defaultColor:o,defaultBorderRadius:s,defaultPadding:c}}=this.options,l=t.label?.backgroundColor||a,u=t.label?.color||o,d=t.label?.borderRadius||s,f=t.label?.padding||c;e.save(),e.font=t.style;let{width:p,height:m,boundingBoxAscent:h}=t.metrics;e.fillStyle=l,this._drawRoundedRect(e,n,r-h,p,m+(f[0]+f[2])*i,d*i),e.fill(),e.fillStyle=u,e.fillText(t.value,n+f[3]*i,r),e.restore()}_drawRoundedRect(e,t,n,r,i,a){e.beginPath(),e.moveTo(t+a,n),e.lineTo(t+r-a,n),e.quadraticCurveTo(t+r,n,t+r,n+a),e.lineTo(t+r,n+i-a),e.quadraticCurveTo(t+r,n+i,t+r-a,n+i),e.lineTo(t+a,n+i),e.quadraticCurveTo(t,n+i,t,n+i-a),e.lineTo(t,n+a),e.quadraticCurveTo(t,n,t+a,n),e.closePath()}}})),oc,sc=o((()=>{D(),z(),gi(),oc=class{draw;position;zone;options;elementList;layoutMap;constructor(e,t){this.draw=e,this.position=e.getPosition(),this.zone=e.getZone(),this.options=e.getOptions(),this.elementList=t||[],this.layoutMap=new Map}getRowList(){return this._getLayoutByDirection(this.options.paperDirection)[0]}setElementList(e){this.elementList=e}getElementList(){return this.elementList}getPositionList(e=this.options.paperDirection){return this._getLayoutByDirection(e)[1]}compute(){this.recovery(),this._getLayoutByDirection(this.options.paperDirection)}recovery(){this.layoutMap.clear()}_getLayoutByDirection(e){let t=this.layoutMap.get(e);if(!t){let n=this._computeRowList(e);t=[n,[]],this.layoutMap.set(e,t),t[1]=this._computePositionList(e,n)}return t}_computeRowList(e){let t=this.draw.getMargins(e),n=this.draw.getInnerWidth(e),r=li(this.elementList);return this.draw.computeRowList({startX:t[3],startY:this.getHeaderTop(),innerWidth:n,elementList:this.elementList,surroundElementList:r})}_computePositionList(e,t){let n=this.draw.getMargins(e),r=[];return this.position.computePageRowPosition({positionList:r,rowList:t,pageNo:0,startRowIndex:0,startIndex:0,startX:n[3],startY:this.getHeaderTop(),innerWidth:this.draw.getInnerWidth(e),zone:N.HEADER}),r}getHeaderTop(e){if(this.isDisabled(e))return 0;let{header:{top:t},scale:n}=this.options;return Math.floor(t*n)}getMaxHeight(e){let{header:{maxHeightRadio:t}}=this.options,n=this.draw.getHeight(e);return Math.floor(n*T[t])}getHeight(e,t){if(this.isDisabled(e))return 0;let n=this._resolveDirection(e,t),r=this.getMaxHeight(n),i=this.getRowHeight(n);return i>r?r:i}getRowHeight(e=this.options.paperDirection){return this._getLayoutByDirection(e)[0].reduce((e,t)=>e+t.height,0)}getExtraHeight(e,t){let n=this._resolveDirection(e,t),r=this.draw.getMargins(n),i=this.getHeight(e,n),a=this.getHeaderTop(e)+i-r[0];return a<=0?0:a}_resolveDirection(e,t){return t??(e===void 0?this.options.paperDirection:this.draw.getPageDirection(e))}isDisabled(e){return!!(this.options.header.disabled||e!==void 0&&this.options.header.disabledPages.includes(e))}render(e,t){if(this.options.header.disabledPages.includes(t))return;e.save(),e.globalAlpha=this.zone.isHeaderActive()?1:this.options.header.inactiveAlpha;let n=this.draw.getPageDirection(t),r=this.draw.getInnerWidth(n),i=this.getMaxHeight(n),[a,o]=this._getLayoutByDirection(n),s=[],c=0;for(let e=0;e<a.length;e++){let t=a[e];if(c+t.height>i)break;s.push(t),c+=t.height}this.draw.drawRow(e,{elementList:this.elementList,positionList:o,rowList:s,pageNo:t,startIndex:0,innerWidth:r,zone:N.HEADER}),e.restore()}}})),cc,lc=o((()=>{cc=class{getOffsetY(e){return-e.metrics.height/2}render(e,t,n,r){e.save(),e.font=t.style,t.color&&(e.fillStyle=t.color),e.fillText(t.value,n,r+this.getOffsetY(t)),e.restore()}}})),uc,dc=o((()=>{uc=class{getOffsetY(e){return e.metrics.height/2}render(e,t,n,r){e.save(),e.font=t.style,t.color&&(e.fillStyle=t.color),e.fillText(t.value,n,r+this.getOffsetY(t)),e.restore()}}})),fc,pc=o((()=>{fc=class{options;constructor(e){this.options=e.getOptions()}render(e,t,n,r){e.save();let{scale:i,separator:{lineWidth:a,strokeStyle:o}}=this.options;e.lineWidth=(t.lineWidth||a)*i,e.strokeStyle=t.color||o,t.dashArray?.length&&e.setLineDash(t.dashArray);let s=Math.round(r);e.translate(0,e.lineWidth/2),e.beginPath(),e.moveTo(n,s),e.lineTo(n+t.width*i,s),e.stroke(),e.restore()}}})),mc,hc=o((()=>{mc=class{draw;options;i18n;constructor(e){this.draw=e,this.options=e.getOptions(),this.i18n=e.getI18n()}render(e,t,n,r){let{pageBreak:{font:i,fontSize:a,lineDash:o}}=this.options,s=this.i18n.t(`pageBreak.displayName`),{scale:c,defaultRowMargin:l}=this.options,u=a*c,d=t.width*c,f=this.draw.getDefaultBasicRowMarginHeight()*l,p=`${u}px ${i}`;e.save(),e.font=p;let m=this.draw.getTextMeasurer().measureText(s,p),h=(d-m.width)/2;e.setLineDash(o),e.translate(0,.5+f),e.beginPath(),e.moveTo(n,r),e.lineTo(n+h,r),e.moveTo(n+h+m.width,r),e.lineTo(n+d,r),e.stroke(),e.fillText(s,n+h,r+m.actualBoundingBoxAscent-u/2),e.restore()}}})),gc,_c=o((()=>{qn(),ir(),Ls(),gc=class{draw;options;imageCache;constructor(e){this.draw=e,this.options=e.getOptions(),this.imageCache=new Map}renderText(e,t){let{watermark:{data:n,opacity:r,font:i,size:a,color:o,repeat:s,gap:c,numberType:l},scale:u}=this.options,{width:d,height:f}=this.draw.getPageSize(t),p=`${a*u}px ${i}`;e.save(),e.globalAlpha=r,e.font=p;let m=n,h=new RegExp(Gn.PAGE_NO);h.test(m)&&(m=Is.formatNumberPlaceholder(m,t+1,h,l));let g=new RegExp(Gn.PAGE_COUNT);g.test(m)&&(m=Is.formatNumberPlaceholder(m,this.draw.getPageCount(),g,l));let _=this.draw.getTextMeasurer().measureText(m,p);if(s){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=_.width,s=_.actualBoundingBoxAscent+_.actualBoundingBoxDescent,l=Math.sqrt(r**2+s**2),h=l+2*c[0]*u,g=l+2*c[1]*u;t.width=h,t.height=g,n.translate(h/2,g/2),n.rotate(-45*Math.PI/180),n.translate(-h/2,-g/2),n.font=`${a*u}px ${i}`,n.fillStyle=o,n.fillText(m,(h-r)/2,(g-s)/2+_.actualBoundingBoxAscent);let v=e.createPattern(t,`repeat`,{key:`watermark-text`,revision:`${m}|${p}|${o}`});v&&(e.fillStyle=v,e.fillRect(0,0,d,f))}else{let t=d/2,n=f/2;e.fillStyle=o,e.translate(t,n),e.rotate(-45*Math.PI/180),e.fillText(m,-_.width/2,_.actualBoundingBoxAscent-a*u/2)}e.restore()}renderImage(e,t){let{watermark:{width:n,height:r,data:i,opacity:a,repeat:o,gap:s},scale:c}=this.options;if(!this.imageCache.has(i)){let e=new Image;e.setAttribute(`crossOrigin`,`Anonymous`),e.src=i,e.onload=()=>{this.imageCache.set(i,e),this.draw.render({isCompute:!1,isSubmitHistory:!1})};return}let{width:l,height:u}=this.draw.getPageSize(t),d=n*c,f=r*c;if(e.save(),e.globalAlpha=a,o){let t=document.createElement(`canvas`),n=t.getContext(`2d`),r=Math.sqrt(d**2+f**2),a=r+2*s[0]*c,o=r+2*s[1]*c;t.width=a,t.height=o,n.translate(a/2,o/2),n.rotate(-45*Math.PI/180),n.translate(-a/2,-o/2),n.drawImage(this.imageCache.get(i),(a-d)/2,(o-f)/2,d,f);let p=e.createPattern(t,`repeat`,{key:`watermark-image:${i}`});p&&(e.fillStyle=p,e.fillRect(0,0,l,u))}else{let t=l/2,n=u/2;e.translate(t,n),e.rotate(-45*Math.PI/180),e.drawImage(this.imageCache.get(i),-d/2,-f/2,d,f)}e.restore()}render(e,t){this.options.watermark.type===nr.IMAGE?this.renderImage(e,t):this.renderText(e,t)}}})),vc,yc=o((()=>{D(),G(),V(),vc=class{draw;control;options;highlightList;highlightMatchResult;constructor(e){this.draw=e.getDraw(),this.control=e,this.options=this.draw.getOptions(),this.highlightList=[],this.highlightMatchResult=[]}getControlHighlight(e,t){let{control:{activeBackgroundColor:n,disabledBackgroundColor:r,existValueBackgroundColor:i,noValueBackgroundColor:a}}=this.options,o=e[t],s=o.control?.activeBackgroundColor||n,c=o.control?.disabledBackgroundColor||r,l=o.control?.existValueBackgroundColor||i,u=o.control?.noValueBackgroundColor||a,d=this.draw.isPrintMode(),f=this.control.getActiveControl()?.getElement(),p=!1,m=!1,h=!1,g=!1;return o.highlight||(p=!d&&!!s&&!!f&&o.controlId===f.controlId&&!this.control.getIsRangeInPostfix()),p||(m=!d&&!!c&&!!o.control?.disabled),m||(h=!d&&!!l&&!!o.controlId&&this.control.getIsExistValueByElementListIndex(e,t)),h||(g=!d&&!!u&&!!o.controlId&&!this.control.getIsExistValueByElementListIndex(e,t)),(p?s:``)||(m?c:``)||(h?l:``)||(g?u:``)}getHighlightMatchResult(){return this.highlightMatchResult}getHighlightList(){return this.highlightList}setHighlightList(e){this.highlightList=e}computeHighlightList(){let e=this.draw.getSearch(),t=(n,r)=>{let i=0;for(;i<n.length;){let a=n[i];if(i++,a.type===B.TABLE){let e=a.trList;for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.tdList.length;e++){let o=r.tdList[e],s={tableId:a.id,tableIndex:i-1,trIndex:n,tdIndex:e,tdId:o.id};t(o.value,s)}}}let o=a?.control;if(!o)continue;let s=this.highlightList.findIndex(e=>e.id===a.controlId||o.conceptId&&o.conceptId===e.conceptId);if(!~s)continue;let c=i,l=i;for(;l<n.length&&n[l].controlId===a.controlId;)l++;i=l;let u=n.slice(c,l).map(e=>e.controlComponent===U.VALUE?e:{value:``}),{ruleList:d}=this.highlightList[s];for(let t=0;t<d.length;t++){let n=d[t],i=e.getMatchList(n.keyword,u);this.highlightMatchResult.push(...i.map(e=>({...e,...n,...r,index:e.index+c})))}}};this.highlightMatchResult=[],t(this.draw.getOriginalMainElementList())}renderHighlightList(e,t){if(!this.highlightMatchResult?.length)return;let{searchMatchAlpha:n,searchMatchColor:r}=this.options,i=this.draw.getPosition().getOriginalPositionList(),a=this.draw.getOriginalElementList();e.save();for(let o=0;o<this.highlightMatchResult.length;o++){let s=this.highlightMatchResult[o],c=null;if(s.tableId){let{tableIndex:e,trIndex:t,tdIndex:n,index:r}=s;c=a[e]?.trList[t].tdList[n]?.positionList[r]}else c=i[s.index];if(!c)continue;let{coordinate:{leftTop:l,leftBottom:u,rightTop:d},pageNo:f}=c;if(f!==t)continue;e.fillStyle=s.backgroundColor||r,e.globalAlpha=s.alpha||n;let p=l[0],m=l[1],h=d[0]-l[0],g=u[1]-l[1];e.fillRect(p,m,h,g)}e.restore()}}})),bc,xc=o((()=>{bc=class{borderRect;options;constructor(e){this.borderRect=this.clearBorderInfo(),this.options=e.getOptions()}clearBorderInfo(){return this.borderRect={x:0,y:0,width:0,height:0},this.borderRect}recordBorderInfo(e,t,n,r){this.borderRect.width||(this.borderRect.x=e,this.borderRect.y=t,this.borderRect.height=r),this.borderRect.width+=n}render(e){if(!this.borderRect.width)return;let{scale:t,control:{borderWidth:n,borderColor:r}}=this.options,{x:i,y:a,width:o,height:s}=this.borderRect;e.save(),e.translate(0,1*t),e.lineWidth=n*t,e.strokeStyle=r,e.beginPath(),e.rect(i,a,o,s),e.stroke(),e.restore(),this.clearBorderInfo()}}})),Sc,Cc=o((()=>{Qe(),Kt(),G(),z(),V(),Ha(),J(),gi(),Sc=class{draw;element;control;isPopup;selectDom;options;VALUE_DELIMITER=`,`;DEFAULT_MULTI_SELECT_DELIMITER=`,`;constructor(e,t){let n=t.getDraw();this.draw=n,this.options=n.getOptions(),this.element=e,this.control=t,this.isPopup=!1,this.selectDom=null}setElement(e){this.element=e}getElement(){return this.element}getIsPopup(){return this.isPopup}getCodes(){return this.element?.control?.code?this.element.control.code.split(`,`):[]}getText(e){if(!this.element?.control)return null;let t=this.element.control;if(!t.valueSets?.length)return null;let n=t?.multiSelectDelimiter||this.DEFAULT_MULTI_SELECT_DELIMITER,r=t.valueSets,i=[];return e.forEach(e=>{let t=r.find(t=>t.code===e);t&&!He(t.value)&&i.push(t.value)}),i.join(n)||null}getValue(e={}){let t=e.elementList||this.control.getElementList(),{startIndex:n}=e.range||this.control.getRange(),r=t[n],i=[],a=n;for(;a>0;){let e=t[a];if(e.controlId!==r.controlId||e.controlComponent===U.PREFIX||e.controlComponent===U.PRE_TEXT)break;e.controlComponent===U.VALUE&&!Lr(e)&&i.unshift(e),a--}let o=n+1;for(;o<t.length;){let e=t[o];if(e.controlId!==r.controlId||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT)break;e.controlComponent===U.VALUE&&!Lr(e)&&i.push(e),o++}return i}setValue(e,t={},n={}){if(!this.element.control?.selectExclusiveOptions?.inputAble||!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);let{startIndex:a,endIndex:o}=i,s=this.control.getDraw();a===o?this.control.removePlaceholder(a,t):s.deleteElementList(r,a+1,o-a,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});let c=r[a],l=c.type&&!Vt.includes(c.type)||c.controlComponent===U.PREFIX||c.controlComponent===U.PRE_TEXT?Fe(c,[`control`,`controlId`,...Rt]):Ie(c,[`type`]),u=i.startIndex+1;for(let t=0;t<e.length;t++){let n={...l,...e[t],controlComponent:U.VALUE};Zr(r,[n],a,{editorOptions:this.options}),s.getTraceParticle().markElementListInserted([n]),s.spliceElementList(r,u+t,0,[n])}return u+e.length-1}keydown(e){if(this.control.getIsDisabledControl())return null;let t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();let{startIndex:r,endIndex:i}=n,a=t[r],o=t[i],s=this.element.control?.selectExclusiveOptions?.inputAble;if(e.key===Z.Backspace)return r===i?a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT||o.controlComponent===U.POSTFIX||o.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):s?(this.draw.deleteElementList(t,r,1),this.getValue().length||this.control.addPlaceholder(r-1),r-1):this.clearSelect():s?(this.draw.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r):this.clearSelect();if(e.key===Z.Delete){if(r!==i)return s?(this.draw.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r):this.clearSelect();{let e=t[i+1];return(a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT)&&e.controlComponent===U.PLACEHOLDER||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):s?(this.draw.deleteElementList(t,r+1,1),this.getValue().length||this.control.addPlaceholder(r),r):this.clearSelect()}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();let{startIndex:e,endIndex:t}=this.control.getRange();return e===t?e:this.clearSelect()}clearSelect(e={},t={}){let{isIgnoreDisabledRule:n=!1,isAddPlaceholder:r=!0}=t;if(!n&&this.control.getIsDisabledControl(e))return-1;let i=e.elementList||this.control.getElementList(),{startIndex:a}=e.range||this.control.getRange(),o=i[a],s=-1,c=-1,l=a;for(;l>0;){let e=i[l];if(e.controlId!==o.controlId||e.controlComponent===U.PREFIX||e.controlComponent===U.PRE_TEXT){s=l;break}l--}let u=a+1;for(;u<i.length;){let e=i[u];if(e.controlId!==o.controlId||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT){c=u-1;break}u++}if(!~s||!~c)return-1;let d=this.control.getDraw(),f=s+1,p=this.control.removePlaceholderInRange(i,f,c-s);return d.deleteElementList(i,f,p,{isIgnoreDeletedRule:t.isIgnoreDeletedRule}),r&&this.control.addPlaceholder(l,e),this.control.setControlProperties({code:null},{elementList:i,range:{startIndex:l,endIndex:l}}),l}setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange(),a=this.element.control,o=e?.split(this.VALUE_DELIMITER)||[],s=a.code,c=a.code?.split(this.VALUE_DELIMITER)||[],l=a.isMultiSelect;if(!l&&e===s||l&&ze(c,o)){this.control.repaintControl({curIndex:i.startIndex,isCompute:!1,isSubmitHistory:!1}),this.destroy();return}let u=a.valueSets;if(!Array.isArray(u)||!u.length)return;let d=this.getText(o);if(!d){if(s){let e=this.clearSelect(t,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});~e&&(this.control.repaintControl({curIndex:e}),this.control.emitControlContentChange({controlValue:[]}))}return}let f=this.getValue(t)[0],p=f?Fe(f,Et):Fe(r[i.startIndex],Rt),m=this.clearSelect(t,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~m)return;s||this.control.removePlaceholder(m,t);let h=Ie(r[m],Et),g=m+1,_=Se(d),v=this.control.getDraw();for(let e=0;e<_.length;e++){let t={...p,...h,type:B.TEXT,value:_[e],controlComponent:U.VALUE};Zr(r,[t],m,{editorOptions:this.options}),v.getTraceParticle().markElementListInserted([t]),v.spliceElementList(r,g+e,0,[t])}if(this.control.setControlProperties({code:e},{elementList:r,range:{startIndex:m,endIndex:m}}),!t.range){let e=g+_.length-1;this.control.repaintControl({curIndex:e}),this.control.emitControlContentChange({context:t}),l||this.destroy()}}_createSelectPopupDom(){let e=this.element.control,t=e.valueSets;if(!Array.isArray(t)||!t.length)return;let n=this.control.getPosition();if(!n)return;let r=document.createElement(`div`);r.classList.add(`ce-select-control-popup`),r.setAttribute(Ye,A.POPUP);let i=document.createElement(`ul`),a=null;for(let n=0;n<t.length;n++){let r=t[n],o=document.createElement(`li`),s=this.getCodes();s.includes(r.code)&&(o.classList.add(`active`),a=o),o.onclick=()=>{let t=s.findIndex(e=>e===r.code);e.isMultiSelect?~t?s.splice(t,1):s.push(r.code):s=~t?[]:[r.code],this.setSelect(s.join(this.VALUE_DELIMITER))},o.append(document.createTextNode(r.value)),i.append(o)}r.append(i);let{coordinate:{leftTop:[o,s]},lineHeight:c}=n,l=this.control.getPreY();r.style.left=`${o+this.control.getPreX()}px`,r.style.top=`${s+l+c}px`,this.control.getContainer().append(r),this.selectDom=r,a&&Ke(r,a)}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;let{startIndex:e}=this.control.getRange();this.control.getElementList()[e+1]?.controlId===this.element.controlId&&(this._createSelectPopupDom(),this.isPopup=!0)}destroy(){this.isPopup&&=(this.selectDom?.remove(),!1)}}})),wc,Tc=o((()=>{Kt(),G(),Ha(),J(),gi(),wc=class{element;control;options;constructor(e,t){let n=t.getDraw();this.options=n.getOptions(),this.element=e,this.control=t}setElement(e){this.element=e}getElement(){return this.element}getValue(e={}){let t=e.elementList||this.control.getElementList(),{startIndex:n}=e.range||this.control.getRange(),r=t[n],i=[];r.controlComponent===U.VALUE&&!Lr(r)&&i.push(r);let a=n;for(;a>0;){let e=fi(t,a,-1,r.controlId);if(e<0)break;let n=t[e];if(n.controlId!==r.controlId||n.controlComponent===U.PREFIX||n.controlComponent===U.PRE_TEXT)break;n.controlComponent===U.VALUE&&!Lr(n)&&i.unshift(n),a=e}let o=n+1;for(;o<t.length;){let e=fi(t,o,1,r.controlId);if(e<0||e>=t.length)break;let n=t[e];if(n.controlId!==r.controlId||n.controlComponent===U.POSTFIX||n.controlComponent===U.POST_TEXT)break;n.controlComponent===U.VALUE&&!Lr(n)&&i.push(n),o=e}return i}setValue(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);let{startIndex:a,endIndex:o}=i,s=this.control.getDraw(),c=r[a],l=this.control.getActiveControl()?.getElement();if(l&&l.controlId&&l.controlId!==c.controlId){let e=!1;for(let t=a;t<=o;t++)if(r[t]?.controlId===l.controlId){e=!0;break}e&&this.control.destroyControl({isEmitEvent:!0})}a===o?this.control.removePlaceholder(a,t):s.deleteElementList(r,a+1,o-a,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});let u=c.type&&!Vt.includes(c.type)||c.controlComponent===U.PREFIX||c.controlComponent===U.PRE_TEXT?Fe(c,[`control`,`controlId`,...Rt]):Ie(c,[`type`]),d=i.startIndex+1;for(let t=0;t<e.length;t++){let n={...u,...e[t],controlComponent:U.VALUE};Zr(r,[n],a,{editorOptions:this.options}),s.getTraceParticle().markElementListInserted([n]),s.spliceElementList(r,d+t,0,[n])}return d+e.length-1}clearValue(e={},t={}){if(!t.isIgnoreDisabledRule&&this.control.getIsDisabledControl(e))return-1;let{isAddPlaceholder:n=!0}=t,r=e.elementList||this.control.getElementList(),i=e.range||this.control.getValueRange()||this.control.getRange(),{startIndex:a,endIndex:o}=i,s=a+1,c=this.control.removePlaceholderInRange(r,s,o-a);return this.control.getDraw().deleteElementList(r,s,c,{isIgnoreDeletedRule:t.isIgnoreDeletedRule}),!this.getValue({range:i,elementList:r}).length&&n&&this.control.addPlaceholder(a,e),a}keydown(e){if(this.control.getIsDisabledControl())return null;let t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();let{startIndex:r,endIndex:i}=n,a=t[r],o=t[i],s=this.control.getDraw();if(e.key===Z.Backspace)return r===i?a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT||o.controlComponent===U.POSTFIX||o.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):(s.deleteElementList(t,r,1),this.getValue().length||this.control.addPlaceholder(r-1),r-1):(s.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r);if(e.key===Z.Delete){if(r!==i)return s.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r;{let e=t[i+1];return(a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT)&&e.controlComponent===U.PLACEHOLDER||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):(s.deleteElementList(t,r+1,1),this.getValue().length||this.control.addPlaceholder(r),r)}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();let{startIndex:e,endIndex:t}=this.control.getRange();if(e===t)return e;let n=this.control.getDraw(),r=this.control.getElementList();return n.deleteElementList(r,e+1,t-e),this.getValue().length||this.control.addPlaceholder(e),e}}})),Q,Ec=o((()=>{Q=function(e){return e.DATE=`date`,e.MONTH=`month`,e.YEAR=`year`,e}({})})),Dc,Oc=o((()=>{Qe(),Ec(),z(),J(),Dc=class{draw;options;now;dom;renderOptions;isDatePicker;pickDate;lang;datePickerType;viewMode;yearPageStart;constructor(e,t={}){this.draw=e,this.options=t,this.lang=this._getLang(),this.now=new Date,this.dom=this._createDom(),this.renderOptions=null,this.isDatePicker=!0,this.pickDate=null,this.datePickerType=Q.DATE,this.viewMode=Q.DATE,this.yearPageStart=0,this._bindEvent()}_createDom(){let e=document.createElement(`div`);e.classList.add(`ce-date-container`),e.setAttribute(Ye,A.POPUP);let t=document.createElement(`div`);t.classList.add(`ce-date-wrap`);let n=document.createElement(`div`);n.classList.add(`ce-date-title`);let r=document.createElement(`span`);r.classList.add(`ce-date-title__pre-year`),r.innerText=`<<`;let i=document.createElement(`span`);i.classList.add(`ce-date-title__pre-month`),i.innerText=`<`;let a=document.createElement(`span`);a.classList.add(`ce-date-title__year-label`);let o=document.createElement(`span`);o.classList.add(`ce-date-title__month-label`);let s=document.createElement(`span`);s.classList.add(`ce-date-title__now`),s.append(a),s.append(o);let c=document.createElement(`span`);c.classList.add(`ce-date-title__next-month`),c.innerText=`>`;let l=document.createElement(`span`);l.classList.add(`ce-date-title__next-year`),l.innerText=`>>`,n.append(r),n.append(i),n.append(s),n.append(c),n.append(l);let u=document.createElement(`div`);u.classList.add(`ce-date-week`);let{weeks:{sun:d,mon:f,tue:p,wed:m,thu:h,fri:g,sat:_}}=this.lang;[d,f,p,m,h,g,_].forEach(e=>{let t=document.createElement(`span`);t.innerText=`${e}`,u.append(t)});let v=document.createElement(`div`);v.classList.add(`ce-date-day`),t.append(n),t.append(u),t.append(v);let y=document.createElement(`div`);y.classList.add(`ce-year-wrap`);let b=document.createElement(`div`);b.classList.add(`ce-month-wrap`);let x=document.createElement(`ul`);x.classList.add(`ce-time-wrap`);let S,C,w;[this.lang.hour,this.lang.minute,this.lang.second].forEach((e,t)=>{let n=document.createElement(`li`),r=document.createElement(`span`);r.innerText=e,n.append(r);let i=document.createElement(`ol`),a=t===0,o=t===1,s=a?24:60;for(let e=0;e<s;e++){let t=document.createElement(`li`);t.innerText=`${String(e).padStart(2,`0`)}`,t.setAttribute(`data-id`,`${e}`),i.append(t)}a?S=i:o?C=i:w=i,n.append(i),x.append(n)});let T=document.createElement(`div`);T.classList.add(`ce-date-menu`);let E=document.createElement(`button`);E.classList.add(`ce-date-menu__time`),E.innerText=this.lang.timeSelect;let D=document.createElement(`button`);D.classList.add(`ce-date-menu__now`),D.innerText=this.lang.now;let O=document.createElement(`button`);return O.classList.add(`ce-date-menu__submit`),O.innerText=this.lang.confirm,T.append(E),T.append(D),T.append(O),e.append(t),e.append(y),e.append(b),e.append(x),e.append(T),this.draw.getContainer().append(e),{container:e,dateWrap:t,datePickerWeek:u,yearWrap:y,monthWrap:b,timeWrap:x,title:{preYear:r,preMonth:i,now:s,yearLabel:a,monthLabel:o,nextMonth:c,nextYear:l},day:v,time:{hour:S,minute:C,second:w},menu:{time:E,now:D,submit:O}}}_bindEvent(){this.dom.title.preYear.onclick=()=>{this.viewMode===Q.YEAR?this._preYearPage():this._preYear()},this.dom.title.preMonth.onclick=()=>{this._preMonth()},this.dom.title.nextMonth.onclick=()=>{this._nextMonth()},this.dom.title.nextYear.onclick=()=>{this.viewMode===Q.YEAR?this._nextYearPage():this._nextYear()},this.dom.title.yearLabel.onclick=e=>{e.stopPropagation(),this.datePickerType===Q.DATE&&this.viewMode===Q.DATE&&(this.viewMode=Q.YEAR,this._update(),this._switchView())},this.dom.title.monthLabel.onclick=e=>{e.stopPropagation(),this.datePickerType===Q.DATE&&this.viewMode===Q.DATE&&(this.viewMode=Q.MONTH,this._update(),this._switchView())},this.dom.title.now.onclick=()=>{this.datePickerType===Q.DATE&&(this.viewMode===Q.YEAR||this.viewMode===Q.MONTH)&&(this.viewMode=Q.DATE,this._update(),this._switchView())},this.dom.menu.time.onclick=()=>{this.isDatePicker=!this.isDatePicker,this._toggleDateTimePicker()},this.dom.menu.now.onclick=()=>{this._now(),this._submit()},this.dom.menu.submit.onclick=()=>{this.dispose(),this._submit()},this.dom.time.hour.onclick=e=>{if(!this.pickDate)return;let t=e.target.dataset.id;t&&(this.pickDate.setHours(Number(t)),this._setTimePick(!1))},this.dom.time.minute.onclick=e=>{if(!this.pickDate)return;let t=e.target.dataset.id;t&&(this.pickDate.setMinutes(Number(t)),this._setTimePick(!1))},this.dom.time.second.onclick=e=>{if(!this.pickDate)return;let t=e.target.dataset.id;t&&(this.pickDate.setSeconds(Number(t)),this._setTimePick(!1))}}_setPosition(){if(!this.renderOptions)return;let{position:{coordinate:{leftTop:[e,t]},lineHeight:n,pageNo:r}}=this.renderOptions,i=r??this.draw.getPageNo(),{x:a,y:o}=this.draw.getPageOffset(i);this.dom.container.style.left=`${e+a}px`,this.dom.container.style.top=`${t+o+n}px`}isInvalidDate(e){return e.toDateString()===`Invalid Date`}parseDate(e,t){let n=[],r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`).replace(/y+|Y+|M+|d+|D+|h+|H+|m+|s+|S+/g,e=>(n.push(e[0]),e.length===1?`(\\d+)`:`(\\d{${e.length},})`)),i=RegExp(`^${r}$`).exec(e);if(!i)return null;let a=new Date,o=n.some(e=>/[yYMdD]/.test(e)),s={y:a.getFullYear(),M:o?1:a.getMonth()+1,d:o?1:a.getDate(),H:0,m:0,s:0,S:0},c={Y:`y`,D:`d`,h:`H`};n.forEach((e,t)=>{s[c[e]||e]=Number(i[t+1])});let{y:l,M:u,d,H:f,m:p,s:m,S:h}=s,g=new Date(l,u-1,d,f,p,m,h);g.setFullYear(l);let _=e=>n.includes(e);return this.isInvalidDate(g)||g.getMonth()!==u-1||g.getDate()!==d||(_(`H`)||_(`h`))&&g.getHours()!==f||_(`m`)&&g.getMinutes()!==p||_(`s`)&&g.getSeconds()!==m||_(`S`)&&g.getMilliseconds()!==h?null:g}_setValue(){let e=this.renderOptions?.value;if(e){let t=this.renderOptions?.dateFormat,n=t&&this.parseDate(e,t)||new Date(e);this.now=this.isInvalidDate(n)?new Date:n}else this.now=new Date;this.pickDate=new Date(this.now)}_getDatePickerType(e){if(!e)return Q.DATE;let t=/y+/i.test(e),n=/M+/.test(e),r=/[dD]+/.test(e);return t&&!n&&!r?Q.YEAR:t&&n&&!r?Q.MONTH:Q.DATE}_getLang(){let e=this.draw.getI18n(),t=e.t.bind(e);return{now:t(`datePicker.now`),confirm:t(`datePicker.confirm`),return:t(`datePicker.return`),timeSelect:t(`datePicker.timeSelect`),weeks:{sun:t(`datePicker.weeks.sun`),mon:t(`datePicker.weeks.mon`),tue:t(`datePicker.weeks.tue`),wed:t(`datePicker.weeks.wed`),thu:t(`datePicker.weeks.thu`),fri:t(`datePicker.weeks.fri`),sat:t(`datePicker.weeks.sat`)},year:t(`datePicker.year`),month:t(`datePicker.month`),months:{jan:t(`datePicker.months.jan`),feb:t(`datePicker.months.feb`),mar:t(`datePicker.months.mar`),apr:t(`datePicker.months.apr`),may:t(`datePicker.months.may`),jun:t(`datePicker.months.jun`),jul:t(`datePicker.months.jul`),aug:t(`datePicker.months.aug`),sep:t(`datePicker.months.sep`),oct:t(`datePicker.months.oct`),nov:t(`datePicker.months.nov`),dec:t(`datePicker.months.dec`)},hour:t(`datePicker.hour`),minute:t(`datePicker.minute`),second:t(`datePicker.second`)}}_setLangChange(){this.dom.menu.time.innerText=this.lang.timeSelect,this.dom.menu.now.innerText=this.lang.now,this.dom.menu.submit.innerText=this.lang.confirm;let{weeks:{sun:e,mon:t,tue:n,wed:r,thu:i,fri:a,sat:o}}=this.lang,s=[e,t,n,r,i,a,o];this.dom.datePickerWeek.childNodes.forEach((e,t)=>{let n=e;n.innerText=s[t]});let c=this.dom.time.hour.previousElementSibling;c.innerText=this.lang.hour;let l=this.dom.time.minute.previousElementSibling;l.innerText=this.lang.minute;let u=this.dom.time.second.previousElementSibling;u.innerText=this.lang.second}_update(){this.viewMode===Q.YEAR?this._updateYearView():this.viewMode===Q.MONTH?this._updateMonthView():this._updateDateView(),this._updateTitleVisibility()}_updateTitleVisibility(){let{preYear:e,preMonth:t,nextMonth:n,nextYear:r}=this.dom.title;this.viewMode===Q.YEAR||this.viewMode===Q.MONTH?(e.style.display=`inline-block`,e.innerText=`<<`,r.style.display=`inline-block`,r.innerText=`>>`,t.style.display=`none`,n.style.display=`none`):(e.style.display=`inline-block`,e.innerText=`<<`,t.style.display=`inline-block`,t.innerText=`<`,n.style.display=`inline-block`,n.innerText=`>`,r.style.display=`inline-block`,r.innerText=`>>`)}_updateDateView(){let e=new Date,t=e.getFullYear(),n=e.getMonth()+1,r=e.getDate(),i=null,a=null,o=null;this.pickDate&&(i=this.pickDate.getFullYear(),a=this.pickDate.getMonth()+1,o=this.pickDate.getDate());let s=this.now.getFullYear(),c=this.now.getMonth()+1;this.dom.title.yearLabel.innerText=`${s}${this.lang.year}`,this.dom.title.monthLabel.innerText=` ${String(c).padStart(2,`0`)}${this.lang.month}`;let l=new Date(s,c,0).getDate(),u=new Date(s,c-1,1).getDay(),d=new Date(s,c-1,0).getDate();this.dom.day.innerHTML=``;let f=d-u+1;for(let e=f;e<=d;e++){let t=document.createElement(`div`);t.classList.add(`disable`),t.innerText=`${e}`,t.onclick=()=>{let t=c-2;this.now=new Date(s,t,e),this._setDatePick(s,t,e)},this.dom.day.append(t)}for(let e=1;e<=l;e++){let l=document.createElement(`div`);t===s&&n===c&&r===e&&l.classList.add(`active`),this.pickDate&&i===s&&a===c&&o===e&&l.classList.add(`select`),l.innerText=`${e}`,l.onclick=t=>{let n=c-1;this.now=new Date(s,n,e),this._setDatePick(s,n,e),t.stopPropagation()},this.dom.day.append(l)}let p=42-u-l;for(let e=1;e<=p;e++){let t=document.createElement(`div`);t.classList.add(`disable`),t.innerText=`${e}`,t.onclick=()=>{this.now=new Date(s,c,e),this._setDatePick(s,c,e)},this.dom.day.append(t)}}_updateYearView(){let e=this.now.getFullYear();this.yearPageStart===0&&(this.yearPageStart=e-5);let t=this.yearPageStart,n=t+11;this.dom.title.yearLabel.innerText=`${t} - ${n}`,this.dom.title.monthLabel.innerText=``,this.dom.yearWrap.innerHTML=``;let r=this.pickDate?.getFullYear()||null,i=new Date().getFullYear();for(let e=t;e<=n;e++){let t=document.createElement(`div`);t.innerText=`${e}`,e===i&&t.classList.add(`active`),r===e&&t.classList.add(`select`),t.onclick=()=>{this.now=this._createDate(e,this.now.getMonth(),this.now.getDate(),this.now),this.pickDate&&=this._createDate(e,this.pickDate.getMonth(),this.pickDate.getDate(),this.pickDate),this.datePickerType===Q.YEAR?(this._submit(),this.dispose()):(this.viewMode=Q.MONTH,this._update(),this._switchView())},this.dom.yearWrap.append(t)}}_updateMonthView(){let e=this.now.getFullYear();this.dom.title.yearLabel.innerText=`${e}${this.lang.year}`,this.dom.title.monthLabel.innerText=``,this.dom.monthWrap.innerHTML=``;let t=[this.lang.months.jan,this.lang.months.feb,this.lang.months.mar,this.lang.months.apr,this.lang.months.may,this.lang.months.jun,this.lang.months.jul,this.lang.months.aug,this.lang.months.sep,this.lang.months.oct,this.lang.months.nov,this.lang.months.dec],n=new Date,r=n.getFullYear(),i=n.getMonth(),a=this.pickDate?.getFullYear()??null,o=this.pickDate?.getMonth()??null;for(let n=0;n<12;n++){let s=document.createElement(`div`);s.innerText=t[n],r===e&&i===n&&s.classList.add(`active`),a===e&&o===n&&s.classList.add(`select`),s.onclick=()=>{this.now=this._createDate(this.now.getFullYear(),n,this.now.getDate(),this.now),this.pickDate&&=this._createDate(this.pickDate.getFullYear(),n,this.pickDate.getDate(),this.pickDate),this.datePickerType===Q.MONTH?(this._submit(),this.dispose()):(this.viewMode=Q.DATE,this._update(),this._switchView())},this.dom.monthWrap.append(s)}}_switchView(){this.dom.yearWrap.classList.remove(`active`),this.dom.monthWrap.classList.remove(`active`),this.dom.timeWrap.classList.remove(`active`),this.dom.dateWrap.classList.remove(`year-mode`,`month-mode`),this.dom.datePickerWeek.style.display=`flex`,this.viewMode===Q.DATE?this.dom.dateWrap.classList.add(`active`):this.viewMode===Q.YEAR?(this.dom.dateWrap.classList.add(`active`,`year-mode`),this.dom.yearWrap.classList.add(`active`),this.dom.datePickerWeek.style.display=`none`):this.viewMode===Q.MONTH&&(this.dom.dateWrap.classList.add(`active`,`month-mode`),this.dom.monthWrap.classList.add(`active`),this.dom.datePickerWeek.style.display=`none`),this.datePickerType===Q.DATE&&this.viewMode===Q.DATE?this.dom.menu.time.style.display=`inline-block`:this.dom.menu.time.style.display=`none`}_toggleDateTimePicker(){this.isDatePicker?(this.dom.dateWrap.classList.add(`active`),this.dom.timeWrap.classList.remove(`active`),this.dom.menu.time.innerText=this.lang.timeSelect):(this.dom.dateWrap.classList.remove(`active`),this.dom.timeWrap.classList.add(`active`),this.dom.menu.time.innerText=this.lang.return,this._setTimePick())}_createDate(e,t,n,r){let i=new Date(e,t+1,0).getDate();return new Date(e,t,Math.min(n,i),r?.getHours()||0,r?.getMinutes()||0,r?.getSeconds()||0)}_setDatePick(e,t,n){this.now=new Date(e,t,n),this.pickDate&&=this._createDate(e,t,n,this.pickDate),this._update()}_setTimePick(e=!0){let t=this.pickDate?.getHours()||0,n=this.pickDate?.getMinutes()||0,r=this.pickDate?.getSeconds()||0,{hour:i,minute:a,second:o}=this.dom.time;[i,a,o].forEach(e=>{e.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`))}),[[i,t],[a,n],[o,r]].forEach(([t,n])=>{let r=t.querySelector(`[data-id='${n}']`);r.classList.add(`active`),e&&Ke(t,r)})}_preMonth(){this.now=this._createDate(this.now.getFullYear(),this.now.getMonth()-1,this.now.getDate(),this.now),this._update()}_nextMonth(){this.now=this._createDate(this.now.getFullYear(),this.now.getMonth()+1,this.now.getDate(),this.now),this._update()}_preYear(){this.now=this._createDate(this.now.getFullYear()-1,this.now.getMonth(),this.now.getDate(),this.now),this._update()}_nextYear(){this.now=this._createDate(this.now.getFullYear()+1,this.now.getMonth(),this.now.getDate(),this.now),this._update()}_preYearPage(){this.yearPageStart-=12,this._update()}_nextYearPage(){this.yearPageStart+=12,this._update()}_now(){this.pickDate=new Date,this.now=new Date,this.datePickerType===Q.YEAR&&(this.yearPageStart=this.now.getFullYear()-5),this.dispose()}_toggleVisible(e){e?this.dom.container.classList.add(`active`):this.dom.container.classList.remove(`active`)}_submit(){if(this.options.onSubmit&&this.pickDate){let e=this.renderOptions?.dateFormat,t=this.formatDate(this.pickDate,e);this.options.onSubmit(t)}}formatDate(e,t=`YYYY-MM-DD HH:mm:ss`){let n=t,r=e.getFullYear().toString(),i=(e.getMonth()+1).toString(),a=e.getDate().toString(),o=e.getHours(),s=o%12==0?12:o%12,c=e.getMinutes().toString(),l=e.getSeconds().toString(),u=e.getMilliseconds().toString(),d={"y+":r,"Y+":r,"M+":i,"d+":a,"D+":a,"h+":s.toString(),"H+":o.toString(),"m+":c,"s+":l,"S+":u};for(let e in d){let r=RegExp(`(`+e+`)`).exec(t),i=e;r&&(n=n.replace(r[1],r[1].length===1?d[i]:d[i].padStart(r[1].length,`0`)))}return n}render(e){this.renderOptions=e,this.lang=this._getLang(),this._setLangChange(),this._setValue(),this.datePickerType=this._getDatePickerType(e.dateFormat),this.datePickerType===Q.YEAR?(this.viewMode=Q.YEAR,this.yearPageStart=this.now.getFullYear()-5):this.viewMode=this.datePickerType===Q.MONTH?Q.MONTH:Q.DATE,this._update(),this._switchView(),this._setPosition(),this.isDatePicker=!0,this.datePickerType===Q.DATE&&this._toggleDateTimePicker(),this._toggleVisible(!0)}dispose(){this._toggleVisible(!1)}destroy(){this.dom.container.remove()}}})),kc,Ac=o((()=>{Kt(),G(),V(),Ha(),J(),gi(),Oc(),kc=class{draw;element;control;isPopup;datePicker;options;constructor(e,t){let n=t.getDraw();this.draw=n,this.options=n.getOptions(),this.element=e,this.control=t,this.isPopup=!1,this.datePicker=null}setElement(e){this.element=e}getElement(){return this.element}getIsPopup(){return this.isPopup}getValue(e={}){let t=e.elementList||this.control.getElementList(),n=this.control.getValueRange(e);if(!n)return[];let r=[],{startIndex:i,endIndex:a}=n;for(let e=i;e<=a;e++){let n=t[e];n.controlComponent===U.VALUE&&!Lr(n)&&r.push(n)}return r}setValue(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return-1;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);let{startIndex:a,endIndex:o}=i,s=this.control.getDraw();a===o?this.control.removePlaceholder(a,t):s.deleteElementList(r,a+1,o-a,{isIgnoreDeletedRule:n.isIgnoreDeletedRule});let c=r[a],l=c.type&&!Vt.includes(c.type)||c.controlComponent===U.PREFIX||c.controlComponent===U.PRE_TEXT?Fe(c,[`control`,`controlId`,...Rt]):Ie(c,[`type`]),u=i.startIndex+1;for(let t=0;t<e.length;t++){let n={...l,...e[t],controlComponent:U.VALUE};Zr(r,[n],a,{editorOptions:this.options}),s.getTraceParticle().markElementListInserted([n]),s.spliceElementList(r,u+t,0,[n])}return u+e.length-1}clearSelect(e={},t={}){let{isIgnoreDisabledRule:n=!1,isAddPlaceholder:r=!0}=t;if(!n&&this.control.getIsDisabledControl(e))return-1;let i=this.control.getValueRange(e);if(!i)return-1;let{startIndex:a,endIndex:o}=i;if(!~a||!~o)return-1;let s=e.elementList||this.control.getElementList(),c=this.control.getDraw(),l=a+1,u=this.control.removePlaceholderInRange(s,l,o-a);return c.deleteElementList(s,l,u,{isIgnoreDeletedRule:t.isIgnoreDeletedRule}),r&&this.control.addPlaceholder(a,e),a}setSelect(e,t={},n={}){if(!n.isIgnoreDisabledRule&&this.control.getIsDisabledControl(t))return;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange(),a=this.getValue(t)[0],o=a?Fe(a,Et):Fe(r[i.startIndex],Rt),s=this.clearSelect(t,{isAddPlaceholder:!1,isIgnoreDeletedRule:n.isIgnoreDeletedRule});if(!~s)return;let c=Ie(r[s],Et),l=s+1,u=this.control.getDraw();for(let t=0;t<e.length;t++){let n={...o,...c,type:B.TEXT,value:e[t],controlComponent:U.VALUE};Zr(r,[n],s,{editorOptions:this.options}),u.getTraceParticle().markElementListInserted([n]),u.spliceElementList(r,l+t,0,[n])}if(!t.range){let n=l+e.length-1;this.control.repaintControl({curIndex:n}),this.control.emitControlContentChange({context:t}),this.destroy()}}keydown(e){if(this.control.getIsDisabledControl())return null;let t=this.control.getElementList(),n=this.control.getRange();this.control.shrinkBoundary();let{startIndex:r,endIndex:i}=n,a=t[r],o=t[i],s=this.control.getDraw();if(e.key===Z.Backspace)return r===i?a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT||o.controlComponent===U.POSTFIX||o.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):(s.deleteElementList(t,r,1),this.getValue().length||this.control.addPlaceholder(r-1),r-1):(s.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r);if(e.key===Z.Delete){if(r!==i)return s.deleteElementList(t,r+1,i-r),this.getValue().length||this.control.addPlaceholder(r),r;{let e=t[i+1];return(a.controlComponent===U.PREFIX||a.controlComponent===U.PRE_TEXT)&&e.controlComponent===U.PLACEHOLDER||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT||a.controlComponent===U.PLACEHOLDER?this.control.removeControl(r):(s.deleteElementList(t,r+1,1),this.getValue().length||this.control.addPlaceholder(r),r)}}return i}cut(){if(this.control.getIsDisabledControl())return-1;this.control.shrinkBoundary();let{startIndex:e,endIndex:t}=this.control.getRange();if(e===t)return e;let n=this.control.getDraw(),r=this.control.getElementList();return n.deleteElementList(r,e+1,t-e),this.getValue().length||this.control.addPlaceholder(e),e}awake(){if(this.isPopup||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;let e=this.control.getPosition();if(!e)return;let t=this.draw.getElementList(),{startIndex:n}=this.control.getRange();if(t[n+1]?.controlId!==this.element.controlId)return;this.datePicker=new Dc(this.draw,{onSubmit:this._setDate.bind(this)});let r=this.getValue().map(e=>e.value).join(``)||``,i=this.element.control?.dateFormat;this.datePicker.render({value:r,position:e,dateFormat:i}),this.isPopup=!0}destroy(){this.isPopup&&=(this.datePicker?.destroy(),!1)}_setDate(e){e?this.setSelect(e):this.clearSelect(),this.destroy()}}})),jc,Mc=o((()=>{Qe(),z(),G(),jc=class{control;calculatorDom;onCalculate;currentExpression;constructor(e){this.control=e.control,this.onCalculate=e.onCalculate,this.calculatorDom=null,this.currentExpression=``}createPopup(){let e=this.control.getPosition();if(!e)return;let t=document.createElement(`div`);t.classList.add(`ce-calculator`),t.setAttribute(Ye,A.POPUP);let n=document.createElement(`div`);n.classList.add(`ce-calculator-display`),n.textContent=`0`;let r=document.createElement(`div`);r.classList.add(`ce-calculator-buttons`),[[{text:`C`,type:W.UTILITY},{text:`←`,type:W.UTILITY},{text:`%`,type:W.OPERATOR},{text:`/`,type:W.OPERATOR}],[{text:`7`,type:W.NUMBER},{text:`8`,type:W.NUMBER},{text:`9`,type:W.NUMBER},{text:`*`,type:W.OPERATOR}],[{text:`4`,type:W.NUMBER},{text:`5`,type:W.NUMBER},{text:`6`,type:W.NUMBER},{text:`-`,type:W.OPERATOR}],[{text:`1`,type:W.NUMBER},{text:`2`,type:W.NUMBER},{text:`3`,type:W.NUMBER},{text:`+`,type:W.OPERATOR}],[{text:`0`,type:W.NUMBER},{text:`.`,type:W.NUMBER},{text:`=`,type:W.EQUAL,span:2}]].forEach(e=>{e.forEach(e=>{let t=document.createElement(`button`);t.classList.add(`ce-calculator-button`),e.type===W.OPERATOR?t.classList.add(`operator`):e.type===W.EQUAL?t.classList.add(`equal`):e.type===W.UTILITY&&t.classList.add(`utility`),t.textContent=e.text,t.onclick=()=>{let t=e.text;if(t===`C`)this.currentExpression=``,n.textContent=`0`;else if(t===`←`)this.currentExpression=this.currentExpression.slice(0,-1),n.textContent=this.currentExpression||`0`;else if(t===`=`){let e=this.calculate(this.currentExpression);Number.isFinite(e)?(n.textContent=e.toString(),this.currentExpression=e.toString(),this.onCalculate(e)):(n.textContent=`Error`,this.currentExpression=``)}else this.currentExpression+=t,n.textContent=this.currentExpression},e.span&&(t.style.gridColumn=`span ${e.span}`),r.appendChild(t)})}),t.appendChild(n),t.appendChild(r);let{coordinate:{leftTop:[i,a]},lineHeight:o}=e,s=this.control.getPreY();t.style.left=`${i+this.control.getPreX()}px`,t.style.top=`${a+s+o}px`,this.control.getContainer().appendChild(t),this.calculatorDom=t}destroy(){this.calculatorDom&&=(this.calculatorDom.remove(),null)}calculate(e){if(!e.trim())return NaN;let t;try{t=Function(`return `+e)()}catch{return NaN}return typeof t==`number`?!Number.isFinite(t)||Number.isInteger(t)?t:parseFloat(t.toFixed(10)):NaN}}})),Nc,Pc=o((()=>{_e(),G(),V(),J(),gi(),Tc(),Mc(),Kt(),Nc=class extends wc{isPopup;calculator;constructor(e,t){super(e,t),this.isPopup=!1,this.calculator=null}getIsPopup(){return this.isPopup}setValue(e,t={},n={}){if(e.some(e=>!Jr(e)||he.test(e.value)))return-1;let r=t.elementList||this.control.getElementList(),i=t.range||this.control.getRange();this.control.shrinkBoundary(t);let a=K(e),{startIndex:o,endIndex:s}=i,c=r[o];if(this.control.getIsExistValueByElementListIndex(r,o)){let e=o;for(;e>0;){let t=r[e];if(t.controlId!==c.controlId||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;a.unshift(t),e--}let t=s+1;for(;t<r.length;){let e=r[t];if(e.controlId!==c.controlId||e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT)break;a.push(e),t++}}let l=Yr(a);return Number.isNaN(Number(l))||!Number.isFinite(Number(l))?-1:super.setValue(e,t,n)}_setCalculatedValue(e){let t=super.clearValue({},{isAddPlaceholder:!1,isIgnoreDeletedRule:!0});if(!~t)return;let n=this.control.getElementList(),r=this.control.getRange(),i=this.getValue()[0],a=i?Fe(i,Et):Fe(n[r.startIndex],Rt),o=Ie(n[t],Et),s=e.toString(),c=[];for(let e=0;e<s.length;e++){let t={...a,...o,type:B.TEXT,value:s[e],controlComponent:U.VALUE};c.push(t)}this.setValue(c,{range:{startIndex:t,endIndex:t}}),this.control.repaintControl({curIndex:t+c.length}),this.control.emitControlContentChange(),this.destroy()}awake(){let e=this.element.control?.numberExclusiveOptions?.calculatorDisabled===!1;if(this.isPopup||!e||this.control.getIsDisabledControl()||!this.control.getIsRangeWithinControl())return;let{startIndex:t}=this.control.getRange();this.control.getElementList()[t+1]?.controlId===this.element.controlId&&(this.calculator=new jc({control:this.control,onCalculate:e=>{this._setCalculatedValue(e)}}),this.calculator.createPopup(),this.isPopup=!0)}destroy(){this.isPopup&&=(this.calculator?.destroy(),this.calculator=null,!1)}}})),Fc,Ic=o((()=>{G(),z(),V(),x(),J(),gi(),Wa(),Ka(),yc(),xc(),Cc(),Tc(),Ac(),Pc(),ha(),Kt(),k(),D(),Fc=class{controlBorder;draw;range;listener;eventBus;controlSearch;options;controlOptions;activeControl;activeControlValue;preElement;constructor(e){this.controlBorder=new bc(e),this.draw=e,this.range=e.getRange(),this.listener=e.getListener(),this.eventBus=e.getEventBus(),this.controlSearch=new vc(this),this.options=e.getOptions(),this.controlOptions=this.options.control,this.activeControl=null,this.activeControlValue=[],this.preElement=null}setHighlightList(e){this.controlSearch.setHighlightList(e)}computeHighlightList(){this.controlSearch.computeHighlightList()}renderHighlightList(e,t){this.controlSearch.getHighlightMatchResult().length&&this.controlSearch.renderHighlightList(e,t)}getDraw(){return this.draw}filterAssistElement(e){let{filterEmptyControl:t}=this.options.modeRule[M.PRINT];return e.filter((n,r)=>{if(n.type===B.TABLE){let e=n.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];t.value=this.filterAssistElement(t.value)}}}if(!n.controlId)return!0;if(n.isControlMinWidthPlaceholder)return!1;if(n.control?.minWidth){if(n.controlComponent===U.PREFIX||n.controlComponent===U.POSTFIX)return n.value=``,!0}else{if(n.control?.preText&&n.controlComponent===U.PRE_TEXT){let t=!1,i=r+1;for(;i<e.length;){let r=e[i];if(n.controlId!==r.controlId)break;if(r.controlComponent===U.VALUE){t=!0;break}i++}return t}if(n.control?.postText&&n.controlComponent===U.POST_TEXT){let t=!1,i=r-1;for(;i>=0;){let r=e[i];if(n.controlId!==r.controlId)break;if(r.controlComponent===U.VALUE){t=!0;break}i--}return t}}return n.controlComponent!==U.PREFIX&&n.controlComponent!==U.POSTFIX&&(!t||n.controlComponent!==U.PLACEHOLDER)})}getIsRangeCanCaptureEvent(){if(!this.activeControl)return!1;let{startIndex:e,endIndex:t}=this.getRange();if(!~e&&!~t)return!1;let n=this.getElementList(),r=n[e];if(e===t&&r.controlComponent===U.POSTFIX)return!0;let i=n[t],a=pi(n,e),o=pi(n,t);return!!(a&&a===o&&i.controlComponent!==U.POSTFIX)}getIsRangeInPostfix(){if(!this.activeControl)return!1;let{startIndex:e,endIndex:t}=this.getRange();return e===t&&this.getElementList()[e].controlComponent===U.POSTFIX}getIsRangeWithinControl(){let{startIndex:e,endIndex:t}=this.getRange();if(!~e&&!~t)return!1;let n=this.getElementList(),r=n[t],i=pi(n,e),a=pi(n,t);return!!(i&&i===a&&r.controlComponent!==U.POSTFIX)}getIsElementListContainFullControl(e){if(!e.some(e=>e.controlId))return!1;let t=0,n=0;for(let r=0;r<e.length;r++){let i=e[r];i.controlComponent===U.PREFIX?t++:i.controlComponent===U.POSTFIX&&n++}return!t||!n?!1:t===n}getIsDisabledControl(e={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;let{startIndex:t,endIndex:n}=e.range||this.range.getRange();return t===n&&~t&&~n&&(e.elementList||this.getElementList())[t].controlComponent===U.POSTFIX?!1:!!this.activeControl.getElement()?.control?.disabled}getIsDisabledPasteControl(e={}){if(this.draw.isDesignMode()||!this.activeControl)return!1;let{startIndex:t,endIndex:n}=e.range||this.range.getRange();return t===n&&~t&&~n&&(e.elementList||this.getElementList())[t].controlComponent===U.POSTFIX?!1:!!this.activeControl.getElement()?.control?.pasteDisabled}getIsExistValueByElementListIndex(e,t){let n=e[t];if(!n.controlId)return!1;if(n.control?.type===H.CHECKBOX||n.control?.type===H.RADIO)return!!n.control?.code;if(n.controlComponent===U.VALUE)return!0;if(n.controlComponent===U.PLACEHOLDER)return!1;if(n.controlComponent===U.PREFIX||n.controlComponent===U.PRE_TEXT){let r=t;for(;r<e.length;){let t=fi(e,r,1,n.controlId);if(t<0||t>=e.length)return!1;let i=e[t];if(i.controlId!==n.controlId)return!1;if(i.controlComponent===U.VALUE)return!0;if(i.controlComponent===U.PLACEHOLDER)return!1;r=t}}if(n.controlComponent===U.POSTFIX||n.controlComponent===U.POST_TEXT){let r=t;for(;r>=0;){let t=fi(e,r,-1,n.controlId);if(t<0)return!1;let i=e[t];if(i.controlId!==n.controlId)return!1;if(i.controlComponent===U.VALUE)return!0;if(i.controlComponent===U.PLACEHOLDER)return!1;r=t}}return!1}getControlHighlight(e,t){return this.controlSearch.getControlHighlight(e,t)}getContainer(){return this.draw.getContainer()}getElementList(){return this.draw.getElementList()}getPosition(){let e=this.draw.getPosition().getPositionList(),{endIndex:t}=this.range.getRange();return e[t]||null}getPreY(){let e=this.getPosition()?.pageNo??this.draw.getPageNo();return this.draw.getPageOffset(e).y}getPreX(){let e=this.getPosition()?.pageNo??this.draw.getPageNo();return this.draw.getPageOffset(e).x}getRange(){return this.range.getRange()}getValueRange(e={}){let t=e.elementList||this.getElementList(),{startIndex:n}=e.range||this.getRange(),r=t[n],i=n;for(;i>0;){let e=fi(t,i,-1,r.controlId);if(e<0)break;let n=t[e];if(n.controlId!==r.controlId||n.controlComponent===U.PREFIX||n.controlComponent===U.PRE_TEXT){i=e;break}i=e}let a=n;for(;a<t.length;){let e=fi(t,a,1,r.controlId);if(e<0||e>=t.length)break;let n=t[e];if(n.controlId!==r.controlId||n.controlComponent===U.POSTFIX||n.controlComponent===U.POST_TEXT)break;a=e}return i===a?null:{startIndex:i,endIndex:a}}shrinkBoundary(e={}){this.range.shrinkBoundary(e)}getActiveControl(){return this.activeControl}getControlElementList(e={}){let t=e.elementList||this.getElementList(),{startIndex:n}=e.range||this.getRange(),r=t[n];if(!r?.controlId)return[];let i=[r],a=n;for(;a>0;){let e=fi(t,a,-1,r.controlId);if(e<0)break;let n=t[e];if(n.controlId!==r.controlId)break;i.unshift(n),a=e}let o=n;for(;o<t.length;){let e=fi(t,o,1,r.controlId);if(e<0||e>=t.length)break;let n=t[e];if(n.controlId!==r.controlId)break;i.push(n),o=e}return i}updateActiveControlValue(){this.activeControl&&(this.activeControlValue=this.getControlElementList())}emitControlChange(e){if(!this.activeControl)return;let t=this.eventBus.isSubscribe(`controlChange`);if(!this.listener.controlChange&&!t)return;let n,r=this.activeControlValue,i=this.activeControl.getElement();r?.length?n=X(r)[0].control:(n=Ur(K(i)).control,n.value=[]);let a={state:e,control:n,controlId:i.controlId};this.listener.controlChange?.(a),t&&this.eventBus.emit(`controlChange`,a)}initControl(){let e=this.getElementList()[this.getRange().startIndex];if(this.activeControl){(this.activeControl instanceof Sc||this.activeControl instanceof kc||this.activeControl instanceof Nc)&&(e.controlComponent===U.POSTFIX?this.activeControl.destroy():this.activeControl.awake()),this.preElement?.controlId===e.controlId&&(e.controlComponent===U.POSTFIX?this.emitControlChange(ae.INACTIVE):this.preElement?.controlComponent===U.POSTFIX&&this.emitControlChange(ae.ACTIVE));let t=this.activeControl.getElement();if(e.controlId===t.controlId){this.updateActiveControlValue(),this.preElement=e;return}}if(this.destroyControl(),this.draw.isReadonly())return;let t=e.control;if(t.type===H.TEXT)this.activeControl=new wc(e,this);else if(t.type===H.SELECT){let t=new Sc(e,this);this.activeControl=t,t.awake()}else if(t.type===H.CHECKBOX)this.activeControl=new Ua(e,this);else if(t.type===H.RADIO)this.activeControl=new Ga(e,this);else if(t.type===H.DATE){let t=new kc(e,this);this.activeControl=t,t.awake()}else if(t.type===H.NUMBER){let t=new Nc(e,this);this.activeControl=t,t.awake()}this.updateActiveControlValue(),this.preElement=e,e.controlComponent!==U.POSTFIX&&this.emitControlChange(ae.ACTIVE)}destroyControl(e={}){if(!this.activeControl)return;let{isEmitEvent:t=!0}=e;(this.activeControl instanceof Sc||this.activeControl instanceof kc||this.activeControl instanceof Nc)&&this.activeControl.destroy(),t&&this.preElement?.controlComponent!==U.POSTFIX&&this.emitControlChange(ae.INACTIVE),this.preElement=null,this.activeControl=null,this.activeControlValue=[]}repaintControl(e={}){let{curIndex:t,isCompute:n=!0,isSubmitHistory:r=!0,isSetCursor:i=!0}=e;t===void 0?(this.range.clearRange(),this.draw.render({isCompute:n,isSubmitHistory:r,isSetCursor:!1})):(this.range.setRange(t,t),this.draw.render({curIndex:t,isCompute:n,isSetCursor:i,isSubmitHistory:r}))}emitControlContentChange(e){let t=this.eventBus.isSubscribe(`controlContentChange`);if(!t&&!this.listener.controlContentChange)return;let n=e?.controlElement||this.activeControl?.getElement();if(!n)return;let r=e?.context?.elementList||this.getElementList(),{startIndex:i}=e?.context?.range||this.getRange();if(!r[i]?.controlId)return;let a=e?.controlValue||this.getControlElementList(e?.context),o;if(a?.length?o=X(a)[0].control:(o=n.control,o.value=[]),!o)return;let s={control:o,controlId:n.controlId};this.listener.controlContentChange?.(s),t&&this.eventBus.emit(`controlContentChange`,s)}reAwakeControl(){if(!this.activeControl)return;let e=this.getElementList()[this.getRange().startIndex];this.activeControl.setElement(e),(this.activeControl instanceof kc||this.activeControl instanceof Sc||this.activeControl instanceof Nc)&&this.activeControl.getIsPopup()&&(this.activeControl.destroy(),this.activeControl.awake())}selectValue(){let e=this.getElementList(),{startIndex:t}=this.getRange(),n=e[t];if(!n?.controlId||n.controlComponent!==U.VALUE&&e[t+1]?.controlComponent===U.VALUE)return!1;let r=t;for(;r>0&&e[r].controlComponent===U.VALUE;)r--;let i=t+1;for(;i<e.length;){if(e[i].controlComponent!==U.VALUE){i--;break}i++}if(r!==i){let e=this.range.getRange();return this.range.replaceRange({...e,startIndex:r,endIndex:i}),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),!0}return!1}moveCursor(e){let{index:t,trIndex:n,tdIndex:r,tdValueIndex:i}=e,a=this.draw.getOriginalElementList(),o,s=e.isTable?i:t;e.isTable?(a=a[t].trList[n].tdList[r].value,o=a[i]):o=a[t];let c=this.draw.getTraceParticle();if(!this.draw.isDesignMode()&&(o.hide||o.control?.hide||o.area?.hide||c.isTraceHidden(o))){let e=di(a,s,_.BEFORE,e=>c.isTraceHidden(e));return{newIndex:e,newElement:a[e]}}if(o.controlComponent===U.VALUE)return{newIndex:s,newElement:o};if(o.controlComponent===U.POSTFIX){let e=s+1;for(;e<a.length;){if(a[e].controlId!==o.controlId)return{newIndex:e-1,newElement:a[e-1]};if(e===a.length-1)return{newIndex:e,newElement:a[e]};e++}}else if(o.controlComponent===U.PREFIX||o.controlComponent===U.PRE_TEXT){let e=s+1;for(;e<a.length;){let t=a[e];if(t.controlId!==o.controlId||t.controlComponent!==U.PREFIX&&t.controlComponent!==U.PRE_TEXT)return{newIndex:e-1,newElement:a[e-1]};e++}}else if(o.controlComponent===U.PLACEHOLDER||o.controlComponent===U.POST_TEXT){let e=s-1;for(;e>0;){let t=a[e];if(t.controlId!==o.controlId||t.controlComponent===U.VALUE||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)return{newIndex:e,newElement:a[e]};e--}}return{newIndex:s,newElement:o}}getControlStartIndex(e,t,n){let r=t;for(;r>0&&e[r-1]?.controlId===n&&(e[r-1]?.controlComponent===U.PREFIX||e[r-1]?.controlComponent===U.PRE_TEXT);)r--;return r}getControlEndIndex(e,t,n){let r=t;for(;r<e.length-1&&e[r+1]?.controlId===n&&(e[r+1]?.controlComponent===U.POST_TEXT||e[r+1]?.controlComponent===U.POSTFIX);)r++;return r}removeControl(e,t={}){let n=t.elementList||this.getElementList(),r=n[e];if(!this.draw.isDesignMode()&&!r?.hide&&!r?.control?.hide&&!r?.area?.hide){let{deletable:t=!0}=r.control;if(!t)return null;let i=this.draw.getMode();if(i===M.FORM&&this.options.modeRule[i].controlDeletableDisabled)return null;let a=r.controlId,o=e;for(;o<n.length;){let e=n[o];if(e.controlId===a&&e.controlComponent===U.POSTFIX)break;if(e.controlId!==a&&e.controlComponent===U.PREFIX&&e.control?.deletable===!1)return null;o++}}let i=-1,a=-1,o=e;if(r.controlComponent===U.PREFIX||r.controlComponent===U.PRE_TEXT)i=this.getControlStartIndex(n,o,r.controlId)-1;else for(;o>0;){let e=fi(n,o,-1,r.controlId);if(e<0)break;let t=n[e];if(t.controlId!==r.controlId){i=e;break}if(t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT){i=this.getControlStartIndex(n,e,r.controlId)-1;break}o=e}let s=e;if(r.controlComponent===U.POSTFIX||r.controlComponent===U.POST_TEXT)a=this.getControlEndIndex(n,s,r.controlId);else for(;s<n.length;){let e=n[s];if(e.controlComponent===U.POSTFIX||e.controlComponent===U.POST_TEXT){a=this.getControlEndIndex(n,s,r.controlId);break}let t=fi(n,s,1,r.controlId);if(t>=n.length){a=t-1;break}s=t}return s>=n.length&&(a=n.length-1),!~i&&!~a?e:(i=~i?i:0,this.draw.deleteElementList(n,i+1,a-i),i)}removePlaceholder(e,t={}){let n=t.elementList||this.getElementList(),r=n[e],i=n[e+1];if(r.controlComponent===U.PLACEHOLDER||i.controlComponent===U.PLACEHOLDER){let t=!1,i=e;for(;i<n.length;){let a=n[i];if(a.controlId!==r.controlId)break;a.controlComponent===U.PLACEHOLDER?(t||(t=!0,this.draw.getHistoryManager().popUndo(),this.draw.submitHistory(e)),n.splice(i,1)):i++}}}removePlaceholderInRange(e,t,n){for(let r=t+n-1;r>=t;r--)e[r]?.controlComponent===U.PLACEHOLDER&&(e.splice(r,1),n--);return n}addPlaceholder(e,t={}){let n=t.elementList||this.getElementList(),r=n[e],i=r.control;if(!i.placeholder)return;let a=Se(i.placeholder),o=Fe(r,Rt);for(let t=0;t<a.length;t++){let i=a[t],s={...o,value:i===`
|
|
71
|
+
`?``:i,controlId:r.controlId,type:B.CONTROL,control:r.control,controlComponent:U.PLACEHOLDER,color:this.controlOptions.placeholderColor};Zr(n,[s],e,{editorOptions:this.options}),this.draw.spliceElementList(n,e+t+1,0,[s])}}setValue(e){if(!this.activeControl)throw Error(`active control is null`);return this.activeControl.setValue(e)}setControlProperties(e,t={}){let n=t.elementList||this.getElementList(),{startIndex:r}=t.range||this.getRange(),i=n[r];i.control={...i.control,...e};let a=r;for(;a>0;){let t=fi(n,a,-1,i.controlId);if(t<0)break;let r=n[t];if(r.controlId!==i.controlId)break;r.control={...r.control,...e},a=t}let o=r;for(;o<n.length;){let t=fi(n,o,1,i.controlId);if(t<0||t>=n.length)break;let r=n[t];if(r.controlId!==i.controlId)break;r.control={...r.control,...e},o=t}}keydown(e){if(!this.activeControl)throw Error(`active control is null`);return this.activeControl.keydown(e)}cut(){if(!this.activeControl)throw Error(`active control is null`);return this.activeControl.cut()}getValueById(e){let{id:t,groupId:n,conceptId:r,areaId:i}=e,a=[];if(!t&&!r&&!n)return a;let o=(e,s)=>{let c=0;for(;c<e.length;){let l=e[c];if(c++,l.type===B.TABLE){let e=l.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];o(t.value,s)}}}if(!l.control||n&&l.control.groupId!==n||t&&l.controlId!==t||r&&l.control.conceptId!==r||i&&l.areaId!==i)continue;let{type:u,code:d,valueSets:f}=l.control,p=c,m=``,h=[],g=!Lr(l);for(;p<e.length;){let t=e[p];if(t.controlId!==l.controlId)break;let n=Lr(t);n||(g=!0),n||u!==H.TEXT&&u!==H.DATE&&u!==H.NUMBER||t.controlComponent!==U.VALUE||(m+=t.value,h.push(Ie(t,Lt))),p++}if(!g)c=p;else{if(u===H.TEXT||u===H.DATE||u===H.NUMBER)a.push({...l.control,zone:s,value:m||null,innerText:m||null,elementList:X(h)});else if(u===H.SELECT||u===H.CHECKBOX||u===H.RADIO){let e=d?.split(`,`).map(e=>f?.find(t=>t.code===e)?.value).filter(Boolean).join(``);a.push({...l.control,zone:s,value:d||null,innerText:e||null})}c=p}}},s=[{zone:N.HEADER,elementList:this.draw.getHeaderElementList()},{zone:N.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:N.FOOTER,elementList:this.draw.getFooterElementList()}];for(let{zone:e,elementList:t}of s)o(t,e);return a}setValueListById(e){if(!e.length)return;let t=!1,n=!1,r=i=>{let a=0;for(;a<i.length;){let o=i[a];if(a++,o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];r(t.value)}}}if(!o.control)continue;let s=e.find(e=>(!e.groupId||e.groupId===o.control?.groupId)&&(e.id&&o.controlId===e.id||e.conceptId&&o.control.conceptId===e.conceptId||e.areaId&&o.areaId===e.areaId));if(!s)continue;let{value:c,isSubmitHistory:l=!0,isOverwrite:u=!0}=s,{type:d}=o.control,f=a;for(;f<i.length&&i[f].controlId===o.controlId;)f++;let p=a-1;if(!u){let e=!1;if(d===H.SELECT||d===H.CHECKBOX||d===H.RADIO)e=!!o.control.code;else for(let t=p;t<f;t++){let n=i[t];if(n.controlComponent===U.VALUE&&!Lr(n)&&n.value){e=!0;break}}if(e){a=f;continue}}t=!0,l&&(n=!0);let m=-1,h=-1;for(let e=p;e<f;e++){let t=i[e].controlComponent;(t===U.VALUE||t===U.PLACEHOLDER)&&(m===-1&&(m=e),h=e)}let g={range:m===-1?{startIndex:p,endIndex:p}:{startIndex:m-1,endIndex:h},elementList:i},_={isIgnoreDisabledRule:!0,isIgnoreDeletedRule:!0};if(d===H.TEXT){let e=Array.isArray(c)?c:c?[{value:c}]:[];e.length&&Vr(e,{isHandleFirstElement:!1,editorOptions:this.options});let t=new wc(o,this);this.activeControl=t,e.length?t.setValue(e,g,_):t.clearValue(g,_)}else if(d===H.SELECT){if(Array.isArray(c))continue;let e=new Sc(o,this);this.activeControl=e,c?e.setSelect(c,g,_):e.clearSelect(g,_)}else if(d===H.CHECKBOX){if(Array.isArray(c))continue;let e=new Ua(o,this);this.activeControl=e;let t=c?c.split(`,`):[];e.setSelect(t,g,_)}else if(d===H.RADIO){if(Array.isArray(c))continue;let e=new Ga(o,this);this.activeControl=e;let t=c?[c]:[];e.setSelect(t,g,_)}else if(d===H.DATE){let e=new kc(o,this);this.activeControl=e,De(c)?(c.length&&Vr(c,{isHandleFirstElement:!1,editorOptions:this.options}),e.setValue(c,g,_)):ke(c)?e.setSelect(c,g,_):e.clearSelect(g,_)}else if(d===H.NUMBER){let e=Array.isArray(c)?c:c?[{value:c}]:[];e.length&&Vr(e,{isHandleFirstElement:!1,editorOptions:this.options});let t=new Nc(o,this);this.activeControl=t,e.length?t.setValue(e,g,_):t.clearValue(g,_)}this.emitControlContentChange({context:g}),this.activeControl=null;let v=a;for(;v<i.length&&i[v].controlId===o.controlId;)v++;a=v}};this.destroyControl({isEmitEvent:!1});let i=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(let e of i)r(e);t&&(n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1}))}setExtensionListById(e){if(!e.length)return;let t=n=>{let r=0;for(;r<n.length;){let i=n[r];if(r++,i.type===B.TABLE){let e=i.trList;for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.tdList.length;e++){let n=r.tdList[e];t(n.value)}}}if(!i.control)continue;let a=e.find(e=>(!e.groupId||e.groupId===i.control?.groupId)&&(e.id&&i.controlId===e.id||e.conceptId&&i.control.conceptId===e.conceptId||e.areaId&&i.areaId===e.areaId));if(!a)continue;let{extension:o}=a;this.setControlProperties({extension:o},{elementList:n,range:{startIndex:r,endIndex:r}});let s=r;for(;s<n.length&&n[s].controlId===i.controlId;)s++;r=s}},n=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(let e of n)t(e)}setPropertiesListById(e){if(!e.length)return;let t=!1,n=!1,r=i=>{let a=0;for(;a<i.length;){let o=i[a];if(a++,o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];r(t.value)}}}if(!o.control)continue;let s=e.find(e=>(!e.groupId||e.groupId===o.control?.groupId)&&(e.id&&o.controlId===e.id||e.conceptId&&o.control.conceptId===e.conceptId||e.areaId&&o.areaId===e.areaId));if(!s)continue;let{properties:c,isSubmitHistory:l=!0}=s;t=!0,l&&(n=!0),this.setControlProperties({...o.control,...c,value:o.control.value},{elementList:i,range:{startIndex:a,endIndex:a}}),Rt.forEach(e=>{let t=c[e];t&&Reflect.set(o,e,t)});let u=a;for(;u<i.length&&i[u].controlId===o.controlId;)u++;a=u}},i={header:this.draw.getHeaderElementList(),main:this.draw.getOriginalMainElementList(),footer:this.draw.getFooterElementList()};for(let e in i){let t=i[e];r(t)}if(t){for(let e in i){let t=e,n=X(i[t],{isClassifyArea:!0,extraPickAttrs:[`id`]});i[t]=n,Vr(n,{editorOptions:this.options,isForceCompensation:!0})}this.draw.setEditorData(i),n||this.draw.getHistoryManager().recovery(),this.draw.render({isSubmitHistory:n,isSetCursor:!1})}}getList(){let e=[];function t(n){for(let r=0;r<n.length;r++){let i=n[r];if(i.type===B.TABLE){let e=i.trList;for(let n=0;n<e.length;n++){let r=e[n];for(let e=0;e<r.tdList.length;e++){let n=r.tdList[e].value;t(n)}}}if(i.controlId&&!Lr(i)){let t=Ie(i,[...Ft,...It]);e.push(t)}}}let n=[this.draw.getHeader().getElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooter().getElementList()];for(let e of n)t(e);return X(e,{extraPickAttrs:[`controlId`]})}recordBorderInfo(e,t,n,r){this.controlBorder.recordBorderInfo(e,t,n,r)}drawBorder(e){this.controlBorder.render(e)}getPreControlContext(){if(!this.activeControl)return null;let e=this.draw.getPosition().getPositionContext();if(!e)return null;let t=this.activeControl.getElement();function n(e,r){for(let i=r;i>0;i--){let r=e[i];if(r.type===B.TABLE){let e=r.trList||[];for(let t=e.length-1;t>=0;t--){let a=e[t],o=a.tdList;for(let e=o.length-1;e>=0;e--){let s=o[e],c=n(s.value,s.value.length-1);if(c)return{positionContext:{isTable:!0,index:i,trIndex:t,tdIndex:e,tdId:s.id,trId:a.id,tableId:r.id},nextIndex:c.nextIndex}}}}if(!r.controlId||r.controlId===t.controlId)continue;let a=i;for(;a>0;){let t=e[a];if(t.controlComponent===U.VALUE||t.controlComponent===U.PREFIX||t.controlComponent===U.PRE_TEXT)break;a--}return{positionContext:{isTable:!1},nextIndex:a}}return null}let{startIndex:r}=this.range.getRange(),i=n(this.getElementList(),r);if(i)return{positionContext:e.isTable?e:i.positionContext,nextIndex:i.nextIndex};if(t.tableId){let r=this.draw.getOriginalElementList(),{index:i,trIndex:a,tdIndex:o}=e,s=r[i].trList;for(let r=a;r>=0;r--){let i=s[r],c=i.tdList;for(let s=c.length-1;s>=0;s--){if(a===r&&s>=o)continue;let l=c[s],u=n(l.value,l.value.length-1);if(u)return{positionContext:{isTable:!0,index:e.index,trIndex:r,tdIndex:s,tdId:l.id,trId:i.id,tableId:t.tableId},nextIndex:u.nextIndex}}}let c=n(r,i-1);if(c)return{positionContext:{isTable:!1},nextIndex:c.nextIndex}}return null}getNextControlContext(){if(!this.activeControl)return null;let e=this.draw.getPosition().getPositionContext();if(!e)return null;let t=this.activeControl.getElement();function n(e,r){for(let i=r;i<e.length;i++){let r=e[i];if(r.type===B.TABLE){let e=r.trList||[];for(let t=0;t<e.length;t++){let a=e[t],o=a.tdList;for(let e=0;e<o.length;e++){let s=o[e],c=n(s.value,0);if(c)return{positionContext:{isTable:!0,index:i,trIndex:t,tdIndex:e,tdId:s.id,trId:a.id,tableId:r.id},nextIndex:c.nextIndex}}}}if(r.controlId&&r.controlId!==t.controlId&&e[i+1]?.controlComponent!==U.PREFIX&&e[i+1]?.controlComponent!==U.PRE_TEXT)return{positionContext:{isTable:!1},nextIndex:i}}return null}let{endIndex:r}=this.range.getRange(),i=n(this.getElementList(),r);if(i)return{positionContext:e.isTable?e:i.positionContext,nextIndex:i.nextIndex};if(t.tableId){let r=this.draw.getOriginalElementList(),{index:i,trIndex:a,tdIndex:o}=e,s=r[i].trList;for(let r=a;r<s.length;r++){let i=s[r],c=i.tdList;for(let s=0;s<c.length;s++){if(a===r&&s<=o)continue;let l=c[s],u=n(l.value,0);if(u)return{positionContext:{isTable:!0,index:e.index,trIndex:r,tdIndex:s,tdId:l.id,trId:i.id,tableId:t.tableId},nextIndex:u.nextIndex}}}let c=n(r,i+1);if(c)return{positionContext:{isTable:!1},nextIndex:c.nextIndex}}return null}initNextControl(e={}){let{direction:t=ma.DOWN}=e,n=null;if(n=t===ma.UP?this.getPreControlContext():this.getNextControlContext(),!n)return;let{nextIndex:r,positionContext:i}=n;this.draw.getPosition().setPositionContext(i),this.draw.getRange().replaceRange({startIndex:r,endIndex:r}),this.draw.render({curIndex:r,isCompute:!1,isSetCursor:!0,isSubmitHistory:!1})}setMinWidthControlInfo(e){let{row:t,rowElement:n,controlRealWidth:r,availableWidth:i}=e;if(!n.control?.minWidth)return;let{scale:a}=this.options,o=n.control.minWidth*a,s=null;if(n.control?.minWidth&&(n.control?.rowFlex===O.CENTER||n.control?.rowFlex===O.RIGHT)){let e=n.metrics.width,r=t.elementList.length-1;for(;r>=0;){let n=t.elementList[r];if(e+=n.metrics.width,t.elementList[r-1]?.controlComponent===U.PREFIX){s=n;break}r--}s&&e<o&&(n.control.rowFlex===O.CENTER?s.left=(o-e)/2:n.control.rowFlex===O.RIGHT&&(s.left=o-e-n.metrics.width))}let c=o-r;if(c>0){let e=s?.left||0,r=i-t.width-n.metrics.width,a=Math.min(r,c);n.left=a-e,t.width+=a-e}}}}));function Lc(e){let t=[],n=0,r=()=>{let e=t[t.length-1];return!e||e.type===`OP`||e.type===`LPAREN`||e.type===`LBRACKET`||e.type===`COMMA`};for(;n<e.length;){let i=e[n];if(i===` `||i===` `||i===`
|
|
72
|
+
`||i===`\r`){n++;continue}let a=Vc[i];if(a){t.push({type:a,value:i}),n++;continue}if(i===`'`||i===`"`){let r=n+1,a=``;for(;r<e.length&&e[r]!==i;)e[r]===`\\`&&r+1<e.length?(a+=e[r+1],r+=2):(a+=e[r],r++);if(r>=e.length)throw Error(`表达式字符串未闭合: ${e}`);t.push({type:`STRING`,value:a}),n=r+1;continue}let o=i===`-`&&/\d/.test(e[n+1]||``)&&r();if(/\d/.test(i)||o){let r=o?n+1:n;for(;r<e.length&&/[\d.]/.test(e[r]);)r++;t.push({type:`NUMBER`,value:e.slice(n,r)}),n=r;continue}if(i===`-`){t.push({type:`OP`,value:i}),n++;continue}if(i===`@`){let r=n+1;for(;r<e.length&&Uc.test(e[r]);)r++;let i=e.slice(n+1,r);if(i!==`self`)throw Error(`表达式未知保留字 "@${i}",当前仅支持 @self`);t.push({type:`SELF`,value:i}),n=r;continue}let s=e.slice(n,n+2);if(zc.includes(s))t.push({type:`OP`,value:s}),n+=2;else if(Bc.includes(i))t.push({type:`OP`,value:i}),n++;else{if(i===`=`||i===`&`||i===`|`)throw Error(`表达式非法运算符 "${i}",请使用 == / && / ||`);if(Hc.test(i)){let r=n;for(;r<e.length&&Uc.test(e[r]);)r++;let i=e.slice(n,r);i===`true`||i===`false`?t.push({type:`BOOLEAN`,value:i}):i===`null`?t.push({type:`NULL`,value:i}):t.push({type:`IDENT`,value:i}),n=r}else throw Error(`表达式无法识别的字符 "${i}"`)}}return t}var Rc,zc,Bc,Vc,Hc,Uc,Wc=o((()=>{Rc=function(e){return e.IDENT=`IDENT`,e.STRING=`STRING`,e.NUMBER=`NUMBER`,e.BOOLEAN=`BOOLEAN`,e.NULL=`NULL`,e.SELF=`SELF`,e.OP=`OP`,e.LPAREN=`LPAREN`,e.RPAREN=`RPAREN`,e.LBRACKET=`LBRACKET`,e.RBRACKET=`RBRACKET`,e.COMMA=`COMMA`,e}({}),zc=[`==`,`!=`,`>=`,`<=`,`&&`,`||`],Bc=[`>`,`<`,`!`,`+`,`*`,`/`,`%`],Vc={"(":`LPAREN`,")":`RPAREN`,"[":`LBRACKET`,"]":`RBRACKET`,",":`COMMA`},Hc=/[A-Za-z_$\u4e00-\u9fa5]/,Uc=/[A-Za-z0-9_$\u4e00-\u9fa5]/}));function Gc(e){let t=0,n=()=>e[t],r=()=>e[t++],i=(e,t)=>{let n=r();if(!n||n.type!==e||t&&n.value!==t)throw Error(`表达式语法错误:期望 ${t||e}`);return n},a=()=>o(),o=()=>{let e=s();for(;n()?.type===Rc.OP&&n().value===`||`;)r(),e={type:`logical`,op:`||`,left:e,right:s()};return e},s=()=>{let e=c();for(;n()?.type===Rc.OP&&n().value===`&&`;)r(),e={type:`logical`,op:`&&`,left:e,right:c()};return e},c=()=>n()?.type===Rc.OP&&n().value===`!`?(r(),{type:`not`,argument:c()}):l(),l=()=>{let e=u(),t=n();return t?.type===Rc.OP&&Kc.includes(t.value)||t?.type===Rc.IDENT&&t.value===`in`?(r(),{type:`compare`,op:t.value,left:e,right:u()}):e},u=()=>{let e=d();for(;n()?.type===Rc.OP&&qc.includes(n().value);)e={type:`arithmetic`,op:r().value,left:e,right:d()};return e},d=()=>{let e=f();for(;n()?.type===Rc.OP&&Jc.includes(n().value);)e={type:`arithmetic`,op:r().value,left:e,right:f()};return e},f=()=>{let e=n();if(!e)throw Error(`表达式意外结束`);if(e.type===Rc.SELF)throw Error(`@self 仅可作为 getValue(@self) 的参数使用`);if(e.type===Rc.STRING)return r(),{type:`literal`,value:e.value};if(e.type===Rc.NUMBER)return r(),{type:`literal`,value:Number(e.value)};if(e.type===Rc.BOOLEAN)return r(),{type:`literal`,value:e.value===`true`};if(e.type===Rc.NULL)return r(),{type:`literal`,value:null};if(e.type===Rc.LBRACKET){r();let e=[];if(n()?.type!==Rc.RBRACKET)do e.push(f());while(n()?.type===Rc.COMMA&&(r(),1));return i(Rc.RBRACKET),{type:`literal`,value:e}}if(e.type===Rc.LPAREN){r();let e=a();return i(Rc.RPAREN),e}if(e.type===Rc.IDENT){if(r(),n()?.type===Rc.LPAREN){if(r(),e.value===`getValue`){let e=r();if(!e)throw Error(`getValue 缺少参数`);let t;if(e.type===Rc.STRING)t={kind:`id`,value:e.value};else if(e.type===Rc.SELF)t={kind:`self`};else throw Error(`getValue 参数必须是控件 id 字符串或 @self`);return i(Rc.RPAREN),{type:`getValue`,target:t}}let t=[];if(n()?.type!==Rc.RPAREN)do t.push(a());while(n()?.type===Rc.COMMA&&(r(),1));return i(Rc.RPAREN),{type:`call`,name:e.value,args:t}}throw Error(`标识符 "${e.value}" 不能直接引用,请使用 getValue('${e.value}') 获取控件值`)}throw Error(`表达式语法错误:意外的 "${e.value}"`)},p=a();if(t<e.length)throw Error(`表达式存在多余内容: "${e[t].value}"`);return p}var Kc,qc,Jc,Yc=o((()=>{Wc(),Kc=[`==`,`!=`,`>`,`>=`,`<`,`<=`],qc=[`+`,`-`],Jc=[`*`,`/`,`%`]}));function Xc(e){return e.codes?e.codes.length===0:e.code===void 0?!e.text||!e.text.trim():!e.code}function Zc(e){return e.kind===`resolved`?!Xc(e.value):!!e.value}function Qc(e){if(e.kind===`plain`){let t=e.value;return t==null?null:typeof t==`number`||typeof t==`string`?t:typeof t==`boolean`?t?`true`:`false`:String(t)}let t=e.value;return t.codes?t.codes.join(`,`):t.code===void 0?t.text??null:t.code}function $c(e){if(e===null)return null;if(e===`today`){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}if(typeof e==`string`&&sl.test(e)){let t=new Date(e).getTime();return Number.isNaN(t)?null:t}return null}function el(e,t,n){if(e===`in`){let e=n.kind===`plain`?n.value:null;if(!Array.isArray(e))return!1;if(t.kind===`resolved`&&t.value.codes)return t.value.codes.some(t=>e.some(e=>String(e)===t));let r=Qc(t);return e.some(e=>String(e)===String(r))}let r=Qc(t),i=Qc(n);if(e===`==`)return String(r)===String(i);if(e===`!=`)return String(r)!==String(i);if(r===null||i===null)return!1;if(t.kind===`resolved`&&t.value.isDate||i===`today`||typeof i==`string`&&sl.test(i)){let t=$c(r),n=typeof i==`number`&&Number.isFinite(i)?i:$c(i);return t===null||n===null?!1:tl(e,t,n)}let a=Number(r),o=Number(i),s=String(r).trim()!==``&&Number.isFinite(a),c=String(i).trim()!==``&&Number.isFinite(o);if(s&&c)return tl(e,a,o);if(s||c)return!1;let l=String(r),u=String(i);switch(e){case`>`:return l>u;case`>=`:return l>=u;case`<`:return l<u;case`<=`:return l<=u;default:return!1}}function tl(e,t,n){switch(e){case`>`:return t>n;case`>=`:return t>=n;case`<`:return t<n;case`<=`:return t<=n;default:return!1}}function nl(e,t,n){if(t===null||n===null)return null;if(e===`+`){let e=String(t),r=String(n),i=Number(t),a=Number(n);return e.trim()!==``&&r.trim()!==``&&Number.isFinite(i)&&Number.isFinite(a)?i+a:e+r}let r=Number(t),i=Number(n);if(!Number.isFinite(r)||!Number.isFinite(i))return null;switch(e){case`-`:return r-i;case`*`:return r*i;case`/`:return i===0?null:r/i;case`%`:return i===0?null:r%i;default:return null}}function rl(e,t){let n=e=>{let n=t[e];if(n?.kind===`resolved`)return n.value;let r=n?Qc(n):null;return{text:r===null?null:String(r)}};switch(e){case`empty`:return{kind:`plain`,value:Xc(n(0))};case`notEmpty`:return{kind:`plain`,value:!Xc(n(0))};case`len`:return{kind:`plain`,value:(n(0).text??``).length};case`count`:return{kind:`plain`,value:n(0).codes?.length??0};case`contains`:{let e=n(0),r=Qc(t[1]);return r===null?{kind:`plain`,value:!1}:e.codes?{kind:`plain`,value:e.codes.includes(String(r))}:{kind:`plain`,value:(e.text??``).includes(String(r))}}case`round`:{let e=Qc(t[0]);if(e===null)return{kind:`plain`,value:null};let n=Number(e);if(!Number.isFinite(n))return{kind:`plain`,value:null};let r=t[1]?Number(Qc(t[1])):0,i=10**(Number.isFinite(r)?r:0);return{kind:`plain`,value:Math.round(n*i)/i}}case`floor`:case`ceil`:case`abs`:{let n=Qc(t[0]);if(n===null)return{kind:`plain`,value:null};let r=Number(n);return Number.isFinite(r)?{kind:`plain`,value:e===`floor`?Math.floor(r):e===`ceil`?Math.ceil(r):Math.abs(r)}:{kind:`plain`,value:null}}case`min`:case`max`:{let n=t.map(e=>Number(Qc(e))).filter(e=>Number.isFinite(e));return n.length?{kind:`plain`,value:e===`min`?Math.min(...n):Math.max(...n)}:{kind:`plain`,value:null}}case`power`:{let e=Qc(t[0]),n=t[1]?Qc(t[1]):null;if(e===null||n===null)return{kind:`plain`,value:null};let r=Number(e),i=Number(n);return!Number.isFinite(r)||!Number.isFinite(i)?{kind:`plain`,value:null}:{kind:`plain`,value:r**+i}}case`sqrt`:{let e=Qc(t[0]);if(e===null)return{kind:`plain`,value:null};let n=Number(e);return!Number.isFinite(n)||n<0?{kind:`plain`,value:null}:{kind:`plain`,value:Math.sqrt(n)}}case`now`:return{kind:`plain`,value:Date.now()};case`datediff`:{let e=$c(Qc(t[0])),n=$c(Qc(t[1]));if(e===null||n===null)return{kind:`plain`,value:null};let r=t[2]?String(Qc(t[2])):`d`,i=r===`h`?36e5:r===`m`?6e4:r===`s`?1e3:864e5;return{kind:`plain`,value:(e-n)/i}}default:throw Error(`未知函数: ${e}`)}}function il(e,t){switch(e.type){case`literal`:return Array.isArray(e.value)?{kind:`plain`,value:e.value.map(e=>Qc(il(e,t)))}:{kind:`plain`,value:e.value};case`getValue`:return{kind:`resolved`,value:(e.target.kind===`self`?t.resolveSelf?.():t.resolve(e.target.value))??{text:null}};case`logical`:return e.op===`&&`?{kind:`plain`,value:Zc(il(e.left,t))&&Zc(il(e.right,t))}:{kind:`plain`,value:Zc(il(e.left,t))||Zc(il(e.right,t))};case`not`:return{kind:`plain`,value:!Zc(il(e.argument,t))};case`compare`:return{kind:`plain`,value:el(e.op,il(e.left,t),il(e.right,t))};case`arithmetic`:return{kind:`plain`,value:nl(e.op,Qc(il(e.left,t)),Qc(il(e.right,t)))};case`call`:if(e.name===`if`){let n=e.args[0],r=n?Zc(il(n,t)):!1,i=e.args[r?1:2];return i?il(i,t):{kind:`plain`,value:null}}return rl(e.name,e.args.map(e=>il(e,t)))}}function al(e,t){return Zc(il(e,t))}function ol(e,t){return Qc(il(e,t))}var sl,cl=o((()=>{sl=/^\d{4}-\d{2}-\d{2}/}));function ll(e){return typeof e==`string`?e:String(Number.isInteger(e)?e:parseFloat(e.toPrecision(12)))}var ul,dl,fl,pl=o((()=>{V(),G(),ln(),Wc(),Yc(),cl(),ul=10,dl=[`hide`,`required`,`disabled`,`deletable`],fl=class{draw;control;eventBus;baselines;controlBaselines;valueCache;isExecuting;needsRerun;constructor(e){this.draw=e,this.control=e.getControl(),this.eventBus=e.getEventBus(),this.baselines=new WeakMap,this.controlBaselines=new Map,this.valueCache=new Map,this.isExecuting=!1,this.needsRerun=!1,this.eventBus.on(`contentChange`,()=>{this.executeAll()})}getZoneElementLists(){return[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()]}collectAll(){let e=[],t=[],n={byControlId:new Map,byConceptId:new Map},r=new Set,i=a=>{for(let o of a){if(o.type===B.TABLE){for(let e of o.trList||[])for(let t of e.tdList)i(t.value);continue}let a=o.control;if(a){if(o.controlId){let e=n.byControlId.get(o.controlId);e?e.push(o):n.byControlId.set(o.controlId,[o])}if(a.conceptId){let e=n.byConceptId.get(a.conceptId);e?e.push(o):n.byConceptId.set(a.conceptId,[o])}if(!r.has(a)){if(r.add(a),a.cascade?.length)for(let t of a.cascade){let n=null;try{n=Gc(Lc(t.expression))}catch(e){console.warn(`[cascade] 表达式解析失败: ${t.expression}`,e)}e.push({rule:t,ast:n,hostControlId:o.controlId})}if(a.compute&&o.controlId){let e=null;try{e=Gc(Lc(a.compute))}catch(e){console.warn(`[cascade] 计算表达式解析失败: ${a.compute}`,e)}t.push({controlId:o.controlId,expression:a.compute,ast:e})}}}}};return this.getZoneElementLists().forEach(i),{rules:e,computes:t,index:n}}resolveIdentifier=e=>{if(this.valueCache.has(e))return this.valueCache.get(e);let t=this.resolveIdentifierUncached(e);return this.valueCache.set(e,t),t};resolveIdentifierUncached(e){let t=this.control.getValueById({id:e});return t.length||(t=this.control.getValueById({conceptId:e})),this.normalizeGetValueResult(t)}resolveByControlId(e){if(e)return this.normalizeGetValueResult(this.control.getValueById({id:e}))}normalizeGetValueResult(e){if(!e.length)return;let t=e.find(e=>e.value!=null)||e[0],n=t.type;return n===H.SELECT||n===H.RADIO?{code:t.value}:n===H.CHECKBOX?{codes:t.value?t.value.split(`,`):[]}:{text:t.value,isDate:n===H.DATE}}findTitleRangeElements(e){let t=[],n=r=>{let i=0;for(;i<r.length;){let a=r[i];if(i++,a.type===B.TABLE){for(let e of a.trList||[])for(let t of e.tdList)n(t.value);continue}if(a.title?.conceptId!==e)continue;t.push(a);let o=i;for(;o<r.length;){let e=r[o];if(a.titleId===e.titleId)t.push(e),o++;else{if(e.level&&sn[e.level]<=sn[a.level])break;t.push(e),o++}}i=o}};return this.getZoneElementLists().forEach(n),t}recordBaseline(e,t,n){let r=this.baselines.get(e);r||(r={},this.baselines.set(e,r)),t in r||(r[t]=n())}writeWithBaseline(e,t,n,r,i){return this.recordBaseline(e,t,n),n()!==i&&(r(i),!0)}restoreBaseline(e,t){let n=this.baselines.get(e);if(!n||!(t in n))return!1;let r=n[t];if(t===`elementHide`){if(e.hide===r)return!1;this.draw.setElementProperty(e,{hide:r})}else{if(e.control?.[t]===r)return!1;let n=e.control;n&&(n[t]=r)}return!0}recordControlBaseline(e,t){let n=e.controlId;if(!n)return;let r=this.controlBaselines.get(n);r||(r={},this.controlBaselines.set(n,r)),t in r||(r[t]=e.control?.[t])}restoreControlBaseline(e,t){let n=this.controlBaselines.get(e.controlId);if(!n||!(t in n))return!1;let r=n[t];if(e.control?.[t]===r)return!1;let i=e.control;return i&&(i[t]=r),!0}applyAction(e,t,n){let r=t?e.effects:null,i=[];if(e.controlId){let t=n.byControlId.get(e.controlId);t?.length&&i.push(...t)}if(e.conceptId){let t=n.byConceptId.get(e.conceptId);t?.length&&i.push(...t)}let a=e.targetType||(i.length?`control`:`title`),o=!1;if(a===`control`){let e=i;if(t&&r){let t=new Set;for(let n of e){let e=n.control;if(!e)continue;let i=!t.has(e);for(let t of dl)t in r&&(this.recordControlBaseline(n,t),i&&e[t]!==r[t]&&(e[t]=r[t],o=!0));t.add(e)}}else for(let t of e)for(let e of dl)o=this.restoreControlBaseline(t,e)||o}else{let n=this.findTitleRangeElements(e.conceptId||``);for(let e of n)o=t&&r&&`hide`in r?this.writeWithBaseline(e,`elementHide`,()=>e.hide,t=>{this.draw.setElementProperty(e,{hide:t})},r.hide)||o:this.restoreBaseline(e,`elementHide`)||o}return o}applyComputes(e){let t=[];for(let n of e){if(!n.ast)continue;let e=null;try{e=ol(n.ast,{resolve:this.resolveIdentifier,resolveSelf:()=>this.resolveByControlId(n.controlId)})}catch(e){console.warn(`[cascade] 计算表达式求值失败: ${n.expression}`,e);continue}let r=e===null?null:ll(e);(this.control.getValueById({id:n.controlId})[0]?.value??null)!==r&&t.push({id:n.controlId,value:r})}return t.length?(this.control.setValueListById(t),this.draw.getHistoryManager().popUndo(),!0):!1}executeAll(){if(this.isExecuting)this.needsRerun=!0;else{this.isExecuting=!0;try{let e=0;do this.needsRerun=!1,this.executePass(),e++;while(this.needsRerun&&e<ul);this.needsRerun&&console.warn(`[cascade] 级联执行超过最大迭代次数,可能存在循环计算`)}finally{this.isExecuting=!1,this.needsRerun=!1}}}executePass(){let{rules:e,computes:t,index:n}=this.collectAll();if(!e.length&&!t.length)return;this.valueCache.clear();let r=this.applyComputes(t);r&&(this.needsRerun=!0);for(let{rule:t,ast:i,hostControlId:a}of e){let e=!1;if(i)try{e=al(i,{resolve:this.resolveIdentifier,resolveSelf:()=>this.resolveByControlId(a)})}catch(e){console.warn(`[cascade] 表达式求值失败: ${t.expression}`,e)}let o=e?t.actions:t.elseActions||null;if(o)for(let e of o)r=this.applyAction(e,!0,n)||r;else for(let e of t.actions)r=this.applyAction(e,!1,n)||r}if(r){let e=!!this.draw.getPosition().getCursorPosition();this.draw.render({isSubmitHistory:!1,isSetCursor:e,curIndex:e?this.draw.getRange().getRange().startIndex:void 0})}}}})),ml,hl=o((()=>{V(),G(),z(),ml=class{draw;control;i18n;highlightedControlIds;lastErrorBackgroundColor;constructor(e){this.draw=e,this.control=e.getControl(),this.i18n=e.getI18n(),this.highlightedControlIds=new Set,this.lastErrorBackgroundColor=``}collectControlElements(e){let t=[];e&&e!==N.HEADER||t.push(this.draw.getHeaderElementList()),e&&e!==N.MAIN||t.push(this.draw.getOriginalMainElementList()),e&&e!==N.FOOTER||t.push(this.draw.getFooterElementList());let n=[],r=new Set,i=e=>{for(let t of e){if(t.type===B.TABLE){for(let e of t.trList||[])for(let t of e.tdList)i(t.value);continue}let e=t.control;e&&!r.has(e)&&(r.add(e),n.push(t))}};return t.forEach(i),n}getNormalizedValue(e){let t=e.control.type,n=this.control.getValueById({id:e.controlId}),r=(n.find(e=>e.value!=null)||n[0])?.value??null;return t===H.SELECT||t===H.RADIO?{code:r||null}:t===H.CHECKBOX?{codes:r?r.split(`,`):[]}:{text:r,isDate:t===H.DATE}}isHidden(e){return!!(e.control?.hide||e.hide)}t(e,t){let n=this.i18n.t(e);if(t)for(let e in t)n=n.replace(`{${e}}`,String(t[e]));return n}validateControl(e,t){let n=e.control,r=this.getNormalizedValue(e),i=n.validation;if(n.required&&(r.codes?!r.codes.length:r.code===void 0?!r.text?.trim():!r.code)){t.push(i?.message||this.t(`validate.required`));return}if(!i)return;let a=`text`in r&&r.text||``,o=i.message;if(n.type===H.TEXT&&a&&(i.minLength!=null&&a.length<i.minLength&&t.push(o||this.t(`validate.minLength`,{min:i.minLength})),i.maxLength!=null&&a.length>i.maxLength&&t.push(o||this.t(`validate.maxLength`,{max:i.maxLength})),i.pattern&&!new RegExp(i.pattern).test(a)&&t.push(o||this.t(`validate.pattern`))),n.type===H.NUMBER&&a){let e=Number(a);Number.isFinite(e)?(i.min!=null&&e<i.min&&t.push(o||this.t(`validate.min`,{min:i.min})),i.max!=null&&e>i.max&&t.push(o||this.t(`validate.max`,{max:i.max})),i.integer&&!Number.isInteger(e)&&t.push(o||this.t(`validate.integer`)),i.precision!=null&&(a.split(`.`)[1]?.length||0)>i.precision&&t.push(o||this.t(`validate.precision`,{precision:i.precision}))):t.push(o||this.t(`validate.invalidNumber`))}if(n.type===H.DATE&&a){let e=e=>e===`today`?new Date(new Date().toDateString()).getTime():new Date(e).getTime(),n=e(a);i.minDate&&n<e(i.minDate)&&t.push(o||this.t(`validate.minDate`,{date:i.minDate})),i.maxDate&&n>e(i.maxDate)&&t.push(o||this.t(`validate.maxDate`,{date:i.maxDate}))}if(n.type===H.CHECKBOX&&r.codes){let e=r.codes.length;i.minChecked!=null&&e<i.minChecked&&t.push(o||this.t(`validate.minChecked`,{count:i.minChecked})),i.maxChecked!=null&&e>i.maxChecked&&t.push(o||this.t(`validate.maxChecked`,{count:i.maxChecked}))}}walkAllControlElements(e){let t=n=>{for(let r of n)if(r.type===B.TABLE)for(let e of r.trList||[])for(let n of e.tdList)t(n.value);else r.controlId&&e(r)};t(this.draw.getHeaderElementList()),t(this.draw.getOriginalMainElementList()),t(this.draw.getFooterElementList())}applyHighlight(e){this.walkAllControlElements(t=>{this.highlightedControlIds.has(t.controlId)&&(t.highlight=e)}),this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}clearHighlight(){this.highlightedControlIds.size&&(this.walkAllControlElements(e=>{this.highlightedControlIds.has(e.controlId)&&e.highlight===this.lastErrorBackgroundColor&&delete e.highlight}),this.highlightedControlIds.clear(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1}))}execute(e){this.draw.getCascadeManager().executeAll(),this.clearHighlight();let t=e?.errorBackgroundColor||this.draw.getOptions().control.errorBackgroundColor,n=[],r=this.collectControlElements(e?.zone);for(let e of r){if(!e.control||!e.controlId||this.isHidden(e))continue;let t=[];this.validateControl(e,t),t.length&&(n.push({controlId:e.controlId,conceptId:e.control.conceptId,control:{...e.control},errors:t}),this.highlightedControlIds.add(e.controlId))}return this.lastErrorBackgroundColor=t,this.highlightedControlIds.size&&this.applyHighlight(t),n}}})),gl,_l=o((()=>{D(),x(),wn(),gl=class{draw;options;constructor(e){this.draw=e,this.options=e.getOptions()}setSelect(e){let{checkbox:t}=e;t?t.value=!t.value:e.checkbox={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(e){let{ctx:t,x:n,index:r,row:i}=e,{y:a}=e,{checkbox:{gap:o,lineWidth:s,fillStyle:c,strokeStyle:l,checkFillStyle:u,checkStrokeStyle:d,checkMarkColor:f,markType:p,verticalAlign:m},scale:h}=this.options,{metrics:g,checkbox:_,control:v}=i.elementList[r];if(m===Cn.TOP||m===Cn.MIDDLE){let e=r+1,t=null;for(;e<i.elementList.length&&(t=i.elementList[e],t.value===``||t.value===` `);)e++;if(t){let{metrics:{boundingBoxAscent:e,boundingBoxDescent:n}}=t,r=e+n;r>g.height&&(m===Cn.TOP?a-=e-g.height:m===Cn.MIDDLE&&(a-=(r-g.height)/2))}}let y=Math.round(n+o*h),x=Math.round(a-g.height+s),S=g.width-o*2*h,C=g.height;if(t.save(),t.beginPath(),t.translate(.5,.5),_?.value){if(t.fillStyle=u,t.fillRect(y,x,S,C),t.beginPath(),t.lineWidth=s,t.strokeStyle=d,t.rect(y,x,S,C),t.stroke(),t.beginPath(),t.strokeStyle=f,t.lineWidth=s*2*h,(_.markType||v?.markType||p)===b.CROSS){let e=3*h;t.moveTo(y+e,x+e),t.lineTo(y+S-e,x+C-e),t.moveTo(y+S-e,x+e),t.lineTo(y+e,x+C-e)}else t.moveTo(y+2*h,x+C/2),t.lineTo(y+S/2,x+C-3*h),t.lineTo(y+S-2*h,x+3*h);t.stroke()}else t.fillStyle=c,t.fillRect(y,x,S,C),t.beginPath(),t.lineWidth=s,t.strokeStyle=l,t.rect(y,x,S,C),t.stroke();t.closePath(),t.restore()}}})),vl,yl=o((()=>{D(),wn(),vl=class{draw;options;constructor(e){this.draw=e,this.options=e.getOptions()}setSelect(e){let{radio:t}=e;t?t.value=!t.value:e.radio={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(e){let{ctx:t,x:n,index:r,row:i}=e,{y:a}=e,{radio:{gap:o,lineWidth:s,fillStyle:c,strokeStyle:l,verticalAlign:u},scale:d}=this.options,{metrics:f,radio:p}=i.elementList[r];if(u===Cn.TOP||u===Cn.MIDDLE){let e=r+1,t=null;for(;e<i.elementList.length&&(t=i.elementList[e],t.value===``||t.value===` `);)e++;if(t){let{metrics:{boundingBoxAscent:e,boundingBoxDescent:n}}=t,r=e+n;r>f.height&&(u===Cn.TOP?a-=e-f.height:u===Cn.MIDDLE&&(a-=(r-f.height)/2))}}let m=Math.round(n+o*d),h=Math.round(a-f.height+s),g=f.width-o*2*d,_=f.height;t.save(),t.beginPath(),t.translate(.5,.5),t.strokeStyle=p?.value?c:l,t.lineWidth=s,t.arc(m+g/2,h+_/2,g/2,0,Math.PI*2),t.stroke(),p?.value&&(t.beginPath(),t.fillStyle=c,t.arc(m+g/2,h+_/2,g/3,0,Math.PI*2),t.fill()),t.closePath(),t.restore()}}}));function bl(e){let t;try{if(t=Sl&&(self.URL||self.webkitURL).createObjectURL(Sl),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(xl),{name:e?.name})}}var xl,Sl,Cl=o((()=>{xl="(function(){let e=/* @__PURE__ */ function(e){return e.INSERTED=`inserted`,e.DELETED=`deleted`,e}({});function t(n){let r=``,i=0;for(;i<n.length;){let a=n[i],o=a.trace;if(o?.length&&o[o.length-1].type===e.DELETED)i++;else{if(a.type===`table`){if(a.trList)for(let e=0;e<a.trList.length;e++){let n=a.trList[e];for(let e=0;e<n.tdList.length;e++){let i=n.tdList[e];r+=t(i.value)}}}else if(a.type===`hyperlink`){let e=a.hyperlinkId,o=[];for(;i<n.length;){let t=n[i];if(e!==t.hyperlinkId){i--;break}delete t.type,o.push(t),i++}r+=t(o)}else if(a.type===`latex`)r+=a.value;else if(a.controlId){if(!a.control?.hide){let e=a.controlId,o=[];for(;i<n.length;){let t=n[i];if(e!==t.controlId){i--;break}t.controlComponent===`value`&&(delete t.controlId,o.push(t)),i++}r+=t(o)}}else a.type&&a.type!==`text`||a.area?.hide||(r+=a.value);i++}}return r}function n(e){let t=[],n=``,r=()=>{n&&=(t.push(n),``)},i=e=>e<=32||e===160||e>=8192&&e<=8202||e===8239||e===12288||e>=8203&&e<=8207||e>=8234&&e<=8238||e===8288||e===65279,a=e=>e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122,o=e=>e>=33&&e<=47||e>=58&&e<=64||e>=91&&e<=96||e>=123&&e<=126,s=e=>e===123||e===125;for(let c of e){let e=c.charCodeAt(0);i(e)?r():a(e)||s(e)||o(e)?n+=c:(r(),t.push(c))}return r(),t}onmessage=e=>{let r=e.data,i=n(t(r).replace(/* @__PURE__ */ RegExp(`^`),``).replace(/* @__PURE__ */ RegExp(``,`g`),`\n`));postMessage(i.length)}})();",Sl=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,xl],{type:`text/javascript;charset=utf-8`})}));function wl(e){let t;try{if(t=El&&(self.URL||self.webkitURL).createObjectURL(El),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(Tl),{name:e?.name})}}var Tl,El,Dl=o((()=>{Tl="(function(){let e=/* @__PURE__ */ function(e){return e.INSERTED=`inserted`,e.DELETED=`deleted`,e}({}),t={first:1,second:2,third:3,fourth:4,fifth:5,sixth:6},n=[`text`,`hyperlink`,`subscript`,`superscript`,`control`,`date`,`label`];function r(e){return!e.type||n.includes(e.type)}function i(t){let n=t.trace;return n?.[n.length-1]?.type===e.DELETED}function a(e){let{elementList:n,positionList:a}=e,o=[],s=0;for(;s<n.length;){let e=n[s],t=(e,t,n)=>{let o=e.titleId,c={type:`title`,value:``,level:e.level,titleId:o,pageNo:a[s].pageNo},l=[],u=-1;for(;n<t.length;){let e=t[n];if(o!==e.titleId){n--;break}u<0&&!i(e)&&(u=n),l.push(e),n++}return c.value=l.filter(e=>!i(e)&&r(e)).map(e=>e.value).join(``).replace(/* @__PURE__ */ RegExp(``,`g`),``),{position:n,titleElement:c,aliveIndex:u}};if(e.titleId){let{position:r,titleElement:i,aliveIndex:c}=t(e,n,s);s=r,~c&&(i.pageNo=a[c].pageNo,o.push(i))}if(e.type===`table`){let n=e.trList;for(let e=0;e<n.length;e++){let r=n[e];for(let e=0;e<r.tdList.length;e++){let n=r.tdList[e].value;if(n.length>1){let e=1;for(;e<n.length;){if(n[e]?.titleId){let{titleElement:r,position:i,aliveIndex:a}=t(n[e],n,e);~a&&o.push(r),e=i}e++}}}}}s++}if(!o.length)return null;let c=(e,n)=>{let r=n.subCatalog[n.subCatalog.length-1],i=t[r?.level],a=t[e.level];r&&a>i?c(e,r):n.subCatalog.push({id:e.titleId,name:e.value,level:e.level,pageNo:e.pageNo,subCatalog:[]})},l=[];for(let e=0;e<o.length;e++){let n=o[e],r=l[l.length-1],i=t[r?.level],a=t[n.level];r&&a>i?c(n,r):l.push({id:n.titleId,name:n.value,level:n.level,pageNo:n.pageNo,subCatalog:[]})}return l}onmessage=e=>{let t=e.data,n=a(t);postMessage(n)}})();",El=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,Tl],{type:`text/javascript;charset=utf-8`})}));function Ol(e){let t;try{if(t=Al&&(self.URL||self.webkitURL).createObjectURL(Al),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(kl),{name:e?.name})}}var kl,Al,jl=o((()=>{kl="(function(){function e(t){let n=[];for(let r of t){if(r.type===`table`){let t=r.trList;for(let r=0;r<t.length;r++){let i=t[r];for(let t=0;t<i.tdList.length;t++){let r=i.tdList[t];n.push(...e(r.value))}}}if(r.groupIds)for(let e of r.groupIds)n.includes(e)||n.push(e)}return n}onmessage=t=>{let n=t.data,r=e(n);postMessage(r)}})();",Al=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,kl],{type:`text/javascript;charset=utf-8`})}));function Ml(e){let t;try{if(t=Pl&&(self.URL||self.webkitURL).createObjectURL(Pl),!t)throw``;let n=new Worker(t,{name:e?.name});return n.addEventListener(`error`,()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),n}catch{return new Worker(`data:text/javascript;charset=utf-8,`+encodeURIComponent(Nl),{name:e?.name})}}var Nl,Pl,Fl=o((()=>{Nl="(function(){let e=/* @__PURE__ */ function(e){return e.HALF=`half`,e.ONE_THIRD=`one-third`,e.QUARTER=`quarter`,e}({}),t=/* @__PURE__ */ function(e){return e.ARABIC=`arabic`,e.CHINESE=`chinese`,e}({}),n=/* @__PURE__ */ function(e){return e.CHECK=`check`,e.CROSS=`cross`,e}({});e.HALF,e.ONE_THIRD,e.QUARTER;function r(e){if(typeof structuredClone==`function`)return structuredClone(e);if(!e||typeof e!=`object`)return e;let t={};return Array.isArray(e)?t=e.map(e=>r(e)):Object.keys(e).forEach(n=>{t[n]=r(e[n])}),t}function i(e,t){let n={};for(let r in e)t.includes(r)&&(n[r]=e[r]);return n}function a(e,t){return e.length===t.length&&!e.some(e=>!t.includes(e))}let o=/* @__PURE__ */ function(e){return e.TEXT=`text`,e.IMAGE=`image`,e.TABLE=`table`,e.HYPERLINK=`hyperlink`,e.SUPERSCRIPT=`superscript`,e.SUBSCRIPT=`subscript`,e.SEPARATOR=`separator`,e.PAGE_BREAK=`pageBreak`,e.CONTROL=`control`,e.AREA=`area`,e.CHECKBOX=`checkbox`,e.RADIO=`radio`,e.LATEX=`latex`,e.TAB=`tab`,e.DATE=`date`,e.BLOCK=`block`,e.TITLE=`title`,e.LIST=`list`,e.LABEL=`label`,e}({}),s=[`rowFlex`,`rowMargin`,`spacingBefore`,`spacingAfter`,`indentLeft`,`indentRight`,`indentFirstLine`,`tabStops`],c=/* @__PURE__ */ `id.type.font.size.bold.color.italic.highlight.underline.strikeout.rowFlex.rowMargin.spacingBefore.spacingAfter.indentLeft.indentRight.indentFirstLine.tabStops.dashArray.trList.tableToolDisabled.borderType.borderColor.translateX.width.height.url.colgroup.valueList.control.checkbox.radio.dateFormat.block.level.title.listType.listStyle.listWrap.listLevel.groupIds.conceptId.imgDisplay.imgFloatPosition.imgToolDisabled.imgPreviewDisabled.imgCrop.imgCaption.textDecoration.extension.externalId.areaId.area.hide.label.labelId.lineWidth.trace.paperDirection.hint`.split(`.`),l=[`conceptId`,`extension`,`externalId`,`verticalAlign`,`backgroundColor`,`borderColor`,`borderWidth`,`borderTypes`,`slashTypes`,`disabled`,`deletable`],u=[`tdId`,`trId`,`tableId`],d=[`level`,`titleId`,`title`],f=[`listId`,`listType`,`listStyle`,`listLevel`],p=[`font`,`size`,`bold`,`highlight`,`italic`,`strikeout`],m=[`areaId`,`area`];[...u,...d,...f,...m],o.TEXT,o.HYPERLINK,o.SUBSCRIPT,o.SUPERSCRIPT,o.CONTROL,o.DATE,o.IMAGE,o.LATEX,o.BLOCK,o.PAGE_BREAK,o.SEPARATOR,o.TABLE,o.TITLE,o.LIST;let h=/* @__PURE__ */ function(e){return e.UL=`ul`,e.OL=`ol`,e}({}),g=/* @__PURE__ */ function(e){return e.DISC=`disc`,e.CIRCLE=`circle`,e.SQUARE=`square`,e.CHECKBOX=`checkbox`,e}({}),_=/* @__PURE__ */ function(e){return e.DISC=`disc`,e.CIRCLE=`circle`,e.SQUARE=`square`,e.DECIMAL=`decimal`,e.CHECKBOX=`checkbox`,e}({});g.DISC,g.CIRCLE,g.SQUARE,g.CHECKBOX,h.OL,h.UL,_.DISC,_.CIRCLE,_.SQUARE,_.DECIMAL,_.CHECKBOX;let v=/* @__PURE__ */ function(e){return e.FIRST=`first`,e.SECOND=`second`,e.THIRD=`third`,e.FOURTH=`fourth`,e.FIFTH=`fifth`,e.SIXTH=`sixth`,e}({});v.FIRST,v.SECOND,v.THIRD,v.FOURTH,v.FIFTH,v.SIXTH,v.FIRST,v.SECOND,v.THIRD,v.FOURTH,v.FIFTH,v.SIXTH,v.FIRST,v.SECOND,v.THIRD,v.FOURTH,v.FIFTH,v.SIXTH;let y=/* @__PURE__ */ function(e){return e.PREFIX=`prefix`,e.POSTFIX=`postfix`,e.PRE_TEXT=`preText`,e.POST_TEXT=`postText`,e.PLACEHOLDER=`placeholder`,e.VALUE=`value`,e.CHECKBOX=`checkbox`,e.RADIO=`radio`,e}({}),b=/* @__PURE__ */ function(e){return e.LEFT=`left`,e.CENTER=`center`,e.RIGHT=`right`,e.ALIGNMENT=`alignment`,e.JUSTIFY=`justify`,e}({}),x=/* @__PURE__ */ function(e){return e.CONTAIN=`contain`,e.COVER=`cover`,e}({}),S=/* @__PURE__ */ function(e){return e.REPEAT=`repeat`,e.NO_REPEAT=`no-repeat`,e.REPEAT_X=`repeat-x`,e.REPEAT_Y=`repeat-y`,e}({});x.COVER,S.NO_REPEAT;let C=/* @__PURE__ */ function(e){return e.TOP=`top`,e.MIDDLE=`middle`,e.BOTTOM=`bottom`,e}({});n.CHECK,C.BOTTOM,e.HALF,e.HALF,b.CENTER,{PAGE_NO:`{pageNo}`,PAGE_COUNT:`{pageCount}`}.PAGE_NO,t.ARABIC,C.BOTTOM;let w=/* @__PURE__ */ function(e){return e.TEXT=`text`,e.IMAGE=`image`,e}({}),T=/* @__PURE__ */ function(e){return e.BOTTOM=`bottom`,e.TOP=`top`,e}({});w.TEXT,t.ARABIC,T.BOTTOM,(/* @__PURE__ */ function(e){return e.PAGE=`page`,e.CONTINUITY=`continuity`,e}({})).CONTINUITY;function E(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++){let i=n[r];if(i!==`value`&&!(i===`groupIds`&&Array.isArray(e[i])&&Array.isArray(t[i])&&a(e[i],t[i]))){if(i===`trace`){let n=e[i]||[],r=t[i]||[];if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++){let t=n[e],i=r[e];if(t.type!==i.type||t.author!==i.author||t.timestamp!==i.timestamp)return!1}}else if(e[i]!==t[i])return!1}}return!0}function D(e,t={}){let{extraPickAttrs:n}=t,r=[...c];n&&r.push(...n);let i={value:e.value===``?`\n`:e.value};return r.forEach(t=>{let n=e[t];n!==void 0&&(i[t]=n)}),i}function O(e,t={}){let{extraPickAttrs:n,isClassifyArea:a=!1,isClone:c=!0,isListValue:u=!1}=t,d=c?r(e):e,f=[],m=0;for(;m<d.length;){let e=d[m];if(m===0&&e.value===``&&!e.listId&&(!e.type||e.type===o.TEXT)){m++;continue}if(e.areaId){let n=e.areaId,r=e.area,i=[];for(;m<d.length;){let e=d[m];if(n!==e.areaId){m--;break}delete e.area,delete e.areaId,i.push(e),m++}let s=O(i,t);if(a){let t={type:o.AREA,value:``,areaId:n,area:r};t.valueList=s,e=t}else{f.splice(m,0,...s);continue}}else if(e.titleId&&e.level){let n=e.titleId;if(n){let r=e.level,i={type:o.TITLE,title:e.title,titleId:n,value:``,level:r},a=[];for(;m<d.length;){let e=d[m];if(n!==e.titleId){m--;break}delete e.level,delete e.title,a.push(e),m++}i.valueList=O(a,t),e=i}}else if(!u&&e.listId&&e.listType){let n=e.listId;if(n){let r=e.listType,i=e.listStyle,a={type:o.LIST,value:``,listId:n,listType:r,listStyle:i},s=[];for(;m<d.length;){let e=d[m];if(!e.listId||r!==e.listType){m--;break}delete e.listType,delete e.listStyle,s.push(e),m++}a.valueList=O(s,{...t,isListValue:!0}),e=a}}else if(e.type===o.TABLE){if(e.trList)for(let r=0;r<e.trList.length;r++){let i=e.trList[r];n?.includes(`id`)||delete i.id;for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e],a={colspan:r.colspan,rowspan:r.rowspan,value:O(r.value,{...t,isClassifyArea:!0})};l.forEach(e=>{let t=r[e];t!==void 0&&(a[e]=t)}),n?.forEach(e=>{if(e===`value`)return;let t=r[e];t!==void 0&&(a[e]=t)}),i.tdList[e]=a}}}else if(e.type===o.HYPERLINK){let n=e.hyperlinkId;if(n){let r={type:o.HYPERLINK,value:``,url:e.url},i=[];for(;m<d.length;){let e=d[m];if(n!==e.hyperlinkId){m--;break}delete e.type,delete e.url,i.push(e),m++}r.valueList=O(i,t),e=r}}else if(e.type===o.DATE){let n=e.dateId;if(n){let r={type:o.DATE,value:``,dateFormat:e.dateFormat},i=[];for(;m<d.length;){let e=d[m];if(n!==e.dateId){m--;break}delete e.type,delete e.dateFormat,i.push(e),m++}r.valueList=O(i,t),e=r}}else if(e.controlId){let r=e.controlId;if(e.controlComponent===y.PREFIX){let a=[],c=!1,l=m;for(;l<d.length;){let e=d[l];if(e.controlId===r){if(e.controlComponent===y.VALUE&&(delete e.control,delete e.controlId,a.push(e)),e.controlComponent===y.POSTFIX){c=!0,l++;break}l++}else if(e.controlComponent===y.PREFIX){let n=l;for(;n<d.length;){let t=d[n];if(t.controlId===e.controlId&&t.controlComponent===y.POSTFIX)break;n++}let r=O(d.slice(l,Math.min(n+1,d.length)),t)[0];r&&a.push(r),l=n+1}else break}if(c){let c=i(e,p),u={...e.control,...c},d={...i(e,s),type:o.CONTROL,value:``,control:u,controlId:r,trace:e.trace};d.control.value=O(a,t),e=D(d,{extraPickAttrs:n}),m+=l-m-1}}if(e.controlComponent&&(delete e.control,delete e.controlId,e.controlComponent!==y.VALUE&&e.controlComponent!==y.PRE_TEXT&&e.controlComponent!==y.POST_TEXT)){m++;continue}}let r=D(e,{extraPickAttrs:n});if(!e.type||e.type===o.TEXT||e.type===o.SUBSCRIPT||e.type===o.SUPERSCRIPT)for(;m<d.length;){let e=d[m+1];if(m++,e&&E(r,D(e,{extraPickAttrs:n}))){let t=e.value===``?`\n`:e.value;r.value+=t}else break}else m++;f.push(r)}return f}onmessage=e=>{let{options:t,data:n}=e.data,{extraPickAttrs:r=[]}=t||{},i={header:O(n.header,{extraPickAttrs:r,isClone:!1}),main:O(n.main,{extraPickAttrs:r,isClassifyArea:!0,isClone:!1}),footer:O(n.footer,{extraPickAttrs:r,isClone:!1})};postMessage(i)}})();",Pl=typeof self<`u`&&self.Blob&&new Blob([`(self.URL || self.webkitURL).revokeObjectURL(self.location.href);`,Nl],{type:`text/javascript;charset=utf-8`})})),Il,Ll=o((()=>{p(),Cl(),Dl(),jl(),Fl(),J(),Il=class{draw;wordCountWorker;catalogWorker;groupWorker;valueWorker;constructor(e){this.draw=e,this.wordCountWorker=new bl,this.catalogWorker=new wl,this.groupWorker=new Ol,this.valueWorker=new Ml}getWordCount(){return new Promise((e,t)=>{this.wordCountWorker.onmessage=t=>{e(t.data)},this.wordCountWorker.onerror=e=>{t(e)};let n=this.draw.getOriginalMainElementList();this.wordCountWorker.postMessage(n)})}getCatalog(){return new Promise((e,t)=>{this.catalogWorker.onmessage=t=>{e(t.data)},this.catalogWorker.onerror=e=>{t(e)};let n=this.draw.getOriginalMainElementList(),r=this.draw.getPosition().getOriginalMainPositionList();this.catalogWorker.postMessage({elementList:n,positionList:r})})}getGroupIds(){return new Promise((e,t)=>{this.groupWorker.onmessage=t=>{e(t.data)},this.groupWorker.onerror=e=>{t(e)};let n=this.draw.getOriginalMainElementList();this.groupWorker.postMessage(n)})}getValue(e){return new Promise((t,n)=>{this.valueWorker.onmessage=e=>{t({version:f,data:e.data,options:K(this.draw.getOptions())})},this.valueWorker.onerror=e=>{n(e)},this.valueWorker.postMessage({data:this.draw.getOriginValue(e),options:e})})}destroy(){this.wordCountWorker.terminate(),this.catalogWorker.terminate(),this.groupWorker.terminate(),this.valueWorker.terminate()}}})),Rl,zl=o((()=>{Qe(),z(),J(),Rl=class{container;canvas;draw;options;curElement;curElementSrc;previewerDrawOption;curPosition;eventBus;imageList;curShowElement;imageCount;imagePre;imageNext;resizerSelection;resizerHandleList;resizerImageContainer;resizerImage;resizerSize;width;height;mousedownX;mousedownY;curHandleIndex;previewerContainer;previewerImage;constructor(e){this.container=e.getContainer(),this.canvas=e.getPage(),this.draw=e,this.options=e.getOptions(),this.curElement=null,this.curElementSrc=``,this.previewerDrawOption={},this.curPosition=null,this.eventBus=e.getEventBus(),this.imageList=[],this.curShowElement=null,this.imageCount=null,this.imagePre=null,this.imageNext=null;let{resizerSelection:t,resizerHandleList:n,resizerImageContainer:r,resizerImage:i,resizerSize:a}=this._createResizerDom();this.resizerSelection=t,this.resizerHandleList=n,this.resizerImageContainer=r,this.resizerImage=i,this.resizerSize=a,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.previewerContainer=null,this.previewerImage=null}_getElementPosition(e,t=null){let n=0,r=0,i=t?.pageNo??this.draw.getPageNo(),{x:a,y:o}=this.draw.getPageOffset(i);if(e.imgFloatPosition){let t=this.draw.getPosition(),i=t.getFloatPositionByElement(e);if(i){let e=t.getFloatPositionCoordinate(i);n=e.x+a,r=e.y+o}}else if(t){let{coordinate:{leftTop:[e,i]},ascent:s}=t;n=e+a,r=i+o+s}return{x:n,y:r}}_createResizerDom(){let{scale:e}=this.options,t=document.createElement(`div`);t.classList.add(`ce-resizer-selection`),t.style.display=`none`,t.style.borderColor=this.options.resizerColor,t.style.borderWidth=`${e}px`;let n=[];for(let e=0;e<8;e++){let r=document.createElement(`div`);r.style.background=this.options.resizerColor,r.classList.add(`resizer-handle`),r.classList.add(`handle-${e}`),r.setAttribute(`data-index`,String(e)),r.onmousedown=this._mousedown.bind(this),t.append(r),n.push(r)}this.container.append(t);let r=document.createElement(`div`);r.classList.add(`ce-resizer-size-view`);let i=document.createElement(`span`);r.append(i),t.append(r);let a=document.createElement(`div`);a.classList.add(`ce-resizer-image`),a.style.display=`none`;let o=document.createElement(`img`);return a.append(o),this.container.append(a),{resizerSelection:t,resizerHandleList:n,resizerImageContainer:a,resizerImage:o,resizerSize:i}}_keydown=()=>{this.resizerSelection.style.display===`block`&&(this.clearResizer(),document.removeEventListener(`keydown`,this._keydown))};_mousedown(e){if(this.canvas=this.draw.getPage(),!this.curElement)return;let{scale:t}=this.options;this.mousedownX=e.x,this.mousedownY=e.y;let n=e.target;this.curHandleIndex=Number(n.dataset.index);let r=window.getComputedStyle(n).cursor;document.body.style.cursor=r,this.canvas.style.cursor=r,this.resizerImage.src=this.curElementSrc,this.resizerImageContainer.style.display=`block`;let{x:i,y:a}=this._getElementPosition(this.curElement,this.curPosition);this.resizerImageContainer.style.left=`${i}px`,this.resizerImageContainer.style.top=`${a}px`,this.resizerImage.style.width=`${this.curElement.width*t}px`,this.resizerImage.style.height=`${this.curElement.height*t}px`;let o=this._mousemove.bind(this);document.addEventListener(`mousemove`,o),document.addEventListener(`mouseup`,()=>{this.curElement&&!this.previewerDrawOption.dragDisable&&(this.curElement.width=this.width,this.curElement.height=this.height,this.draw.render({isSetCursor:!0,curIndex:this.curPosition?.index})),this.resizerImageContainer.style.display=`none`,document.removeEventListener(`mousemove`,o),document.body.style.cursor=``,this.canvas.style.cursor=`text`},{once:!0}),e.preventDefault()}_mousemove(e){if(!this.curElement||this.previewerDrawOption.dragDisable)return;let{scale:t}=this.options,n=0,r=0;switch(this.curHandleIndex){case 0:{let t=this.mousedownX-e.x,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 1:r=this.mousedownY-e.y;break;case 2:{let t=e.x-this.mousedownX,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 4:{let t=e.x-this.mousedownX,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 3:n=e.x-this.mousedownX;break;case 5:r=e.y-this.mousedownY;break;case 6:{let t=this.mousedownX-e.x,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.curElement.height*n/this.curElement.width}break;case 7:n=this.mousedownX-e.x}let i=this.curElement.width+n/t,a=this.curElement.height+r/t;if(i<=0||a<=0)return;this.width=i,this.height=a;let o=i*t,s=a*t;this.resizerImage.style.width=`${o}px`,this.resizerImage.style.height=`${s}px`,this._updateResizerRect(o,s),this._updateResizerSizeView(o,s),e.preventDefault(),this.eventBus.isSubscribe(`imageSizeChange`)&&this.eventBus.emit(`imageSizeChange`,{element:this.curElement})}_drawPreviewer(){let e=document.createElement(`div`);e.classList.add(`ce-image-previewer`);let t=document.createElement(`i`);t.classList.add(`image-close`),t.onclick=()=>{this._clearPreviewer()},e.append(t);let n=document.createElement(`div`);n.classList.add(`ce-image-container`);let r=document.createElement(`img`);r.src=this.curElementSrc,r.draggable=!1,n.append(r),this.previewerImage=r,e.append(n);let i=0,a=0,o=1,s=0,c=document.createElement(`div`);c.classList.add(`ce-image-menu`);let l=document.createElement(`div`);l.classList.add(`image-navigate`);let u=document.createElement(`i`);u.classList.add(`image-pre`),u.onclick=()=>{let e=this.imageList.findIndex(e=>e.id===this.curShowElement?.id);e<=0||(this.curShowElement=this.imageList[e-1],r.src=this.curShowElement.value,this._updateImageNavigate())},l.append(u),this.imagePre=u;let d=document.createElement(`span`);d.classList.add(`image-count`),this.imageCount=d,l.append(d);let f=document.createElement(`i`);f.classList.add(`image-next`),f.onclick=()=>{let e=this.imageList.findIndex(e=>e.id===this.curShowElement?.id);e>=this.imageList.length-1||(this.curShowElement=this.imageList[e+1],r.src=this.curShowElement.value,this._updateImageNavigate())},this.imageNext=f,l.append(f),c.append(l);let p=document.createElement(`i`);p.classList.add(`zoom-in`),p.onclick=()=>{o+=.1,this._setPreviewerTransform(o,s,i,a)},c.append(p);let m=document.createElement(`i`);m.onclick=()=>{o-.1<=.1||(o-=.1,this._setPreviewerTransform(o,s,i,a))},m.classList.add(`zoom-out`),c.append(m);let h=document.createElement(`i`);h.classList.add(`rotate`),h.onclick=()=>{s+=1,this._setPreviewerTransform(o,s,i,a)},c.append(h);let g=document.createElement(`i`);g.classList.add(`original-size`),g.onclick=()=>{i=0,a=0,o=1,s=0,this._setPreviewerTransform(o,s,i,a)},c.append(g);let _=document.createElement(`i`);_.classList.add(`image-download`),_.onclick=()=>{let{mime:e}=this.previewerDrawOption;Ce(r.src,`${this.curElement?.id}.${e||`png`}`)},c.append(_),e.append(c),this.previewerContainer=e,document.body.append(e);let v=0,y=0,b=!1;r.onmousedown=t=>{b=!0,v=t.x,y=t.y,e.style.cursor=`move`},e.onmousemove=e=>{b&&(i+=e.x-v,a+=e.y-y,v=e.x,y=e.y,this._setPreviewerTransform(o,s,i,a))},e.onmouseup=()=>{b=!1,e.style.cursor=`auto`},e.onwheel=e=>{if(e.preventDefault(),e.stopPropagation(),e.deltaY<0)o+=.1;else{if(o-.1<=.1)return;o-=.1}this._setPreviewerTransform(o,s,i,a)},this._updateImageNavigate()}_updateImageNavigate(){let e=this.imageList.findIndex(e=>e.id===this.curShowElement?.id);this.imageCount.innerText=`${e+1} / ${this.imageList.length}`,e<=0?this.imagePre.classList.add(`disabled`):this.imagePre.classList.remove(`disabled`),e>=this.imageList.length-1?this.imageNext.classList.add(`disabled`):this.imageNext.classList.remove(`disabled`)}_setPreviewerTransform(e,t,n,r){this.previewerImage&&(this.previewerImage.style.left=`${n}px`,this.previewerImage.style.top=`${r}px`,this.previewerImage.style.transform=`scale(${e}) rotate(${t*90}deg)`)}_clearPreviewer(){this.previewerContainer?.remove(),this.previewerContainer=null,document.body.style.overflow=`auto`}_updateResizerRect(e,t){let{resizerSize:n,scale:r}=this.options,i=this.draw.isReadonly();this.resizerSelection.style.width=`${e}px`,this.resizerSelection.style.height=`${t}px`;for(let a=0;a<8;a++){let o=a===0||a===6||a===7?-n:a===1||a===5?e/2:e-n,s=a===0||a===1||a===2?-n:a===3||a===7?t/2-n:t-n;this.resizerHandleList[a].style.transform=`scale(${r})`,this.resizerHandleList[a].style.left=`${o}px`,this.resizerHandleList[a].style.top=`${s}px`,this.resizerHandleList[a].style.display=i?`none`:`block`}}_updateResizerSizeView(e,t){this.resizerSize.innerText=`${Math.round(e)} × ${Math.round(t)}`}render(){let e=this.draw.getMode();!this.curElement||this.curElement.imgToolDisabled&&!this.draw.isDesignMode()||e===M.PRINT&&this.options.modeRule[M.PRINT]?.imagePreviewerDisabled||e===M.READONLY&&this.options.modeRule[M.READONLY]?.imagePreviewerDisabled||(this.imageList=this.draw.getImageParticle().getOriginalMainImageList(),this.curShowElement=this.curElement,this._drawPreviewer(),document.body.style.overflow=`hidden`)}drawResizer(e,t=null,n={}){let r=this.draw.getMode();e.imgToolDisabled&&!this.draw.isDesignMode()||r===M.PRINT&&this.options.modeRule[M.PRINT]?.imagePreviewerDisabled||r===M.READONLY&&this.options.modeRule[M.READONLY]?.imagePreviewerDisabled||(this.previewerDrawOption=n,this.curElementSrc=e[n.srcKey||`value`]||``,this.updateResizer(e,t),document.addEventListener(`keydown`,this._keydown))}updateResizer(e,t=null){let{scale:n}=this.options,r=e.width*n,i=e.height*n;this._updateResizerSizeView(r,i);let{x:a,y:o}=this._getElementPosition(e,t);this.resizerSelection.style.left=`${a}px`,this.resizerSelection.style.top=`${o}px`,this.resizerSelection.style.borderWidth=`${n}px`,this._updateResizerRect(r,i),this.resizerSelection.style.display=`block`,this.curElement=e,this.curPosition=t,this.width=r,this.height=i}clearResizer(){this.resizerSelection.style.display=`none`,document.removeEventListener(`keydown`,this._keydown)}}})),Bl,Vl=o((()=>{V(),gi(),Oc(),Bl=class{draw;range;datePicker;options;constructor(e){this.draw=e,this.options=e.getOptions(),this.range=e.getRange(),this.datePicker=new Dc(e,{onSubmit:this._setValue.bind(this)})}_setValue(e){if(!e)return;let t=this.getDateElementRange();if(!t)return;let[n,r]=t,i=this.draw.getElementList(),a=i[n+1];this.draw.deleteElementList(i,n+1,r-n),this.range.setRange(n,n);let o={type:B.DATE,value:``,dateFormat:a.dateFormat,valueList:[{value:e}]};Zr(i,[o],n,{editorOptions:this.options}),this.draw.insertElementList([o])}getDateElementRange(){let e=-1,t=-1,{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return null;let i=this.draw.getElementList(),a=i[n];if(a.type!==B.DATE)return null;let o=n;for(;o>=0;){if(i[o].dateId!==a.dateId){e=o;break}o--}let s=n+1;for(;s<i.length;){if(i[s].dateId!==a.dateId){t=s-1;break}s++}return s===i.length&&(t=s-1),!~e||!~t?null:[e,t]}clearDatePicker(){this.datePicker.dispose()}renderDatePicker(e,t){let n=this.draw.getElementList(),r=this.getDateElementRange(),i=r?n.slice(r[0]+1,r[1]+1).map(e=>e.value).join(``):``;this.datePicker.render({value:i,position:t,dateFormat:e.dateFormat})}}})),Hl,Ul=o((()=>{Hl=class{element;videoCache;constructor(e){this.element=e,this.videoCache=new Map}snapshot(e,t,n){return new Promise((r,i)=>{let a=this.element.block?.videoBlock?.src||``;if(this.videoCache.has(a)){let i=this.videoCache.get(a);e.drawImage(i,t,n,this.element.metrics.width,this.element.metrics.height),r(this.element)}else{let e=document.createElement(`video`);e.src=a,e.muted=!0,e.crossOrigin=`anonymous`,e.onloadeddata=()=>{this.videoCache.set(a,e),r(this.element)},e.onerror=e=>{i(e)},e.play().then(()=>{e.pause()})}})}render(e){let t=this.element.block,n=document.createElement(`video`);n.style.width=`100%`,n.style.height=`100%`,n.style.objectFit=`contain`,n.src=t.videoBlock?.src||``,n.controls=!0,e.append(n)}}})),Wl,Gl=o((()=>{Qe(),dn(),Je(),Ul(),Wl=class{draw;options;element;block;blockContainer;blockItem;positionInfo=null;blockCache;resizerMask;resizerSelection;resizerHandleList;width;height;mousedownX;mousedownY;curHandleIndex;isAllowResize;constructor(e,t){this.draw=e.getDraw(),this.options=this.draw.getOptions(),this.blockContainer=e.getBlockContainer(),this.element=t,this.block=null;let{blockItem:n,resizerMask:r,resizerSelection:i,resizerHandleList:a}=this._createBlockItem();this.blockItem=n,this.blockContainer.append(this.blockItem),this.blockCache=new Map,this.resizerMask=r,this.resizerSelection=i,this.resizerHandleList=a,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.isAllowResize=!1}getBlockElement(){return this.element}getBlockWidth(){return this.element.width||this.element.metrics.width}getIFrameBlock(){return this.block instanceof qe?this.block:null}getPositionInfo(){return this.positionInfo}_createBlockItem(){let{scale:e,resizerColor:t}=this.options,n=document.createElement(`div`);n.classList.add(`ce-block-item`);let r=document.createElement(`div`);r.style.display=`none`,r.classList.add(`ce-resizer-selection`),r.style.borderColor=t,r.style.borderWidth=`${e}px`;let i=[];for(let e=0;e<8;e++){let n=document.createElement(`div`);n.style.background=t,n.classList.add(`resizer-handle`),n.classList.add(`handle-${e}`),n.setAttribute(`data-index`,String(e)),n.onmousedown=this._mousedown.bind(this),r.append(n),i.push(n)}let a=document.createElement(`div`);return a.classList.add(`ce-resizer-mask`),a.style.display=`none`,n.append(a),n.onmouseenter=()=>{if(this.draw.isReadonly())return;let{width:e,height:t}=this.element.metrics;this._updateResizerRect(e,t),r.style.display=`block`},n.onmouseleave=()=>{this.isAllowResize||(r.style.display=`none`)},n.append(r),{blockItem:n,resizerMask:a,resizerSelection:r,resizerHandleList:i}}_updateResizerRect(e,t){let{resizerSize:n,scale:r}=this.options;this.resizerSelection.style.width=`${e}px`,this.resizerSelection.style.height=`${t}px`;for(let i=0;i<8;i++){let a=i===0||i===6||i===7?-n:i===1||i===5?e/2:e-n,o=i===0||i===1||i===2?-n:i===3||i===7?t/2-n:t-n;this.resizerHandleList[i].style.transform=`scale(${r})`,this.resizerHandleList[i].style.left=`${a}px`,this.resizerHandleList[i].style.top=`${o}px`}}_mousedown(e){let t=this.draw.getPage();this.mousedownX=e.x,this.mousedownY=e.y,this.isAllowResize=!0;let n=e.target;this.curHandleIndex=Number(n.dataset.index),this.width=this.getBlockWidth(),this.height=this.element.height,this.resizerMask.style.display=`block`;let r=window.getComputedStyle(n).cursor;document.body.style.cursor=r,t.style.cursor=r;let i=this._mousemove.bind(this);document.addEventListener(`mousemove`,i),document.addEventListener(`mouseup`,()=>{this.element.width=Math.min(this.width,this.draw.getInnerWidth()),this.element.height=this.height,this.isAllowResize=!1,this.resizerSelection.style.display=`none`,this.resizerMask.style.display=`none`,document.removeEventListener(`mousemove`,i),document.body.style.cursor=``,t.style.cursor=`text`,this.draw.render()},{once:!0}),e.preventDefault()}_mousemove(e){if(!this.isAllowResize)return;let{scale:t}=this.options,n=0,r=0;switch(this.curHandleIndex){case 0:{let t=this.mousedownX-e.x,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.element.height*n/this.getBlockWidth()}break;case 1:r=this.mousedownY-e.y;break;case 2:{let t=e.x-this.mousedownX,i=this.mousedownY-e.y;n=Math.cbrt(t**3+i**3),r=this.element.height*n/this.getBlockWidth()}break;case 4:{let t=e.x-this.mousedownX,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.element.height*n/this.getBlockWidth()}break;case 3:n=e.x-this.mousedownX;break;case 5:r=e.y-this.mousedownY;break;case 6:{let t=this.mousedownX-e.x,i=e.y-this.mousedownY;n=Math.cbrt(t**3+i**3),r=this.element.height*n/this.getBlockWidth()}break;case 7:n=this.mousedownX-e.x}let i=this.getBlockWidth()+n/t,a=this.element.height+r/t;if(i<=0||a<=0)return;this.width=i,this.height=a;let o=i*t,s=a*t;this._updateResizerRect(o,s),this.blockItem.style.width=`${o}px`,this.blockItem.style.height=`${s}px`,e.preventDefault()}snapshot(e,t,n,r){let i=this.element.block;if(i.type===un.VIDEO){if(this.blockItem.style.display=`none`,this.blockCache.has(this.element.id))this.blockCache.get(this.element.id).snapshot(e,n,r);else{this.block=new Hl(this.element);let t=this.block.snapshot(e,n,r);t.then(()=>{this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}),this.draw.getImageObserver().add(t),this.blockCache.set(this.element.id,this.block)}}else i.type===un.IFRAME&&this.setClientRects(t,n,r)}render(){let e=this.element.block;e.type===un.IFRAME?(this.block=new qe(this.element),this.block.render(this.blockItem)):e.type===un.VIDEO&&(this.block=new Hl(this.element),this.block.render(this.blockItem))}setClientRects(e,t,n){let{x:r,y:i}=this.draw.getPageOffset(e),{metrics:a}=this.element;this.blockItem.style.display=`block`,this.blockItem.style.width=`${a.width}px`,this.blockItem.style.height=`${a.height}px`,this.blockItem.style.left=`${t+r}px`,this.blockItem.style.top=`${i+n}px`,this.positionInfo={pageNo:e,x:t,y:n}}setStatus(){this.block instanceof qe&&this.block.setReadonly(this.draw.isReadonly())}remove(){this.blockItem.remove()}}})),Kl,ql=o((()=>{Qe(),dn(),V(),J(),Ki(),Gl(),Kl=class{draw;options;container;blockContainer;blockMap;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.blockMap=new Map,this.blockContainer=this._createBlockContainer(),this.container.append(this.blockContainer)}_createBlockContainer(){let e=document.createElement(`div`);return e.classList.add(`ce-block-container`),e}getDraw(){return this.draw}getBlockContainer(){return this.blockContainer}render(e,t,n,r,i){let a=n.id,o=this.blockMap.get(a);o||(o=new Wl(this,n),o.render(),this.blockMap.set(a,o)),this.draw.isPrintMode()?o.snapshot(e,t,r,i):o.setClientRects(t,r,i),o.setStatus()}clear(){if(!this.blockMap.size)return;let e=this.draw.getOriginalMainElementList(),t=[];for(let n=0;n<e.length;n++){let r=e[n];r.type===B.BLOCK&&t.push(r.id)}this.blockMap.forEach(e=>{let n=e.getBlockElement().id;t.includes(n)||(e.remove(),this.blockMap.delete(n))})}update(){this.blockMap.forEach(e=>{let t=e.getBlockElement();if(t.block?.type===un.IFRAME&&t.block.iframeBlock?.srcdoc){let n=e.getIFrameBlock?.()?.getIframe?.();n?.contentDocument&&(t.block.iframeBlock.srcdoc=n.contentDocument.documentElement.outerHTML)}})}async drawIframeToPage(e,t){let n=[];this.blockMap.forEach(r=>{if(r.getBlockElement().block?.type!==un.IFRAME)return;let i=r.getPositionInfo();if(!i)return;let a=r.getIFrameBlock()?.getIframe();if(!a)return;let{pageNo:o,x:s,y:c}=i,l=e[o]?.getContext(`2d`);if(!l)return;let{width:u,height:d}=r.getBlockElement().metrics;n.push(t(a).then(e=>Ue(e)).then(e=>l.drawImage(e,s,c,u,d)))}),await Promise.allSettled(n)}async drawIframeToSvgPage(e,t){let n=[];this.blockMap.forEach(r=>{if(r.getBlockElement().block?.type!==un.IFRAME)return;let i=r.getPositionInfo();if(!i)return;let a=r.getIFrameBlock()?.getIframe();if(!a)return;let{pageNo:o,x:s,y:c}=i,l=e[o];if(!l)return;let{width:u,height:d}=r.getBlockElement().metrics;n.push(t(a).then(e=>{let t=document.createElementNS(Ui,`image`);t.setAttribute(`x`,String(s)),t.setAttribute(`y`,String(c)),t.setAttribute(`width`,String(u)),t.setAttribute(`height`,String(d)),t.setAttribute(`preserveAspectRatio`,`none`),t.setAttribute(`href`,e),l.append(t)}))}),await Promise.allSettled(n)}pickIframeInfo(){let e=[],{scale:t}=this.options;return this.blockMap.forEach(n=>{let r=n.getBlockElement();if(!r.block?.iframeBlock||r.block.type!==un.IFRAME)return;let i=n.getPositionInfo();if(!i)return;let{pageNo:a,x:o,y:s}=i;e[a]||(e[a]=[]),e[a].push({x:o,y:s,width:r.metrics.width/t,height:r.metrics.height/t,src:r.block.iframeBlock.src,srcdoc:r.block.iframeBlock.srcdoc})}),e}}})),Jl,Yl,Xl,Zl,Ql,$l,eu,tu,nu,ru=o((()=>{Jl={global:{cut:`剪切`,copy:`复制`,paste:`粘贴`,selectAll:`全选`,print:`打印`},control:{delete:`删除控件`},hyperlink:{delete:`删除链接`,cancel:`取消链接`,edit:`编辑链接`},image:{change:`更改图片`,saveAs:`另存为图片`,textWrap:`文字环绕`,textWrapType:{embed:`嵌入型`,upDown:`上下型环绕`,surround:`四周型环绕`,floatTop:`浮于文字上方`,floatBottom:`衬于文字下方`}},table:{insertRowCol:`插入行列`,insertTopRow:`上方插入1行`,insertBottomRow:`下方插入1行`,insertLeftCol:`左侧插入1列`,insertRightCol:`右侧插入1列`,deleteRowCol:`删除行列`,deleteRow:`删除1行`,deleteCol:`删除1列`,deleteTable:`删除整个表格`,mergeCell:`合并单元格`,mergeCancelCell:`取消合并`,autoFitToContent:`根据内容自动调整表格`,autoFitToPage:`根据窗口自动调整表格`,verticalAlign:`垂直对齐`,verticalAlignTop:`顶端对齐`,verticalAlignMiddle:`垂直居中`,verticalAlignBottom:`底端对齐`,border:`表格边框`,borderAll:`所有框线`,borderEmpty:`无框线`,borderDash:`虚框线`,borderExternal:`外侧框线`,borderInternal:`内侧框线`,borderTd:`单元格边框`,borderTdTop:`上边框`,borderTdRight:`右边框`,borderTdBottom:`下边框`,borderTdLeft:`左边框`,borderTdForward:`正斜线`,borderTdBack:`反斜线`}},Yl={now:`此刻`,confirm:`确定`,return:`返回日期`,timeSelect:`时间选择`,weeks:{sun:`日`,mon:`一`,tue:`二`,wed:`三`,thu:`四`,fri:`五`,sat:`六`},year:`年`,month:`月`,months:{jan:`1月`,feb:`2月`,mar:`3月`,apr:`4月`,may:`5月`,jun:`6月`,jul:`7月`,aug:`8月`,sep:`9月`,oct:`10月`,nov:`11月`,dec:`12月`},hour:`时`,minute:`分`,second:`秒`},Xl={header:`页眉`,footer:`页脚`},Zl={displayName:`分页符`},Ql={headerTip:`双击编辑页眉`,footerTip:`双击编辑页脚`},$l={selected:`选中:`,input:`输入:`},eu={insert:`新增内容`,delete:`删除内容`,author:`作者`,time:`时间`,unknownAuthor:`未知作者`},tu={required:`该字段为必填项`,minLength:`最小长度为 {min}`,maxLength:`最大长度为 {max}`,pattern:`格式不正确`,invalidNumber:`请输入有效数值`,min:`最小值为 {min}`,max:`最大值为 {max}`,integer:`必须为整数`,precision:`最多 {precision} 位小数`,minDate:`日期不能早于 {date}`,maxDate:`日期不能晚于 {date}`,minChecked:`至少选择 {count} 项`,maxChecked:`最多选择 {count} 项`},nu={contextmenu:Jl,datePicker:Yl,frame:Xl,pageBreak:Zl,zone:Ql,accessibility:$l,trace:eu,validate:tu}})),iu,au,ou,su,cu,lu,uu,du,fu,pu=o((()=>{iu={global:{cut:`Cut`,copy:`Copy`,paste:`Paste`,selectAll:`Select all`,print:`Print`},control:{delete:`Delete control`},hyperlink:{delete:`Delete hyperlink`,cancel:`Cancel hyperlink`,edit:`Edit hyperlink`},image:{change:`Change image`,saveAs:`Save as image`,textWrap:`Text wrap`,textWrapType:{embed:`Embed`,upDown:`Up down`,surround:`Surround`,floatTop:`Float above text`,floatBottom:`Float below text`}},table:{insertRowCol:`Insert row col`,insertTopRow:`Insert top 1 row`,insertBottomRow:`Insert bottom 1 row`,insertLeftCol:`Insert left 1 col`,insertRightCol:`Insert right 1 col`,deleteRowCol:`Delete row col`,deleteRow:`Delete 1 row`,deleteCol:`Delete 1 col`,deleteTable:`Delete table`,mergeCell:`Merge cell`,mergeCancelCell:`Cancel merge cell`,autoFitToContent:`AutoFit to contents`,autoFitToPage:`AutoFit to window`,verticalAlign:`Vertical align`,verticalAlignTop:`Top`,verticalAlignMiddle:`Middle`,verticalAlignBottom:`Bottom`,border:`Table border`,borderAll:`All`,borderEmpty:`Empty`,borderDash:`Dash`,borderExternal:`External`,borderInternal:`Internal`,borderTd:`Table cell border`,borderTdTop:`Top`,borderTdRight:`Right`,borderTdBottom:`Bottom`,borderTdLeft:`Left`,borderTdForward:`Forward`,borderTdBack:`Back`}},au={now:`Now`,confirm:`Confirm`,return:`Return`,timeSelect:`Time select`,weeks:{sun:`Sun`,mon:`Mon`,tue:`Tue`,wed:`Wed`,thu:`Thu`,fri:`Fri`,sat:`Sat`},year:` `,month:` `,months:{jan:`Jan`,feb:`Feb`,mar:`Mar`,apr:`Apr`,may:`May`,jun:`Jun`,jul:`Jul`,aug:`Aug`,sep:`Sep`,oct:`Oct`,nov:`Nov`,dec:`Dec`},hour:`Hour`,minute:`Minute`,second:`Second`},ou={header:`Header`,footer:`Footer`},su={displayName:`Page Break`},cu={headerTip:`Double click to edit header`,footerTip:`Double click to edit footer`},lu={selected:`Selected: `,input:`Input: `},uu={insert:`Inserted`,delete:`Deleted`,author:`Author`,time:`Time`,unknownAuthor:`Unknown`},du={required:`This field is required`,minLength:`Minimum length is {min}`,maxLength:`Maximum length is {max}`,pattern:`Invalid format`,invalidNumber:`Please enter a valid number`,min:`Minimum value is {min}`,max:`Maximum value is {max}`,integer:`Must be an integer`,precision:`Up to {precision} decimal places`,minDate:`Date cannot be earlier than {date}`,maxDate:`Date cannot be later than {date}`,minChecked:`Select at least {count} item(s)`,maxChecked:`Select at most {count} item(s)`},fu={contextmenu:iu,datePicker:au,frame:ou,pageBreak:su,zone:cu,accessibility:lu,trace:uu,validate:du}})),mu,hu=o((()=>{ru(),pu(),J(),mu=class{currentLocale;langMap=new Map([[`zhCN`,nu],[`en`,fu]]);constructor(e){this.currentLocale=e}registerLangMap(e,t){let n=this.langMap.get(e);this.langMap.set(e,Ae(n||nu,t))}getLocale(){return this.currentLocale}setLocale(e){this.currentLocale=e}getLang(){return this.langMap.get(this.currentLocale)||nu}t(e){let t=e.split(`.`),n=``,r=this.getLang();for(let e=0;e<t.length;e++){let i=t[e],a=Reflect.get(r,i);if(a)n=r=a;else return``}return n}}})),gu,_u=o((()=>{gu=class{promiseList;constructor(){this.promiseList=[]}add(e){this.promiseList.push(e)}clearAll(){this.promiseList=[]}allSettled(){return Promise.allSettled(this.promiseList)}}})),vu,yu=o((()=>{Qe(),z(),J(),Ja(),vu=class{draw;zone;i18n;container;pageContainer;isDisableMouseMove;tipContainer;tipContent;currentMoveZone;constructor(e,t){this.draw=e,this.zone=t,this.i18n=e.getI18n(),this.container=e.getContainer(),this.pageContainer=e.getPageContainer();let{tipContainer:n,tipContent:r}=this._drawZoneTip();this.tipContainer=n,this.tipContent=r,this.isDisableMouseMove=!0,this.currentMoveZone=N.MAIN;let i=[],{header:a,footer:o}=e.getOptions();a.disabled||i.push(N.HEADER),o.disabled||i.push(N.FOOTER),i.length&&this._watchMouseMoveZoneChange(i)}_watchMouseMoveZoneChange(e){this.pageContainer.addEventListener(`mousemove`,ye(t=>{if(this.isDisableMouseMove||!this.draw.getIsPagingMode())return;let n=qa(t,this.pageContainer);if(!n?.y){this._updateZoneTip(!1);return}let r=this.zone.getZoneByY(n.y,n.pageNo);e.includes(r)?(this.currentMoveZone=r,this._updateZoneTip(this.zone.getZone()===N.MAIN&&(r===N.HEADER||r===N.FOOTER),t.x,t.y)):this._updateZoneTip(!1)},250)),this.pageContainer.addEventListener(`mouseenter`,()=>{this.isDisableMouseMove=!1}),this.pageContainer.addEventListener(`mouseleave`,()=>{this.isDisableMouseMove=!0,this._updateZoneTip(!1)})}_drawZoneTip(){let e=document.createElement(`div`);e.classList.add(`ce-zone-tip`);let t=document.createElement(`span`);return e.append(t),this.container.append(e),{tipContainer:e,tipContent:t}}_updateZoneTip(e,t,n){e?(this.tipContainer.classList.add(`show`),this.tipContainer.style.left=`${t}px`,this.tipContainer.style.top=`${n}px`,this.tipContent.innerText=this.i18n.t(`zone.${this.currentMoveZone===N.HEADER?`headerTip`:`footerTip`}`)):this.tipContainer.classList.remove(`show`)}}})),bu,xu=o((()=>{Qe(),z(),J(),yu(),bu=class{INDICATOR_PADDING=2;INDICATOR_TITLE_TRANSLATE=[20,5];draw;options;i18n;container;currentZone;indicatorContainer;constructor(e){this.draw=e,this.i18n=e.getI18n(),this.options=e.getOptions(),this.container=e.getContainer(),this.currentZone=N.MAIN,this.indicatorContainer=null,this.options.zone.tipDisabled||new vu(e,this)}isHeaderActive(){return this.getZone()===N.HEADER}isMainActive(){return this.getZone()===N.MAIN}isFooterActive(){return this.getZone()===N.FOOTER}getZone(){return this.currentZone}setZone(e){let{header:t,footer:n}=this.options,r=this.draw.getPageNo();(e!==N.HEADER||t.editable&&!this.draw.getHeader().isDisabled(r))&&(e!==N.FOOTER||n.editable&&!this.draw.getFooter().isDisabled(r))&&this.currentZone!==e&&(this.currentZone=e,this.draw.getRange().clearRange(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),this.drawZoneIndicator(),je(()=>{let t=this.draw.getListener();t.zoneChange&&t.zoneChange(e);let n=this.draw.getEventBus();n.isSubscribe(`zoneChange`)&&n.emit(`zoneChange`,e)}))}getZoneByY(e,t){let n=this.draw.getHeader(),r=n.isDisabled(t),i=r?0:n.getHeaderTop(t)+n.getHeight(t),a=this.draw.getFooter(),o=a.isDisabled(t),s=t===void 0?this.draw.getHeight():this.draw.getPageSize(t).height,c=o?s:s-(a.getFooterBottom(t)+a.getHeight(t));return!r&&e<i?N.HEADER:!o&&e>c?N.FOOTER:N.MAIN}drawZoneIndicator(){if(this._clearZoneIndicator(),!this.isHeaderActive()&&!this.isFooterActive())return;let{scale:e}=this.options,t=this.isHeaderActive(),[n,r]=this.INDICATOR_TITLE_TRANSLATE,i=this.draw.getPageList();this.indicatorContainer=document.createElement(`div`),this.indicatorContainer.classList.add(`ce-zone-indicator`);let a=this.draw.getHeader(),o=this.draw.getFooter();for(let s=0;s<i.length;s++){if(t?a.isDisabled(s):o.isDisabled(s))continue;let{margins:i,innerWidth:c,height:l}=this.draw.getPageSize(s),{x:u,y:d}=this.draw.getPageOffset(s),f=t?a.getHeight(s):o.getHeight(s),p=d+(t?a.getHeaderTop(s):l-o.getFooterBottom(s)-f),m=u+i[3]-this.INDICATOR_PADDING,h=u+i[3]+c+this.INDICATOR_PADDING,g=t?p-this.INDICATOR_PADDING:p+f+this.INDICATOR_PADDING,_=t?p+f+this.INDICATOR_PADDING:p-this.INDICATOR_PADDING,v=document.createElement(`div`);v.innerText=this.i18n.t(`frame.${t?`header`:`footer`}`),v.style.top=`${_}px`,v.style.transform=`translate(${n*e}px, ${r*e}px) scale(${e})`,this.indicatorContainer.append(v);let y=document.createElement(`span`);y.classList.add(`ce-zone-indicator-border__top`),y.style.top=`${g}px`,y.style.width=`${c}px`,y.style.marginLeft=`${u+i[3]}px`,this.indicatorContainer.append(y);let b=document.createElement(`span`);b.classList.add(`ce-zone-indicator-border__left`),b.style.top=`${p}px`,b.style.height=`${f}px`,b.style.left=`${m}px`,this.indicatorContainer.append(b);let x=document.createElement(`span`);x.classList.add(`ce-zone-indicator-border__bottom`),x.style.top=`${_}px`,this.indicatorContainer.append(x);let S=document.createElement(`span`);S.classList.add(`ce-zone-indicator-border__right`),S.style.top=`${p}px`,S.style.height=`${f}px`,S.style.left=`${h}px`,this.indicatorContainer.append(S)}this.container.append(this.indicatorContainer)}_clearZoneIndicator(){this.indicatorContainer?.remove(),this.indicatorContainer=null}}})),Su,Cu=o((()=>{D(),z(),Su=class{draw;position;zone;options;elementList;layoutMap;constructor(e,t){this.draw=e,this.position=e.getPosition(),this.zone=e.getZone(),this.options=e.getOptions(),this.elementList=t||[],this.layoutMap=new Map}getRowList(){return this._getLayoutByDirection(this.options.paperDirection)[0]}setElementList(e){this.elementList=e}getElementList(){return this.elementList}getPositionList(e=this.options.paperDirection){return this._getLayoutByDirection(e)[1]}compute(){this.recovery(),this._getLayoutByDirection(this.options.paperDirection)}recovery(){this.layoutMap.clear()}_getLayoutByDirection(e){let t=this.layoutMap.get(e);if(!t){let n=this._computeRowList(e);t=[n,[]],this.layoutMap.set(e,t),t[1]=this._computePositionList(e,n)}return t}_computeRowList(e){let t=this.draw.getInnerWidth(e);return this.draw.computeRowList({innerWidth:t,elementList:this.elementList})}_computePositionList(e,t){let n=this.getFooterBottom(),r=this.draw.getInnerWidth(e),i=this.draw.getMargins(e)[3],a=this.draw.getHeight(e),o=this.getHeight(void 0,e),s=a-n-o,c=[];return this.position.computePageRowPosition({positionList:c,rowList:t,pageNo:0,startRowIndex:0,startIndex:0,startX:i,startY:s,innerWidth:r,zone:N.FOOTER}),c}getFooterBottom(e){if(this.isDisabled(e))return 0;let{footer:{bottom:t},scale:n}=this.options;return Math.floor(t*n)}getMaxHeight(e){let{footer:{maxHeightRadio:t}}=this.options,n=this.draw.getHeight(e);return Math.floor(n*T[t])}getHeight(e,t){if(this.isDisabled(e))return 0;let n=this._resolveDirection(e,t),r=this.getMaxHeight(n),i=this.getRowHeight(n);return i>r?r:i}getRowHeight(e=this.options.paperDirection){return this._getLayoutByDirection(e)[0].reduce((e,t)=>e+t.height,0)}getExtraHeight(e,t){let n=this._resolveDirection(e,t),r=this.draw.getMargins(n),i=this.getHeight(e,n),a=this.getFooterBottom(e)+i-r[2];return a<=0?0:a}_resolveDirection(e,t){return t??(e===void 0?this.options.paperDirection:this.draw.getPageDirection(e))}isDisabled(e){return!!(this.options.footer.disabled||e!==void 0&&this.options.footer.disabledPages.includes(e))}render(e,t){if(this.options.footer.disabledPages.includes(t))return;e.save(),e.globalAlpha=this.zone.isFooterActive()?1:this.options.footer.inactiveAlpha;let n=this.draw.getPageDirection(t),r=this.draw.getInnerWidth(n),i=this.getMaxHeight(n),[a,o]=this._getLayoutByDirection(n),s=[],c=0;for(let e=0;e<a.length;e++){let t=a[e];if(c+t.height>i)break;s.push(t),c+=t.height}this.draw.drawRow(e,{elementList:this.elementList,positionList:o,rowList:s,pageNo:t,startIndex:0,innerWidth:r,zone:N.FOOTER}),e.restore()}}})),wu,Tu=o((()=>{D(),tn(),V(),Ha(),Xt(),J(),wu=class{draw;range;options;UN_COUNT_STYLE_WIDTH=20;MEASURE_BASE_TEXT=`0`;LIST_GAP=10;LIST_INDENT_WIDTH=30;MAX_LEVEL=8;constructor(e){this.draw=e,this.range=e.getRange(),this.options=e.getOptions()}setList(e,t){if(this.draw.isReadonly())return;let{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;let i=this.range.getRangeParagraphElementList();if(!i||!i.length)return;if(i.find(n=>n.listType===e&&n.listStyle===t)||!e){this.unsetList();return}let a=q();this.draw.setElementProperty(i,{listId:a,listType:e,listStyle:t,listLevel:0});let o=n===r,s=o?r:n;this.draw.render({curIndex:s,isSetCursor:o})}unsetList(){if(this.draw.isReadonly())return;let{startIndex:e,endIndex:t}=this.range.getRange();if(!~e&&!~t)return;let n=this.range.getRangeParagraphElementList()?.filter(e=>e.listId);if(!n||!n.length)return;let r=this.draw.getElementList(),i=r[t];if(i.listId){let e=t+1;for(;e<r.length;){let t=r[e];if(t.value===``&&!t.listWrap)break;if(t.listId!==i.listId){this.draw.spliceElementList(r,e,0,[{value:``}]);break}e++}}this.draw.deleteElementProperty(n,[`listId`,`listType`,`listStyle`,`listWrap`,`listLevel`]);let a=e===t,o=a?t:e;this.draw.render({curIndex:o,isSetCursor:a})}increaseListLevel(){if(this.draw.isReadonly())return;let{startIndex:e,endIndex:t}=this.range.getRange();if(!~e&&!~t)return;let n=this.extractListSegments();if(!n.length)return;let r=this.draw.getElementList(),i=!1;for(let e of n){let t=e[0]?.listLevel??0;if(t>=this.MAX_LEVEL)continue;let n=t+1;this.applySegmentLevel(e,n,r),i=!0}if(!i)return;let a=e===t,o=a?t:e;this.draw.render({curIndex:o,isSetCursor:a})}decreaseListLevel(){if(this.draw.isReadonly())return;let{startIndex:e,endIndex:t}=this.range.getRange();if(!~e&&!~t)return;let n=this.extractListSegments();if(!n.length)return;if(n.some(e=>e[0]?.listId&&(e[0].listLevel??0)===0)){let r=this.draw.getElementList();for(let e of n){let t=e[0]?.listId;for(let t of e)this.clearListInfo(t);t&&this.clearPreviousEmptyListItems(r,e[0],t)}let i=e===t,a=i?t:e;this.draw.render({curIndex:a,isSetCursor:i});return}let r=this.draw.getElementList(),i=!1;for(let e of n){let t=e[0]?.listLevel??0;if(t<=0)continue;let n=t-1;this.applySegmentLevel(e,n,r),i=!0}if(!i)return;let a=e===t,o=a?t:e;this.draw.render({curIndex:o,isSetCursor:a})}applySegmentLevel(e,t,n){let r=e[0],i=this.findPreviousListId(r,t,n)||q();this.draw.setElementProperty(e,{listId:i,listLevel:t}),r.listType&&this.draw.setElementProperty(e,{listType:r.listType}),r.listStyle&&this.draw.setElementProperty(e,{listStyle:r.listStyle})}findPreviousListId(e,t,n){let r=n.indexOf(e);if(~r)for(let i=r-1;i>=0;i--){let r=n[i];if(r?.listId&&!(r.value!==``||r.listWrap)){if((r.listLevel??0)<t)break;if(r.listType===e.listType&&(r.listLevel??0)===t&&this.isParagraphStart(n,i))return r.listId}}}isParagraphStart(e,t){let n=e[t],r=e[t-1];return!r||r.value===``||r.listId!==n.listId||n.value===``&&!n.listWrap}clearListInfo(e){e.listId&&this.draw.deleteElementProperty(e,[`listId`,`listType`,`listStyle`,`listWrap`,`listLevel`])}clearPreviousEmptyListItems(e,t,n){let r=e.indexOf(t);for(let t=r-1;t>=0;t--){let r=e[t];if(r.listId!==n||r.value!==``||r.listWrap)break;this.clearListInfo(r)}}extractListSegments(){let{startIndex:e,endIndex:t}=this.range.getRange();if(!~e&&!~t)return[];let n=this.draw.getElementList();if(!n.length)return[];let r=Math.min(e,t),i=Math.max(e,t);if(n[r]?.value!==``||n[r]?.listWrap||!n[r]?.listId)for(;r>0;){let e=n[r-1];if(!e)break;if(e.value===``&&!e.listWrap){e.listId&&r--;break}r--}for(;i<n.length-1;){let e=n[i+1];if(!e||e.value===``&&!e.listWrap)break;i++}let a=[],o=[];for(let e=r;e<=i;e++){let t=n[e];t.value===``&&!t.listWrap&&o.length>0&&(o.length&&a.push(o),o=[]),o.push(t)}return o.length&&a.push(o),a.filter(e=>e.some(e=>e.listId))}computeListStyle(e,t){let n=new Map,r=0,i=t[r].listId,a=[],o=t.length;for(;r<o;){let o=t[r];if(i&&i===o.listId)a.push(o);else if(o.listId&&o.listId!==i){if(a.length){let t=this.getListStyleWidth(e,a);n.set(i,t)}i=o.listId,a=i?[o]:[]}r++}if(a.length){let t=this.getListStyleWidth(e,a);n.set(i,t)}return n}findStyledElement(e){let t=e[0];for(let n=1;n<e.length;n++){let r=e[n];if(r.font||r.size||r.bold||r.italic){t=r;break}}return t}getListFontStyle(e,t){if(this.options.list.inheritStyle){let n=this.findStyledElement(e);return this.draw.getElementFont(n,t)}{let{defaultFont:e,defaultSize:n}=this.options;return`${n*t}px ${e}`}}getListStyleWidth(e,t){let{scale:n,checkbox:r}=this.options,i=t[0];if(i.listStyle&&i.listStyle!==Yt.DECIMAL)return i.listStyle===Yt.CHECKBOX?(r.width+this.LIST_GAP)*n:this.UN_COUNT_STYLE_WIDTH*n;let a=t.reduce((e,t)=>(t.value===``&&(e+=1),e),0);if(!a)return 0;e.save(),e.font=this.getListFontStyle(t,n);let o=`${this.MEASURE_BASE_TEXT.repeat(String(a).length-1||1)}${Z.PERIOD}`,s=this.draw.getTextMeasurer().measureText(o,e.font);return e.restore(),Math.ceil((s.width+this.LIST_GAP)*n)}drawListStyle(e,t,n){let{elementList:r,offsetX:i,listIndex:a,ascent:o}=t,s=r[0];if(s.value!==``||s.listWrap)return;let c=0,{defaultTabWidth:l,scale:u}=this.options;for(let e=1;e<r.length&&r[e]?.type===B.TAB;e++)c+=l*u;let{coordinate:{leftTop:[d,f]}}=n,p=s.listLevel?this.LIST_INDENT_WIDTH*s.listLevel*u:0,m=d-i+p+c,h=f+o;if(s.listStyle===Yt.CHECKBOX){let{width:n,height:r,gap:i}=this.options.checkbox,a={...s,checkbox:{value:!!s.checkbox?.value,markType:s.checkbox?.markType},metrics:{...s.metrics,width:(n+i*2)*u,height:r*u}};this.draw.getCheckboxParticle().render({ctx:e,x:m-i*u,y:h,index:0,row:{...t,elementList:[a,...t.elementList]}})}else{let t=``;if(s.listType===qt.UL){let e=s.listLevel??0,n=[Jt.DISC,Jt.CIRCLE,Jt.SQUARE],r=n[e%n.length],i=e===0?s.listStyle||Jt.DISC:r;t=Qt[i]||Qt[Jt.DISC]}else t=`${a+1}${Z.PERIOD}`;if(!t)return;e.save(),e.font=this.getListFontStyle(r,u),e.fillText(t,m,h),e.restore()}}}})),Eu,Du=o((()=>{Eu=class e{options;static WIDTH=12;static HEIGHT=9;static GAP=3;constructor(e){this.options=e.getOptions()}render(t,n,r,i){let{scale:a,lineBreak:{color:o,lineWidth:s}}=this.options;t.save(),t.beginPath();let c=i-e.HEIGHT*a/2,l=r+n.metrics.width;t.translate(l,c),t.scale(a,a),t.strokeStyle=o,t.lineWidth=s,t.lineCap=`round`,t.lineJoin=`round`,t.beginPath(),t.moveTo(8,0),t.lineTo(12,0),t.lineTo(12,6),t.lineTo(3,6),t.moveTo(3,6),t.lineTo(6,3),t.moveTo(3,6),t.lineTo(6,9),t.stroke(),t.closePath(),t.restore()}}})),Ou,ku=o((()=>{gi(),Du(),Ou=class{draw;position;options;elementList;rowList;positionList;constructor(e){this.draw=e,this.position=e.getPosition(),this.options=e.getOptions(),this.elementList=[],this.rowList=[],this.positionList=[]}_recovery(){this.elementList=[],this.rowList=[],this.positionList=[]}_compute(e){this._computeRowList(),this._computePositionList(e)}_computeRowList(){let e=this.draw.getInnerWidth();this.rowList=this.draw.computeRowList({innerWidth:e,elementList:this.elementList})}_computePositionList(e){let{lineBreak:t,scale:n}=this.options,r=this.draw.getHeader().getExtraHeight(),i=this.draw.getInnerWidth(),a=this.draw.getMargins(),o=a[3];t.disabled||(o+=(Eu.WIDTH+Eu.GAP)*n);let s=e?.startY||a[0]+r;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:o,startY:s,innerWidth:i})}render(e,t){let{placeholder:n=this.options.placeholder}=t||{},{data:r,font:i,size:a,color:o,opacity:s}=n;this._recovery(),this.elementList=[{value:r,font:i,size:a,color:o}],Vr(this.elementList,{editorOptions:this.options,isForceCompensation:!0}),this._compute(t);let c=this.draw.getInnerWidth();e.save(),e.globalAlpha=s,this.draw.drawRow(e,{elementList:this.elementList,positionList:this.positionList,rowList:this.rowList,pageNo:0,startIndex:0,innerWidth:c,isDrawLineBreak:!1,isDrawRange:!1}),e.restore()}}})),Au,ju=o((()=>{z(),V(),J(),Au=class{draw;options;range;fillRectMap;constructor(e){this.draw=e,this.options=e.getOptions(),this.range=e.getRange(),this.fillRectMap=new Map}setGroup(){if(this.draw.getZone().getZone()!==N.MAIN)return null;let e=this.range.getSelection();if(!e)return null;let t=q();return e.forEach(e=>{Array.isArray(e.groupIds)||(e.groupIds=[]),e.groupIds.push(t)}),this.draw.render({isSetCursor:!1,isCompute:!1}),t}getElementListByGroupId(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type===B.TABLE){let e=i.trList;for(let r=0;r<e.length;r++){let i=e[r];for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e],a=this.getElementListByGroupId(r.value,t);if(a.length)return n.push(...a),n}}}if(i?.groupIds?.includes(t)&&(n.push(i),!e[r+1]?.groupIds?.includes(t)))break}return n}deleteGroup(e){let t=this.draw.getOriginalMainElementList(),n=this.getElementListByGroupId(t,e);if(n.length){for(let t=0;t<n.length;t++){let r=n[t],i=r.groupIds,a=i.findIndex(t=>t===e);i.splice(a,1),i.length||delete r.groupIds}this.draw.render({isSetCursor:!1,isCompute:!1})}}getContextByGroupId(e,t){for(let n=0;n<e.length;n++){let r=e[n];if(r.type===B.TABLE){let e=r.trList;for(let i=0;i<e.length;i++){let a=e[i];for(let e=0;e<a.tdList.length;e++){let o=a.tdList[e],s=this.getContextByGroupId(o.value,t);if(s)return{...s,isTable:!0,index:n,trIndex:i,tdIndex:e,tdId:o.id,trId:a.id,tableId:r.tableId}}}}let i=e[n+1];if(r.groupIds?.includes(t)&&!i?.groupIds?.includes(t))return{isTable:!1,startIndex:n,endIndex:n}}return null}clearFillInfo(){this.fillRectMap.clear()}recordFillInfo(e,t,n,r,i){let a=e.groupIds;if(a)for(let e of a){let a=this.fillRectMap.get(e);a?a.width+=r:this.fillRectMap.set(e,{x:t,y:n,width:r,height:i})}}render(e){if(!this.fillRectMap.size)return;let t=this.range.getRange(),n=this.draw.getElementList()[t.endIndex]?.groupIds,{group:{backgroundColor:r,opacity:i,activeOpacity:a,activeBackgroundColor:o}}=this.options;e.save(),this.fillRectMap.forEach((t,s)=>{let{x:c,y:l,width:u,height:d}=t;n?.includes(s)?(e.globalAlpha=a,e.fillStyle=o):(e.globalAlpha=i,e.fillStyle=r),e.fillRect(c,l,u,d)}),e.restore(),this.clearFillInfo()}}})),Mu,Nu=o((()=>{Mu=class{options;constructor(e){this.options=e.getOptions()}render(e,t,n,r){let{scale:i,whiteSpace:{color:a,radius:o}}=this.options,s=t.metrics;e.save(),e.fillStyle=a,e.beginPath(),e.arc(n+s.width/2,r,o*i,0,Math.PI*2),e.fill(),e.closePath(),e.restore()}}})),Pu,Fu=o((()=>{Pu=class{draw;eventBus;pageContainer;constructor(e){this.draw=e,this.eventBus=this.draw.getEventBus(),this.pageContainer=this.draw.getPageContainer(),this.pageContainer.addEventListener(`mousemove`,this._mousemove.bind(this)),this.pageContainer.addEventListener(`mouseenter`,this._mouseenter.bind(this)),this.pageContainer.addEventListener(`mouseleave`,this._mouseleave.bind(this)),this.pageContainer.addEventListener(`mousedown`,this._mousedown.bind(this)),this.pageContainer.addEventListener(`mouseup`,this._mouseup.bind(this)),this.pageContainer.addEventListener(`click`,this._click.bind(this))}_mousemove(e){this.eventBus.isSubscribe(`mousemove`)&&this.eventBus.emit(`mousemove`,e)}_mouseenter(e){this.eventBus.isSubscribe(`mouseenter`)&&this.eventBus.emit(`mouseenter`,e)}_mouseleave(e){this.eventBus.isSubscribe(`mouseleave`)&&this.eventBus.emit(`mouseleave`,e)}_mousedown(e){this.eventBus.isSubscribe(`mousedown`)&&this.eventBus.emit(`mousedown`,e)}_mouseup(e){this.eventBus.isSubscribe(`mouseup`)&&this.eventBus.emit(`mouseup`,e)}_click(e){this.eventBus.isSubscribe(`click`)&&this.eventBus.emit(`click`,e)}}})),Iu,Lu=o((()=>{ur(),Iu=class{draw;options;constructor(e){this.draw=e,this.options=e.getOptions()}render(e,t){let{scale:n,lineNumber:{color:r,size:i,font:a,right:o,type:s}}=this.options,{margins:c}=this.draw.getPageSize(t),l=this.draw.getPosition().getOriginalMainPositionList(),u=this.draw.getPageRowList()[t],d=`${i*n}px ${a}`;e.save(),e.fillStyle=r,e.font=d;for(let t=0;t<u.length;t++){let r=u[t],{coordinate:{leftBottom:i}}=r.fragmentPosition||l[r.startIndex],a=s===lr.PAGE?t+1:r.rowIndex+1,f=this.draw.getTextMeasurer().measure({value:`${a}`},d),p=c[3]-f.width-o*n,m=i[1]-f.actualBoundingBoxAscent;e.fillText(`${a}`,p,m)}e.restore()}}})),Ru,zu=o((()=>{Ru=class{draw;header;footer;options;constructor(e){this.draw=e,this.header=e.getHeader(),this.footer=e.getFooter(),this.options=e.getOptions()}render(e,t){let{scale:n,pageBorder:{color:r,lineWidth:i,padding:a}}=this.options;e.save(),e.translate(.5,.5),e.strokeStyle=r,e.lineWidth=i*n;let{margins:o,innerWidth:s,height:c}=this.draw.getPageSize(t),l=o[3]-a[3]*n,u=o[0]+this.header.getExtraHeight(t)-a[0]*n,d=s+(a[1]+a[3])*n,f=c-u-this.footer.getExtraHeight(t)-o[2]+a[2]*n;e.rect(l,u,d,f),e.stroke(),e.restore()}}}));function Bu(e,t){let{value:n,oldValue:r}=t;r.isTable&&!n.isTable&&e.getTableTool().dispose()}var Vu=o((()=>{})),Hu,Uu=o((()=>{Vu(),Hu=class{draw;eventBus;constructor(e){this.draw=e,this.eventBus=e.getEventBus(),this.execute()}execute(){this.eventBus.on(`positionContextChange`,e=>{Bu(this.draw,e)})}}})),Wu,Gu=o((()=>{Dp(),D(),Kt(),J(),gi(),bi(),Wu=class{draw;range;position;tableTool;tableParticle;options;constructor(e){this.draw=e,this.range=e.getRange(),this.position=e.getPosition(),this.tableTool=e.getTableTool(),this.tableParticle=e.getTableParticle(),this.options=e.getOptions()}insertTable(e,t){let{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;let{defaultTrMinHeight:i}=this.options.table,a=this.draw.getElementList(),o=0;if(a[n]?.listId){let{rowIndex:e}=this.position.getPositionList()[n];o=this.draw.getRowList()[e]?.offsetX||0}let s=this.draw.getContextInnerWidth()-o,c=[],l=s/t;for(let e=0;e<t;e++)c.push({width:l});let u=[];for(let n=0;n<e;n++){let e=[],n={height:i,tdList:e};for(let n=0;n<t;n++)e.push({colspan:1,rowspan:1,value:[]});u.push(n)}let d={type:B.TABLE,value:``,colgroup:c,trList:u};Vr([d],{editorOptions:this.options}),Zr(a,[d],n,{editorOptions:this.options});let f=n+1;n!==r&&this.draw.deleteElementList(a,f,r-n),this.draw.getTraceParticle().markElementListInserted([d]),this.draw.spliceElementList(a,f,0,[d]),this.range.setRange(f,f),this.draw.render({curIndex:f,isSetCursor:!1})}insertTableTopRow(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,trIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[n];if(o.tdList.length<i.colgroup.length){let e=o.tdList.length?o.tdList[0].rowIndex:n;for(let t=0;t<n;t++){let n=a[t];for(let t=0;t<n.tdList.length;t++){let r=n.tdList[t];r.rowspan>1&&r.rowIndex+r.rowspan>=e+1&&(r.rowspan+=1)}}}let s=q(),c={height:o.height,id:s,tdList:[]};for(let e=0;e<o.tdList.length;e++){let t=o.tdList[e],n=q();c.tdList.push({id:n,rowspan:1,colspan:t.colspan,value:[{value:``,size:16,tableId:r,trId:s,tdId:n}]})}a.splice(n,0,c),this.position.setPositionContext({isTable:!0,index:t,trIndex:n,tdIndex:0,tdId:c.tdList[0]?.id,trId:c.id,tableId:r}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableBottomRow(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,trIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[n],s=a.length-1===n?o:a[n+1];if(s.tdList.length<i.colgroup.length){let e=s.tdList.length?s.tdList[0].rowIndex:s===o?n:n+1;for(let t=0;t<n+1;t++){let n=a[t];for(let t=0;t<n.tdList.length;t++){let r=n.tdList[t];r.rowspan>1&&r.rowIndex+r.rowspan>=e+1&&(r.rowspan+=1)}}}let c=q(),l={height:s.height,id:c,tdList:[]};for(let e=0;e<s.tdList.length;e++){let t=s.tdList[e],n=q();l.tdList.push({id:n,rowspan:1,colspan:t.colspan,value:[{value:``,size:16,tableId:r,trId:c,tdId:n}]})}a.splice(n+1,0,l),this.position.setPositionContext({isTable:!0,index:t,trIndex:n+1,tdIndex:0,tdId:l.tdList[0]?.id,trId:l.id,tableId:i.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}adjustColWidth(e){if(e.type!==B.TABLE)return;let{defaultColMinWidth:t,overflow:n}=this.options.table;if(n)return;let r=e.colgroup,i=r.reduce((e,t)=>e+t.width,0),a=this.draw.getOriginalInnerWidth();if(i>a){let e=r.filter(e=>e.width>t),n=(i-a)/e.length;for(let e=0;e<r.length;e++){let i=r[e];i.width-n>=t&&(i.width-=n)}}}insertTableLeftCol(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,tdIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=n;for(let e=0;e<a.length;e++){let t=a[e],n=q();t.tdList.splice(o,0,{id:n,rowspan:1,colspan:1,value:[{value:``,size:16,tableId:r,trId:t.id,tdId:n}]})}let{defaultColMinWidth:s}=this.options.table;i.colgroup.splice(o,0,{width:s}),this.adjustColWidth(i),this.position.setPositionContext({isTable:!0,index:t,trIndex:0,tdIndex:o,tdId:a[0].tdList[o].id,trId:a[0].id,tableId:r}),this.range.setRange(0,0),this.draw.render({curIndex:0}),this.tableTool.render()}insertTableRightCol(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,tdIndex:n,tableId:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=n+1;for(let e=0;e<a.length;e++){let t=a[e],n=q();t.tdList.splice(o,0,{id:n,rowspan:1,colspan:1,value:[{value:``,size:16,tableId:r,trId:t.id,tdId:n}]})}let{defaultColMinWidth:s}=this.options.table;i.colgroup.splice(o,0,{width:s}),this.adjustColWidth(i),this.position.setPositionContext({isTable:!0,index:t,trIndex:0,tdIndex:o,tdId:a[0].tdList[o].id,trId:a[0].id,tableId:i.id}),this.range.setRange(0,0),this.draw.render({curIndex:0})}deleteTableRow(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,trIndex:n,tdIndex:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[n],s=o.tdList[r].rowIndex;if(a.length<=1)this.deleteTable();else{for(let e=0;e<s;e++){let t=a[e].tdList;for(let e=0;e<t.length;e++){let n=t[e];n.rowIndex+n.rowspan>s&&n.rowspan--}}for(let e=0;e<o.tdList.length;e++){let t=o.tdList[e];if(t.rowspan>1){let r=q(),o=a[n+1];o.tdList.splice(e,0,{id:r,rowspan:t.rowspan-1,colspan:t.colspan,value:[{value:``,size:16,tableId:i.id,trId:o.id,tdId:r}]})}}a.splice(n,1),this.position.setPositionContext({isTable:!1}),this.range.clearRange(),this.draw.render({curIndex:e.index}),this.tableTool.dispose()}}deleteTableCol(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t,tdIndex:n,trIndex:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[r].tdList[n].colIndex;if(!a.find(e=>e.tdList.length>1))this.deleteTable();else{for(let e=0;e<a.length;e++){let t=a[e];for(let e=0;e<t.tdList.length;e++){let n=t.tdList[e];n.colIndex<=o&&n.colIndex+n.colspan>o&&(n.colspan>1?n.colspan--:t.tdList.splice(e,1))}}i.colgroup?.splice(o,1),this.position.setPositionContext({isTable:!1}),this.range.setRange(0,0),this.draw.render({curIndex:e.index}),this.tableTool.dispose()}}deleteTable(){let e=this.position.getPositionContext();if(!e.isTable)return;let t=this.draw.getOriginalElementList(),n=e.index;t.splice(n,1);let r=n-1;this.position.setPositionContext({isTable:!1,index:r}),this.range.setRange(r,r),this.draw.render({curIndex:r}),this.tableTool.dispose()}mergeTableCell(){let e=this.position.getPositionContext();if(!e.isTable)return;let{isCrossRowCol:t,startTdIndex:n,endTdIndex:r,startTrIndex:i,endTrIndex:a}=this.range.getRange();if(!t)return;let o=this.draw.getOriginalElementList(),s=this.position.getTableElementByContext(o,e),c=s.trList,l=c[i].tdList[n],u=c[a].tdList[r];(l.x>u.x||l.y>u.y)&&([l,u]=[u,l]);let d=l.colIndex,f=u.colIndex+(u.colspan-1),p=l.rowIndex,m=u.rowIndex+(u.rowspan-1),h=[];for(let e=0;e<c.length;e++){let t=c[e],n=[];for(let e=0;e<t.tdList.length;e++){let r=t.tdList[e],i=r.colIndex,a=r.rowIndex;i>=d&&i<=f&&a>=p&&a<=m&&n.push(r)}n.length&&h.push(n)}if(!h.length)return;let g=h[h.length-1],_=h[0][0],v=g[g.length-1],y=_.x,b=_.y,x=v.x+v.width,S=v.y+v.height;for(let e=0;e<h.length;e++){let t=h[e];for(let e=0;e<t.length;e++){let n=t[e],r=n.x,i=n.y,a=r+n.width,o=i+n.height;if(y>r||b>i||x<a||S<o)return}}let C=[],w=h[0][0],T=w.value[0];for(let e=0;e<h.length;e++){let t=h[e];for(let n=0;n<t.length;n++){let r=t[n];if(e!==0||n!==0){C.push(r.id);let e=r.value.length>1?0:1;for(let t=e;t<r.value.length;t++){let e=r.value[t];Ne(Pt,T,e),w.value.push(e)}}e===0&&n!==0&&(w.colspan+=r.colspan),e!==0&&w.colIndex===r.colIndex&&(w.rowspan+=r.rowspan)}}for(let e=0;e<c.length;e++){let t=c[e],n=0;for(;n<t.tdList.length;){let e=t.tdList[n];C.includes(e.id)&&(t.tdList.splice(n,1),n--),n++}}this.position.setPositionContext(this.position.buildTablePositionContext(e,s,w.trIndex,w.tdIndex));let E=w.value.length-1;this.range.setRange(E,E),this.draw.render(),this.tableTool.render()}cancelMergeTableCell(){let e=this.position.getPositionContext();if(!e.isTable)return;let{tdIndex:t,trIndex:n}=e,r=this.draw.getOriginalElementList(),i=this.position.getTableElementByContext(r,e),a=i.trList,o=a[n],s=o.tdList[t];if(s.rowspan===1&&s.colspan===1)return;let c=s.colspan;if(s.colspan>1){for(let e=1;e<s.colspan;e++){let n=q();o.tdList.splice(t+e,0,{id:n,rowspan:1,colspan:1,value:[{value:``,size:16,tableId:i.id,trId:o.id,tdId:n}]})}s.colspan=1}if(s.rowspan>1){for(let e=1;e<s.rowspan;e++){let t=a[n+e];for(let e=0;e<c;e++){let e=q();t.tdList.splice(s.colIndex,0,{id:e,rowspan:1,colspan:1,value:[{value:``,size:16,tableId:i.id,trId:t.id,tdId:e}]})}}s.rowspan=1}let l=s.value.length-1;this.range.setRange(l,l),this.draw.render(),this.tableTool.render()}splitVerticalTableCell(){let e=this.position.getPositionContext();if(!e.isTable||this.range.getRange().isCrossRowCol)return;let{index:t,tdIndex:n,trIndex:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[r],s=o.tdList[n];i.colgroup.splice(n+1,0,{width:this.options.table.defaultColMinWidth});for(let e=0;e<a.length;e++){let t=a[e],n=0;for(;n<t.tdList.length;){let e=t.tdList[n];if(e.rowIndex!==s.rowIndex)e.colIndex<=s.colIndex&&e.colIndex+e.colspan>s.colIndex&&e.colspan++;else if(e.id===s.id){let e=q();o.tdList.splice(n+s.colspan,0,{id:e,rowspan:s.rowspan,colspan:1,value:[{value:``,size:16,tableId:i.id,trId:t.id,tdId:e}]}),n++}n++}}this.draw.render(),this.tableTool.render()}splitHorizontalTableCell(){let e=this.position.getPositionContext();if(!e.isTable||this.range.getRange().isCrossRowCol)return;let{index:t,tdIndex:n,trIndex:r}=e,i=this.draw.getOriginalElementList()[t],a=i.trList,o=a[r].tdList[n],s=-1,c=0;for(;c<a.length;){if(c===s){c++;continue}let e=a[c],t=0;for(;t<e.tdList.length;){let n=e.tdList[t];if(n.id===o.id){let e=q(),t=q();a.splice(c+o.rowspan,0,{id:e,height:this.options.table.defaultTrMinHeight,tdList:[{id:t,rowspan:1,colspan:o.colspan,value:[{value:``,size:16,tableId:i.id,trId:e,tdId:t}]}]}),s=c+o.rowspan}else n.rowIndex>=o.rowIndex&&n.rowIndex<o.rowIndex+o.rowspan&&n.rowIndex+n.rowspan>=o.rowIndex+o.rowspan&&n.rowspan++;t++}c++}this.draw.render(),this.tableTool.render()}tableTdVerticalAlign(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;for(let n=0;n<t.length;n++){let r=t[n];for(let t=0;t<r.length;t++){let n=r[t];n&&n.verticalAlign!==e&&(n.verticalAlign||e!==Cn.TOP)&&(n.verticalAlign=e)}}let{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n})}tableBorderType(e){let t=this.position.getPositionContext();if(!t.isTable)return;let{index:n}=t,r=this.draw.getOriginalElementList()[n];if(!r.borderType&&e===mn.ALL||r.borderType===e)return;r.borderType=e;let{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i})}tableBorderColor(e){let t=this.position.getPositionContext();if(!t.isTable)return;let{index:n}=t,r=this.draw.getOriginalElementList()[n];if(!r.borderColor&&e===this.options.table.defaultBorderColor||r.borderColor===e)return;r.borderColor=e;let{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i,isCompute:!1})}tableTdBorderType(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;let n=t.flat(),r=n.some(t=>!t.borderTypes?.includes(e));n.forEach(t=>{t.borderTypes||=[];let n=t.borderTypes.findIndex(t=>t===e);r?~n||t.borderTypes.push(e):~n&&t.borderTypes.splice(n,1),t.borderTypes.length||delete t.borderTypes});let{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i})}tableTdBorderColor(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;t.flat().forEach(t=>{e?t.borderColor=e:delete t.borderColor});let{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n,isCompute:!1})}tableTdBorderWidth(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;t.flat().forEach(t=>{e?t.borderWidth=e:delete t.borderWidth});let{endIndex:n}=this.range.getRange();this.draw.render({curIndex:n,isCompute:!1})}tableTdSlashType(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;let n=t.flat(),r=n.some(t=>!t.slashTypes?.includes(e));n.forEach(t=>{t.slashTypes||=[];let n=t.slashTypes.findIndex(t=>t===e);r?~n||t.slashTypes.push(e):~n&&t.slashTypes.splice(n,1),t.slashTypes.length||delete t.slashTypes});let{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i})}tableTdBackgroundColor(e){let t=this.tableParticle.getRangeRowCol();if(!t)return;for(let n=0;n<t.length;n++){let r=t[n];for(let t=0;t<r.length;t++){let n=r[t];n.backgroundColor=e}}let{endIndex:n}=this.range.getRange();this.range.setRange(n,n),this.draw.render({isCompute:!1})}_measureTdContentWidth(e){let t=document.createElement(`canvas`).getContext(`2d`),n=this.draw.getTextParticle(),r=0,i=0;for(let a=0;a<e.value.length;a++){let o=e.value[a];o.value===``?(r=Math.max(r,i),i=0):o.type&&o.type!==B.TEXT||(t.font=this.draw.getElementFont(o),i+=n.measureText(t,o).width)}return Math.max(r,i)}tableAutoFitToContent(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t}=e,n=this.draw.getOriginalElementList()[t];if(n?.type!==B.TABLE)return;let{defaultColMinWidth:r,tdPadding:i,overflow:a}=this.options.table,o=i[1]+i[3],s=n.colgroup,c=s.map(()=>0);for(let e=0;e<n.trList.length;e++){let t=n.trList[e].tdList;for(let e=0;e<t.length;e++){let n=t[e];if(n.colspan>1)continue;let r=n.colIndex,i=this._measureTdContentWidth(n)+o;i>c[r]&&(c[r]=i)}}for(let e=0;e<s.length;e++)c[e]&&(s[e].width=Math.max(r,c[e]));a||(vi(s,this.draw.getOriginalInnerWidth(),r),n.translateX=0);let{endIndex:l}=this.range.getRange();this.draw.render({curIndex:l}),this.tableTool.render()}tableAutoFitToPage(){let e=this.position.getPositionContext();if(!e.isTable)return;let{index:t}=e,n=this.draw.getOriginalElementList()[t];if(n?.type!==B.TABLE)return;yi(n.colgroup,this.draw.getOriginalInnerWidth()),n.translateX=0;let{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r}),this.tableTool.render()}tableSelectAll(){let{index:e,tableId:t,isTable:n}=this.position.getPositionContext();if(!n||!t)return;let{startIndex:r,endIndex:i}=this.range.getRange(),a=this.draw.getOriginalElementList()[e].trList,o=a.length-1;for(;o>0&&!a[o].tdList.length;)o--;let s=a[o].tdList.length-1;this.range.replaceRange({startIndex:r,endIndex:i,tableId:t,startTdIndex:0,endTdIndex:s,startTrIndex:0,endTrIndex:o}),this.draw.render({isSetCursor:!1,isCompute:!1,isSubmitHistory:!1})}}})),Ku,qu=o((()=>{Ku=function(e){return e.EDIT=`edit`,e.READONLY=`readonly`,e.FORM=`form`,e}({})})),Ju,Yu=o((()=>{J(),V(),z(),x(),gi(),qu(),ku(),Yn(),Ju=class{draw;zone;range;position;options;areaInfoMap=new Map;constructor(e){this.draw=e,this.options=e.getOptions(),this.zone=e.getZone(),this.range=e.getRange(),this.position=e.getPosition()}getAreaInfo(){return this.areaInfoMap}getActiveAreaId(){if(!this.areaInfoMap.size)return null;let{startIndex:e}=this.range.getRange();return this.draw.getElementList()[e]?.areaId||null}getActiveAreaInfo(){let e=this.getActiveAreaId();return e&&this.areaInfoMap.get(e)||null}isReadonly(){let e=this.getActiveAreaInfo();if(!e?.area)return!1;switch(e.area.mode){case Ku.EDIT:return!1;case Ku.READONLY:return!0;case Ku.FORM:return!this.draw.getControl().getIsRangeWithinControl();default:return!1}}insertArea(e){let{id:t,value:n,area:r,position:i,range:a}=e;if(this.zone.getZone()!==N.MAIN&&this.zone.setZone(N.MAIN),a&&!this.getActiveAreaId()){let{startIndex:e,endIndex:t}=a,n=this.draw.getMainElementList();if(!n[e]||!n[t])return null;this.range.setRange(a.startIndex,a.endIndex)}else if(i===_.BEFORE)this.range.setRange(0,0);else{let e=this.draw.getMainElementList().length-1;this.range.setRange(e,e)}let o=t||q();return this.draw.insertElementList([{type:B.AREA,value:``,areaId:o,valueList:n,area:K(r)}]),o}render(e,t){if(!this.areaInfoMap.size)return;e.save();let n=this.draw.getMargins(),r=this.draw.getInnerWidth();for(let i of this.areaInfoMap){let{area:a,positionList:o,tableCell:s,paddingSegmentList:c}=i[1];if(a?.hide&&!this.draw.isAreaHideDisabled()||!a?.backgroundColor&&!a?.borderColor&&!a?.placeholder)continue;let l=o.filter(e=>e.pageNo===t),u=c?.filter(e=>e.pageNo===t)||[];if(!l.length&&!u.length)continue;e.translate(.5,.5);let d=!!s,f=this.draw.getTdPadding(),p=d?s.tablePosition.coordinate.leftTop[0]+s.td.x*this.options.scale+f[3]:n[3],m=d?s.td.width*this.options.scale-f[1]-f[3]:r;if(l.length){let t=l[0],n=l[l.length-1],r=Math.ceil(t.coordinate.leftTop[1]),i=Math.ceil(n.coordinate.rightBottom[1]-r);a.backgroundColor&&(e.fillStyle=a.backgroundColor,e.fillRect(p,r,m,i)),a.borderColor&&(e.strokeStyle=a.borderColor,e.strokeRect(p,r,m,i)),a.placeholder&&o.length<=1&&new Ou(this.draw).render(e,{placeholder:{...Jn,...a.placeholder},startY:t.coordinate.leftTop[1]})}for(let t of u)a.backgroundColor&&(e.fillStyle=a.backgroundColor,e.fillRect(p,t.y,m,t.height)),a.borderColor&&(e.strokeStyle=a.borderColor,e.strokeRect(p,t.y,m,t.height));e.translate(-.5,-.5)}e.restore()}compute(){this.areaInfoMap.clear();let e=this.draw.getOriginalMainElementList(),t=this.position.getOriginalMainPositionList();this.computeAreaInfo(e,t,e),this.computePaddingSegmentList(t)}computePaddingSegmentList(e){if(this.areaInfoMap.size)for(let t of this.draw.getMainRowList()){let n=t.areaPaddingCarry;if(!n)continue;let r=this.areaInfoMap.get(n.areaId),i=e[t.startIndex];if(!r||!i)continue;let a=t.elementList.some(e=>e.areaId===n.areaId);r.paddingSegmentList||=[];let o=r.paddingSegmentList;if(a){let e=i.pageNo+1,{margins:t}=this.draw.getPageSize(e),r=this.draw.getPageDirectionList()[e];o.push({pageNo:e,y:t[0]+this.draw.getHeader().getExtraHeight(e,r),height:n.height})}else o.push({pageNo:i.pageNo,y:i.coordinate.leftTop[1]-(t.offsetY||0),height:n.height})}}computeAreaInfo(e,t=[],n,r,i){for(let a=0;a<e.length;a++){let o=e[a],s=o.areaId,c=t[a];if(s&&s!==r){let e=this.areaInfoMap.get(s);e?(e.elementList.push(o),c&&e.positionList.push(c)):this.areaInfoMap.set(s,{id:s,area:o.area,elementList:[o],positionList:c?[c]:[],sourceElementList:n,tableCell:i})}o.type===B.TABLE&&o.trList&&this.computeTableAreaInfo(o,c,s)}}computeTableAreaInfo(e,t,n){let r=e.trList;for(let e=0;e<r.length;e++){let i=r[e];for(let e=0;e<i.tdList.length;e++){let r=i.tdList[e];this.computeAreaInfo(r.value,r.positionList,r.value,n,t?{td:r,tablePosition:t}:void 0)}}}applyMinHeight(e){let{scale:t}=this.options;for(let t of e)t.areaPadding&&=(t.height-=t.areaPadding.height,void 0),t.areaPaddingCarry&&=(t.elementList.some(e=>e.areaId===t.areaPaddingCarry.areaId)||(t.offsetY=(t.offsetY||0)-t.areaPaddingCarry.height),void 0);let n=0;for(;n<e.length;){let r=e[n].elementList.find(e=>e.areaId),i=r?.areaId;if(!i){n++;continue}let a=n;for(;a+1<e.length&&e[a+1].elementList.some(e=>e.areaId===i);)a++;let o=r.area,s=o?.minHeight;if(s&&(!o?.hide||this.draw.isAreaHideDisabled())){let r=-(e[n].offsetY||0);for(let t=n;t<=a;t++)r+=e[t].height+(e[t].offsetY||0);let o=s*t;if(r<o){let t=o-r;e[a].height+=t,e[a].areaPadding={areaId:i,height:t}}}n=a+1}}getAreaValue(e={}){let t=e.id||this.getActiveAreaId();if(!t)return null;let n=this.areaInfoMap.get(t);return n?{area:n.area,id:n.id,startPageNo:n.positionList[0].pageNo,endPageNo:n.positionList[n.positionList.length-1].pageNo,value:X(Rr(n.elementList),{isClone:!1})}:null}getContextByAreaId(e,t){let n=this.draw.getOriginalMainElementList();for(let r=0;r<n.length;r++){let i=n[r];if(t?.position===_.OUTER_BEFORE){if(n[r+1]?.areaId!==e)continue}else if(t?.position===_.AFTER){if(i.areaId!==e||n[r+1]?.areaId===e)continue}else if(t?.position===_.OUTER_AFTER){if(i.areaId===e||n[r-1]?.areaId!==e)continue}else if(i.areaId!==e)continue;let a=this.position.getOriginalMainPositionList();return{range:{startIndex:r,endIndex:r},elementPosition:a[r]}}return null}setAreaProperties(e){let t=e.id||this.getActiveAreaId();if(!t)return;let n=this.areaInfoMap.get(t);if(!n)return;n.area||={};let r=!1,i=[`top`,`hide`,`minHeight`];Object.entries(e.properties).forEach(([e,t])=>{if(He(t))return;let a=e;n.area[a]=t,i.includes(a)&&(r=!0)}),this.draw.render({isCompute:r,isSetCursor:!1})}setAreaValue(e){let t=e.id||this.getActiveAreaId();if(!t)return;let n=this.areaInfoMap.get(t);if(!n)return;let{positionList:r}=n,i=n.sourceElementList,a=e.value;Vr([{type:B.AREA,value:``,valueList:a,areaId:n.id,area:n.area}],{editorOptions:this.options});let o=r[0].index;this.draw.deleteElementList(i,o,r.length,{isIgnoreDeletedRule:!0}),this.draw.getTraceParticle().markElementListInserted(a),this.draw.spliceElementList(i,o,0,a),this.draw.render({isSetCursor:!1})}deleteArea(e={}){let t=e.id||this.getActiveAreaId();if(!t)return;let n=this.areaInfoMap.get(t);if(!n)return;let{positionList:r}=n,i=n.sourceElementList;this.draw.deleteElementList(i,r[0].index,r.length,{isIgnoreDeletedRule:!0}),this.draw.render({isSetCursor:!1})}}})),Xu,Zu=o((()=>{Qe(),z(),Xu=class{BORDER_VALUE=4;MIN_AREA_HEIGHT=20;draw;canvas;options;container;toolBorder;anchorLine;mousedownY;lastAnchorKey;constructor(e){this.draw=e,this.canvas=e.getPage(),this.options=e.getOptions(),this.container=e.getContainer(),this.toolBorder=null,this.anchorLine=null,this.mousedownY=0,this.lastAnchorKey=null}dispose(){this.toolBorder?.remove(),this.toolBorder=null,this.lastAnchorKey=null}render(){let e=this.draw.getArea().getActiveAreaInfo();if(!e||!e.area||e.tableCell||this.draw.isReadonly()||this.draw.getMode()===M.FORM||e.area.hide&&!this.draw.isAreaHideDisabled()||e.area.resizable===!1){this.dispose();return}let{positionList:t}=e;if(!t.length){this.dispose();return}let{scale:n}=this.options,r=e.paddingSegmentList||[],i=r[r.length-1],a=t[0],o=t[t.length-1],s=Math.ceil(a.coordinate.leftTop[1]),c=Math.ceil(i?i.y+i.height:o.coordinate.rightBottom[1]),l=i?i.pageNo:o.pageNo,u=`${e.id}:${n}:${s}:${l}:${c}`;if(u===this.lastAnchorKey)return;this.dispose();let d=0,f=a.pageNo,p=a.coordinate.leftTop[1],m=p;for(let e of t)e.pageNo!==f&&(d+=m-p,f=e.pageNo,p=e.coordinate.leftTop[1],m=p),m=Math.max(m,e.coordinate.rightBottom[1]);d+=m-p;for(let e of r)d+=e.height;let h=Math.max(d,(e.area.minHeight||0)*n),{x:g,y:_}=this.draw.getPageOffset(l),v=document.createElement(`div`);v.classList.add(`ce-area-tool__border`),v.style.left=`${this.draw.getMargins()[3]+g}px`,v.style.top=`${c+_-this.BORDER_VALUE/2}px`,v.style.width=`${this.draw.getInnerWidth()}px`,v.style.height=`${this.BORDER_VALUE}px`,v.onmousedown=t=>{this._mousedown(t,e,h/n,c+_,l)},this.container.append(v),this.toolBorder=v,this.lastAnchorKey=u}_mousedown(e,t,n,r,i){this.canvas=this.draw.getPage(i);let{scale:a}=this.options,{width:o}=this.draw.getPageSize(i),{x:s}=this.draw.getPageOffset(i);this.mousedownY=e.y;let c=e.target,l=window.getComputedStyle(c).cursor;document.body.style.cursor=l,this.canvas.style.cursor=l;let u=document.createElement(`div`);u.classList.add(`ce-area-anchor__line`),u.style.width=`${o}px`,u.style.left=`${s}px`,u.style.top=`${r}px`,this.container.append(u),this.anchorLine=u;let d=0,f=e=>{d=this._mousemove(e,r)};document.addEventListener(`mousemove`,f),document.addEventListener(`mouseup`,()=>{let e=d/a;e<0&&n+e<this.MIN_AREA_HEIGHT&&(e=this.MIN_AREA_HEIGHT-n),e&&(t.area.minHeight=Math.round(n+e),this.draw.render({isSetCursor:!1})),u.remove(),document.removeEventListener(`mousemove`,f),document.body.style.cursor=``,this.canvas.style.cursor=`text`},{once:!0}),e.preventDefault()}_mousemove(e,t){let n=e.y-this.mousedownY;return this.anchorLine&&(this.anchorLine.style.top=`${t+n}px`),e.preventDefault(),n}}})),Qu,$u=o((()=>{Qu=class{draw;options;imageCache;pendingImageMap;mainBadge;areaBadgeMap;constructor(e){this.draw=e,this.options=e.getOptions(),this.imageCache=new Map,this.pendingImageMap=new Map,this.mainBadge=null,this.areaBadgeMap=new Map}setMainBadge(e){this.mainBadge=e}setAreaBadgeMap(e){this.areaBadgeMap.clear(),e.forEach(e=>{this.areaBadgeMap.set(e.areaId,e.badge)})}_drawImage(e,t,n,r,i,a){if(this.imageCache.has(a)){let o=this.imageCache.get(a);e.drawImage(o,t,n,r,i)}else{let e=this.draw.getRenderCount(),t=this.pendingImageMap.get(a);if(t){t.renderCount=e;return}let n={renderCount:e};this.pendingImageMap.set(a,n);let r=new Image;r.setAttribute(`crossOrigin`,`Anonymous`),r.src=a,r.onload=()=>{this.imageCache.set(a,r),this.pendingImageMap.delete(a),n.renderCount===this.draw.getRenderCount()&&this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}}}render(e,t){if(t===0&&this.mainBadge){let{scale:t,badge:n}=this.options,{left:r,top:i,width:a,height:o,value:s}=this.mainBadge,c=this.draw.getMargins()[0]+this.draw.getHeader().getExtraHeight(),l=(r||n.left)*t,u=(i||n.top)*t+c;this._drawImage(e,l,u,a*t,o*t,s)}if(this.areaBadgeMap.size){let n=this.draw.getArea().getAreaInfo();if(n.size){let{scale:r,badge:i}=this.options;for(let a of n){let{positionList:n}=a[1],o=n[0];if(o.pageNo!==t)continue;let s=this.areaBadgeMap.get(a[0]);if(!s)continue;let{left:c,top:l,width:u,height:d,value:f}=s,p=(c||i.left)*r,m=(l||i.top)*r+o.coordinate.leftTop[1];this._drawImage(e,p,m,u*r,d*r,f)}}}}}})),ed,td=o((()=>{Ja(),ed=class{draw;options;data;pageContainer;isDrawing=!1;startStroke=null;constructor(e,t){this.draw=e,this.options=e.getOptions(),this.data=t||[],this.pageContainer=e.getPageContainer(),this.register()}register(){this.pageContainer.addEventListener(`mousedown`,this.start.bind(this)),this.pageContainer.addEventListener(`mouseup`,this.stop.bind(this)),this.pageContainer.addEventListener(`mouseleave`,this.stop.bind(this)),this.pageContainer.addEventListener(`mousemove`,this.drawing.bind(this))}start(e){if(!this.draw.isGraffitiMode())return;let t=qa(e,this.pageContainer);if(!t)return;this.isDrawing=!0;let{scale:n}=this.options;this.startStroke={lineColor:this.options.graffiti.defaultLineColor,lineWidth:this.options.graffiti.defaultLineWidth,points:[t.x/n,t.y/n]}}stop(){this.isDrawing=!1}drawing(e){if(!this.isDrawing||!this.draw.isGraffitiMode())return;let t=qa(e,this.pageContainer);if(!t)return;let{x:n,y:r}=t;if(this.startStroke&&Math.abs(this.startStroke.points[0]-n)<2&&Math.abs(this.startStroke.points[1]-r)<2)return;let i=t.pageNo,a=this.data.find(e=>e.pageNo===i);if(this.startStroke&&=(a||(a={pageNo:i,strokes:[]},this.data.push(a)),a.strokes.push(this.startStroke),null),!a?.strokes?.length)return;let{scale:o}=this.options;a.strokes[a.strokes.length-1].points.push(n/o,r/o),this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}getValue(){return this.data}compute(){let e=this.draw.getPageRowList().length;for(let t=this.data.length-1;t>=0;t--)this.data[t].pageNo>e-1&&this.data.splice(t,1)}clear(){this.data=[]}render(e,t){let n=this.data.find(e=>e.pageNo===t)?.strokes;if(!n?.length)return;let{graffiti:{defaultLineColor:r,defaultLineWidth:i},scale:a}=this.options;e.save();for(let t=0;t<n.length;t++){let o=n[t];e.beginPath(),e.strokeStyle=o.lineColor||r,e.lineWidth=(o.lineWidth||i)*a,e.moveTo(o.points[0]*a,o.points[1]*a);for(let t=2;t<o.points.length;t+=2)e.lineTo(o.points[t]*a,o.points[t+1]*a);e.stroke()}e.restore()}}})),nd,rd=o((()=>{Qe(),z(),Ha(),nd=class{draw;options;canvas;isActive;container;constructor(e){this.draw=e,this.options=e.getOptions(),this.container=e.getContainer(),this.isActive=!1;let t=this._createMagnifierCanvas();this.container.appendChild(t),this.canvas=t,this._addEvent()}_createMagnifierCanvas(){let{magnifier:e}=this.options,t=document.createElement(`canvas`);return t.classList.add(`ce-magnifier`),t.width=e.size,t.height=e.size,t.style.width=`${e.size}px`,t.style.height=`${e.size}px`,t}_addEvent(){this.container.addEventListener(`mousemove`,this._mousemove),document.addEventListener(`keydown`,this._handleKeyDown),document.addEventListener(`keyup`,this._handleKeyUp)}_removeEvent(){this.container.removeEventListener(`mousemove`,this._mousemove),document.removeEventListener(`keydown`,this._handleKeyDown),document.removeEventListener(`keyup`,this._handleKeyUp)}_handleKeyDown=e=>{e.key===Z.ALT&&this.show()};_handleKeyUp=e=>{e.key===Z.ALT&&this.hide()};_mousemove=e=>{this.isActive&&this._update(e)};show(){this.options.magnifier.disabled||this.options.backend===R.SVG||(this.isActive=!0,this.canvas.style.display=`block`)}hide(){this.options.magnifier.disabled||this.options.backend===R.SVG||(this.isActive=!1,this.canvas.style.display=`none`)}_update(e){if(!this.isActive)return;let t=this.canvas.getContext(`2d`),{magnifier:{size:n,zoom:r,borderColor:i}}=this.options,a=n/2,o=n/r;this.canvas.style.left=`${e.clientX-a}px`,this.canvas.style.top=`${e.clientY-a}px`;let s=this.draw.getPageList(),c=null,l=0,u=0;for(let t=0;t<s.length;t++){let n=s[t],r=n.getBoundingClientRect();if(e.clientX>=r.left&&e.clientX<=r.right&&e.clientY>=r.top&&e.clientY<=r.bottom){if(!(n instanceof HTMLCanvasElement))continue;c=n;let t=c.width/r.width;l=(e.clientX-r.left)*t-o/2,u=(e.clientY-r.top)*t-o/2;break}}t.clearRect(0,0,n,n),c&&(t.save(),t.beginPath(),t.arc(a,a,a-1,0,Math.PI*2),t.closePath(),t.clip(),t.drawImage(c,Math.max(0,l),Math.max(0,u),o,o,0,0,n,n),t.restore(),t.beginPath(),t.arc(a,a,a-1,0,Math.PI*2),t.strokeStyle=i,t.lineWidth=2,t.stroke())}destroy(){this.canvas.remove(),this._removeEvent()}}})),id,ad=o((()=>{Qe(),D(),id=class{draw;i18n;disabled;assertiveDom=null;rangeChangeHandler=null;constructor(e){if(this.draw=e,this.i18n=e.getI18n(),this.disabled=e.getOptions().accessibility.disabled,this.disabled)return;let t=document.createElement(`div`);t.className=`ce-sr-only`,this.assertiveDom=document.createElement(`div`),this.assertiveDom.setAttribute(`aria-live`,`assertive`),this.assertiveDom.setAttribute(`aria-atomic`,`true`),t.appendChild(this.assertiveDom),e.getContainer().appendChild(t),this.rangeChangeHandler=this.handleRangeChange.bind(this),this.draw.getEventBus().on(`rangeChange`,this.rangeChangeHandler)}handleRangeChange(e){e.startIndex!==e.endIndex&&this.selection()}selection(){if(this.disabled)return;let e=this.draw.getRange().toString();if(!e.trim())return;let t=this.i18n.t(`accessibility.selected`);this.assertive(`${t}${e}`)}input(e){if(this.disabled)return;let t=e.replace(RegExp(``,`g`),``).replace(/\n/g,``);if(!t.trim())return;let n=this.i18n.t(`accessibility.input`);this.assertive(`${n}${t}`)}assertive(e){!this.disabled&&this.assertiveDom&&(this.assertiveDom.textContent=``,this.assertiveDom.offsetHeight,this.assertiveDom.textContent=e)}destroy(){this.disabled||(this.rangeChangeHandler&&this.draw.getEventBus().off(`rangeChange`,this.rangeChangeHandler),this.assertiveDom?.parentElement?.remove())}}})),od,sd=o((()=>{p(),D(),k(),te(),re(),Si(),wi(),ra(),aa(),pa(),J(),La(),is(),cs(),us(),fs(),ms(),gs(),bs(),Ss(),ws(),Es(),Os(),Ns(),V(),pn(),et(),Tt(),Fs(),Ls(),zs(),Vs(),Us(),Gs(),Ys(),Zs(),$s(),tc(),rc(),ac(),sc(),lc(),dc(),pc(),hc(),_c(),ir(),z(),Ic(),pl(),hl(),gi(),_l(),yl(),G(),Ll(),zl(),Vl(),ql(),Qe(),hu(),_u(),xu(),Cu(),Kt(),Tu(),ku(),ju(),x(),_e(),Du(),Nu(),Fu(),Lu(),zu(),Uu(),Gu(),Yu(),Zu(),$u(),td(),rd(),ad(),od=class{container;pageContainer;backend;pageNo;renderCount;pagePixelRatio;mode;options;position;zone;elementList;listener;eventBus;override;i18n;canvasEvent;globalEvent;cursor;range;margin;background;badge;magnifier;search;spellcheck;group;area;areaTool;underline;strikeout;highlight;historyManager;previewer;imageParticle;laTexParticle;textMeasurer;textParticle;tableParticle;tablePaging;tableTool;tableOperate;pageNumber;lineNumber;waterMark;placeholder;header;footer;hyperlinkParticle;hintParticle;traceParticle;labelParticle;dateParticle;separatorParticle;pageBreakParticle;superscriptParticle;subscriptParticle;checkboxParticle;radioParticle;blockParticle;listParticle;lineBreakParticle;whiteSpaceParticle;control;cascadeManager;validate;pageBorder;workerManager;scrollObserver;selectionObserver;imageObserver;graffiti;accessibility;LETTER_REG;WORD_LIKE_REG;rowList;rawRowList;incrementalRowComputer;layoutEngine;isElementListTruncated;pageRowList;pageDirectionList;painterStyle;painterOptions;visiblePageNoList;intersectionPageNo;printModeData;columnManager;ruler;constructor(e,t,n,r,i,a){this.container=this._wrapContainer(e),this.pageNo=0,this.renderCount=0,this.pagePixelRatio=null,this.mode=t.mode,this.options=t,this.elementList=n.main,this.pageDirectionList=[t.paperDirection],this.listener=r,this.eventBus=i,this.override=a,this._formatContainer(),this.pageContainer=this._createPageContainer(),this.backend=na(t.backend,this.pageContainer),this._createPage(0),this.i18n=new mu(t.locale),this.historyManager=new ls(this),this.position=new ds(this),this.zone=new bu(this),this.range=new ps(this),this.margin=new xs(this),this.background=new hs(this),this.badge=new Qu(this),this.magnifier=new nd(this),this.search=new Cs(this),this.spellcheck=new Ts(this),this.group=new Au(this),this.area=new Ju(this),this.areaTool=new Xu(this),this.underline=new Ms(this),this.strikeout=new Ds(this),this.highlight=new ys(this),this.previewer=new Rl(this),this.imageParticle=new $e(this),this.laTexParticle=new wt(this),this.textMeasurer=new Ci,this.textParticle=new Ps(this),this.tableParticle=new Hs(this),this.tablePaging=new Ws(this),this.rawRowList=[],this.isElementListTruncated=!1,this.incrementalRowComputer=new ne(this),this.tableTool=new Js(this),this.tableOperate=new Wu(this),this.pageNumber=new Is(this),this.lineNumber=new Iu(this),this.waterMark=new gc(this),this.placeholder=new Ou(this),this.header=new oc(this,n.header),this.footer=new Su(this,n.footer),this.hyperlinkParticle=new Qs(this),this.hintParticle=new ec(this),this.traceParticle=new nc(this),this.labelParticle=new ic(this),this.dateParticle=new Bl(this),this.separatorParticle=new fc(this),this.pageBreakParticle=new mc(this),this.superscriptParticle=new cc,this.subscriptParticle=new uc,this.checkboxParticle=new gl(this),this.radioParticle=new vl(this),this.blockParticle=new Kl(this),this.listParticle=new wu(this),this.lineBreakParticle=new Eu(this),this.whiteSpaceParticle=new Mu(this),this.control=new Fc(this),this.cascadeManager=new fl(this),this.validate=new ml(this),this.pageBorder=new Ru(this),this.graffiti=new ed(this,n.graffiti),this.columnManager=new ee(this),this.ruler=new Xs(this),this.layoutEngine=new xi(this),this.scrollObserver=new Rs(this),this.selectionObserver=new Bs(this),this.imageObserver=new gu,new Pu(this),this.canvasEvent=new rs(this),this.cursor=new Ia(this,this.canvasEvent),this.globalEvent=new ss(this,this.canvasEvent),t.displayOnly||(this.canvasEvent.register(),this.globalEvent.register()),this.workerManager=new Il(this),new Hu(this),this.accessibility=new id(this);let{letterClass:o}=t;this.LETTER_REG=RegExp(`[${o.join(``)}]`),this.WORD_LIKE_REG=RegExp(`${o.map(e=>`[^${e}][${e}]`).join(`|`)}`),this.rowList=[],this.pageRowList=[],this.painterStyle=null,this.painterOptions=null,this.visiblePageNoList=[],this.intersectionPageNo=0,this.printModeData=null,this.mode===M.PRINT&&this.setPrintData(),this.render({isInit:!0,isSetCursor:!1,isFirstRender:!0}),this.cascadeManager.executeAll()}setPrintData(){this.printModeData={header:this.header.getElementList(),main:this.elementList,footer:this.footer.getElementList()};let e=K(this.printModeData);[`header`,`main`,`footer`].forEach(t=>{e[t]=this.control.filterAssistElement(e[t])}),this.setEditorData(e)}clearPrintData(){this.printModeData&&=(this.setEditorData(this.printModeData),null)}getLetterReg(){return this.LETTER_REG}isWordLike(e){return this.WORD_LIKE_REG.test(e)}getMode(){return this.mode}setMode(e){this.mode!==e&&(e===M.PRINT&&this.setPrintData(),this.mode===M.PRINT&&this.clearPrintData(),this.clearSideEffect(),this.range.clearRange(),this.mode=e,this.options.mode=e,this.render({isSetCursor:!1,isSubmitHistory:!1}))}isReadonly(){if(this.area.getActiveAreaInfo()?.area?.mode)return this.area.isReadonly();switch(this.mode){case M.DESIGN:return!1;case M.READONLY:case M.PRINT:case M.GRAFFITI:case M.TRACE:return!0;case M.FORM:return!this.control.getIsRangeWithinControl();default:return!1}}isDisabled(){if(this.mode===M.DESIGN)return!1;let{startIndex:e,endIndex:t}=this.range.getRange(),n=this.getElementList();if(this.getTd()?.disabled)return!0;if(e===t){let t=n[e],r=n[e+1];return!!(t?.title?.disabled&&r?.title?.disabled&&t.titleId===r.titleId||t?.control?.disabled&&r?.control?.disabled&&t.controlId===r.controlId)}return n.slice(e+1,t+1).some(e=>e.title?.disabled||e.control?.disabled)}isDesignMode(){return this.mode===M.DESIGN}isPrintMode(){return this.mode===M.PRINT}isAreaHideDisabled(){return this.isDesignMode()||this.isPrintMode()&&this.options.modeRule[M.PRINT].areaHideDisabled}isGraffitiMode(){return this.mode===M.GRAFFITI}isTraceMode(){return this.mode===M.TRACE}setTraceEnabled(e){this.mode!==M.TRACE&&!this.options.trace.disabled!==e&&(this.options.trace.disabled=!e,this.render({isSetCursor:!1,isSubmitHistory:!1}))}setRulerEnabled(e){!this.options.ruler.disabled!==e&&this.ruler.setEnabled(e)}deleteElementList(e,t,n=1,r){return this.options.trace.disabled?(this.spliceElementList(e,t,n,void 0,{isIgnoreDeletedRule:r?.isIgnoreDeletedRule}),[]):(this.incrementalRowComputer.markRangeDirty(e,t,n,0),this.traceParticle.markElementListDeleted(e.slice(t,t+n),r))}getOriginalWidth(e=this.options.paperDirection){let{width:t,height:n}=this.options;return e===F.VERTICAL?t:n}getOriginalHeight(e=this.options.paperDirection){let{width:t,height:n}=this.options;return e===F.VERTICAL?n:t}getWidth(e=this.options.paperDirection){return Math.floor(this.getOriginalWidth(e)*this.options.scale)}getHeight(e=this.options.paperDirection){return Math.floor(this.getOriginalHeight(e)*this.options.scale)}getMainHeight(){return this.getHeight()-this.getMainOuterHeight()}getMainOuterHeight(e,t){let n=t||(e===void 0?this.options.paperDirection:this.getPageDirection(e)),r=this.getMargins(n),i=this.header.getExtraHeight(e,n),a=this.footer.getExtraHeight(e,n);return r[0]+r[2]+i+a}getCanvasWidth(e=-1){let t=~e?e:this.pageNo,n=this.backend.canvas?.getPage(t);if(n)return n.width;let r=this.backend.getPage(t);return Number.parseFloat(r.style.width)*this.getPagePixelRatio()}getCanvasHeight(e=-1){let t=~e?e:this.pageNo,n=this.backend.canvas?.getPage(t);if(n)return n.height;let r=this.backend.getPage(t);return Number.parseFloat(r.style.height)*this.getPagePixelRatio()}getInnerWidth(e=this.options.paperDirection){let t=this.getWidth(e),n=this.getMargins(e);return t-n[1]-n[3]}getColumnLayout(e){return this.columnManager.getLayout(e)}setColumnConfig(e){this.options.pageMode!==P.CONTINUITY&&this.columnManager.setConfig(e)}getOriginalInnerWidth(){let e=this.getOriginalWidth(),t=this.getOriginalMargins();return e-t[1]-t[3]}getContextInnerWidth(){let e=this.position.getPositionContext();if(e.isTable){let t=this.getOriginalElementList(),n=this.position.getTableTdByContext(t,e),{table:{tdPadding:r}}=this.options;return n.width-r[1]-r[3]}let t=this.getColumnLayout();return t&&t.count>1?t.width/this.options.scale:this.getOriginalInnerWidth()}getMargins(e=this.options.paperDirection){return this.getOriginalMargins(e).map(e=>e*this.options.scale)}getOriginalMargins(e=this.options.paperDirection){let{margins:t}=this.options;return e===F.VERTICAL?t:[t[1],t[2],t[3],t[0]]}getPageDirection(e){return this.pageDirectionList[e]||this.options.paperDirection}getPageDirectionList(){return this.pageDirectionList}getPageSize(e){let t=this.getPageDirection(e),n=this.getMargins(t),r=this.getWidth(t);return{width:r,height:this.getHeight(t),margins:n,innerWidth:r-n[1]-n[3]}}getPageOffset(e,t=!1){let n=e=>t?this.getOriginalWidth(e):this.getWidth(e),r=e=>t?this.getOriginalHeight(e):this.getHeight(e),i=t?this.options.pageGap:this.getPageGap(),a=0;for(let t=0;t<e;t++)a+=r(this.getPageDirection(t))+i;let o=n(this.getPageDirection(e));return{x:(this._getPageMaxWidth(t)-o)/2,y:a}}_getPageMaxWidth(e=!1){let t=e?this.getOriginalWidth():this.getWidth();if(!this.pageDirectionList.some(e=>e!==this.options.paperDirection))return t;let n=e?this.getOriginalHeight():this.getHeight();return Math.max(t,n)}getPageGap(){return this.options.pageGap*this.options.scale}getOriginalPageGap(){return this.options.pageGap}getPageNumberBottom(){let{pageNumber:{bottom:e},scale:t}=this.options;return e*t}getMarginIndicatorSize(){return this.options.marginIndicatorSize*this.options.scale}getDefaultBasicRowMarginHeight(){return this.options.defaultBasicRowMarginHeight*this.options.scale}getHighlightMarginHeight(){return this.options.highlightMarginHeight*this.options.scale}getTdPadding(){let{table:{tdPadding:e},scale:t}=this.options;return e.map(e=>e*t)}getContainer(){return this.container}getPageContainer(){return this.pageContainer}getVisiblePageNoList(){return this.visiblePageNoList}setVisiblePageNoList(e){this.visiblePageNoList=e,this.listener.visiblePageNoListChange&&this.listener.visiblePageNoListChange(this.visiblePageNoList),this.eventBus.isSubscribe(`visiblePageNoListChange`)&&this.eventBus.emit(`visiblePageNoListChange`,this.visiblePageNoList)}getIntersectionPageNo(){return this.intersectionPageNo}setIntersectionPageNo(e){this.intersectionPageNo=e,this.listener.intersectionPageNoChange&&this.listener.intersectionPageNoChange(this.intersectionPageNo),this.eventBus.isSubscribe(`intersectionPageNoChange`)&&this.eventBus.emit(`intersectionPageNoChange`,this.intersectionPageNo)}getPageNo(){return this.pageNo}setPageNo(e){this.pageNo=e}getRenderCount(){return this.renderCount}getPage(e=-1){return this.backend.getPage(~e?e:this.pageNo)}getPageList(){return this.backend.getPageList()}getPageCount(){return this.backend.getPageList().length}getTableRowList(e){let t=this.position.getPositionContext();return this.position.getTableTdByContext(e,t).rowList}getOriginalRowList(){let e=this.getZone();return e.isHeaderActive()?this.header.getRowList():e.isFooterActive()?this.footer.getRowList():this.rowList}getRowList(){return this.position.getPositionContext().isTable?this.getTableRowList(this.getOriginalElementList()):this.getOriginalRowList()}getPageRowList(){return this.pageRowList}getOptions(){return this.options}getSearch(){return this.search}getSpellcheck(){return this.spellcheck}getGroup(){return this.group}getArea(){return this.area}getAreaTool(){return this.areaTool}getBadge(){return this.badge}getMagnifier(){return this.magnifier}getHistoryManager(){return this.historyManager}getPosition(){return this.position}getZone(){return this.zone}getColumnManager(){return this.columnManager}getRange(){return this.range}getLineBreakParticle(){return this.lineBreakParticle}getTextMeasurer(){return this.textMeasurer}getTextParticle(){return this.textParticle}getStrikeout(){return this.strikeout}getUnderline(){return this.underline}getSubscriptParticle(){return this.subscriptParticle}getSuperscriptParticle(){return this.superscriptParticle}getHeaderElementList(){return this.header.getElementList()}getTableElementList(e){let t=this.position.getPositionContext();return this.position.getTableTdByContext(e,t)?.value||[]}getElementList(){let e=this.position.getPositionContext(),t=this.getOriginalElementList();return e.isTable?this.getTableElementList(t):t}getMainElementList(){return this.position.getPositionContext().isTable?this.getTableElementList(this.elementList):this.elementList}isMainElementList(e){return e===this.elementList}getRawRowList(){return this.rawRowList}getMainRowList(){return this.rowList}getIncrementalRowComputer(){return this.incrementalRowComputer}getIsElementListTruncated(){return this.isElementListTruncated}getIsControlMinWidthPlaceholder(){return this.layoutEngine.getIsControlMinWidthPlaceholder(this.elementList)}getOriginalElementList(){let e=this.getZone();return e.isHeaderActive()?this.getHeaderElementList():e.isFooterActive()?this.getFooterElementList():this.elementList}getOriginalMainElementList(){return this.elementList}getFooterElementList(){return this.footer.getElementList()}getTd(){let e=this.position.getPositionContext();return e.isTable?this.position.getTableTdByContext(this.getOriginalElementList(),e):null}insertElementList(e,t={}){if(!e.length||!this.range.getIsCanInput())return;let{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;let{isSubmitHistory:i=!0}=t;Vr(e,{isHandleFirstElement:!1,editorOptions:this.options}),this.traceParticle.markElementListInserted(e);let a=-1,o=this.control.getActiveControl();if(!o&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),o=this.control.getActiveControl()),o&&this.control.getIsRangeWithinControl())a=o.setValue(e,void 0,{isIgnoreDisabledRule:!0}),this.control.emitControlContentChange();else{let t=this.getElementList(),i=n===r,o=n+1;i||this.deleteElementList(t,o,r-n),this.spliceElementList(t,o,0,e),a=n+e.length;let s=t[o-1];e[0].listId&&s&&!s.listId&&s?.value===``&&(!s.type||s.type===B.TEXT)&&(t.splice(n,1),this.incrementalRowComputer.markRangeDirty(t,n,1,0),--a)}~a&&(this.range.setRange(a,a),this.render({curIndex:a,isSubmitHistory:i}))}appendElementList(e,t={}){if(!e.length)return;Vr(e,{isHandleFirstElement:!1,editorOptions:this.options}),this.traceParticle.markElementListInserted(e);let n,{isPrepend:r,isSubmitHistory:i=!0}=t;if(r)this.elementList.splice(1,0,...e),this.incrementalRowComputer.markRangeDirty(this.elementList,1,0,e.length),n=e.length;else{let t=this.elementList.length;this.elementList.push(...e),this.incrementalRowComputer.markRangeDirty(this.elementList,t,0,e.length),n=this.elementList.length-1}this.range.setRange(n,n),this.render({curIndex:n,isSubmitHistory:i})}setElementProperty(e,t){let n=Array.isArray(e)?e:[e],r=Object.keys(t);for(let e of n)for(let n of r){let r=t[n];e[n]!==r&&(e[n]=r,this.incrementalRowComputer.markFullDirty())}}deleteElementProperty(e,t){let n=Array.isArray(e)?e:[e];for(let e of n)for(let n of t)n in e&&(delete e[n],this.incrementalRowComputer.markFullDirty())}spliceElementList(e,t,n,r,i){this.incrementalRowComputer.markRangeDirty(e,t,n,r?.length??0);let{isIgnoreDeletedRule:a=!1}=i||{},{group:o,modeRule:s}=this.options;if(n>0){let r=t+n,i=e[r]?.listId;if(i&&e[t-1]?.listId!==i){let t=r;for(;t<e.length;){let n=e[t];if(n.listId!==i||n.value===``)break;delete n.listId,delete n.listType,delete n.listStyle,t++}t>r&&this.incrementalRowComputer.markRangeDirty(e,r,t-r,0)}if(!a&&!this.isDesignMode()&&!this.control.getIsRangeWithinControl()){let n=this.getTd()?.deletable,i=r-1;for(;i>=t;){let t=e[i];t?.trace?.length&&t.trace[t.trace.length-1].type===fn.DELETED||!t?.hide&&!t?.control?.hide&&!t?.area?.hide&&(n===!1||t?.control?.deletable===!1||t.controlId&&this.mode===M.FORM&&s[this.mode].controlDeletableDisabled||t?.title?.deletable===!1||o.deletable===!1&&t.groupIds?.length||t?.area?.deletable===!1&&t?.areaIndex===0)||e.splice(i,1),i--}}else{let n=r-1;for(;n>=t;){let t=e[n];t?.trace?.length&&t.trace[t.trace.length-1].type===fn.DELETED||e.splice(n,1),n--}}}if(r?.length)for(let n=0;n<r.length;n++)e.splice(t+n,0,r[n])}getCanvasEvent(){return this.canvasEvent}getGlobalEvent(){return this.globalEvent}getListener(){return this.listener}getEventBus(){return this.eventBus}getOverride(){return this.override}getCursor(){return this.cursor}getPreviewer(){return this.previewer}getImageParticle(){return this.imageParticle}getTableTool(){return this.tableTool}getRuler(){return this.ruler}getTableOperate(){return this.tableOperate}getTableParticle(){return this.tableParticle}getTablePaging(){return this.tablePaging}getBlockParticle(){return this.blockParticle}getHeader(){return this.header}getFooter(){return this.footer}getHyperlinkParticle(){return this.hyperlinkParticle}getHintParticle(){return this.hintParticle}getTraceParticle(){return this.traceParticle}getDateParticle(){return this.dateParticle}getListParticle(){return this.listParticle}getCheckboxParticle(){return this.checkboxParticle}getRadioParticle(){return this.radioParticle}getControl(){return this.control}getCascadeManager(){return this.cascadeManager}getValidate(){return this.validate}getWorkerManager(){return this.workerManager}getImageObserver(){return this.imageObserver}getI18n(){return this.i18n}getGraffiti(){return this.graffiti}getAccessibility(){return this.accessibility}getRowCount(){return this.getRowList().length}async getDataURL(e={}){if(!this.backend.canvas){let{mode:t=this.mode,snapDomFunction:n}=e,r=await this.getSvgPageList(t);return n&&await this.blockParticle.drawIframeToSvgPage(r,n),r.map(e=>`data:image/svg+xml;base64,${Le(new XMLSerializer().serializeToString(e))}`)}let{pixelRatio:t,mode:n,snapDomFunction:r}=e;t&&this.setPagePixelRatio(t);let i=this.mode,a=!!n&&i!==n;a&&this.setMode(n),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),await this.imageObserver.allSettled();let o=this.backend.canvas.getPageList();r&&await this.blockParticle.drawIframeToPage(o,r);let s=o.map(e=>e.toDataURL());return t&&this.setPagePixelRatio(null),a&&this.setMode(i),s}async getSvgPageList(e){if(this.backend.canvas)throw Error(`SVG page list requires the SVG backend`);let t=this.mode,n=t!==e;try{return n&&this.setMode(e),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}),await this.imageObserver.allSettled(),this.backend.flush?.(),this.backend.getPageList().map(e=>e.cloneNode(!0))}finally{n&&this.setMode(t)}}getPainterStyle(){return this.painterStyle&&Object.keys(this.painterStyle).length?this.painterStyle:null}getPainterOptions(){return this.painterOptions}setPainterStyle(e,t){this.painterStyle=e,this.painterOptions=t||null,this.getPainterStyle()&&this.getPageList().forEach(e=>e.style.cursor=`copy`)}setDefaultRange(){this.elementList.length&&setTimeout(()=>{let e=this.elementList.length-1;this.range.setRange(e,e),this.range.setRangeStyle()})}getIsPagingMode(){return this.options.pageMode===P.PAGING}setBackend(e){if(this.options.backend!==e){this.backend.destroy(),this.backend.getPageList().forEach(e=>e.remove()),this.options.backend=e,this.backend=na(e,this.pageContainer);for(let e=0;e<this.pageRowList.length;e++)this._createPage(e);this._updatePageSizes(),this.render({isLazy:!1,isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}}setPageMode(e){if(!e||this.options.pageMode===e)return;if(this.options.pageMode=e,e===P.PAGING){let e=this.getHeight(),t=this.getPagePixelRatio();this.backend.resize(0,this.getWidth(),e,t)}else this._disconnectLazyRender(),this.header.recovery(),this.footer.recovery(),this.zone.setZone(N.MAIN);let{startIndex:t}=this.range.getRange(),n=this.range.getIsCollapsed();this.render({isSetCursor:!0,curIndex:t,isSubmitHistory:!1}),n||this.cursor.drawCursor({isShow:!1}),setTimeout(()=>{this.listener.pageModeChange&&this.listener.pageModeChange(e),this.eventBus.isSubscribe(`pageModeChange`)&&this.eventBus.emit(`pageModeChange`,e)})}setPageScale(e){this.options.scale=e,this._updatePageSizes();let t=this.position.getCursorPosition();this.render({isSubmitHistory:!1,isSetCursor:!!t,curIndex:t?.index}),this.listener.pageScaleChange&&this.listener.pageScaleChange(e),this.eventBus.isSubscribe(`pageScaleChange`)&&this.eventBus.emit(`pageScaleChange`,e)}getPagePixelRatio(){return this.pagePixelRatio||window.devicePixelRatio}setPagePixelRatio(e){!this.pagePixelRatio&&e===window.devicePixelRatio||e===this.pagePixelRatio||(this.pagePixelRatio=e,this.setPageDevicePixel())}setPageDevicePixel(){this._updatePageSizes(),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperSize(e,t){this.options.width=e,this.options.height=t,this._updatePageSizes(),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperDirection(e){this.options.paperDirection=e,this.render({isSubmitHistory:!1,isSetCursor:!1})}setPageDirection(e){if(this.isReadonly()||this.isDisabled()||this.zone.getZone()!==N.MAIN)return;let{endIndex:t}=this.range.getRange(),n=null;for(let e=t;e>=0;e--)if(this.elementList[e].type===B.PAGE_BREAK){n=this.elementList[e];break}n?(e?n.paperDirection=e:delete n.paperDirection,this.render({curIndex:t})):e&&this.setPaperDirection(e)}setPaperMargin(e){this.options.margins=e,this.render({isSubmitHistory:!1,isSetCursor:!1})}getOriginValue(e={}){let{pageNo:t}=e,n=this.elementList;return Number.isInteger(t)&&t>=0&&t<this.pageRowList.length&&(n=this.pageRowList[t].flatMap(e=>e.elementList)),this.blockParticle.update(),{header:this.getHeaderElementList(),main:n,footer:this.getFooterElementList(),graffiti:this.graffiti.getValue()}}getValue(e={}){let t=this.getOriginValue(e),{extraPickAttrs:n}=e,r={header:X(t.header,{extraPickAttrs:n}),main:X(t.main,{extraPickAttrs:n,isClassifyArea:!0}),footer:X(t.footer,{extraPickAttrs:n}),graffiti:t.graffiti};return{version:f,data:r,options:K(this.options)}}setValue(e,t){let{header:n,main:r,footer:i}=K(e);if(!n&&!r&&!i)return;let{isSetCursor:a=!1}=t||{};[n,r,i].forEach(e=>{e&&Vr(e,{editorOptions:this.options,isForceCompensation:!0})}),this.setEditorData({header:n,main:r,footer:i}),this.historyManager.recovery();let o=a?r?.length?r.length-1:0:void 0;o!==void 0&&this.range.setRange(o,o),this.render({curIndex:o,isSetCursor:a,isFirstRender:!0}),this.cascadeManager.executeAll()}setEditorData(e){let{header:t,main:n,footer:r}=e;t&&this.header.setElementList(t),n&&(this.elementList=n),r&&this.footer.setElementList(r)}_wrapContainer(e){let t=document.createElement(`div`);return e.append(t),t}_formatContainer(){this.container.style.position=`relative`,this.container.style.width=`${this.getWidth()}px`,this.container.setAttribute(Ye,A.MAIN)}_createPageContainer(){let e=document.createElement(`div`);return e.classList.add(`ce-page-container`),this.container.append(e),e}_createPage(e){let{width:t,height:n}=this.getPageSize(e);this.backend.create(e,t,n,this.getPageGap(),this.getPagePixelRatio())}_updatePageSizes(){let e=this.getPagePixelRatio(),t=this.getIsPagingMode();this.container.style.width=`${this._getPageMaxWidth()}px`,this.backend.getPageList().forEach((n,r)=>{let{width:i,height:a}=this.getPageSize(r);this.backend.resize(r,i,a,e,{gap:this.getPageGap(),updateCssHeight:t})})}getElementFont(e,t=1){let{defaultSize:n,defaultFont:r}=this.options,i=e.font||r,a=e.actualSize||e.size||n;return`${e.italic?`italic `:``}${e.bold?`bold `:``}${a*t}px ${i}`}getElementSize(e){return e.actualSize||e.size||this.options.defaultSize}getElementRowMargin(e){let{defaultSize:t,defaultBasicRowMarginHeight:n,defaultRowMargin:r,scale:i}=this.options,a=e.size||t,o=1;return a<12?o=a/12:a>30&&(o=1+(a-30)/30),n*o*(e.rowMargin??r)*i}computeRowList(e){return this.layoutEngine.computeRowList(e)}_computePageList(){let{pageMode:e,paperDirection:t,pageNumber:{maxPageNo:n}}=this.options,r=this.layoutEngine.computePageList({rowList:this.rowList,elementList:this.elementList,pageMode:e,paperDirection:t,maxPageNo:n});if(this.elementList=r.elementList,this.pageDirectionList=r.pageDirectionList,this.isElementListTruncated=r.isElementListTruncated,e===P.CONTINUITY){let e=this.getHeight(),t=this.getMainOuterHeight(0);t+=this.rowList.reduce((e,t)=>e+t.height+(t.offsetY||0),0);let n=this.backend.getPage(0),r=Number(n.style.height.replace(`px`,``)),i=t>r?t:t<e?e:t;this.backend.resizeHeight(0,i,this.getPagePixelRatio())}return r.pageRowList}_drawHighlight(e,t){let{rowList:n,positionList:r,elementList:i}=t,a=this.getDefaultBasicRowMarginHeight(),o=this.getHighlightMarginHeight();for(let t=0;t<n.length;t++){let s=n[t],c=s.height-(s.spacingAfter||0)-(s.areaPadding?.height||0),l=``;for(let t=0;t<s.elementList.length;t++){let n=s.elementList[t],u=n.highlight||this.control.getControlHighlight(i,s.startIndex+t);if(u){l&&l!==u&&this.highlight.render(e);let{coordinate:{leftTop:[i,d]}}=s.fragmentPosition||r[s.startIndex+t],f=n.left||0;this.highlight.recordFillInfo(e,i-f,d+a-o,n.metrics.width+f,c-2*a+2*o,u)}else l&&this.highlight.render(e);l=u}this.highlight.render(e)}}drawRow(e,t){this._drawHighlight(e,t);let{scale:n,table:{tdPadding:r},group:i,lineBreak:a,whiteSpace:o}=this.options,{rowList:s,pageNo:c,elementList:l,positionList:u,startIndex:d,zone:f,keyContext:p={},isDrawLineBreak:m=!a.disabled,isDrawWhiteSpace:h=!o.disabled,isDrawRange:_=!0}=t,v=this.isPrintMode(),y=this.isGraffitiMode(),{isCrossRowCol:b,tableId:x}=this.range.getRange(),S=la(f??N.MAIN,c),C=p.containerKey??S,w=p.tablePath??[],T=d;for(let t=0;t<s.length;t++){let a=s[t],o=a.tableFragment,d=o?da({containerKey:C,tableId:l[a.startIndex]?.id??`table:${a.startIndex}`,tablePath:w,...o}):void 0;d&&e.beginGroup?.(d,`table-fragment`);let p=ua({zoneKey:S,containerKey:d??C,occurrence:t});e.beginGroup?.(p,`row`);let E=a.height-(a.spacingAfter||0)-(a.areaPadding?.height||0),D={x:0,y:0,width:0,height:0},k=null;for(let t=0;t<a.elementList.length;t++){let s=a.elementList[t];a.tableFragment&&(T=a.startIndex+t);let y=s.metrics,{ascent:x,coordinate:{leftTop:[S,C]}}=a.fragmentPosition||u[a.startIndex+t],A=a.elementList[t-1];if((s.hide||s.control?.hide||s.area?.hide&&!this.isAreaHideDisabled()||this.traceParticle.isTraceHidden(s))&&!this.isDesignMode())this.textParticle.complete();else if(s.type===B.IMAGE)this.textParticle.complete(),s.imgDisplay!==g.SURROUND&&s.imgDisplay!==g.FLOAT_TOP&&s.imgDisplay!==g.FLOAT_BOTTOM&&this.imageParticle.render(e,s,S,C+x);else if(s.type===B.LATEX)this.textParticle.complete(),this.laTexParticle.render(e,s,S,C+x);else if(s.type===B.TABLE)b&&(D.x=S,D.y=C,k=s),this.tableParticle.render(e,s,S,C,a.tableFragment);else if(s.type===B.HYPERLINK)this.textParticle.complete(),this.hyperlinkParticle.render(e,s,S,C+x);else if(s.type===B.LABEL)this.textParticle.complete(),this.labelParticle.render(e,s,S,C+x);else if(s.type===B.DATE){let n=a.elementList[t+1];A&&A.dateId===s.dateId||this.textParticle.complete(),this.textParticle.record(e,s,S,C+x),n&&n.dateId===s.dateId||this.textParticle.complete()}else s.type===B.SUPERSCRIPT?(this.textParticle.complete(),this.superscriptParticle.render(e,s,S,C+x)):s.type===B.SUBSCRIPT?(this.underline.render(e),this.textParticle.complete(),this.subscriptParticle.render(e,s,S,C+x)):s.type===B.SEPARATOR?this.separatorParticle.render(e,s,S,C):s.type===B.PAGE_BREAK?this.mode!==M.CLEAN&&!v&&this.pageBreakParticle.render(e,s,S,C):s.type===B.CHECKBOX||s.controlComponent===U.CHECKBOX?(this.textParticle.complete(),this.checkboxParticle.render({ctx:e,x:S,y:C+x,index:t,row:a})):s.type===B.RADIO||s.controlComponent===U.RADIO?(this.textParticle.complete(),this.radioParticle.render({ctx:e,x:S,y:C+x,index:t,row:a})):s.type===B.TAB?(this.textParticle.complete(),this.textParticle.renderTabLeader(e,s,S,C+x)):s.rowFlex===O.ALIGNMENT||s.rowFlex===O.JUSTIFY?(this.textParticle.record(e,s,S,C+x),this.textParticle.complete()):s.type===B.BLOCK?(this.textParticle.complete(),this.blockParticle.render(e,c,s,S,C+x)):(s.left&&this.textParticle.complete(),this.textParticle.record(e,s,S,C+x),(s.width||s.letterSpacing||pe.test(s.value))&&this.textParticle.complete());if(m&&!v&&this.mode!==M.CLEAN&&!a.isWidthNotEnough&&t===a.elementList.length-1&&this.lineBreakParticle.render(e,s,S,C+E/2),h&&ge.test(s.value)&&this.whiteSpaceParticle.render(e,s,S,C+E/2),s.control?.border){A?.control?.border&&A.controlId!==s.controlId&&this.control.drawBorder(e);let t=this.getElementRowMargin(s);this.control.recordBorderInfo(S,C+t,s.metrics.width,E-2*t)}else A?.control?.border&&this.control.drawBorder(e);if(s.underline||s.control?.underline){A?.type===B.SUBSCRIPT&&s.type!==B.SUBSCRIPT&&this.underline.render(e);let t=this.getElementRowMargin(s),n=s.left||0,r=0;s.type===B.SUBSCRIPT&&(r=this.subscriptParticle.getOffsetY(s));let i=s.control?.underline?this.options.underlineColor:s.color;this.underline.recordFillInfo(e,S-n,C+E-t+r,y.width+n,0,i,s.textDecoration?.style)}else(A?.underline||A?.control?.underline)&&this.underline.render(e);if(s.strikeout){if(!s.type||Vt.includes(s.type)){A&&(A.type===B.SUBSCRIPT&&s.type!==B.SUBSCRIPT||A.type===B.SUPERSCRIPT&&s.type!==B.SUPERSCRIPT||this.getElementSize(A)!==this.getElementSize(s))&&this.strikeout.render(e);let t=this.textMeasurer.measureBasis(this.getElementFont(s)),r=C+x+t.actualBoundingBoxDescent*n-y.height/2;s.type===B.SUBSCRIPT?r+=this.subscriptParticle.getOffsetY(s):s.type===B.SUPERSCRIPT&&(r+=this.superscriptParticle.getOffsetY(s)),this.strikeout.recordFillInfo(e,S,r,y.width)}}else A?.strikeout&&this.strikeout.render(e);this.traceParticle.render({ctx:e,element:s,x:S,y:C,curRow:a,metrics:y,offsetY:x,scale:n});let{zone:j,startIndex:N,endIndex:P}=this.range.getRange();if(_&&j===f&&N!==P&&N<=T&&T<=P){let e=this.position.getPositionContext();if(!e.isTable&&!s.tdId||e.tdId===s.tdId){if(N===T){let e=l[N+1];e&&e.value===``&&(D.x=S+y.width,D.y=C,D.height=E,D.width+=this.options.rangeMinWidth)}else{let e=y.width;e===0&&a.elementList.length===1&&(e=this.options.rangeMinWidth),D.width||(D.x=S,D.y=C,D.height=E),D.width+=e}}}if(!i.disabled&&s.groupIds&&this.group.recordFillInfo(s,S,C,y.width,E),T++,s.type===B.TABLE&&!s.hide&&!this.traceParticle.isTraceHidden(s)){let t=r[1]+r[3],i=s.id??`table:${a.startIndex}`;if(a.repeatTdPositionList?.length)for(let[r,{td:o,positionList:s}]of a.repeatTdPositionList.entries()){let a=o.trIndex??0,l=o.tdIndex??r,u=o.id??`td:${a}:${l}`,h=fa({fragmentKey:d??p,trIndex:a,tdIndex:l,tdId:o.id});e.beginGroup?.(h,`repeat-header`),this.drawRow(e,{elementList:o.value,positionList:s,rowList:o.rowList,pageNo:c,startIndex:0,innerWidth:(o.width-t)*n,zone:f,keyContext:{containerKey:h,tablePath:[...w,`${i}/tr:${a}/${u}`]},isDrawLineBreak:m,isDrawRange:!1}),e.endGroup?.()}let l=o?this.tableParticle.getFragmentTdList(s,o):s.trList.flatMap(e=>e.tdList);for(let r of l){let a=r.rowList,l=0;if(o){let[e,t]=this.tableParticle.getTdWindowInFragment(r,s,o);if(t<=e)continue;if(e>0||t<r.height){let n=this.tableParticle.getTdVisibleRowListByWindow(r,e,t);a=n.rowList,l=n.startIndex}}let u=r.trIndex??0,h=r.tdIndex??0,g=`${i}/tr:${u}/${r.id??`td:${u}:${h}`}`;this.drawRow(e,{elementList:r.value,positionList:r.positionList,rowList:a,pageNo:c,startIndex:l,innerWidth:(r.width-t)*n,zone:f,keyContext:{containerKey:`${d??p}/${g}`,tablePath:[...w,g]},isDrawLineBreak:m})}}}a.isList&&a.height>0&&this.listParticle.drawListStyle(e,a,u[a.startIndex]),this.textParticle.complete(),this.control.drawBorder(e),this.underline.render(e),this.strikeout.render(e),this.traceParticle.flush(e),this.group.render(e);let A=!v&&!y&&(!!(D.width&&D.height)||_&&b&&k&&k.id===x);if(e.beginGroup?.(ca(c,`selection`),`layer`),A){if(e.beginGroup?.(`${p}:selection`,`group`),D.width&&D.height){let{x:t,y:n,width:r,height:i}=D;this.range.render(e,t,n,r,i)}if(_&&b&&k&&k.id===x){let{coordinate:{leftTop:[t,n]}}=a.fragmentPosition||u[a.startIndex];this.tableParticle.drawRange(e,k,t,n,a.tableFragment)}e.endGroup?.()}e.endGroup?.(),e.endGroup?.(),d&&e.endGroup?.()}}_drawFloat(e,t){let n=this.position.getFloatPositionList(),{imgDisplays:r,pageNo:i}=t;for(let t=0;t<n.length;t++){let a=n[t],o=a.element;if((i===a.pageNo||a.zone===N.HEADER||a.zone==N.FOOTER)&&o.imgDisplay&&r.includes(o.imgDisplay)&&o.type===B.IMAGE){let{x:t,y:n}=this.position.getFloatPositionCoordinate(a);this.imageParticle.render(e,o,t,n)}}}_clearPage(e){let t=this.backend.canvas;if(t){let n=t.getContext(e),r=t.getPage(e);n.clearRect(0,0,Math.max(r.width,this.getWidth()),Math.max(r.height,this.getHeight()))}this.blockParticle.clear()}_drawPage(e){let{elementList:t,positionList:n,rowList:r,pageNo:i}=e,{inactiveAlpha:a,pageMode:o,header:s,footer:c,pageNumber:l,lineNumber:u,pageBorder:d}=this.options,f=this.mode===M.PRINT,p=o===P.CONTINUITY,{innerWidth:m}=this.getPageSize(i),h=new ia;this._clearPage(i),h.beginGroup(sa(i),`page`),h.beginGroup(ca(i,`background`),`layer`),h.globalAlpha=this.zone.isMainActive()?1:a,f&&this.options.modeRule[M.PRINT]?.backgroundDisabled||this.background.render(h,i),f||this.area.render(h,i),this.columnManager.drawSeparator(h,i),!p&&this.options.watermark.data&&this.options.watermark.layer===rr.BOTTOM&&this.waterMark.render(h,i),f||this.margin.render(h,i),this._drawFloat(h,{pageNo:i,imgDisplays:[g.FLOAT_BOTTOM]}),h.endGroup(),h.beginGroup(ca(i,`control-highlight`),`layer`),f||this.control.renderHighlightList(h,i),h.endGroup(),h.beginGroup(ca(i,`content`),`layer`);let _=r[0]?.startIndex;this.drawRow(h,{elementList:t,positionList:n,rowList:r,pageNo:i,startIndex:_,innerWidth:m,zone:N.MAIN}),this.getIsPagingMode()&&(s.disabled||this.header.render(h,i),l.disabled||this.pageNumber.render(h,i),c.disabled||this.footer.render(h,i)),h.endGroup(),h.beginGroup(ca(i,`foreground`),`layer`),this._drawFloat(h,{pageNo:i,imgDisplays:[g.FLOAT_TOP,g.SURROUND]}),h.endGroup(),h.beginGroup(ca(i,`search`),`layer`),!f&&this.search.getSearchKeyword()&&this.search.render(h,i),h.endGroup(),h.beginGroup(ca(i,`decoration`),`layer`),!f&&this.spellcheck.getSpellcheckRangeList().length&&this.spellcheck.render(h,i),this.elementList.length<=1&&!this.elementList[0]?.listId&&this.placeholder.render(h),u.disabled||this.lineNumber.render(h,i),d.disabled||this.pageBorder.render(h,i),this.badge.render(h,i),h.endGroup(),h.beginGroup(ca(i,`graffiti`),`layer`),this.isGraffitiMode()&&this.graffiti.render(h,i),h.endGroup(),h.beginGroup(ca(i,`watermark`),`layer`),!p&&this.options.watermark.data&&this.options.watermark.layer===rr.TOP&&this.waterMark.render(h,i),h.endGroup(),h.endGroup(),this.backend.renderPage(i,h)}_disconnectLazyRender(){this.backend.disconnectVisibility()}_lazyRender(){let e=this.position.getOriginalMainPositionList(),t=this.getOriginalMainElementList();this.backend.observeVisibility(n=>{this._drawPage({elementList:t,positionList:e,rowList:this.pageRowList[n],pageNo:n})})}_immediateRender(){let e=this.position.getOriginalMainPositionList(),t=this.getOriginalMainElementList();for(let n=0;n<this.pageRowList.length;n++)this._drawPage({elementList:t,positionList:e,rowList:this.pageRowList[n],pageNo:n})}render(e){this.renderCount++;let{header:t,footer:n}=this.options,{isSubmitHistory:r=!0,isSetCursor:i=!0,isCompute:a=!0,isLazy:o=!0,isInit:s=!1,isSourceHistory:c=!1,isFirstRender:l=!1}=e||{},{curIndex:u}=e||{},d=this.getInnerWidth(),f=this.getIsPagingMode(),p=this.pageRowList.length,m=this.pageDirectionList;if(a){this.spellcheck.setSpellcheckRangeList(null),this.position.setFloatPositionList([]),f&&(this.columnManager.compute(),t.disabled||this.header.compute(),n.disabled||this.footer.compute());let e=this.getMargins(),r=this.getHeight(),i=this.header.getExtraHeight(),a={startX:e[3],startY:e[0]+i,pageHeight:r,isPagingMode:f,innerWidth:d,surroundElementList:li(this.elementList),elementList:this.elementList},o=this.incrementalRowComputer.tryCompute(this.incrementalRowComputer.consumeDirtyRange(),a);this.rawRowList=o?.rowList??this.computeRowList(a),this.incrementalRowComputer.observeLayout(),this.rowList=f?this.tablePaging.splitTableRowAcrossPages(this.rawRowList):this.rawRowList,this.isElementListTruncated=!1,this.pageRowList=this._computePageList();let s=o?this.incrementalRowComputer.findPageNoOfRow(o.firstChangedRow):void 0;if(this.position.computePositionList({fromPageNo:s}),this.area.compute(),!this.isPrintMode()){let e=this.search.getSearchKeyword();e&&this.search.compute(e),this.control.computeHighlightList()}this.isGraffitiMode()&&this.graffiti.compute()}this.imageObserver.clearAll(),this.cursor.recoveryCursor();for(let e=0;e<this.pageRowList.length;e++)this.backend.getPage(e)||this._createPage(e);let h=this.pageRowList.length,g=this.backend.getPageList().length;if(g>h){let e=g-h;this.backend.getPageList().splice(h,e).forEach(e=>e.remove())}(m.length!==this.pageDirectionList.length||m.some((e,t)=>e!==this.pageDirectionList[t]))&&this._updatePageSizes(),o&&f?this._lazyRender():this._immediateRender(),i?u=this.setCursor(u):this.range.getIsSelection()&&this.cursor.focus(),(r&&!l||u!==void 0&&this.historyManager.isStackEmpty())&&this.submitHistory(u),a&&this.eventBus.isSubscribe(`renderChange`)&&this.eventBus.emit(`renderChange`),je(()=>{this.range.setRangeStyle(),a&&this.control.getActiveControl()&&this.control.reAwakeControl(),a&&!this.isReadonly()&&this.position.getPositionContext().isTable&&this.tableTool.render(),a&&!this.isReadonly()&&this.areaTool.render(),a&&!this.zone.isMainActive()&&this.zone.drawZoneIndicator(),this.ruler.render(),p!==this.pageRowList.length&&(this.listener.pageSizeChange&&this.listener.pageSizeChange(this.pageRowList.length),this.eventBus.isSubscribe(`pageSizeChange`)&&this.eventBus.emit(`pageSizeChange`,this.pageRowList.length)),(r||c)&&!s&&(this.listener.contentChange&&this.listener.contentChange(),this.eventBus.isSubscribe(`contentChange`)&&this.eventBus.emit(`contentChange`))})}setCursor(e){let t=this.position.getPositionContext(),n=this.position.getPositionList();if(t.isTable){let n=this.getOriginalElementList(),r=this.position.getTableTdByContext(n,t)?.positionList;r?.length&&(e===void 0||e>r.length-1)&&(e=r.length-1);let i=r?.[e];this.position.setCursorPosition(i||null),this.tableTool.render()}else this.position.setCursorPosition(e===void 0?null:n[e]);this.areaTool.render();let r=!0;if(e!==void 0&&t.isImage&&t.isDirectHit){let t=this.getElementList()[e];if(Ht.includes(t.type)){r=!1;let e=this.position.getCursorPosition();this.previewer.updateResizer(t,e)}}return this.cursor.drawCursor({isShow:r}),e}submitHistory(e){if(this.options.historyMaxRecordCount===0)return;let t=this.position.getPositionContext(),n=oi(this.elementList),r=oi(this.header.getElementList()),i=oi(this.footer.getElementList()),a=K(this.range.getRange()),o=this.pageNo,s=K(t),c=this.zone.getZone();this.historyManager.execute(()=>{this.zone.setZone(c),this.setPageNo(o),this.position.setPositionContext(K(s)),this.header.setElementList(K(r)),this.footer.setElementList(K(i)),this.elementList=K(n),this.range.replaceRange(K(a)),this.render({curIndex:e,isSubmitHistory:!1,isSourceHistory:!0})})}destroy(){this.container.remove(),this.globalEvent.removeEvent(),this.scrollObserver.removeEvent(),this.selectionObserver.removeEvent(),this.workerManager.destroy(),this.magnifier.destroy(),this.accessibility.destroy(),this.ruler.dispose(),this.backend.destroy()}clearSideEffect(){this.getPreviewer().clearResizer(),this.getTableTool().dispose(),this.getAreaTool().dispose(),this.getHyperlinkParticle().clearHyperlinkPopup(),this.getHintParticle().clearHintPopup(),this.getTraceParticle().clearTracePopup(),this.getDateParticle().clearDatePicker()}}})),cd,ld=o((()=>{cd=class{executeMode;executeCut;executeCopy;executePaste;executeSelectAll;executeBackspace;executeSetRange;executeReplaceRange;executeSetPositionContext;executeForceUpdate;executeBlur;executeHideCursor;executeUndo;executeRedo;executePainter;executeApplyPainterStyle;executeFormat;executeFont;executeSize;executeSizeAdd;executeSizeMinus;executeBold;executeItalic;executeUnderline;executeStrikeout;executeSuperscript;executeSubscript;executeColor;executeHighlight;executeTitle;executeList;executeRowFlex;executeRowMargin;executeSpacingBefore;executeSpacingAfter;executeIndentLeft;executeIndentRight;executeIndentFirstLine;executeSetTabStops;executeInsertTable;executeInsertTableTopRow;executeInsertTableBottomRow;executeInsertTableLeftCol;executeInsertTableRightCol;executeDeleteTableRow;executeDeleteTableCol;executeDeleteTable;executeMergeTableCell;executeCancelMergeTableCell;executeSplitVerticalTableCell;executeSplitHorizontalTableCell;executeTableTdVerticalAlign;executeTableBorderType;executeTableBorderColor;executeTableTdBorderType;executeTableTdBorderColor;executeTableTdBorderWidth;executeTableTdSlashType;executeTableTdBackgroundColor;executeTableAutoFitToContent;executeTableAutoFitToPage;executeTableSelectAll;executeImage;executeHyperlink;executeDeleteHyperlink;executeCancelHyperlink;executeEditHyperlink;executeSeparator;executePageBreak;executeAddWatermark;executeDeleteWatermark;executeSearch;executeSetSpellcheckRangeList;executeSearchNavigatePre;executeSearchNavigateNext;executeReplace;executePrint;executeReplaceImageElement;executeSaveAsImageElement;executeSetImageCrop;executeSetImageCaption;executeChangeImageDisplay;executePageMode;executeSetColumns;executePageScale;executePageScaleRecovery;executePageScaleMinus;executePageScaleAdd;executePaperSize;executePaperDirection;executePageDirection;executeSetPaperMargin;executeSetMainBadge;executeSetAreaBadge;executeInsertElementList;executeInsertArea;executeSetAreaValue;executeSetAreaProperties;executeDeleteArea;executeLocationArea;executeClearGraffiti;executeToggleTrace;executeCompare;executeToggleRuler;executeAppendElementList;executeUpdateElementById;executeDeleteElementById;executeSetValue;executeRemoveControl;executeTranslate;executeSetLocale;executeLocationCatalog;executeWordTool;executeSetHTML;executeSetGroup;executeDeleteGroup;executeLocationGroup;executeSetZone;executeSetControlValue;executeSetControlValueList;executeSetControlExtension;executeSetControlExtensionList;executeSetControlProperties;executeSetControlPropertiesList;executeSetControlHighlight;executeValidate;executeClearValidate;executeLocationControl;executeInsertControl;executeJumpControl;executeUpdateOptions;executeSetBackend;executeInsertTitle;executeFocus;executeComputeElementListHeight;getCatalog;getImage;getOptions;getValue;getValueAsync;getAreaValue;getHTML;getText;getSpellcheckWordList;getWordCount;getCursorPosition;getRemainingContentHeight;getRange;getRangeText;getRangeContext;getRangeRow;getRangeParagraph;getSurroundElementList;getKeywordRangeList;getKeywordContext;getPaperMargin;getColumns;getSearchNavigateInfo;getLocale;getGroupIds;getGroupRectList;getControlValue;getControlList;getContainer;getTitleValue;getPositionContextByEvent;getElementById;interceptor;setInterceptor(e){this.interceptor=e}wrap(e,t){return((...n)=>(this.interceptor?.(e,n),t(...n)))}constructor(e){this.executeMode=this.wrap(`executeMode`,e.mode.bind(e)),this.executeCut=this.wrap(`executeCut`,e.cut.bind(e)),this.executeCopy=this.wrap(`executeCopy`,e.copy.bind(e)),this.executePaste=this.wrap(`executePaste`,e.paste.bind(e)),this.executeSelectAll=this.wrap(`executeSelectAll`,e.selectAll.bind(e)),this.executeBackspace=this.wrap(`executeBackspace`,e.backspace.bind(e)),this.executeSetRange=this.wrap(`executeSetRange`,e.setRange.bind(e)),this.executeReplaceRange=this.wrap(`executeReplaceRange`,e.replaceRange.bind(e)),this.executeSetPositionContext=this.wrap(`executeSetPositionContext`,e.setPositionContext.bind(e)),this.executeForceUpdate=this.wrap(`executeForceUpdate`,e.forceUpdate.bind(e)),this.executeBlur=this.wrap(`executeBlur`,e.blur.bind(e)),this.executeHideCursor=this.wrap(`executeHideCursor`,e.hideCursor.bind(e)),this.executeUndo=this.wrap(`executeUndo`,e.undo.bind(e)),this.executeRedo=this.wrap(`executeRedo`,e.redo.bind(e)),this.executePainter=this.wrap(`executePainter`,e.painter.bind(e)),this.executeApplyPainterStyle=this.wrap(`executeApplyPainterStyle`,e.applyPainterStyle.bind(e)),this.executeFormat=this.wrap(`executeFormat`,e.format.bind(e)),this.executeFont=this.wrap(`executeFont`,e.font.bind(e)),this.executeSize=this.wrap(`executeSize`,e.size.bind(e)),this.executeSizeAdd=this.wrap(`executeSizeAdd`,e.sizeAdd.bind(e)),this.executeSizeMinus=this.wrap(`executeSizeMinus`,e.sizeMinus.bind(e)),this.executeBold=this.wrap(`executeBold`,e.bold.bind(e)),this.executeItalic=this.wrap(`executeItalic`,e.italic.bind(e)),this.executeUnderline=this.wrap(`executeUnderline`,e.underline.bind(e)),this.executeStrikeout=this.wrap(`executeStrikeout`,e.strikeout.bind(e)),this.executeSuperscript=this.wrap(`executeSuperscript`,e.superscript.bind(e)),this.executeSubscript=this.wrap(`executeSubscript`,e.subscript.bind(e)),this.executeColor=this.wrap(`executeColor`,e.color.bind(e)),this.executeHighlight=this.wrap(`executeHighlight`,e.highlight.bind(e)),this.executeTitle=this.wrap(`executeTitle`,e.title.bind(e)),this.executeList=this.wrap(`executeList`,e.list.bind(e)),this.executeRowFlex=this.wrap(`executeRowFlex`,e.rowFlex.bind(e)),this.executeRowMargin=this.wrap(`executeRowMargin`,e.rowMargin.bind(e)),this.executeSpacingBefore=this.wrap(`executeSpacingBefore`,e.spacingBefore.bind(e)),this.executeSpacingAfter=this.wrap(`executeSpacingAfter`,e.spacingAfter.bind(e)),this.executeIndentLeft=this.wrap(`executeIndentLeft`,e.indentLeft.bind(e)),this.executeIndentRight=this.wrap(`executeIndentRight`,e.indentRight.bind(e)),this.executeIndentFirstLine=this.wrap(`executeIndentFirstLine`,e.indentFirstLine.bind(e)),this.executeSetTabStops=this.wrap(`executeSetTabStops`,e.setTabStops.bind(e)),this.executeInsertTable=this.wrap(`executeInsertTable`,e.insertTable.bind(e)),this.executeInsertTableTopRow=this.wrap(`executeInsertTableTopRow`,e.insertTableTopRow.bind(e)),this.executeInsertTableBottomRow=this.wrap(`executeInsertTableBottomRow`,e.insertTableBottomRow.bind(e)),this.executeInsertTableLeftCol=this.wrap(`executeInsertTableLeftCol`,e.insertTableLeftCol.bind(e)),this.executeInsertTableRightCol=this.wrap(`executeInsertTableRightCol`,e.insertTableRightCol.bind(e)),this.executeDeleteTableRow=this.wrap(`executeDeleteTableRow`,e.deleteTableRow.bind(e)),this.executeDeleteTableCol=this.wrap(`executeDeleteTableCol`,e.deleteTableCol.bind(e)),this.executeDeleteTable=this.wrap(`executeDeleteTable`,e.deleteTable.bind(e)),this.executeMergeTableCell=this.wrap(`executeMergeTableCell`,e.mergeTableCell.bind(e)),this.executeCancelMergeTableCell=this.wrap(`executeCancelMergeTableCell`,e.cancelMergeTableCell.bind(e)),this.executeSplitVerticalTableCell=this.wrap(`executeSplitVerticalTableCell`,e.splitVerticalTableCell.bind(e)),this.executeSplitHorizontalTableCell=this.wrap(`executeSplitHorizontalTableCell`,e.splitHorizontalTableCell.bind(e)),this.executeTableTdVerticalAlign=this.wrap(`executeTableTdVerticalAlign`,e.tableTdVerticalAlign.bind(e)),this.executeTableBorderType=this.wrap(`executeTableBorderType`,e.tableBorderType.bind(e)),this.executeTableBorderColor=this.wrap(`executeTableBorderColor`,e.tableBorderColor.bind(e)),this.executeTableTdBorderType=this.wrap(`executeTableTdBorderType`,e.tableTdBorderType.bind(e)),this.executeTableTdBorderColor=this.wrap(`executeTableTdBorderColor`,e.tableTdBorderColor.bind(e)),this.executeTableTdBorderWidth=this.wrap(`executeTableTdBorderWidth`,e.tableTdBorderWidth.bind(e)),this.executeTableTdSlashType=this.wrap(`executeTableTdSlashType`,e.tableTdSlashType.bind(e)),this.executeTableTdBackgroundColor=this.wrap(`executeTableTdBackgroundColor`,e.tableTdBackgroundColor.bind(e)),this.executeTableAutoFitToContent=this.wrap(`executeTableAutoFitToContent`,e.tableAutoFitToContent.bind(e)),this.executeTableAutoFitToPage=this.wrap(`executeTableAutoFitToPage`,e.tableAutoFitToPage.bind(e)),this.executeTableSelectAll=this.wrap(`executeTableSelectAll`,e.tableSelectAll.bind(e)),this.executeImage=this.wrap(`executeImage`,e.image.bind(e)),this.executeHyperlink=this.wrap(`executeHyperlink`,e.hyperlink.bind(e)),this.executeDeleteHyperlink=this.wrap(`executeDeleteHyperlink`,e.deleteHyperlink.bind(e)),this.executeCancelHyperlink=this.wrap(`executeCancelHyperlink`,e.cancelHyperlink.bind(e)),this.executeEditHyperlink=this.wrap(`executeEditHyperlink`,e.editHyperlink.bind(e)),this.executeSeparator=this.wrap(`executeSeparator`,e.separator.bind(e)),this.executePageBreak=this.wrap(`executePageBreak`,e.pageBreak.bind(e)),this.executeAddWatermark=this.wrap(`executeAddWatermark`,e.addWatermark.bind(e)),this.executeDeleteWatermark=this.wrap(`executeDeleteWatermark`,e.deleteWatermark.bind(e)),this.executeSearch=this.wrap(`executeSearch`,e.search.bind(e)),this.executeSetSpellcheckRangeList=this.wrap(`executeSetSpellcheckRangeList`,e.setSpellcheckRangeList.bind(e)),this.executeSearchNavigatePre=this.wrap(`executeSearchNavigatePre`,e.searchNavigatePre.bind(e)),this.executeSearchNavigateNext=this.wrap(`executeSearchNavigateNext`,e.searchNavigateNext.bind(e)),this.executeReplace=this.wrap(`executeReplace`,e.replace.bind(e)),this.executePrint=this.wrap(`executePrint`,e.print.bind(e)),this.executeReplaceImageElement=this.wrap(`executeReplaceImageElement`,e.replaceImageElement.bind(e)),this.executeSaveAsImageElement=this.wrap(`executeSaveAsImageElement`,e.saveAsImageElement.bind(e)),this.executeSetImageCrop=this.wrap(`executeSetImageCrop`,e.setImageCrop.bind(e)),this.executeSetImageCaption=this.wrap(`executeSetImageCaption`,e.setImageCaption.bind(e)),this.executeChangeImageDisplay=this.wrap(`executeChangeImageDisplay`,e.changeImageDisplay.bind(e)),this.executePageMode=this.wrap(`executePageMode`,e.pageMode.bind(e)),this.executeSetColumns=this.wrap(`executeSetColumns`,e.setColumns.bind(e)),this.executePageScale=this.wrap(`executePageScale`,e.pageScale.bind(e)),this.executePageScaleRecovery=this.wrap(`executePageScaleRecovery`,e.pageScaleRecovery.bind(e)),this.executePageScaleMinus=this.wrap(`executePageScaleMinus`,e.pageScaleMinus.bind(e)),this.executePageScaleAdd=this.wrap(`executePageScaleAdd`,e.pageScaleAdd.bind(e)),this.executePaperSize=this.wrap(`executePaperSize`,e.paperSize.bind(e)),this.executePaperDirection=this.wrap(`executePaperDirection`,e.paperDirection.bind(e)),this.executePageDirection=this.wrap(`executePageDirection`,e.pageDirection.bind(e)),this.executeSetPaperMargin=this.wrap(`executeSetPaperMargin`,e.setPaperMargin.bind(e)),this.executeSetMainBadge=this.wrap(`executeSetMainBadge`,e.setMainBadge.bind(e)),this.executeSetAreaBadge=this.wrap(`executeSetAreaBadge`,e.setAreaBadge.bind(e)),this.getAreaValue=e.getAreaValue.bind(e),this.executeInsertArea=this.wrap(`executeInsertArea`,e.insertArea.bind(e)),this.executeSetAreaValue=this.wrap(`executeSetAreaValue`,e.setAreaValue.bind(e)),this.executeSetAreaProperties=this.wrap(`executeSetAreaProperties`,e.setAreaProperties.bind(e)),this.executeDeleteArea=this.wrap(`executeDeleteArea`,e.deleteArea.bind(e)),this.executeLocationArea=this.wrap(`executeLocationArea`,e.locationArea.bind(e)),this.executeClearGraffiti=this.wrap(`executeClearGraffiti`,e.clearGraffiti.bind(e)),this.executeToggleTrace=this.wrap(`executeToggleTrace`,e.toggleTrace.bind(e)),this.executeCompare=this.wrap(`executeCompare`,e.compare.bind(e)),this.executeToggleRuler=this.wrap(`executeToggleRuler`,e.toggleRuler.bind(e)),this.executeInsertElementList=this.wrap(`executeInsertElementList`,e.insertElementList.bind(e)),this.executeAppendElementList=this.wrap(`executeAppendElementList`,e.appendElementList.bind(e)),this.executeUpdateElementById=this.wrap(`executeUpdateElementById`,e.updateElementById.bind(e)),this.executeDeleteElementById=this.wrap(`executeDeleteElementById`,e.deleteElementById.bind(e)),this.executeSetValue=this.wrap(`executeSetValue`,e.setValue.bind(e)),this.executeRemoveControl=this.wrap(`executeRemoveControl`,e.removeControl.bind(e)),this.executeTranslate=this.wrap(`executeTranslate`,e.translate.bind(e)),this.executeSetLocale=this.wrap(`executeSetLocale`,e.setLocale.bind(e)),this.executeLocationCatalog=this.wrap(`executeLocationCatalog`,e.locationCatalog.bind(e)),this.executeWordTool=this.wrap(`executeWordTool`,e.wordTool.bind(e)),this.executeSetHTML=this.wrap(`executeSetHTML`,e.setHTML.bind(e)),this.executeSetGroup=this.wrap(`executeSetGroup`,e.setGroup.bind(e)),this.executeDeleteGroup=this.wrap(`executeDeleteGroup`,e.deleteGroup.bind(e)),this.executeLocationGroup=this.wrap(`executeLocationGroup`,e.locationGroup.bind(e)),this.executeSetZone=this.wrap(`executeSetZone`,e.setZone.bind(e)),this.executeUpdateOptions=this.wrap(`executeUpdateOptions`,e.updateOptions.bind(e)),this.executeSetBackend=this.wrap(`executeSetBackend`,e.setBackend.bind(e)),this.executeInsertTitle=this.wrap(`executeInsertTitle`,e.insertTitle.bind(e)),this.executeFocus=this.wrap(`executeFocus`,e.focus.bind(e)),this.executeComputeElementListHeight=this.wrap(`executeComputeElementListHeight`,e.computeElementListHeight.bind(e)),this.getImage=e.getImage.bind(e),this.getOptions=e.getOptions.bind(e),this.getValue=e.getValue.bind(e),this.getValueAsync=e.getValueAsync.bind(e),this.getHTML=e.getHTML.bind(e),this.getText=e.getText.bind(e),this.getSpellcheckWordList=e.getSpellcheckWordList.bind(e),this.getWordCount=e.getWordCount.bind(e),this.getCursorPosition=e.getCursorPosition.bind(e),this.getRemainingContentHeight=e.getRemainingContentHeight.bind(e),this.getRange=e.getRange.bind(e),this.getRangeText=e.getRangeText.bind(e),this.getRangeContext=e.getRangeContext.bind(e),this.getRangeRow=e.getRangeRow.bind(e),this.getRangeParagraph=e.getRangeParagraph.bind(e),this.getSurroundElementList=e.getSurroundElementList.bind(e),this.getKeywordRangeList=e.getKeywordRangeList.bind(e),this.getKeywordContext=e.getKeywordContext.bind(e),this.getCatalog=e.getCatalog.bind(e),this.getPaperMargin=e.getPaperMargin.bind(e),this.getColumns=e.getColumns.bind(e),this.getSearchNavigateInfo=e.getSearchNavigateInfo.bind(e),this.getLocale=e.getLocale.bind(e),this.getGroupIds=e.getGroupIds.bind(e),this.getGroupRectList=e.getGroupRectList.bind(e),this.getContainer=e.getContainer.bind(e),this.getTitleValue=e.getTitleValue.bind(e),this.getPositionContextByEvent=e.getPositionContextByEvent.bind(e),this.getElementById=e.getElementById.bind(e),this.executeSetControlValue=this.wrap(`executeSetControlValue`,e.setControlValue.bind(e)),this.executeSetControlValueList=this.wrap(`executeSetControlValueList`,e.setControlValueList.bind(e)),this.executeSetControlExtension=this.wrap(`executeSetControlExtension`,e.setControlExtension.bind(e)),this.executeSetControlExtensionList=this.wrap(`executeSetControlExtensionList`,e.setControlExtensionList.bind(e)),this.executeSetControlProperties=this.wrap(`executeSetControlProperties`,e.setControlProperties.bind(e)),this.executeSetControlPropertiesList=this.wrap(`executeSetControlPropertiesList`,e.setControlPropertiesList.bind(e)),this.executeSetControlHighlight=this.wrap(`executeSetControlHighlight`,e.setControlHighlight.bind(e)),this.executeValidate=this.wrap(`executeValidate`,e.validate.bind(e)),this.executeClearValidate=this.wrap(`executeClearValidate`,e.clearValidate.bind(e)),this.getControlValue=e.getControlValue.bind(e),this.getControlList=e.getControlList.bind(e),this.executeLocationControl=this.wrap(`executeLocationControl`,e.locationControl.bind(e)),this.executeInsertControl=this.wrap(`executeInsertControl`,e.insertControl.bind(e)),this.executeJumpControl=this.wrap(`executeJumpControl`,e.jumpControl.bind(e))}}}));function ud(e,t){let n=0;for(let r=1;r<t;r++){let t=e[r],i=e[r-1];(t.value===``&&!t.listWrap&&!t.listId||t.listId!==i?.listId&&i.value!==``||t.titleId!==i?.titleId&&i.value!==``)&&n++}return n}var dd=o((()=>{D()}));function fd(e,t){return e===1125&&t===1593?{size:`a3`,width:`297mm`,height:`420mm`}:e===794&&t===1123?{size:`a4`,width:`210mm`,height:`297mm`}:e===565&&t===796?{size:`a5`,width:`148mm`,height:`210mm`}:{size:``,width:`${e}px`,height:`${t}px`}}async function pd(e,t,n){let{width:r,height:i,direction:a=F.VERTICAL,pageDirections:o,iframeInfoList:s=[]}=t,c=document.createElement(`iframe`);c.style.visibility=`hidden`,c.style.position=`absolute`,c.style.left=`0`,c.style.top=`0`,c.style.width=`0`,c.style.height=`0`,c.style.border=`none`,document.body.append(c);let l=c.contentWindow,u=l.document;u.open();let d=document.createElement(`div`),f=fd(r,i),p=e=>o?.[e]||a,m=p(0),h=p(e-1),g=Array.from({length:e}).some((e,t)=>p(t)!==m);Array.from({length:e}).forEach((t,r)=>{let i=p(r),a=document.createElement(`div`);a.style.position=`relative`,a.style.width=i===F.HORIZONTAL?f.height:f.width,a.style.height=i===F.HORIZONTAL?f.width:f.height,g&&r<e-1&&a.style.setProperty(`page`,i===F.HORIZONTAL?`canvas-editor-landscape`:`canvas-editor-portrait`),n(a,r),(s[r]||[]).forEach(e=>{let t=document.createElement(`iframe`);if(t.style.position=`absolute`,t.style.left=`${e.x}px`,t.style.top=`${e.y}px`,t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.border=`none`,e.src)t.src=e.src;else if(e.srcdoc){let n=`
|
|
73
|
+
<script>
|
|
74
|
+
if (!window.__CUSTOM_CANVAS_EDITOR_LOAD_HOOK__) {
|
|
75
|
+
window.postMessage({ type: '__LOADED_TO_CANVAS_EDITOR__' }, '*')
|
|
76
|
+
}
|
|
77
|
+
<\/script>`,r=e.srcdoc;t.srcdoc=r.includes(`</body>`)?r.replace(`</body>`,`${n}</body>`):r+n}a.append(t)}),d.append(a)});let _=document.createElement(`style`),v=`
|
|
78
|
+
* {
|
|
79
|
+
margin: 0;
|
|
80
|
+
padding: 0;
|
|
81
|
+
}${g?`
|
|
82
|
+
@page {
|
|
83
|
+
margin: 0;
|
|
84
|
+
size: ${f.size} ${h===F.HORIZONTAL?`landscape`:`portrait`};
|
|
85
|
+
}
|
|
86
|
+
@page canvas-editor-portrait {
|
|
87
|
+
margin: 0;
|
|
88
|
+
size: ${f.size} portrait;
|
|
89
|
+
}
|
|
90
|
+
@page canvas-editor-landscape {
|
|
91
|
+
margin: 0;
|
|
92
|
+
size: ${f.size} landscape;
|
|
93
|
+
}`:`
|
|
94
|
+
@page {
|
|
95
|
+
margin: 0;
|
|
96
|
+
size: ${f.size} ${m===F.HORIZONTAL?`landscape`:`portrait`};
|
|
97
|
+
}`}`;_.append(document.createTextNode(v));let y=Array.from(document.querySelectorAll(`style, link[rel="stylesheet"]`)).map(e=>e.outerHTML).join(``);u.write(`${y}${_.outerHTML}${d.innerHTML}`);let b=_d(u);s.length&&await vd(u),await b,setTimeout(async()=>{l.print(),u.close(),window.addEventListener(`mouseover`,()=>{c?.remove()},{once:!0})})}async function md(e,t){return pd(e.length,t,(t,n)=>{let r=document.createElement(`img`);r.style.width=`100%`,r.style.height=`100%`,r.style.position=`absolute`,r.style.left=`0`,r.style.top=`0`,r.src=e[n],t.append(r)})}async function hd(e,t){return pd(e.length,t,(t,n)=>{let r=e[n];r.style.width=`100%`,r.style.height=`100%`,r.style.position=`absolute`,r.style.left=`0`,r.style.top=`0`,r.style.margin=`0`,r.style.cursor=`auto`,r.style.userSelect=`text`,t.append(r)})}function gd(e){return new Promise(t=>{let n=()=>{clearTimeout(r),t()};e.addEventListener(`load`,n,{once:!0}),e.addEventListener(`error`,n,{once:!0});let r=setTimeout(n,yd)})}async function _d(e){let t=Array.from(e.querySelectorAll(`image, link[rel="stylesheet"]`)).filter(e=>e.tagName.toLowerCase()===`link`?e.hasAttribute(`href`):e.hasAttribute(`href`)||e.hasAttribute(`xlink:href`));await Promise.all(t.map(gd)),await e.fonts?.ready}async function vd(e){let t=Array.from(e.querySelectorAll(`iframe`)).map(e=>new Promise(t=>{e.srcdoc?e.contentWindow?.addEventListener(`message`,e=>{e.data.type===`__LOADED_TO_CANVAS_EDITOR__`&&t(!0)}):t(!0)}));await Promise.allSettled(t)}var yd,bd=o((()=>{z(),yd=1e4}));function xd(e,t,n){if(!n)return;let r=e[e.length-1];r&&r.type===t?r.value+=n:e.push({type:t,value:n})}function Sd(e,t){let n=e.length,r=t.length,i=Math.ceil((n+r)/2),a=n-r,o=i,s=Array(2*i+1).fill(0),c=Array(2*i+1).fill(0);for(let l=0;l<=i;l++){for(let i=-l;i<=l;i+=2){let u=i===-l||i!==l&&s[i-1+o]<s[i+1+o]?s[i+1+o]:s[i-1+o]+1,d=u-i,f=u,p=d;for(;u<n&&d<r&&e[u]===t[d];)u++,d++;if(s[i+o]=u,a%2!=0){let e=i-a;if(e>=1-l&&e<=l-1&&u+c[e+o]>=n)return{x:f,y:p,u,v:d,d:2*l-1}}}for(let i=-l;i<=l;i+=2){let u;u=i===l?c[i-1+o]:i===-l?c[i+1+o]+1:Math.max(c[i-1+o],c[i+1+o]+1);let d=u+i,f=u,p=d;for(;u<n&&d>=0&&d<r&&e[n-1-u]===t[r-1-d];)u++,d++;if(c[i+o]=u,a%2==0){let e=i+a;if(e>=-l&&e<=l&&u+s[e+o]>=n)return{x:n-u,y:r-d,u:n-f,v:r-p,d:2*l}}}}return{x:0,y:0,u:n,v:r,d:n+r}}function Cd(e,t,n,r,i,a,o){let s=0;for(;t+s<n&&i+s<a&&e[t+s]===r[i+s];)s++;s&&xd(o,`equal`,e.slice(t,t+s).join(``)),t+=s,i+=s;let c=0;for(;n-1-c>=t&&a-1-c>=i&&e[n-1-c]===r[a-1-c];)c++;let l=n-c,u=a-c;if(t>=l)xd(o,`insert`,r.slice(i,u).join(``));else if(i>=u)xd(o,`delete`,e.slice(t,l).join(``));else{let n=e.slice(t,l),a=r.slice(i,u),s=Sd(n,a);s.d<=1?(xd(o,`delete`,n.join(``)),xd(o,`insert`,a.join(``))):(Cd(e,t,t+s.x,r,i,i+s.y,o),(s.u!==s.x||s.v!==s.y)&&xd(o,`equal`,n.slice(s.x,s.u).join(``)),Cd(e,t+s.u,l,r,i+s.v,u,o))}c&&xd(o,`equal`,e.slice(l,n).join(``))}function wd(e,t){let n=[...e],r=[...t],i=[];return Cd(n,0,n.length,r,0,r.length,i),i}function Td(e){let t=e.split(`
|
|
98
|
+
`);return t.map((e,n)=>n<t.length-1?`${e}\n`:e)}function Ed(e,t){if(e===t)return 1;if(!e.length||!t.length)return 0;let n=n=>{if(e.length<n||t.length<n)return 0;let r=new Map;for(let t=0;t<=e.length-n;t++){let i=e.slice(t,t+n);r.set(i,(r.get(i)||0)+1)}let i=0;for(let e=0;e<=t.length-n;e++){let a=t.slice(e,e+n),o=r.get(a)||0;o>0&&(i++,r.set(a,o-1))}return 2*i/(e.length-n+1+(t.length-n+1))};return Math.max(n(1),n(2))}function Dd(e,t,n){let r=Td(t),i=Td(n),a=Math.max(r.length,i.length);for(let t=0;t<a;t++){let n=r[t],a=i[t];if(n!==void 0&&a!==void 0&&(n===a||Ed(n,a)>=Vd))for(let t of wd(n,a))xd(e,t.type,t.value);else n!==void 0&&xd(e,`delete`,n),a!==void 0&&xd(e,`insert`,a)}}function Od(e,t){if(!e.includes(`
|
|
99
|
+
`)&&!t.includes(`
|
|
100
|
+
`))return wd(e,t);let n=Td(e),r=Td(t),i=[];Cd(n,0,n.length,r,0,r.length,i);let a=[];for(let e=0;e<i.length;e++){let t=i[e],n=i[e+1];t.type===`delete`&&n?.type===`insert`?(Dd(a,t.value,n.value),e++):t.type===`insert`&&n?.type===`delete`?(Dd(a,n.value,t.value),e++):xd(a,t.type,t.value)}return a}function kd(e){let t=e[0],n=t.control?.conceptId||t.controlId;return n?`control:${n}`:t.type===B.LIST&&t.listId?`list:${t.listId}`:t.type===B.TITLE&&t.titleId?`title:${t.titleId}`:t.type===B.HYPERLINK&&t.url?`hyperlink:${t.url}`:null}function Ad(e){let t=[[]],n=[];return e.forEach((e,r)=>{if(Jr(e)){if(!e.value)return;for(let n of e.value)t[t.length-1].push({elementIndex:r,char:n});return}let i=n[n.length-1];if(e.controlId&&i&&!t[t.length-1].length&&i.elements[0].controlId===e.controlId){i.elements.push(e);return}let a={elements:[e],key:null};a.key=kd(a.elements),n.push(a),t.push([])}),{segments:t,anchors:n}}function jd(e,t,n,r){let i=[],a=()=>{if(!i.length)return;let n=t[i[0].elementIndex],a={...n,value:i.map(e=>e.char).join(``)};r&&(a.trace=[...n.trace||[],{type:r}]),e.push(a),i=[]};for(let e of n)i.length&&e.elementIndex!==i[0].elementIndex&&a(),i.push(e);a()}function Md(e,t){for(let n of e){let e=n.trace||[];e[e.length-1]?.type!==t&&(n.trace=[...e,{type:t}]),n.control?.value&&Md(n.control.value,t),n.valueList&&Md(n.valueList,t);for(let e of n.trList||[])for(let n of e.tdList)Md(n.value,t)}}function Nd(e,t){let n=e||[],r=t||[],i=[],a=Math.min(n.length,r.length);for(let e=0;e<a;e++){let t=r[e],a=n[e].tdList,o=t.tdList,s=Math.min(a.length,o.length);for(let e=0;e<s;e++)o[e].value=zd(a[e].value,o[e].value);for(let e=s;e<a.length;e++)Md(a[e].value,fn.DELETED),t.tdList.push(a[e]);for(let e=s;e<o.length;e++)Md(o[e].value,fn.INSERTED);i.push(t)}for(let e=a;e<n.length;e++){for(let t of n[e].tdList)Md(t.value,fn.DELETED);i.push(n[e])}for(let e=a;e<r.length;e++){for(let t of r[e].tdList)Md(t.value,fn.INSERTED);i.push(r[e])}return i}function Pd(e,t){let n=e.elements[0],r=t.elements[0];if(e.elements.length===1&&t.elements.length===1&&n.type===r.type){if(r.type===B.CONTROL&&r.control)return r.control={...r.control,value:zd(n.control?.value||[],r.control.value||[])},[r];if(n.valueList||r.valueList)return r.valueList=zd(n.valueList||[],r.valueList||[]),[r];if(n.trList||r.trList)return r.trList=Nd(n.trList,r.trList),[r]}return t.elements}function Fd(e){let t=``,n=e=>{for(let r of e){t+=r.value||``,r.control?.value&&n(r.control.value),r.valueList&&n(r.valueList);for(let e of r.trList||[])for(let t of e.tdList)n(t.value)}};return n(e.elements),t}function Id(e,t,n,r){return e.key&&t.key&&e.key===t.key?2:e.elements[0].type===t.elements[0].type?!n&&!r?e.key&&t.key?0:1:+(Ed(n,r)>=Hd):0}function Ld(e,t){let n=e.length,r=t.length,i=e.map(Fd),a=t.map(Fd),o=[],s=[];for(let e=0;e<=n;e++)o.push(Array(r+1).fill(0)),s.push(Array(r+1).fill(0));for(let c=1;c<=n;c++)for(let n=1;n<=r;n++){let r=Id(e[c-1],t[n-1],i[c-1],a[n-1]);o[c][n]=r,s[c][n]=Math.max(s[c-1][n],s[c][n-1],r>0?s[c-1][n-1]+r:0)}let c=new Map,l=n,u=r;for(;l>0&&u>0;){let e=o[l][u];e>0&&s[l][u]===s[l-1][u-1]+e?(c.set(u-1,l-1),l--,u--):s[l][u]===s[l-1][u]?l--:u--}return c}function Rd(e,t,n,r,i){let a=Od(r.map(e=>e.char).join(``),i.map(e=>e.char).join(``)),o=0,s=0;for(let c of a){let a=[...c.value].length;c.type===`equal`?(jd(e,n,i.slice(s,s+a)),o+=a,s+=a):c.type===`insert`?(jd(e,n,i.slice(s,s+a),fn.INSERTED),s+=a):(jd(e,t,r.slice(o,o+a),fn.DELETED),o+=a)}}function zd(e,t){let n=Ad(e),r=Ad(t),i=Ld(n.anchors,r.anchors),a=new Set(i.values()),o=[],s=0,c=t=>{jd(o,e,n.segments[t]||[],fn.DELETED);let r=n.anchors[t];Md(r.elements,fn.DELETED),o.push(...r.elements)};for(let l=0;l<r.anchors.length;l++){let u=i.get(l);if(u===void 0){jd(o,t,r.segments[l]||[],fn.INSERTED);let e=r.anchors[l];Md(e.elements,fn.INSERTED),o.push(...e.elements)}else{for(;s<u;)a.has(s)||c(s),s++;s=u+1,Rd(o,e,t,n.segments[u]||[],r.segments[l]||[]),o.push(...Pd(n.anchors[u],r.anchors[l]))}}for(;s<n.anchors.length;)a.has(s)||c(s),s++;return Rd(o,e,t,n.segments[n.anchors.length]||[],r.segments[r.anchors.length]||[]),o}function Bd(e,t){return zd(K(e),K(t))}var Vd,Hd,Ud=o((()=>{pn(),V(),J(),gi(),Vd=.5,Hd=.5})),Wd,Gd=o((()=>{D(),Kt(),ln(),or(),x(),G(),z(),V(),J(),dd(),gi(),Ir(),bd(),Ud(),Na(),Ja(),ir(),Wd=class{draw;range;position;historyManager;canvasEvent;options;control;workerManager;searchManager;i18n;zone;tableOperate;constructor(e){this.draw=e,this.range=e.getRange(),this.position=e.getPosition(),this.historyManager=e.getHistoryManager(),this.canvasEvent=e.getCanvasEvent(),this.options=e.getOptions(),this.control=e.getControl(),this.workerManager=e.getWorkerManager(),this.searchManager=e.getSearch(),this.i18n=e.getI18n(),this.zone=e.getZone(),this.tableOperate=e.getTableOperate()}mode(e){this.draw.setMode(e)}async cut(){this.draw.isReadonly()||this.draw.isDisabled()||await this.canvasEvent.cut()}async copy(e){await this.canvasEvent.copy(e)}paste(e){this.draw.isReadonly()||this.draw.isDisabled()||Ma(this.canvasEvent,e)}selectAll(){this.canvasEvent.selectAll()}backspace(){if(this.draw.isReadonly())return;let e=this.draw.getElementList(),{startIndex:t,endIndex:n}=this.range.getRange(),r=t===n;if(r&&e[t].value===``&&t===0)return;r?this.draw.deleteElementList(e,t,1):this.draw.deleteElementList(e,t+1,n-t);let i=r?t-1:t;this.range.setRange(i,i),this.draw.render({curIndex:i})}setRange(e,t,n,r,i,a,o){if(e<0||t<0||t<e)return;this.range.setRange(e,t,n,r,i,a,o);let s=e===t;this.draw.render({curIndex:s?e:void 0,isCompute:!1,isSubmitHistory:!1,isSetCursor:s})}replaceRange(e){this.setRange(e.startIndex,e.endIndex,e.tableId,e.startTdIndex,e.endTdIndex,e.startTrIndex,e.endTrIndex)}setPositionContext(e){let{tableId:t,startTrIndex:n,startTdIndex:r}=e,i=this.draw.getOriginalElementList();if(t){let e=i.findIndex(e=>e.id===t);if(!~e)return;let a=i[e].trList[n],o=a.tdList[r];this.position.setPositionContext({isTable:!0,index:e,trIndex:n,tdIndex:r,tdId:o.id,trId:a.id,tableId:t})}else this.position.setPositionContext({isTable:!1})}forceUpdate(e){let{isSubmitHistory:t=!1}=e||{};this.range.clearRange(),this.draw.render({isSubmitHistory:t,isSetCursor:!1})}blur(){this.range.clearRange(),this.draw.getCursor().recoveryCursor()}hideCursor(){this.draw.getCursor().recoveryCursor()}undo(){this.draw.isReadonly()||this.historyManager.undo()}redo(){this.draw.isReadonly()||this.historyManager.redo()}painter(e){if(!e.isDblclick&&this.draw.getPainterStyle()){this.canvasEvent.clearPainterStyle();return}let t=this.range.getSelection();if(!t)return;let n={};t.forEach(e=>{[...Et,...At].forEach(t=>{let r=t;n[r]===void 0&&Reflect.set(n,r,e[r])})}),this.draw.setPainterStyle(n,e)}applyPainterStyle(){this.draw.isReadonly()||this.draw.isDisabled()||this.canvasEvent.applyPainterStyle()}format(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList(),r={},i=[];if(n?.length)i=n,r={isSetCursor:!1};else{let{endIndex:e}=this.range.getRange();if(!~e)return;let t=this.draw.getElementList()[e];t?.value===``&&(i.push(t),r={curIndex:e})}i.length&&(i.forEach(e=>{Et.forEach(t=>{delete e[t]})}),this.draw.render(r))}font(e,t){let{isIgnoreDisabledRule:n=!1}=t||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let r=this.range.getSelectionElementList();if(r?.length)r.forEach(t=>{t.font=e}),this.draw.render({isSetCursor:!1});else{let t=!0,{endIndex:n}=this.range.getRange();if(!~n)return;let r=this.draw.getElementList()[n];this.range.setDefaultStyle({font:e}),r?.value===``?r.font=e:t=!1,this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}size(e,t){let{isIgnoreDisabledRule:n=!1}=t||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let{minSize:r,maxSize:i,defaultSize:a}=this.options;if(e<r||e>i)return;let o={},s=[],c=this.range.getTextLikeSelectionElementList();if(c?.length)s=c,o={isSetCursor:!1};else{let{endIndex:t}=this.range.getRange();if(!~t)return;let n=this.draw.getElementList()[t];this.range.setDefaultStyle({size:e}),n?.value===``?(s.push(n),o={curIndex:t}):this.draw.render({curIndex:t,isCompute:!1,isSubmitHistory:!1})}if(!s.length)return;let l=!1;s.forEach(t=>{!t.size&&e===a||t.size&&t.size===e||(t.size=e,l=!0)}),l&&this.draw.render(o)}sizeAdd(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let{defaultSize:n,maxSize:r}=this.options,i=this.range.getTextLikeSelectionElementList(),a={},o=[];if(i?.length)o=i,a={isSetCursor:!1};else{let{endIndex:e}=this.range.getRange();if(!~e)return;let t=this.draw.getElementList()[e],i=this.range.getDefaultStyle()?.size||t.size||n;this.range.setDefaultStyle({size:i+2>r?r:i+2}),t?.value===``?(o.push(t),a={curIndex:e}):this.draw.render({curIndex:e,isCompute:!1,isSubmitHistory:!1})}if(!o.length)return;let s=!1;o.forEach(e=>{e.size||=n,!(e.size>=r)&&(e.size+2>r?e.size=r:e.size+=2,s=!0)}),s&&this.draw.render(a)}sizeMinus(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let{defaultSize:n,minSize:r}=this.options,i=this.range.getTextLikeSelectionElementList(),a={},o=[];if(i?.length)o=i,a={isSetCursor:!1};else{let{endIndex:e}=this.range.getRange();if(!~e)return;let t=this.draw.getElementList()[e],i=this.range.getDefaultStyle()?.size||t.size||n;this.range.setDefaultStyle({size:i-2<r?r:i-2}),t?.value===``?(o.push(t),a={curIndex:e}):this.draw.render({curIndex:e,isCompute:!1,isSubmitHistory:!1})}if(!o.length)return;let s=!1;o.forEach(e=>{e.size||=n,!(e.size<=r)&&(e.size-2<r?e.size=r:e.size-=2,s=!0)}),s&&this.draw.render(a)}bold(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList();if(n?.length){let e=n.findIndex(e=>!e.bold);n.forEach(t=>{t.bold=!!~e}),this.draw.render({isSetCursor:!1})}else{let e=!0,{endIndex:t}=this.range.getRange();if(!~t)return;let n=this.draw.getElementList()[t];this.range.setDefaultStyle({bold:!(this.range.getDefaultStyle()?.bold??n.bold)}),n?.value===``?n.bold=!n.bold:e=!1,this.draw.render({isSubmitHistory:e,curIndex:t,isCompute:!1})}}italic(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList();if(n?.length){let e=n.findIndex(e=>!e.italic);n.forEach(t=>{t.italic=!!~e}),this.draw.render({isSetCursor:!1})}else{let e=!0,{endIndex:t}=this.range.getRange();if(!~t)return;let n=this.draw.getElementList()[t];this.range.setDefaultStyle({italic:!(this.range.getDefaultStyle()?.italic??n.italic)}),n?.value===``?n.italic=!n.italic:e=!1,this.draw.render({isSubmitHistory:e,curIndex:t,isCompute:!1})}}underline(e,t){let{isIgnoreDisabledRule:n=!1}=t||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let r=this.range.getSelectionElementList();if(r?.length){let t=r.some(t=>!t.underline||!e&&t.textDecoration||e&&!t.textDecoration||e&&t.textDecoration&&!Be(t.textDecoration,e));r.forEach(n=>{n.underline=t,t&&e?n.textDecoration=e:delete n.textDecoration}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let e=!0,{endIndex:t}=this.range.getRange();if(!~t)return;let n=this.draw.getElementList()[t];this.range.setDefaultStyle({underline:!(this.range.getDefaultStyle()?.underline??n?.underline)}),n?.value===``?n.underline=!n.underline:e=!1,this.draw.render({isSubmitHistory:e,curIndex:t,isCompute:!1})}}strikeout(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList();if(n?.length){let e=n.findIndex(e=>!e.strikeout);n.forEach(t=>{t.strikeout=!!~e}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{let e=!0,{endIndex:t}=this.range.getRange();if(!~t)return;let n=this.draw.getElementList()[t];this.range.setDefaultStyle({strikeout:!(this.range.getDefaultStyle()?.strikeout??n.strikeout)}),n?.value===``?n.strikeout=!n.strikeout:e=!1,this.draw.render({isSubmitHistory:e,curIndex:t,isCompute:!1})}}superscript(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList();if(!n)return;let r=n.findIndex(e=>e.type===B.SUPERSCRIPT);n.forEach(e=>{~r?e.type===B.SUPERSCRIPT&&(e.type=B.TEXT,delete e.actualSize):e.type&&e.type!==B.TEXT&&e.type!==B.SUBSCRIPT||(e.type=B.SUPERSCRIPT)}),this.draw.render({isSetCursor:!1})}subscript(e){let{isIgnoreDisabledRule:t=!1}=e||{};if(!t&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let n=this.range.getSelectionElementList();if(!n)return;let r=n.findIndex(e=>e.type===B.SUBSCRIPT);n.forEach(e=>{~r?e.type===B.SUBSCRIPT&&(e.type=B.TEXT,delete e.actualSize):e.type&&e.type!==B.TEXT&&e.type!==B.SUPERSCRIPT||(e.type=B.SUBSCRIPT)}),this.draw.render({isSetCursor:!1})}color(e,t){let{isIgnoreDisabledRule:n=!1}=t||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let r=this.range.getSelectionElementList();if(r?.length)r.forEach(t=>{e?t.color=e:delete t.color}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let t=!0,{endIndex:n}=this.range.getRange();if(!~n)return;let r=this.draw.getElementList()[n];this.range.setDefaultStyle({color:e||void 0}),r?.value===``?e?r.color=e:delete r.color:t=!1,this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}highlight(e,t){let{isIgnoreDisabledRule:n=!1}=t||{};if(!n&&(this.draw.isReadonly()||this.draw.isDisabled()))return;let r=this.range.getSelectionElementList();if(r?.length)r.forEach(t=>{e?t.highlight=e:delete t.highlight}),this.draw.render({isSetCursor:!1,isCompute:!1});else{let t=!0,{endIndex:n}=this.range.getRange();if(!~n)return;let r=this.draw.getElementList()[n];this.range.setDefaultStyle({highlight:e||void 0}),r?.value===``?e?r.highlight=e:delete r.highlight:t=!1,this.draw.render({isSubmitHistory:t,curIndex:n,isCompute:!1})}}title(e){if(this.draw.isReadonly()||this.draw.isDisabled())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.draw.getElementList(),i=t===n?this.range.getRangeParagraphElementList():r.slice(t+1,n+1);if(!i||!i.length)return;let a=q(),o=this.draw.getOptions().title;i.forEach(t=>{(t.type||t.value!==``)&&(e?(this.draw.setElementProperty(t,{level:e,titleId:a}),qr(t)&&this.draw.setElementProperty(t,{size:o[on[e]],bold:!0})):this.draw.deleteElementProperty(t,[`titleId`,`title`,`level`,`size`,`bold`]))});let s=t===n,c=s?n:t;this.draw.render({curIndex:c,isSetCursor:s})}list(e,t){this.draw.isReadonly()||this.draw.getListParticle().setList(e,t)}rowFlex(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;this.draw.setElementProperty(r,{rowFlex:e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}rowMargin(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;this.draw.setElementProperty(r,{rowMargin:e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}spacingBefore(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;r.forEach(t=>{t.spacingBefore=e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}spacingAfter(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;r.forEach(t=>{t.spacingAfter=e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}indentLeft(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;r.forEach(t=>{t.indentLeft=e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}indentRight(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;r.forEach(t=>{t.indentRight=e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}indentFirstLine(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;r.forEach(t=>{t.indentFirstLine=e});let i=t===n,a=i?n:t;this.draw.render({curIndex:a,isSetCursor:i})}setTabStops(e){if(this.draw.isReadonly())return;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return;let r=this.range.getRangeParagraphElementList();if(!r)return;let i=[...e].sort((e,t)=>e.position-t.position);r.forEach(e=>{e.tabStops=i.length?i.map(e=>({...e})):void 0});let a=t===n,o=a?n:t;this.draw.render({curIndex:o,isSetCursor:a})}insertTable(e,t){this.draw.isReadonly()||this.draw.isDisabled()||this.control.getIsRangeWithinControl()||this.tableOperate.insertTable(e,t)}insertTableTopRow(){this.draw.isReadonly()||this.tableOperate.insertTableTopRow()}insertTableBottomRow(){this.draw.isReadonly()||this.tableOperate.insertTableBottomRow()}insertTableLeftCol(){this.draw.isReadonly()||this.tableOperate.insertTableLeftCol()}insertTableRightCol(){this.draw.isReadonly()||this.tableOperate.insertTableRightCol()}deleteTableRow(){this.draw.isReadonly()||this.tableOperate.deleteTableRow()}deleteTableCol(){this.draw.isReadonly()||this.tableOperate.deleteTableCol()}deleteTable(){this.draw.isReadonly()||this.tableOperate.deleteTable()}mergeTableCell(){this.draw.isReadonly()||this.tableOperate.mergeTableCell()}cancelMergeTableCell(){this.draw.isReadonly()||this.tableOperate.cancelMergeTableCell()}splitVerticalTableCell(){this.draw.isReadonly()||this.tableOperate.splitVerticalTableCell()}splitHorizontalTableCell(){this.draw.isReadonly()||this.tableOperate.splitHorizontalTableCell()}tableTdVerticalAlign(e){this.draw.isReadonly()||this.tableOperate.tableTdVerticalAlign(e)}tableBorderType(e){this.draw.isReadonly()||this.tableOperate.tableBorderType(e)}tableBorderColor(e){this.draw.isReadonly()||this.tableOperate.tableBorderColor(e)}tableTdBorderType(e){this.draw.isReadonly()||this.tableOperate.tableTdBorderType(e)}tableTdBorderColor(e){this.draw.isReadonly()||this.tableOperate.tableTdBorderColor(e)}tableTdBorderWidth(e){this.draw.isReadonly()||this.tableOperate.tableTdBorderWidth(e)}tableTdSlashType(e){this.draw.isReadonly()||this.tableOperate.tableTdSlashType(e)}tableTdBackgroundColor(e){this.draw.isReadonly()||this.tableOperate.tableTdBackgroundColor(e)}tableAutoFitToContent(){this.draw.isReadonly()||this.tableOperate.tableAutoFitToContent()}tableAutoFitToPage(){this.draw.isReadonly()||this.tableOperate.tableAutoFitToPage()}tableSelectAll(){this.tableOperate.tableSelectAll()}hyperlink(e){let{valueList:t,url:n,hyperlinkId:r}=e;if(!n||!t?.length||this.draw.isReadonly()||this.draw.isDisabled()||this.control.getIsRangeWithinControl())return;let{startIndex:i,endIndex:a}=this.range.getRange();(~i||~a)&&this.insertElementList([{type:B.HYPERLINK,value:``,valueList:t,url:n,hyperlinkId:r||q()}])}getHyperlinkRange(){let e=-1,t=-1,{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return null;let i=this.draw.getElementList(),a=i[n];if(a.type!==B.HYPERLINK)return null;let o=n;for(;o>=0;){if(i[o].hyperlinkId!==a.hyperlinkId){e=o+1;break}o--}let s=n+1;for(;s<=i.length;){if(i[s]?.hyperlinkId!==a.hyperlinkId){t=s-1;break}s++}return!~e||!~t?null:[e,t]}deleteHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;let e=this.getHyperlinkRange();if(!e)return;let t=this.draw.getElementList(),[n,r]=e;this.draw.deleteElementList(t,n,r-n+1),this.draw.getHyperlinkParticle().clearHyperlinkPopup();let i=n-1;this.range.setRange(i,i),this.draw.render({curIndex:i})}cancelHyperlink(){if(this.draw.isReadonly()||this.draw.isDisabled())return;let e=this.getHyperlinkRange();if(!e)return;let t=this.draw.getElementList(),[n,r]=e;for(let e=n;e<=r;e++){let n=t[e];delete n.type,delete n.url,delete n.hyperlinkId,delete n.underline}this.draw.getHyperlinkParticle().clearHyperlinkPopup();let{endIndex:i}=this.range.getRange();this.draw.render({curIndex:i,isCompute:!1})}editHyperlink(e){if(this.draw.isReadonly()||this.draw.isDisabled())return;let t=this.getHyperlinkRange();if(!t)return;let n=this.draw.getElementList(),[r,i]=t;for(let t=r;t<=i;t++){let r=n[t];r.url=e}this.draw.getHyperlinkParticle().clearHyperlinkPopup();let{endIndex:a}=this.range.getRange();this.draw.render({curIndex:a,isCompute:!1})}separator(e,t){if(this.draw.isReadonly()||this.draw.isDisabled()||this.control.getIsRangeWithinControl())return;let{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;let i=this.draw.getElementList(),a=-1,o=i[r+1];if(o&&o.type===B.SEPARATOR){if(o.dashArray&&o.dashArray.join()===e.join())return;let n={...o,dashArray:e,...t};delete n.trace,this.draw.deleteElementList(i,r+1,1),this.draw.getTraceParticle().markElementListInserted([n]),this.draw.spliceElementList(i,r+1,0,[n]),a=r}else{let r={value:`
|
|
101
|
+
`,type:B.SEPARATOR,dashArray:e,...t};Zr(i,[r],n,{editorOptions:this.options}),n!==0&&i[n].value===``?(this.draw.spliceElementList(i,n,1,[r]),a=n-1):(this.draw.spliceElementList(i,n+1,0,[r]),a=n),this.draw.getTraceParticle().markElementListInserted([r])}this.range.setRange(a,a),this.draw.render({curIndex:a})}pageBreak(){this.draw.isReadonly()||this.draw.isDisabled()||this.control.getIsRangeWithinControl()||this.insertElementList([{type:B.PAGE_BREAK,value:`
|
|
102
|
+
`}])}addWatermark(e){if(this.draw.isReadonly())return;let t=this.draw.getOptions(),{color:n,size:r,opacity:i,font:a,gap:o,layer:s}=ar;t.watermark.data=e.data,t.watermark.type=e.type||nr.TEXT,e.width&&(t.watermark.width=e.width),e.height&&(t.watermark.height=e.height),t.watermark.color=e.color||n,t.watermark.opacity=e.opacity||i,t.watermark.size=e.size||r,t.watermark.font=e.font||a,t.watermark.repeat=!!e.repeat,e.numberType&&(t.watermark.numberType=e.numberType),t.watermark.gap=e.gap||o,t.watermark.layer=e.layer||s,this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1})}deleteWatermark(){if(this.draw.isReadonly())return;let e=this.draw.getOptions();e.watermark&&e.watermark.data&&(e.watermark={...ar},this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1}))}image(e){if(this.draw.isReadonly()||this.draw.isDisabled())return null;let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return null;let r=e.id||q();return this.insertElementList([{...e,id:r,type:B.IMAGE}]),r}search(e,t){this.searchManager.setSearchKeyword(e,t),this.draw.render({isSubmitHistory:!1})}setSpellcheckRangeList(e){if(!this.draw.getSpellcheck().setSpellcheckRangeList(e))return;let t=this.position.getCursorPosition(),n=this.range.getIsCollapsed();this.draw.render({isCompute:!1,isSubmitHistory:!1,isSetCursor:n&&!!t,curIndex:t?.index})}getSpellcheckWordList(){return this.draw.getSpellcheck().getSpellcheckWordList()}searchNavigatePre(){this.searchManager.searchNavigatePre()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}searchNavigateNext(){this.searchManager.searchNavigateNext()!==null&&this.draw.render({isSetCursor:!1,isSubmitHistory:!1,isCompute:!1,isLazy:!1})}getSearchNavigateInfo(){return this.searchManager.getSearchNavigateInfo()}replace(e,t){this.draw.getSearch().replace(e,t)}async print(e){if(e?.offscreen){let t=e.data??this.draw.getValue().data,n=e.options??this.draw.getOptions(),r=document.createElement(`div`);r.style.position=`absolute`,r.style.left=`-9999px`,r.style.top=`0`,r.style.visibility=`hidden`,document.body.append(r);let{default:i}=await Promise.resolve().then(()=>(Dp(),Tp)),a=null;try{a=new i(r,t,n),await a.command.executePrint()}finally{a?.destroy(),r.remove()}return}let{scale:t,printPixelRatio:n,paperDirection:r,width:i,height:a}=this.options;try{t!==1&&this.draw.setPageScale(1);let e={width:i,height:a,direction:r,pageDirections:this.draw.getPageDirectionList(),iframeInfoList:this.draw.getBlockParticle().pickIframeInfo()};this.options.backend===R.SVG?await hd(await this.draw.getSvgPageList(M.PRINT),e):await md(await this.draw.getDataURL({pixelRatio:n,mode:M.PRINT}),e)}finally{t!==1&&this.draw.setPageScale(t)}}replaceImageElement(e){let{startIndex:t}=this.range.getRange(),n=this.draw.getElementList()[t];n&&n.type===B.IMAGE&&(n.value=e,this.draw.render({isSetCursor:!1}))}saveAsImageElement(){let{startIndex:e}=this.range.getRange(),t=this.draw.getElementList()[e];t&&t.type===B.IMAGE&&Ce(t.value,`${t.id}.png`)}setImageCrop(e){let{startIndex:t}=this.range.getRange(),n=this.draw.getElementList()[t];n&&n.type===B.IMAGE&&(n.imgCrop=e,this.draw.render({isSetCursor:!1,isCompute:!1}))}setImageCaption(e){let{startIndex:t}=this.range.getRange(),n=this.draw.getElementList()[t];n?.type===B.IMAGE&&(n.imgCaption=e,this.draw.render({isSetCursor:!1}))}changeImageDisplay(e,t){if(e.imgDisplay===t)return;e.imgDisplay=t;let{startIndex:n,endIndex:r}=this.range.getRange();if(t===g.SURROUND||t===g.FLOAT_TOP||t===g.FLOAT_BOTTOM){let t=this.position.getPositionList(),r=this.position.getPositionContext(),{pageNo:i,coordinate:{leftTop:a}}=t[n],o=(r.isTable?this.position.getOriginalPositionList()[r.index]:null)?.coordinate.leftTop;e.imgFloatPosition={pageNo:i,x:o?a[0]-o[0]:a[0],y:o?a[1]-o[1]:a[1]}}else delete e.imgFloatPosition;this.draw.getPreviewer().clearResizer(),this.draw.render({isSetCursor:!0,curIndex:r})}getImage(e){return this.draw.getDataURL(e)}getOptions(){return this.options}getValue(e){return this.draw.getValue(e)}getValueAsync(e){return this.draw.getWorkerManager().getValue(e)}getAreaValue(e){return this.draw.getArea().getAreaValue(e)}getHTML(){let e=this.options,t=this.draw.getHeaderElementList(),n=this.draw.getOriginalMainElementList(),r=this.draw.getFooterElementList();return{header:ti(Rr(t),e).innerHTML,main:ti(Rr(n),e).innerHTML,footer:ti(Rr(r),e).innerHTML}}getText(){let e=this.draw.getHeaderElementList(),t=this.draw.getOriginalMainElementList(),n=this.draw.getFooterElementList();return{header:ii(Rr(e),{isClone:!1}),main:ii(Rr(t),{isClone:!1}),footer:ii(Rr(n),{isClone:!1})}}getWordCount(){return this.workerManager.getWordCount()}getCursorPosition(){return this.position.getCursorPosition()}getRemainingContentHeight(){if(!this.draw.getIsPagingMode())return 0;let e=this.draw.getPageRowList(),t=e.length-1,n=(e[t]||[]).reduce((e,t)=>e+t.height+(t.offsetY||0),0),r=this.draw.getHeight()-(this.draw.getMainOuterHeight(t)+n);return r>0?r:0}computeElementListHeight(e){if(!e.length)return 0;let t=this.draw.getInnerWidth();if(t<=0)return 0;let n=K(e);Vr(n,{isHandleFirstElement:!1,editorOptions:this.options});let r=li(n);return this.draw.computeRowList({innerWidth:t,elementList:n,surroundElementList:r}).reduce((e,t)=>e+t.height+(t.offsetY||0),0)}getRange(){return K(this.range.getRange())}getRangeText(){return this.range.toString()}getRangeContext(){let{startIndex:e,endIndex:t}=this.range.getRange();if(!~e&&!~t)return null;let n=e===t,r=this.range.toString(),i=X(Rr(this.range.getSelectionElementList()||[]),{isClone:!1}),a=this.draw.getElementList(),o=Ur(a[n?e:e+1],{extraPickAttrs:[`id`,`controlComponent`]}),s=Ur(a[t],{extraPickAttrs:[`id`,`controlComponent`]}),c=this.draw.getRowList(),l=this.position.getPositionList(),u=l[e],d=l[t],f=u.pageNo,p=d.pageNo,m=u.rowIndex,h=d.rowIndex,g=c[m],_=c[h],v=0,y=0;this.draw.getCursor().getHitLineStartIndex()||(v=g.elementList[0]?.value===``?u.index-g.startIndex:u.index-g.startIndex+1),y=u===d?v:_.elementList[0]?.value===``?d.index-_.startIndex:d.index-_.startIndex+1;let b=[],x=this.position.getSelectionPositionList();if(x){let e=null,t=0,n=null;for(let r=0;r<x.length;r++){let{rowNo:i,pageNo:a,coordinate:{leftTop:o,rightTop:s},lineHeight:c}=x[r],l=this.draw.getPageOffset(a,!0);e===null||e!==i?(n&&b.push(n),n={x:o[0]+l.x,y:o[1]+l.y,width:s[0]-o[0],height:c},e=i,t=o[0]):n.width=s[0]-t,r===x.length-1&&n&&b.push(n)}}else{let{coordinate:{rightTop:e},pageNo:n,lineHeight:r}=this.position.getPositionList()[t],i=this.draw.getPageOffset(n,!0);b.push({x:e[0]+i.x,y:e[1]+i.y,width:0,height:r})}let S=this.draw.getZone().getZone(),{isTable:C,trIndex:w,tdIndex:T,index:E}=this.position.getPositionContext(),D=null;if(C){let e=this.draw.getOriginalElementList()[E]||null;e&&(D=X([e])[0])}let O=null,k=null,A=e;for(;A>0;){let e=a[A],t=a[A-1];if(e.titleId&&e.titleId!==t?.titleId){O=e.titleId,k=l[A].pageNo;break}A--}let j=ud(a,e),M=e===t?j:ud(a,t);return K({isCollapsed:n,startElement:o,endElement:s,startPageNo:f,endPageNo:p,startRowNo:m,endRowNo:h,startColNo:v,endColNo:y,rangeRects:b,zone:S,isTable:C,trIndex:w??null,tdIndex:T??null,tableElement:D,selectionText:r,selectionElementList:i,titleId:O,titleStartPageNo:k,startParagraphNo:j,endParagraphNo:M})}getRangeRow(){let e=this.range.getRangeRowElementList();return e?X(Rr(e),{isClone:!1}):null}getRangeParagraph(){let e=this.range.getRangeParagraphElementList();return e?X(Rr(e),{isClone:!1}):null}getSurroundElementList(e={}){let{startIndex:t,endIndex:n}=this.range.getRange();if(!~t&&!~n)return null;let{direction:r=v.BEFORE,length:i=1}=e,a=this.draw.getElementList(),o;if(r===v.BEFORE){let e=t+1;o=a.slice(Math.max(0,e-i),e)}else o=a.slice(n+1,n+1+i);return X(Rr(o),{isClone:!1})}getKeywordRangeList(e){return this.range.getKeywordRangeList(e)}getKeywordContext(e){let t=this.getKeywordRangeList(e);if(!t.length)return null;let n=[],r=this.position.getOriginalMainPositionList(),i=this.draw.getOriginalMainElementList();for(let e=0;e<t.length;e++){let a=t[e],{startIndex:o,endIndex:s,tableId:c,startTrIndex:l,startTdIndex:u}=a,d=r;if(a.tableId){let e=i.find(e=>e.id===c);e&&(d=e.trList?.[l]?.tdList?.[u]?.positionList||[])}let f=K(d[o]),p=K(d[s]);n.push({range:a,startPosition:f,endPosition:p})}return n}pageMode(e){this.draw.setPageMode(e)}setColumns(e){this.draw.setColumnConfig(e),this.draw.render({isSubmitHistory:!1,isSetCursor:!1})}getColumns(){let e=this.draw.getColumnLayout();return e?{count:e.count,gap:e.gap,separator:e.separator}:null}pageScale(e){e!==this.options.scale&&this.draw.setPageScale(e)}pageScaleRecovery(){let{scale:e}=this.options;e!==1&&this.draw.setPageScale(1)}pageScaleMinus(){let{scale:e}=this.options,t=e*10-1;t>=5&&this.draw.setPageScale(t/10)}pageScaleAdd(){let{scale:e}=this.options,t=e*10+1;t<=30&&this.draw.setPageScale(t/10)}paperSize(e,t){this.draw.setPaperSize(e,t)}paperDirection(e){this.draw.setPaperDirection(e)}pageDirection(e){this.draw.setPageDirection(e)}getPaperMargin(){return this.options.margins}setPaperMargin(e){return this.draw.setPaperMargin(e)}setMainBadge(e){this.draw.getBadge().setMainBadge(e),this.draw.render({isCompute:!1,isSubmitHistory:!1})}setAreaBadge(e){this.draw.getBadge().setAreaBadgeMap(e),this.draw.render({isCompute:!1,isSubmitHistory:!1})}insertElementList(e,t={}){if(!e.length||this.draw.isReadonly()||this.draw.isDisabled())return;let{isReplace:n=!0,ignoreContextKeys:r}=t;n||this.range.shrinkRange();let i=K(e),{startIndex:a}=this.range.getRange();Zr(this.draw.getElementList(),i,a,{ignoreContextKeys:r,isBreakWhenWrap:!0,editorOptions:this.options}),this.draw.insertElementList(i,t)}appendElementList(e,t){if(!e.length||this.draw.isReadonly())return;let n=K(e);this.draw.appendElementList(n,t)}updateElementById(e){let{id:t,conceptId:n}=e;if(!t&&!n)return;let r=[];function i(e){let a=0;for(;a<e.length;){let o=e[a];if(a++,!Lr(o)){if(o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];i(t.value)}}}(t&&o.id===t||n&&o.conceptId===n)&&r.push({elementList:e,index:a-1})}}}let a=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(let e of a)i(e);if(r.length){for(let t=0;t<r.length;t++){let{elementList:n,index:i}=r[t],a=n[i];if(a.type===B.BLOCK||a.type===B.IMAGE||a.type===B.LATEX)n[i]={...a,...e.properties,type:a.type};else{let t=X([{...a,...e.properties}],{extraPickAttrs:[`id`]});Ne(zt,a,t[0]),Vr(t,{isHandleFirstElement:!1,editorOptions:this.options}),n[i]=t[0]}}this.draw.render({isSetCursor:!1})}}deleteElementById(e){let{id:t,conceptId:n}=e;if(!t&&!n)return;let r=!1,i=e=>{let a=0;for(;a<e.length;){let o=e[a];if(o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];i(t.value)}}}if(t&&o.id===t||n&&o.conceptId===n){r=!0;let t=e.length;this.draw.deleteElementList(e,a,1,{isIgnoreDeletedRule:!0}),e.length===t&&a++}else a++}},a=[this.draw.getOriginalMainElementList(),this.draw.getHeaderElementList(),this.draw.getFooterElementList()];for(let e of a)i(e);r&&this.draw.render({isSetCursor:!1})}getElementById(e){let{id:t,conceptId:n}=e,r=[];if(!t&&!n)return r;let i=e=>{let a=0;for(;a<e.length;){let o=e[a];if(a++,!Lr(o)){if(o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];i(t.value)}}}t&&o.id!==t||n&&o.conceptId!==n||r.push(o)}}},a=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(let e of a)i(e);return X(r,{extraPickAttrs:[`id`]})}setValue(e,t){this.draw.setValue(e,t)}removeControl(e){if(e?.id||e?.conceptId){let{id:t,conceptId:n}=e,r=!1,i=e=>{let a=e.length-1;for(;a>=0;){let o=e[a];if(o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];i(t.value)}}}a--,!(!o.control||t&&o.controlId!==t||n&&o.control.conceptId!==n)&&(r=!0,this.draw.deleteElementList(e,a+1,1,{isIgnoreDeletedRule:!0}))}},a=[this.draw.getHeaderElementList(),this.draw.getOriginalMainElementList(),this.draw.getFooterElementList()];for(let e of a)i(e);r&&this.draw.render({isSetCursor:!1})}else{let{startIndex:e,endIndex:t}=this.range.getRange();if(e!==t||!this.draw.getElementList()[e].controlId)return;let n=this.draw.getControl().removeControl(e);if(n===null)return;this.range.setRange(n,n),this.draw.render({curIndex:n})}}translate(e){return this.i18n.t(e)}setLocale(e){this.i18n.setLocale(e)}getLocale(){return this.i18n.getLocale()}getCatalog(){return this.workerManager.getCatalog()}locationCatalog(e){let t=this.draw.getOriginalElementList();function n(e,t){for(let r=0;r<e.length;r++){let i=e[r];if(i.type===B.TABLE){let e=i.trList;for(let a=0;a<e.length;a++){let o=e[a];for(let e=0;e<o.tdList.length;e++){let s=o.tdList[e],c=n(s.value,t);if(c)return{...c,isTable:!0,index:r,trIndex:a,tdIndex:e,tdId:s.id,trId:o.id,tableId:i.id}}}}if(i.titleId===t){let n=r;for(;n<e.length;){if(e[n+1]?.titleId!==t)return{isTable:!1,startIndex:n,endIndex:n};n++}}}return null}let r=n(t,e);if(!r)return;let{isTable:i,index:a,startTdIndex:o,endTdIndex:s,startTrIndex:c,endTrIndex:l,trIndex:u,tdIndex:d,tdId:f,trId:p,tableId:m,endIndex:h}=r;this.position.setPositionContext({isTable:i,index:a,trIndex:u,tdIndex:d,tdId:f,trId:p,tableId:m}),this.range.setRange(h,h,m,o,s,c,l),this.draw.render({curIndex:h,isCompute:!1,isSubmitHistory:!1})}wordTool(){let e=this.draw.getMainElementList(),t=!1;for(let n=0;n<e.length;n++)if(e[n].value===``)for(;n+1<e.length;){let r=e[n+1];if(r.value!==``&&r.value!==` `)break;e.splice(n+1,1),t=!0}if(t)this.draw.render({isSetCursor:!1});else{let e=this.range.getIsCollapsed();this.draw.getCursor().drawCursor({isShow:e})}}setHTML(e){let{header:t,main:n,footer:r}=e,i=this.draw.getOriginalInnerWidth(),a=e=>e===void 0?void 0:ri(e,{innerWidth:i});this.setValue({header:a(t),main:a(n),footer:a(r)})}setGroup(){return this.draw.getGroup().setGroup()}deleteGroup(e){this.draw.getGroup().deleteGroup(e)}getGroupIds(){return this.draw.getWorkerManager().getGroupIds()}getGroupRectList(e){let t=this.draw.getOriginalMainElementList(),n=this.draw.getGroup().getContextByGroupId(t,e);if(!n)return null;let{isTable:r,index:i,trIndex:a,tdIndex:o,endIndex:s}=n,c=r?t[i].trList[a].tdList[o].value:t,l=s;for(;l>0&&c[l-1]?.groupIds?.includes(e);)l--;let u=(r?this.position.getTableTdByContext(t,n)?.positionList||[]:this.position.getOriginalMainPositionList()).slice(l,s+1);if(!u.length)return null;let d=[],f=null,p=null,m=0,h=null;for(let e=0;e<u.length;e++){let{rowNo:t,pageNo:n,coordinate:{leftTop:r,rightTop:i},lineHeight:a}=u[e];if(f!==t||p!==n){h&&d.push(h);let e=this.draw.getPageOffset(n,!0);h={x:r[0]+e.x,y:r[1]+e.y,width:i[0]-r[0],height:a},f=t,p=n,m=r[0]}else h.width=i[0]-m}return h&&d.push(h),d}locationGroup(e){let t=this.draw.getOriginalMainElementList(),n=this.draw.getGroup().getContextByGroupId(t,e);if(!n)return;let{isTable:r,index:i,trIndex:a,tdIndex:o,tdId:s,trId:c,tableId:l,endIndex:u}=n;this.position.setPositionContext({isTable:r,index:i,trIndex:a,tdIndex:o,tdId:s,trId:c,tableId:l}),this.range.setRange(u,u),this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}setZone(e){this.draw.getZone().setZone(e)}getControlValue(e){return this.draw.getControl().getValueById(e)}setControlValue(e){this.draw.getControl().setValueListById([e])}setControlValueList(e){this.draw.getControl().setValueListById(e)}setControlExtension(e){this.draw.getControl().setExtensionListById([e])}setControlExtensionList(e){this.draw.getControl().setExtensionListById(e)}setControlProperties(e){this.draw.getControl().setPropertiesListById([e])}setControlPropertiesList(e){this.draw.getControl().setPropertiesListById(e)}validate(e){return this.draw.getValidate().execute(e)}clearValidate(){this.draw.getValidate().clearHighlight()}setControlHighlight(e){this.draw.getControl().setHighlightList(e),this.draw.render({isSubmitHistory:!1})}setBackend(e){this.draw.setBackend(e)}updateOptions(e){let t=Fr(e);Object.entries(t).forEach(([e,t])=>{Reflect.set(this.options,e,t)}),this.forceUpdate()}getControlList(){return this.draw.getControl().getList()}locationControl(e,t){function n(r,i){let a=0;for(;a<r.length;){let o=r[a];if(a++,o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let r=e[t];for(let e=0;e<r.tdList.length;e++){let s=r.tdList[e],c=n(s.value,i);if(c)return{...c,positionContext:{isTable:!0,index:a-1,trIndex:t,tdIndex:e,tdId:s.id,trId:r.id,tableId:o.id}}}}}if(o?.controlId!==e)continue;let s=a-1;if(t?.position===_.OUTER_AFTER){if(o.controlComponent!==U.POSTFIX||r[a+1]?.controlComponent===U.POST_TEXT)continue}else if(t?.position===_.OUTER_BEFORE)--s;else if(t?.position===_.AFTER){if(--s,o.controlComponent!==U.PLACEHOLDER&&o.controlComponent!==U.POSTFIX&&o.controlComponent!==U.POST_TEXT)continue}else if(o.controlComponent!==U.PREFIX&&o.controlComponent!==U.PRE_TEXT||r[a]?.controlComponent===U.PREFIX||r[a]?.controlComponent===U.PRE_TEXT)continue;return{zone:i,range:{startIndex:s,endIndex:s},positionContext:{isTable:!1}}}return null}let r=[{zone:N.HEADER,elementList:this.draw.getHeaderElementList()},{zone:N.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:N.FOOTER,elementList:this.draw.getFooterElementList()}];for(let e of r){let t=n(e.elementList,e.zone);if(t){this.setZone(t.zone),this.position.setPositionContext(t.positionContext),this.range.replaceRange(t.range),this.draw.render({curIndex:t.range.startIndex,isCompute:!1,isSubmitHistory:!1});break}}}insertControl(e){if(this.draw.isReadonly()||this.draw.isDisabled())return;let t=K(e),{startIndex:n}=this.range.getRange(),r=this.draw.getElementList(),i=r[n];if(i?.controlId&&i.control?.type!==H.TEXT&&t.type===B.CONTROL&&r[n+1]?.controlId===i.controlId)return;let a=Xr(r,n);a&&(Ne([...Pt,...Dt,...It,...zt],a,t),this.draw.insertElementList([t]))}jumpControl(e){this.draw.getControl().initNextControl({direction:e?.direction})}getContainer(){return this.draw.getContainer()}getTitleValue(e){let{conceptId:t}=e,n=[],r=(e,i)=>{let a=0;for(;a<e.length;){let o=e[a];if(a++,o.type===B.TABLE){let e=o.trList;for(let t=0;t<e.length;t++){let n=e[t];for(let e=0;e<n.tdList.length;e++){let t=n.tdList[e];r(t.value,i)}}}if(Lr(o)||o?.title?.conceptId!==t)continue;let s=[],c=a;for(;c<e.length;){let t=e[c];if(c++,o.titleId!==t.titleId){if(t.level&&sn[t.level]<=sn[o.level])break;s.push(t)}}let l=Rr(s);n.push({...o.title,value:ii(l),elementList:X(l,{isClone:!1}),zone:i}),a=c}},i=[{zone:N.HEADER,elementList:this.draw.getHeaderElementList()},{zone:N.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:N.FOOTER,elementList:this.draw.getFooterElementList()}];for(let{zone:e,elementList:t}of i)r(t,e);return n}getPositionContextByEvent(e,t={}){let n=qa(e,this.draw.getPageContainer());if(!n)return null;let{isMustDirectHit:r=!0}=t,{isDirectHit:i,isTable:a,index:o,trIndex:s,tdIndex:c,tdValueIndex:l,zone:u}=this.position.getPositionByXY({x:n.x,y:n.y,pageNo:n.pageNo});if(r&&!i||u&&u!==this.zone.getZone())return null;let d=null,f=null,p=this.draw.getOriginalElementList(),m=null,h=this.position.getOriginalPositionList();if(a){let e=p[o].trList?.[s].tdList[c];f=e?.value[l]||null,m=e?.positionList?.[l]||null,d={element:p[o],trIndex:s,tdIndex:c}}else f=p[o]||null,m=h[o]||null;let g=null;if(m){let{pageNo:e,coordinate:{leftTop:t,rightTop:n},lineHeight:r}=m,i=this.draw.getPageOffset(e,!0);g={x:t[0]+i.x,y:t[1]+i.y,width:n[0]-t[0],height:r}}return{pageNo:n.pageNo,element:f,rangeRect:g,tableInfo:d}}insertTitle(e){if(this.draw.isReadonly()||this.draw.isDisabled())return;let t=K(e),{startIndex:n}=this.range.getRange(),r=Xr(this.draw.getElementList(),n);if(!r)return;let i=[...Pt,...Dt,...It,...zt];t.valueList?.forEach(e=>{Ne(i,r,e)}),this.draw.insertElementList([t])}focus(e){let{position:t=_.AFTER,isMoveCursorToVisible:n=!0,rowNo:r,range:i}=e||{},a=-1;if(i)this.range.replaceRange(i),a=t===_.BEFORE?i.startIndex:i.endIndex;else if(Oe(r)){let e=this.draw.getOriginalRowList();if(a=t===_.BEFORE?e[r]?.startIndex:e[r+1]?.startIndex-1,!Oe(a))return;this.range.setRange(a,a)}else a=t===_.BEFORE?0:this.draw.getOriginalMainElementList().length-1,this.range.setRange(a,a);let o={isCompute:!1,isSetCursor:!1,isSubmitHistory:!1};n&&~a&&this.range.getIsCollapsed()&&(o.curIndex=a,o.isSetCursor=!0),this.draw.render(o)}insertArea(e){return this.draw.getArea().insertArea(e)}setAreaValue(e){return this.draw.getArea().setAreaValue(e)}setAreaProperties(e){this.draw.getArea().setAreaProperties(e)}deleteArea(e){this.draw.getArea().deleteArea(e)}locationArea(e,t){if(t?.isAppendLastLineBreak&&t?.position===_.OUTER_AFTER){let t=this.draw.getOriginalMainElementList();t[t.length-1].areaId===e&&this.draw.appendElementList([{value:``}],{isSubmitHistory:!1})}let n=this.draw.getArea().getContextByAreaId(e,t);if(!n)return;let{range:{endIndex:r}}=n;this.position.setPositionContext({isTable:!1}),this.range.setRange(r,r),this.draw.render({curIndex:r,isSetCursor:!0,isCompute:!1,isSubmitHistory:!1})}clearGraffiti(){this.draw.getGraffiti().clear(),this.draw.isGraffitiMode()&&this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1})}toggleTrace(e){let t=e===void 0?this.draw.getOptions().trace.disabled:e;this.draw.setTraceEnabled(t)}compare(e){let t=e.newData??zr(this.getValue().data.main),n=Bd(e.oldData,t);this.draw.setValue({main:n}),this.draw.setMode(M.TRACE)}toggleRuler(e){let t=e===void 0?this.draw.getOptions().ruler.disabled:e;this.draw.setRulerEnabled(t)}}})),Kd,qd=o((()=>{Kd=class{rangeStyleChange;visiblePageNoListChange;intersectionPageNoChange;pageSizeChange;pageScaleChange;saved;contentChange;controlChange;controlContentChange;pageModeChange;zoneChange;constructor(){this.rangeStyleChange=null,this.visiblePageNoListChange=null,this.intersectionPageNoChange=null,this.pageSizeChange=null,this.pageScaleChange=null,this.saved=null,this.contentChange=null,this.controlChange=null,this.controlContentChange=null,this.pageModeChange=null,this.zoneChange=null}}})),Jd,Yd=o((()=>{Jd=class{contextMenuList;getContextMenuList;shortcutList;langMap;constructor(e){let{contextMenu:t,shortcut:n,i18n:r}=e;this.contextMenuList=t.registerContextMenuList.bind(t),this.getContextMenuList=t.getContextMenuList.bind(t),this.shortcutList=n.registerShortcutList.bind(n),this.langMap=r.registerLangMap.bind(r)}}})),Xd,Zd,Qd=o((()=>{Xd={SELECTED_TEXT:`%s`},Zd={GLOBAL:{CUT:`globalCut`,COPY:`globalCopy`,PASTE:`globalPaste`,SELECT_ALL:`globalSelectAll`,PRINT:`globalPrint`},CONTROL:{DELETE:`controlDelete`},HYPERLINK:{DELETE:`hyperlinkDelete`,CANCEL:`hyperlinkCancel`,EDIT:`hyperlinkEdit`},IMAGE:{CHANGE:`imageChange`,SAVE_AS:`imageSaveAs`,TEXT_WRAP:`imageTextWrap`,TEXT_WRAP_EMBED:`imageTextWrapEmbed`,TEXT_WRAP_UP_DOWN:`imageTextWrapUpDown`,TEXT_WRAP_SURROUND:`imageTextWrapSurround`,TEXT_WRAP_FLOAT_TOP:`imageTextWrapFloatTop`,TEXT_WRAP_FLOAT_BOTTOM:`imageTextWrapFloatBottom`},TABLE:{BORDER:`border`,BORDER_ALL:`tableBorderAll`,BORDER_EMPTY:`tableBorderEmpty`,BORDER_DASH:`tableBorderDash`,BORDER_EXTERNAL:`tableBorderExternal`,BORDER_INTERNAL:`tableBorderInternal`,BORDER_TD:`tableBorderTd`,BORDER_TD_TOP:`tableBorderTdTop`,BORDER_TD_RIGHT:`tableBorderTdRight`,BORDER_TD_BOTTOM:`tableBorderTdBottom`,BORDER_TD_LEFT:`tableBorderTdLeft`,BORDER_TD_FORWARD:`tableBorderTdForward`,BORDER_TD_BACK:`tableBorderTdBack`,VERTICAL_ALIGN:`tableVerticalAlign`,VERTICAL_ALIGN_TOP:`tableVerticalAlignTop`,VERTICAL_ALIGN_MIDDLE:`tableVerticalAlignMiddle`,VERTICAL_ALIGN_BOTTOM:`tableVerticalAlignBottom`,INSERT_ROW_COL:`tableInsertRowCol`,INSERT_TOP_ROW:`tableInsertTopRow`,INSERT_BOTTOM_ROW:`tableInsertBottomRow`,INSERT_LEFT_COL:`tableInsertLeftCol`,INSERT_RIGHT_COL:`tableInsertRightCol`,DELETE_ROW_COL:`tableDeleteRowCol`,DELETE_ROW:`tableDeleteRow`,DELETE_COL:`tableDeleteCol`,DELETE_TABLE:`tableDeleteTable`,MERGE_CELL:`tableMergeCell`,CANCEL_MERGE_CELL:`tableCancelMergeCell`,AUTO_FIT_TO_CONTENT:`tableAutoFitToContent`,AUTO_FIT_TO_PAGE:`tableAutoFitToPage`}}})),$d,ef,tf=o((()=>{Qd(),z(),{CONTROL:{DELETE:$d}}=Zd,ef=[{key:$d,i18nPath:`contextmenu.control.delete`,when:e=>!e.isReadonly&&!e.editorHasSelection&&!!e.startElement?.controlId&&e.options.mode!==M.FORM,callback:e=>{e.executeRemoveControl()}}]})),nf,rf,af,of,sf,cf,lf=o((()=>{Qd(),ba(),{GLOBAL:{CUT:nf,COPY:rf,PASTE:af,SELECT_ALL:of,PRINT:sf}}=Zd,cf=[{key:nf,i18nPath:`contextmenu.global.cut`,shortCut:`${ga?`⌘`:`Ctrl`} + X`,when:e=>!e.isReadonly,callback:e=>{e.executeCut()}},{key:rf,i18nPath:`contextmenu.global.copy`,shortCut:`${ga?`⌘`:`Ctrl`} + C`,when:e=>e.editorHasSelection||e.isCrossRowCol,callback:e=>{e.executeCopy()}},{key:af,i18nPath:`contextmenu.global.paste`,shortCut:`${ga?`⌘`:`Ctrl`} + V`,when:e=>!e.isReadonly&&e.editorTextFocus,callback:e=>{e.executePaste()}},{key:of,i18nPath:`contextmenu.global.selectAll`,shortCut:`${ga?`⌘`:`Ctrl`} + A`,when:e=>e.editorTextFocus,callback:e=>{e.executeSelectAll()}},{isDivider:!0},{key:sf,i18nPath:`contextmenu.global.print`,icon:`print`,when:()=>!0,callback:e=>{e.executePrint()}}]})),uf,df,ff,pf,mf=o((()=>{Qd(),V(),{HYPERLINK:{DELETE:uf,CANCEL:df,EDIT:ff}}=Zd,pf=[{key:uf,i18nPath:`contextmenu.hyperlink.delete`,when:e=>!e.isReadonly&&e.startElement?.type===B.HYPERLINK,callback:e=>{e.executeDeleteHyperlink()}},{key:df,i18nPath:`contextmenu.hyperlink.cancel`,when:e=>!e.isReadonly&&e.startElement?.type===B.HYPERLINK,callback:e=>{e.executeCancelHyperlink()}},{key:ff,i18nPath:`contextmenu.hyperlink.edit`,when:e=>!e.isReadonly&&e.startElement?.type===B.HYPERLINK,callback:(e,t)=>{let n=window.prompt(e.executeTranslate(`contextmenu.hyperlink.edit`),t.startElement?.url);n&&e.executeEditHyperlink(n)}}]})),hf,gf,_f,vf,yf,bf,xf,Sf,Cf,wf=o((()=>{Qd(),x(),V(),{IMAGE:{CHANGE:hf,SAVE_AS:gf,TEXT_WRAP:_f,TEXT_WRAP_EMBED:vf,TEXT_WRAP_UP_DOWN:yf,TEXT_WRAP_SURROUND:bf,TEXT_WRAP_FLOAT_TOP:xf,TEXT_WRAP_FLOAT_BOTTOM:Sf}}=Zd,Cf=[{key:hf,i18nPath:`contextmenu.image.change`,icon:`image-change`,when:e=>!e.isReadonly&&!e.editorHasSelection&&e.startElement?.type===B.IMAGE,callback:e=>{let t=document.createElement(`input`);t.type=`file`,t.accept=`.png, .jpg, .jpeg`,t.onchange=()=>{let n=t.files[0],r=new FileReader;r.readAsDataURL(n),r.onload=()=>{let t=r.result;e.executeReplaceImageElement(t)}},t.click()}},{key:gf,i18nPath:`contextmenu.image.saveAs`,icon:`image`,when:e=>!e.editorHasSelection&&e.startElement?.type===B.IMAGE,callback:e=>{e.executeSaveAsImageElement()}},{key:_f,i18nPath:`contextmenu.image.textWrap`,when:e=>!e.isReadonly&&!e.editorHasSelection&&e.startElement?.type===B.IMAGE,childMenus:[{key:vf,i18nPath:`contextmenu.image.textWrapType.embed`,when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,g.BLOCK)}},{key:yf,i18nPath:`contextmenu.image.textWrapType.upDown`,when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,g.INLINE)}},{key:bf,i18nPath:`contextmenu.image.textWrapType.surround`,when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,g.SURROUND)}},{key:xf,i18nPath:`contextmenu.image.textWrapType.floatTop`,when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,g.FLOAT_TOP)}},{key:Sf,i18nPath:`contextmenu.image.textWrapType.floatBottom`,when:()=>!0,callback:(e,t)=>{e.executeChangeImageDisplay(t.startElement,g.FLOAT_BOTTOM)}}]}]})),Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np=o((()=>{Qd(),z(),wn(),_n(),{TABLE:{BORDER:Tf,BORDER_ALL:Ef,BORDER_EMPTY:Df,BORDER_DASH:Of,BORDER_EXTERNAL:kf,BORDER_INTERNAL:Af,BORDER_TD:jf,BORDER_TD_TOP:Mf,BORDER_TD_LEFT:Nf,BORDER_TD_BOTTOM:Pf,BORDER_TD_RIGHT:Ff,BORDER_TD_BACK:If,BORDER_TD_FORWARD:Lf,VERTICAL_ALIGN:Rf,VERTICAL_ALIGN_TOP:zf,VERTICAL_ALIGN_MIDDLE:Bf,VERTICAL_ALIGN_BOTTOM:Vf,INSERT_ROW_COL:Hf,INSERT_TOP_ROW:Uf,INSERT_BOTTOM_ROW:Wf,INSERT_LEFT_COL:Gf,INSERT_RIGHT_COL:Kf,DELETE_ROW_COL:qf,DELETE_ROW:Jf,DELETE_COL:Yf,DELETE_TABLE:Xf,MERGE_CELL:Zf,CANCEL_MERGE_CELL:Qf,AUTO_FIT_TO_CONTENT:$f,AUTO_FIT_TO_PAGE:ep}}=Zd,tp=[{isDivider:!0},{key:Tf,i18nPath:`contextmenu.table.border`,icon:`border-all`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,childMenus:[{key:Ef,i18nPath:`contextmenu.table.borderAll`,icon:`border-all`,when:()=>!0,callback:e=>{e.executeTableBorderType(mn.ALL)}},{key:Df,i18nPath:`contextmenu.table.borderEmpty`,icon:`border-empty`,when:()=>!0,callback:e=>{e.executeTableBorderType(mn.EMPTY)}},{key:Of,i18nPath:`contextmenu.table.borderDash`,icon:`border-dash`,when:()=>!0,callback:e=>{e.executeTableBorderType(mn.DASH)}},{key:kf,i18nPath:`contextmenu.table.borderExternal`,icon:`border-external`,when:()=>!0,callback:e=>{e.executeTableBorderType(mn.EXTERNAL)}},{key:Af,i18nPath:`contextmenu.table.borderInternal`,icon:`border-internal`,when:()=>!0,callback:e=>{e.executeTableBorderType(mn.INTERNAL)}},{key:jf,i18nPath:`contextmenu.table.borderTd`,icon:`border-td`,when:()=>!0,childMenus:[{key:Mf,i18nPath:`contextmenu.table.borderTdTop`,icon:`border-td-top`,when:()=>!0,callback:e=>{e.executeTableTdBorderType(hn.TOP)}},{key:Ff,i18nPath:`contextmenu.table.borderTdRight`,icon:`border-td-right`,when:()=>!0,callback:e=>{e.executeTableTdBorderType(hn.RIGHT)}},{key:Pf,i18nPath:`contextmenu.table.borderTdBottom`,icon:`border-td-bottom`,when:()=>!0,callback:e=>{e.executeTableTdBorderType(hn.BOTTOM)}},{key:Nf,i18nPath:`contextmenu.table.borderTdLeft`,icon:`border-td-left`,when:()=>!0,callback:e=>{e.executeTableTdBorderType(hn.LEFT)}},{key:Lf,i18nPath:`contextmenu.table.borderTdForward`,icon:`border-td-forward`,when:()=>!0,callback:e=>{e.executeTableTdSlashType(gn.FORWARD)}},{key:If,i18nPath:`contextmenu.table.borderTdBack`,icon:`border-td-back`,when:()=>!0,callback:e=>{e.executeTableTdSlashType(gn.BACK)}}]}]},{key:Rf,i18nPath:`contextmenu.table.verticalAlign`,icon:`vertical-align`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,childMenus:[{key:zf,i18nPath:`contextmenu.table.verticalAlignTop`,icon:`vertical-align-top`,when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(Cn.TOP)}},{key:Bf,i18nPath:`contextmenu.table.verticalAlignMiddle`,icon:`vertical-align-middle`,when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(Cn.MIDDLE)}},{key:Vf,i18nPath:`contextmenu.table.verticalAlignBottom`,icon:`vertical-align-bottom`,when:()=>!0,callback:e=>{e.executeTableTdVerticalAlign(Cn.BOTTOM)}}]},{key:Hf,i18nPath:`contextmenu.table.insertRowCol`,icon:`insert-row-col`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,childMenus:[{key:Uf,i18nPath:`contextmenu.table.insertTopRow`,icon:`insert-top-row`,when:()=>!0,callback:e=>{e.executeInsertTableTopRow()}},{key:Wf,i18nPath:`contextmenu.table.insertBottomRow`,icon:`insert-bottom-row`,when:()=>!0,callback:e=>{e.executeInsertTableBottomRow()}},{key:Gf,i18nPath:`contextmenu.table.insertLeftCol`,icon:`insert-left-col`,when:()=>!0,callback:e=>{e.executeInsertTableLeftCol()}},{key:Kf,i18nPath:`contextmenu.table.insertRightCol`,icon:`insert-right-col`,when:()=>!0,callback:e=>{e.executeInsertTableRightCol()}}]},{key:qf,i18nPath:`contextmenu.table.deleteRowCol`,icon:`delete-row-col`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,childMenus:[{key:Jf,i18nPath:`contextmenu.table.deleteRow`,icon:`delete-row`,when:()=>!0,callback:e=>{e.executeDeleteTableRow()}},{key:Yf,i18nPath:`contextmenu.table.deleteCol`,icon:`delete-col`,when:()=>!0,callback:e=>{e.executeDeleteTableCol()}},{key:Xf,i18nPath:`contextmenu.table.deleteTable`,icon:`delete-table`,when:()=>!0,callback:e=>{e.executeDeleteTable()}}]},{key:Zf,i18nPath:`contextmenu.table.mergeCell`,icon:`merge-cell`,when:e=>!e.isReadonly&&e.isCrossRowCol&&e.options.mode!==M.FORM,callback:e=>{e.executeMergeTableCell()}},{key:Qf,i18nPath:`contextmenu.table.mergeCancelCell`,icon:`merge-cancel-cell`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,callback:e=>{e.executeCancelMergeTableCell()}},{key:$f,i18nPath:`contextmenu.table.autoFitToContent`,icon:`table-auto-fit-content`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,callback:e=>{e.executeTableAutoFitToContent()}},{key:ep,i18nPath:`contextmenu.table.autoFitToPage`,icon:`table-auto-fit-page`,when:e=>!e.isReadonly&&e.isInTable&&e.options.mode!==M.FORM,callback:e=>{e.executeTableAutoFitToPage()}}]})),rp,ip=o((()=>{Qd(),Qe(),z(),J(),gi(),tf(),lf(),mf(),wf(),np(),rp=class{options;draw;command;range;position;i18n;container;contextMenuList;contextMenuContainerList;contextMenuRelationShip;context;constructor(e,t){this.options=e.getOptions(),this.draw=e,this.command=t,this.range=e.getRange(),this.position=e.getPosition(),this.i18n=e.getI18n(),this.container=e.getContainer(),this.context=null,this.contextMenuList=[...cf,...tp,...Cf,...ef,...pf],this.contextMenuContainerList=[],this.contextMenuRelationShip=new Map,this._addEvent()}getContextMenuList(){return this.contextMenuList}_addEvent(){this.options.displayOnly||this.draw.isReadonly()||(this.container.addEventListener(`contextmenu`,this._proxyContextMenuEvent),document.addEventListener(`mousedown`,this._handleSideEffect))}removeEvent(){this.container.removeEventListener(`contextmenu`,this._proxyContextMenuEvent),document.removeEventListener(`mousedown`,this._handleSideEffect)}_filterMenuList(e){let{contextMenuDisableKeys:t}=this.options,n=[];for(let r=0;r<e.length;r++){let i=e[r];i.disable||i.key&&t.includes(i.key)||(i.isDivider||i.when?.(this.context))&&n.push(i)}return n}_proxyContextMenuEvent=e=>{this.context=this._getContext();let t=this._filterMenuList(this.contextMenuList);t.some(e=>!e.isDivider)&&(this.dispose(),this._render({contextMenuList:t,left:e.x,top:e.y})),e.preventDefault()};_handleSideEffect=e=>{this.contextMenuContainerList.length&&(xe(e?.composedPath()[0]||e.target,e=>!!e&&e.nodeType===1&&e.getAttribute(`editor-component`)===A.CONTEXTMENU,!0)||this.dispose())};_getContext(){let e=this.draw.isReadonly(),{isCrossRowCol:t,startIndex:n,endIndex:r}=this.range.getRange(),i=!!(~n||~r),a=i&&n!==r,{isTable:o,trIndex:s,tdIndex:c,index:l}=this.position.getPositionContext(),u=null;if(o){let e=this.draw.getOriginalElementList()[l]||null;e&&(u=X([e],{extraPickAttrs:[`id`]})[0])}let d=o&&!!t,f=this.draw.getElementList();return{startElement:f[n]||null,endElement:f[r]||null,isReadonly:e,editorHasSelection:a,editorTextFocus:i,isCrossRowCol:d,zone:this.draw.getZone().getZone(),isInTable:o,trIndex:s??null,tdIndex:c??null,tableElement:u,options:this.options}}_createContextMenuContainer(){let e=document.createElement(`div`);return e.classList.add(`ce-contextmenu-container`),e.setAttribute(Ye,A.CONTEXTMENU),this.container.append(e),e}_render(e){let{contextMenuList:t,left:n,top:r,parentMenuContainer:i}=e,a=this._createContextMenuContainer(),o=document.createElement(`div`);o.classList.add(`ce-contextmenu-content`);let s=null;i&&this.contextMenuRelationShip.set(i,a);for(let e=0;e<t.length;e++){let n=t[e];if(n.isDivider){if(e!==0&&e!==t.length-1&&!t[e-1]?.isDivider){let e=document.createElement(`div`);e.classList.add(`ce-contextmenu-divider`),o.append(e)}}else{let e=document.createElement(`div`);if(e.classList.add(`ce-contextmenu-item`),n.childMenus){let t=this._filterMenuList(n.childMenus);t.some(e=>!e.isDivider)&&(e.classList.add(`ce-contextmenu-sub-item`),e.onmouseenter=()=>{this._setHoverStatus(e,!0),this._removeSubMenu(a);let n=e.getBoundingClientRect(),r=n.left+n.width,i=n.top;s=this._render({contextMenuList:t,left:r,top:i,parentMenuContainer:a})},e.onmouseleave=t=>{s&&s.contains(t.relatedTarget)||this._setHoverStatus(e,!1)})}else e.onmouseenter=()=>{this._setHoverStatus(e,!0),this._removeSubMenu(a)},e.onmouseleave=()=>{this._setHoverStatus(e,!1)},e.onclick=()=>{n.callback&&this.context&&n.callback(this.command,this.context),this.dispose()};let t=document.createElement(`i`);e.append(t),n.icon&&t.classList.add(`ce-contextmenu-${n.icon}`);let r=document.createElement(`span`),i=n.i18nPath?this._formatName(this.i18n.t(n.i18nPath)):this._formatName(n.name||``);if(r.append(document.createTextNode(i)),e.append(r),n.shortCut){let t=document.createElement(`span`);t.classList.add(`ce-shortcut`),t.append(document.createTextNode(n.shortCut)),e.append(t)}o.append(e)}}return a.append(o),a.style.display=`block`,this._placeContextMenu(a,n,r),this.contextMenuContainerList.push(a),a}_placeContextMenu(e,t,n){let r=e.style;r.left=`100px`,r.top=`0px`;let i=e.getBoundingClientRect().left/100||1,a=window.innerWidth,o=window.innerHeight,s=e.getBoundingClientRect(),c=o-n-4,l=n-4,u;r.boxSizing=`border-box`,s.height<=c?u=n:s.height<=l?u=n-s.height:c>=l?(u=n,r.maxHeight=`${c/i}px`):(u=4,r.maxHeight=`${l/i}px`);let d=t;t+s.width>a&&(d=t-s.width,d<0&&(d=Math.max(a-s.width-4,0))),r.left=`${d/i}px`,r.top=`${u/i}px`}_removeSubMenu(e){let t=this.contextMenuRelationShip.get(e);t&&(this._removeSubMenu(t),t.remove(),this.contextMenuRelationShip.delete(e))}_setHoverStatus(e,t){t?(e.parentNode?.querySelectorAll(`.ce-contextmenu-item`).forEach(e=>e.classList.remove(`hover`)),e.classList.add(`hover`)):e.classList.remove(`hover`)}_formatName(e){let t=Object.values(Xd),n=RegExp(`${t.join(`|`)}`),r=e;if(n.test(r)){let e=new RegExp(Xd.SELECTED_TEXT,`g`);if(e.test(r)){let t=this.range.toString();r=r.replace(e,t)}}return r}registerContextMenuList(e){this.contextMenuList.push(...e)}dispose(){this.contextMenuContainerList.forEach(e=>e.remove()),this.contextMenuContainerList=[],this.contextMenuRelationShip.clear()}}})),ap,op=o((()=>{Dp(),Ha(),ba(),ap=[{key:Z.X,ctrl:!0,shift:!0,callback:e=>{e.executeStrikeout()}},{key:Z.LEFT_BRACKET,mod:!0,callback:e=>{e.executeSizeAdd()}},{key:Z.RIGHT_BRACKET,mod:!0,callback:e=>{e.executeSizeMinus()}},{key:Z.B,mod:!0,callback:e=>{e.executeBold()}},{key:Z.I,mod:!0,callback:e=>{e.executeItalic()}},{key:Z.U,mod:!0,callback:e=>{e.executeUnderline()}},{key:ga?Z.COMMA:Z.RIGHT_ANGLE_BRACKET,mod:!0,shift:!0,callback:e=>{e.executeSuperscript()}},{key:ga?Z.PERIOD:Z.LEFT_ANGLE_BRACKET,mod:!0,shift:!0,callback:e=>{e.executeSubscript()}},{key:Z.L,mod:!0,callback:e=>{e.executeRowFlex(O.LEFT)}},{key:Z.E,mod:!0,callback:e=>{e.executeRowFlex(O.CENTER)}},{key:Z.R,mod:!0,callback:e=>{e.executeRowFlex(O.RIGHT)}},{key:Z.J,mod:!0,callback:e=>{e.executeRowFlex(O.ALIGNMENT)}},{key:Z.J,mod:!0,shift:!0,callback:e=>{e.executeRowFlex(O.JUSTIFY)}}]})),sp,cp=o((()=>{Dp(),Ha(),sp=[{key:Z.ZERO,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(null)}},{key:Z.ONE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.FIRST)}},{key:Z.TWO,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.SECOND)}},{key:Z.THREE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.THIRD)}},{key:Z.FOUR,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.FOURTH)}},{key:Z.FIVE,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.FIFTH)}},{key:Z.SIX,alt:!0,ctrl:!0,callback:e=>{e.executeTitle(nn.SIXTH)}}]})),lp,up=o((()=>{Dp(),Ha(),lp=[{key:Z.I,shift:!0,mod:!0,callback:e=>{e.executeList(qt.UL,Yt.DISC)}},{key:Z.U,shift:!0,mod:!0,callback:e=>{e.executeList(qt.OL)}}]})),dp,fp=o((()=>{op(),Va(),cp(),up(),dp=class{command;globalShortcutList;agentShortcutList;constructor(e,t){this.command=t,this.globalShortcutList=[],this.agentShortcutList=[],!(e.getOptions().displayOnly||e.isReadonly())&&(this._addShortcutList([...ap,...sp,...lp]),this._addEvent(),e.getCursor().getAgentDom().addEventListener(`keydown`,this._agentKeydown.bind(this)))}_addEvent(){document.addEventListener(`keydown`,this._globalKeydown)}removeEvent(){document.removeEventListener(`keydown`,this._globalKeydown)}_addShortcutList(e){for(let t=e.length-1;t>=0;t--){let n=e[t];n.isGlobal?this.globalShortcutList.unshift(n):this.agentShortcutList.unshift(n)}}registerShortcutList(e){this._addShortcutList(e)}_globalKeydown=e=>{this.globalShortcutList.length&&this._execute(e,this.globalShortcutList)};_agentKeydown(e){this.agentShortcutList.length&&this._execute(e,this.agentShortcutList)}_execute(e,t){for(let n=0;n<t.length;n++){let r=t[n];if((r.mod?Ba(e)===!!r.mod:e.ctrlKey===!!r.ctrl&&e.metaKey===!!r.meta)&&e.shiftKey===!!r.shift&&e.altKey===!!r.alt&&e.key.toLowerCase()===r.key.toLowerCase()){r.disable||(r?.callback?.(this.command),e.preventDefault());break}}}}})),pp,mp=o((()=>{pp=function(e){return e.RECORDED=`recorded`,e.SCRIPT=`script`,e}({})})),hp,gp=o((()=>{hp=class{editor;constructor(e){this.editor=e}use(e,t){e(this.editor,t)}}}));function _p(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.command==`string`&&Array.isArray(t.args)}function vp(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.id==`string`&&typeof t.name==`string`&&t.type===pp.RECORDED&&Array.isArray(t.steps)&&t.steps.every(_p)}var yp,bp=o((()=>{mp(),J(),yp=class{macros=new Map;recording=null;isPlaying=!1;command;constructor(e){this.command=e}isRecording(){return this.recording!==null}startRecording(){this.recording===null&&(this.isPlaying||(this.recording=[],this.command.setInterceptor((e,t)=>this.logStep(e,t))))}stopRecording(e){if(this.recording===null)return null;this.command.setInterceptor(void 0);let t={id:q(),name:e,type:pp.RECORDED,steps:this.recording};return this.recording=null,this.macros.set(t.id,t),t}cancelRecording(){this.recording!==null&&(this.command.setInterceptor(void 0),this.recording=null)}async play(e,...t){if(this.recording!==null)return;let n=this.findMacro(e);if(n){this.isPlaying=!0;try{if(n.type===pp.RECORDED)for(let e of n.steps){let t=this.command[e.command];if(typeof t!=`function`)return;try{await t.apply(this.command,e.args)}catch{return}}else await n.handler(...t)}finally{this.isPlaying=!1}}}getMacros(){return Array.from(this.macros.values())}getMacro(e){return this.findMacro(e)}removeMacro(e){let t=this.findMacro(e);return t?this.macros.delete(t.id):!1}exportMacros(){let e=this.getMacros().filter(e=>e.type===pp.RECORDED);return JSON.stringify(e)}importMacros(e,t){let n;try{n=JSON.parse(e)}catch{return}if(!Array.isArray(n))return;let r=t?.overwrite??!1;for(let e of n){if(!vp(e))return;(!this.macros.has(e.id)||r)&&this.macros.set(e.id,{...e})}}register(e,t){let n={id:q(),name:e,type:pp.SCRIPT,handler:t};return this.macros.set(n.id,n),n}unregister(e){let t=this.findMacro(e);return t?this.macros.delete(t.id):!1}findMacro(e){if(this.macros.has(e))return this.macros.get(e);for(let t of this.macros.values())if(t.name===e)return t}logStep(e,t){if(this.recording===null)return;let n;try{n=JSON.parse(JSON.stringify(t))}catch{return}this.recording.push({command:e,args:n})}}})),xp,Sp=o((()=>{xp=class{eventHub;constructor(){this.eventHub=new Map}on(e,t){if(!e||typeof t!=`function`)return;let n=this.eventHub.get(e)||new Set;n.add(t),this.eventHub.set(e,n)}emit(e,t){if(!e)return;let n=this.eventHub.get(e);if(n){if(n.size===1)return[...n][0](t);n.forEach(e=>e(t))}}off(e,t){if(!e||typeof t!=`function`)return;let n=this.eventHub.get(e);n&&n.delete(t)}isSubscribe(e){let t=this.eventHub.get(e);return!!t&&t.size>0}dangerouslyClearAll(){this.eventHub.clear()}}})),Cp,wp=o((()=>{Cp=class{paste;pasteImage;copy;drop}})),Tp=c({AreaMode:()=>Ku,BackendType:()=>R,BackgroundRepeat:()=>yn,BackgroundSize:()=>vn,BlockType:()=>un,CheckboxMarkType:()=>b,Command:()=>cd,ControlComponent:()=>U,ControlIndentation:()=>ie,ControlState:()=>ae,ControlType:()=>H,EDITOR_CLIPBOARD:()=>Xe,EDITOR_COMPONENT:()=>Ye,Editor:()=>Ep,EditorComponent:()=>A,EditorMode:()=>M,EditorZone:()=>N,ElementType:()=>B,FlexDirection:()=>y,INTERNAL_CONTEXT_MENU_KEY:()=>Zd,INTERNAL_SHORTCUT_KEY:()=>as,ImageDisplay:()=>g,KeyMap:()=>Z,LETTER_CLASS:()=>E,LineNumberType:()=>lr,ListStyle:()=>Yt,ListType:()=>qt,LocationPosition:()=>_,MacroType:()=>pp,MaxHeightRatio:()=>m,NumberType:()=>h,PageMode:()=>P,PaperDirection:()=>F,RenderMode:()=>L,RowFlex:()=>O,SurroundPosition:()=>v,TabStopLeader:()=>se,TabStopType:()=>oe,TableBorder:()=>mn,TdBorder:()=>hn,TdSlash:()=>gn,TextDecorationStyle:()=>ks,TitleLevel:()=>nn,VerticalAlign:()=>Cn,WatermarkLayer:()=>rr,WatermarkType:()=>nr,WordBreak:()=>I,createDomFromElementList:()=>ti,default:()=>Ep,getElementListByHTML:()=>ri,getTextFromElementList:()=>ii,splitText:()=>Se}),Ep,Dp=o((()=>{d(),p(),sd(),ld(),Gd(),qd(),k(),x(),V(),gi(),Yd(),ip(),z(),Qe(),G(),fp(),Ha(),dn(),mp(),wn(),_n(),rn(),Xt(),ce(),gp(),bp(),Sp(),wp(),D(),Qd(),J(),bn(),js(),Ir(),ur(),qu(),ir(),os(),Ep=class{command;version;listener;eventBus;override;register;destroy;use;macro;constructor(e,t,n={}){let r=Fr(n);t=K(t);let i=[],a=[],o=[],s=[];Array.isArray(t)?a=t:(i=t.header||[],a=t.main,o=t.footer||[],s=t.graffiti||[]),[i,a,o].forEach(e=>{Vr(e,{editorOptions:r,isForceCompensation:!0})}),this.version=f,this.listener=new Kd,this.eventBus=new xp,this.override=new Cp;let c=new od(e,r,{header:i,main:a,footer:o,graffiti:s},this.listener,this.eventBus,this.override);this.command=new cd(new Wd(c)),this.macro=new yp(this.command);let l=new rp(c,this.command),u=new dp(c,this.command);this.register=new Jd({contextMenu:l,shortcut:u,i18n:c.getI18n()}),this.destroy=()=>{c.destroy(),u.removeEvent(),l.removeEvent(),this.eventBus.dangerouslyClearAll()};let d=new hp(this);this.use=d.use.bind(d)}}}));function Op(e){if(!e)throw Error(`[canvas-full] 无效的文档数据(空)`);if(typeof e==`string`)try{e=JSON.parse(e)}catch{throw Error(`[canvas-full] 无效的文档数据(JSON 解析失败)`)}if(e.data&&typeof e.data==`object`){let t=e;return{data:kp(t.data),editorOptions:t.options}}if(e.main&&Array.isArray(e.main))return{data:kp(e)};if(Array.isArray(e))return{data:{header:[],main:e,footer:[]}};throw Error(`[canvas-full] 无法识别的文档数据格式`)}function kp(e){return{header:e.header||[],main:e.main||[],footer:e.footer||[]}}var Ap=`<!DOCTYPE html>
|
|
103
|
+
<html lang="en">
|
|
104
|
+
|
|
105
|
+
<head>
|
|
106
|
+
<meta charset="UTF-8" />
|
|
107
|
+
<link rel="icon" type="image/png" href="favicon.png" />
|
|
108
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
109
|
+
<title>canvas-editor</title>
|
|
110
|
+
</head>
|
|
111
|
+
|
|
112
|
+
<body>
|
|
113
|
+
<div id="app">
|
|
114
|
+
<div class="menu" editor-component="menu">
|
|
115
|
+
<div class="menu-item">
|
|
116
|
+
<div class="menu-item__undo">
|
|
117
|
+
<i></i>
|
|
118
|
+
</div>
|
|
119
|
+
<div class="menu-item__redo">
|
|
120
|
+
<i></i>
|
|
121
|
+
</div>
|
|
122
|
+
<div class="menu-item__painter" title="格式刷(双击可连续使用)">
|
|
123
|
+
<i></i>
|
|
124
|
+
</div>
|
|
125
|
+
<div class="menu-item__format" title="清除格式">
|
|
126
|
+
<i></i>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<div class="menu-divider"></div>
|
|
130
|
+
<div class="menu-item">
|
|
131
|
+
<div class="menu-item__font">
|
|
132
|
+
<span class="select" title="字体">微软雅黑</span>
|
|
133
|
+
<div class="options">
|
|
134
|
+
<ul>
|
|
135
|
+
<li data-family="Microsoft YaHei" style="font-family:'Microsoft YaHei';">微软雅黑</li>
|
|
136
|
+
<li data-family="华文宋体" style="font-family:'华文宋体';">华文宋体</li>
|
|
137
|
+
<li data-family="华文黑体" style="font-family:'华文黑体';">华文黑体</li>
|
|
138
|
+
<li data-family="华文仿宋" style="font-family:'华文仿宋';">华文仿宋</li>
|
|
139
|
+
<li data-family="华文楷体" style="font-family:'华文楷体';">华文楷体</li>
|
|
140
|
+
<li data-family="华文琥珀" style="font-family:'华文琥珀';">华文琥珀</li>
|
|
141
|
+
<li data-family="华文楷体" style="font-family:'华文楷体';">华文楷体</li>
|
|
142
|
+
<li data-family="华文隶书" style="font-family:'华文隶书';">华文隶书</li>
|
|
143
|
+
<li data-family="华文新魏" style="font-family:'华文新魏';">华文新魏</li>
|
|
144
|
+
<li data-family="华文行楷" style="font-family:'华文行楷';">华文行楷</li>
|
|
145
|
+
<li data-family="华文中宋" style="font-family:'华文中宋';">华文中宋</li>
|
|
146
|
+
<li data-family="华文彩云" style="font-family:'华文彩云';">华文彩云</li>
|
|
147
|
+
<li data-family="Arial" style="font-family:'Arial';">Arial</li>
|
|
148
|
+
<li data-family="Segoe UI" style="font-family:'Segoe UI';">Segoe UI</li>
|
|
149
|
+
<li data-family="Ink Free" style="font-family:'Ink Free';">Ink Free</li>
|
|
150
|
+
<li data-family="Fantasy" style="font-family:'Fantasy';">Fantasy</li>
|
|
151
|
+
</ul>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
<div class="menu-item__size">
|
|
155
|
+
<span class="select" title="字体">小四</span>
|
|
156
|
+
<div class="options">
|
|
157
|
+
<ul>
|
|
158
|
+
<li data-size="56">初号</li>
|
|
159
|
+
<li data-size="48">小初</li>
|
|
160
|
+
<li data-size="34">一号</li>
|
|
161
|
+
<li data-size="32">小一</li>
|
|
162
|
+
<li data-size="29">二号</li>
|
|
163
|
+
<li data-size="24">小二</li>
|
|
164
|
+
<li data-size="21">三号</li>
|
|
165
|
+
<li data-size="20">小三</li>
|
|
166
|
+
<li data-size="18">四号</li>
|
|
167
|
+
<li data-size="16">小四</li>
|
|
168
|
+
<li data-size="14">五号</li>
|
|
169
|
+
<li data-size="12">小五</li>
|
|
170
|
+
<li data-size="10">六号</li>
|
|
171
|
+
<li data-size="8">小六</li>
|
|
172
|
+
<li data-size="7">七号</li>
|
|
173
|
+
<li data-size="6">八号</li>
|
|
174
|
+
</ul>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="menu-item__size-add">
|
|
178
|
+
<i></i>
|
|
179
|
+
</div>
|
|
180
|
+
<div class="menu-item__size-minus">
|
|
181
|
+
<i></i>
|
|
182
|
+
</div>
|
|
183
|
+
<div class="menu-item__bold">
|
|
184
|
+
<i></i>
|
|
185
|
+
</div>
|
|
186
|
+
<div class="menu-item__italic">
|
|
187
|
+
<i></i>
|
|
188
|
+
</div>
|
|
189
|
+
<div class="menu-item__underline">
|
|
190
|
+
<i></i>
|
|
191
|
+
<span class="select"></span>
|
|
192
|
+
<div class="options">
|
|
193
|
+
<ul>
|
|
194
|
+
<li data-decoration-style='solid'>
|
|
195
|
+
<i></i>
|
|
196
|
+
</li>
|
|
197
|
+
<li data-decoration-style='double'>
|
|
198
|
+
<i></i>
|
|
199
|
+
</li>
|
|
200
|
+
<li data-decoration-style='dashed'>
|
|
201
|
+
<i></i>
|
|
202
|
+
</li>
|
|
203
|
+
<li data-decoration-style='dotted'>
|
|
204
|
+
<i></i>
|
|
205
|
+
</li>
|
|
206
|
+
<li data-decoration-style='wavy'>
|
|
207
|
+
<i></i>
|
|
208
|
+
</li>
|
|
209
|
+
</ul>
|
|
210
|
+
</div>
|
|
211
|
+
</div>
|
|
212
|
+
<div class="menu-item__strikeout" title="删除线(Ctrl+Shift+X)">
|
|
213
|
+
<i></i>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="menu-item__superscript">
|
|
216
|
+
<i></i>
|
|
217
|
+
</div>
|
|
218
|
+
<div class="menu-item__subscript">
|
|
219
|
+
<i></i>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="menu-item__color" title="字体颜色">
|
|
222
|
+
<i></i>
|
|
223
|
+
<span></span>
|
|
224
|
+
<input type="color" id="color" />
|
|
225
|
+
</div>
|
|
226
|
+
<div class="menu-item__highlight" title="高亮">
|
|
227
|
+
<i></i>
|
|
228
|
+
<span></span>
|
|
229
|
+
<input type="color" id="highlight">
|
|
230
|
+
</div>
|
|
231
|
+
</div>
|
|
232
|
+
<div class="menu-divider"></div>
|
|
233
|
+
<div class="menu-item">
|
|
234
|
+
<div class="menu-item__title">
|
|
235
|
+
<i></i>
|
|
236
|
+
<span class="select" title="切换标题">正文</span>
|
|
237
|
+
<div class="options">
|
|
238
|
+
<ul>
|
|
239
|
+
<li style="font-size:16px;">正文</li>
|
|
240
|
+
<li data-level="first" style="font-size:26px;">标题1</li>
|
|
241
|
+
<li data-level="second" style="font-size:24px;">标题2</li>
|
|
242
|
+
<li data-level="third" style="font-size:22px;">标题3</li>
|
|
243
|
+
<li data-level="fourth" style="font-size:20px;">标题4</li>
|
|
244
|
+
<li data-level="fifth" style="font-size:18px;">标题5</li>
|
|
245
|
+
<li data-level="sixth" style="font-size:16px;">标题6</li>
|
|
246
|
+
</ul>
|
|
247
|
+
</div>
|
|
248
|
+
</div>
|
|
249
|
+
<div class="menu-item__left">
|
|
250
|
+
<i></i>
|
|
251
|
+
</div>
|
|
252
|
+
<div class="menu-item__center">
|
|
253
|
+
<i></i>
|
|
254
|
+
</div>
|
|
255
|
+
<div class="menu-item__right">
|
|
256
|
+
<i></i>
|
|
257
|
+
</div>
|
|
258
|
+
<div class="menu-item__alignment">
|
|
259
|
+
<i></i>
|
|
260
|
+
</div>
|
|
261
|
+
<div class="menu-item__justify">
|
|
262
|
+
<i></i>
|
|
263
|
+
</div>
|
|
264
|
+
<div class="menu-item__row-margin">
|
|
265
|
+
<i title="行间距"></i>
|
|
266
|
+
<div class="options">
|
|
267
|
+
<ul>
|
|
268
|
+
<li data-rowmargin='1'>1</li>
|
|
269
|
+
<li data-rowmargin="1.25">1.25</li>
|
|
270
|
+
<li data-rowmargin="1.5">1.5</li>
|
|
271
|
+
<li data-rowmargin="1.75">1.75</li>
|
|
272
|
+
<li data-rowmargin="2">2</li>
|
|
273
|
+
<li data-rowmargin="2.5">2.5</li>
|
|
274
|
+
<li data-rowmargin="3">3</li>
|
|
275
|
+
</ul>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
<div class="menu-item__spacing">
|
|
279
|
+
<i title="段落设置"></i>
|
|
280
|
+
<div class="options">
|
|
281
|
+
<div class="spacing-option">
|
|
282
|
+
<span class="spacing-option__label">段前距</span>
|
|
283
|
+
<div class="spacing-option__stepper">
|
|
284
|
+
<button type="button" data-spacingbefore-decrease>-</button>
|
|
285
|
+
<input type="number" min="0" step="6" value="0" data-spacingbefore-input />
|
|
286
|
+
<button type="button" data-spacingbefore-increase>+</button>
|
|
287
|
+
</div>
|
|
288
|
+
</div>
|
|
289
|
+
<div class="spacing-option">
|
|
290
|
+
<span class="spacing-option__label">段后距</span>
|
|
291
|
+
<div class="spacing-option__stepper">
|
|
292
|
+
<button type="button" data-spacingafter-decrease>-</button>
|
|
293
|
+
<input type="number" min="0" step="6" value="0" data-spacingafter-input />
|
|
294
|
+
<button type="button" data-spacingafter-increase>+</button>
|
|
295
|
+
</div>
|
|
296
|
+
</div>
|
|
297
|
+
<div class="spacing-option">
|
|
298
|
+
<span class="spacing-option__label">左缩进</span>
|
|
299
|
+
<div class="spacing-option__stepper">
|
|
300
|
+
<button type="button" data-indentleft-decrease>-</button>
|
|
301
|
+
<input type="number" min="0" step="16" value="0" data-indentleft-input />
|
|
302
|
+
<button type="button" data-indentleft-increase>+</button>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
<div class="spacing-option">
|
|
306
|
+
<span class="spacing-option__label">右缩进</span>
|
|
307
|
+
<div class="spacing-option__stepper">
|
|
308
|
+
<button type="button" data-indentright-decrease>-</button>
|
|
309
|
+
<input type="number" min="0" step="16" value="0" data-indentright-input />
|
|
310
|
+
<button type="button" data-indentright-increase>+</button>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
<div class="spacing-option">
|
|
314
|
+
<span class="spacing-option__label">首行缩进</span>
|
|
315
|
+
<div class="spacing-option__stepper">
|
|
316
|
+
<button type="button" data-indentfirstline-decrease>-</button>
|
|
317
|
+
<input type="number" step="16" value="0" data-indentfirstline-input />
|
|
318
|
+
<button type="button" data-indentfirstline-increase>+</button>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="spacing-option">
|
|
322
|
+
<span class="spacing-option__label">制表位</span>
|
|
323
|
+
<button type="button" class="tabstop-clear" data-tabstops-clear>清除</button>
|
|
324
|
+
</div>
|
|
325
|
+
<div class="tabstop-rows" data-tabstops-rows></div>
|
|
326
|
+
<button type="button" class="tabstop-add" data-tabstops-add>+ 添加制表位</button>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
<div class="menu-item__list">
|
|
330
|
+
<i></i>
|
|
331
|
+
<div class="options">
|
|
332
|
+
<ul>
|
|
333
|
+
<li>
|
|
334
|
+
<label>取消列表</label>
|
|
335
|
+
</li>
|
|
336
|
+
<li data-list-type="ol" data-list-style='decimal'>
|
|
337
|
+
<label>有序列表:</label>
|
|
338
|
+
<ol>
|
|
339
|
+
<li>________</li>
|
|
340
|
+
</ol>
|
|
341
|
+
</li>
|
|
342
|
+
<li data-list-type="ul" data-list-style='checkbox'>
|
|
343
|
+
<label>复选框列表:</label>
|
|
344
|
+
<ul style="list-style-type: '☑️ ';">
|
|
345
|
+
<li>________</li>
|
|
346
|
+
</ul>
|
|
347
|
+
</li>
|
|
348
|
+
<li data-list-type="ul" data-list-style='disc'>
|
|
349
|
+
<label>实心圆点列表:</label>
|
|
350
|
+
<ul style="list-style-type: disc;">
|
|
351
|
+
<li>________</li>
|
|
352
|
+
</ul>
|
|
353
|
+
</li>
|
|
354
|
+
<li data-list-type="ul" data-list-style='circle'>
|
|
355
|
+
<label>空心圆点列表:</label>
|
|
356
|
+
<ul style="list-style-type: circle;">
|
|
357
|
+
<li>________</li>
|
|
358
|
+
</ul>
|
|
359
|
+
</li>
|
|
360
|
+
<li data-list-type="ul" data-list-style='square'>
|
|
361
|
+
<label>空心方块列表:</label>
|
|
362
|
+
<ul style="list-style-type: '☐ ';">
|
|
363
|
+
<li>________</li>
|
|
364
|
+
</ul>
|
|
365
|
+
</li>
|
|
366
|
+
</ul>
|
|
367
|
+
</div>
|
|
368
|
+
</div>
|
|
369
|
+
</div>
|
|
370
|
+
<div class="menu-divider"></div>
|
|
371
|
+
<div class="menu-item">
|
|
372
|
+
<div class="menu-item__table">
|
|
373
|
+
<i title="表格"></i>
|
|
374
|
+
</div>
|
|
375
|
+
<div class="menu-item__table__collapse">
|
|
376
|
+
<div class="table-close">×</div>
|
|
377
|
+
<div class="table-title">
|
|
378
|
+
<span class="table-select">插入</span>
|
|
379
|
+
<span>表格</span>
|
|
380
|
+
</div>
|
|
381
|
+
<div class="table-panel"></div>
|
|
382
|
+
</div>
|
|
383
|
+
<div class="menu-item__image">
|
|
384
|
+
<i title="图片"></i>
|
|
385
|
+
<input type="file" id="image" accept=".png, .jpg, .jpeg, .svg, .gif">
|
|
386
|
+
</div>
|
|
387
|
+
<div class="menu-item__hyperlink">
|
|
388
|
+
<i title="超链接"></i>
|
|
389
|
+
</div>
|
|
390
|
+
<div class="menu-item__separator">
|
|
391
|
+
<i title="分割线"></i>
|
|
392
|
+
<div class="options">
|
|
393
|
+
<ul>
|
|
394
|
+
<li data-separator='0,0'>
|
|
395
|
+
<i></i>
|
|
396
|
+
</li>
|
|
397
|
+
<li data-separator="1,1">
|
|
398
|
+
<i></i>
|
|
399
|
+
</li>
|
|
400
|
+
<li data-separator="3,1">
|
|
401
|
+
<i></i>
|
|
402
|
+
</li>
|
|
403
|
+
<li data-separator="4,4">
|
|
404
|
+
<i></i>
|
|
405
|
+
</li>
|
|
406
|
+
<li data-separator="7,3,3,3">
|
|
407
|
+
<i></i>
|
|
408
|
+
</li>
|
|
409
|
+
<li data-separator="6,2,2,2,2,2">
|
|
410
|
+
<i></i>
|
|
411
|
+
</li>
|
|
412
|
+
</ul>
|
|
413
|
+
</div>
|
|
414
|
+
</div>
|
|
415
|
+
<div class="menu-item__watermark">
|
|
416
|
+
<i title="水印(添加、删除)"></i>
|
|
417
|
+
<div class="options">
|
|
418
|
+
<ul>
|
|
419
|
+
<li data-menu="add">添加水印</li>
|
|
420
|
+
<li data-menu="delete">删除水印</li>
|
|
421
|
+
</ul>
|
|
422
|
+
</div>
|
|
423
|
+
</div>
|
|
424
|
+
<div class="menu-item__codeblock" title="代码块">
|
|
425
|
+
<i></i>
|
|
426
|
+
</div>
|
|
427
|
+
<div class="menu-item__page-break" title="分页符">
|
|
428
|
+
<i></i>
|
|
429
|
+
</div>
|
|
430
|
+
<div class="menu-item__control">
|
|
431
|
+
<i title="控件"></i>
|
|
432
|
+
<div class="options">
|
|
433
|
+
<ul>
|
|
434
|
+
<li data-control='text'>文本</li>
|
|
435
|
+
<li data-control="number">数值</li>
|
|
436
|
+
<li data-control="select">列举</li>
|
|
437
|
+
<li data-control="date">日期</li>
|
|
438
|
+
<li data-control="checkbox">复选框</li>
|
|
439
|
+
<li data-control="radio">单选框</li>
|
|
440
|
+
</ul>
|
|
441
|
+
</div>
|
|
442
|
+
</div>
|
|
443
|
+
<div class="menu-item__checkbox" title="复选框">
|
|
444
|
+
<i></i>
|
|
445
|
+
</div>
|
|
446
|
+
<div class="menu-item__radio" title="单选框">
|
|
447
|
+
<i></i>
|
|
448
|
+
</div>
|
|
449
|
+
<div class="menu-item__latex" title="LateX">
|
|
450
|
+
<i></i>
|
|
451
|
+
</div>
|
|
452
|
+
<div class="menu-item__date">
|
|
453
|
+
<i title="日期"></i>
|
|
454
|
+
<div class="options">
|
|
455
|
+
<ul>
|
|
456
|
+
<li data-format="yyyy-MM-dd"></li>
|
|
457
|
+
<li data-format="yyyy-MM-dd hh:mm:ss"></li>
|
|
458
|
+
</ul>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
<div class="menu-item__block" title="内容块">
|
|
462
|
+
<i></i>
|
|
463
|
+
</div>
|
|
464
|
+
</div>
|
|
465
|
+
<div class="menu-divider"></div>
|
|
466
|
+
<div class="menu-item">
|
|
467
|
+
<div class="menu-item__search" data-menu="search">
|
|
468
|
+
<i></i>
|
|
469
|
+
</div>
|
|
470
|
+
<div class="menu-item__search__collapse" data-menu="search">
|
|
471
|
+
<div class="menu-item__search__collapse__search">
|
|
472
|
+
<input type="text" />
|
|
473
|
+
<label class="search-result"></label>
|
|
474
|
+
<div class="arrow-left">
|
|
475
|
+
<i></i>
|
|
476
|
+
</div>
|
|
477
|
+
<div class="arrow-right">
|
|
478
|
+
<i></i>
|
|
479
|
+
</div>
|
|
480
|
+
<span>×</span>
|
|
481
|
+
</div>
|
|
482
|
+
<div class="menu-item__search__collapse__replace">
|
|
483
|
+
<input type="text">
|
|
484
|
+
<button>替换</button>
|
|
485
|
+
</div>
|
|
486
|
+
<div class="menu-item__search__collapse__option">
|
|
487
|
+
<div class="search-option-item">
|
|
488
|
+
<input type="checkbox" id="option-reg" checked />
|
|
489
|
+
<label for="option-reg">正则</label>
|
|
490
|
+
</div>
|
|
491
|
+
<div class="search-option-item">
|
|
492
|
+
<input type="checkbox" id="option-case" checked />
|
|
493
|
+
<label for="option-case">忽略大小写</label>
|
|
494
|
+
</div>
|
|
495
|
+
<div class="search-option-item">
|
|
496
|
+
<input type="checkbox" id="option-selection" />
|
|
497
|
+
<label for="option-selection">选定内容内查找</label>
|
|
498
|
+
</div>
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="menu-item__print" data-menu="print">
|
|
502
|
+
<i></i>
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
</div>
|
|
506
|
+
<div class="catalog" editor-component="catalog">
|
|
507
|
+
<div class="catalog__header">
|
|
508
|
+
<span>目录</span>
|
|
509
|
+
<div class="catalog__header__close">
|
|
510
|
+
<i></i>
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
<div class="catalog__main"></div>
|
|
514
|
+
</div>
|
|
515
|
+
<div class="editor"></div>
|
|
516
|
+
<div class="comment-line-toggle" editor-component="comment-line-toggle">
|
|
517
|
+
<span>连接线</span>
|
|
518
|
+
<label class="comment-line-toggle__switch" title="显示/隐藏批注连接线">
|
|
519
|
+
<input type="checkbox" id="comment-line-switch" />
|
|
520
|
+
<i></i>
|
|
521
|
+
</label>
|
|
522
|
+
</div>
|
|
523
|
+
<div class="comment" editor-component="comment"></div>
|
|
524
|
+
<div class="footer" editor-component="footer">
|
|
525
|
+
<div>
|
|
526
|
+
<div class="catalog-mode" title="目录">
|
|
527
|
+
<i></i>
|
|
528
|
+
</div>
|
|
529
|
+
<div class="page-mode">
|
|
530
|
+
<i title="页面模式(分页、连页)"></i>
|
|
531
|
+
<div class="options">
|
|
532
|
+
<ul>
|
|
533
|
+
<li data-page-mode="paging" class="active">分页</li>
|
|
534
|
+
<li data-page-mode="continuity">连页</li>
|
|
535
|
+
</ul>
|
|
536
|
+
</div>
|
|
537
|
+
</div>
|
|
538
|
+
<div class="page-mode backend-switch" title="渲染后端">
|
|
539
|
+
<i></i>
|
|
540
|
+
<div class="options">
|
|
541
|
+
<ul>
|
|
542
|
+
<li data-backend="canvas">Canvas</li>
|
|
543
|
+
<li data-backend="svg">SVG</li>
|
|
544
|
+
</ul>
|
|
545
|
+
</div>
|
|
546
|
+
</div>
|
|
547
|
+
<span>可见页码:<span class="page-no-list">1</span></span>
|
|
548
|
+
<span>页面:<span class="page-no">1</span>/<span class="page-size">1</span></span>
|
|
549
|
+
<span>字数:<span class="word-count">0</span></span>
|
|
550
|
+
<span>行:<span class="row-no">0</span></span>
|
|
551
|
+
<span>列:<span class="col-no">0</span></span>
|
|
552
|
+
</div>
|
|
553
|
+
<div class="editor-mode" title="编辑模式(编辑、清洁、只读、表单、设计、涂鸦、留痕)">
|
|
554
|
+
<span class="text">编辑模式</span>
|
|
555
|
+
<ul class="options">
|
|
556
|
+
<li data-mode="edit" class="active">编辑模式</li>
|
|
557
|
+
<li data-mode="clean">清洁模式</li>
|
|
558
|
+
<li data-mode="readonly">只读模式</li>
|
|
559
|
+
<li data-mode="form">表单模式</li>
|
|
560
|
+
<li data-mode="print">打印模式</li>
|
|
561
|
+
<li data-mode="design">设计模式</li>
|
|
562
|
+
<li data-mode="graffiti">涂鸦模式</li>
|
|
563
|
+
<li data-mode="trace" class="trace-mode-item">
|
|
564
|
+
<span class="trace-mode-label">留痕模式</span>
|
|
565
|
+
<label class="trace-toggle" title="勾选后,新增/删除将作为留痕记录;留痕查看模式下不可修改">
|
|
566
|
+
<input type="checkbox" class="trace-toggle__input" />
|
|
567
|
+
<span>记录</span>
|
|
568
|
+
</label>
|
|
569
|
+
</li>
|
|
570
|
+
</ul>
|
|
571
|
+
</div>
|
|
572
|
+
<div>
|
|
573
|
+
<div class="page-scale-minus" title="缩小(Ctrl+-)">
|
|
574
|
+
<i></i>
|
|
575
|
+
</div>
|
|
576
|
+
<span class="page-scale-percentage" title="显示比例(点击可复原Ctrl+0)">100%</span>
|
|
577
|
+
<div class="page-scale-add" title="放大(Ctrl+=)">
|
|
578
|
+
<i></i>
|
|
579
|
+
</div>
|
|
580
|
+
<div class="paper-size">
|
|
581
|
+
<i title="纸张类型"></i>
|
|
582
|
+
<div class="options">
|
|
583
|
+
<ul>
|
|
584
|
+
<li data-paper-size="794*1123" class="active">A4</li>
|
|
585
|
+
<li data-paper-size="1593*2251">A2</li>
|
|
586
|
+
<li data-paper-size="1125*1593">A3</li>
|
|
587
|
+
<li data-paper-size="565*796">A5</li>
|
|
588
|
+
<li data-paper-size="412*488">5号信封</li>
|
|
589
|
+
<li data-paper-size="450*866">6号信封</li>
|
|
590
|
+
<li data-paper-size="609*862">7号信封</li>
|
|
591
|
+
<li data-paper-size="862*1221">9号信封</li>
|
|
592
|
+
<li data-paper-size="813*1266">法律用纸</li>
|
|
593
|
+
<li data-paper-size="813*1054">信纸</li>
|
|
594
|
+
</ul>
|
|
595
|
+
</div>
|
|
596
|
+
</div>
|
|
597
|
+
<div class="paper-direction">
|
|
598
|
+
<i title="纸张方向"></i>
|
|
599
|
+
<div class="options">
|
|
600
|
+
<ul>
|
|
601
|
+
<li data-paper-direction="vertical" class="active">纵向</li>
|
|
602
|
+
<li data-paper-direction="horizontal">横向</li>
|
|
603
|
+
<li class="option-caption">指定页面</li>
|
|
604
|
+
<li data-section-direction="horizontal">本节横向</li>
|
|
605
|
+
<li data-section-direction="vertical">本节纵向</li>
|
|
606
|
+
<li data-section-direction="inherit">跟随全局</li>
|
|
607
|
+
</ul>
|
|
608
|
+
</div>
|
|
609
|
+
</div>
|
|
610
|
+
<div class="paper-margin" title="页边距">
|
|
611
|
+
<i></i>
|
|
612
|
+
</div>
|
|
613
|
+
<div class="column-config" title="分栏">
|
|
614
|
+
<i></i>
|
|
615
|
+
</div>
|
|
616
|
+
<div class="ruler-toggle" title="标尺">
|
|
617
|
+
<i></i>
|
|
618
|
+
</div>
|
|
619
|
+
<div class="spellcheck" title="拼写检查">
|
|
620
|
+
<i></i>
|
|
621
|
+
<div class="options">
|
|
622
|
+
<label class="spellcheck-toggle">
|
|
623
|
+
<input type="checkbox" class="spellcheck-toggle__input" />
|
|
624
|
+
<span>启用拼写检查</span>
|
|
625
|
+
</label>
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
<div class="fullscreen" title="全屏显示">
|
|
629
|
+
<i></i>
|
|
630
|
+
</div>
|
|
631
|
+
<div class="editor-option" title="编辑器设置">
|
|
632
|
+
<i></i>
|
|
633
|
+
</div>
|
|
634
|
+
</div>
|
|
635
|
+
</div>
|
|
636
|
+
</div>
|
|
637
|
+
<script type="module" src="/src/main.ts"><\/script>
|
|
638
|
+
</body>
|
|
639
|
+
|
|
640
|
+
</html>
|
|
641
|
+
`;Dp();var jp=`主诉:
|
|
642
|
+
发热三天,咳嗽五天。
|
|
643
|
+
现病史:
|
|
644
|
+
患者于三天前无明显诱因,感冒后发现面部水肿,无皮疹,尿量减少,出现乏力,在外治疗无好转,现来我院就诊。
|
|
645
|
+
既往史:
|
|
646
|
+
有糖尿病10年,有高血压2年,有传染性疾病1年。报告其他既往疾病。
|
|
647
|
+
流行病史:
|
|
648
|
+
否认14天内接触过确诊患者、疑似患者、无症状感染者及其密切接触者;否认14天内去过以下场所:水产、肉类批发市场,农贸市场,集市,大型超市,夜市;否认14天内与以下场所工作人员密切接触:水产、肉类批发市场,农贸市场,集市,大型超市;否认14天内周围(如家庭、办公室)有2例以上聚集性发病;否认14天内接触过有发热或呼吸道症状的人员;否认14天内自身有发热或呼吸道症状;否认14天内接触过纳入隔离观察的人员及其他可能与新冠肺炎关联的情形;陪同家属无以上情况。
|
|
649
|
+
体格检查:
|
|
650
|
+
T:39.5℃,P:80bpm,R:20次/分,BP:120/80mmHg;
|
|
651
|
+
辅助检查:
|
|
652
|
+
2020年6月10日,普放:血细胞比容36.50%(偏低)40~50;单核细胞绝对值0.75*10/L(偏高)参考值:0.1~0.6;
|
|
653
|
+
门诊诊断:处置治疗:电子签名:【】
|
|
654
|
+
其他记录:`,Mp=[`主诉:`,`现病史:`,`既往史:`,`流行病史:`,`体格检查:`,`辅助检查:`,`门诊诊断:`,`处置治疗:`,`电子签名:`,`其他记录:`],Np=new Map;for(let e=0;e<Mp.length;e++){let t=Mp[e],n=jp.indexOf(t);~n&&Np.set(n,t)}for(var Pp=[`传染性疾病`].map(e=>{let t=jp.indexOf(e);return~t?Array(e.length).fill(t).map((e,n)=>t+n):[]}).flat(),Fp=[`血细胞比容`].map(e=>{let t=jp.indexOf(e);return~t?Array(e.length).fill(t).map((e,n)=>t+n):[]}).flat(),Ip=[],Lp=jp.split(``),Rp=0;Rp<Lp.length;){let e=Lp[Rp],t=Np.get(Rp);t?(Ip.push({value:``,type:B.TITLE,level:nn.FIRST,valueList:[{value:t,size:18}]}),Rp+=t.length-1):Pp.includes(Rp)?Ip.push({value:e,color:`#FF0000`,size:16}):Fp.includes(Rp)?Ip.push({value:e,highlight:`#F2F27F`,groupIds:[`1`]}):Ip.push({value:e,size:16}),Rp++}Ip.splice(12,0,{type:B.CONTROL,value:``,control:{conceptId:`1`,type:H.TEXT,value:null,placeholder:`其他补充`,prefix:`{`,postfix:`}`}}),Ip.splice(94,0,{type:B.CONTROL,value:``,control:{conceptId:`2`,type:H.SELECT,value:null,code:null,placeholder:`有无`,prefix:`{`,postfix:`}`,valueSets:[{value:`有`,code:`98175`},{value:`无`,code:`98176`},{value:`不详`,code:`98177`}]}}),Ip.splice(116,0,{type:B.HYPERLINK,value:``,valueList:[{value:`新`,size:16},{value:`冠`,size:16},{value:`肺`,size:16},{value:`炎`,size:16}],url:`https://hufe.club/canvas-editor`}),Ip.splice(335,0,{type:B.CONTROL,value:``,control:{conceptId:`6`,type:H.TEXT,value:null,placeholder:`内容`,preText:`其他:`,postText:`。`}}),Ip.splice(346,0,{value:`∆`,color:`#FF0000`,type:B.SUBSCRIPT}),Ip.splice(430,0,{value:`9`,type:B.SUPERSCRIPT}),Ip.splice(451,0,{value:``,type:B.LIST,listType:qt.OL,valueList:[{value:`高血压
|
|
655
|
+
糖尿病
|
|
656
|
+
病毒性感冒
|
|
657
|
+
过敏性鼻炎
|
|
658
|
+
过敏性鼻息肉`}]}),Ip.splice(453,0,{value:``,type:B.LIST,listType:qt.OL,valueList:[{value:`超声引导下甲状腺细针穿刺术;
|
|
659
|
+
乙型肝炎表面抗体测定;
|
|
660
|
+
膜式病变细胞采集术、后颈皮下肤层;`}]}),Ip.splice(456,0,{value:`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA+CAYAAACLDZH2AAAMPmlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSIbTQpYTeBJEaQEoILYD0ItgISYBQYgwEFTuyqODaxQI2dFVEsQNiR+wsir0viKgo62LBrrxJAV33le/N982d//5z5j9nzp259w4A6ie5YnEuqgFAnqhAEhcayBiTksogPQUEYAr0ABloc3n5YlZMTCSAZbD9e3l3EyCy9pqjTOuf/f+1aPIF+TwAkBiI0/n5vDyIDwKAV/HEkgIAiD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scMDofp06f/c+Vr2bKlGimCw3UAI/hiaogKsBFjZZV/+oL/mNNXY9kOzFqQk2EdGDZsmLxs+lFnYF2cML2juNSgOSEV0W/lwIEDUMPFJ5gt92VcKzOgiKVFfhz+jkDGCsu2cBw+fLjIYGZ3sQowRyYwm9P8IqoHoiNoyAoA7sAPRxfMoYBtAe1gJp358PcAgYBlWsXwLOcaY8eOVeeSeVlWFlmysh2OJVYMgyi2QKBvoMIrcaCqMb4n8USguAvmUMA2EQImJQ6J5Dn9PyDW19fO6/J+kyZNCPItHBJwbsjgHdzHJn68otPJkyc9dneHDRkmN7ihEcUWCKSXDHWsUOZ07xtilF0wiQLm/A5i1gpWOuRY8VDEB6n0rKkH3RjL0VF26Qn6Ya+KDRs2VHhYke6D9Hg5TuwD4YI5FLBNhJDo86qpJhYTjI0wQp1SDnFGyqes/EnUTD1iAxCMD/2wMmdq23G5MdtECJ5MAcgZQ6ijBN5HQJjN8DeyoYKlS5eqQHj+AVnSberUqUW7kydP9mkJsaTTuNCoU369c+fO9ViJoeDxHg+Wo4dN93RlEn+aaBVERzyyCodIa9d2EUInKP8xt3qV8+IhGBqWBbYVi1w4va4ZZXY5GzCvyb448N2MZt02QkgBRzEwxg2m0k1akrnMtp2yiCKSK2X7UCatMp+FcD7jXFeO/ZstZE8gt4031CCUsb8BOy6Y32IP8N7Vq1ePeIM90RjcyLzhCeXOnTv2jbsthJQCjmVgK6mAvcBkcDz+ngB/jCiVLCv7dds2nwJxkoFBRhmWiQ1JXAhfCsRZBg7fKXMx1ylgux1YR8YtuxSILgVcBo4uxdz6jqKAy8COmg4XmehS4H9f7COrHME8MAAAAABJRU5ErkJggg==`,width:89,height:32,id:`signature`,type:B.IMAGE}),Ip.push({type:B.TABLE,value:``,colgroup:[{width:180},{width:80},{width:130},{width:130}],trList:[{height:40,tdList:[{colspan:1,rowspan:2,value:[{value:`1`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`2`,size:16},{value:`.`,size:16}]},{colspan:2,rowspan:1,value:[{value:`3`,size:16},{value:`.`,size:16}]}]},{height:40,tdList:[{colspan:1,rowspan:1,value:[{value:`4`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`5`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`6`,size:16},{value:`.`,size:16}]}]},{height:40,tdList:[{colspan:1,rowspan:1,value:[{value:`7`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`8`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`9`,size:16},{value:`.`,size:16}]},{colspan:1,rowspan:1,value:[{value:`1`,size:16},{value:`0`,size:16},{value:`.`,size:16}]}]}]}),Ip.push({value:`是否同意以上内容:`},{type:B.CONTROL,control:{conceptId:`3`,type:H.CHECKBOX,code:`98175`,value:``,valueSets:[{value:`同意`,code:`98175`},{value:`否定`,code:`98176`}]},value:``},{value:`
|
|
661
|
+
`}),Ip.push({value:`医学公式:`},{value:`{E_k} = hv - {W_0}`,type:B.LATEX},{value:`
|
|
662
|
+
`}),Ip.push({value:`签署日期:`},{type:B.CONTROL,value:``,control:{conceptId:`5`,type:H.DATE,value:[{value:`2022-08-10 17:30:01`}],placeholder:`签署日期`}},{value:`
|
|
663
|
+
`}),Ip.push({value:`诊断标签:`},{type:B.LABEL,value:`高血压`,labelId:`l1`,size:14},{value:`
|
|
664
|
+
`}),Ip.push({value:`患者签名:`},{type:B.CONTROL,value:``,control:{conceptId:`4`,type:H.TEXT,value:null,placeholder:``,prefix:``,postfix:``,minWidth:160,underline:!0}}),Ip.push({value:`
|
|
665
|
+
就诊次数:`},{type:B.CONTROL,value:``,control:{conceptId:`7`,type:H.NUMBER,value:null,placeholder:`就诊次数`,prefix:`{`,postfix:`}`,numberExclusiveOptions:{calculatorDisabled:!1}}}),Ip.push({value:`
|
|
666
|
+
有无高血压:`},{type:B.CONTROL,value:``,control:{conceptId:`hypertension`,type:H.SELECT,value:null,code:null,placeholder:`有无`,prefix:`{`,postfix:`}`,valueSets:[{value:`有`,code:`1`},{value:`无`,code:`0`}],cascade:[{expression:`getValue(@self) == '1'`,actions:[{conceptId:`hypertensionLevel`,effects:{hide:!1,required:!0}}]}]}},{type:B.CONTROL,value:``,control:{preText:`,高血压分级:`,conceptId:`hypertensionLevel`,type:H.SELECT,value:null,code:null,placeholder:`分级`,prefix:`{`,postfix:`}`,hide:!0,valueSets:[{value:`Ⅰ级`,code:`1`},{value:`Ⅱ级`,code:`2`},{value:`Ⅲ级`,code:`3`}]}}),Ip.push({value:`
|
|
667
|
+
身高:`},{type:B.CONTROL,value:``,control:{postText:`cm`,conceptId:`height`,type:H.NUMBER,value:null,placeholder:`身高`,prefix:`{`,postfix:`}`,required:!0,validation:{min:0,max:300}}},{value:`,体重:`},{type:B.CONTROL,value:``,control:{postText:`kg`,conceptId:`weight`,type:H.NUMBER,value:null,placeholder:`体重`,prefix:`{`,postfix:`}`}},{value:`,BMI:`},{type:B.CONTROL,value:``,control:{conceptId:`bmi`,type:H.NUMBER,value:null,placeholder:`自动计算`,prefix:`{`,postfix:`}`,compute:`round(getValue('weight') / ((getValue('height') * getValue('height')) / 10000), 2)`,cascade:[{expression:`getValue(@self) > 28`,actions:[{conceptId:`obesityTip`,effects:{hide:!1,required:!0}}]}]}},{type:B.CONTROL,value:``,control:{preText:`,肥胖干预建议:`,conceptId:`obesityTip`,type:H.TEXT,value:null,placeholder:`干预建议`,prefix:`{`,postfix:`}`,hide:!0}}),Ip.push({value:`
|
|
668
|
+
`},{value:``,type:B.TAB},{value:`E`,size:16},{value:`O`,size:16},{value:`F`,size:16});var zp=Ip,Bp=[{id:`1`,content:`红细胞比容(HCT)是指每单位容积中红细胞所占全血容积的比值,用于反映红细胞和血浆的比例。`,userName:`Hufe`,rangeText:`血细胞比容`,createdDate:`2023-08-20 23:10:55`}],Vp={margins:[100,120,100,120],backend:R.CANVAS,trace:{author:`游客1`},watermark:{data:`CANVAS-EDITOR`,size:120},pageNumber:{format:`第{pageNo}页/共{pageCount}页`},placeholder:{data:`请输入正文`},zone:{tipDisabled:!1},maskMargin:[60,0,30,0]},Hp=u(s(((e,t)=>{var n=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,`&`).replace(/</g,`<`).replace(/\u00a0/g,` `)},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){n||={};var r,a;switch(i.util.type(t)){case`Object`:if(a=i.util.objId(t),n[a])return n[a];for(var o in r={},n[a]=r,t)t.hasOwnProperty(o)&&(r[o]=e(t[o],n));return r;case`Array`:return a=i.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach(function(t,i){r[i]=e(t,n)}),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return`none`},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,`gi`),``),e.classList.add(`language-`+n)},currentScript:function(){if(typeof document>`u`)return null;if(document.currentScript&&document.currentScript.tagName===`SCRIPT`)return document.currentScript;try{throw Error()}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName(`script`);for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r=`no-`+t;e;){var i=e.classList;if(i.contains(t))return!0;if(i.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=i.util.clone(i.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){r||=i.languages;var a=r[e],o={};for(var s in a)if(a.hasOwnProperty(s)){if(s==t)for(var c in n)n.hasOwnProperty(c)&&(o[c]=n[c]);n.hasOwnProperty(s)||(o[s]=a[s])}var l=r[e];return r[e]=o,i.languages.DFS(i.languages,function(t,n){n===l&&t!=e&&(this[t]=o)}),o},DFS:function e(t,n,r,a){a||={};var o=i.util.objId;for(var s in t)if(t.hasOwnProperty(s)){n.call(t,s,t[s],r||s);var c=t[s],l=i.util.type(c);l===`Object`&&!a[o(c)]?(a[o(c)]=!0,e(c,n,null,a)):l===`Array`&&!a[o(c)]&&(a[o(c)]=!0,e(c,n,s,a))}}},plugins:{},highlightAll:function(e,t){i.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:`code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code`};i.hooks.run(`before-highlightall`,r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),i.hooks.run(`before-all-elements-highlight`,r);for(var a=0,o;o=r.elements[a++];)i.highlightElement(o,t===!0,r.callback)},highlightElement:function(t,n,r){var a=i.util.getLanguage(t),o=i.languages[a];i.util.setLanguage(t,a);var s=t.parentElement;s&&s.nodeName.toLowerCase()===`pre`&&i.util.setLanguage(s,a);var c={element:t,language:a,grammar:o,code:t.textContent};function l(e){c.highlightedCode=e,i.hooks.run(`before-insert`,c),c.element.innerHTML=c.highlightedCode,i.hooks.run(`after-highlight`,c),i.hooks.run(`complete`,c),r&&r.call(c.element)}if(i.hooks.run(`before-sanity-check`,c),s=c.element.parentElement,s&&s.nodeName.toLowerCase()===`pre`&&!s.hasAttribute(`tabindex`)&&s.setAttribute(`tabindex`,`0`),!c.code)i.hooks.run(`complete`,c),r&&r.call(c.element);else if(i.hooks.run(`before-highlight`,c),!c.grammar)l(i.util.encode(c.code));else if(n&&e.Worker){var u=new Worker(i.filename);u.onmessage=function(e){l(e.data)},u.postMessage(JSON.stringify({language:c.language,code:c.code,immediateClose:!0}))}else l(i.highlight(c.code,c.grammar,c.language))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(i.hooks.run(`before-tokenize`,r),!r.grammar)throw Error(`The language "`+r.language+`" has no grammar.`);return r.tokens=i.tokenize(r.code,r.grammar),i.hooks.run(`after-tokenize`,r),a.stringify(i.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var i=new c;return l(i,i.head,e),s(e,i,t,i.head,0),d(i)},hooks:{all:{},add:function(e,t){var n=i.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=i.hooks.all[e];if(n&&n.length)for(var r=0,a;a=n[r++];)a(t)}},Token:a};e.Prism=i;function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=(r||``).length|0}a.stringify=function e(t,n){if(typeof t==`string`)return t;if(Array.isArray(t)){var r=``;return t.forEach(function(t){r+=e(t,n)}),r}var a={type:t.type,content:e(t.content,n),tag:`span`,classes:[`token`,t.type],attributes:{},language:n},o=t.alias;o&&(Array.isArray(o)?Array.prototype.push.apply(a.classes,o):a.classes.push(o)),i.hooks.run(`wrap`,a);var s=``;for(var c in a.attributes)s+=` `+c+`="`+(a.attributes[c]||``).replace(/"/g,`"`)+`"`;return`<`+a.tag+` class="`+a.classes.join(` `)+`"`+s+`>`+a.content+`</`+a.tag+`>`};function o(e,t,n,r){e.lastIndex=t;var i=e.exec(n);if(i&&r&&i[1]){var a=i[1].length;i.index+=a,i[0]=i[0].slice(a)}return i}function s(e,t,n,r,c,d){for(var f in n)if(n.hasOwnProperty(f)&&n[f]){var p=n[f];p=Array.isArray(p)?p:[p];for(var m=0;m<p.length;++m){if(d&&d.cause==f+`,`+m)return;var h=p[m],g=h.inside,_=!!h.lookbehind,v=!!h.greedy,y=h.alias;if(v&&!h.pattern.global){var b=h.pattern.toString().match(/[imsuy]*$/)[0];h.pattern=RegExp(h.pattern.source,b+`g`)}for(var x=h.pattern||h,S=r.next,C=c;S!==t.tail&&!(d&&C>=d.reach);C+=S.value.length,S=S.next){var w=S.value;if(t.length>e.length)return;if(!(w instanceof a)){var T=1,E;if(v){if(E=o(x,C,e,_),!E||E.index>=e.length)break;var D=E.index,O=E.index+E[0].length,k=C;for(k+=S.value.length;D>=k;)S=S.next,k+=S.value.length;if(k-=S.value.length,C=k,S.value instanceof a)continue;for(var A=S;A!==t.tail&&(k<O||typeof A.value==`string`);A=A.next)T++,k+=A.value.length;T--,w=e.slice(C,k),E.index-=C}else if(E=o(x,0,w,_),!E)continue;var D=E.index,j=E[0],M=w.slice(0,D),N=w.slice(D+j.length),P=C+w.length;d&&P>d.reach&&(d.reach=P);var F=S.prev;M&&(F=l(t,F,M),C+=M.length),u(t,F,T);var I=new a(f,g?i.tokenize(j,g):j,y,j);if(S=l(t,F,I),N&&l(t,S,N),T>1){var L={cause:f+`,`+m,reach:P};s(e,t,n,S.prev,C,L),d&&L.reach>d.reach&&(d.reach=L.reach)}}}}}}function c(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function l(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i<n&&r!==e.tail;i++)r=r.next;t.next=r,r.prev=t,e.length-=i}function d(e){for(var t=[],n=e.head.next;n!==e.tail;)t.push(n.value),n=n.next;return t}if(!e.document)return e.addEventListener&&(i.disableWorkerMessageHandler||e.addEventListener(`message`,function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,o=n.immediateClose;e.postMessage(i.highlight(a,i.languages[r],r)),o&&e.close()},!1)),i;var f=i.util.currentScript();f&&(i.filename=f.src,f.hasAttribute(`data-manual`)&&(i.manual=!0));function p(){i.manual||i.highlightAll()}if(!i.manual){var m=document.readyState;m===`loading`||m===`interactive`&&f&&f.defer?document.addEventListener(`DOMContentLoaded`,p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return i}(typeof window<`u`?window:typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:{});t!==void 0&&t.exports&&(t.exports=n),typeof global<`u`&&(global.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:`attr-equals`},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:`named-entity`},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside[`attr-value`].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside[`internal-subset`].inside=n.languages.markup,n.hooks.add(`wrap`,function(e){e.type===`entity`&&(e.attributes.title=e.content.replace(/&/,`&`))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(e,t){var r={};r[`language-`+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[t]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i[`language-`+t]={pattern:/[\s\S]+/,inside:n.languages[t]};var a={};a[e]={pattern:RegExp(`(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[\\s\\S])*?(?=<\\/__>)`.replace(/__/g,function(){return e}),`i`),lookbehind:!0,greedy:!0,inside:i},n.languages.insertBefore(`markup`,`cdata`,a)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(e,t){n.languages.markup.tag.inside[`special-attr`].push({pattern:RegExp(`(^|["'\\s])(?:`+e+`)\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s'">=]+(?=[\\s>]))`,`i`),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,`language-`+t],inside:n.languages[t]},punctuation:[{pattern:/^=/,alias:`attr-equals`},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend(`markup`,{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,(function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|`+t.source+`)*?(?:;|(?=\\s*\\{))`),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:`selector`},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp(`\\burl\\((?:`+t.source+`|(?:[^\\\\\\r\\n()"']|\\\\[\\s\\S])*)\\)`,`i`),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp(`^`+t.source+`$`),alias:`url`}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+`)*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined(`style`,`css`),n.tag.addAttribute(`style`,`css`))})(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend(`clike`,{"class-name":[n.languages.clike[`class-name`],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(`(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])`),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript[`class-name`][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore(`javascript`,`keyword`,{regex:{pattern:RegExp(`((?:^|[^$\\w\\xA0-\\uFFFF."'\\])\\s]|\\b(?:return|yield))\\s*)\\/(?:(?:\\[(?:[^\\]\\\\\\r\\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.|\\[(?:[^[\\]\\\\\\r\\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\\r\\n])+\\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/)*(?:$|[\\r\\n,.;:})\\]]|\\/\\/))`),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:`language-regex`,inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:`function`},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore(`javascript`,`string`,{hashbang:{pattern:/^#!.*/,greedy:!0,alias:`comment`},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:`string`},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:`punctuation`},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:`property`}}),n.languages.insertBefore(`javascript`,`operator`,{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:`property`}}),n.languages.markup&&(n.languages.markup.tag.addInlined(`script`,`javascript`),n.languages.markup.tag.addAttribute(`on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)`,`javascript`)),n.languages.js=n.languages.javascript,(function(){if(n===void 0||typeof document>`u`)return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e=`Loading…`,t=function(e,t){return`✖ Error `+e+` while fetching file: `+t},r=`✖ Error: File does not exist or is empty`,i={js:`javascript`,py:`python`,rb:`ruby`,ps1:`powershell`,psm1:`powershell`,sh:`bash`,bat:`batch`,h:`c`,tex:`latex`},a=`data-src-status`,o=`loading`,s=`loaded`,c=`failed`,l=`pre[data-src]:not([`+a+`="`+s+`"]):not([`+a+`="`+o+`"])`;function u(e,n,i){var a=new XMLHttpRequest;a.open(`GET`,e,!0),a.onreadystatechange=function(){a.readyState==4&&(a.status<400&&a.responseText?n(a.responseText):a.status>=400?i(t(a.status,a.statusText)):i(r))},a.send(null)}function d(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||``);if(t){var n=Number(t[1]),r=t[2],i=t[3];return r?i?[n,Number(i)]:[n,void 0]:[n,n]}}n.hooks.add(`before-highlightall`,function(e){e.selector+=`, `+l}),n.hooks.add(`before-sanity-check`,function(t){var r=t.element;if(r.matches(l)){t.code=``,r.setAttribute(a,o);var f=r.appendChild(document.createElement(`CODE`));f.textContent=e;var p=r.getAttribute(`data-src`),m=t.language;if(m===`none`){var h=(/\.(\w+)$/.exec(p)||[,`none`])[1];m=i[h]||h}n.util.setLanguage(f,m),n.util.setLanguage(r,m);var g=n.plugins.autoloader;g&&g.loadLanguages(m),u(p,function(e){r.setAttribute(a,s);var t=d(r.getAttribute(`data-range`));if(t){var i=e.split(/\r\n?|\n/g),o=t[0],c=t[1]==null?i.length:t[1];o<0&&(o+=i.length),o=Math.max(0,Math.min(o-1,i.length)),c<0&&(c+=i.length),c=Math.max(0,Math.min(c,i.length)),e=i.slice(o,c).join(`
|
|
669
|
+
`),r.hasAttribute(`data-start`)||r.setAttribute(`data-start`,String(o+1))}f.textContent=e,n.highlightElement(f)},function(e){r.setAttribute(a,c),f.textContent=e})}}),n.plugins.fileHighlight={highlight:function(e){for(var t=(e||document).querySelectorAll(l),r=0,i;i=t[r++];)n.highlightElement(i)}};var f=!1;n.fileHighlight=function(){f||=(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}})()}))(),1);Dp();var Up=class{options;mask;container;inputList;constructor(e){this.options=e,this.mask=null,this.container=null,this.inputList=[],this._render()}_render(){let{title:e,data:t,onClose:n,onCancel:r,onConfirm:i}=this.options,a=document.createElement(`div`);a.classList.add(`dialog-mask`),a.setAttribute(Ye,A.COMPONENT),document.body.append(a);let o=document.createElement(`div`);o.classList.add(`dialog-container`),o.setAttribute(Ye,A.COMPONENT);let s=document.createElement(`div`);s.classList.add(`dialog`),o.append(s);let c=document.createElement(`div`);c.classList.add(`dialog-title`);let l=document.createElement(`span`);l.append(document.createTextNode(e));let u=document.createElement(`i`);u.onclick=()=>{n&&n(),this._dispose()},c.append(l),c.append(u),s.append(c);let d=document.createElement(`div`);d.classList.add(`dialog-option`);for(let e=0;e<t.length;e++){let n=t[e],r=document.createElement(`div`);if(r.classList.add(`dialog-option__item`),n.label){let e=document.createElement(`span`);e.append(document.createTextNode(n.label)),r.append(e),n.required&&e.classList.add(`dialog-option__item--require`)}let i;n.type===`select`?(i=document.createElement(`select`),n.options?.forEach(e=>{let t=document.createElement(`option`);t.value=e.value,t.label=e.label,i.append(t)})):n.type===`textarea`?i=document.createElement(`textarea`):(i=document.createElement(`input`),i.type=n.type),n.width&&(i.style.width=`${n.width}px`),n.height&&(i.style.height=`${n.height}px`),i.name=n.name,i.value=n.value||``,i instanceof HTMLSelectElement||(i.placeholder=n.placeholder||``),r.append(i),d.append(r),this.inputList.push(i)}s.append(d);let f=document.createElement(`div`);f.classList.add(`dialog-menu`);let p=document.createElement(`button`);p.classList.add(`dialog-menu__cancel`),p.append(document.createTextNode(`取消`)),p.type=`button`,p.onclick=()=>{r&&r(),this._dispose()},f.append(p);let m=document.createElement(`button`);m.append(document.createTextNode(`确定`)),m.type=`submit`,m.onclick=()=>{if(i){let e=this.inputList.map(e=>({name:e.name,value:e.value}));i(e)}this._dispose()},f.append(m),s.append(f),document.body.append(o),this.container=o,this.mask=a}_dispose(){this.mask?.remove(),this.container?.remove()}};function Wp(e){switch(e){case`comment`:case`prolog`:case`doctype`:case`cdata`:return{color:`#008000`,italic:!0};case`namespace`:return{opacity:.7};case`string`:return{color:`#A31515`};case`punctuation`:case`operator`:return{color:`#393A34`};case`url`:case`symbol`:case`number`:case`boolean`:case`variable`:case`constant`:case`inserted`:return{color:`#36acaa`};case`atrule`:case`keyword`:case`attr-value`:return{color:`#0000ff`};case`function`:return{color:`#b9a40a`};case`deleted`:case`tag`:return{color:`#9a050f`};case`selector`:return{color:`#00009f`};case`important`:return{color:`#e90`,bold:!0};case`italic`:return{italic:!0};case`class-name`:case`property`:return{color:`#2B91AF`};case`attr-name`:case`regex`:case`entity`:return{color:`#ff0000`};default:return null}}function Gp(e){let t=[];function n(e){for(let r=0;r<e.length;r++){let i=e[r];if(typeof i==`string`)t.push({content:i});else if(Array.isArray(i.content))n(i.content);else{let{type:e,content:n}=i;typeof n==`string`&&t.push({type:e,content:n,...Wp(e)})}}}return n(e),t}Dp();var Kp=class{MAX_RECORD_COUNT=1e3;DEFAULT_WIDTH=390;DEFAULT_HEIGHT=180;undoStack=[];x=0;y=0;isDrawing=!1;isDrawn=!1;linePoints=[];canvasWidth;canvasHeight;options;mask;container;trashContainer;undoContainer;canvas;ctx;preTimeStamp;dpr;constructor(e){this.options=e,this.preTimeStamp=0,this.dpr=window.devicePixelRatio,this.canvasWidth=(e.width||this.DEFAULT_WIDTH)*this.dpr,this.canvasHeight=(e.height||this.DEFAULT_HEIGHT)*this.dpr;let{mask:t,container:n,trashContainer:r,undoContainer:i,canvas:a}=this._render();this.mask=t,this.container=n,this.trashContainer=r,this.undoContainer=i,this.canvas=a,this.ctx=a.getContext(`2d`),this.ctx.scale(this.dpr,this.dpr),this.ctx.lineCap=`round`,this._bindEvent(),this._clearUndoFn(),document.documentElement.classList.add(`overflow-hidden`),document.body.classList.add(`overflow-hidden`),this.container.classList.add(`overflow-hidden`)}_render(){let{onClose:e,onCancel:t,onConfirm:n}=this.options,r=document.createElement(`div`);r.classList.add(`signature-mask`),r.setAttribute(Ye,A.COMPONENT),document.body.append(r);let i=document.createElement(`div`);i.classList.add(`signature-container`),i.setAttribute(Ye,A.COMPONENT);let a=document.createElement(`div`);a.classList.add(`signature`),i.append(a);let o=document.createElement(`div`);o.classList.add(`signature-title`);let s=document.createElement(`span`);s.append(document.createTextNode(`插入签名`));let c=document.createElement(`i`);c.onclick=()=>{e&&e(),this._dispose()},o.append(s),o.append(c),a.append(o);let l=document.createElement(`div`);l.classList.add(`signature-operation`);let u=document.createElement(`div`);u.classList.add(`signature-operation__undo`);let d=document.createElement(`i`),f=document.createElement(`span`);f.innerText=`撤销`,u.append(d),u.append(f),l.append(u);let p=document.createElement(`div`);p.classList.add(`signature-operation__trash`);let m=document.createElement(`i`),h=document.createElement(`span`);h.innerText=`清空`,p.append(m),p.append(h),l.append(p),a.append(l);let g=document.createElement(`div`);g.classList.add(`signature-canvas`);let _=document.createElement(`canvas`);_.width=this.canvasWidth,_.height=this.canvasHeight,_.style.width=`${this.canvasWidth/this.dpr}px`,_.style.height=`${this.canvasHeight/this.dpr}px`,g.append(_),a.append(g);let v=document.createElement(`div`);v.classList.add(`signature-menu`);let y=document.createElement(`button`);y.classList.add(`signature-menu__cancel`),y.append(document.createTextNode(`取消`)),y.type=`button`,y.onclick=()=>{t&&t(),this._dispose()},v.append(y);let b=document.createElement(`button`);return b.append(document.createTextNode(`确定`)),b.type=`submit`,b.onclick=()=>{n&&n(this._toData()),this._dispose()},v.append(b),a.append(v),document.body.append(i),this.container=i,this.mask=r,{mask:r,canvas:_,container:i,trashContainer:p,undoContainer:u}}_bindEvent(){this.trashContainer.onclick=this._clearCanvas.bind(this),this.undoContainer.onclick=this._undo.bind(this),this.canvas.onmousedown=this._startDraw.bind(this),this.canvas.onmousemove=this._draw.bind(this),this.container.onmouseup=this._stopDraw.bind(this),this.container.ontouchmove=this.registerTouchmove.bind(this),this.container.ontouchstart=this.registerTouchstart.bind(this),this.container.ontouchend=this.registerTouchend.bind(this)}_undo(){this.undoStack.length>1&&(this.undoStack.pop(),this.undoStack.length&&this.undoStack[this.undoStack.length-1]())}_saveUndoFn(e){for(this.undoStack.push(e);this.undoStack.length>this.MAX_RECORD_COUNT;)this.undoStack.shift()}_clearUndoFn(){let e=()=>{this.ctx.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.linePoints=[]};this.undoStack=[e]}_clearCanvas(){this._clearUndoFn(),this.ctx.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.linePoints=[]}_startDraw(e){this.isDrawing=!0,this.x=e.offsetX,this.y=e.offsetY,this.ctx.lineWidth=1}_draw(e){if(!this.isDrawing)return;let t=performance.now(),n=Math.sqrt(e.movementX**2+e.movementY**2)/(t-this.preTimeStamp),r=Math.min(5,Math.max(1,5-n*3));this.ctx.lineWidth=this.ctx.lineWidth*.8+r*.2;let{offsetX:i,offsetY:a}=e;this.ctx.beginPath(),this.ctx.moveTo(this.x,this.y),this.ctx.lineTo(i,a),this.ctx.stroke(),this.x=i,this.y=a,this.linePoints.push([i,a]),this.isDrawn=!0,this.preTimeStamp=t}_stopDraw(){if(this.isDrawing=!1,this.isDrawn){let e=this.ctx.getImageData(0,0,this.canvasWidth,this.canvasHeight),t=this.linePoints.slice(),n=this;this._saveUndoFn(function(){n.ctx.clearRect(0,0,n.canvasWidth,n.canvasHeight),n.ctx.putImageData(e,0,0),n.linePoints=t}),this.isDrawn=!1}}_toData(){if(!this.linePoints.length)return null;let e=this.linePoints[0][0],t=this.linePoints[0][1],n=e,r=t,i=e,a=t;for(let e=0;e<this.linePoints.length;e++){let t=this.linePoints[e];n>t[0]&&(n=t[0]),i<t[0]&&(i=t[0]),r>t[1]&&(r=t[1]),a<t[1]&&(a=t[1])}let o=this.ctx.lineWidth;n=n<o?0:n-o,r=r<o?0:r-o,i+=o,a+=o;let s=i-n,c=a-r,l=this.ctx.getImageData(n*this.dpr,r*this.dpr,s*this.dpr,c*this.dpr),u=document.createElement(`canvas`);return u.style.width=`${s}px`,u.style.height=`${c}px`,u.width=s*this.dpr,u.height=c*this.dpr,u.getContext(`2d`).putImageData(l,0,0),{value:u.toDataURL(),width:s,height:c}}registerTouchmove(e){this.registerTouchEvent(e,`mousemove`)}registerTouchstart(e){this.registerTouchEvent(e,`mousedown`)}registerTouchend(){let e=new MouseEvent(`mouseup`,{});this.canvas.dispatchEvent(e)}registerTouchEvent(e,t){let n=e.touches[0],r=new MouseEvent(t,{clientX:n.clientX,clientY:n.clientY});this.canvas.dispatchEvent(r)}_dispose(){this.mask.remove(),this.container.remove(),document.documentElement.classList.remove(`overflow-hidden`),document.body.classList.remove(`overflow-hidden`)}};function qp(e,t){let n;return function(...r){n&&window.clearTimeout(n),n=window.setTimeout(()=>{e.apply(this,r)},t)}}function Jp(e,t){if(!t){e.scrollTop=0;return}let n=[],r=t.offsetParent;for(;r&&e!==r&&e.contains(r);)n.push(r),r=r.offsetParent;let i=t.offsetTop+n.reduce((e,t)=>e+t.offsetTop,0),a=i+t.offsetHeight,o=e.scrollTop,s=o+e.clientHeight;i<o?e.scrollTop=i:a>s&&(e.scrollTop=a-e.clientHeight)}function Yp(e){(window.requestIdleCallback||window.setTimeout)(()=>{e()})}Dp(),window.onload=function(){let e=typeof navigator<`u`&&/Mac OS X/.test(navigator.userAgent),t=document.querySelector(`.editor`),n=new URLSearchParams(window.location.search).get(`backend`),r=new Ep(t,{header:[{value:`第一人民医院`,size:32,rowFlex:O.CENTER},{value:`
|
|
670
|
+
门诊病历`,size:18,rowFlex:O.CENTER},{value:`
|
|
671
|
+
`,type:B.SEPARATOR}],main:zp,footer:[{value:`canvas-editor`,size:12}]},{...Vp,...n===R.SVG||n===R.CANVAS?{backend:n}:{}});console.log(`实例: `,r),Reflect.set(window,`editor`,r),Reflect.set(window,`__CANVAS_EDITOR_INSTANCE__`,r),window.addEventListener(`click`,e=>{let t=document.querySelector(`.visible`);t&&!t.contains(e.target)&&t.classList.remove(`visible`)},{capture:!0});let i=document.querySelector(`.menu-item__undo`);i.title=`撤销(${e?`⌘`:`Ctrl`}+Z)`,i.onclick=function(){console.log(`undo`),r.command.executeUndo()};let a=document.querySelector(`.menu-item__redo`);a.title=`重做(${e?`⌘`:`Ctrl`}+Y)`,a.onclick=function(){console.log(`redo`),r.command.executeRedo()};let o=document.querySelector(`.menu-item__painter`),s=!0,c;o.onclick=function(){s?(s=!1,c=window.setTimeout(()=>{console.log(`painter-click`),s=!0,r.command.executePainter({isDblclick:!1})},200)):window.clearTimeout(c)},o.ondblclick=function(){console.log(`painter-dblclick`),s=!0,window.clearTimeout(c),r.command.executePainter({isDblclick:!0})},document.querySelector(`.menu-item__format`).onclick=function(){console.log(`format`),r.command.executeFormat()};let l=document.querySelector(`.menu-item__font`),u=l.querySelector(`.select`),d=l.querySelector(`.options`);l.onclick=function(){console.log(`font`),d.classList.toggle(`visible`)},d.onclick=function(e){let t=e.target;r.command.executeFont(t.dataset.family)};let f=document.querySelector(`.menu-item__size`),p=f.querySelector(`.select`),m=f.querySelector(`.options`);f.title=`设置字号`,f.onclick=function(){console.log(`size`),m.classList.toggle(`visible`)},m.onclick=function(e){let t=e.target;r.command.executeSize(Number(t.dataset.size))};let h=document.querySelector(`.menu-item__size-add`);h.title=`增大字号(${e?`⌘`:`Ctrl`}+[)`,h.onclick=function(){console.log(`size-add`),r.command.executeSizeAdd()};let g=document.querySelector(`.menu-item__size-minus`);g.title=`减小字号(${e?`⌘`:`Ctrl`}+])`,g.onclick=function(){console.log(`size-minus`),r.command.executeSizeMinus()};let _=document.querySelector(`.menu-item__bold`);_.title=`加粗(${e?`⌘`:`Ctrl`}+B)`,_.onclick=function(){console.log(`bold`),r.command.executeBold()};let v=document.querySelector(`.menu-item__italic`);v.title=`斜体(${e?`⌘`:`Ctrl`}+I)`,v.onclick=function(){console.log(`italic`),r.command.executeItalic()};let y=document.querySelector(`.menu-item__underline`);y.title=`下划线(${e?`⌘`:`Ctrl`}+U)`;let x=y.querySelector(`.options`);y.querySelector(`.select`).onclick=function(){x.classList.toggle(`visible`)},y.querySelector(`i`).onclick=function(){console.log(`underline`),r.command.executeUnderline(),x.classList.remove(`visible`)},y.querySelector(`ul`).onmousedown=function(e){let t=e.target.dataset.decorationStyle;r.command.executeUnderline({style:t}),x.classList.remove(`visible`)};let S=document.querySelector(`.menu-item__strikeout`);S.onclick=function(){console.log(`strikeout`),r.command.executeStrikeout()};let C=document.querySelector(`.menu-item__superscript`);C.title=`上标(${e?`⌘`:`Ctrl`}+Shift+,)`,C.onclick=function(){console.log(`superscript`),r.command.executeSuperscript()};let w=document.querySelector(`.menu-item__subscript`);w.title=`下标(${e?`⌘`:`Ctrl`}+Shift+.)`,w.onclick=function(){console.log(`subscript`),r.command.executeSubscript()};let T=document.querySelector(`#color`);T.oninput=function(){r.command.executeColor(T.value)};let E=document.querySelector(`.menu-item__color`),D=E.querySelector(`span`);E.onclick=function(){console.log(`color`),T.click()};let k=document.querySelector(`#highlight`);k.oninput=function(){r.command.executeHighlight(k.value)};let A=document.querySelector(`.menu-item__highlight`),j=A.querySelector(`span`);A.onclick=function(){console.log(`highlight`),k?.click()};let P=document.querySelector(`.menu-item__title`),F=P.querySelector(`.select`),I=P.querySelector(`.options`);I.querySelectorAll(`li`).forEach((t,n)=>{t.title=`Ctrl+${e?`Option`:`Alt`}+${n}`}),P.onclick=function(){console.log(`title`),I.classList.toggle(`visible`)},I.onclick=function(e){let t=e.target.dataset.level;r.command.executeTitle(t||null)};let L=document.querySelector(`.menu-item__left`);L.title=`左对齐(${e?`⌘`:`Ctrl`}+L)`,L.onclick=function(){console.log(`left`),r.command.executeRowFlex(O.LEFT)};let z=document.querySelector(`.menu-item__center`);z.title=`居中对齐(${e?`⌘`:`Ctrl`}+E)`,z.onclick=function(){console.log(`center`),r.command.executeRowFlex(O.CENTER)};let ee=document.querySelector(`.menu-item__right`);ee.title=`右对齐(${e?`⌘`:`Ctrl`}+R)`,ee.onclick=function(){console.log(`right`),r.command.executeRowFlex(O.RIGHT)};let te=document.querySelector(`.menu-item__alignment`);te.title=`两端对齐(${e?`⌘`:`Ctrl`}+J)`,te.onclick=function(){console.log(`alignment`),r.command.executeRowFlex(O.ALIGNMENT)};let V=document.querySelector(`.menu-item__justify`);V.title=`分散对齐(${e?`⌘`:`Ctrl`}+Shift+J)`,V.onclick=function(){console.log(`justify`),r.command.executeRowFlex(O.JUSTIFY)};let ne=document.querySelector(`.menu-item__row-margin`),re=ne.querySelector(`.options`);ne.onclick=function(){console.log(`row-margin`),re.classList.toggle(`visible`)},re.onclick=function(e){let t=e.target;r.command.executeRowMargin(Number(t.dataset.rowmargin))};let U=document.querySelector(`.menu-item__spacing`),ie=U.querySelector(`i`),W=U.querySelector(`.options`),G=W.querySelector(`[data-spacingbefore-input]`),se=W.querySelector(`[data-spacingafter-input]`);ie.onclick=function(){console.log(`spacing`),W.classList.toggle(`visible`)&&he(fe)},W.onclick=function(e){e.stopPropagation()};let ce=e=>{let t=Math.max(0,Math.round(e)||0);G.value=`${t}`,r.command.executeSpacingBefore(t)},le=e=>{let t=Math.max(0,Math.round(e)||0);se.value=`${t}`,r.command.executeSpacingAfter(t)};W.querySelector(`[data-spacingbefore-decrease]`).onclick=()=>ce(Number(G.value)-6),W.querySelector(`[data-spacingbefore-increase]`).onclick=()=>ce(Number(G.value)+6),W.querySelector(`[data-spacingafter-decrease]`).onclick=()=>le(Number(se.value)-6),W.querySelector(`[data-spacingafter-increase]`).onclick=()=>le(Number(se.value)+6),G.onchange=()=>ce(Number(G.value)),se.onchange=()=>le(Number(se.value));let ue={};[{key:`indentleft`,execute:e=>r.command.executeIndentLeft(e),clampMin:0},{key:`indentright`,execute:e=>r.command.executeIndentRight(e),clampMin:0},{key:`indentfirstline`,execute:e=>r.command.executeIndentFirstLine(e)}].forEach(({key:e,execute:t,clampMin:n})=>{let r=W.querySelector(`[data-${e}-input]`);ue[e]=r;let i=e=>{let i=Math.round(e)||0;n!==void 0&&(i=Math.max(n,i)),r.value=`${i}`,t(i)};W.querySelector(`[data-${e}-decrease]`).onclick=()=>i(Number(r.value)-16),W.querySelector(`[data-${e}-increase]`).onclick=()=>i(Number(r.value)+16),r.onchange=()=>i(Number(r.value))});let de=W.querySelector(`[data-tabstops-rows]`),fe=[],pe=[{value:oe.LEFT,label:`左对齐`},{value:oe.CENTER,label:`居中对齐`},{value:oe.RIGHT,label:`右对齐`}],me=[{value:``,label:`无`},{value:`dot`,label:`点线`},{value:`hyphen`,label:`横线`},{value:`underline`,label:`下划线`}];function he(e){de.innerHTML=``,e.forEach(e=>{let t=document.createElement(`div`);t.className=`tabstop-row`;let n=document.createElement(`input`);n.type=`number`,n.min=`1`,n.placeholder=`位置`,n.className=`tabstop-row__position`,n.value=`${e.position}`;let r=document.createElement(`select`);r.className=`tabstop-row__type`,pe.forEach(({value:t,label:n})=>{let i=document.createElement(`option`);i.value=t,i.text=n,(e.type||oe.LEFT)===t&&(i.selected=!0),r.appendChild(i)});let i=document.createElement(`select`);i.className=`tabstop-row__leader`,me.forEach(({value:t,label:n})=>{let r=document.createElement(`option`);r.value=t,r.text=n,(e.leader||``)===t&&(r.selected=!0),i.appendChild(r)});let a=document.createElement(`button`);a.type=`button`,a.className=`tabstop-row__delete`,a.title=`删除`,a.innerHTML=`<svg viewBox="0 0 1024 1024" width="12" height="12"><path fill="currentColor" d="M820.1 68.3H649V42.5c0-23.6-19.1-42.7-42.7-42.7H417.7c-23.6 0-42.7 19.1-42.7 42.7v25.8H203.9c-23.6 0-42.7 19.1-42.7 42.7v68.3c0 23.6 19.1 42.7 42.7 42.7h616.2c23.6 0 42.7-19.1 42.7-42.7V111c0-23.6-19.1-42.7-42.7-42.7zM853.9 264.7H170.1c-28.3 0-51.2 22.9-51.2 51.2v34.1c0 28.3 22.9 51.2 51.2 51.2h17.1v563.2c0 32.5 26.3 59.7 59.7 59.7h529.1c32.5 0 59.7-26.3 59.7-59.7V401.1h17.1c28.3 0 51.2-22.9 51.2-51.2v-34.1c0-28.3-22.9-51.2-51.2-51.2z"/></svg>`,t.append(n,r,i,a),de.appendChild(t)})}let ge=()=>{let e=[];return de.querySelectorAll(`.tabstop-row`).forEach(t=>{let n=Number(t.querySelector(`.tabstop-row__position`).value);if(!(n>0))return;let r=t.querySelector(`.tabstop-row__type`).value,i=t.querySelector(`.tabstop-row__leader`).value;e.push({position:Math.round(n),type:r,...i?{leader:i}:{}})}),e.sort((e,t)=>e.position-t.position)},_e=()=>{r.command.executeSetTabStops(ge())};de.addEventListener(`change`,_e),de.addEventListener(`click`,e=>{let t=e.target.closest(`.tabstop-row__delete`);t&&(t.closest(`.tabstop-row`).remove(),_e())}),W.querySelector(`[data-tabstops-clear]`).addEventListener(`click`,()=>{he([]),r.command.executeSetTabStops([])}),W.querySelector(`[data-tabstops-add]`).addEventListener(`click`,()=>{let e=ge(),t=e.length?e[e.length-1].position:0;he([...e,{position:t+64,type:oe.LEFT}])});let ve=document.querySelector(`.menu-item__list`);ve.title=`列表(${e?`⌘`:`Ctrl`}+Shift+U)`;let ye=ve.querySelector(`.options`);ve.onclick=function(){console.log(`list`),ye.classList.toggle(`visible`)},ye.onclick=function(e){let t=e.target,n=t.dataset.listType||null,i=t.dataset.listStyle;r.command.executeList(n,i)};let K=document.querySelector(`.menu-item__table`),be=document.querySelector(`.menu-item__table__collapse`),xe=document.querySelector(`.table-close`),q=document.querySelector(`.table-select`),Ce=document.querySelector(`.table-panel`),we=[];for(let e=0;e<10;e++){let e=document.createElement(`tr`);e.classList.add(`table-row`);let t=[];for(let n=0;n<10;n++){let n=document.createElement(`td`);n.classList.add(`table-cel`),e.append(n),t.push(n)}Ce.append(e),we.push(t)}let Te=0,Ee=0;function De(){we.forEach(e=>{e.forEach(e=>e.classList.remove(`active`))})}function Oe(e){q.innerText=e}function ke(){De(),Oe(`插入`),Te=0,Ee=0,be.style.display=`none`}K.onclick=function(){console.log(`table`),be.style.display=`block`},Ce.onmousemove=function(e){let{offsetX:t,offsetY:n}=e;De(),Te=Math.ceil(t/22)||1,Ee=Math.ceil(n/26)||1,we.forEach((e,t)=>{e.forEach((e,n)=>{n<Te&&t<Ee&&e.classList.add(`active`)})}),Oe(`${Ee}×${Te}`)},xe.onclick=function(){ke()},Ce.onclick=function(){r.command.executeInsertTable(Ee,Te),ke()};let Ae=document.querySelector(`.menu-item__image`),je=document.querySelector(`#image`);Ae.onclick=function(){je.click()},je.onchange=function(){let e=je.files[0],t=new FileReader;t.readAsDataURL(e),t.onload=function(){let e=new Image,n=t.result;e.src=n,e.onload=function(){r.command.executeImage({value:n,width:e.width,height:e.height}),je.value=``}}};let Me=document.querySelector(`.menu-item__hyperlink`);Me.onclick=function(){console.log(`hyperlink`),new Up({title:`超链接`,data:[{type:`text`,label:`文本`,name:`name`,required:!0,placeholder:`请输入文本`,value:r.command.getRangeText()},{type:`text`,label:`链接`,name:`url`,required:!0,placeholder:`请输入链接`}],onConfirm:e=>{let t=e.find(e=>e.name===`name`)?.value;if(!t)return;let n=e.find(e=>e.name===`url`)?.value;n&&r.command.executeHyperlink({url:n,valueList:Se(t).map(e=>({value:e,size:16}))})}})};let Ne=document.querySelector(`.menu-item__separator`),Pe=Ne.querySelector(`.options`);Ne.onclick=function(){console.log(`separator`),Pe.classList.toggle(`visible`)},Pe.onmousedown=function(e){let t=[],n=e.target.dataset.separator?.split(`,`).map(Number);n&&(n.every(e=>e===0)||(t=n)),r.command.executeSeparator(t)};let Fe=document.querySelector(`.menu-item__page-break`);Fe.onclick=function(){console.log(`pageBreak`),r.command.executePageBreak()};let Ie=document.querySelector(`.menu-item__watermark`),Le=Ie.querySelector(`.options`);Ie.onclick=function(){console.log(`watermark`),Le.classList.toggle(`visible`)},Le.onmousedown=function(e){let t=e.target.dataset.menu;Le.classList.toggle(`visible`),t===`add`?new Up({title:`水印`,data:[{type:`text`,label:`内容`,name:`data`,required:!0,placeholder:`请输入内容`},{type:`color`,label:`颜色`,name:`color`,required:!0,value:`#AEB5C0`},{type:`number`,label:`字体大小`,name:`size`,required:!0,value:`120`},{type:`number`,label:`透明度`,name:`opacity`,required:!0,value:`0.3`},{type:`select`,label:`重复`,name:`repeat`,value:`0`,required:!1,options:[{label:`不重复`,value:`0`},{label:`重复`,value:`1`}]},{type:`number`,label:`水平间隔`,name:`horizontalGap`,required:!1,value:`10`},{type:`number`,label:`垂直间隔`,name:`verticalGap`,required:!1,value:`10`}],onConfirm:e=>{if(~e.findIndex(e=>!e.value))return;let t=e.reduce((e,t)=>(e[t.name]=t.value,e),{}),n=t.repeat===`1`;r.command.executeAddWatermark({data:t.data,color:t.color,size:Number(t.size),opacity:Number(t.opacity),repeat:n,gap:n&&t.horizontalGap&&t.verticalGap?[Number(t.horizontalGap),Number(t.verticalGap)]:void 0})}}):r.command.executeDeleteWatermark()};let Re=document.querySelector(`.menu-item__codeblock`);Re.onclick=function(){console.log(`codeblock`),new Up({title:`代码块`,data:[{type:`textarea`,name:`codeblock`,placeholder:`请输入代码`,width:500,height:300}],onConfirm:e=>{let t=e.find(e=>e.name===`codeblock`)?.value;if(!t)return;let n=Gp(Hp.default.tokenize(t,Hp.default.languages.javascript)),i=[];for(let e=0;e<n.length;e++){let t=n[e],r=Se(t.content);for(let e=0;e<r.length;e++){let n={value:r[e]};t.color&&(n.color=t.color),t.bold&&(n.bold=!0),t.italic&&(n.italic=!0),i.push(n)}}i.unshift({value:`
|
|
672
|
+
`}),r.command.executeInsertElementList(i)}})};let ze=document.querySelector(`.menu-item__control`),Be=ze.querySelector(`.options`);ze.onclick=function(){console.log(`control`),Be.classList.toggle(`visible`)},Be.onmousedown=function(e){Be.classList.toggle(`visible`);let t=e.target.dataset.control;switch(t){case H.TEXT:new Up({title:`文本控件`,data:[{type:`text`,label:`占位符`,name:`placeholder`,required:!0,placeholder:`请输入占位符`},{type:`text`,label:`默认值`,name:`value`,placeholder:`请输入默认值`}],onConfirm:e=>{let n=e.find(e=>e.name===`placeholder`)?.value;if(!n)return;let i=e.find(e=>e.name===`value`)?.value||``;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,value:i?[{value:i}]:null,placeholder:n}})}});break;case H.SELECT:new Up({title:`列举控件`,data:[{type:`text`,label:`占位符`,name:`placeholder`,required:!0,placeholder:`请输入占位符`},{type:`text`,label:`默认值`,name:`code`,placeholder:`请输入默认值`},{type:`textarea`,label:`值集`,name:`valueSets`,required:!0,height:100,placeholder:`请输入值集JSON,例:
|
|
673
|
+
[{
|
|
674
|
+
"value":"有",
|
|
675
|
+
"code":"98175"
|
|
676
|
+
}]`}],onConfirm:e=>{let n=e.find(e=>e.name===`placeholder`)?.value;if(!n)return;let i=e.find(e=>e.name===`valueSets`)?.value;if(!i)return;let a=e.find(e=>e.name===`code`)?.value;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,code:a,value:null,placeholder:n,valueSets:JSON.parse(i)}})}});break;case H.CHECKBOX:new Up({title:`复选框控件`,data:[{type:`text`,label:`默认值`,name:`code`,placeholder:`请输入默认值,多个值以英文逗号分割`},{type:`textarea`,label:`值集`,name:`valueSets`,required:!0,height:100,placeholder:`请输入值集JSON,例:
|
|
677
|
+
[{
|
|
678
|
+
"value":"有",
|
|
679
|
+
"code":"98175"
|
|
680
|
+
}]`},{type:`select`,label:`样式`,name:`markType`,value:b.CHECK,required:!0,options:[{label:`对勾`,value:b.CHECK},{label:`叉`,value:b.CROSS}]}],onConfirm:e=>{let n=e.find(e=>e.name===`valueSets`)?.value;if(!n)return;let i=e.find(e=>e.name===`code`)?.value,a=e.find(e=>e.name===`markType`)?.value;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,code:i,value:null,valueSets:JSON.parse(n),markType:a}})}});break;case H.RADIO:new Up({title:`单选框控件`,data:[{type:`text`,label:`默认值`,name:`code`,placeholder:`请输入默认值`},{type:`textarea`,label:`值集`,name:`valueSets`,required:!0,height:100,placeholder:`请输入值集JSON,例:
|
|
681
|
+
[{
|
|
682
|
+
"value":"有",
|
|
683
|
+
"code":"98175"
|
|
684
|
+
}]`}],onConfirm:e=>{let n=e.find(e=>e.name===`valueSets`)?.value;if(!n)return;let i=e.find(e=>e.name===`code`)?.value;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,code:i,value:null,valueSets:JSON.parse(n)}})}});break;case H.DATE:new Up({title:`日期控件`,data:[{type:`text`,label:`占位符`,name:`placeholder`,required:!0,placeholder:`请输入占位符`},{type:`text`,label:`默认值`,name:`value`,placeholder:`请输入默认值`},{type:`select`,label:`日期格式`,name:`dateFormat`,value:`yyyy-MM-dd HH:mm:ss`,required:!0,options:[{label:`yyyy-MM-dd HH:mm:ss`,value:`yyyy-MM-dd HH:mm:ss`},{label:`yyyy-MM-dd`,value:`yyyy-MM-dd`},{label:`yyyy年MM月dd日 HH时mm分ss秒`,value:`yyyy年MM月dd日 HH时mm分ss秒`}]}],onConfirm:e=>{let n=e.find(e=>e.name===`placeholder`)?.value;if(!n)return;let i=e.find(e=>e.name===`value`)?.value||``,a=e.find(e=>e.name===`dateFormat`)?.value||``;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,dateFormat:a,value:i?[{value:i}]:null,placeholder:n}})}});break;case H.NUMBER:new Up({title:`数值控件`,data:[{type:`text`,label:`占位符`,name:`placeholder`,required:!0,placeholder:`请输入占位符`},{type:`text`,label:`默认值`,name:`value`,placeholder:`请输入默认值`}],onConfirm:e=>{let n=e.find(e=>e.name===`placeholder`)?.value;if(!n)return;let i=e.find(e=>e.name===`value`)?.value||``;r.command.executeInsertControl({type:B.CONTROL,value:``,control:{type:t,value:i?[{value:i}]:null,placeholder:n}})}})}};let Ve=document.querySelector(`.menu-item__checkbox`);Ve.onclick=function(){console.log(`checkbox`),r.command.executeInsertElementList([{type:B.CHECKBOX,checkbox:{value:!1},value:``}])};let He=document.querySelector(`.menu-item__radio`);He.onclick=function(){console.log(`radio`),r.command.executeInsertElementList([{type:B.RADIO,checkbox:{value:!1},value:``}])};let Ue=document.querySelector(`.menu-item__latex`);Ue.onclick=function(){console.log(`LaTeX`),new Up({title:`LaTeX`,data:[{type:`textarea`,height:100,name:`value`,placeholder:`请输入LaTeX文本`}],onConfirm:e=>{let t=e.find(e=>e.name===`value`)?.value;t&&r.command.executeInsertElementList([{type:B.LATEX,value:t}])}})};let We=document.querySelector(`.menu-item__date`),Ge=We.querySelector(`.options`);We.onclick=function(){console.log(`date`),Ge.classList.toggle(`visible`);let e=document.body.getBoundingClientRect(),t=Ge.getBoundingClientRect();t.left+t.width>e.width?(Ge.style.right=`0px`,Ge.style.left=`unset`):(Ge.style.right=`unset`,Ge.style.left=`0px`);let n=new Date,r=n.getFullYear().toString(),i=(n.getMonth()+1).toString().padStart(2,`0`),a=n.getDate().toString().padStart(2,`0`),o=n.getHours().toString().padStart(2,`0`),s=n.getMinutes().toString().padStart(2,`0`),c=n.getSeconds().toString().padStart(2,`0`),l=`${r}-${i}-${a}`,u=`${l} ${o}:${s}:${c}`;Ge.querySelector(`li:first-child`).innerText=l,Ge.querySelector(`li:last-child`).innerText=u},Ge.onmousedown=function(e){let t=e.target,n=t.dataset.format;Ge.classList.toggle(`visible`),r.command.executeInsertElementList([{type:B.DATE,value:``,dateFormat:n,valueList:[{value:t.innerText.trim()}]}])};let Ke=document.querySelector(`.menu-item__block`);Ke.onclick=function(){console.log(`block`),new Up({title:`内容块`,data:[{type:`select`,label:`类型`,name:`type`,value:`iframe`,required:!0,options:[{label:`网址`,value:`iframe`},{label:`视频`,value:`video`}]},{type:`number`,label:`宽度`,name:`width`,placeholder:`请输入宽度(默认页面内宽度)`},{type:`number`,label:`高度`,name:`height`,required:!0,placeholder:`请输入高度`},{type:`input`,label:`地址`,name:`src`,required:!1,placeholder:`请输入地址`},{type:`textarea`,label:`HTML`,height:100,name:`srcdoc`,required:!1,placeholder:`请输入HTML代码(仅网址类型有效)`}],onConfirm:e=>{let t=e.find(e=>e.name===`type`)?.value;if(!t)return;let n=e.find(e=>e.name===`width`)?.value,i=e.find(e=>e.name===`height`)?.value;if(!i)return;let a=e.find(e=>e.name===`src`)?.value,o=e.find(e=>e.name===`srcdoc`)?.value,s={type:t};if(s.type===un.IFRAME){if(!a&&!o)return;s.iframeBlock={src:a,srcdoc:o}}else if(s.type===un.VIDEO){if(!a)return;s.videoBlock={src:a}}let c={type:B.BLOCK,value:``,height:Number(i),block:s};n&&(c.width=Number(n)),r.command.executeInsertElementList([c])}})};let J=document.querySelector(`.menu-item__search__collapse`),qe=document.querySelector(`.menu-item__search__collapse__search input`),Je=document.querySelector(`.menu-item__search__collapse__replace input`),Ye=document.querySelector(`#option-reg`),Xe=document.querySelector(`#option-case`),Ze=document.querySelector(`#option-selection`),Qe=document.querySelector(`.menu-item__search`);Qe.title=`搜索与替换(${e?`⌘`:`Ctrl`}+F)`;let $e=J.querySelector(`.search-result`);function et(){let e=r.command.getSearchNavigateInfo();if(e){let{index:t,count:n}=e;$e.innerText=`${t}/${n}`}else $e.innerText=``}Qe.onclick=function(){console.log(`search`),J.style.display=`block`;let e=document.body.getBoundingClientRect(),t=Qe.getBoundingClientRect(),n=J.getBoundingClientRect();t.left+n.width>e.width?(J.style.right=`0px`,J.style.left=`unset`):J.style.right=`unset`,qe.focus()},J.querySelector(`span`).onclick=function(){J.style.display=`none`,qe.value=``,Je.value=``,r.command.executeSearch(null),et()};function tt(){r.command.executeSearch(qe.value||null,{isRegEnable:Ye.checked,isIgnoreCase:Xe.checked,isLimitSelection:Ze.checked}),et()}qe.oninput=tt,Ye.onchange=tt,Xe.onchange=tt,Ze.onchange=tt,qe.onkeydown=function(e){e.key===`Enter`&&tt()},J.querySelector(`button`).onclick=function(){let e=qe.value,t=Je.value;e&&e!==t&&r.command.executeReplace(t)},J.querySelector(`.arrow-left`).onclick=function(){r.command.executeSearchNavigatePre(),et()},J.querySelector(`.arrow-right`).onclick=function(){r.command.executeSearchNavigateNext(),et()};let nt=document.querySelector(`.menu-item__print`);nt.title=`打印(${e?`⌘`:`Ctrl`}+P)`,nt.onclick=function(){console.log(`print`),r.command.executePrint()};let rt=document.querySelector(`.editor-option`);rt.onclick=function(){let e=r.command.getOptions();new Up({title:`编辑器配置`,data:[{type:`textarea`,name:`option`,width:350,height:300,required:!0,value:JSON.stringify(e,null,2),placeholder:`请输入编辑器配置`}],onConfirm:e=>{let t=e.find(e=>e.name===`option`)?.value;if(!t)return;let n=JSON.parse(t);r.command.executeUpdateOptions(n)}})};async function it(){let e=await r.command.getCatalog(),t=document.querySelector(`.catalog__main`);if(t.innerHTML=``,e){let n=(e,t)=>{for(let i=0;i<t.length;i++){let a=t[i],o=document.createElement(`div`);o.classList.add(`catalog-item`);let s=document.createElement(`div`);s.classList.add(`catalog-item__content`);let c=document.createElement(`span`);c.innerText=a.name,s.append(c),s.onclick=()=>{r.command.executeLocationCatalog(a.id)},o.append(s),a.subCatalog&&a.subCatalog.length&&n(o,a.subCatalog),e.append(o)}};n(t,e)}}let at=!0,ot=document.querySelector(`.catalog`),st=document.querySelector(`.catalog-mode`),Y=document.querySelector(`.catalog__header__close`),ct=()=>{at=!at,at?(ot.style.display=`block`,it()):ot.style.display=`none`};st.onclick=ct,Y.onclick=ct;let lt=document.querySelector(`.page-mode`),ut=lt.querySelector(`.options`);lt.onclick=function(){ut.classList.toggle(`visible`)},ut.onclick=function(e){let t=e.target;r.command.executePageMode(t.dataset.pageMode)},document.querySelector(`.page-scale-percentage`).onclick=function(){console.log(`page-scale-recovery`),r.command.executePageScaleRecovery()},document.querySelector(`.page-scale-minus`).onclick=function(){console.log(`page-scale-minus`),r.command.executePageScaleMinus()},document.querySelector(`.page-scale-add`).onclick=function(){console.log(`page-scale-add`),r.command.executePageScaleAdd()};let dt=document.querySelector(`.paper-size`),ft=dt.querySelector(`.options`);dt.onclick=function(){ft.classList.toggle(`visible`)},ft.onclick=function(e){let t=e.target,[n,i]=t.dataset.paperSize.split(`*`).map(Number);r.command.executePaperSize(n,i),ft.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`)};let pt=document.querySelector(`.paper-direction`),mt=pt.querySelector(`.options`);pt.onclick=function(){mt.classList.toggle(`visible`)},mt.onclick=function(e){let t=e.target;if(t.tagName!==`LI`||t.classList.contains(`option-caption`))return;let{paperDirection:n,sectionDirection:i}=t.dataset;i?r.command.executePageDirection(i===`inherit`?null:i):n&&r.command.executePaperDirection(n),mt.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`)};let ht=document.querySelector(`.paper-margin`);ht.onclick=function(){let[e,t,n,i]=r.command.getPaperMargin();new Up({title:`页边距`,data:[{type:`text`,label:`上边距`,name:`top`,required:!0,value:`${e}`,placeholder:`请输入上边距`},{type:`text`,label:`下边距`,name:`bottom`,required:!0,value:`${n}`,placeholder:`请输入下边距`},{type:`text`,label:`左边距`,name:`left`,required:!0,value:`${i}`,placeholder:`请输入左边距`},{type:`text`,label:`右边距`,name:`right`,required:!0,value:`${t}`,placeholder:`请输入右边距`}],onConfirm:e=>{let t=e.find(e=>e.name===`top`)?.value;if(!t)return;let n=e.find(e=>e.name===`bottom`)?.value;if(!n)return;let i=e.find(e=>e.name===`left`)?.value;if(!i)return;let a=e.find(e=>e.name===`right`)?.value;a&&r.command.executeSetPaperMargin([Number(t),Number(a),Number(n),Number(i)])}})};let gt=document.querySelector(`.column-config`);gt.onclick=function(){let e=r.command.getColumns(),t=e?.count??1,n=e?.gap??20,i=e?.separator?`true`:`false`;new Up({title:`分栏`,data:[{type:`select`,label:`栏数`,name:`count`,required:!0,value:`${t}`,options:[{value:`1`,label:`1(关闭)`},{value:`2`,label:`2`},{value:`3`,label:`3`},{value:`4`,label:`4`},{value:`5`,label:`5`}]},{type:`text`,label:`栏间距`,name:`gap`,required:!0,value:`${n}`,placeholder:`请输入栏间距(像素)`},{type:`select`,label:`分隔线`,name:`separator`,required:!0,value:i,options:[{value:`false`,label:`不显示`},{value:`true`,label:`显示`}]}],onConfirm:e=>{let t=e.find(e=>e.name===`count`)?.value;if(!t)return;let n=e.find(e=>e.name===`gap`)?.value;if(!n)return;let i=e.find(e=>e.name===`separator`)?.value;i&&r.command.executeSetColumns({count:Number(t),gap:Number(n),separator:i===`true`})}})};let _t=document.querySelector(`.ruler-toggle`);_t.onclick=function(){r.command.executeToggleRuler()};let vt=document.querySelector(`.backend-switch`),yt=vt.querySelector(`.options`),bt=vt.querySelectorAll(`[data-backend]`),xt=()=>{let e=r.command.getOptions().backend;vt.title=`渲染后端:${e===R.SVG?`SVG`:`Canvas`}`,bt.forEach(t=>{t.classList.toggle(`active`,t.dataset.backend===e)})};xt(),vt.querySelector(`i`).onclick=()=>{yt.classList.toggle(`visible`)},bt.forEach(e=>{e.onclick=()=>{r.command.executeSetBackend(e.dataset.backend),xt(),yt.classList.remove(`visible`)}});let St=document.querySelector(`.fullscreen`);St.onclick=Ct,window.addEventListener(`keydown`,e=>{e.key===`F11`&&(Ct(),e.preventDefault())}),document.addEventListener(`fullscreenchange`,()=>{St.classList.toggle(`exist`)});function Ct(){console.log(`fullscreen`),document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}let wt=[{mode:M.EDIT,name:`编辑模式`},{mode:M.CLEAN,name:`清洁模式`},{mode:M.READONLY,name:`只读模式`},{mode:M.FORM,name:`表单模式`},{mode:M.PRINT,name:`打印模式`},{mode:M.DESIGN,name:`设计模式`},{mode:M.GRAFFITI,name:`涂鸦模式`},{mode:M.TRACE,name:`留痕模式`}],Tt=document.querySelector(`.editor-mode`),Et=Tt.querySelector(`.options`),Dt=Tt.querySelector(`.text`),Ot=wt.reduce((e,t)=>(e[t.mode]=t.name,e),{}),kt=r.command.getOptions().mode;Dt.innerText=Ot[kt]||Ot[M.EDIT],Et.querySelectorAll(`li`).forEach(e=>{e.classList.toggle(`active`,e.dataset.mode===kt)});let At=document.querySelector(`.trace-toggle__input`);At.checked=!r.command.getOptions().trace?.disabled,At.disabled=kt===M.TRACE,At.onchange=function(){r.command.executeToggleTrace(At.checked)};let jt=e=>{Dt.innerText=Ot[e],r.command.executeMode(e),Et.querySelectorAll(`li`).forEach(t=>{t.classList.toggle(`active`,t.dataset.mode===e)});let t=e===M.READONLY||e===M.TRACE,n=[`search`,`print`];document.querySelectorAll(`.menu-item>div`).forEach(e=>{let r=e.dataset.menu;t&&(!r||!n.includes(r))?e.classList.add(`disable`):e.classList.remove(`disable`)}),At.disabled=e===M.TRACE};Tt.onclick=function(e){e.target.tagName!==`LI`&&Et.classList.toggle(`visible`)},Et.onclick=function(e){let t=e.target;if(t.closest(`.trace-toggle`))return;let n=t.closest(`li`);if(!n)return;let r=n.dataset.mode;Ot[r]&&(jt(r),Et.classList.remove(`visible`))};let Mt=document.querySelector(`.comment`);async function Nt(){let e=await r.command.getGroupIds();for(let t of Bp){let n=Mt.querySelector(`.comment-item[data-id='${t.id}']`);if(e.includes(t.id)){if(!n){let e=document.createElement(`div`);e.classList.add(`comment-item`),e.setAttribute(`data-id`,t.id),e.onclick=()=>{r.command.executeLocationGroup(t.id)},Mt.append(e);let n=document.createElement(`div`);n.classList.add(`comment-item__title`),n.append(document.createElement(`span`));let i=document.createElement(`span`);i.innerText=t.rangeText,n.append(i);let a=document.createElement(`i`);a.onclick=()=>{r.command.executeDeleteGroup(t.id)},n.append(a),e.append(n);let o=document.createElement(`div`);o.classList.add(`comment-item__info`);let s=document.createElement(`span`);s.innerText=t.userName;let c=document.createElement(`span`);c.innerText=t.createdDate,o.append(s),o.append(c),e.append(o);let l=document.createElement(`div`);l.classList.add(`comment-item__content`),l.innerText=t.content,e.append(l),Mt.append(e)}}else n?.remove()}Bp.map(e=>{let t=Mt.querySelector(`.comment-item[data-id='${e.id}']`),n=r.command.getGroupRectList(e.id);return t&&n?.length?{commentItemDom:t,anchor:n[0]}:null}).filter(e=>!!e).sort((e,t)=>e.anchor.y-t.anchor.y||e.anchor.x-t.anchor.x).forEach(e=>Mt.append(e.commentItemDom)),Lt()}let Pt=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);Pt.classList.add(`comment-line`),document.body.append(Pt);let Ft=!1,It=document.querySelector(`#comment-line-switch`);It.onchange=()=>{Ft=It.checked,Lt()};function Lt(){for(;Pt.firstChild;)Pt.firstChild.remove();if(!Ft)return;let e=t.querySelector(`.ce-page-container`);if(!e)return;let n=e.getBoundingClientRect();for(let e of Bp){let t=Mt.querySelector(`.comment-item[data-id='${e.id}']`);if(!t)continue;let i=r.command.getGroupRectList(e.id);if(!i?.length)continue;let a=i[0],o=n.left+a.x+a.width,s=n.top+a.y+a.height/2,c=t.getBoundingClientRect(),l=c.left,u=c.top+c.height/2,d=Math.max((l-o)/2,0),f=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);f.setAttribute(`d`,`M ${o} ${s} C ${o+d} ${s}, ${l-d} ${u}, ${l} ${u}`),t.classList.contains(`active`)&&f.classList.add(`active`),Pt.append(f)}}let Rt=0;function zt(){cancelAnimationFrame(Rt),Rt=requestAnimationFrame(Lt)}window.addEventListener(`scroll`,zt,!0),window.addEventListener(`resize`,zt),r.listener.rangeStyleChange=function(e){if(e.type===B.SUBSCRIPT?w.classList.add(`active`):w.classList.remove(`active`),e.type===B.SUPERSCRIPT?C.classList.add(`active`):C.classList.remove(`active`),e.type===B.SEPARATOR?Ne.classList.add(`active`):Ne.classList.remove(`active`),Pe.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),e.type===B.SEPARATOR){let t=e.dashArray.join(`,`)||`0,0`,n=Pe.querySelector(`[data-separator='${t}']`);n&&n.classList.add(`active`)}d.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`));let t=d.querySelector(`[data-family='${e.font}']`);t&&(u.innerText=t.innerText,u.style.fontFamily=e.font,t.classList.add(`active`)),m.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`));let n=m.querySelector(`[data-size='${e.size}']`);n?(p.innerText=n.innerText,n.classList.add(`active`)):p.innerText=`${e.size}`,e.bold?_.classList.add(`active`):_.classList.remove(`active`),e.italic?v.classList.add(`active`):v.classList.remove(`active`),e.underline?y.classList.add(`active`):y.classList.remove(`active`),e.strikeout?S.classList.add(`active`):S.classList.remove(`active`),e.color?(E.classList.add(`active`),T.value=e.color,D.style.backgroundColor=e.color):(E.classList.remove(`active`),T.value=`#000000`,D.style.backgroundColor=`#000000`),e.highlight?(A.classList.add(`active`),k.value=e.highlight,j.style.backgroundColor=e.highlight):(A.classList.remove(`active`),k.value=`#ffff00`,j.style.backgroundColor=`#ffff00`),L.classList.remove(`active`),z.classList.remove(`active`),ee.classList.remove(`active`),te.classList.remove(`active`),V.classList.remove(`active`),e.rowFlex&&e.rowFlex===`right`?ee.classList.add(`active`):e.rowFlex&&e.rowFlex===`center`?z.classList.add(`active`):e.rowFlex&&e.rowFlex===`alignment`?te.classList.add(`active`):e.rowFlex&&e.rowFlex===`justify`?V.classList.add(`active`):L.classList.add(`active`),re.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),re.querySelector(`[data-rowmargin='${e.rowMargin}']`).classList.add(`active`),document.activeElement!==G&&(G.value=`${e.spacingBefore??0}`),document.activeElement!==se&&(se.value=`${e.spacingAfter??0}`);let s=(e,t)=>{let n=ue[e];n&&document.activeElement!==n&&(n.value=`${t}`)};if(s(`indentleft`,e.indentLeft??0),s(`indentright`,e.indentRight??0),s(`indentfirstline`,e.indentFirstLine??0),fe=e.tabStops||[],W.classList.contains(`visible`)&&!de.contains(document.activeElement)&&he(fe),e.undo?i.classList.remove(`no-allow`):i.classList.add(`no-allow`),e.redo?a.classList.remove(`no-allow`):a.classList.add(`no-allow`),e.painter?o.classList.add(`active`):o.classList.remove(`active`),I.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),e.level){let t=I.querySelector(`[data-level='${e.level}']`);F.innerText=t.innerText,t.classList.add(`active`)}else F.innerText=`正文`,I.querySelector(`li:first-child`).classList.add(`active`);if(ye.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),e.listType){ve.classList.add(`active`);let t=e.listType,n=e.listType===qt.OL?Yt.DECIMAL:e.listType,r=ye.querySelector(`[data-list-type='${t}'][data-list-style='${n}']`);r&&r.classList.add(`active`)}else ve.classList.remove(`active`);if(Mt.querySelectorAll(`.comment-item`).forEach(e=>{e.classList.remove(`active`)}),e.groupIds){let[t]=e.groupIds,n=Mt.querySelector(`.comment-item[data-id='${t}']`);n&&(n.classList.add(`active`),Jp(Mt,n))}zt();let c=r.command.getRangeContext();c&&(document.querySelector(`.row-no`).innerText=`${c.startRowNo+1}`,document.querySelector(`.col-no`).innerText=`${c.startColNo+1}`)},r.listener.visiblePageNoListChange=function(e){let t=e.map(e=>e+1).join(`、`);document.querySelector(`.page-no-list`).innerText=t},r.listener.pageSizeChange=function(e){document.querySelector(`.page-size`).innerText=`${e}`},r.listener.intersectionPageNoChange=function(e){document.querySelector(`.page-no`).innerText=`${e+1}`},r.listener.pageScaleChange=function(e){document.querySelector(`.page-scale-percentage`).innerText=`${Math.floor(e*10*10)}%`,zt()},r.listener.controlChange=function(e){[`table`,`hyperlink`,`separator`,`page-break`,`control`].forEach(t=>{let n=document.querySelector(`.menu-item__${t}`);e.state===ae.ACTIVE?n.classList.add(`disable`):n.classList.remove(`disable`)})},r.listener.pageModeChange=function(e){let t=ut.querySelector(`[data-page-mode='${e}']`);ut.querySelectorAll(`li`).forEach(e=>e.classList.remove(`active`)),t.classList.add(`active`)};let Bt=async function(){let e=await r.command.getWordCount();document.querySelector(`.word-count`).innerText=`${e||0}`,at&&Yp(()=>{it()}),Yp(()=>{Nt()})};r.listener.contentChange=qp(Bt,200),Bt(),r.listener.saved=function(e){console.log(`elementList: `,e)};let Vt=`canvas-editor:macros`,Ht=localStorage.getItem(Vt);Ht&&r.macro.importMacros(Ht),r.register.contextMenuList([{name:`批注`,when:e=>!e.isReadonly&&e.editorHasSelection&&e.zone===N.MAIN,callback:e=>{new Up({title:`批注`,data:[{type:`textarea`,label:`批注`,height:100,name:`value`,required:!0,placeholder:`请输入批注`}],onConfirm:t=>{let n=t.find(e=>e.name===`value`)?.value;if(!n)return;let r=e.executeSetGroup();r&&Bp.push({id:r,content:n,userName:`Hufe`,rangeText:e.getRangeText(),createdDate:new Date().toLocaleString()})}})}},{name:`新增题注`,icon:`caption`,when:e=>!e.isReadonly&&e.startElement?.type===B.IMAGE&&!e.startElement?.imgCaption,callback:e=>{new Up({title:`新增题注`,data:[{type:`text`,label:`题注内容`,name:`value`,required:!0,placeholder:`请输入题注内容,使用{imageNo}表示图片序号`}],onConfirm:t=>{let n=t.find(e=>e.name===`value`)?.value;n&&e.executeSetImageCaption({value:n})}})}},{name:`修改题注`,icon:`caption`,when:e=>!e.isReadonly&&e.startElement?.type===B.IMAGE&&!!e.startElement?.imgCaption,callback:(e,t)=>{let n=t.startElement?.imgCaption;new Up({title:`修改题注`,data:[{type:`text`,label:`题注内容`,name:`value`,required:!0,value:n?.value,placeholder:`请输入题注内容,使用{imageNo}表示图片序号`}],onConfirm:t=>{let r=t.find(e=>e.name===`value`)?.value;e.executeSetImageCaption({...n,value:r||``})}})}},{name:`签名`,icon:`signature`,when:e=>!e.isReadonly&&e.editorTextFocus,callback:e=>{new Kp({onConfirm(t){if(!t)return;let{value:n,width:r,height:i}=t;n&&r&&i&&e.executeInsertElementList([{value:n,width:r,height:i,type:B.IMAGE}])}})}},{name:`格式整理`,icon:`word-tool`,when:e=>!e.isReadonly,callback:e=>{e.executeWordTool()}},{name:`清空涂鸦信息`,when:e=>e.options.mode===M.GRAFFITI,callback:e=>{e.executeClearGraffiti()}},{name:`宏`,when:e=>!e.isReadonly,childMenus:[{name:`录制宏`,icon:`record`,when:()=>!r.macro.isRecording(),callback:()=>{r.macro.startRecording()}},{name:`停止录制宏`,icon:`stop`,when:()=>r.macro.isRecording(),callback:()=>{new Up({title:`保存宏`,data:[{type:`text`,label:`宏名称`,name:`name`,required:!0,placeholder:`请输入宏名称`}],onConfirm:e=>{let t=e.find(e=>e.name===`name`)?.value;t&&r.macro.stopRecording(t)&&localStorage.setItem(Vt,r.macro.exportMacros())},onCancel:()=>{r.macro.cancelRecording()}})}},{name:`回放宏`,when:()=>!r.macro.isRecording()&&r.macro.getMacros().length>0,callback:()=>{new Up({title:`回放宏`,data:[{type:`select`,label:`选择宏`,name:`macroId`,required:!0,options:r.macro.getMacros().map(e=>({label:`${e.name} (${e.type})`,value:e.id}))}],onConfirm:async e=>{let t=e.find(e=>e.name===`macroId`)?.value;t&&await r.macro.play(t)}})}},{name:`管理宏`,when:()=>!r.macro.isRecording()&&r.macro.getMacros().length>0,callback:()=>{new Up({title:`管理宏`,data:[{type:`select`,label:`选择要删除的宏`,name:`macroId`,options:r.macro.getMacros().map(e=>({label:`${e.name} (${e.type})`,value:e.id}))}],onConfirm:e=>{let t=e.find(e=>e.name===`macroId`)?.value;t&&r.macro.removeMacro(t)&&localStorage.setItem(Vt,r.macro.exportMacros())}})}}]}]),r.register.shortcutList([{key:Z.P,mod:!0,isGlobal:!0,callback:e=>{e.executePrint()}},{key:Z.F,mod:!0,isGlobal:!0,callback:e=>{let t=e.getRangeText();Qe.click(),t&&(qe.value=t,r.command.executeSearch(t),et())}},{key:Z.MINUS,ctrl:!0,isGlobal:!0,callback:e=>{e.executePageScaleMinus()}},{key:Z.EQUAL,ctrl:!0,isGlobal:!0,callback:e=>{e.executePageScaleAdd()}},{key:Z.ZERO,ctrl:!0,isGlobal:!0,callback:e=>{e.executePageScaleRecovery()}}])},Dp();var $=null,Xp=null,Zp=null,Qp=new Promise(e=>{Zp=e}),$p=new Map;function em(e,...t){let n=$p.get(e);n&&n.forEach(n=>{try{n(...t)}catch(t){console.error(`[canvas-full] Event handler error (${e}):`,t)}})}var tm=/<div class="spellcheck"[^>]*>[\s\S]*?<\/div>\s*(?=<div class="fullscreen")/;function nm(e){let t=new DOMParser().parseFromString(Ap,`text/html`).querySelector(`#app`);if(!t)throw Error(`[canvas-full] demo HTML 缺少 #app 容器`);let n=t.innerHTML,r=n;if(n=n.replace(tm,``),n===r)throw Error(`[canvas-full] HTML 未找到拼写检查块(上游同步漂移)`);e.innerHTML=n,e.className=`canvas-full-host`}function rm(){let e=window.onload;if(typeof e!=`function`)throw Error(`[canvas-full] window.onload 不是函数(上游同步漂移)`);window.onload=null,e();let t=window.editor??window.__CANVAS_EDITOR_INSTANCE__;if(!t)throw Error(`[canvas-full] 启动后未找到 editor 实例`);return t}function im(e,t={}){return new Promise((n,r)=>{try{if($&&am(),Xp=e,nm(e),$=rm(),$.listener){let e=$.listener.rangeStyleChange;$.listener.rangeStyleChange=t=>{em(`range-style`,t),e&&e.call($.listener,t)}}$.command&&$.command.setInterceptor&&$.command.setInterceptor((e,...t)=>(em(`command`,{command:e,args:t}),em(`change`),!0));let r=t.viewDoc||t.data;if(r){let{data:e,editorOptions:n}=Op(r);if(n||t.editorOptions){let e=$.command.getOptions();$.command.executeUpdateOptions({...e,...n,...t.editorOptions})}$.command.executeSetValue(e)}t.mode&&$.command.executeMode(t.mode),setTimeout(()=>{em(`ready`),Zp&&Zp(),n()},0)}catch(e){r(e)}})}function am(){if($){try{$.destroy&&$.destroy()}catch(e){console.warn(`[canvas-full] destroy() error:`,e)}$=null}Xp&&=(Xp.innerHTML=``,Xp.className=``,null),window.editor=null,window.__CANVAS_EDITOR_INSTANCE__=null,em(`unmount`)}function om(){return $!==null&&Xp!==null}function sm(){if(!$)return`Canvas 文档编辑器(未挂载)`;try{let e=$.command.getWordCount?.()??0;return`Canvas 文档编辑器(${$.command.getOptions?.()?.mode??`edit`} 模式,${e} 字)`}catch{return`Canvas 文档编辑器(已挂载)`}}function cm(e){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);let{data:t,editorOptions:n}=Op(e);if(n){let e=$.command.getOptions();$.command.executeUpdateOptions({...e,...n})}$.command.executeSetValue(t),em(`change`)}function lm(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);return{data:$.command.getValue().data,options:$.command.getOptions()}}function um(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);return $.command.getText?.()??``}function dm(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);return $.command.getHTML?.()??``}function fm(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);return $.command.getWordCount?.()??0}function pm(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);return $.command.getCatalog?.()??[]}function mm(e,...t){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);let n=$.command,r=`execute${e.charAt(0).toUpperCase()}${e.slice(1)}`;if(typeof n[r]==`function`){let i=n[r](...t);return em(`command`,{command:e,args:t}),em(`change`),i}let i=`get${e.charAt(0).toUpperCase()}${e.slice(1)}`;if(typeof n[i]==`function`)return n[i](...t);if(typeof n[e]==`function`)return n[e](...t);throw Error(`[canvas-full] 未知命令: ${e}`)}function hm(){return mm(`undo`)}function gm(){return mm(`redo`)}function _m(){return $?$.command.canUndo?.()??!1:!1}function vm(){return $?$.command.canRedo?.()??!1:!1}function ym(e){return mm(`mode`,e)}function bm(e){return mm(`pageMode`,e)}function xm(e){return mm(`pageScale`,e)}function Sm(){if(!$)throw Error(`[canvas-full] 编辑器未挂载`);let e=$.command.getOptions()?.mode;try{$.command.executeMode(M.PRINT),setTimeout(()=>{try{window.print()}catch(e){console.warn(`[canvas-full] print() error:`,e)}finally{e&&$.command.executeMode(e)}},100)}catch(e){console.error(`[canvas-full] 切换打印模式失败:`,e)}}function Cm(e,t){$p.has(e)||$p.set(e,new Set),$p.get(e).add(t)}function wm(e,t){let n=$p.get(e);n&&n.delete(t)}function Tm(){return`Canvas 文档编辑器(完整版)API:
|
|
685
|
+
|
|
686
|
+
生命周期:
|
|
687
|
+
mount(target, options?) → Promise<void> 挂载编辑器
|
|
688
|
+
unmount() 卸载编辑器
|
|
689
|
+
isMounted() → boolean 是否已挂载
|
|
690
|
+
describe() → string 描述信息
|
|
691
|
+
|
|
692
|
+
数据操作:
|
|
693
|
+
load(data) 加载文档(三形兼容)
|
|
694
|
+
dump() → {data, options} 导出文档
|
|
695
|
+
getText() → string 纯文本
|
|
696
|
+
getHTML() → string HTML
|
|
697
|
+
getWordCount() → number 字数统计
|
|
698
|
+
getCatalog() → any[] 目录
|
|
699
|
+
|
|
700
|
+
命令:
|
|
701
|
+
exec(name, ...args) → any 执行命令(透传)
|
|
702
|
+
undo() / redo() 撤销/重做
|
|
703
|
+
canUndo() / canRedo() → boolean 是否可撤销/重做
|
|
704
|
+
|
|
705
|
+
模式:
|
|
706
|
+
setMode(mode) 设置编辑模式
|
|
707
|
+
setPageMode(mode) 设置页面模式
|
|
708
|
+
setPageScale(scale) 设置缩放
|
|
709
|
+
print() 打印
|
|
710
|
+
|
|
711
|
+
事件:
|
|
712
|
+
on(type, handler) 订阅事件
|
|
713
|
+
off(type, handler) 取消订阅
|
|
714
|
+
类型: ready / change / saved / command / range-style / unmount
|
|
715
|
+
|
|
716
|
+
其他:
|
|
717
|
+
version 版本号
|
|
718
|
+
ready → Promise<void> 就绪 Promise
|
|
719
|
+
help() 显示此帮助`}var Em={version:`1.0.0`,ready:Qp,mount:im,unmount:am,isMounted:om,describe:sm,load:cm,dump:lm,getText:um,getHTML:dm,getWordCount:fm,getCatalog:pm,exec:mm,undo:hm,redo:gm,canUndo:_m,canRedo:vm,setMode:ym,setPageMode:bm,setPageScale:xm,print:Sm,on:Cm,off:wm,help:Tm};if(window.CanvasApp=Em,typeof window<`u`&&window.Work&&typeof window.Work.register==`function`)window.Work.register({mount(e){Em.mount(e.stage,{viewDoc:typeof e.viewDoc==`string`?e.viewDoc:void 0}).then(()=>{typeof e.ready==`function`&&e.ready()}).catch(t=>{console.error(`[canvas-full-editor] mount failed:`,t),e.stage&&(e.stage.innerHTML=`<div style="padding:24px;font:14px/1.6 system-ui;color:#b3261e">Canvas 文档编辑器装载失败,请刷新重试。</div>`),typeof e.ready==`function`&&e.ready()})},destroy(){Em.unmount()}});else{let e=()=>{if(Em.isMounted())return;let e=document.querySelector(`#app`)||document.body;e&&Em.mount(e).catch(e=>{console.error(`[canvas-full-editor] auto mount failed:`,e)})};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):e()}})();
|