diff --git a/frontend/components.d.ts b/frontend/components.d.ts index fe6480e..fb8ce18 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -60,35 +60,18 @@ declare module 'vue' { DownModelInfo: typeof import('./src/components/ai/DownModelInfo.vue')['default'] EditFileName: typeof import('./src/components/builtin/EditFileName.vue')['default'] EditType: typeof import('./src/components/builtin/EditType.vue')['default'] - ElAside: typeof import('element-plus/es')['ElAside'] ElAvatar: typeof import('element-plus/es')['ElAvatar'] - ElBadge: typeof import('element-plus/es')['ElBadge'] ElButton: typeof import('element-plus/es')['ElButton'] ElCard: typeof import('element-plus/es')['ElCard'] ElCarousel: typeof import('element-plus/es')['ElCarousel'] ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem'] - ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] - ElCol: typeof import('element-plus/es')['ElCol'] ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] - ElContainer: typeof import('element-plus/es')['ElContainer'] ElDialog: typeof import('element-plus/es')['ElDialog'] - ElDrawer: typeof import('element-plus/es')['ElDrawer'] - ElDropdown: typeof import('element-plus/es')['ElDropdown'] - ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] - ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] - ElEmpty: typeof import('element-plus/es')['ElEmpty'] - ElFooter: typeof import('element-plus/es')['ElFooter'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] - ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] - ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] - ElMain: typeof import('element-plus/es')['ElMain'] - ElMenu: typeof import('element-plus/es')['ElMenu'] - ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] - ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElProgress: typeof import('element-plus/es')['ElProgress'] @@ -96,17 +79,10 @@ declare module 'vue' { ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] ElSlider: typeof import('element-plus/es')['ElSlider'] - ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] - ElTable: typeof import('element-plus/es')['ElTable'] - ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] - ElText: typeof import('element-plus/es')['ElText'] - ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTransfer: typeof import('element-plus/es')['ElTransfer'] - ElTree: typeof import('element-plus/es')['ElTree'] Error: typeof import('./src/components/taskbar/Error.vue')['default'] FileIcon: typeof import('./src/components/builtin/FileIcon.vue')['default'] FileIconImg: typeof import('./src/components/builtin/FileIconImg.vue')['default'] diff --git a/frontend/public/docx/assets/ai-edit.48ceb865.svg b/frontend/public/docx/assets/ai-edit.48ceb865.svg new file mode 100644 index 0000000..286f4db --- /dev/null +++ b/frontend/public/docx/assets/ai-edit.48ceb865.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/docx/assets/ai-edit.8119651f.svg b/frontend/public/docx/assets/ai-edit.8119651f.svg new file mode 100644 index 0000000..d3e202b --- /dev/null +++ b/frontend/public/docx/assets/ai-edit.8119651f.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/docx/assets/article.3b97a2e3.svg b/frontend/public/docx/assets/article.3b97a2e3.svg new file mode 100644 index 0000000..5a9b23b --- /dev/null +++ b/frontend/public/docx/assets/article.3b97a2e3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/docx/assets/index.5f048ec4.js b/frontend/public/docx/assets/index.5f048ec4.js new file mode 100644 index 0000000..ec00fe9 --- /dev/null +++ b/frontend/public/docx/assets/index.5f048ec4.js @@ -0,0 +1,141 @@ +var Hs=Object.defineProperty,ys=Object.defineProperties;var Gs=Object.getOwnPropertyDescriptors;var bn=Object.getOwnPropertySymbols;var vs=Object.prototype.hasOwnProperty,Js=Object.prototype.propertyIsEnumerable;var bi=(s,t,e)=>t in s?Hs(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,b=(s,t)=>{for(var e in t||(t={}))vs.call(t,e)&&bi(s,e,t[e]);if(bn)for(var e of bn(t))Js.call(t,e)&&bi(s,e,t[e]);return s},tt=(s,t)=>ys(s,Gs(t));var h=(s,t,e)=>(bi(s,typeof t!="symbol"?t+"":t,e),e);import{J as As,E as xn,B as Bs,a as ks,P as _s,b as zs,H as xe,F as $s,c as qs,d as js,e as Cn,f as xi,T as Oi,g as to,h as eo,i as io,W as no,I as so,j as oo,k as ro,M as lo,C as ao,l as wn,_ as Ro,p as Hn}from"./vendor.d13e5cc9.js";const co=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function e(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerpolicy&&(r.referrerPolicy=n.referrerpolicy),n.crossorigin==="use-credentials"?r.credentials="include":n.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=e(n);fetch(n.href,r)}};co();const uo=[],ho=uo,yn=[],go={margins:[100,120,100,120],watermark:{data:"",size:120},pageNumber:{format:"\u7B2C{pageNo}\u9875/\u5171{pageCount}\u9875"},placeholder:{data:"\u8BF7\u8F93\u5165\u6B63\u6587"},zone:{tipDisabled:!1},maskMargin:[60,0,30,0]};const Lo="0.9.96";var Ue;(function(s){s.HALF="half",s.ONE_THIRD="one-third",s.QUARTER="quarter"})(Ue||(Ue={}));var ei;(function(s){s.ARABIC="arabic",s.CHINESE="chinese"})(ei||(ei={}));var et;(function(s){s.INLINE="inline",s.BLOCK="block",s.SURROUND="surround",s.FLOAT_TOP="float-top",s.FLOAT_BOTTOM="float-bottom"})(et||(et={}));var ii;(function(s){s.BEFORE="before",s.AFTER="after"})(ii||(ii={}));const k="\u200B",Gn=` +`,Ci=" ",vn=" ",Oo=["\xB7","\u3001",":","\uFF1A",",","\uFF0C",".","\u3002",";","\uFF1B","?","\uFF1F","!","\uFF01"],Jn={[Ue.HALF]:1/2,[Ue.ONE_THIRD]:1/3,[Ue.QUARTER]:1/4},Mo={ENGLISH:"A-Za-z",SPANISH:"A-Za-z\xC1\xC9\xCD\xD3\xDA\xE1\xE9\xED\xF3\xFA\xD1\xF1\xDC\xFC",FRENCH:"A-Za-z\xC0\xC2\xC7\xE0\xE2\xE7\xC9\xE9\xC8\xE8\xCA\xEA\xCB\xEB\xCE\xEE\xCF\xEF\xD4\xF4\xD9\xF9\xDB\xFB\u0178\xFF",GERMAN:"A-Za-z\xC4\xE4\xD6\xF6\xDC\xFC\xDF",RUSSIAN:"\u0410-\u042F\u0430-\u044F\u0401\u0451",PORTUGUESE:"A-Za-z\xC1\xC9\xCD\xD3\xDA\xE1\xE9\xED\xF3\xFA\xC3\xD5\xE3\xF5\xC7\xE7",ITALIAN:"A-Za-z\xC0\xE0\xC8\xE8\xC9\xE9\xCC\xEC\xCD\xED\xCE\xEE\xD3\xF3\xD2\xF2\xD9\xF9",DUTCH:"A-Za-z\xC0\xE0\xC1\xE1\xC2\xE2\xC4\xE4\xC8\xE8\xC9\xE9\xCA\xEA\xCB\xEB\xCC\xEC\xCD\xED\xCE\xEE\xCF\xEF\xD3\xF3\xD2\xF2\xD4\xF4\xD6\xF6\xD9\xF9\xDB\xFB\xDC\xFC",SWEDISH:"A-Za-z\xC5\xE5\xC4\xE4\xD6\xF6",GREEK:"\u0391\u03B1\u0392\u03B2\u0393\u03B3\u0394\u03B4\u0395\u03B5\u0396\u03B6\u0397\u03B7\u0398\u03B8\u0399\u03B9\u039A\u03BA\u039B\u03BB\u039C\u03BC\u039D\u03BD\u039E\u03BE\u039F\u03BF\u03A0\u03C0\u03A1\u03C1\u03A3\u03C3\u03C2\u03A4\u03C4\u03A5\u03C5\u03A6\u03C6\u03A7\u03C7\u03A8\u03C8\u03A9\u03C9"},Po="\u65E5";var at;(function(s){s.LEFT="left",s.CENTER="center",s.RIGHT="right",s.ALIGNMENT="alignment",s.JUSTIFY="justify"})(at||(at={}));const wi=/[0-9.]/,To=/[\uD800-\uDBFF][\uDC00-\uDFFF]/,So=/[#*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\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\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,Xo=new RegExp(`${So.source}|${To.source}`,"g"),No=/[、,。?!;:……「」“”‘’*()【】〔〕〖〗〘〙〚〛《》———﹝﹞–—\\/·.,!?;:`~<>()[\]{}'"|]/,Hi=new RegExp(`^[${k} +]`);function An(s,t){let e;return function(...i){e&&window.clearTimeout(e),e=window.setTimeout(()=>{s.apply(this,i)},t)}}function Fo(s,t){let e=0,i;return function(...n){const r=Date.now();r-e>=t?(window.clearTimeout(i),s.apply(this,n),e=r):(window.clearTimeout(i),i=window.setTimeout(()=>{s.apply(this,n),e=r},t))}}function yi(s,t){if(!s||typeof s!="object")return s;let e={};return Array.isArray(s)?e=s.map(i=>yi(i,t)):Object.keys(s).forEach(i=>{if(!t.includes(i))return e[i]=yi(s[i],t)}),e}function Ot(s){if(!s||typeof s!="object")return s;let t={};return Array.isArray(s)?t=s.map(e=>Ot(e)):Object.keys(s).forEach(e=>t[e]=Ot(s[e])),t}function Gi(s){return s&&s.nodeType===1&&s.tagName.toLowerCase()==="body"}function Mi(s,t,e){if(s&&!Gi(s))for(s=e?s:s.parentNode;s;){if(!t||t(s)||Gi(s))return t&&!t(s)&&Gi(s)?null:s;s=s.parentNode}return null}function Mt(){function s(){return((1+Math.random())*65536|0).toString(16).substring(1)}return s()+s()+"-"+s()+"-"+s()+"-"+s()+"-"+s()+s()+s()}function jt(s){const t=[];if(Intl.Segmenter){const i=new Intl.Segmenter().segment(s);for(const{segment:n}of i)t.push(n)}else{const e=new Map;for(const n of s.matchAll(Xo))e.set(n.index,n[0]);let i=0;for(;i=s-1&&(e(o),i=0)};t.addEventListener("click",r)}function Pi(s){return Object.prototype.toString.call(s)==="[object Object]"}function kn(s){return Array.isArray(s)}function _n(s,t){if(Pi(s)&&Pi(t)){const e=t;for(const[i,n]of Object.entries(s))e[i]?e[i]=_n(n,e[i]):e[i]=n}else kn(s)&&kn(t)&&t.push(...s);return t}function Ti(s){setTimeout(()=>{s()},0)}function zn(s){const t=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],e=["","\u5341","\u767E","\u5343","\u4E07","\u5341","\u767E","\u5343","\u4EBF","\u5341","\u767E","\u5343","\u4E07","\u5341","\u767E","\u5343","\u4EBF"];if(!s||isNaN(s))return"\u96F6";const i=s.toString().split("");let n="";for(let r=0;rString.fromCharCode(r));return window.btoa(i.join(""))}function Io(s){let t=s.parentElement;for(;t;){const i=window.getComputedStyle(t).getPropertyValue("overflow-y");if(t.scrollHeight>t.clientHeight&&(i==="auto"||i==="scroll"))return t;t=t.parentElement}return document.documentElement}function Wo(s,t){return s.length!==t.length?!1:!s.some(e=>!t.includes(e))}function Vo(s,t){if(!Pi(s)||!Pi(t))return!1;const e=Object.keys(s),i=Object.keys(t);return e.length!==i.length?!1:!e.some(n=>t[n]!==s[n])}function Yo(s,t){const e=s.x,i=s.x+s.width,n=s.y,r=s.y+s.height,o=t.x,l=t.x+t.width,a=t.y,R=t.y+t.height;return!(e>l||iR||r + + + + + + + + `,l=new Image;return l.src=`data:image/svg+xml;base64,${mo(o)}`,l}render(t,e,i,n){const{scale:r}=this.options,o=e.width*r,l=e.height*r;if(this.imageCache.has(e.id)){const a=this.imageCache.get(e.id);t.drawImage(a,i,n,o,l)}else{const a=new Promise((R,c)=>{const u=new Image;u.setAttribute("crossOrigin","Anonymous"),u.src=e.value,u.onload=()=>{this.imageCache.set(e.id,u),R(e),e.imgDisplay===et.FLOAT_BOTTOM?this.draw.render({isCompute:!1,isSetCursor:!1,isSubmitHistory:!1}):t.drawImage(u,i,n,o,l)},u.onerror=d=>{const g=this.getFallbackImage(o,l);g.onload=()=>{t.drawImage(g,i,n,o,l),this.imageCache.set(e.id,g)},c(d)}});this.addImageObserver(a)}}}const Ni="R".charCodeAt(0);function Ce(s){return Bi[s]==null&&wo(s),Bi[s]}function wo(s){const t=Ho[s];if(t==null)return;const e=t.substring(3,5),i=1*e.charCodeAt(0)-Ni,n=1*e.charCodeAt(1)-Ni,r=t.substring(5),o=[[]];let l=1/0,a=-1/0,R=1/0,c=-1/0,u=0;for(;uf>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:" 13MWRLRX ROOUO RMUOWQXSXUWWU",861:" 11LXRLRX RLQMOWOXQ RPWTW",862:" 14KYMNWX RWNMX ROLLOKQ RULXOYQ",863:" 18I[NII[ RVI[[ RMM[[ RWMI[ RNIVI RMMWM",864:" 21I[RGRV RMJWP RWJMP RIVL\\ R[VX\\ RIV[V RL\\X\\",865:" 11G[MJSV RKPSL RG\\[\\[RG\\",866:" 14LXPLPPLPLTPTPXTXTTXTXPTPTLPL",867:" 32KYYPXNVLSKQKNLLNKQKSLVNXQYSYVXXVYT RYPWNUMSMQNPOOQOSPUQVSWUWWVYT",868:" 10KYRJKVYVRJ RRZYNKNRZ",869:" 34G]PIPGQFSFTGTI RGZHXJVKTLPLKMJOIUIWJXKXPYTZV\\X]Z RGZ]Z RQZP[Q\\S\\T[SZ",870:" 64JZRMRS RRSQ\\ RRSS\\ RQ\\S\\ RRMQJPHNG RQJNG RRMSJTHVG RSJVG RRMNKLKJM RPLLLJM RRMVKXKZM RTLXLZM RRMPNOOOR RRMPOOR RRMTNUOUR RRMTOUR",871:" 94JZRIRK RRNRP RRSRU RRYQ\\ RRYS\\ RQ\\S\\ RRGQIPJ RRGSITJ RPJRITJ RRKPNNOMN RRKTNVOWN RNOPORNTOVO RRPPSNTLTKRKSLT RRPTSVTXTYRYSXT RNTPTRSTTVT RRUPXOYMZLZKYJWJYLZ RRUTXUYWZXZYYZWZYXZ RMZOZRYUZWZ",872:" 40JZRYQ\\ RRYS\\ RQ\\S\\ RRYUZXZZXZUYTWTYRZOYMWLUMVJUHSGQGOHNJOMMLKMJOKRMTKTJUJXLZOZRY",873:" 32JZRYQ\\ RRYS\\ RQ\\S\\ RRYVXVVXUXRZQZLYIXHVHTGPGNHLHKIJLJQLRLUNVNXRY",874:" 15I[IPKR RLKNP RRGRO RXKVP R[PYR",899:" 6QSRQQRRSSRRQ",900:" 10PTQPPQPSQTSTTSTQSPQP",901:" 14NVQNOONQNSOUQVSVUUVSVQUOSNQN",902:" 18MWQMONNOMQMSNUOVQWSWUVVUWSWQVOUNSMQM",903:" 18KYQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",904:" 22G]PGMHJJHMGPGTHWJZM\\P]T]W\\ZZ\\W]T]P\\MZJWHTGPG",905:" 34AcPALBJCGEEGCJBLAPATBXCZE]G_JaLbPcTcXbZa]__]aZbXcTcPbLaJ_G]EZCXBTAPA",906:" 34fRAPCMDJDGCEA>H@JAMAZB]D_G`M`PaRc RRATCWDZD]C_AfHdJcMcZb]`_]`W`TaRc",909:" 33AcRAPCMDJDGCEABGAKAPBTDXG\\L`Rc RRATCWDZD]C_AbGcKcPbT`X]\\X`Rc RBHbH",997:" 3MWMXWX",998:" 3JZJZZZ",999:" 3JZJ]Z]",1001:" 18KYRKMX RRNVX RRKWX ROTTT RKXPX RTXYX",1002:" 35JZNKNX ROKOX RLKSKVLWNVPSQ RSKULVNUPSQ ROQSQVRWTWUVWSXLX RSQURVTVUUWSX",1003:" 24KYVLWKWOVLTKQKOLNMMPMSNVOWQXTXVWWU RQKOMNPNSOVQX",1004:" 26JZNKNX ROKOX RLKSKVLWMXPXSWVVWSXLX RSKULVMWPWSVVUWSX",1005:" 22JYNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXVXVTUX",1006:" 20JXNKNX ROKOX RSOSS RLKVKVOUK ROQSQ RLXQX",1007:" 36K[VLWKWOVLTKQKOLNMMPMSNVOWQXTXVW RQKOMNPNSOVQX RTXUWVU RVSVX RWSWX RTSYS",1008:" 27J[NKNX ROKOX RVKVX RWKWX RLKQK RTKYK ROQVQ RLXQX RTXYX",1009:" 12NWRKRX 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 RLOVO RLXQX RTXYX",1180:" 48F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX RYKZL[L[KUKSLRNRX RUKTLSNSX RZOZX R[O[X RHO[O RHXMX RPXUX RXX]X",1181:" 46F_PKQLQMRMRLPKMKKLJNJX RMKLLKNKX R[KUKSLRNRX RUKTLSNSX RYKZLZX R[K[X RHOZO RHXMX RPXUX RXX]X",1182:" 12NWRORX RSOSX RPOSO RPXUX",1184:" 21LXVPTOROPPOQNSNUOWQXSXUW RROPQOSOVQX ROSSS",1185:" 35LYSKQLPMOONRNUOWPXRXTWUVVTWQWNVLUKSK RSKQMPOOSOVPX RRXTVUTVPVMUK ROQVQ",1186:" 34KZTKQ\\ RUKP\\ RQONPMRMUNWQXTXWWXUXRWPTOQO RQOOPNRNUOWQX RTXVWWUWRVPTO",1187:" 22LXUPVRVQUPSOQOOPNRNTOVRX RQOOQOTPVRXSYS[R\\P\\",1191:" 45I[VKWLXLVKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RZK[L[KYKWLVNSYR[Q\\ RYKXLWNTYS[Q\\O\\O[P\\ RLOYO",1192:" 38IZVKWLXLXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RVOTVTWUXWXXWYU RWOUVUWVX RLOWO",1193:" 38IZVKWL RXKSKQLPMOOLYK[J\\ RSKQMPOMYL[J\\H\\H[I\\ RWKTVTWUXWXXWYU RXKUVUWVX RLOVO",1194:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L\\L\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ RZOXVXWYX[X\\W]U R[OYVYWZX RIO[O",1195:" 63F^SKTLTM RULSKPKNLMMLOIYH[G\\ RPKNMMOJYI[G\\E\\E[F\\ RZK[L R\\KWKUL RTMSOPYO[N\\ RWKUMTOQYP[N\\L\\L[M\\ R[KXVXWYX[X\\W]U R\\KYVYWZX 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\\ RU\\\\\\",1402:" 20H]KHRQJ\\ RJHQQ RJHYHZMXH RK[X[ RJ\\Y\\ZWX\\",1403:" 20KYVBTDRGPKOPOTPYR]T`Vb RTDRHQKPPPTQYR\\T`",1404:" 20KYNBPDRGTKUPUTTYR]P`Nb RPDRHSKTPTTSYR\\P`",1405:" 12KYOBOb RPBPb ROBVB RObVb",1406:" 12KYTBTb RUBUb RNBUB RNbUb",1407:" 40KYTBRCQDPFPHQJRKSMSOQQ RRCQEQGRISJTLTNSPORSTTVTXSZR[Q]Q_Ra RQSSUSWRYQZP\\P^Q`RaTb",1408:" 40KYPBRCSDTFTHSJRKQMQOSQ RRCSESGRIQJPLPNQPURQTPVPXQZR[S]S_Ra RSSQUQWRYSZT\\T^S`RaPb",1409:" 24KYU@RCPFOIOLPOSVTYT\\S_Ra RRCQEPHPKQNTUUXU[T^RaOd",1410:" 24KYO@RCTFUIULTOQVPYP\\Q_Ra RRCSETHTKSNPUOXO[P^RaUd",1411:" 13AXCRGRR` RGSRa RFSRb RX:Rb",1412:" 32F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia",2001:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2002:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2003:" 32G\\XIYLYFXIVGSFQFNGLIKKJNJSKVLXNZQ[S[VZXXYV RQFOGMILKKNKSLVMXOZQ[",2004:" 30G]LFL[ RMFM[ RIFSFVGXIYKZNZSYVXXVZS[I[ RSFUGWIXKYNYSXVWXUZS[",2005:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2006:" 20G[LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[P[",2007:" 40G^XIYLYFXIVGSFQFNGLIKKJNJSKVLXNZQ[S[VZXX RQFOGMILKKNKSLVMXOZQ[ RXSX[ RYSY[ RUS\\S",2008:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2009:" 12MXRFR[ RSFS[ ROFVF RO[V[",2010:" 20KZUFUWTZR[P[NZMXMVNUOVNW RTFTWSZR[ RQFXF",2011:" 27F\\KFK[ RLFL[ RYFLS RQOY[ RPOX[ RHFOF RUF[F RH[O[ RU[[[",2012:" 14I[NFN[ ROFO[ RKFRF RK[Z[ZUY[",2013:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2014:" 21G^LFL[ RMFYY RMHY[ RYFY[ RIFMF RVF\\F RI[O[",2015:" 44G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF",2016:" 29G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[P[",2017:" 64G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF RNYNXOVQURUTVUXV_W`Y`Z^Z] RUXV\\W^X_Y_Z^",2018:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUPMP RUFWGXHYJYLXNWOUP RI[P[ RRPTQURXYYZZZ[Y RTQUSWZX[Z[[Y[X",2019:" 34H\\XIYFYLXIVGSFPFMGKIKKLMMNOOUQWRYT RKKMMONUPWQXRYTYXWZT[Q[NZLXKUK[LX",2020:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2021:" 23F^KFKULXNZQ[S[VZXXYUYF RLFLUMXOZQ[ RHFOF RVF\\F",2022:" 15H\\KFR[ RLFRX RYFR[ RIFOF RUF[F",2023:" 24F^JFN[ RKFNV RRFN[ RRFV[ RSFVV RZFV[ RGFNF RWF]F",2024:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2025:" 20H]KFRQR[ RLFSQS[ RZFSQ RIFOF RVF\\F RO[V[",2026:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2027:" 18H\\RFK[ RRFY[ RRIX[ RMUVU RI[O[ RU[[[",2028:" 45G]LFL[ RMFM[ RIFUFXGYHZJZLYNXOUP RUFWGXHYJYLXNWOUP RMPUPXQYRZTZWYYXZU[I[ RUPWQXRYTYWXYWZU[",2029:" 14I[NFN[ ROFO[ RKFZFZLYF RK[R[",2030:" 15H\\RFJ[ RRFZ[ RRIY[ RKZYZ RJ[Z[",2031:" 22G\\LFL[ RMFM[ RSLST RIFYFYLXF RMPSP RI[Y[YUX[",2032:" 16H\\XFK[ RYFL[ RLFKLKFYF RK[Y[YUX[",2033:" 27F^KFK[ RLFL[ RXFX[ RYFY[ RHFOF RUF\\F RLPXP RH[O[ RU[\\[",2034:" 56G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF ROMOT RUMUT ROPUP ROQUQ",2035:" 12MXRFR[ RSFS[ ROFVF RO[V[",2036:" 27F\\KFK[ RLFL[ RYFLS RQOY[ RPOX[ RHFOF RUF[F RH[O[ RU[[[",2037:" 15H\\RFK[ RRFY[ RRIX[ RI[O[ RU[[[",2038:" 30F_KFK[ RLFRX RKFR[ RYFR[ RYFY[ RZFZ[ RHFLF RYF]F RH[N[ RV[][",2039:" 21G^LFL[ RMFYY RMHY[ RYFY[ RIFMF RVF\\F RI[O[",2040:" 36G]KEJJ RZEYJ RONNS RVNUS RKWJ\\ RZWY\\ RKGYG RKHYH ROPUP ROQUQ RKYYY RKZYZ",2041:" 44G]QFNGLIKKJOJRKVLXNZQ[S[VZXXYVZRZOYKXIVGSFQF RQFOGMILKKOKRLVMXOZQ[ RS[UZWXXVYRYOXKWIUGSF",2042:" 21F^KFK[ RLFL[ RXFX[ RYFY[ RHF\\F RH[O[ RU[\\[",2043:" 29G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[P[",2044:" 20H]KFRPJ[ RJFQP RJFYFZLXF RKZXZ RJ[Y[ZUX[",2045:" 16I\\RFR[ RSFS[ RLFKLKFZFZLYF RO[V[",2046:" 33I\\KKKILGMFOFPGQIRMR[ RKIMGOGQI RZKZIYGXFVFUGTISMS[ RZIXGVGTI RO[V[",2047:" 48H]RFR[ RSFS[ RPKMLLMKOKRLTMUPVUVXUYTZRZOYMXLUKPK RPKNLMMLOLRMTNUPV RUVWUXTYRYOXMWLUK ROFVF RO[V[",2048:" 21H\\KFX[ RLFY[ RYFK[ RIFOF RUF[F RI[O[ RU[[[",2049:" 41G^RFR[ RSFS[ RIMJLLMMQNSOTQU RJLKMLQMSNTQUTUWTXSYQZM[L RTUVTWSXQYM[L\\M ROFVF RO[V[",2050:" 43G]JXK[O[MWKSJPJLKIMGPFTFWGYIZLZPYSWWU[Y[ZX RMWLTKPKLLINGPF RTFVGXIYLYPXTWW RKZNZ RVZYZ",2051:" 18H\\UFH[ RUFV[ RTHU[ RLUUU RF[L[ RR[X[",2052:" 41F^OFI[ RPFJ[ RLFWFZG[I[KZNYOVP RWFYGZIZKYNXOVP RMPVPXQYSYUXXVZR[F[ RVPWQXSXUWXUZR[",2053:" 34H]ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[S[UZWXXV RTFRGPINLMOLSLVMYNZP[",2054:" 30F]OFI[ RPFJ[ RLFUFXGYHZKZOYSWWUYSZO[F[ RUFWGXHYKYOXSVWTYRZO[",2055:" 22F]OFI[ RPFJ[ RTLRT RLF[FZLZF RMPSP RF[U[WVT[",2056:" 20F\\OFI[ RPFJ[ RTLRT RLF[FZLZF RMPSP RF[M[",2057:" 42H^ZH[H\\F[L[JZHYGWFTFQGOIMLLOKSKVLYMZP[R[UZWXYT RTFRGPINLMOLSLVMYNZP[ RR[TZVXXT RUT\\T",2058:" 27E_NFH[ ROFI[ R[FU[ R\\FV[ RKFRF RXF_F RLPXP RE[L[ RR[Y[",2059:" 12LYUFO[ RVFP[ RRFYF RL[S[",2060:" 21I[XFSWRYQZO[M[KZJXJVKULVKW RWFRWQYO[ RTF[F",2061:" 27F]OFI[ RPFJ[ R]FLS RSOW[ RROV[ RLFSF RYF_F RF[M[ RS[Y[",2062:" 14H\\QFK[ RRFL[ RNFUF RH[W[YUV[",2063:" 30E`NFH[ RNFO[ ROFPY R\\FO[ R\\FV[ R]FW[ RKFOF R\\F`F RE[K[ RS[Z[",2064:" 21F_OFI[ ROFVX ROIV[ R\\FV[ RLFOF RYF_F RF[L[",2065:" 42G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF RSFQGOIMLLOKSKVLYN[ RQ[SZUXWUXRYNYKXHVF",2066:" 27F]OFI[ RPFJ[ RLFXF[G\\I\\K[NYPUQMQ RXFZG[I[KZNXPUQ RF[M[",2067:" 61G]SFPGNILLKOJSJVKYLZN[Q[TZVXXUYRZNZKYHXGVFSF RSFQGOIMLLOKSKVLYN[ RQ[SZUXWUXRYNYKXHVF RLYLXMVOUPURVSXS_T`V`W^W] RSXT^U_V_W^",2068:" 42F^OFI[ RPFJ[ RLFWFZG[I[KZNYOVPMP RWFYGZIZKYNXOVP RRPTQURVZW[Y[ZYZX RURWYXZYZZY RF[M[",2069:" 35G^ZH[H\\F[L[JZHYGVFRFOGMIMKNMONVRXT RMKOMVQWRXTXWWYVZS[O[LZKYJWJUI[JYKY",2070:" 16H]UFO[ RVFP[ ROFLLNF]F\\L\\F RL[S[",2071:" 25F_NFKQJUJXKZN[R[UZWXXU\\F ROFLQKUKXLZN[ RKFRF RYF_F",2072:" 15H\\NFO[ ROFPY R\\FO[ RLFRF RXF^F",2073:" 24E_MFK[ RNFLY RUFK[ RUFS[ RVFTY R]FS[ RJFQF RZF`F",2074:" 21G]NFU[ ROFV[ R\\FH[ RLFRF RXF^F RF[L[ RR[X[",2075:" 20H]NFRPO[ ROFSPP[ R]FSP RLFRF RYF_F RL[S[",2076:" 16G][FH[ R\\FI[ ROFLLNF\\F RH[V[XUU[",2077:" 46H\\KILKXWYYY[ RLLXX RKIKKLMXYY[ RPPLTKVKXLZK[ RKVMZ RLTLVMXMZK[ RSSXN RVIVLWNYNYLWKVI RVIWLYN",2101:" 39I]NONPMPMONNPMTMVNWOXQXXYZZ[ RWOWXXZZ[[[ RWQVRPSMTLVLXMZP[S[UZWX RPSNTMVMXNZP[",2102:" 33G\\LFL[ RMFM[ RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIFMF",2103:" 28H[WPVQWRXQXPVNTMQMNNLPKSKULXNZQ[S[VZXX RQMONMPLSLUMXOZQ[",2104:" 36H]WFW[ RXFX[ RWPUNSMQMNNLPKSKULXNZQ[S[UZWX RQMONMPLSLUMXOZQ[ RTFXF RW[[[",2105:" 31H[LSXSXQWOVNTMQMNNLPKSKULXNZQ[S[VZXX RWSWPVN RQMONMPLSLUMXOZQ[",2106:" 22KXUGTHUIVHVGUFSFQGPIP[ RSFRGQIQ[ RMMUM RM[T[",2107:" 60I\\QMONNOMQMSNUOVQWSWUVVUWSWQVOUNSMQM RONNPNTOV RUVVTVPUN RVOWNYMYNWN RNUMVLXLYM[P\\U\\X]Y^ RLYMZP[U[X\\Y^Y_XaUbObLaK_K^L\\O[",2108:" 28G]LFL[ RMFM[ RMPONRMTMWNXPX[ RTMVNWPW[ RIFMF RI[P[ RT[[[",2109:" 18MXRFQGRHSGRF RRMR[ RSMS[ ROMSM RO[V[",2110:" 25MXSFRGSHTGSF RTMT_SaQbObNaN`O_P`Oa RSMS_RaQb RPMTM",2111:" 27G\\LFL[ RMFM[ RWMMW RRSX[ RQSW[ RIFMF RTMZM RI[P[ RT[Z[",2112:" 12MXRFR[ RSFS[ ROFSF RO[V[",2113:" 44BcGMG[ RHMH[ RHPJNMMOMRNSPS[ ROMQNRPR[ RSPUNXMZM]N^P^[ RZM\\N]P][ RDMHM RD[K[ RO[V[ RZ[a[",2114:" 28G]LML[ RMMM[ RMPONRMTMWNXPX[ RTMVNWPW[ RIMMM RI[P[ RT[[[",2115:" 36H\\QMNNLPKSKULXNZQ[S[VZXXYUYSXPVNSMQM RQMONMPLSLUMXOZQ[ RS[UZWXXUXSWPUNSM",2116:" 36G\\LMLb RMMMb RMPONQMSMVNXPYSYUXXVZS[Q[OZMX RSMUNWPXSXUWXUZS[ RIMMM RIbPb",2117:" 33H\\WMWb RXMXb RWPUNSMQMNNLPKSKULXNZQ[S[UZWX RQMONMPLSLUMXOZQ[ RTb[b",2118:" 23IZNMN[ ROMO[ ROSPPRNTMWMXNXOWPVOWN RKMOM RK[R[",2119:" 32J[WOXMXQWOVNTMPMNNMOMQNRPSUUWVXW RMPNQPRUTWUXVXYWZU[Q[OZNYMWM[NY",2120:" 16KZPFPWQZS[U[WZXX RQFQWRZS[ RMMUM",2121:" 28G]LMLXMZP[R[UZWX RMMMXNZP[ RWMW[ RXMX[ RIMMM RTMXM RW[[[",2122:" 15I[LMR[ RMMRY RXMR[ RJMPM RTMZM",2123:" 24F^JMN[ RKMNX RRMN[ RRMV[ RSMVX RZMV[ RGMNM RWM]M",2124:" 21H\\LMW[ RMMX[ RXML[ RJMPM RTMZM RJ[P[ RT[Z[",2125:" 22H[LMR[ RMMRY RXMR[P_NaLbKbJaK`La RJMPM RTMZM",2126:" 16I[WML[ RXMM[ RMMLQLMXM RL[X[XWW[",2127:" 40G^QMNNLPKRJUJXKZN[P[RZUWWTYPZM RQMONMPLRKUKXLZN[ RQMSMUNVPXXYZZ[ RSMTNUPWXXZZ[[[",2128:" 57G\\TFQGOIMMLPKTJZIb RTFRGPINMMPLTKZJb RTFVFXGYHYKXMWNTOPO RVFXHXKWMVNTO RPOTPVRWTWWVYUZR[P[NZMYLV RPOSPURVTVWUYTZR[",2129:" 28H\\IPKNMMOMQNROSRSVRZOb RJOLNPNRO RZMYPXRSYP^Nb RYMXPWRSY",2130:" 44I\\VNTMRMONMQLTLWMYNZP[R[UZWWXTXQWOSJRHRFSEUEWFYH RRMPNNQMTMXNZ RR[TZVWWTWPVNTKSISGTFVFYH",2131:" 32I[XPVNTMPMNNNPPRSS RPMONOPQRSS RSSNTLVLXMZP[S[UZWX RSSOTMVMXNZP[",2132:" 31I[TFRGQHQIRJUKZKZJWKSMPOMRLULWMYP[S]T_TaSbQbPa RULQONRMUMWNYP[",2133:" 32G]HQIOKMNMONOPNTL[ RMMNNNPMTK[ RNTPPRNTMVMXNYOYRXWUb RVMXOXRWWTb",2134:" 44F]GQHOJMMMNNNPMUMXNZO[ RLMMNMPLULXMZO[Q[SZUXWUXRYMYIXGVFTFRHRJSMUPWRZT RSZUWVUWRXMXIWGVF",2135:" 15LXRMPTOXOZP[S[UYVW RSMQTPXPZQ[",2136:" 29H\\NMJ[ ROMK[ RXMYNZNYMWMUNQROSMS ROSQTSZT[ ROSPTRZS[U[WZYW",2137:" 23H\\KFMFOGPHQJWXXZY[ RMFOHPJVXWZY[Z[ RRMJ[ RRMK[",2138:" 28F]MMGb RNMHb RMPLVLYN[P[RZTXVU RXMUXUZV[Y[[Y\\W RYMVXVZW[",2139:" 24H\\NML[ ROMNSMXL[ RYMXQVU RZMYPXRVUTWQYOZL[ RKMOM",2140:" 45IZTFRGQHQIRJUKXK RUKQLOMNONQPSSTVT RUKRLPMOOOQQSST RSTOUMVLXLZN\\S^T_TaRbPb RSTPUNVMXMZO\\S^",2141:" 32I[RMONMQLTLWMYNZP[R[UZWWXTXQWOVNTMRM RRMPNNQMTMXNZ RR[TZVWWTWPVN",2142:" 22G]PNL[ RPNM[ RVNV[ RVNW[ RIPKNNM[M RIPKONN[N",2143:" 31H[LVMYNZP[R[UZWWXTXQWOVNTMRMONMQLTHb RR[TZVWWTWPVN RRMPNNQMTIb",2144:" 35H][MQMNNLQKTKWLYMZO[Q[TZVWWTWQVOUNSM RQMONMQLTLXMZ RQ[SZUWVTVPUN RUN[N",2145:" 16H\\SNP[ RSNQ[ RJPLNOMZM RJPLOONZN",2146:" 31H\\IQJOLMOMPNPPNVNYP[ RNMONOPMVMYNZP[Q[TZVXXUYRYOXMWNXOYR RXUYO",2147:" 37G]ONMOKQJTJWKYLZN[Q[TZWXYUZRZOXMVMTORSPXMb RJWLYNZQZTYWWYU RZOXNVNTPRSPYNb",2148:" 23I[KMMMONPPU_VaWb RMMNNOPT_UaWbYb RZMYOWRM]K`Jb",2149:" 34F]UFOb RVFNb RGQHOJMMMNNNPMUMXOZRZTYWVYS RLMMNMPLULXMZO[R[TZVXXUYS[M",2150:" 44F]JQLOONNMLNJQITIWJZK[M[OZQWRT RIWJYKZMZOYQW RQTQWRZS[U[WZYWZTZQYNXMWNYOZQ RQWRYSZUZWYYW",2151:" 39H]XMVTUXUZV[Y[[Y\\W RYMWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ",2152:" 36H[PFLSLVMYNZ RQFMS RMSNPPNRMTMVNWOXQXTWWUZR[P[NZMWMS RVNWPWTVWTZR[ RMFQF",2153:" 25I[WPWQXQXPWNUMRMONMQLTLWMYNZP[R[UZWW RRMPNNQMTMXNZ",2154:" 42H]ZFVTUXUZV[Y[[Y\\W R[FWTVXVZW[ RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ RWF[F",2155:" 26I[MVQUTTWRXPWNUMRMONMQLTLWMYNZP[R[UZWX RRMPNNQMTMXNZ",2156:" 35KZZGYHZI[H[GZFXFVGUHTJSMP[O_Na RXFVHUJTNRWQ[P^O`NaLbJbIaI`J_K`Ja ROMYM",2157:" 43H\\YMU[T^RaObLbJaI`I_J^K_J` RXMT[S^QaOb RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ",2158:" 31H]PFJ[ RQFK[ RMTOPQNSMUMWNXOXQVWVZW[ RUMWOWQUWUZV[Y[[Y\\W RMFQF",2159:" 26LYUFTGUHVGUF RMQNOPMSMTNTQRWRZS[ RRMSNSQQWQZR[U[WYXW",2160:" 32LYVFUGVHWGVF RNQOOQMTMUNUQR[Q^P`OaMbKbJaJ`K_L`Ka RSMTNTQQ[P^O`Mb",2161:" 34H\\PFJ[ RQFK[ RXNWOXPYOYNXMWMUNQROSMS ROSQTSZT[ ROSPTRZS[U[WZYW RMFQF",2162:" 18MYUFQTPXPZQ[T[VYWW RVFRTQXQZR[ RRFVF",2163:" 52AbBQCOEMHMINIPHTF[ RGMHNHPGTE[ RHTJPLNNMPMRNSOSQP[ RPMRORQO[ RRTTPVNXMZM\\N]O]Q[W[Z\\[ RZM\\O\\QZWZZ[[^[`YaW",2164:" 37F]GQHOJMMMNNNPMTK[ RLMMNMPLTJ[ RMTOPQNSMUMWNXOXQVWVZW[ RUMWOWQUWUZV[Y[[Y\\W",2165:" 32I[RMONMQLTLWMYNZP[R[UZWWXTXQWOVNTMRM RRMPNNQMTMXNZ RR[TZVWWTWPVN",2166:" 42G\\HQIOKMNMONOPNTJb RMMNNNPMTIb RNTOQQNSMUMWNXOYQYTXWVZS[Q[OZNWNT RWNXPXTWWUZS[ RFbMb",2167:" 33H\\XMRb RYMSb RVTVQUNSMQMNNLQKTKWLYMZO[Q[SZUWVT RQMONMQLTLXMZ RObVb",2168:" 26IZJQKOMMPMQNQPPTN[ ROMPNPPOTM[ RPTRPTNVMXMYNYOXPWOXN",2169:" 28J[XOXPYPYOXNUMRMONNONQORVVWW RNPOQVUWVWYVZS[P[MZLYLXMXMY",2170:" 18KYTFPTOXOZP[S[UYVW RUFQTPXPZQ[ RNMWM",2171:" 37F]GQHOJMMMNNNQLWLYN[ RLMMNMQKWKYLZN[P[RZTXVT RXMVTUXUZV[Y[[Y\\W RYMWTVXVZW[",2172:" 26H\\IQJOLMOMPNPQNWNYP[ RNMONOQMWMYNZP[Q[TZVXXUYQYMXMYO",2173:" 41C`DQEOGMJMKNKQIWIYK[ RIMJNJQHWHYIZK[M[OZQXRV RTMRVRYSZU[W[YZ[X\\V]R]M\\M]O RUMSVSYU[",2174:" 42H\\KQMNOMRMSOSR RQMRORRQVPXNZL[K[JZJYKXLYKZ RQVQYR[U[WZYW RYNXOYPZOZNYMXMVNTPSRRVRYS[",2175:" 41G\\HQIOKMNMONOQMWMYO[ RMMNNNQLWLYMZO[Q[SZUXWT RZMV[U^SaPbMbKaJ`J_K^L_K` RYMU[T^RaPb",2176:" 31H\\YMXOVQNWLYK[ RLQMOOMRMVO RMOONRNVOXO RLYNYRZUZWY RNYR[U[WYXW",2177:" 43G^VGUHVIWHWGUFRFOGMILLL[ RRFPGNIMLM[ R\\G[H\\I]H]G\\FZFXGWIW[ RZFYGXIX[ RIM[M RI[P[ RT[[[",2178:" 33G]WGVHWIXHWGUFRFOGMILLL[ RRFPGNIMLM[ RWMW[ RXMX[ RIMXM RI[P[ RT[[[",2179:" 35G]VGUHVIWHWGUF RXFRFOGMILLL[ RRFPGNIMLM[ RWHW[ RXFX[ RIMWM RI[P[ RT[[[",2180:" 54BcRGQHRISHRGPFMFJGHIGLG[ RMFKGIIHLH[ R]G\\H]I^H]G[FXFUGSIRLR[ RXFVGTISLS[ R]M][ R^M^[ RDM^M RD[K[ RO[V[ RZ[a[",2181:" 56BcRGQHRISHRGPFMFJGHIGLG[ RMFKGIIHLH[ R\\G[H\\I]H]G[F R^FXFUGSIRLR[ RXFVGTISLS[ R]H][ R^F^[ RDM]M RD[K[ RO[V[ RZ[a[",2182:" 12MXRMR[ RSMS[ ROMSM RO[V[",2184:" 25IZWNUMRMONMPLSLVMYNZQ[T[VZ RRMPNNPMSMVNYOZQ[ RMTUT",2185:" 43I\\TFQGOJNLMOLTLXMZO[Q[TZVWWUXRYMYIXGVFTF RTFRGPJOLNOMTMXNZO[ RQ[SZUWVUWRXMXIWGVF RNPWP",2186:" 42G]UFOb RVFNb RQMMNKPJSJVKXMZP[S[WZYXZUZRYPWNTMQM RQMNNLPKSKVLXNZP[ RS[VZXXYUYRXPVNTM",2187:" 27I[TMVNXPXOWNTMQMNNMOLQLSMUOWSZ RQMONNOMQMSNUSZT\\T^S_Q_",2190:" 45G]LMKNJPJRKUOYP[ RJRKTOXP[P]O`MbLbKaJ_J\\KXMTOQRNTMVMYNZPZTYXWZU[T[SZSXTWUXTY RVMXNYPYTXXWZ",2191:" 69E_YGXHYIZHYGWFTFQGOINKMNLRJ[I_Ha RTFRGPIOKNNLWK[J^I`HaFbDbCaC`D_E`Da R_G^H_I`H`G_F]F[GZHYJXMU[T_Sa R]F[HZJYNWWV[U^T`SaQbObNaN`O_P`Oa RIM^M",2192:" 52F^[GZH[I\\H[GXFUFRGPIOKNNMRK[J_Ia RUFSGQIPKONMWL[K^J`IaGbEbDaD`E_F`Ea RYMWTVXVZW[Z[\\Y]W RZMXTWXWZX[ RJMZM",2193:" 54F^YGXHYIZHZGXF R\\FUFRGPIOKNNMRK[J_Ia RUFSGQIPKONMWL[K^J`IaGbEbDaD`E_F`Ea R[FWTVXVZW[Z[\\Y]W R\\FXTWXWZX[ RJMYM",2194:" 86@cTGSHTIUHTGRFOFLGJIIKHNGRE[D_Ca ROFMGKIJKINGWF[E^D`CaAb?b>a>`?_@`?a R`G_H`IaH`G]FZFWGUITKSNRRP[O_Na RZFXGVIUKTNRWQ[P^O`NaLbJbIaI`J_K`Ja R^M\\T[X[Z\\[_[aYbW R_M]T\\X\\Z][ RDM_M",2195:" 88@cTGSHTIUHTGRFOFLGJIIKHNGRE[D_Ca ROFMGKIJKINGWF[E^D`CaAb?b>a>`?_@`?a R^G]H^I_H_G]F RaFZFWGUITKSNRRP[O_Na RZFXGVIUKTNRWQ[P^O`NaLbJbIaI`J_K`Ja R`F\\T[X[Z\\[_[aYbW RaF]T\\X\\Z][ RDM^M",2196:" 20LYMQNOPMSMTNTQRWRZS[ RRMSNSQQWQZR[U[WYXW",2200:" 40H\\QFNGLJKOKRLWNZQ[S[VZXWYRYOXJVGSFQF RQFOGNHMJLOLRMWNYOZQ[ RS[UZVYWWXRXOWJVHUGSF",2201:" 11H\\NJPISFS[ RRGR[ RN[W[",2202:" 45H\\LJMKLLKKKJLHMGPFTFWGXHYJYLXNUPPRNSLUKXK[ RTFVGWHXJXLWNTPPR RKYLXNXSZVZXYYX RNXS[W[XZYXYV",2203:" 47H\\LJMKLLKKKJLHMGPFTFWGXIXLWNTOQO RTFVGWIWLVNTO RTOVPXRYTYWXYWZT[P[MZLYKWKVLUMVLW RWQXTXWWYVZT[",2204:" 13H\\THT[ RUFU[ RUFJUZU RQ[X[",2205:" 39H\\MFKP RKPMNPMSMVNXPYSYUXXVZS[P[MZLYKWKVLUMVLW RSMUNWPXSXUWXUZS[ RMFWF RMGRGWF",2206:" 48H\\WIVJWKXJXIWGUFRFOGMILKKOKULXNZQ[S[VZXXYUYTXQVOSNRNOOMQLT RRFPGNIMKLOLUMXOZQ[ RS[UZWXXUXTWQUOSN",2207:" 31H\\KFKL RKJLHNFPFUIWIXHYF RLHNGPGUI RYFYIXLTQSSRVR[ RXLSQRSQVQ[",2208:" 63H\\PFMGLILLMNPOTOWNXLXIWGTFPF RPFNGMIMLNNPO RTOVNWLWIVGTF RPOMPLQKSKWLYMZP[T[WZXYYWYSXQWPTO RPONPMQLSLWMYNZP[ RT[VZWYXWXSWQVPTO",2209:" 48H\\XMWPURRSQSNRLPKMKLLINGQFSFVGXIYLYRXVWXUZR[O[MZLXLWMVNWMX RQSORMPLMLLMIOGQF RSFUGWIXLXRWVVXTZR[",2210:" 6MWRYQZR[SZRY",2211:" 8MWR[QZRYSZS\\R^Q_",2212:" 12MWRMQNROSNRM RRYQZR[SZRY",2213:" 14MWRMQNROSNRM 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^IUISJPLONOPPTSVTXTZS[Q RISJQLPNPPQTTVUXUZT[Q[O",2247:" 8G]JTROZT RJTRPZT",2248:" 7LXTFOL RTFUGOL",2249:" 7LXPFUL RPFOGUL",2250:" 18H\\KFLHNJQKSKVJXHYF RKFLINKQLSLVKXIYF",2251:" 8MWRHQGRFSGSIRKQL",2252:" 8MWSFRGQIQKRLSKRJ",2253:" 8MWRHSGRFQGQIRKSL",2254:" 8MWQFRGSISKRLQKRJ",2255:" 10E[HMLMRY RKMR[ R[BR[",2256:" 13F^ZJSJOKMLKNJQJSKVMXOYSZZZ",2257:" 13F^JJJQKULWNYQZSZVYXWYUZQZJ",2258:" 13F^JJQJUKWLYNZQZSYVWXUYQZJZ",2259:" 13F^JZJSKOLMNKQJSJVKXMYOZSZZ",2260:" 16F^ZJSJOKMLKNJQJSKVMXOYSZZZ RJRVR",2261:" 11E_XP[RXT RUMZRUW RIRZR",2262:" 11JZPLRITL RMORJWO RRJR[",2263:" 11E_LPIRLT ROMJROW RJR[R",2264:" 11JZPXR[TX RMURZWU RRIRZ",2265:" 44I\\XRWOVNTMRMONMQLTLWMYNZP[R[UZWXXUYPYKXHWGUFRFPGOHOIPIPH RRMPNNQMTMXNZ RR[TZVXWUXPXKWHUF",2266:" 15H\\JFR[ RKFRY RZFR[ RJFZF RKGYG",2267:" 10AbDMIMRY RHNR[ Rb:R[",2268:" 32F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia",2269:" 50F^[CZD[E\\D\\C[BYBWCUETGSJRNPZO^N` RVDUFTJRVQZP]O_MaKbIbHaH`I_J`Ia RQKNLLNKQKSLVNXQYSYVXXVYSYQXNVLSKQK",2270:" 26F_\\S[UYVWVUUTTQPPONNLNJOIQISJULVNVPUQTTPUOWNYN[O\\Q\\S",2271:" 32F^[FI[ RNFPHPJOLMMKMIKIIJGLFNFPGSHVHYG[F RWTUUTWTYV[X[ZZ[X[VYTWT",2272:" 49F_[NZO[P\\O\\N[MZMYNXPVUTXRZP[M[JZIXIUJSPORMSKSIRGPFNGMIMKNNPQUXWZZ[[[\\Z\\Y RM[KZJXJUKSMQ RMKNMVXXZZ[",2273:" 56E`WNVLTKQKOLNMMPMSNUPVSVUUVS RQKOMNPNSOUPV RWKVSVUXVZV\\T]Q]O\\L[JYHWGTFQFNGLHJJILHOHRIUJWLYNZQ[T[WZYYZX RXKWSWUXV",2274:" 42H\\PBP_ RTBT_ RXIWJXKYJYIWGTFPFMGKIKKLMMNOOUQWRYT RKKMMONUPWQXRYTYXWZT[P[MZKXKWLVMWLX",2275:" 12H]SFLb RYFRb RLQZQ RKWYW",2276:" 46JZUITJUKVJVIUGSFQFOGNINKOMQOVR ROMTPVRWTWVVXTZ RPNNPMRMTNVPXU[ RNVSYU[V]V_UaSbQbOaN_N^O]P^O_",2277:" 30JZRFQHRJSHRF RRFRb RRQQTRbSTRQ RLMNNPMNLLM RLMXM RTMVNXMVLTM",2278:" 56JZRFQHRJSHRF RRFRT RRPQRSVRXQVSRRP RRTRb RR^Q`RbS`R^ RLMNNPMNLLM RLMXM RTMVNXMVLTM RL[N\\P[NZL[ RL[X[ RT[V\\X[VZT[",2279:" 12I\\XFX[ RKFXF RPPXP RK[X[",2281:" 38E`QFNGKIILHOHRIUKXNZQ[T[WZZX\\U]R]O\\LZIWGTFQF RROQPQQRRSRTQTPSORO RRPRQSQSPRP",2282:" 45J[PFNGOIQJ RPFOGOI RUFWGVITJ RUFVGVI RQJOKNLMNMQNSOTQUTUVTWSXQXNWLVKTJQJ RRUR[ RSUS[ RNXWX",2283:" 27I\\RFOGMILLLMMPORRSSSVRXPYMYLXIVGSFRF RRSR[ RSSS[ RNWWW",2284:" 28D`PFMGJIHLGOGSHVJYM[P\\T\\W[ZY\\V]S]O\\LZIWGTFPF RRFR\\ RGQ]Q",2285:" 31G`PMMNKPJSJTKWMYPZQZTYVWWTWSVPTNQMPM R]GWG[HUN R]G]M\\IVO R\\HVN",2286:" 28F\\IIJGLFOFQGRIRLQOPQNSKU ROFPGQIQMPPNS RVFT[ RWFS[ RKUYU",2287:" 30I\\MFMU RNFMQ RMQNOONQMTMWNXPXRWTUV RTMVNWPWRTXTZU[W[YY RKFNF",2288:" 44I\\RNOOMQLTLUMXOZR[S[VZXXYUYTXQVOSNRN RRHNJRFRN RSHWJSFSN RRSQTQURVSVTUTTSSRS RRTRUSUSTRT",2289:" 37G^QHRFR[ RTHSFS[ RJHKFKMLPNRQSRS RMHLFLNMQ R[HZFZMYPWRTSSS RXHYFYNXQ RNWWW",2290:" 31G]LFL[ RMFM[ RIFUFXGYHZJZMYOXPUQMQ RUFWGXHYJYMXOWPUQ RI[Y[YVX[",2291:" 24H[YGUGQHNJLMKPKSLVNYQ[U\\Y\\ RYGVHSJQMPPPSQVSYV[Y\\",2292:" 27F_OQMQKRJSIUIWJYKZM[O[QZRYSWSURSQROQ RSHPQ RZJRR R\\QST",2293:" 12H\\OKUY RUKOY RKOYU RYOKU",2294:" 48F^NVLUKUIVHXHYI[K\\L\\N[OYOXNVKRJOJMKJMHPGTGWHYJZMZOYRVVUXUYV[X\\Y\\[[\\Y\\X[VYUXUVV RJMKKMIPHTHWIYKZM",2295:" 48F^NMLNKNIMHKHJIHKGLGNHOJOKNMKQJTJVKYM[P\\T\\W[YYZVZTYQVMUKUJVHXGYG[H\\J\\K[MYNXNVM RJVKXMZP[T[WZYXZV",2301:" 40F_JMILIJJHLGNGPHQIRKSP RIJKHMHOIPJQLRPR[ R[M\\L\\J[HYGWGUHTISKRP R\\JZHXHVIUJTLSPS[",2302:" 51F^IGJKKMMOPPTPWOYMZK[G RIGJJKLMNPOTOWNYLZJ[G RPONPMQLSLVMXOZQ[S[UZWXXVXSWQVPTO RPPNQMSMVNY RVYWVWSVQTP",2303:" 30F^MJMV RNKNU RVKVU RWJWV RIGKIMJPKTKWJYI[G RIYKWMVPUTUWVYW[Y",2304:" 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\\PMMNLOKQKSLUMVPWTWWVXUYSYQXOWNTMPM RMNLPLSMUNVPW RWVXTXQWOVNTM",2371:" 36H\\SMONLPKRKTLVNWQWUVXTYRYPXNVMSM RXNSM RVMQNLP RONKR RLVQW RNWSVXT RUVYR",2372:" 34J[SMPNNPMRMTNVPWRWUVWTXRXPWNUMSM ROPUM RNRVN RMTWO RNUXP ROVWR RPWVT",2373:" 18JZOGO^ RUFU] RMNWL RMOWM RMWWU RMXWV",2374:" 18JZNFNX RVLV^ RNNVL RNOVM RNWVU RNXVV",2375:" 25JZNBNW RNNQLTLVMWOWQVSSUQVNW RNNQMTMVN RUMVOVQUSSU",2376:" 18E_HIHL R\\I\\L RHI\\I RHJ\\J RHK\\K RHL\\L",2377:" 18JZMNMQ RWNWQ RMNWN RMOWO RMPWP RMQWQ",2378:" 36JZQCVMRTRU RULQS RTITKPRRUUY RW\\UYSXQXOYN[N]O_Ra RW\\UZSYOYO]P_Ra RSXPZN]",2379:" 26JZPOOMOKMKMMNNPOSOUNWL RNKNN RMLOL RMMSO RPOUN RWLSY",2380:" 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",2381:" 89IjNQOOQNSNUOVQVSUUSVQVOUNTMQMNNKPISHWH[I^K`NaRaW`[_]]`ZcVfQiMk RWHZI]K_N`R`W_[^]\\`YcTgQi RPOTO ROPUP RNQVQ RNRVR RNSVS ROTUT RPUTU ReLeNgNgLeL RfLfN ReMgM ReVeXgXgVeV RfVfX ReWgW",2382:" 85D`H>Hf RI>If RM>Mf RQBSBSDQDQAR?T>W>Y?[A\\D\\I[LYNWOUOSNRLQNOQNROSQVRXSVUUWUYV[X\\[\\`[cYeWfTfReQcQ`S`SbQb RRBRD RQCSC RY?ZA[D[IZLYN RRLRNPQNRPSRVRX RYVZX[[[`ZcYe RR`Rb RQaSa",2401:" 21AcHBHb RIBIb R[B[b R\\B\\b RDB`B RDbMb RWb`b",2402:" 23BaGBQPFb RFBPP REBPQ REB\\B^I[B RGa\\a RFb\\b^[[b",2403:" 28I[X+U1R8P=OANFMNMVN^OcPgRlUsXy RU1S6Q":2242,"~":2246,"@":2273,"\\":804}[s]}const te={SUB_SUP_SCALE:.5,SQRT_MAG_SCALE:.5,FRAC_SCALE:.85,LINE_SPACING:.5,FRAC_SPACING:.4};function yo(s){s=s.replace(/\n/g," ");let t=0;const e=[];let i="";for(;t0&&(s[u].text=="^"||s[u].text=="_"||s[u].text=="'");)u--;c=s[u].bbox.y,s[R].text=="'"?s[R].bbox.y=c:(At(s[R],te.SUB_SUP_SCALE,null,0,0),ct[s[u].text]&&ct[s[u].text].flags.big?s[R].bbox.y=c-s[R].bbox.h:s[u].text=="\\int"?s[R].bbox.y=c:s[R].bbox.y=c-s[R].bbox.h/2)}else if(s[R].text=="_"){let c=1,u=R;for(;u>0&&(s[u].text=="^"||s[u].text=="_"||s[u].text=="'");)u--;c=s[u].bbox.y+s[u].bbox.h,At(s[R],te.SUB_SUP_SCALE,null,0,0),ct[s[u].text]&&ct[s[u].text].flags.big?s[R].bbox.y=c:s[u].text=="\\int"?s[R].bbox.y=c-s[R].bbox.h:s[R].bbox.y=c-s[R].bbox.h/2}function e(R,c,u,d,g){let L=R,O=g,P=1/0,M=-1/0;for(;d>0?L=0;){if(s[L].text==c)O++;else if(s[L].text==u){if(O--,O==0)break}else s[L].text=="^"||s[L].text=="_"||s[L].bbox&&(P=Math.min(P,s[L].bbox.y),M=Math.max(M,s[L].bbox.y+s[L].bbox.h));L+=d}return[P,M]}for(let R=0;RR.text=="&"||R.text=="\\\\"))return;const i=[];let n=[],r=[];for(let R=0;R0&&(s.chld[M].text=="^"||s.chld[M].text=="_"||s.chld[M].text=="'");)M--;const T=ct[s.chld[M].text]&&ct[s.chld[M].text].flags.big;if(O.text=="'"){let X=M+1,S=0;for(;X1;Jo(s.chld,c);const g=ts(s.chld);s.text=="\\text"&&(g.x-=1,g.w+=2);for(let L=0;Li.bbox.w)c=c/Math.max(o.w,1)*i.bbox.w,c+=i.bbox.x;else{c=c/16*n;const d=(i.bbox.w-o.w/16*n)/2;c+=i.bbox.x+d}ct[i.text].flags.yfl?(u=(u-o.ymin)/Math.max(o.ymax-o.ymin,1)*i.bbox.h,u+=i.bbox.y):(u=u/16*n,r&&(u-=(o.ymax+o.ymin)/2/16*n),u+=i.bbox.y+i.bbox.h/2),a.push([c,u])}t.push(a)}}else if(ct[i.text]&&ct[i.text].flags.txt||i.type=="char"){let o=i.bbox.x;const l=!!(ct[i.text]&&ct[i.text].flags.txt);for(let a=Number(l);a16?g*=16/R.w:g+=(16-R.w)/2/16),g+=o,L+=i.bbox.y+i.bbox.h/2,u.push([g,L])}t.push(u)}i.mode=="tt"?o+=n:o+=R.w/16*n}}}return t}function Le(s){return Math.round(s*100)/100}class ko{constructor(t){h(this,"_latex");h(this,"_tree");h(this,"_tokens");h(this,"_polylines");this._latex=t,this._tokens=yo(t),this._tree=ki(this._tokens),jn(this._tree.chld),ge(this._tree),Ao(this._tree),this._polylines=Bo(this._tree)}resolveScale(t){var o,l,a,R;if(t==null)return[16,16,16,16];let e=(o=t.SCALE_X)!=null?o:16,i=(l=t.SCALE_Y)!=null?l:16;if(t.MIN_CHAR_H!=null){let c=0;for(let d=0;d`;t.BG_COLOR&&(a+=``),a+='>endobj + 2 0 obj +<< /Type /Pages +/Kids [3 0 R] +/Count 1 +/MediaBox [0 0 ${o} ${l}] +>> +endobj + 3 0 obj +<< /Type /Page +/Parent 2 0 R +/Resources +<< /Font +<< /F1 +<< /Type /Font + /Subtype /Type1 +/BaseFont /Times-Roman +>> +>> +>> +/Contents [`,R="",c=4;for(let d=0;d> + stream + 1 j 1 J ${(u=t.STROKE_W)!=null?u:1} w +`;for(let g=0;g> +endobj +`,R+=` +trailer +<< /Root 1 0 R + /Size 0 + >>startxref + +%%EOF +`,a+R}boxes(t){t||(t={});const[e,i,n,r]=this.resolveScale(t),o=[];for(let l=0;l{const u=new Image;u.src=e.laTexSVG,u.onload=()=>{t.drawImage(u,i,n,o,l),this.imageCache.set(e.value,u),R(e)},u.onerror=d=>{c(d)}});this.addImageObserver(a)}}}var oe;(function(s){s.UL="ul",s.OL="ol"})(oe||(oe={}));var re;(function(s){s.DISC="disc",s.CIRCLE="circle",s.SQUARE="square",s.CHECKBOX="checkbox"})(re||(re={}));var _i;(function(s){s.DECIMAL="decimal"})(_i||(_i={}));var Gt;(function(s){s[s.DISC=re.DISC]="DISC",s[s.CIRCLE=re.CIRCLE]="CIRCLE",s[s.SQUARE=re.SQUARE]="SQUARE",s[s.DECIMAL=_i.DECIMAL]="DECIMAL",s[s.CHECKBOX=re.CHECKBOX]="CHECKBOX"})(Gt||(Gt={}));const zi={[re.DISC]:"\u2022",[re.CIRCLE]:"\u25E6",[re.SQUARE]:"\u25AB\uFE0E",[re.CHECKBOX]:"\u2611\uFE0F"},_o={[oe.OL]:"ol",[oe.UL]:"ul"},zo={[Gt.DISC]:"disc",[Gt.CIRCLE]:"circle",[Gt.SQUARE]:"square",[Gt.DECIMAL]:"decimal",[Gt.CHECKBOX]:"checkbox"};var ht;(function(s){s.FIRST="first",s.SECOND="second",s.THIRD="third",s.FOURTH="fourth",s.FIFTH="fifth",s.SIXTH="sixth"})(ht||(ht={}));const $o={defaultFirstSize:26,defaultSecondSize:24,defaultThirdSize:22,defaultFourthSize:20,defaultFifthSize:18,defaultSixthSize:16},is={[ht.FIRST]:"defaultFirstSize",[ht.SECOND]:"defaultSecondSize",[ht.THIRD]:"defaultThirdSize",[ht.FOURTH]:"defaultFourthSize",[ht.FIFTH]:"defaultFifthSize",[ht.SIXTH]:"defaultSixthSize"},$i={[ht.FIRST]:1,[ht.SECOND]:2,[ht.THIRD]:3,[ht.FOURTH]:4,[ht.FIFTH]:5,[ht.SIXTH]:6},qo={H1:ht.FIRST,H2:ht.SECOND,H3:ht.THIRD,H4:ht.FOURTH,H5:ht.FIFTH,H6:ht.SIXTH};var dt;(function(s){s.TEXT="text",s.SELECT="select",s.CHECKBOX="checkbox",s.RADIO="radio",s.DATE="date"})(dt||(dt={}));var D;(function(s){s.PREFIX="prefix",s.POSTFIX="postfix",s.PLACEHOLDER="placeholder",s.VALUE="value",s.CHECKBOX="checkbox",s.RADIO="radio"})(D||(D={}));var qi;(function(s){s.ROW_START="rowStart",s.VALUE_START="valueStart"})(qi||(qi={}));var fi;(function(s){s.CONTAIN="contain",s.COVER="cover"})(fi||(fi={}));var pe;(function(s){s.REPEAT="repeat",s.NO_REPEAT="no-repeat",s.REPEAT_X="repeat-x",s.REPEAT_Y="repeat-y"})(pe||(pe={}));const jo={color:"#FFFFFF",image:"",size:fi.COVER,repeat:pe.NO_REPEAT,applyPageNumbers:[]};var It;(function(s){s.TOP="top",s.MIDDLE="middle",s.BOTTOM="bottom"})(It||(It={}));const tr={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#ffffff",verticalAlign:It.BOTTOM},er={placeholderColor:"#9c9b9b",bracketColor:"#000000",prefix:"{",postfix:"}",borderWidth:1,borderColor:"#000000",activeBackgroundColor:""},ir={bottom:30,maxHeightRadio:Ue.HALF,disabled:!1,editable:!0},nr={opacity:.1,backgroundColor:"#E99D00",activeOpacity:.5,activeBackgroundColor:"#E99D00",disabled:!1},sr={top:30,maxHeightRadio:Ue.HALF,disabled:!1,editable:!0},or={disabled:!0,color:"#CCCCCC",lineWidth:1.5},rr={font:"Microsoft YaHei",fontSize:12,lineDash:[3,1]},ji={PAGE_NO:"{pageNo}",PAGE_COUNT:"{pageCount}"},lr={bottom:60,size:12,font:"Microsoft YaHei",color:"#000000",rowFlex:at.CENTER,format:ji.PAGE_NO,numberType:ei.ARABIC,disabled:!1,startPageNo:1,fromPageNo:0,maxPageNo:null},ar={data:"",color:"#DCDFE6",opacity:1,size:16,font:"Microsoft YaHei"},Rr={width:14,height:14,gap:5,lineWidth:1,fillStyle:"#5175f4",strokeStyle:"#000000",verticalAlign:It.BOTTOM},cr={lineWidth:1,strokeStyle:"#000000"},ur={tdPadding:[0,5,5,5],defaultTrMinHeight:42,defaultColMinWidth:40},tn={data:"",color:"#AEB5C0",opacity:.3,size:200,font:"Microsoft YaHei",repeat:!1,gap:[10,10]},dr={tipDisabled:!0};var pi;(function(s){s.PAGE="page",s.CONTINUITY="continuity"})(pi||(pi={}));const hr={size:12,font:"Microsoft YaHei",color:"#000000",disabled:!0,right:20,type:pi.CONTINUITY},gr={color:"#000000",lineWidth:1,padding:[0,5,0,5],disabled:!0};var le;(function(s){s.COMPONENT="component",s.MENU="menu",s.MAIN="main",s.FOOTER="footer",s.CONTEXTMENU="contextmenu",s.POPUP="popup",s.CATALOG="catalog",s.COMMENT="comment"})(le||(le={}));var Pe;(function(s){s.PAGE="page",s.TABLE="table"})(Pe||(Pe={}));var Rt;(function(s){s.EDIT="edit",s.CLEAN="clean",s.READONLY="readonly",s.FORM="form",s.PRINT="print",s.DESIGN="design"})(Rt||(Rt={}));var lt;(function(s){s.HEADER="header",s.MAIN="main",s.FOOTER="footer"})(lt||(lt={}));var me;(function(s){s.PAGING="paging",s.CONTINUITY="continuity"})(me||(me={}));var Oe;(function(s){s.VERTICAL="vertical",s.HORIZONTAL="horizontal"})(Oe||(Oe={}));var mi;(function(s){s.BREAK_ALL="break-all",s.BREAK_WORD="break-word"})(mi||(mi={}));var Ii;(function(s){s.SPEED="speed",s.COMPATIBILITY="compatibility"})(Ii||(Ii={}));function en(s={}){const t=b(b({},ur),s.table),e=b(b({},sr),s.header),i=b(b({},ir),s.footer),n=b(b({},lr),s.pageNumber),r=b(b({},tn),s.watermark),o=b(b({},er),s.control),l=b(b({},tr),s.checkbox),a=b(b({},Rr),s.radio),R=b(b({},Zo),s.cursor),c=b(b({},$o),s.title),u=b(b({},ar),s.placeholder),d=b(b({},nr),s.group),g=b(b({},rr),s.pageBreak),L=b(b({},dr),s.zone),O=b(b({},jo),s.background),P=b(b({},or),s.lineBreak),M=b(b({},cr),s.separator),T=b(b({},hr),s.lineNumber),X=b(b({},gr),s.pageBorder);return tt(b({mode:Rt.EDIT,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,resizerColor:"#4182D9",resizerSize:5,marginIndicatorSize:35,marginIndicatorColor:"#BABABA",margins:[100,120,100,120],pageMode:me.PAGING,renderMode:Ii.SPEED,defaultHyperlinkColor:"#0000FF",paperDirection:Oe.VERTICAL,inactiveAlpha:.6,historyMaxRecordCount:100,wordBreak:mi.BREAK_WORD,printPixelRatio:3,maskMargin:[0,0,0,0],letterClass:[Mo.ENGLISH],contextMenuDisableKeys:[],scrollContainerSelector:""},s),{table:t,header:e,footer:i,pageNumber:n,watermark:r,control:o,checkbox:l,radio:a,cursor:R,title:c,placeholder:u,group:d,pageBreak:g,zone:L,background:O,lineBreak:P,separator:M,lineNumber:T,pageBorder:X})}function ns(s){const t=[];for(let e=0;eQ.concat(U.value.split("").map(f=>tt(b({},U),{value:f}))),[]);let Y=0;for(let Q=0;QY.concat(Q.value.split("").map(U=>tt(b({},Q),{value:U}))),[]);let m=0;for(let Y=0;Ym.code===d);V&&(Z=[{value:V.value}])}Bt(Z,tt(b({},t),{isHandleFirstElement:!1,isForceCompensation:!1}));for(let V=0;V1){s.splice(o,1);const a=jt(l.value);for(let R=0;R{const o=s[r];o!==void 0&&(n[r]=o)}),n}function Tt(s,t={}){const{extraPickAttrs:e}=t,i=Ot(s),n=[];let r=0;for(;r{const L=u[g];L!==void 0&&(d[g]=L)}),R.tdList[c]=d}}}else if(o.type===N.HYPERLINK){const a=o.hyperlinkId;if(a){const R={type:N.HYPERLINK,value:"",url:o.url},c=[];for(;r{ni(O,n,P)});continue}((u=g.valueList)==null?void 0:u.length)&&Ht(s,g.valueList,e,i);const L=[...$n];ye(g)||L.push(...Ze),ni(L,n,g)}}function Pr(s,t){let e="span";s.type===N.SUPERSCRIPT?e="sup":s.type===N.SUBSCRIPT&&(e="sub");const i=document.createElement(e);return i.style.fontFamily=s.font||t.defaultFont,s.rowFlex&&(i.style.textAlign=ss(s.rowFlex)),s.color&&(i.style.color=s.color),s.bold&&(i.style.fontWeight="600"),s.italic&&(i.style.fontStyle="italic"),i.style.fontSize=`${s.size||t.defaultSize}px`,s.highlight&&(i.style.backgroundColor=s.highlight),s.underline&&(i.style.textDecoration="underline"),s.strikeout&&(i.style.textDecoration+=" line-through"),i.innerText=s.value.replace(new RegExp(`${k}`,"g"),` +`),i}function rs(s){let t=0;const e=new Map;for(let i=0;i0&&(t+=1);const l=r[o],a=e.get(t)||[];a.push(tt(b({},n),{value:l})),e.set(t,a)}}}return e}function Tr(s){var i;const t=[];if(!s.length)return t;let e=((i=s[0])==null?void 0:i.rowFlex)||null;t.push({rowFlex:e,data:[s[0]]});for(let n=1;nS.value).join(""),T.url&&(X.href=T.url),l.append(X)}else if(T.type===N.TITLE){const X=document.createElement(`h${$i[T.level]}`),S=i(T.valueList);X.innerHTML=S.innerHTML,l.append(X)}else if(T.type===N.LIST){const X=document.createElement(_o[T.listType]);T.listStyle&&(X.style.listStyleType=zo[T.listStyle]);const S=Tt(T.valueList);rs(S).forEach(W=>{const I=document.createElement("li"),Z=i(W);I.innerHTML=Z.innerHTML,X.append(I)}),l.append(X)}else if(T.type===N.IMAGE){const X=document.createElement("img");T.value&&(X.src=T.value,X.width=T.width,X.height=T.height),l.append(X)}else if(T.type===N.SEPARATOR){const X=document.createElement("hr");l.append(X)}else if(T.type===N.CHECKBOX){const X=document.createElement("input");X.type="checkbox",((d=T.checkbox)==null?void 0:d.value)&&X.setAttribute("checked","true"),l.append(X)}else if(T.type===N.RADIO){const X=document.createElement("input");X.type="radio",((g=T.radio)==null?void 0:g.value)&&X.setAttribute("checked","true"),l.append(X)}else if(T.type===N.TAB){const X=document.createElement("span");X.innerHTML=`${vn}${vn}`,l.append(X)}else if(T.type===N.CONTROL){const X=document.createElement("span"),S=i(((L=T.control)==null?void 0:L.value)||[]);X.innerHTML=S.innerHTML,l.append(X)}else if(!T.type||T.type===N.LATEX||se.includes(T.type)){let X="";if(T.type===N.DATE?X=((O=T.valueList)==null?void 0:O.map(F=>F.value).join(""))||"":X=T.value,!X)continue;const S=Pr(T,e);((P=o[M-1])==null?void 0:P.type)===N.TITLE&&(X=X.replace(/^\n/,"")),S.innerText=X.replace(new RegExp(`${k}`,"g"),` +`),l.append(S)}}return l}const n=document.createElement("div"),r=Tr(s);for(let o=0;o{n.append(c.cloneNode(!0))}):n.append(R)}return n}function Sr(s){if(!s||s.nodeType!==3)return null;const t=s.parentNode,e=t.nodeName==="FONT"?t.parentNode:t,i=Or(e),n=s.textContent,r=window.getComputedStyle(e);if(!n||e.nodeName==="STYLE")return null;const o={value:n,color:r.color,bold:Number(r.fontWeight)>500,italic:r.fontStyle.includes("italic"),size:Math.floor(parseFloat(r.fontSize))};return e.nodeName==="SUB"||r.verticalAlign==="sub"?o.type=N.SUBSCRIPT:(e.nodeName==="SUP"||r.verticalAlign==="super")&&(o.type=N.SUPERSCRIPT),i!==at.LEFT&&(o.rowFlex=i),r.backgroundColor!=="rgba(0, 0, 0, 0)"&&(o.highlight=r.backgroundColor),r.textDecorationLine.includes("underline")&&(o.underline=!0),r.textDecorationLine.includes("line-through")&&(o.strikeout=!0),o}function oi(s,t){const e=[];function i(o){if(o.nodeType===3){const l=Sr(o);l&&e.push(l)}else if(o.nodeType===1){const l=o.childNodes;for(let a=0;a{const g=oi(d.innerHTML,t);g.forEach(L=>{L.value===` +`&&(L.listWrap=!0)}),g.unshift({value:` +`}),u.valueList.push(...g)}),e.push(u)}else if(R.nodeName==="HR")e.push({value:` +`,type:N.SEPARATOR});else if(R.nodeName==="IMG"){const{src:c,width:u,height:d}=R;c&&u&&d&&e.push({width:u,height:d,value:c,type:N.IMAGE})}else if(R.nodeName==="TABLE"){const c=R,u={type:N.TABLE,value:` +`,colgroup:[],trList:[]};if(c.querySelectorAll("tr").forEach(d=>{const g=window.getComputedStyle(d).height.replace("px",""),L={height:Number(g),tdList:[]};d.querySelectorAll("th,td").forEach(O=>{const P=O,M=oi(P.innerHTML,t),T={colspan:P.colSpan,rowspan:P.rowSpan,value:M};P.style.backgroundColor&&(T.backgroundColor=P.style.backgroundColor),L.tdList.push(T)}),u.trList.push(L)}),u.trList.length){const d=u.trList[0].tdList.reduce((L,O)=>L+O.colspan,0),g=Math.ceil(t.innerWidth/d);for(let L=0;L{var l;o.nodeType!==1&&!((l=o.textContent)==null?void 0:l.trim())&&r.push(o)}),r.forEach(o=>o.remove()),i(n),n.remove(),e}function Wi(s){function t(e){var n,r,o,l,a;let i="";for(let R=0;Ru.value).join("");else if(c.type===N.TITLE)i+=`${t(Tt(c.valueList))}`;else if(c.type===N.LIST){const u=Tt(c.valueList),d=rs(u);let g="";c.listType===oe.UL&&(g=zi[c.listStyle]),d.forEach((L,O)=>{const P=d.size-1===O;i+=` +${g||`${O+1}.`}${t(L)}${P?` +`:""}`})}else if(c.type===N.CHECKBOX)i+=((n=c.checkbox)==null?void 0:n.value)?"\u2611":"\u25A1";else if(c.type===N.RADIO)i+=((r=c.radio)==null?void 0:r.value)?"\u2609":"\u25CB";else if(!c.type||c.type===N.LATEX||se.includes(c.type)){let u="";c.type===N.CONTROL?u=((l=(o=c.control.value)==null?void 0:o[0])==null?void 0:l.value)||"":c.type===N.DATE?u=((a=c.valueList)==null?void 0:a.map(d=>d.value).join(""))||"":u=c.value,i+=u.replace(new RegExp(`${k}`,"g"),` +`)}}return i}return t(Tt(s))}function nn(s){return yi(s,["metrics","style"])}function ye(s){return!!(s==null?void 0:s.type)&&(bo.includes(s.type)||s.imgDisplay===et.INLINE)}function Xr(s,t){const e=document.createElement(t);for(let i=0;i=0;i--)((e=s[i].imgFloatPosition)==null?void 0:e.pageNo)===t&&s.splice(i,1)}function Fr(s){localStorage.setItem(vi,JSON.stringify({text:s.text,elementList:s.elementList}))}function as(){const s=localStorage.getItem(vi);return s?JSON.parse(s):null}function Rs(){localStorage.removeItem(vi)}function fr(s,t,e){if(!s&&!t&&!e.length)return;const i=new Blob([s],{type:"text/plain"}),n=new Blob([t],{type:"text/html"});if(window.ClipboardItem){const r=new ClipboardItem({[i.type]:i,[n.type]:n});window.navigator.clipboard.write([r])}else{const r=document.createElement("div");r.setAttribute("contenteditable","true"),r.innerHTML=t,document.body.append(r);const o=window.getSelection(),l=document.createRange(),a=document.createElement("span");a.innerText=` +`,r.append(a),l.selectNodeContents(r),o==null||o.removeAllRanges(),o==null||o.addRange(l),document.execCommand("copy"),r.remove()}Fr({text:s,elementList:e})}function cs(s,t){const e=si(s,t);document.body.append(e);const i=e.innerText;e.remove();const n=e.innerHTML;!i&&!n&&!s.length||fr(i,n,Tt(s))}function pr(s){let t=!1;for(let e=0;e{const l=new Image,a=o.result;l.src=a,l.onload=()=>{const R={value:a,type:N.IMAGE,width:l.width,height:l.height};~n&&Ht(r,[R],n,{editorOptions:e.getOptions()}),e.insertElementList([R])}}}function mr(s,t){const e=s.getDraw();if(e.isReadonly()||e.isDisabled())return;const i=t.clipboardData;if(!i)return;const{paste:n}=e.getOverride();if(n){const o=n(t);if((o==null?void 0:o.preventDefault)!==!1)return}if(!pr(i)){const o=i.getData("text"),l=as();if(o===(l==null?void 0:l.text)){sn(s,l.elementList);return}}Rs();let r=!1;for(let o=0;o{s.input(a)});break}if(l.type==="text/html"&&r){l.getAsString(a=>{us(s,a)});break}}else if(l.kind==="file"&&l.type.includes("image")){const a=l.getAsFile();a&&on(s,a)}}}async function Ir(s,t){const e=s.getDraw();if(e.isReadonly()||e.isDisabled())return;const{paste:i}=e.getOverride();if(i){const o=i();if((o==null?void 0:o.preventDefault)!==!1)return}const n=await navigator.clipboard.readText(),r=as();if(n===(r==null?void 0:r.text)){sn(s,r.elementList);return}if(Rs(),t==null?void 0:t.isPlainText)n&&s.input(n);else{const o=await navigator.clipboard.read();let l=!1;for(const a of o)if(a.types.includes("text/html")){l=!0;break}for(const a of o)if(a.types.includes("text/plain")&&!l){const c=await(await a.getType("text/plain")).text();c&&s.input(c)}else if(a.types.includes("text/html")&&l){const c=await(await a.getType("text/html")).text();c&&us(s,c)}else if(a.types.some(R=>R.startsWith("image/"))){const R=a.types.find(u=>u.startsWith("image/")),c=await a.getType(R);on(s,c)}}}class Wr{constructor(t,e){h(this,"draw");h(this,"container");h(this,"agentCursorDom");h(this,"canvasEvent");this.draw=t,this.container=t.getContainer(),this.canvasEvent=e;const i=document.createElement("textarea");i.autocomplete="off",i.classList.add(`${_}-inputarea`),i.innerText="",this.container.append(i),this.agentCursorDom=i,i.onkeydown=n=>this._keyDown(n),i.oninput=An(this._input.bind(this),0),i.onpaste=n=>this._paste(n),i.addEventListener("compositionstart",this._compositionstart.bind(this)),i.addEventListener("compositionend",this._compositionend.bind(this))}getAgentCursorDom(){return this.agentCursorDom}_keyDown(t){this.canvasEvent.keydown(t)}_input(t){const e=t.data;!e||this.canvasEvent.input(e)}_paste(t){this.draw.isReadonly()||!t.clipboardData||(mr(this.canvasEvent,t),t.preventDefault())}_compositionstart(){this.canvasEvent.compositionstart()}_compositionend(t){this.canvasEvent.compositionend(t)}}class Vr{constructor(t,e){h(this,"ANIMATION_CLASS",`${_}-cursor--animation`);h(this,"draw");h(this,"container");h(this,"options");h(this,"position");h(this,"cursorDom");h(this,"cursorAgent");h(this,"blinkTimeout");this.draw=t,this.container=t.getContainer(),this.position=t.getPosition(),this.options=t.getOptions(),this.cursorDom=document.createElement("div"),this.cursorDom.classList.add(`${_}-cursor`),this.container.append(this.cursorDom),this.cursorAgent=new Wr(t,e),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=""}_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),this.blinkTimeout=null)}focus(){const t=this.cursorAgent.getAgentCursorDom();document.activeElement!==t&&(t.focus(),t.setSelectionRange(0,0))}drawCursor(t){let e=this.position.getCursorPosition();if(!e)return;const{scale:i,cursor:n}=this.options,{color:r,width:o,isShow:l=!0,isBlink:a=!0,isFocus:R=!0,hitLineStartIndex:c}=b(b({},n),t),u=this.draw.getHeight(),d=this.draw.getPageGap();c&&(e=this.position.getPositionList()[c]);const{metrics:g,coordinate:{leftTop:L,rightTop:O},ascent:P,pageNo:M}=e,S=(this.draw.getZone().isMainActive()?M:this.draw.getPageNo())*(u+d),F=Uo*i,W=Math.min(g.height/4,F),I=g.height+W*2,Z=this.cursorAgent.getAgentCursorDom();R&&setTimeout(()=>{this.focus()});const V=g.boundingBoxDescent<0?0:g.boundingBoxDescent,m=L[1]+P+V-(I-W)+S,Y=c?L[0]:O[0];if(Z.style.left=`${Y}px`,Z.style.top=`${m+I-F}px`,!l){this.recoveryCursor();return}const Q=this.draw.isReadonly();this.cursorDom.style.width=`${o*i}px`,this.cursorDom.style.backgroundColor=r,this.cursorDom.style.left=`${Y}px`,this.cursorDom.style.top=`${m}px`,this.cursorDom.style.display=Q?"none":"block",this.cursorDom.style.height=`${I}px`,a?this._setBlinkTimeout():this._clearBlinkTimeout()}recoveryCursor(){this.cursorDom.style.display="none",this._clearBlinkTimeout()}moveCursorToVisible(t){const{cursorPosition:e,direction:i}=t;if(!e||!i)return;const{pageNo:n,coordinate:{leftTop:r,leftBottom:o}}=e,l=n*(this.draw.getHeight()+this.draw.getPageGap())+this.container.getBoundingClientRect().top,a=i===Kt.UP,R=o[0],c=a?r[1]+l:o[1]+l,u=Io(this.container),d={left:0,right:0,top:0,bottom:0};if(u===document.documentElement)d.right=window.innerWidth,d.bottom=window.innerHeight;else{const{left:L,right:O,top:P,bottom:M}=u.getBoundingClientRect();d.left=L,d.right=O,d.top=P,d.bottom=M}const{maskMargin:g}=this.options;if(d.top+=g[0],d.bottom-=g[2],!(R>=d.left&&R<=d.right&&c>=d.top&&c<=d.bottom)){const{scrollLeft:L,scrollTop:O}=u;a?u.scroll(L,O-(d.top-c)):u.scroll(L,O+c-d.bottom)}}}var rn;(function(s){s[s.LEFT=0]="LEFT",s[s.CENTER=1]="CENTER",s[s.RIGHT=2]="RIGHT"})(rn||(rn={}));const Qe=typeof navigator!="undefined"&&/Mac OS X/.test(navigator.userAgent),Yr=typeof navigator!="undefined"&&/iPad|iPhone/.test(navigator.userAgent);function Me(s){return Qe?s.metaKey:s.ctrlKey}var z;(function(s){s.Delete="Delete",s.Backspace="Backspace",s.Enter="Enter",s.Left="ArrowLeft",s.Right="ArrowRight",s.Up="ArrowUp",s.Down="ArrowDown",s.ESC="Escape",s.TAB="Tab",s.META="Meta",s.LEFT_BRACKET="[",s.RIGHT_BRACKET="]",s.COMMA=",",s.PERIOD=".",s.LEFT_ANGLE_BRACKET="<",s.RIGHT_ANGLE_BRACKET=">",s.EQUAL="=",s.MINUS="-",s.PLUS="+",s.A="a",s.B="b",s.C="c",s.D="d",s.E="e",s.F="f",s.G="g",s.H="h",s.I="i",s.J="j",s.K="k",s.L="l",s.M="m",s.N="n",s.O="o",s.P="p",s.Q="q",s.R="r",s.S="s",s.T="t",s.U="u",s.V="v",s.W="w",s.X="x",s.Y="y",s.Z="z",s.A_UPPERCASE="A",s.B_UPPERCASE="B",s.C_UPPERCASE="C",s.D_UPPERCASE="D",s.E_UPPERCASE="E",s.F_UPPERCASE="F",s.G_UPPERCASE="G",s.H_UPPERCASE="H",s.I_UPPERCASE="I",s.J_UPPERCASE="J",s.K_UPPERCASE="K",s.L_UPPERCASE="L",s.M_UPPERCASE="M",s.N_UPPERCASE="N",s.O_UPPERCASE="O",s.P_UPPERCASE="P",s.Q_UPPERCASE="Q",s.R_UPPERCASE="R",s.S_UPPERCASE="S",s.T_UPPERCASE="T",s.U_UPPERCASE="U",s.V_UPPERCASE="V",s.W_UPPERCASE="W",s.X_UPPERCASE="X",s.Y_UPPERCASE="Y",s.Z_UPPERCASE="Z",s.ZERO="0",s.ONE="1",s.TWO="2",s.THREE="3",s.FOUR="4",s.FIVE="5",s.SIX="6",s.SEVEN="7",s.EIGHT="8",s.NINE="9"})(z||(z={}));class Vi{constructor(t,e){h(this,"element");h(this,"control");this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getCode(){var t;return((t=this.element.control)==null?void 0:t.code)||null}getValue(){const t=this.control.getElementList(),{startIndex:e}=this.control.getRange(),i=t[e],n=[];let r=e;for(;r>0;){const l=t[r];if(l.controlId!==i.controlId||l.controlComponent===D.PREFIX)break;l.controlComponent===D.VALUE&&n.unshift(l),r--}let o=e+1;for(;o0;){const c=r[a];if(c.controlId!==l.controlId||c.controlComponent===D.PREFIX)break;if(c.controlComponent===D.CHECKBOX){const u=c.checkbox;u.value=t.includes(u.code)}a--}let R=o+1;for(;R0;){const c=r[a];if(c.controlId!==l.controlId||c.controlComponent===D.PREFIX)break;if(c.controlComponent===D.RADIO){const u=c.radio;u.value=t.includes(u.code)}a--}let R=o+1;for(;Rl===e.code);n.splice(o,1)}else(e==null?void 0:e.code)&&n.push(e.code);const r=t.getControl().getActiveControl();r instanceof Vi&&r.setSelect(n)}}function gs(s,t){const{radio:e,control:i}=s;if(!i)t.getRadioParticle().setSelect(s);else{const n=(e==null?void 0:e.code)?[e.code]:[],r=t.getControl().getActiveControl();r instanceof ln&&r.setSelect(n)}}function Ur(s,t){var U,f;if(s.button===rn.RIGHT)return;const e=t.getDraw(),i=e.isReadonly(),n=e.getRange(),r=e.getPosition();if(!t.isAllowDrag){const E=n.getRange();if(!i&&E.startIndex!==E.endIndex&&n.getIsPointInRange(s.offsetX,s.offsetY)){ds(t);return}}const l=s.target.dataset.index;l&&e.setPageNo(Number(l)),t.isAllowSelection=!0;const a=Ot(r.getPositionContext()),R=r.adjustPositionContext({x:s.offsetX,y:s.offsetY});if(!R)return;const{index:c,isDirectHit:u,isCheckbox:d,isRadio:g,isImage:L,isTable:O,tdValueIndex:P,hitLineStartIndex:M}=R;t.mouseDownStartPosition=tt(b({},R),{index:O?P:c,x:s.offsetX,y:s.offsetY});const T=e.getElementList(),X=r.getPositionList(),S=O?P:c,F=T[S],W=!!(u&&L),I=!!(u&&d),Z=!!(u&&g);if(~c){let E=S,G=S;if(s.shiftKey){const{startIndex:x}=n.getRange();~x&&r.getPositionContext().tdId===a.tdId&&(S>x?E=x:G=x)}if(n.setRange(E,G),r.setCursorPosition(X[S]),I&&!i)hs(F,e);else if(Z&&!i)gs(F,e);else if(F.controlComponent===D.VALUE&&(((U=F.control)==null?void 0:U.type)===dt.CHECKBOX||((f=F.control)==null?void 0:f.type)===dt.RADIO)){let x=S;for(;x>0;){const y=T[x];if(y.controlComponent===D.CHECKBOX){hs(y,e);break}else if(y.controlComponent===D.RADIO){gs(y,e);break}x--}}else e.render({curIndex:S,isCompute:!1,isSubmitHistory:!1,isSetCursor:!W&&!I&&!Z});M&&t.getDraw().getCursor().drawCursor({hitLineStartIndex:M})}const V=e.getPreviewer();if(V.clearResizer(),W){const E={dragDisable:i||!F.controlId&&e.getMode()===Rt.FORM};F.type===N.LATEX&&(E.mime="svg",E.srcKey="laTexSVG"),V.drawResizer(F,X[S],E),e.getCursor().drawCursor({isShow:!1}),ds(t),(F.imgDisplay===et.SURROUND||F.imgDisplay===et.FLOAT_TOP||F.imgDisplay===et.FLOAT_BOTTOM)&&e.getImageParticle().createFloatImage(F)}const m=e.getTableTool();m.dispose(),O&&!i&&e.getMode()!==Rt.FORM&&m.render();const Y=e.getHyperlinkParticle();Y.clearHyperlinkPopup(),F.type===N.HYPERLINK&&(Me(s)?Y.openHyperlink(F):Y.drawHyperlinkPopup(F,X[S]));const Q=e.getDateParticle();Q.clearDatePicker(),F.type===N.DATE&&!i&&Q.renderDatePicker(F,X[S])}function Yi(s){const t=Mt();return Reflect.set(s,"dragId",t),t}function Ui(s,t){return t.findIndex(e=>e.dragId===s)}function Ls(s,t,e){const i=e.getDraw();if(s.imgDisplay===et.SURROUND||s.imgDisplay===et.FLOAT_TOP||s.imgDisplay===et.FLOAT_BOTTOM){const n=t.offsetX-e.mouseDownStartPosition.x,r=t.offsetY-e.mouseDownStartPosition.y,o=s.imgFloatPosition;s.imgFloatPosition={x:o.x+n,y:o.y+r,pageNo:i.getPageNo()}}i.getImageParticle().destroyFloatImage()}function Zr(s,t){var e,i,n,r;if(t.isAllowDrop){const o=t.getDraw();if(o.isReadonly()||o.isDisabled()){t.mousedown(s);return}const l=o.getPosition(),a=l.getPositionList(),R=l.getPositionContext(),c=o.getRange(),u=t.cacheRange,d=t.cacheElementList,g=t.cachePositionList,L=c.getRange(),O=u.startIndex===u.endIndex,P=O?u.startIndex-1:u.startIndex,M=u.endIndex;if(L.startIndex>=P&&L.endIndex<=M&&((e=t.cachePositionContext)==null?void 0:e.tdId)===R.tdId){o.clearSideEffect();let ft=!1,it=!1;if(O){const Et=d[M];if(Et.type===N.IMAGE||Et.type===N.LATEX){if(Ls(Et,s,t),Et.imgDisplay===et.SURROUND||Et.imgDisplay===et.FLOAT_TOP||Et.imgDisplay===et.FLOAT_BOTTOM)o.getPreviewer().drawResizer(Et),ft=!0;else{const $t=g[M];o.getPreviewer().drawResizer(Et,$t)}it=Et.imgDisplay===et.SURROUND}}c.replaceRange(b({},u)),o.render({isCompute:it,isSubmitHistory:ft,isSetCursor:!1});return}const T=d.slice(P+1,M+1),X=T.find(ft=>ft.controlId);if(X){const ft=d[P+1],it=d[M];if(!((!ft.controlId||ft.controlComponent===D.PREFIX)&&(!it.controlId||it.controlComponent===D.POSTFIX)||ft.controlId===it.controlId&&ft.controlComponent===D.PREFIX&&it.controlComponent===D.POSTFIX||((i=ft.control)==null?void 0:i.type)===dt.TEXT&&ft.controlComponent===D.VALUE&&((n=it.control)==null?void 0:n.type)===dt.TEXT&&it.controlComponent===D.VALUE)){o.render({curIndex:L.startIndex,isCompute:!1,isSubmitHistory:!1});return}}const S=o.getControl(),F=o.getElementList(),W=!X||!!F[L.startIndex].controlId||!S.getIsElementListContainFullControl(T),I=o.getOptions(),Z=T.map(ft=>{if(!ft.type||ft.type===N.TEXT){const it={value:ft.value},Et=Fe;return W||Et.push(...Ai),Et.forEach($t=>{const Qt=ft[$t];Qt!==void 0&&(it[$t]=Qt)}),it}else{let it=Ot(ft);return W&&(it=Ne(it,Ai)),Bt([it],{isHandleFirstElement:!1,editorOptions:I}),it}});Ht(F,Z,L.startIndex,{editorOptions:o.getOptions()});const V=d[P],m=g[P],Y=Yi(d[P]),Q=Yi(d[M]),U=Z.length;let f=L.startIndex,E=f+U;const G=S.getActiveControl();if(G&&d[f].controlComponent!==D.POSTFIX?(E=G.setValue(Z),f=E-U):o.spliceElementList(F,f+1,0,...Z),!~E){o.render({isSetCursor:!1});return}const x=Yi(F[f]),y=Yi(F[E]),J=Ui(Y,d),q=Ui(Q,d),st=d[q];st.controlId&&st.controlComponent!==D.POSTFIX?(c.replaceRange(tt(b({},u),{startIndex:J,endIndex:q})),(r=S.getActiveControl())==null||r.cut()):o.spliceElementList(d,J+1,q-J);const Wt=F[L.startIndex],ot=a[L.startIndex];let $=R.index;$&&(Wt.tableId&&!V.tableId?m.index<$&&($-=U):!Wt.tableId&&V.tableId&&ot.index<$&&($+=U),l.setPositionContext(tt(b({},R),{index:$})));const C=Ui(x,F),St=Ui(y,F);c.setRange(O?St:C,St,L.tableId,L.startTdIndex,L.endTdIndex,L.startTrIndex,L.endTrIndex),o.clearSideEffect();let A=null;if(O){const it=o.getElementList()[St];(it.type===N.IMAGE||it.type===N.LATEX)&&(Ls(it,s,t),A=it)}if(o.render({isSetCursor:!1}),A)if(A.imgDisplay===et.SURROUND||A.imgDisplay===et.FLOAT_TOP||A.imgDisplay===et.FLOAT_BOTTOM)o.getPreviewer().drawResizer(A);else{const it=l.getPositionList()[St];o.getPreviewer().drawResizer(A,it)}}else t.isAllowDrag&&t.mousedown(s)}function Qr(s,t){const i=t.getDraw().getPageContainer(),{x:n,y:r,width:o,height:l}=i.getBoundingClientRect();s.x>=n&&s.x<=n+o&&s.y>=r&&s.y<=r+l||t.setIsAllowSelection(!1)}function Dr(s,t){var S;const e=t.getDraw();if(t.isAllowDrag){const F=s.offsetX,W=s.offsetY,{startIndex:I,endIndex:Z}=t.cacheRange,V=t.cachePositionList;for(let Y=I+1;Y<=Z;Y++){const{coordinate:{leftTop:Q,rightBottom:U}}=V[Y];if(F>=Q[0]&&F<=U[0]&&W>=Q[1]&&W<=U[1])return}const m=(S=t.cacheRange)==null?void 0:S.startIndex;if(m){const Y=t.cacheElementList[m];(Y==null?void 0:Y.type)===N.IMAGE&&(Y.imgDisplay===et.SURROUND||Y.imgDisplay===et.FLOAT_TOP||Y.imgDisplay===et.FLOAT_BOTTOM)&&(e.getPreviewer().clearResizer(),e.getImageParticle().dragFloatImage(s.movementX,s.movementY))}t.dragover(s),t.isAllowDrop=!0;return}if(!t.isAllowSelection||!t.mouseDownStartPosition)return;const n=s.target.dataset.index;n&&e.setPageNo(Number(n));const o=e.getPosition().getPositionByXY({x:s.offsetX,y:s.offsetY});if(!~o.index)return;const{index:l,isTable:a,tdValueIndex:R,tdIndex:c,trIndex:u,tableId:d}=o,{index:g,isTable:L,tdIndex:O,trIndex:P,tableId:M}=t.mouseDownStartPosition,T=a?R:l,X=e.getRange();if(a&&L&&(c!==O||u!==P))X.setRange(T,T,d,O,c,P,u);else{let F=~T?T:0;if((L||a)&&M!==d)return;let W=g;if(W>F&&([W,F]=[F,W]),W===F)return;const I=e.getElementList(),Z=I[W+1],V=I[F];if((Z==null?void 0:Z.controlComponent)===D.PLACEHOLDER&&(V==null?void 0:V.controlComponent)===D.PLACEHOLDER&&Z.controlId===V.controlId)return;X.setRange(W,F)}e.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}function Kr(s,t){const e=t.getDraw();if(e.isReadonly())return;const i=e.getRange();if(!i.getIsCanInput())return;const{startIndex:n,endIndex:r,isCrossRowCol:o}=i.getRange(),l=e.getControl();let a;if(o){const R=e.getTableParticle().getRangeRowCol();if(!R)return;let c=!1;for(let u=0;u1&&(e.spliceElementList(L.value,1,L.value.length-1),c=!0)}}a=c?0:null}else if(l.getActiveControl()&&l.getIsRangeCanCaptureEvent())a=l.keydown(s);else{const c=e.getPosition().getCursorPosition();if(!c)return;const{index:u}=c,d=i.getIsCollapsed(),g=e.getElementList();if(d&&u===0){const O=g[u];if(O.value===k){O.listId&&e.getListParticle().unsetList(),s.preventDefault();return}}const L=g[n];if(d&&L.rowFlex&&L.value===k){const O=i.getRangeRowElementList();if(O){const P=g[n-1];O.forEach(M=>{M.rowFlex=P==null?void 0:P.rowFlex})}}d?e.spliceElementList(g,u,1):e.spliceElementList(g,n+1,r-n),a=d?u-1:n}e.getGlobalEvent().setCanvasEventAbility(),a===null?(i.setRange(n,n),e.render({curIndex:n,isSubmitHistory:!1})):(i.setRange(a,a),e.render({curIndex:a}))}function Er(s,t){var c;const e=t.getDraw();if(e.isReadonly())return;const i=e.getRange();if(!i.getIsCanInput())return;const{startIndex:n,endIndex:r,isCrossRowCol:o}=i.getRange(),l=e.getElementList(),a=e.getControl();let R;if(o){const u=e.getTableParticle().getRangeRowCol();if(!u)return;let d=!1;for(let g=0;g1&&(e.spliceElementList(P.value,1,P.value.length-1),d=!0)}}R=d?0:null}else if(a.getActiveControl()&&a.getIsRangeWithinControl())R=a.keydown(s);else if((c=l[r+1])==null?void 0:c.controlId)R=a.removeControl(r+1);else{const u=e.getPosition(),d=u.getCursorPosition();if(!d)return;const{index:g}=d,L=u.getPositionContext();if(L.isDirectHit&&L.isImage)e.spliceElementList(l,g,1),R=g-1;else{const O=i.getIsCollapsed();if(!O)e.spliceElementList(l,n+1,r-n);else{if(!l[g+1])return;e.spliceElementList(l,g+1,1)}R=O?g:n}}e.getGlobalEvent().setCanvasEventAbility(),R===null?(i.setRange(n,n),e.render({curIndex:n,isSubmitHistory:!1})):(i.setRange(R,R),e.render({curIndex:R}))}function br(s,t){var L,O;const e=t.getDraw();if(e.isReadonly())return;const i=e.getRange();if(!i.getIsCanInput())return;const{startIndex:n,endIndex:r}=i.getRange(),o=i.getIsCollapsed(),l=e.getElementList(),a=l[n],R=l[r];if(o&&R.listId&&R.value===k&&((L=l[r+1])==null?void 0:L.listId)!==R.listId){e.getListParticle().unsetList();return}const c={value:k};if(s.shiftKey&&a.listId&&(c.listWrap=!0),Ht(l,[c],n,{isBreakWhenWrap:!0,editorOptions:e.getOptions()}),!(R.titleId&&R.titleId!==((O=l[r+1])==null?void 0:O.titleId))){const P=He(l,r);if(P){const M=[...Ze];P.controlComponent!==D.POSTFIX&&M.push(...Fe),M.forEach(T=>{const X=P[T];X!==void 0&&(c[T]=X)})}}const u=e.getControl(),d=u.getActiveControl();let g;if(d&&u.getIsRangeWithinControl())g=u.setValue([c]);else{const M=e.getPosition().getCursorPosition();if(!M)return;const{index:T}=M;o?e.spliceElementList(l,T+1,0,c):e.spliceElementList(l,n+1,r-n,c),g=T+1}~g&&(i.setRange(g,g),e.render({curIndex:g})),s.preventDefault()}function xr(s,t){var X,S;const e=t.getDraw();if(e.isReadonly())return;const n=e.getPosition(),r=n.getCursorPosition();if(!r)return;const o=n.getPositionContext(),{index:l}=r;if(l<=0&&!o.isTable)return;const a=e.getRange(),{startIndex:R,endIndex:c}=a.getRange(),u=a.getIsCollapsed(),d=e.getElementList(),g=e.getControl();if(e.getMode()===Rt.FORM&&g.getActiveControl()&&((X=d[l])==null?void 0:X.controlComponent)===D.PREFIX){g.initNextControl({direction:Kt.UP});return}let L=1;if(Me(s)){const F=e.getLetterReg(),W=s.shiftKey&&!u&&R===(r==null?void 0:r.index)?c:R;if(F.test((S=d[W])==null?void 0:S.value)){let I=W-1;for(;I>0;){const Z=d[I];if(!F.test(Z.value))break;L++,I--}}}const O=R-L;let P=O,M=O;if(s.shiftKey&&r&&(R!==c?R===r.index?(P=R,M=c-L):(P=O,M=c):M=c),!s.shiftKey){const F=d[R];if(F.type===N.TABLE){const W=F.trList,I=W.length-1,Z=W[I],V=Z.tdList.length-1,m=Z.tdList[V];n.setPositionContext({isTable:!0,index:R,trIndex:I,tdIndex:V,tdId:m.id,trId:Z.id,tableId:F.id}),P=m.value.length-1,M=P,e.getTableTool().render()}else if(F.tableId&&R===0){const I=e.getOriginalElementList()[o.index].trList;t:for(let Z=0;Zl.length-1&&!a.isTable)return;const R=e.getRange(),{startIndex:c,endIndex:u}=R.getRange(),d=R.getIsCollapsed();let g=e.getElementList();const L=e.getControl();if(e.getMode()===Rt.FORM&&L.getActiveControl()&&((F=g[o+1])==null?void 0:F.controlComponent)===D.POSTFIX){L.initNextControl({direction:Kt.DOWN});return}let O=1;if(Me(s)){const I=e.getLetterReg(),Z=s.shiftKey&&!d&&c===(r==null?void 0:r.index)?u:c;if(I.test((W=g[Z+1])==null?void 0:W.value)){let V=Z+2;for(;VU.length-1&&(G=Y+1,x=0);const y=m[G],J=y.tdList[x];n.setPositionContext({isTable:!0,index:a.index,trIndex:G,tdIndex:x,tdId:J.id,trId:y.id,tableId:I.tableId}),M=0,T=M,e.getTableTool().render()}break t}}}}const X=g.length-1;if(M>X||T>X)return;R.setRange(M,T);const S=M===T;e.render({curIndex:S?M:void 0,isSetCursor:S,isSubmitHistory:!1,isCompute:!1}),s.preventDefault()}function wr(s,t){const e=t.getDraw();if(e.isReadonly())return;s.preventDefault();const n=e.getControl();if(n.getActiveControl()&&n.getIsRangeWithinControl())n.initNextControl({direction:s.shiftKey?Kt.UP:Kt.DOWN});else{const o={type:N.TAB,value:""},l=e.getRange(),{startIndex:a}=l.getRange(),R=e.getElementList();Ht(R,[o],a,{editorOptions:e.getOptions()}),e.insertElementList([o])}}function an(s){const{positionList:t,index:e,isUp:i,rowNo:n,cursorX:r}=s;let o=-1;const l=[];if(i){let a=e-1;for(;a>=0;){const R=t[a];if(a--,R.rowNo!==n){if(l[0]&&l[0].rowNo!==R.rowNo)break;l.unshift(R)}}}else{let a=e+1;for(;au)){o=R.index;break}}return o}function Hr(s,t){const e=t.getDraw();if(e.isReadonly())return;const n=e.getPosition(),r=n.getCursorPosition();if(!r)return;const o=e.getRange(),{startIndex:l,endIndex:a}=o.getRange();let R=n.getPositionList();const c=s.key===z.Up;let u=-1,d=-1;const g=n.getPositionContext();if(!s.shiftKey&&g.isTable&&(c&&r.rowIndex===0||!c&&r.rowIndex===e.getRowCount()-1)){const{index:O,trIndex:P,tdIndex:M,tableId:T}=g;if(c)if(P===0)n.setPositionContext({isTable:!1}),u=O-1,d=u,e.getTableTool().dispose();else{let X=-1,S=-1;const W=e.getOriginalElementList()[O].trList,I=W[P].tdList[M].colIndex;t:for(let m=P-1;m>=0;m--){const Q=W[m].tdList;for(let U=0;U=I&&f.colIndex<=I){X=m,S=U;break t}}}if(!~X||!~S)return;const Z=W[X],V=Z.tdList[S];n.setPositionContext({isTable:!0,index:O,trIndex:X,tdIndex:S,tdId:V.id,trId:Z.id,tableId:T}),u=V.value.length-1,d=u,e.getTableTool().render()}else{const S=e.getOriginalElementList()[O].trList;if(P===S.length-1)n.setPositionContext({isTable:!1}),u=O,d=u,e.getTableTool().dispose();else{let F=-1,W=-1;const I=S[P].tdList[M].colIndex;t:for(let m=P+1;m=I&&f.colIndex<=I){F=m,W=U;break t}}}if(!~F||!~W)return;const Z=S[F],V=Z.tdList[W];n.setPositionContext({isTable:!0,index:O,trIndex:F,tdIndex:W,tdId:V.id,trId:Z.id,tableId:T}),u=V.value.length-1,d=u,e.getTableTool().render()}}}else{let O=r;s.shiftKey&&(l===r.index?O=R[a]:O=R[l]);const{index:P,rowNo:M,rowIndex:T,coordinate:{rightTop:[X]}}=O;if(c&&T===0||!c&&T===e.getRowCount()-1)return;const S=an({positionList:R,index:P,rowNo:M,isUp:c,cursorX:X});if(S<0)return;u=S,d=S,s.shiftKey&&(l!==a?l===r.index?u=l:d=a:c?d=a:u=l);const W=e.getElementList()[S];if(W.type===N.TABLE){const{scale:I}=e.getOptions(),Z=e.getMargins(),V=W.trList;let m=-1,Y=-1,Q=-1;if(c){t:for(let U=V.length-1;U>=0;U--){const E=V[U].tdList;for(let G=0;G=y&&X<=y+J){const q=x.positionList,st=q[q.length-1],Wt=an({positionList:q,index:st.index+1,rowNo:st.rowNo-1,isUp:c,cursorX:X})||st.index;m=U,Y=G,Q=Wt;break t}}}}else{t:for(let U=0;U=y&&X<=y+J){const q=x.positionList,st=an({positionList:q,index:-1,rowNo:-1,isUp:c,cursorX:X})||0;m=U,Y=G,Q=st;break t}}}}if(~m&&~Y&&~Q){const U=V[m],f=U.tdList[Y];n.setPositionContext({isTable:!0,index:S,trIndex:m,tdIndex:Y,tdId:f.id,trId:U.id,tableId:W.id}),u=Q,d=u,R=n.getPositionList(),e.getTableTool().render()}}}if(!~u||!~d)return;u>d&&([u,d]=[d,u]),o.setRange(u,d);const L=u===d;e.render({curIndex:L?u:void 0,isSetCursor:L,isSubmitHistory:!1,isCompute:!1}),e.getCursor().moveCursorToVisible({cursorPosition:R[c?u:d],direction:c?Kt.UP:Kt.DOWN})}function yr(s,t){if(t.isComposing)return;const e=t.getDraw();if(s.key===z.Backspace)Kr(s,t);else if(s.key===z.Delete)Er(s,t);else if(s.key===z.Enter)br(s,t);else if(s.key===z.Left)xr(s,t);else if(s.key===z.Right)Cr(s,t);else if(s.key===z.Up||s.key===z.Down)Hr(s,t);else if(Me(s)&&s.key===z.Z){if(e.isReadonly()&&e.getMode()!==Rt.FORM)return;e.getHistoryManager().undo(),s.preventDefault()}else if(Me(s)&&s.key===z.Y){if(e.isReadonly()&&e.getMode()!==Rt.FORM)return;e.getHistoryManager().redo(),s.preventDefault()}else if(Me(s)&&s.key===z.C)t.copy(),s.preventDefault();else if(Me(s)&&s.key===z.X)t.cut(),s.preventDefault();else if(Me(s)&&s.key===z.A)t.selectAll(),s.preventDefault();else if(Me(s)&&s.key===z.S){if(e.isReadonly())return;const i=e.getListener();i.saved&&i.saved(e.getValue());const n=e.getEventBus();n.isSubscribe("saved")&&n.emit("saved",e.getValue()),s.preventDefault()}else if(s.key===z.ESC){t.clearPainterStyle();const i=e.getZone();i.isMainActive()||i.setZone(lt.MAIN),s.preventDefault()}else s.key===z.TAB&&wr(s,t)}function Os(s,t){var F;const e=t.getDraw();if(e.isReadonly()||e.isDisabled())return;const n=e.getPosition().getCursorPosition();if(!s||!n)return;const r=t.isComposing;if(r&&((F=t.compositionInfo)==null?void 0:F.value)===s)return;const o=e.getRange();if(!o.getIsCanInput())return;Ms(t),r||e.getCursor().clearAgentDomValue();const{TEXT:l,HYPERLINK:a,SUBSCRIPT:R,SUPERSCRIPT:c,DATE:u}=N,d=s.replaceAll(` +`,k),{startIndex:g,endIndex:L}=o.getRange(),O=e.getElementList(),P=He(O,L);if(!P)return;const M=e.isDesignMode(),T=jt(d).map(W=>{var Z,V;const I={value:W};if(M||!((Z=P.title)==null?void 0:Z.disabled)&&!((V=P.control)==null?void 0:V.disabled)){const m=O[L+1];(!P.type||P.type===l||P.type===a&&(m==null?void 0:m.type)===a||P.type===u&&(m==null?void 0:m.type)===u||P.type===R&&(m==null?void 0:m.type)===R||P.type===c&&(m==null?void 0:m.type)===c)&&Qo.forEach(Y=>{if(Y==="groupIds"&&!(m==null?void 0:m.groupIds))return;const Q=P[Y];Q!==void 0&&(I[Y]=Q)}),r&&(I.underline=!0)}return I}),X=e.getControl();let S;if(X.getActiveControl()&&X.getIsRangeWithinControl())S=X.setValue(T);else{const W=g+1;g!==L&&e.spliceElementList(O,W,L-g),Ht(O,T,g,{editorOptions:e.getOptions()}),e.spliceElementList(O,W,0,...T),S=g+T.length}~S&&(o.setRange(S,S),e.render({curIndex:S,isSubmitHistory:!r})),r&&(t.compositionInfo={elementList:O,value:d,startIndex:S-T.length,endIndex:S})}function Ms(s){if(!s.compositionInfo)return;const{elementList:t,startIndex:e,endIndex:i}=s.compositionInfo;t.splice(e+1,i-e),s.getDraw().getRange().setRange(e,e),s.compositionInfo=null}function Gr(s){const t=s.getDraw(),e=t.getRange(),{startIndex:i,endIndex:n}=e.getRange();if(!~i&&!~i||t.isReadonly()||!e.getIsCanInput())return;const r=t.getElementList();let o=i,l=n;if(i===n){const d=t.getPosition().getPositionList(),g=d[i],L=g.rowNo,O=g.pageNo,P=[];for(let T=0;TO)break;X.pageNo===O&&X.rowNo===L&&P.push(T)}const M=P[0]-1;o=M<0?0:M,l=P[P.length-1]}const a=t.getOptions();cs(r.slice(o+1,l+1),a);const R=t.getControl();let c;R.getActiveControl()&&R.getIsRangeWithinControl()?c=R.cut():(t.spliceElementList(r,o+1,l-o),c=o),e.setRange(c,c),t.render({curIndex:c})}function vr(s){const t=s.getDraw(),{copy:e}=t.getOverride();if(e){const o=e();if((o==null?void 0:o.preventDefault)!==!1)return}const i=t.getRange();let n=null;if(i.getRange().isCrossRowCol){const o=i.getRangeTableElement();if(!o)return;const l=t.getTableParticle().getRangeRowCol();if(!l)return;const a={type:N.TABLE,value:"",colgroup:[],trList:[]},R=l[0],c=R[0].colIndex,u=R[R.length-1],d=u.colIndex+u.colspan-1;for(let g=c;g<=d;g++)a.colgroup.push(o.colgroup[g]);for(let g=0;g!g.type||g.type!==N.CONTROL&&se.includes(g.type)?g.value:k).join(""))||"";if(!r)return null;const o=e.index,l=n.startIndex,R=new Intl.Segmenter(void 0,{granularity:"word"}).segment(r);let c=-1,u=-1;for(const{segment:g,index:L,isWordLike:O}of R){const P=L+l;if(O&&o>=P&&o0;){const g=c[u].value;if(a&&wi.test(g)||!a&&r.test(g))o++,u--;else break}let d=n+1;for(;d0;){const O=r[a],P=r[a-1];if(O.value===k&&!O.listWrap||O.listId!==(P==null?void 0:P.listId)||O.titleId!==(P==null?void 0:P.titleId))break;o++,a--}let R=n+1;for(;Rr.length-1)&&(d-=1),c.setRange(u,d),t.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}var Ps={dblclick:kr,threeClick:_r};function zr(s){s.isComposing=!0}function $r(s,t){s.isComposing=!1;const e=s.getDraw();if(t.data)setTimeout(()=>{s.compositionInfo&&Os(t.data,s)},1);else{Ms(s);const n=e.getRange(),{endIndex:r}=n.getRange();e.render({curIndex:r,isSubmitHistory:!1})}e.getCursor().clearAgentDomValue()}var Ts={compositionstart:zr,compositionend:$r};function qr(s,t){const e=t.getDraw();if(e.isReadonly())return;s.preventDefault();const n=e.getPageContainer();if(!Mi(s.target,T=>T===n,!0))return;const l=s.target.dataset.index;l&&e.setPageNo(Number(l));const a=e.getPosition(),R=a.adjustPositionContext({x:s.offsetX,y:s.offsetY});if(!R)return;const{isTable:c,tdValueIndex:u,index:d}=R,g=a.getPositionList(),L=c?u:d;~d&&(e.getRange().setRange(L,L),a.setCursorPosition(g[L]));const O=e.getCursor(),{cursor:{dragColor:P,dragWidth:M}}=e.getOptions();O.drawCursor({width:M,color:P,isBlink:!1})}var jr={dragover:qr};class tl{constructor(t){h(this,"isAllowSelection");h(this,"isComposing");h(this,"compositionInfo");h(this,"isAllowDrag");h(this,"isAllowDrop");h(this,"cacheRange");h(this,"cacheElementList");h(this,"cachePositionList");h(this,"cachePositionContext");h(this,"mouseDownStartPosition");h(this,"draw");h(this,"pageContainer");h(this,"pageList");h(this,"range");h(this,"position");this.draw=t,this.pageContainer=t.getPageContainer(),this.pageList=t.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)),fo(this.pageContainer,this.threeClick.bind(this))}setIsAllowSelection(t){this.isAllowSelection=t,t||this.applyPainterStyle()}setIsAllowDrag(t){this.isAllowDrag=t,this.isAllowDrop=t}clearPainterStyle(){this.pageList.forEach(t=>{t.style.cursor="text"}),this.draw.setPainterStyle(null)}applyPainterStyle(){const t=this.draw.getPainterStyle();if(!t||this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelection();if(!i)return;const n=Object.keys(t);i.forEach(o=>{n.forEach(l=>{const a=l;o[a]=t[a]})}),this.draw.render({isSetCursor:!1});const r=this.draw.getPainterOptions();(!r||!r.isDblclick)&&this.clearPainterStyle()}selectAll(){const t=this.position.getPositionList();this.range.setRange(0,t.length-1),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1})}mousemove(t){Dr(t,this)}mousedown(t){Ur(t,this)}click(){Yr&&!this.draw.isReadonly()&&this.draw.getCursor().getAgentDom().focus()}mouseup(t){Zr(t,this)}mouseleave(t){Qr(t,this)}keydown(t){yr(t,this)}dblclick(t){Ps.dblclick(this,t)}threeClick(){Ps.threeClick(this)}input(t){Os(t,this)}cut(){Gr(this)}copy(){vr(this)}compositionstart(){Ts.compositionstart(this)}compositionend(t){Ts.compositionend(this,t)}drop(t){Jr(t,this)}dragover(t){jr.dragover(t,this)}}class el{constructor(t,e){h(this,"draw");h(this,"options");h(this,"cursor");h(this,"canvasEvent");h(this,"range");h(this,"previewer");h(this,"tableTool");h(this,"hyperlinkParticle");h(this,"control");h(this,"dateParticle");h(this,"imageParticle");h(this,"dprMediaQueryList");h(this,"clearSideEffect",t=>{if(!this.cursor)return;const e=(t==null?void 0:t.composedPath()[0])||t.target,i=this.draw.getPageList();if(Mi(e,o=>i.includes(o),!0)){this.setRangeStyle();return}if(Mi(e,o=>!!o&&o.nodeType===1&&!!o.getAttribute(he),!0)){this.setRangeStyle(),this.watchCursorActive();return}this.cursor.recoveryCursor(),this.range.recoveryRangeStyle(),this.previewer.clearResizer(),this.tableTool.dispose(),this.hyperlinkParticle.clearHyperlinkPopup(),this.control.destroyControl(),this.dateParticle.clearDatePicker(),this.imageParticle.destroyFloatImage()});h(this,"setCanvasEventAbility",()=>{this.canvasEvent.setIsAllowDrag(!1),this.canvasEvent.setIsAllowSelection(!1)});h(this,"setRangeStyle",()=>{this.range.setRangeStyle()});h(this,"setPageScale",t=>{if(!t.ctrlKey)return;t.preventDefault();const{scale:e}=this.options;if(t.deltaY<0){const i=e*10+1;i<=30&&this.draw.setPageScale(i/10)}else{const i=e*10-1;i>=5&&this.draw.setPageScale(i/10)}});h(this,"_handleVisibilityChange",()=>{if(document.visibilityState==="visible"){const t=this.range.getRange(),e=!!~t.startIndex&&!!~t.endIndex&&t.startIndex===t.endIndex;this.range.replaceRange(t),this.draw.render({isSetCursor:e,isCompute:!1,isSubmitHistory:!1,curIndex:t.startIndex})}});h(this,"_handleDprChange",()=>{this.draw.setPageDevicePixel()});this.draw=t,this.options=t.getOptions(),this.canvasEvent=e,this.cursor=null,this.range=t.getRange(),this.previewer=t.getPreviewer(),this.tableTool=t.getTableTool(),this.hyperlinkParticle=t.getHyperlinkParticle(),this.dateParticle=t.getDateParticle(),this.imageParticle=t.getImageParticle(),this.control=t.getControl(),this.dprMediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`)}register(){this.cursor=this.draw.getCursor(),this.addEvent()}addEvent(){window.addEventListener("blur",this.clearSideEffect),document.addEventListener("keyup",this.setRangeStyle),document.addEventListener("click",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("keyup",this.setRangeStyle),document.removeEventListener("click",this.clearSideEffect),document.removeEventListener("mouseup",this.setCanvasEventAbility),document.removeEventListener("wheel",this.setPageScale),document.removeEventListener("visibilitychange",this._handleVisibilityChange),this.dprMediaQueryList.removeEventListener("change",this._handleDprChange)}watchCursorActive(){!this.range.getIsCollapsed()||setTimeout(()=>{var t,e;((t=this.cursor)==null?void 0:t.getAgentIsActive())||(e=this.cursor)==null||e.drawCursor({isFocus:!1,isBlink:!1})})}}class il{constructor(t){h(this,"undoStack",[]);h(this,"redoStack",[]);h(this,"maxRecordCount");this.maxRecordCount=t.getOptions().historyMaxRecordCount+1}undo(){if(this.undoStack.length>1){const t=this.undoStack.pop();this.redoStack.push(t),this.undoStack.length&&this.undoStack[this.undoStack.length-1]()}}redo(){if(this.redoStack.length){const t=this.redoStack.pop();this.undoStack.push(t),t()}}execute(t){for(this.undoStack.push(t),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()}}class nl{constructor(t){h(this,"cursorPosition");h(this,"positionContext");h(this,"positionList");h(this,"floatPositionList");h(this,"draw");h(this,"eventBus");h(this,"options");this.positionList=[],this.floatPositionList=[],this.cursorPosition=null,this.positionContext={isTable:!1,isControl:!1},this.draw=t,this.eventBus=t.getEventBus(),this.options=t.getOptions()}getFloatPositionList(){return this.floatPositionList}getTablePositionList(t){const{index:e,trIndex:i,tdIndex:n}=this.positionContext;return t[e].trList[i].tdList[n].positionList||[]}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(){const t=this.draw.getZone();return t.isHeaderActive()?this.draw.getHeader().getPositionList():t.isFooterActive()?this.draw.getFooter().getPositionList():this.positionList}getOriginalMainPositionList(){return this.positionList}getSelectionPositionList(){const{startIndex:t,endIndex:e}=this.draw.getRange().getRange();return t===e?null:this.getPositionList().slice(t+1,e+1)}setPositionList(t){this.positionList=t}setFloatPositionList(t){this.floatPositionList=t}computePageRowPosition(t){const{positionList:e,rowList:i,pageNo:n,startX:r,startY:o,startRowIndex:l,startIndex:a,innerWidth:R,zone:c}=t,{scale:u,table:{tdPadding:d}}=this.options;let g=r,L=o,O=a;for(let P=0;Pq+st.height,0),y=(f.height-m)*u-x,J=f.verticalAlign===It.MIDDLE?y/2:y;Math.floor(J)>0&&f.positionList.forEach(q=>{const{coordinate:{leftTop:st,leftBottom:Wt,rightBottom:ot,rightTop:$}}=q;st[1]+=J,Wt[1]+=J,ot[1]+=J,$[1]+=J})}g=G.x,L=G.y}}g=T,L=X}}g=r,L+=M.height}return{x:g,y:L,index:O}}computePositionList(){var R;this.positionList=[];const t=this.draw.getInnerWidth(),e=this.draw.getPageRowList(),i=this.draw.getMargins(),n=i[3],o=this.draw.getHeader().getExtraHeight(),l=i[0]+o;let a=0;for(let c=0;cc)break;if(V[0]-I<=e&&m[0]>=e&&V[1]<=i&&Y[1]>=i){let Q=S;const U=r[S];if(U.type===N.TABLE)for(let E=0;ES.isLastLetter&&S.pageNo===c);for(let S=0;SI[1]&&i<=Z[1]){const V=o.findIndex(U=>U.pageNo===c&&U.rowNo===W),m=r[V],Y=o[V],Q=m.listStyle===Gt.CHECKBOX?this.options.margins[3]:Y.coordinate.leftTop[0];if(eV)return{index:-1,zone:lt.FOOTER}}else if(i<=V&&i>=W)return{index:-1,zone:lt.MAIN};const m=this.draw.getMargins();if(i<=m[0])for(let Y=0;Y=U[0]&&e<=f[0]||((P=o[Y+1])==null?void 0:P.rowNo)!==0)return{index:Q.index}}else{const Y=L[L.length-1];if(Y){const Q=Y.rowNo;for(let U=0;U=E[0]&&e<=G[0]||((M=o[U+1])==null?void 0:M.rowNo)!==Q)return{index:f.index}}}}return{index:((T=L[L.length-1])==null?void 0:T.index)||o.length-1}}return{hitLineStartIndex:g,index:d,isControl:!!((X=r[d])==null?void 0:X.controlId)}}getFloatPositionByXY(t){var o;const{x:e,y:i}=t,n=(o=t.pageNo)!=null?o:this.draw.getPageNo(),r=this.draw.getZone().getZone();for(let l=0;l=M.x&&e<=M.x+R.width&&i>=M.y&&i<=M.y+R.height)return c?{index:u,isDirectHit:!0,isImage:!0,isTable:c,trIndex:d,tdIndex:g,tdValueIndex:L,tdId:R.tdId,trId:R.trId,tableId:R.tableId}:{index:a.index,isDirectHit:!0,isImage:!0}}}}adjustPositionContext(t){const e=this.getPositionByXY(t);if(!~e.index)return null;if(e.isControl&&this.draw.getMode()!==Rt.READONLY){const{index:O,isTable:P,trIndex:M,tdIndex:T,tdValueIndex:X}=e,S=this.draw.getControl(),{newIndex:F}=S.moveCursor({index:O,isTable:P,trIndex:M,tdIndex:T,tdValueIndex:X});P?e.tdValueIndex=F:e.index=F}const{index:i,isCheckbox:n,isRadio:r,isControl:o,isImage:l,isDirectHit:a,isTable:R,trIndex:c,tdIndex:u,tdId:d,trId:g,tableId:L}=e;return this.setPositionContext({isTable:R||!1,isCheckbox:n||!1,isRadio:r||!1,isControl:o||!1,isImage:l||!1,isDirectHit:a||!1,index:i,trIndex:c,tdIndex:u,tdId:d,trId:g,tableId:L}),e}setSurroundPosition(t){var c;const{pageNo:e,row:i,rowElement:n,rowElementRect:r,surroundElementList:o,availableWidth:l}=t;let a=r.x,R=0;if(o.length&&!ye(n)&&!((c=n.control)==null?void 0:c.minWidth))for(let u=0;ul){n.left=0,i.width-=R;break}}}return{x:a,rowIncreaseWidth:R}}}class sl{constructor(t){h(this,"draw");h(this,"options");h(this,"range");h(this,"listener");h(this,"eventBus");h(this,"position");h(this,"historyManager");this.draw=t,this.options=t.getOptions(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.position=t.getPosition(),this.historyManager=t.getHistoryManager(),this.range={startIndex:-1,endIndex:-1}}getRange(){return this.range}clearRange(){this.setRange(-1,-1)}getIsCollapsed(){const{startIndex:t,endIndex:e}=this.range;return t===e}getIsSelection(){const{startIndex:t,endIndex:e}=this.range;return!~t&&!~e?!1:t!==e}getSelection(){const{startIndex:t,endIndex:e}=this.range;return t===e?null:this.draw.getElementList().slice(t+1,e+1)}getSelectionElementList(){if(this.range.isCrossRowCol){const t=this.draw.getTableParticle().getRangeRowCol();if(!t)return null;const e=[];for(let i=0;i!e.type||se.includes(e.type)):null}getTextLikeSelectionElementList(){const t=this.getSelectionElementList();return t?t.filter(e=>!e.type||se.includes(e.type)):null}getRangeRow(){const{startIndex:t,endIndex:e}=this.range;if(!~t&&!~e)return null;const i=this.position.getPositionList(),n=new Map;for(let r=t;r=0;){const{pageNo:R,rowNo:c}=i[o];let u=r.get(R);u||(u=[],r.set(R,u)),u.includes(c)||u.unshift(c);const d=n[o],g=n[o-1];if(d.value===k&&!d.listWrap||d.listId!==(g==null?void 0:g.listId)||d.titleId!==(g==null?void 0:g.titleId))break;o--}const l=t===e;if(!l){let R=t+1;for(;R=a[0]&&t<=R[0]&&e>=a[1]&&e<=R[1])return!0}return!1}getKeywordRangeList(t){const e=this.draw.getSearch().getMatchList(t,this.draw.getOriginalElementList()),i=new Map;for(const r of e){const o=i.get(r.groupId);if(o)o.endIndex+=1;else{const{type:l,groupId:a,tableId:R,index:c,tdIndex:u,trIndex:d}=r,g={startIndex:c,endIndex:c};l===Pe.TABLE&&(g.tableId=R,g.startTdIndex=u,g.endTdIndex=u,g.startTrIndex=d,g.endTrIndex=d),i.set(a,g)}}const n=[];return i.forEach(r=>{n.push(r)}),n}getIsCanInput(){const{startIndex:t,endIndex:e}=this.getRange();if(!~t&&!~e)return!1;if(t===e)return!0;const i=this.draw.getElementList(),n=i[t],r=i[e];return!n.controlId&&!r.controlId||(!n.controlId||n.controlComponent===D.POSTFIX)&&(!r.controlId||r.controlComponent===D.POSTFIX)||!!n.controlId&&r.controlId===n.controlId&&r.controlComponent!==D.POSTFIX}setRange(t,e,i,n,r,o,l){this.range.startIndex=t,this.range.endIndex=e,this.range.tableId=i,this.range.startTdIndex=n,this.range.endTdIndex=r,this.range.startTrIndex=o,this.range.endTrIndex=l,this.range.isCrossRowCol=!!(n||r||o||l),this.range.zone=this.draw.getZone().getZone();const a=this.draw.getControl();if(~t&&~e){const c=this.draw.getElementList()[t];if(c==null?void 0:c.controlId){a.initControl();return}}a.destroyControl()}replaceRange(t){this.setRange(t.startIndex,t.endIndex,t.tableId,t.startTdIndex,t.endTdIndex,t.startTrIndex,t.endTrIndex)}setRangeStyle(){var E,G;const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const{startIndex:i,endIndex:n,isCrossRowCol:r}=this.range;if(!~i&&!~n)return;let o;if(r){const x=this.draw.getOriginalElementList(),y=this.position.getPositionContext();o=x[y.index]}else{const x=~n?n:0,y=this.draw.getElementList();o=He(y,x)}if(!o)return;const l=this.getSelection()||[o],a=o.type||N.TEXT,R=o.font||this.options.defaultFont,c=o.size||this.options.defaultSize,u=!~l.findIndex(x=>!x.bold),d=!~l.findIndex(x=>!x.italic),g=!~l.findIndex(x=>{var y;return!x.underline&&!((y=x.control)==null?void 0:y.underline)}),L=!~l.findIndex(x=>!x.strikeout),O=!~l.findIndex(x=>!x.aiEdit),P=o.color||null,M=o.highlight||null,T=o.rowFlex||null,X=(E=o.rowMargin)!=null?E:this.options.defaultRowMargin,S=o.dashArray||[],F=o.level||null,W=o.listType||null,I=o.listStyle||null,Z=g&&o.textDecoration||null,V=!!this.draw.getPainterStyle(),m=this.historyManager.isCanUndo(),Y=this.historyManager.isCanRedo(),Q=o.groupIds||null,U=(G=o.extension)!=null?G:null,f={type:a,undo:m,redo:Y,painter:V,font:R,size:c,bold:u,italic:d,underline:g,strikeout:L,aiEdit:O,color:P,highlight:M,rowFlex:T,rowMargin:X,dashArray:S,level:F,listType:W,listStyle:I,groupIds:Q,textDecoration:Z,extension:U};t&&t(f),e&&this.eventBus.emit("rangeStyleChange",f)}recoveryRangeStyle(){const t=this.listener.rangeStyleChange,e=this.eventBus.isSubscribe("rangeStyleChange");if(!t&&!e)return;const i=this.options.defaultFont,n=this.options.defaultSize,r=this.options.defaultRowMargin,o=!!this.draw.getPainterStyle(),l=this.historyManager.isCanUndo(),a=this.historyManager.isCanRedo(),R={type:null,undo:l,redo:a,painter:o,font:i,size:n,bold:!1,italic:!1,underline:!1,strikeout:!1,aiEdit:!1,color:null,highlight:null,rowFlex:null,rowMargin:r,dashArray:[],level:null,listType:null,listStyle:null,groupIds:null,textDecoration:null,extension:null};t&&t(R),e&&this.eventBus.emit("rangeStyleChange",R)}shrinkBoundary(t={}){const e=t.elementList||this.draw.getElementList(),i=t.range||this.getRange(),{startIndex:n,endIndex:r}=i;if(!~n&&!~r)return;const o=e[n],l=e[r];if(n===r){if(o.controlComponent===D.PLACEHOLDER){let a=n-1;for(;a>0;){const R=e[a];if(R.controlId!==o.controlId||R.controlComponent===D.PREFIX){i.startIndex=a,i.endIndex=a;break}a--}}}else{if(o.controlComponent===D.PLACEHOLDER||l.controlComponent===D.PLACEHOLDER){let a=r-1;for(;a>0;){const R=e[a];if(R.controlId!==l.controlId||R.controlComponent===D.PREFIX){i.startIndex=a,i.endIndex=a;return}a--}}if(o.controlComponent===D.PREFIX){let a=n+1;for(;a0;){const R=e[a];if(R.controlId!==o.controlId||R.controlComponent===D.VALUE){i.startIndex=a;break}else if(R.controlComponent===D.PLACEHOLDER){i.startIndex=a,i.endIndex=a;return}a--}}}}render(t,e,i,n,r){t.save(),t.globalAlpha=this.options.rangeAlpha,t.fillStyle=this.options.rangeColor,t.fillRect(e,i,n,r),t.restore()}toString(){const t=this.getTextLikeSelection();return t?t.map(e=>e.value).join("").replace(new RegExp(k,"g"),""):""}}class ol{constructor(t){h(this,"draw");h(this,"options");h(this,"imageCache");this.draw=t,this.options=t.getOptions(),this.imageCache=new Map}_renderBackgroundColor(t,e,i,n){t.save(),t.fillStyle=e,t.fillRect(0,0,i,n),t.restore()}_drawImage(t,e,i,n){const{background:r,scale:o}=this.options;if(r.size===fi.CONTAIN){const l=e.width*o,a=e.height*o;if(!r.repeat||r.repeat===pe.NO_REPEAT)t.drawImage(e,0,0,l,a);else{let R=0,c=0;const u=r.repeat===pe.REPEAT||r.repeat===pe.REPEAT_X?Math.ceil(i*o/l):1,d=r.repeat===pe.REPEAT||r.repeat===pe.REPEAT_Y?Math.ceil(n*o/a):1;for(let g=0;g{this.imageCache.set(n.image,o),this._drawImage(t,o,e,i),this.draw.render({isCompute:!1,isSubmitHistory:!1})}}}render(t,e){const{background:{image:i,color:n,applyPageNumbers:r}}=this.options;if(i&&(!(r==null?void 0:r.length)||r.includes(e))){const{width:o,height:l}=this.options;this._renderBackgroundImage(t,o,l)}else{const o=this.draw.getCanvasWidth(e),l=this.draw.getCanvasHeight(e);this._renderBackgroundColor(t,n,o,l)}}}class Rn{constructor(){h(this,"fillRect");h(this,"fillColor");h(this,"fillDecorationStyle");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(t,e,i,n,r,o,l){const a=!this.fillRect.width;if(!a&&(this.fillColor!==o||this.fillDecorationStyle!==l)){this.render(t),this.clearFillInfo(),this.recordFillInfo(t,e,i,n,r,o,l);return}a&&(this.fillRect.x=e,this.fillRect.y=i),r&&this.fillRect.height=0;){const n=this.searchMatchList[t];if(i!==n.groupId){e=!0,this.searchNavigateIndex=t-(this.searchKeyword.length-1);break}t--}if(!e){if(this.searchMatchList[this.searchMatchList.length-1].groupId===i)return null;this.searchNavigateIndex=this.searchMatchList.length-1-(this.searchKeyword.length-1)}}return this.searchNavigateIndex}searchNavigateNext(){if(!this.searchMatchList.length||!this.searchKeyword)return null;if(this.searchNavigateIndex===null)this.searchNavigateIndex=0;else{let t=this.searchNavigateIndex+1,e=!1;const i=this.searchMatchList[this.searchNavigateIndex].groupId;for(;tt+e)}getSearchMatchList(){return this.searchMatchList}getSearchNavigateInfo(){if(!this.searchKeyword||!this.searchMatchList.length)return null;const t=this.searchNavigateIndex!==null?this.searchNavigateIndex/this.searchKeyword.length+1:0;let e=0,i=null;for(let n=0;n!T.type||se.includes(T.type)&&T.controlComponent!==D.CHECKBOX?T.value:k).filter(Boolean).join("").toLocaleLowerCase(),P=[];let M=O.indexOf(u);for(;M!==-1;)P.push(M),M=O.indexOf(u,M+u.length);for(let T=0;T{const{intersectionPageNo:t,visiblePageNoList:e}=this.getPageVisibleInfo();this.draw.setIntersectionPageNo(t),this.draw.setVisiblePageNoList(e)},150));this.draw=t,this.options=t.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(t){const e=t.getBoundingClientRect(),i=this.scrollContainer===document?Math.max(document.documentElement.clientHeight,window.innerHeight):this.scrollContainer.clientHeight,n=Math.min(e.bottom,i)-Math.max(e.top,0);return{intersectionHeight:n>0?n:0}}getPageVisibleInfo(){const t=this.draw.getPageList(),e=[];let i=0,n=0;for(let r=0;rn&&(n=l,i=r)}return{intersectionPageNo:i,visiblePageNoList:e}}}class gl{constructor(t){h(this,"step",5);h(this,"thresholdPoints",[70,40,10,20]);h(this,"selectionContainer");h(this,"rangeManager");h(this,"requestAnimationFrameId");h(this,"isMousedown");h(this,"isMoving");h(this,"clientWidth");h(this,"clientHeight");h(this,"containerRect");h(this,"_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)){const t=this.selectionContainer.getBoundingClientRect();this.containerRect=t}});h(this,"_mouseup",()=>{this.isMousedown=!1,this._stopMove()});h(this,"_mousemove",t=>{if(!this.isMousedown||this.rangeManager.getIsCollapsed())return;let{x:e,y:i}=t;this.containerRect&&(e=e-this.containerRect.x,i=i-this.containerRect.y),i=0;o--){const l=r.tdList[o],{rowspan:a,rowIndex:R,colIndex:c}=l,u=R+a-1;if(u!==o){const d=r.tdList.splice(o,1)[0];(i=e[u])==null||i.tdList.splice(c,0,d)}}}return e}getRangeRowCol(){const{isTable:t,index:e,trIndex:i,tdIndex:n}=this.draw.getPosition().getPositionContext();if(!t)return null;const{isCrossRowCol:r,startTdIndex:o,endTdIndex:l,startTrIndex:a,endTrIndex:R}=this.range.getRange(),d=this.draw.getOriginalElementList()[e].trList;if(!r)return[[d[i].tdList[n]]];let g=d[a].tdList[o],L=d[R].tdList[l];(g.x>L.x||g.y>L.y)&&([g,L]=[L,g]);const O=g.colIndex,P=L.colIndex+(L.colspan-1),M=g.rowIndex,T=L.rowIndex+(L.rowspan-1),X=[];for(let S=0;S=O&&V<=P&&m>=M&&m<=T&&W.push(Z)}W.length&&X.push(W)}return X.length?X:null}_drawOuterBorder(t){const{ctx:e,startX:i,startY:n,width:r,height:o,isDrawFullBorder:l}=t;e.beginPath();const a=Math.round(i),R=Math.round(n);e.translate(.5,.5),l?e.rect(a,R,r,o):(e.moveTo(a,R+o),e.lineTo(a,R),e.lineTo(a+r,R)),e.stroke(),e.translate(-.5,-.5)}_drawSlash(t,e,i,n){var c,u;const{scale:r}=this.options;t.save();const o=e.width*r,l=e.height*r,a=Math.round(e.x*r+i),R=Math.round(e.y*r+n);((c=e.slashTypes)==null?void 0:c.includes(Je.FORWARD))&&(t.moveTo(a+o,R),t.lineTo(a,R+l)),((u=e.slashTypes)==null?void 0:u.includes(Je.BACK))&&(t.moveTo(a,R),t.lineTo(a+o,R+l)),t.stroke(),t.restore()}_drawBorder(t,e,i,n){var L,O,P,M,T,X;const{colgroup:r,trList:o,borderType:l}=e;if(!r||!o)return;const{scale:a}=this.options,R=e.width*a,c=e.height*a,u=l===vt.EMPTY,d=l===vt.EXTERNAL,g=l===vt.INTERNAL;t.save(),l===vt.DASH&&t.setLineDash([3,3]),t.lineWidth=a,!u&&!g&&this._drawOuterBorder({ctx:t,startX:i,startY:n,width:R,height:c,isDrawFullBorder:d});for(let S=0;Se+i.width,0)}getTableHeight(t){const e=t.trList;return(e==null?void 0:e.length)?this.getTdListByColIndex(e,0).reduce((i,n)=>i+n.height,0):0}getRowCountByColIndex(t,e){return this.getTdListByColIndex(t,e).reduce((i,n)=>i+n.rowspan,0)}getTdListByColIndex(t,e){const i=[];for(let n=0;n=a&&e<=R&&i.push(l)}}return i}getTdListByRowIndex(t,e){const i=[];for(let n=0;n=a&&e<=R&&i.push(l)}}return i}computeRowColInfo(t){const{colgroup:e,trList:i}=t;if(!e||!i)return;let n=0;for(let r=0;r1&&r!==0){const M=o.tdList[a-1],T=M?M.colIndex+M.colspan:a;for(let X=T;X1){const M=i.length-1-r;L=R.rowspan-1===M}const O=l&&g;R.isLastRowTd=g,R.isLastColTd=L,R.isLastTd=O,R.x=n;let P=0;for(let M=0;M=S.colIndex&&cP.x||O.y>P.y)&&([O,P]=[P,O]);const M=O.colIndex,T=P.colIndex+(P.colspan-1),X=O.rowIndex,S=P.rowIndex+(P.rowspan-1);t.save();for(let F=0;F=M&&V<=T&&m>=X&&m<=S){const Y=Z.x*r,Q=Z.y*r,U=Z.width*r,f=Z.height*r;t.globalAlpha=o,t.fillStyle=l,t.fillRect(Y+i,Q+n,U,f)}}}t.restore()}render(t,e,i,n){this._drawBackgroundColor(t,e,i,n),this._drawBorder(t,e,i,n)}}var Te;(function(s){s.ROW="row",s.COL="col"})(Te||(Te={}));class Ol{constructor(t){h(this,"MIN_TD_WIDTH",20);h(this,"ROW_COL_OFFSET",18);h(this,"ROW_COL_QUICK_WIDTH",16);h(this,"ROW_COL_QUICK_OFFSET",5);h(this,"ROW_COL_QUICK_POSITION",this.ROW_COL_OFFSET+(this.ROW_COL_OFFSET-this.ROW_COL_QUICK_WIDTH)/2);h(this,"BORDER_VALUE",4);h(this,"TABLE_SELECT_OFFSET",20);h(this,"draw");h(this,"canvas");h(this,"options");h(this,"position");h(this,"range");h(this,"container");h(this,"toolRowContainer");h(this,"toolRowAddBtn");h(this,"toolColAddBtn");h(this,"toolTableSelectBtn");h(this,"toolColContainer");h(this,"toolBorderContainer");h(this,"anchorLine");h(this,"mousedownX");h(this,"mousedownY");this.draw=t,this.canvas=t.getPage(),this.options=t.getOptions(),this.position=t.getPosition(),this.range=t.getRange(),this.container=t.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}dispose(){var t,e,i,n,r,o;(t=this.toolRowContainer)==null||t.remove(),(e=this.toolRowAddBtn)==null||e.remove(),(i=this.toolColAddBtn)==null||i.remove(),(n=this.toolTableSelectBtn)==null||n.remove(),(r=this.toolColContainer)==null||r.remove(),(o=this.toolBorderContainer)==null||o.remove(),this.toolRowContainer=null,this.toolRowAddBtn=null,this.toolColAddBtn=null,this.toolTableSelectBtn=null,this.toolColContainer=null,this.toolBorderContainer=null}render(){const{isTable:t,index:e,trIndex:i,tdIndex:n}=this.position.getPositionContext();if(!t)return;this.dispose();const{scale:r}=this.options,o=this.draw.getOriginalElementList(),l=this.position.getOriginalPositionList(),a=o[e],R=l[e],{colgroup:c,trList:u}=a,{coordinate:{leftTop:d}}=R,g=this.draw.getHeight(),L=this.draw.getPageGap(),O=this.draw.getPageNo()*(g+L),P=d[0],M=d[1]+O,T=a.trList[i].tdList[n],X=T.rowIndex,S=T.colIndex,F=a.height*r,W=a.width*r,I=document.createElement("div");I.classList.add(`${_}-table-tool__select`),I.style.height=`${F*r}`,I.style.left=`${P}px`,I.style.top=`${M}px`,I.style.transform=`translate(-${this.TABLE_SELECT_OFFSET*r}px, ${-this.TABLE_SELECT_OFFSET*r}px)`,I.onclick=()=>{this.draw.getTableOperate().tableSelectAll()},this.container.append(I),this.toolTableSelectBtn=I;const Z=u.map(E=>E.height),V=document.createElement("div");V.classList.add(`${_}-table-tool__row`),V.style.transform=`translateX(-${this.ROW_COL_OFFSET*r}px)`;for(let E=0;E{const J=this.draw.getTableParticle().getTdListByRowIndex(u,E),q=J[0],st=J[J.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:q.trIndex,tdIndex:q.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,q.tdIndex,st.tdIndex,q.trIndex,st.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(V,E)};const y=document.createElement("div");y.classList.add(`${_}-table-tool__anchor`),y.onmousedown=J=>{this._mousedown({evt:J,element:a,index:E,order:Te.ROW})},x.append(y),x.style.height=`${G}px`,V.append(x)}V.style.left=`${P}px`,V.style.top=`${M}px`,this.container.append(V),this.toolRowContainer=V;const m=document.createElement("div");m.classList.add(`${_}-table-tool__quick__add`),m.style.height=`${F*r}`,m.style.left=`${P}px`,m.style.top=`${M+F}px`,m.style.transform=`translate(-${this.ROW_COL_QUICK_POSITION*r}px, ${this.ROW_COL_QUICK_OFFSET*r}px)`,m.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:u.length-1,tdIndex:0,tableId:a.id}),this.draw.getTableOperate().insertTableBottomRow()},this.container.append(m),this.toolRowAddBtn=m;const Y=c.map(E=>E.width),Q=document.createElement("div");Q.classList.add(`${_}-table-tool__col`),Q.style.transform=`translateY(-${this.ROW_COL_OFFSET*r}px)`;for(let E=0;E{const J=this.draw.getTableParticle().getTdListByColIndex(u,E),q=J[0],st=J[J.length-1];this.position.setPositionContext({index:e,isTable:!0,trIndex:q.trIndex,tdIndex:q.tdIndex,tableId:a.id}),this.range.setRange(0,0,a.id,q.tdIndex,st.tdIndex,q.trIndex,st.trIndex),this.draw.render({curIndex:0,isCompute:!1,isSubmitHistory:!1}),this._setAnchorActive(Q,E)};const y=document.createElement("div");y.classList.add(`${_}-table-tool__anchor`),y.onmousedown=J=>{this._mousedown({evt:J,element:a,index:E,order:Te.COL})},x.append(y),x.style.width=`${G}px`,Q.append(x)}Q.style.left=`${P}px`,Q.style.top=`${M}px`,this.container.append(Q),this.toolColContainer=Q;const U=document.createElement("div");U.classList.add(`${_}-table-tool__quick__add`),U.style.height=`${F*r}`,U.style.left=`${P+W}px`,U.style.top=`${M}px`,U.style.transform=`translate(${this.ROW_COL_QUICK_OFFSET*r}px, -${this.ROW_COL_QUICK_POSITION*r}px)`,U.onclick=()=>{this.position.setPositionContext({index:e,isTable:!0,trIndex:0,tdIndex:u[0].tdList.length-1||0,tableId:a.id}),this.draw.getTableOperate().insertTableRightCol()},this.container.append(U),this.toolColAddBtn=U;const f=document.createElement("div");f.classList.add(`${_}-table-tool__border`),f.style.height=`${F}px`,f.style.width=`${W}px`,f.style.left=`${P}px`,f.style.top=`${M}px`;for(let E=0;E{this._mousedown({evt:st,element:a,index:y.rowIndex+y.rowspan-1,order:Te.ROW})},f.appendChild(J);const q=document.createElement("div");q.classList.add(`${_}-table-tool__border__col`),q.style.width=`${this.BORDER_VALUE}px`,q.style.height=`${y.height*r}px`,q.style.top=`${y.y*r}px`,q.style.left=`${(y.x+y.width)*r-this.BORDER_VALUE/2}px`,q.onmousedown=st=>{this._mousedown({evt:st,element:a,index:y.colIndex+y.colspan-1,order:Te.COL})},f.appendChild(q)}}this.container.append(f),this.toolBorderContainer=f}_setAnchorActive(t,e){const i=t.children;for(let n=0;n{const F=this._mousemove(S,n,L,O);F&&(M=F.dx,T=F.dy)};document.addEventListener("mousemove",X),document.addEventListener("mouseup",()=>{var F;let S=!1;if(n===Te.ROW){const W=r.trList,I=W[i]||W[i-1],{defaultTrMinHeight:Z}=this.options.table;T<0&&I.height+T0&&V&&V-MI){const Q=r.width;M=I-Q}}M&&(W.length-1!==i&&(W[i+1].width-=M/o),W[i].width+=M/o,S=!0)}}S&&this.draw.render({isSetCursor:!1}),P.remove(),document.removeEventListener("mousemove",X),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),e.preventDefault()}_mousemove(t,e,i,n){if(!this.anchorLine)return null;const r=t.x-this.mousedownX,o=t.y-this.mousedownY;return e===Te.ROW?this.anchorLine.style.top=`${n+o}px`:this.anchorLine.style.left=`${i+r}px`,t.preventDefault(),{dx:r,dy:o}}}class Ml{constructor(t){h(this,"draw");h(this,"options");h(this,"container");h(this,"hyperlinkPopupContainer");h(this,"hyperlinkDom");this.draw=t,this.options=t.getOptions(),this.container=t.getContainer();const{hyperlinkPopupContainer:e,hyperlinkDom:i}=this._createHyperlinkPopupDom();this.hyperlinkDom=i,this.hyperlinkPopupContainer=e}_createHyperlinkPopupDom(){const t=document.createElement("div");t.classList.add(`${_}-hyperlink-popup`);const e=document.createElement("a");return e.target="_blank",e.rel="noopener",t.append(e),this.container.append(t),{hyperlinkPopupContainer:t,hyperlinkDom:e}}drawHyperlinkPopup(t,e){const{coordinate:{leftTop:[i,n]},lineHeight:r}=e,o=this.draw.getHeight(),l=this.draw.getPageGap(),a=this.draw.getPageNo()*(o+l);this.hyperlinkPopupContainer.style.display="block",this.hyperlinkPopupContainer.style.left=`${i}px`,this.hyperlinkPopupContainer.style.top=`${n+a+r}px`;const R=t.url||"#";this.hyperlinkDom.href=R,this.hyperlinkDom.title=R,this.hyperlinkDom.innerText=R}clearHyperlinkPopup(){this.hyperlinkPopupContainer.style.display="none"}openHyperlink(t){const e=window.open(t.url,"_blank");e&&(e.opener=null)}render(t,e,i,n){t.save(),t.font=e.style,e.color||(e.color=this.options.defaultHyperlinkColor),t.fillStyle=e.color,e.underline===void 0&&(e.underline=!0),t.fillText(e.value,i,n),t.restore()}}class Pl{constructor(t,e){h(this,"draw");h(this,"position");h(this,"options");h(this,"elementList");h(this,"rowList");h(this,"positionList");this.draw=t,this.position=t.getPosition(),this.options=t.getOptions(),this.elementList=e||[],this.rowList=[],this.positionList=[]}getRowList(){return this.rowList}setElementList(t){this.elementList=t}getElementList(){return this.elementList}getPositionList(){return this.positionList}compute(){this.recovery(),this._computeRowList(),this._computePositionList()}recovery(){this.rowList=[],this.positionList=[]}_computeRowList(){const t=this.draw.getInnerWidth(),e=this.draw.getMargins(),i=ls(this.elementList);this.rowList=this.draw.computeRowList({startX:e[3],startY:this.getHeaderTop(),innerWidth:t,elementList:this.elementList,surroundElementList:i})}_computePositionList(){const t=this.getHeaderTop(),e=this.draw.getInnerWidth(),n=this.draw.getMargins()[3],r=t;this.position.computePageRowPosition({positionList:this.positionList,rowList:this.rowList,pageNo:0,startRowIndex:0,startIndex:0,startX:n,startY:r,innerWidth:e,zone:lt.HEADER})}getHeaderTop(){const{header:{top:t,disabled:e},scale:i}=this.options;return e?0:Math.floor(t*i)}getMaxHeight(){const{header:{maxHeightRadio:t}}=this.options,e=this.draw.getHeight();return Math.floor(e*Jn[t])}getHeight(){const t=this.getMaxHeight(),e=this.getRowHeight();return e>t?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),n=this.getHeaderTop()+e-t[0];return n<=0?0:n}render(t,e){t.globalAlpha=1;const i=this.draw.getInnerWidth(),n=this.getMaxHeight(),r=[];let o=0;for(let l=0;ln)break;r.push(a),o+=a.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:i,zone:lt.HEADER})}}class Tl{getOffsetY(t){return-t.metrics.height/2}render(t,e,i,n){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,i,n+this.getOffsetY(e)),t.restore()}}class Sl{getOffsetY(t){return t.metrics.height/2}render(t,e,i,n){t.save(),t.font=e.style,e.color&&(t.fillStyle=e.color),t.fillText(e.value,i,n+this.getOffsetY(e)),t.restore()}}class Xl{constructor(t){h(this,"options");this.options=t.getOptions()}render(t,e,i,n){var R;t.save();const{scale:r,separator:{lineWidth:o,strokeStyle:l}}=this.options;t.lineWidth=o*r,t.strokeStyle=e.color||l,((R=e.dashArray)==null?void 0:R.length)&&t.setLineDash(e.dashArray);const a=Math.round(n);t.translate(0,t.lineWidth/2),t.beginPath(),t.moveTo(i,a),t.lineTo(i+e.width*r,a),t.stroke(),t.restore()}}class Nl{constructor(t){h(this,"draw");h(this,"options");h(this,"i18n");this.draw=t,this.options=t.getOptions(),this.i18n=t.getI18n()}render(t,e,i,n){const{pageBreak:{font:r,fontSize:o,lineDash:l}}=this.options,a=this.i18n.t("pageBreak.displayName"),{scale:R,defaultRowMargin:c}=this.options,u=o*R,d=e.width*R,g=this.draw.getDefaultBasicRowMarginHeight()*c;t.save(),t.font=`${u}px ${r}`;const L=t.measureText(a),O=(d-L.width)/2;t.setLineDash(l),t.translate(0,.5+g),t.beginPath(),t.moveTo(i,n),t.lineTo(i+O,n),t.moveTo(i+O+L.width,n),t.lineTo(i+d,n),t.stroke(),t.fillText(a,i+O,n+L.actualBoundingBoxAscent-u/2),t.restore()}}class Fl{constructor(t){h(this,"draw");h(this,"options");this.draw=t,this.options=t.getOptions()}render(t){const{watermark:{data:e,opacity:i,font:n,size:r,color:o,repeat:l,gap:a},scale:R}=this.options,c=this.draw.getWidth(),u=this.draw.getHeight();t.save(),t.globalAlpha=i,t.font=`${r*R}px ${n}`;const d=t.measureText(e);if(l){const g=this.draw.getPagePixelRatio(),L=document.createElement("canvas"),O=L.getContext("2d"),P=d.width,M=d.actualBoundingBoxAscent+d.actualBoundingBoxDescent,T=Math.sqrt(Math.pow(P,2)+Math.pow(M,2)),X=T+2*a[0]*R,S=T+2*a[1]*R;L.width=X,L.height=S,L.style.width=`${X*g}px`,L.style.height=`${S*g}px`,O.translate(X/2,S/2),O.rotate(-45*Math.PI/180),O.translate(-X/2,-S/2),O.font=`${r*R}px ${n}`,O.fillStyle=o,O.fillText(e,(X-P)/2,(S-M)/2+d.actualBoundingBoxAscent);const F=t.createPattern(L,"repeat");F&&(t.fillStyle=F,t.fillRect(0,0,c,u))}else{const g=c/2,L=u/2;t.fillStyle=o,t.translate(g,L),t.rotate(-45*Math.PI/180),t.fillText(e,-d.width/2,d.actualBoundingBoxAscent-r/2)}t.restore()}}class fl{constructor(t){h(this,"draw");h(this,"options");h(this,"highlightList");h(this,"highlightMatchResult");this.draw=t.getDraw(),this.options=this.draw.getOptions(),this.highlightList=[],this.highlightMatchResult=[]}getHighlightMatchResult(){return this.highlightMatchResult}getHighlightList(){return this.highlightList}setHighlightList(t){this.highlightList=t}computeHighlightList(){const t=this.draw.getSearch(),e=(i,n)=>{let r=0;for(;rL.id===o.controlId||l.conceptId&&l.conceptId===L.conceptId);if(!~a)continue;const R=r;let c=r;for(;cL.controlComponent===D.VALUE?L:{value:k}),d=this.highlightList[a],{ruleList:g}=d;for(let L=0;Ltt(b(b(b({},M),O),n),{index:M.index+R})))}}};this.highlightMatchResult=[],e(this.draw.getOriginalMainElementList())}renderHighlightList(t,e){var l,a,R;if(!((l=this.highlightMatchResult)==null?void 0:l.length))return;const{searchMatchAlpha:i,searchMatchColor:n}=this.options,r=this.draw.getPosition().getOriginalPositionList(),o=this.draw.getOriginalElementList();t.save();for(let c=0;c0;){const a=e[o];if(a.controlId!==n.controlId||a.controlComponent===D.PREFIX)break;a.controlComponent===D.VALUE&&r.unshift(a),o--}let l=i+1;for(;l0;){const g=r[c];if(g.controlId!==l.controlId||g.controlComponent===D.PREFIX){a=c;break}c--}let u=o+1;for(;uM.code===t);if(!R)return;const c=this.getValue(e)[0],u=c?ne(c,Fe):ne(n[r.startIndex],fe),d=this.clearSelect(e,{isAddPlaceholder:!1});if(!~d)return;l||this.control.removePlaceholder(d,e);const g=Ne(n[d],Fe),L=d+1,O=jt(R.value),P=this.control.getDraw();for(let M=0;M{this.setSelect(d.code)},g.append(document.createTextNode(d.value)),r.append(g)}n.append(r);const{coordinate:{leftTop:[o,l]},lineHeight:a}=i,R=this.control.getPreY();n.style.left=`${o}px`,n.style.top=`${l+R+a}px`,this.control.getContainer().append(n),this.selectDom=n}awake(){var i;if(this.isPopup||this.control.getIsDisabledControl())return;const{startIndex:t}=this.control.getRange();((i=this.control.getElementList()[t+1])==null?void 0:i.controlId)===this.element.controlId&&(this._createSelectPopupDom(),this.isPopup=!0)}destroy(){var t;!this.isPopup||((t=this.selectDom)==null||t.remove(),this.isPopup=!1)}}class Ss{constructor(t,e){h(this,"element");h(this,"control");h(this,"options");this.options=e.getDraw().getOptions(),this.element=t,this.control=e}setElement(t){this.element=t}getElement(){return this.element}getValue(t={}){const e=t.elementList||this.control.getElementList(),{startIndex:i}=t.range||this.control.getRange(),n=e[i],r=[];let o=i;for(;o>0;){const a=e[o];if(a.controlId!==n.controlId||a.controlComponent===D.PREFIX)break;a.controlComponent===D.VALUE&&r.unshift(a),o--}let l=i+1;for(;l";const a=document.createElement("span");a.classList.add(`${_}-date-title__next-year`),a.innerText=">>",i.append(n),i.append(r),i.append(o),i.append(l),i.append(a);const R=document.createElement("div");R.classList.add(`${_}-date-week`);const{weeks:{sun:c,mon:u,tue:d,wed:g,thu:L,fri:O,sat:P}}=this.lang;[c,u,d,g,L,O,P].forEach(Q=>{const U=document.createElement("span");U.innerText=`${Q}`,R.append(U)});const T=document.createElement("div");T.classList.add(`${_}-date-day`),e.append(i),e.append(R),e.append(T);const X=document.createElement("ul");X.classList.add(`${_}-time-wrap`);let S,F,W;[this.lang.hour,this.lang.minute,this.lang.second].forEach((Q,U)=>{const f=document.createElement("li"),E=document.createElement("span");E.innerText=Q,f.append(E);const G=document.createElement("ol"),x=U===0,y=U===1,J=x?24:60;for(let q=0;q{this._preYear()},this.dom.title.preMonth.onclick=()=>{this._preMonth()},this.dom.title.nextMonth.onclick=()=>{this._nextMonth()},this.dom.title.nextYear.onclick=()=>{this._nextYear()},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=t=>{if(!this.pickDate)return;const i=t.target.dataset.id;!i||(this.pickDate.setHours(Number(i)),this._setTimePick(!1))},this.dom.time.minute.onclick=t=>{if(!this.pickDate)return;const i=t.target.dataset.id;!i||(this.pickDate.setMinutes(Number(i)),this._setTimePick(!1))},this.dom.time.second.onclick=t=>{if(!this.pickDate)return;const i=t.target.dataset.id;!i||(this.pickDate.setSeconds(Number(i)),this._setTimePick(!1))}}_setPosition(){if(!this.renderOptions)return;const{position:{coordinate:{leftTop:[t,e]},lineHeight:i,pageNo:n}}=this.renderOptions,r=this.draw.getHeight(),o=this.draw.getPageGap(),a=(n!=null?n:this.draw.getPageNo())*(r+o);this.dom.container.style.left=`${t}px`,this.dom.container.style.top=`${e+a+i}px`}isInvalidDate(t){return t.toDateString()==="Invalid Date"}_setValue(){var e;const t=(e=this.renderOptions)==null?void 0:e.value;if(t){const i=new Date(t);this.now=this.isInvalidDate(i)?new Date:i}else this.now=new Date;this.pickDate=new Date(this.now)}_getLang(){const t=this.draw.getI18n(),e=t.t.bind(t);return{now:e("datePicker.now"),confirm:e("datePicker.confirm"),return:e("datePicker.return"),timeSelect:e("datePicker.timeSelect"),weeks:{sun:e("datePicker.weeks.sun"),mon:e("datePicker.weeks.mon"),tue:e("datePicker.weeks.tue"),wed:e("datePicker.weeks.wed"),thu:e("datePicker.weeks.thu"),fri:e("datePicker.weeks.fri"),sat:e("datePicker.weeks.sat")},year:e("datePicker.year"),month:e("datePicker.month"),hour:e("datePicker.hour"),minute:e("datePicker.minute"),second:e("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;const{weeks:{sun:t,mon:e,tue:i,wed:n,thu:r,fri:o,sat:l}}=this.lang,a=[t,e,i,n,r,o,l];this.dom.datePickerWeek.childNodes.forEach((d,g)=>{const L=d;L.innerText=a[g]});const R=this.dom.time.hour.previousElementSibling;R.innerText=this.lang.hour;const c=this.dom.time.minute.previousElementSibling;c.innerText=this.lang.minute;const u=this.dom.time.second.previousElementSibling;u.innerText=this.lang.second}_update(){const t=new Date,e=t.getFullYear(),i=t.getMonth()+1,n=t.getDate();let r=null,o=null,l=null;this.pickDate&&(r=this.pickDate.getFullYear(),o=this.pickDate.getMonth()+1,l=this.pickDate.getDate());const a=this.now.getFullYear(),R=this.now.getMonth()+1;this.dom.title.now.innerText=`${a}${this.lang.year} ${String(R).padStart(2,"0")}${this.lang.month}`;const u=new Date(a,R,0).getDate();let d=new Date(a,R-1,1).getDay();d===0&&(d=7);const g=new Date(a,R-1,0).getDate();this.dom.day.innerHTML="";const L=g-d+1;for(let P=L;P<=g;P++){const M=document.createElement("div");M.classList.add("disable"),M.innerText=`${P}`,M.onclick=()=>{const T=R-2;this.now=new Date(a,T,P),this._setDatePick(a,T,P)},this.dom.day.append(M)}for(let P=1;P<=u;P++){const M=document.createElement("div");e===a&&i===R&&n===P&&M.classList.add("active"),this.pickDate&&r===a&&o===R&&l===P&&M.classList.add("select"),M.innerText=`${P}`,M.onclick=T=>{const X=R-1;this.now=new Date(a,X,P),this._setDatePick(a,X,P),T.stopPropagation()},this.dom.day.append(M)}const O=6*7-d-u;for(let P=1;P<=O;P++){const M=document.createElement("div");M.classList.add("disable"),M.innerText=`${P}`,M.onclick=()=>{this.now=new Date(a,R,P),this._setDatePick(a,R,P)},this.dom.day.append(M)}}_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())}_setDatePick(t,e,i){var n,r,o;this.now=new Date(t,e,i),(n=this.pickDate)==null||n.setFullYear(t),(r=this.pickDate)==null||r.setMonth(e),(o=this.pickDate)==null||o.setDate(i),this._update()}_setTimePick(t=!0){var c,u,d;const e=((c=this.pickDate)==null?void 0:c.getHours())||0,i=((u=this.pickDate)==null?void 0:u.getMinutes())||0,n=((d=this.pickDate)==null?void 0:d.getSeconds())||0,{hour:r,minute:o,second:l}=this.dom.time;[r,o,l].forEach(g=>{g.querySelectorAll("li").forEach(L=>L.classList.remove("active"))}),[[r,e],[o,i],[l,n]].forEach(([g,L])=>{const O=g.querySelector(`[data-id='${L}']`);O.classList.add("active"),t&&this._scrollIntoView(g,O)})}_scrollIntoView(t,e){if(!e){t.scrollTop=0;return}const i=[];let n=e.offsetParent;for(;n&&t!==n&&t.contains(n);)i.push(n),n=n.offsetParent;const r=e.offsetTop+i.reduce((R,c)=>R+c.offsetTop,0),o=r+e.offsetHeight,l=t.scrollTop,a=l+t.clientHeight;ra&&(t.scrollTop=o-t.clientHeight)}_preMonth(){this.now.setMonth(this.now.getMonth()-1),this._update()}_nextMonth(){this.now.setMonth(this.now.getMonth()+1),this._update()}_preYear(){this.now.setFullYear(this.now.getFullYear()-1),this._update()}_nextYear(){this.now.setFullYear(this.now.getFullYear()+1),this._update()}_now(){this.pickDate=new Date,this.dispose()}_toggleVisible(t){t?this.dom.container.classList.add("active"):this.dom.container.classList.remove("active")}_submit(){var t;if(this.options.onSubmit&&this.pickDate){const e=(t=this.renderOptions)==null?void 0:t.dateFormat,i=this.formatDate(this.pickDate,e);this.options.onSubmit(i)}}formatDate(t,e="yyyy-MM-dd hh:mm:ss"){let i=e;const n={"y+":t.getFullYear().toString(),"M+":(t.getMonth()+1).toString(),"d+":t.getDate().toString(),"h+":t.getHours().toString(),"m+":t.getMinutes().toString(),"s+":t.getSeconds().toString()};for(const r in n){const o=new RegExp("("+r+")").exec(e),l=r;o&&(i=i.replace(o[1],o[1].length===1?n[l]:n[l].padStart(o[1].length,"0")))}return i}render(t){this.renderOptions=t,this.lang=this._getLang(),this._setLangChange(),this._setValue(),this._update(),this._setPosition(),this.isDatePicker=!0,this._toggleDateTimePicker(),this._toggleVisible(!0)}dispose(){this._toggleVisible(!1)}destroy(){this.dom.container.remove()}}class li{constructor(t,e){h(this,"draw");h(this,"element");h(this,"control");h(this,"isPopup");h(this,"datePicker");h(this,"options");const i=e.getDraw();this.draw=i,this.options=i.getOptions(),this.element=t,this.control=e,this.isPopup=!1,this.datePicker=null}setElement(t){this.element=t}getElement(){return this.element}getIsPopup(){return this.isPopup}getValueRange(t={}){const e=t.elementList||this.control.getElementList(),{startIndex:i}=t.range||this.control.getRange(),n=e[i];let r=i;for(;r>0;){const l=e[r];if(l.controlId!==n.controlId||l.controlComponent===D.PREFIX)break;r--}let o=i+1;for(;oa.value).join("")||"",r=(l=this.element.control)==null?void 0:l.dateFormat;this.datePicker.render({value:n,position:t,dateFormat:r}),this.isPopup=!0}destroy(){var t;!this.isPopup||((t=this.datePicker)==null||t.destroy(),this.isPopup=!1)}_setDate(t){t?this.setSelect(t):this.clearSelect(),this.destroy()}}class ml{constructor(t){h(this,"controlBorder");h(this,"draw");h(this,"range");h(this,"listener");h(this,"eventBus");h(this,"controlSearch");h(this,"options");h(this,"controlOptions");h(this,"activeControl");this.controlBorder=new pl(t),this.draw=t,this.range=t.getRange(),this.listener=t.getListener(),this.eventBus=t.getEventBus(),this.controlSearch=new fl(this),this.options=t.getOptions(),this.controlOptions=this.options.control,this.activeControl=null}setHighlightList(t){this.controlSearch.setHighlightList(t)}computeHighlightList(){this.controlSearch.getHighlightList().length&&this.controlSearch.computeHighlightList()}renderHighlightList(t,e){this.controlSearch.getHighlightMatchResult().length&&this.controlSearch.renderHighlightList(t,e)}getDraw(){return this.draw}filterAssistElement(t){return t.filter(e=>{var i;if(e.type===N.TABLE){const n=e.trList;for(let r=0;rn.controlId))return!1;let e=0,i=0;for(let n=0;n{var c;const o=this.listener.controlChange,l=this.eventBus.isSubscribe("controlChange");if(!o&&!l)return;let a;const R=(c=this.activeControl)==null?void 0:c.getValue();R&&R.length?a=Tt(R)[0].control:a=we(Ot(n)).control,o&&o(a),l&&this.eventBus.emit("controlChange",a)})}destroyControl(){this.activeControl&&((this.activeControl instanceof ri||this.activeControl instanceof li)&&this.activeControl.destroy(),this.activeControl=null,Ti(()=>{const t=this.listener.controlChange,e=this.eventBus.isSubscribe("controlChange");!t&&!e||(t&&t(null),e&&this.eventBus.emit("controlChange",null))}))}repaintControl(t={}){const{curIndex:e,isCompute:i=!0,isSubmitHistory:n=!0,isSetCursor:r=!0}=t;e===void 0?(this.range.clearRange(),this.draw.render({isCompute:i,isSubmitHistory:n,isSetCursor:!1})):(this.range.setRange(e,e),this.draw.render({curIndex:e,isCompute:i,isSetCursor:r,isSubmitHistory:n}))}reAwakeControl(){if(!this.activeControl)return;const t=this.getElementList(),e=this.getRange(),i=t[e.startIndex];this.activeControl.setElement(i),(this.activeControl instanceof li||this.activeControl instanceof ri)&&this.activeControl.getIsPopup()&&(this.activeControl.destroy(),this.activeControl.awake())}moveCursor(t){const{index:e,trIndex:i,tdIndex:n,tdValueIndex:r}=t;let o=this.draw.getOriginalElementList(),l;const a=t.isTable?r:e;if(t.isTable?(o=o[e].trList[i].tdList[n].value,l=o[r]):l=o[e],l.controlComponent===D.VALUE)return{newIndex:a,newElement:l};if(l.controlComponent===D.POSTFIX){let R=a+1;for(;R0;){const c=o[R];if(c.controlId!==l.controlId||c.controlComponent===D.PREFIX)return{newIndex:R,newElement:o[R]};R--}}return{newIndex:a,newElement:l}}removeControl(t,e={}){const i=e.elementList||this.getElementList(),n=i[t];if(!this.draw.isDesignMode()){const{deletable:R=!0}=n.control;if(!R)return null}let r=-1,o=-1,l=t;for(;l>0;){if(i[l].controlId!==n.controlId){r=l;break}l--}let a=t+1;for(;a{let R=0;for(;R{var X;return(X=g==null?void 0:g.find(S=>S.code===T))==null?void 0:X.value}).filter(Boolean).join("");n.push(tt(b({},c.control),{zone:a,value:d||null,innerText:M||null}))}R=L}},o=[{zone:lt.HEADER,elementList:this.draw.getHeaderElementList()},{zone:lt.MAIN,elementList:this.draw.getOriginalMainElementList()},{zone:lt.FOOTER,elementList:this.draw.getFooterElementList()}];for(const{zone:l,elementList:a}of o)r(a,l);return n}setValueById(t){let e=!1;const{id:i,conceptId:n,value:r}=t;if(!i&&!n)return;const o=a=>{let R=0;for(;R{let a=0;for(;a{const g=n[d];g&&Reflect.set(c,d,g)});let u=R;for(;u0;c--){const u=a[c];if(u.type===N.TABLE){const g=u.trList||[];for(let L=g.length-1;L>=0;L--){const O=g[L],P=O.tdList;for(let M=P.length-1;M>=0;M--){const T=P[M],X=n(T.value,T.value.length-1);if(X)return{positionContext:{isTable:!0,index:c,trIndex:L,tdIndex:M,tdId:T.id,trId:O.id,tableId:u.id},nextIndex:X.nextIndex}}}}if(!u.controlId||u.controlId===i.controlId)continue;let d=c;for(;d>0;){const g=a[d];if(g.controlComponent===D.VALUE||g.controlComponent===D.PREFIX)break;d--}return{positionContext:{isTable:!1},nextIndex:d}}return null}const{startIndex:r}=this.range.getRange(),o=this.getElementList(),l=n(o,r);if(l)return{positionContext:e.isTable?e:l.positionContext,nextIndex:l.nextIndex};if(i.tableId){const a=this.draw.getOriginalElementList(),{index:R,trIndex:c,tdIndex:u}=e,d=a[R].trList;for(let L=c;L>=0;L--){const O=d[L],P=O.tdList;for(let M=P.length-1;M>=0;M--){if(c===L&&M>=u)continue;const T=P[M],X=n(T.value,T.value.length-1);if(X)return{positionContext:{isTable:!0,index:e.index,trIndex:L,tdIndex:M,tdId:T.id,trId:O.id,tableId:i.tableId},nextIndex:X.nextIndex}}}const g=n(a,R-1);if(g)return{positionContext:{isTable:!1},nextIndex:g.nextIndex}}return null}getNextControlContext(){if(!this.activeControl)return null;const e=this.draw.getPosition().getPositionContext();if(!e)return null;const i=this.activeControl.getElement();function n(a,R){for(let c=R;c=0;){const M=e.elementList[P];if(O+=M.metrics.width,((L=e.elementList[P-1])==null?void 0:L.controlComponent)===D.PREFIX){a=M;break}P--}a&&O0){const O=(a==null?void 0:a.left)||0,P=r-e.width-i.metrics.width,M=Math.min(P,R);i.left=M-O,e.width+=M-O}}}class Il{constructor(t){h(this,"draw");h(this,"options");this.draw=t,this.options=t.getOptions()}setSelect(t){const{checkbox:e}=t;e?e.value=!e.value:t.checkbox={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:i,index:n,row:r}=t;let{y:o}=t;const{checkbox:{gap:l,lineWidth:a,fillStyle:R,strokeStyle:c,verticalAlign:u},scale:d}=this.options,{metrics:g,checkbox:L}=r.elementList[n];if(u===It.TOP||u===It.MIDDLE){let X=n+1,S=null;for(;Xg.height&&(u===It.TOP?o-=F-g.height:u===It.MIDDLE&&(o-=(I-g.height)/2))}}const O=Math.round(i+l*d),P=Math.round(o-g.height+a),M=g.width-l*2*d,T=g.height;e.save(),e.beginPath(),e.translate(.5,.5),(L==null?void 0:L.value)?(e.lineWidth=a,e.strokeStyle=R,e.rect(O,P,M,T),e.stroke(),e.beginPath(),e.fillStyle=R,e.fillRect(O,P,M,T),e.beginPath(),e.strokeStyle=c,e.lineWidth=a*2*d,e.moveTo(O+2*d,P+T/2),e.lineTo(O+M/2,P+T-3*d),e.lineTo(O+M-2*d,P+3*d),e.stroke()):(e.lineWidth=a,e.rect(O,P,M,T),e.stroke()),e.closePath(),e.restore()}}class Wl{constructor(t){h(this,"draw");h(this,"options");this.draw=t,this.options=t.getOptions()}setSelect(t){const{radio:e}=t;e?e.value=!e.value:t.radio={value:!0},this.draw.render({isCompute:!1,isSetCursor:!1})}render(t){const{ctx:e,x:i,index:n,row:r}=t;let{y:o}=t;const{radio:{gap:l,lineWidth:a,fillStyle:R,strokeStyle:c,verticalAlign:u},scale:d}=this.options,{metrics:g,radio:L}=r.elementList[n];if(u===It.TOP||u===It.MIDDLE){let X=n+1,S=null;for(;Xg.height&&(u===It.TOP?o-=F-g.height:u===It.MIDDLE&&(o-=(I-g.height)/2))}}const O=Math.round(i+l*d),P=Math.round(o-g.height+a),M=g.width-l*2*d,T=g.height;e.save(),e.beginPath(),e.translate(.5,.5),e.strokeStyle=(L==null?void 0:L.value)?R:c,e.lineWidth=a,e.arc(O+M/2,P+T/2,M/2,0,Math.PI*2),e.stroke(),(L==null?void 0:L.value)&&(e.beginPath(),e.fillStyle=R,e.arc(O+M/2,P+T/2,M/3,0,Math.PI*2),e.fill()),e.closePath(),e.restore()}}const Ns="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBmOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuVEFCTEU9InRhYmxlIix0LkhZUEVSTElOSz0iaHlwZXJsaW5rIix0LkNPTlRST0w9ImNvbnRyb2wifSkoZnx8KGY9e30pKTt2YXIgcDsoZnVuY3Rpb24odCl7dC5WQUxVRT0idmFsdWUifSkocHx8KHA9e30pKTtjb25zdCBoPSJcdTIwMEIiLGc9YApgO2Z1bmN0aW9uIGEodCl7bGV0IGw9IiIsbj0wO2Zvcig7bjx0Lmxlbmd0aDspe2NvbnN0IG89dFtuXTtpZihvLnR5cGU9PT1mLlRBQkxFKXtpZihvLnRyTGlzdClmb3IobGV0IHI9MDtyPG8udHJMaXN0Lmxlbmd0aDtyKyspe2NvbnN0IHM9by50ckxpc3Rbcl07Zm9yKGxldCBlPTA7ZTxzLnRkTGlzdC5sZW5ndGg7ZSsrKXtjb25zdCBpPXMudGRMaXN0W2VdO2wrPWEoaS52YWx1ZSl9fX1lbHNlIGlmKG8udHlwZT09PWYuSFlQRVJMSU5LKXtjb25zdCByPW8uaHlwZXJsaW5rSWQscz1bXTtmb3IoO248dC5sZW5ndGg7KXtjb25zdCBlPXRbbl07aWYociE9PWUuaHlwZXJsaW5rSWQpe24tLTticmVha31kZWxldGUgZS50eXBlLHMucHVzaChlKSxuKyt9bCs9YShzKX1lbHNlIGlmKG8uY29udHJvbElkKXtjb25zdCByPW8uY29udHJvbElkLHM9W107Zm9yKDtuPHQubGVuZ3RoOyl7Y29uc3QgZT10W25dO2lmKHIhPT1lLmNvbnRyb2xJZCl7bi0tO2JyZWFrfWUuY29udHJvbENvbXBvbmVudD09PXAuVkFMVUUmJihkZWxldGUgZS5jb250cm9sSWQscy5wdXNoKGUpKSxuKyt9bCs9YShzKX1lbHNlKCFvLnR5cGV8fG8udHlwZT09PWYuVEVYVCkmJihsKz1vLnZhbHVlKTtuKyt9cmV0dXJuIGx9ZnVuY3Rpb24gZCh0KXtjb25zdCBsPVtdLG49L1swLTldLyxvPS9bQS1aYS16XS8scj0vXHMvO2xldCBzPSExLGU9ITEsaT0iIjtmdW5jdGlvbiB1KCl7aSYmKGwucHVzaChpKSxpPSIiKX1mb3IoY29uc3QgYyBvZiB0KW8udGVzdChjKT8oc3x8dSgpLGkrPWMscz0hMCxlPSExKTpuLnRlc3QoYyk/KGV8fHUoKSxpKz1jLHM9ITEsZT0hMCk6KHUoKSxzPSExLGU9ITEsci50ZXN0KGMpfHxsLnB1c2goYykpO3JldHVybiB1KCksbH1vbm1lc3NhZ2U9dD0+e2NvbnN0IGw9dC5kYXRhLG89YShsKS5yZXBsYWNlKG5ldyBSZWdFeHAoYF4ke2h9YCksIiIpLnJlcGxhY2UobmV3IFJlZ0V4cChoLCJnIiksZykscj1kKG8pO3Bvc3RNZXNzYWdlKHIubGVuZ3RoKX19KSgpO30pKCk7Cg==",Fs=typeof window!="undefined"&&window.Blob&&new Blob([atob(Ns)],{type:"text/javascript;charset=utf-8"});function Vl(){const s=Fs&&(window.URL||window.webkitURL).createObjectURL(Fs);try{return s?new Worker(s):new Worker("data:application/javascript;base64,"+Ns,{type:"module"})}finally{s&&(window.URL||window.webkitURL).revokeObjectURL(s)}}const fs="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBhOyhmdW5jdGlvbih0KXt0LlRFWFQ9InRleHQiLHQuSU1BR0U9ImltYWdlIix0LlRBQkxFPSJ0YWJsZSIsdC5IWVBFUkxJTks9Imh5cGVybGluayIsdC5TVVBFUlNDUklQVD0ic3VwZXJzY3JpcHQiLHQuU1VCU0NSSVBUPSJzdWJzY3JpcHQiLHQuU0VQQVJBVE9SPSJzZXBhcmF0b3IiLHQuQUlFRElUPSJhaUVkaXQiLHQuUEFHRV9CUkVBSz0icGFnZUJyZWFrIix0LkNPTlRST0w9ImNvbnRyb2wiLHQuQ0hFQ0tCT1g9ImNoZWNrYm94Iix0LlJBRElPPSJyYWRpbyIsdC5MQVRFWD0ibGF0ZXgiLHQuVEFCPSJ0YWIiLHQuREFURT0iZGF0ZSIsdC5CTE9DSz0iYmxvY2siLHQuVElUTEU9InRpdGxlIix0LkxJU1Q9Imxpc3QifSkoYXx8KGE9e30pKTt2YXIgbDsoZnVuY3Rpb24odCl7dC5GSVJTVD0iZmlyc3QiLHQuU0VDT05EPSJzZWNvbmQiLHQuVEhJUkQ9InRoaXJkIix0LkZPVVJUSD0iZm91cnRoIix0LkZJRlRIPSJmaWZ0aCIsdC5TSVhUSD0ic2l4dGgifSkobHx8KGw9e30pKTtjb25zdCBJPXtbbC5GSVJTVF06MSxbbC5TRUNPTkRdOjIsW2wuVEhJUkRdOjMsW2wuRk9VUlRIXTo0LFtsLkZJRlRIXTo1LFtsLlNJWFRIXTo2fSxFPVthLlRFWFQsYS5IWVBFUkxJTkssYS5TVUJTQ1JJUFQsYS5TVVBFUlNDUklQVCxhLkNPTlRST0wsYS5EQVRFLGEuQUlFRElUXSxUPSJcdTIwMEIiO2Z1bmN0aW9uIGQodCl7cmV0dXJuIXQudHlwZXx8RS5pbmNsdWRlcyh0LnR5cGUpfWZ1bmN0aW9uIEwodCl7Y29uc3R7ZWxlbWVudExpc3Q6bixwb3NpdGlvbkxpc3Q6dn09dCxnPVtdO2xldCBpPTA7Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3Qgcz1uW2ldO2lmKHMudGl0bGVJZCl7Y29uc3Qgbz1zLnRpdGxlSWQsZT1zLmxldmVsLGM9e3R5cGU6YS5USVRMRSx2YWx1ZToiIixsZXZlbDplLHRpdGxlSWQ6byxwYWdlTm86dltpXS5wYWdlTm99LHI9W107Zm9yKDtpPG4ubGVuZ3RoOyl7Y29uc3QgdT1uW2ldO2lmKG8hPT11LnRpdGxlSWQpe2ktLTticmVha31yLnB1c2godSksaSsrfWMudmFsdWU9ci5maWx0ZXIodT0+ZCh1KSkubWFwKHU9PnUudmFsdWUpLmpvaW4oIiIpLnJlcGxhY2UobmV3IFJlZ0V4cChULCJnIiksIiIpLGcucHVzaChjKX1pKyt9aWYoIWcubGVuZ3RoKXJldHVybiBudWxsO2NvbnN0IGg9KHMsbyk9Pntjb25zdCBlPW8uc3ViQ2F0YWxvZ1tvLnN1YkNhdGFsb2cubGVuZ3RoLTFdLGM9SVtlPT1udWxsP3ZvaWQgMDplLmxldmVsXSxyPUlbcy5sZXZlbF07ZSYmcj5jP2gocyxlKTpvLnN1YkNhdGFsb2cucHVzaCh7aWQ6cy50aXRsZUlkLG5hbWU6cy52YWx1ZSxsZXZlbDpzLmxldmVsLHBhZ2VObzpzLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9LFI9W107Zm9yKGxldCBzPTA7czxnLmxlbmd0aDtzKyspe2NvbnN0IG89Z1tzXSxlPVJbUi5sZW5ndGgtMV0sYz1JW2U9PW51bGw/dm9pZCAwOmUubGV2ZWxdLHI9SVtvLmxldmVsXTtlJiZyPmM/aChvLGUpOlIucHVzaCh7aWQ6by50aXRsZUlkLG5hbWU6by52YWx1ZSxsZXZlbDpvLmxldmVsLHBhZ2VObzpvLnBhZ2VObyxzdWJDYXRhbG9nOltdfSl9cmV0dXJuIFJ9b25tZXNzYWdlPXQ9Pntjb25zdCBuPXQuZGF0YSx2PUwobik7cG9zdE1lc3NhZ2Uodil9fSkoKTt9KSgpOwo=",ps=typeof window!="undefined"&&window.Blob&&new Blob([atob(fs)],{type:"text/javascript;charset=utf-8"});function Yl(){const s=ps&&(window.URL||window.webkitURL).createObjectURL(ps);try{return s?new Worker(s):new Worker("data:application/javascript;base64,"+fs,{type:"module"})}finally{s&&(window.URL||window.webkitURL).revokeObjectURL(s)}}const ms="KCgpPT57KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO3ZhciBuOyhmdW5jdGlvbihvKXtvLlRBQkxFPSJ0YWJsZSJ9KShufHwobj17fSkpO2Z1bmN0aW9uIGMobyl7Y29uc3QgdD1bXTtmb3IoY29uc3QgcyBvZiBvKXtpZihzLnR5cGU9PT1uLlRBQkxFKXtjb25zdCBlPXMudHJMaXN0O2ZvcihsZXQgcj0wO3I8ZS5sZW5ndGg7cisrKXtjb25zdCBpPWVbcl07Zm9yKGxldCB1PTA7dTxpLnRkTGlzdC5sZW5ndGg7dSsrKXtjb25zdCBkPWkudGRMaXN0W3VdO3QucHVzaCguLi5jKGQudmFsdWUpKX19fWlmKCEhcy5ncm91cElkcylmb3IoY29uc3QgZSBvZiBzLmdyb3VwSWRzKXQuaW5jbHVkZXMoZSl8fHQucHVzaChlKX1yZXR1cm4gdH1vbm1lc3NhZ2U9bz0+e2NvbnN0IHQ9by5kYXRhLHM9Yyh0KTtwb3N0TWVzc2FnZShzKX19KSgpO30pKCk7Cg==",Is=typeof window!="undefined"&&window.Blob&&new Blob([atob(ms)],{type:"text/javascript;charset=utf-8"});function Ul(){const s=Is&&(window.URL||window.webkitURL).createObjectURL(Is);try{return s?new Worker(s):new Worker("data:application/javascript;base64,"+ms,{type:"module"})}finally{s&&(window.URL||window.webkitURL).revokeObjectURL(s)}}class Zl{constructor(t){h(this,"draw");h(this,"wordCountWorker");h(this,"catalogWorker");h(this,"groupWorker");this.draw=t,this.wordCountWorker=new Vl,this.catalogWorker=new Yl,this.groupWorker=new Ul}getWordCount(){return new Promise((t,e)=>{this.wordCountWorker.onmessage=n=>{t(n.data)},this.wordCountWorker.onerror=n=>{e(n)};const i=this.draw.getOriginalMainElementList();this.wordCountWorker.postMessage(i)})}getCatalog(){return new Promise((t,e)=>{this.catalogWorker.onmessage=r=>{t(r.data)},this.catalogWorker.onerror=r=>{e(r)};const i=this.draw.getOriginalMainElementList(),n=this.draw.getPosition().getOriginalMainPositionList();this.catalogWorker.postMessage({elementList:i,positionList:n})})}getGroupIds(){return new Promise((t,e)=>{this.groupWorker.onmessage=n=>{t(n.data)},this.groupWorker.onerror=n=>{e(n)};const i=this.draw.getOriginalMainElementList();this.groupWorker.postMessage(i)})}}class Ql{constructor(t){h(this,"container");h(this,"canvas");h(this,"draw");h(this,"options");h(this,"curElement");h(this,"curElementSrc");h(this,"previewerDrawOption");h(this,"curPosition");h(this,"resizerSelection");h(this,"resizerHandleList");h(this,"resizerImageContainer");h(this,"resizerImage");h(this,"resizerSize");h(this,"width");h(this,"height");h(this,"mousedownX");h(this,"mousedownY");h(this,"curHandleIndex");h(this,"previewerContainer");h(this,"previewerImage");h(this,"_keydown",()=>{this.resizerSelection.style.display==="block"&&(this.clearResizer(),document.removeEventListener("keydown",this._keydown))});this.container=t.getContainer(),this.canvas=t.getPage(),this.draw=t,this.options=t.getOptions(),this.curElement=null,this.curElementSrc="",this.previewerDrawOption={},this.curPosition=null;const{resizerSelection:e,resizerHandleList:i,resizerImageContainer:n,resizerImage:r,resizerSize:o}=this._createResizerDom();this.resizerSelection=e,this.resizerHandleList=i,this.resizerImageContainer=n,this.resizerImage=r,this.resizerSize=o,this.width=0,this.height=0,this.mousedownX=0,this.mousedownY=0,this.curHandleIndex=0,this.previewerContainer=null,this.previewerImage=null}_getElementPosition(t,e=null){var R;let i=0,n=0;const r=this.draw.getHeight(),o=this.draw.getPageGap(),a=((R=e==null?void 0:e.pageNo)!=null?R:this.draw.getPageNo())*(r+o);if(t.imgFloatPosition)i=t.imgFloatPosition.x,n=t.imgFloatPosition.y+a;else if(e){const{coordinate:{leftTop:[c,u]},ascent:d}=e;i=c,n=u+a+d}return{x:i,y:n}}_createResizerDom(){const{scale:t}=this.options,e=document.createElement("div");e.classList.add(`${_}-resizer-selection`),e.style.display="none",e.style.borderColor=this.options.resizerColor,e.style.borderWidth=`${t}px`;const i=[];for(let a=0;a<8;a++){const R=document.createElement("div");R.style.background=this.options.resizerColor,R.classList.add("resizer-handle"),R.classList.add(`handle-${a}`),R.setAttribute("data-index",String(a)),R.onmousedown=this._mousedown.bind(this),e.append(R),i.push(R)}this.container.append(e);const n=document.createElement("div");n.classList.add(`${_}-resizer-size-view`);const r=document.createElement("span");n.append(r),e.append(n);const o=document.createElement("div");o.classList.add(`${_}-resizer-image`),o.style.display="none";const l=document.createElement("img");return o.append(l),this.container.append(o),{resizerSelection:e,resizerHandleList:i,resizerImageContainer:o,resizerImage:l,resizerSize:r}}_mousedown(t){if(this.canvas=this.draw.getPage(),!this.curElement)return;const{scale:e}=this.options;this.mousedownX=t.x,this.mousedownY=t.y;const i=t.target;this.curHandleIndex=Number(i.dataset.index);const n=window.getComputedStyle(i).cursor;document.body.style.cursor=n,this.canvas.style.cursor=n,this.resizerImage.src=this.curElementSrc,this.resizerImageContainer.style.display="block";const{x:r,y:o}=this._getElementPosition(this.curElement,this.curPosition);this.resizerImageContainer.style.left=`${r}px`,this.resizerImageContainer.style.top=`${o}px`,this.resizerImage.style.width=`${this.curElement.width*e}px`,this.resizerImage.style.height=`${this.curElement.height*e}px`;const l=this._mousemove.bind(this);document.addEventListener("mousemove",l),document.addEventListener("mouseup",()=>{var a;this.curElement&&!this.previewerDrawOption.dragDisable&&(this.curElement.width=this.width,this.curElement.height=this.height,this.draw.render({isSetCursor:!0,curIndex:(a=this.curPosition)==null?void 0:a.index})),this.resizerImageContainer.style.display="none",document.removeEventListener("mousemove",l),document.body.style.cursor="",this.canvas.style.cursor="text"},{once:!0}),t.preventDefault()}_mousemove(t){if(!this.curElement||this.previewerDrawOption.dragDisable)return;const{scale:e}=this.options;let i=0,n=0;switch(this.curHandleIndex){case 0:{const R=this.mousedownX-t.x,c=this.mousedownY-t.y;i=Math.cbrt(R**3+c**3),n=this.curElement.height*i/this.curElement.width}break;case 1:n=this.mousedownY-t.y;break;case 2:{const R=t.x-this.mousedownX,c=this.mousedownY-t.y;i=Math.cbrt(R**3+c**3),n=this.curElement.height*i/this.curElement.width}break;case 4:{const R=t.x-this.mousedownX,c=t.y-this.mousedownY;i=Math.cbrt(R**3+c**3),n=this.curElement.height*i/this.curElement.width}break;case 3:i=t.x-this.mousedownX;break;case 5:n=t.y-this.mousedownY;break;case 6:{const R=this.mousedownX-t.x,c=t.y-this.mousedownY;i=Math.cbrt(R**3+c**3),n=this.curElement.height*i/this.curElement.width}break;case 7:i=this.mousedownX-t.x;break}const r=this.curElement.width+i/e,o=this.curElement.height+n/e;if(r<=0||o<=0)return;this.width=r,this.height=o;const l=r*e,a=o*e;this.resizerImage.style.width=`${l}px`,this.resizerImage.style.height=`${a}px`,this._updateResizerRect(l,a),this._updateResizerSizeView(l,a),t.preventDefault()}_drawPreviewer(){const t=document.createElement("div");t.classList.add(`${_}-image-previewer`);const e=document.createElement("i");e.classList.add("image-close"),e.onclick=()=>{this._clearPreviewer()},t.append(e);const i=document.createElement("div");i.classList.add(`${_}-image-container`);const n=document.createElement("img");n.src=this.curElementSrc,n.draggable=!1,i.append(n),this.previewerImage=n,t.append(i);let r=0,o=0,l=1,a=0;const R=document.createElement("div");R.classList.add(`${_}-image-menu`);const c=document.createElement("i");c.classList.add("zoom-in"),c.onclick=()=>{l+=.1,this._setPreviewerTransform(l,a,r,o)},R.append(c);const u=document.createElement("i");u.onclick=()=>{l-.1<=.1||(l-=.1,this._setPreviewerTransform(l,a,r,o))},u.classList.add("zoom-out"),R.append(u);const d=document.createElement("i");d.classList.add("rotate"),d.onclick=()=>{a+=1,this._setPreviewerTransform(l,a,r,o)},R.append(d);const g=document.createElement("i");g.classList.add("original-size"),g.onclick=()=>{r=0,o=0,l=1,a=0,this._setPreviewerTransform(l,a,r,o)},R.append(g);const L=document.createElement("i");L.classList.add("image-download"),L.onclick=()=>{var X;const{mime:T}=this.previewerDrawOption;Bn(n.src,`${(X=this.curElement)==null?void 0:X.id}.${T||"png"}`)},R.append(L),t.append(R),this.previewerContainer=t,document.body.append(t);let O=0,P=0,M=!1;n.onmousedown=T=>{M=!0,O=T.x,P=T.y,t.style.cursor="move"},t.onmousemove=T=>{!M||(r+=T.x-O,o+=T.y-P,O=T.x,P=T.y,this._setPreviewerTransform(l,a,r,o))},t.onmouseup=()=>{M=!1,t.style.cursor="auto"},t.onwheel=T=>{if(T.preventDefault(),T.stopPropagation(),T.deltaY<0)l+=.1;else{if(l-.1<=.1)return;l-=.1}this._setPreviewerTransform(l,a,r,o)}}_setPreviewerTransform(t,e,i,n){!this.previewerImage||(this.previewerImage.style.left=`${i}px`,this.previewerImage.style.top=`${n}px`,this.previewerImage.style.transform=`scale(${t}) rotate(${e*90}deg)`)}_clearPreviewer(){var t;(t=this.previewerContainer)==null||t.remove(),this.previewerContainer=null,document.body.style.overflow="auto"}_updateResizerRect(t,e){const{resizerSize:i,scale:n}=this.options,r=this.draw.isReadonly();this.resizerSelection.style.width=`${t}px`,this.resizerSelection.style.height=`${e}px`;for(let o=0;o<8;o++){const l=o===0||o===6||o===7?-i:o===1||o===5?t/2:t-i,a=o===0||o===1||o===2?-i:o===3||o===7?e/2-i:e-i;this.resizerHandleList[o].style.transform=`scale(${n})`,this.resizerHandleList[o].style.left=`${l}px`,this.resizerHandleList[o].style.top=`${a}px`,this.resizerHandleList[o].style.display=r?"none":"block"}}_updateResizerSizeView(t,e){this.resizerSize.innerText=`${Math.round(t)} \xD7 ${Math.round(e)}`}render(){this._drawPreviewer(),document.body.style.overflow="hidden"}drawResizer(t,e=null,i={}){this.previewerDrawOption=i,this.curElementSrc=t[i.srcKey||"value"]||"",this.updateResizer(t,e),document.addEventListener("keydown",this._keydown)}updateResizer(t,e=null){const{scale:i}=this.options,n=t.width*i,r=t.height*i;this._updateResizerSizeView(n,r);const{x:o,y:l}=this._getElementPosition(t,e);this.resizerSelection.style.left=`${o}px`,this.resizerSelection.style.top=`${l}px`,this.resizerSelection.style.borderWidth=`${i}px`,this._updateResizerRect(n,r),this.resizerSelection.style.display="block",this.curElement=t,this.curPosition=e,this.width=n,this.height=r}clearResizer(){this.resizerSelection.style.display="none",document.removeEventListener("keydown",this._keydown)}}class Dl{constructor(t){h(this,"draw");h(this,"range");h(this,"datePicker");h(this,"options");this.draw=t,this.options=t.getOptions(),this.range=t.getRange(),this.datePicker=new Xs(t,{onSubmit:this._setValue.bind(this)})}_setValue(t){if(!t)return;const e=this.getDateElementRange();if(!e)return;const[i,n]=e,r=this.draw.getElementList(),o=r[i+1];this.draw.spliceElementList(r,i+1,n-i),this.range.setRange(i,i);const l={type:N.DATE,value:"",dateFormat:o.dateFormat,valueList:[{value:t}]};Ht(r,[l],i,{editorOptions:this.options}),this.draw.insertElementList([l])}getDateElementRange(){let t=-1,e=-1;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return null;const r=this.draw.getElementList(),o=r[i];if(o.type!==N.DATE)return null;let l=i;for(;l>=0;){if(r[l].dateId!==o.dateId){t=l;break}l--}let a=i+1;for(;ao.value).join(""):"";this.datePicker.render({value:r,position:e,dateFormat:t.dateFormat})}}var Ae;(function(s){s.IFRAME="iframe",s.VIDEO="video"})(Ae||(Ae={}));const gn=class{constructor(t){h(this,"element");this.element=t}_defineIframeProperties(t){Object.defineProperties(t,{parent:{get:()=>null},__POWERED_BY_CANVAS_EDITOR__:{get:()=>!0}})}render(t){var n,r;const e=this.element.block,i=document.createElement("iframe");i.setAttribute("data-id",this.element.id),i.sandbox.add(...gn.sandbox),i.style.border="none",i.style.width="100%",i.style.height="100%",((n=e.iframeBlock)==null?void 0:n.src)?i.src=e.iframeBlock.src:((r=e.iframeBlock)==null?void 0:r.srcdoc)&&(i.srcdoc=e.iframeBlock.srcdoc),t.append(i),this._defineIframeProperties(i.contentWindow)}};let cn=gn;h(cn,"sandbox",["allow-scripts","allow-same-origin"]);class Kl{constructor(t){h(this,"element");this.element=t}render(t){var n;const e=this.element.block,i=document.createElement("video");i.style.width="100%",i.style.height="100%",i.style.objectFit="contain",i.src=((n=e.videoBlock)==null?void 0:n.src)||"",i.controls=!0,i.crossOrigin="anonymous",t.append(i)}}class El{constructor(t,e){h(this,"draw");h(this,"element");h(this,"block");h(this,"blockContainer");h(this,"blockItem");this.draw=t.getDraw(),this.blockContainer=t.getBlockContainer(),this.element=e,this.block=null,this.blockItem=this._createBlockItem(),this.blockContainer.append(this.blockItem)}getBlockElement(){return this.element}_createBlockItem(){const t=document.createElement("div");return t.classList.add(`${_}-block-item`),t}render(){const t=this.element.block;t.type===Ae.IFRAME?(this.block=new cn(this.element),this.block.render(this.blockItem)):t.type===Ae.VIDEO&&(this.block=new Kl(this.element),this.block.render(this.blockItem))}setClientRects(t,e,i){const n=this.draw.getHeight(),r=this.draw.getPageGap(),o=t*(n+r),{metrics:l}=this.element;this.blockItem.style.width=`${l.width}px`,this.blockItem.style.height=`${l.height}px`,this.blockItem.style.left=`${e}px`,this.blockItem.style.top=`${o+i}px`}remove(){this.blockItem.remove()}}class bl{constructor(t){h(this,"draw");h(this,"container");h(this,"blockContainer");h(this,"blockMap");this.draw=t,this.container=t.getContainer(),this.blockMap=new Map,this.blockContainer=this._createBlockContainer(),this.container.append(this.blockContainer)}_createBlockContainer(){const t=document.createElement("div");return t.classList.add(`${_}-block-container`),t}getDraw(){return this.draw}getBlockContainer(){return this.blockContainer}render(t,e,i,n){const r=e.id,o=this.blockMap.get(r);if(o)o.setClientRects(t,i,n);else{const l=new El(this,e);l.render(),l.setClientRects(t,i,n),this.blockMap.set(r,l)}}clear(){if(!this.blockMap.size)return;const t=this.draw.getElementList(),e=[];for(let i=0;i{const n=i.getBlockElement().id;e.includes(n)||(i.remove(),this.blockMap.delete(n))})}}const xl={global:{cut:"\u526A\u5207",copy:"\u590D\u5236",paste:"\u7C98\u8D34",selectAll:"\u5168\u9009",print:"\u6253\u5370"},control:{delete:"\u5220\u9664\u63A7\u4EF6"},hyperlink:{delete:"\u5220\u9664\u94FE\u63A5",cancel:"\u53D6\u6D88\u94FE\u63A5",edit:"\u7F16\u8F91\u94FE\u63A5"},image:{change:"\u66F4\u6539\u56FE\u7247",saveAs:"\u53E6\u5B58\u4E3A\u56FE\u7247",textWrap:"\u6587\u5B57\u73AF\u7ED5",textWrapType:{embed:"\u5D4C\u5165\u578B",upDown:"\u4E0A\u4E0B\u578B\u73AF\u7ED5",surround:"\u56DB\u5468\u578B\u73AF\u7ED5",floatTop:"\u6D6E\u4E8E\u6587\u5B57\u4E0A\u65B9",floatBottom:"\u886C\u4E8E\u6587\u5B57\u4E0B\u65B9"}},table:{insertRowCol:"\u63D2\u5165\u884C\u5217",insertTopRow:"\u4E0A\u65B9\u63D2\u51651\u884C",insertBottomRow:"\u4E0B\u65B9\u63D2\u51651\u884C",insertLeftCol:"\u5DE6\u4FA7\u63D2\u51651\u5217",insertRightCol:"\u53F3\u4FA7\u63D2\u51651\u5217",deleteRowCol:"\u5220\u9664\u884C\u5217",deleteRow:"\u5220\u96641\u884C",deleteCol:"\u5220\u96641\u5217",deleteTable:"\u5220\u9664\u6574\u4E2A\u8868\u683C",mergeCell:"\u5408\u5E76\u5355\u5143\u683C",mergeCancelCell:"\u53D6\u6D88\u5408\u5E76",verticalAlign:"\u5782\u76F4\u5BF9\u9F50",verticalAlignTop:"\u9876\u7AEF\u5BF9\u9F50",verticalAlignMiddle:"\u5782\u76F4\u5C45\u4E2D",verticalAlignBottom:"\u5E95\u7AEF\u5BF9\u9F50",border:"\u8868\u683C\u8FB9\u6846",borderAll:"\u6240\u6709\u6846\u7EBF",borderEmpty:"\u65E0\u6846\u7EBF",borderDash:"\u865A\u6846\u7EBF",borderExternal:"\u5916\u4FA7\u6846\u7EBF",borderInternal:"\u5185\u4FA7\u6846\u7EBF",borderTd:"\u5355\u5143\u683C\u8FB9\u6846",borderTdTop:"\u4E0A\u8FB9\u6846",borderTdRight:"\u53F3\u8FB9\u6846",borderTdBottom:"\u4E0B\u8FB9\u6846",borderTdLeft:"\u5DE6\u8FB9\u6846",borderTdForward:"\u6B63\u659C\u7EBF",borderTdBack:"\u53CD\u659C\u7EBF"}},Cl={now:"\u6B64\u523B",confirm:"\u786E\u5B9A",return:"\u8FD4\u56DE\u65E5\u671F",timeSelect:"\u65F6\u95F4\u9009\u62E9",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},year:"\u5E74",month:"\u6708",hour:"\u65F6",minute:"\u5206",second:"\u79D2"},wl={header:"\u9875\u7709",footer:"\u9875\u811A"},Hl={displayName:"\u5206\u9875\u7B26"},yl={headerTip:"\u53CC\u51FB\u7F16\u8F91\u9875\u7709",footerTip:"\u53CC\u51FB\u7F16\u8F91\u9875\u811A"};var un={contextmenu:xl,datePicker:Cl,frame:wl,pageBreak:Hl,zone:yl};const Gl={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",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"}},vl={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:" ",hour:"Hour",minute:"Minute",second:"Second"},Jl={header:"Header",footer:"Footer"},Al={displayName:"Page Break"},Bl={headerTip:"Double click to edit header",footerTip:"Double click to edit footer"};var kl={contextmenu:Gl,datePicker:vl,frame:Jl,pageBreak:Al,zone:Bl};class _l{constructor(){h(this,"langMap",new Map([["zhCN",un],["en",kl]]));h(this,"currentLocale","zhCN")}registerLangMap(t,e){const i=this.langMap.get(t);this.langMap.set(t,_n(i||un,e))}getLocale(){return this.currentLocale}setLocale(t){this.currentLocale=t}getLang(){return this.langMap.get(this.currentLocale)||un}t(t){const e=t.split(".");let i="",n=this.getLang();for(let r=0;r{if(!(this.isDisableMouseMove||!this.draw.getIsPagingMode())&&!!e.offsetY)if(e.target instanceof HTMLCanvasElement){const i=this.zone.getZoneByY(e.offsetY);if(!t.includes(i)){this._updateZoneTip(!1);return}this.currentMoveZone=i,this._updateZoneTip(this.zone.getZone()===lt.MAIN&&(i===lt.HEADER||i===lt.FOOTER),e.x,e.y)}else this._updateZoneTip(!1)},250)),this.pageContainer.addEventListener("mouseenter",()=>{this.isDisableMouseMove=!1}),this.pageContainer.addEventListener("mouseleave",()=>{this.isDisableMouseMove=!0,this._updateZoneTip(!1)})}_drawZoneTip(){const t=document.createElement("div");t.classList.add(`${_}-zone-tip`);const e=document.createElement("span");return t.append(e),this.container.append(t),{tipContainer:t,tipContent:e}}_updateZoneTip(t,e,i){t?(this.tipContainer.classList.add("show"),this.tipContainer.style.left=`${e}px`,this.tipContainer.style.top=`${i}px`,this.tipContent.innerText=this.i18n.t(`zone.${this.currentMoveZone===lt.HEADER?"headerTip":"footerTip"}`)):this.tipContainer.classList.remove("show")}}class ql{constructor(t){h(this,"INDICATOR_PADDING",2);h(this,"INDICATOR_TITLE_TRANSLATE",[20,5]);h(this,"draw");h(this,"options");h(this,"i18n");h(this,"container");h(this,"currentZone");h(this,"indicatorContainer");this.draw=t,this.i18n=t.getI18n(),this.options=t.getOptions(),this.container=t.getContainer(),this.currentZone=lt.MAIN,this.indicatorContainer=null,this.options.zone.tipDisabled||new $l(t,this)}isHeaderActive(){return this.getZone()===lt.HEADER}isMainActive(){return this.getZone()===lt.MAIN}isFooterActive(){return this.getZone()===lt.FOOTER}getZone(){return this.currentZone}setZone(t){const{header:e,footer:i}=this.options;!e.editable&&t===lt.HEADER||!i.editable&&t===lt.FOOTER||this.currentZone!==t&&(this.currentZone=t,this.draw.getRange().clearRange(),this.draw.render({isSubmitHistory:!1,isSetCursor:!1,isCompute:!1}),this.drawZoneIndicator(),Ti(()=>{const n=this.draw.getListener();n.zoneChange&&n.zoneChange(t);const r=this.draw.getEventBus();r.isSubscribe("zoneChange")&&r.emit("zoneChange",t)}))}getZoneByY(t){const e=this.draw.getHeader(),i=e.getHeaderTop()+e.getHeight(),n=this.draw.getFooter(),o=this.draw.getHeight()-(n.getFooterBottom()+n.getHeight());return to?lt.FOOTER:lt.MAIN}drawZoneIndicator(){if(this._clearZoneIndicator(),!this.isHeaderActive()&&!this.isFooterActive())return;const{scale:t}=this.options,e=this.isHeaderActive(),[i,n]=this.INDICATOR_TITLE_TRANSLATE,r=this.draw.getPageList(),o=this.draw.getMargins(),l=this.draw.getInnerWidth(),a=this.draw.getHeight(),R=this.draw.getPageGap(),c=a+R;this.indicatorContainer=document.createElement("div"),this.indicatorContainer.classList.add(`${_}-zone-indicator`);const u=this.draw.getHeader(),d=this.draw.getFooter(),g=e?u.getHeight():d.getHeight(),L=e?u.getHeaderTop():a-d.getFooterBottom()-g;for(let O=0;Ot?t:e}getRowHeight(){return this.rowList.reduce((t,e)=>t+e.height,0)}getExtraHeight(){const t=this.draw.getMargins(),e=this.getHeight(),n=this.getFooterBottom()+e-t[2];return n<=0?0:n}render(t,e){t.globalAlpha=1;const i=this.draw.getInnerWidth(),n=this.getMaxHeight(),r=[];let o=0;for(let l=0;ln)break;r.push(a),o+=a.height}this.draw.drawRow(t,{elementList:this.elementList,positionList:this.positionList,rowList:r,pageNo:e,startIndex:0,innerWidth:i,zone:lt.FOOTER})}}class ta{constructor(t){h(this,"draw");h(this,"range");h(this,"options");h(this,"UN_COUNT_STYLE_WIDTH",20);h(this,"MEASURE_BASE_TEXT","0");h(this,"LIST_GAP",10);this.draw=t,this.range=t.getRange(),this.options=t.getOptions()}setList(t,e){if(this.draw.isReadonly())return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const o=this.range.getRangeParagraphElementList();if(!o||!o.length)return;if(o.find(u=>u.listType===t&&u.listStyle===e)||!t){this.unsetList();return}const a=Mt();o.forEach(u=>{u.listId=a,u.listType=t,u.listStyle=e});const R=n===r,c=R?r:n;this.draw.render({curIndex:c,isSetCursor:R})}unsetList(){var R;if(this.draw.isReadonly())return;const{startIndex:e,endIndex:i}=this.range.getRange();if(!~e&&!~i)return;const n=(R=this.range.getRangeParagraphElementList())==null?void 0:R.filter(c=>c.listId);if(!n||!n.length)return;const r=this.draw.getElementList(),o=r[i];if(o.listId){let c=i+1;for(;c{delete c.listId,delete c.listType,delete c.listStyle,delete c.listWrap});const l=e===i,a=l?i:e;this.draw.render({curIndex:a,isSetCursor:l})}computeListStyle(t,e){const i=new Map;let n=0,r=e[n].listId,o=[];const l=e.length;for(;n(c.value===k&&(R+=1),R),0);if(!o)return 0;const l=`${this.MEASURE_BASE_TEXT.repeat(String(o).length)}${z.PERIOD}`,a=t.measureText(l);return Math.ceil((a.width+this.LIST_GAP)*i)}drawListStyle(t,e,i){var T;const{elementList:n,offsetX:r,listIndex:o,ascent:l}=e,a=n[0];if(a.value!==k||a.listWrap)return;let R=0;const{defaultTabWidth:c,scale:u,defaultFont:d,defaultSize:g}=this.options;for(let X=1;X{Array.isArray(i.groupIds)||(i.groupIds=[]),i.groupIds.push(e)}),this.draw.render({isSetCursor:!1,isCompute:!1}),e}getElementListByGroupId(t,e){var n,r;const i=[];for(let o=0;oa===t);o.splice(l,1),o.length||delete r.groupIds}this.draw.render({isSetCursor:!1,isCompute:!1})}}getContextByGroupId(t,e){var i,n;for(let r=0;r{const{x:d,y:g,width:L,height:O}=c;(n==null?void 0:n.includes(u))?(t.globalAlpha=l,t.fillStyle=a):(t.globalAlpha=o,t.fillStyle=r),t.fillRect(d,g,L,O)}),t.restore(),this.clearFillInfo()}}class na{constructor(t){h(this,"draw");h(this,"eventBus");h(this,"pageContainer");this.draw=t,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))}_mousemove(t){!this.eventBus.isSubscribe("mousemove")||this.eventBus.emit("mousemove",t)}_mouseenter(t){!this.eventBus.isSubscribe("mouseenter")||this.eventBus.emit("mouseenter",t)}_mouseleave(t){!this.eventBus.isSubscribe("mouseleave")||this.eventBus.emit("mouseleave",t)}}class sa{constructor(t){h(this,"draw");h(this,"options");this.draw=t,this.options=t.getOptions()}render(t,e){const{scale:i,lineNumber:{color:n,size:r,font:o,right:l,type:a}}=this.options,R=this.draw.getTextParticle(),c=this.draw.getMargins(),u=this.draw.getPosition().getOriginalMainPositionList(),g=this.draw.getPageRowList()[e];t.save(),t.fillStyle=n,t.font=`${r*i}px ${o}`;for(let L=0;L{ra(this.draw,t)})}}class aa{constructor(t){h(this,"draw");h(this,"range");h(this,"position");h(this,"tableTool");h(this,"tableParticle");h(this,"options");this.draw=t,this.range=t.getRange(),this.position=t.getPosition(),this.tableTool=t.getTableTool(),this.tableParticle=t.getTableParticle(),this.options=t.getOptions()}insertTable(t,e){var L;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return;const{defaultTrMinHeight:r}=this.options.table,o=this.draw.getElementList();let l=0;if((L=o[i])==null?void 0:L.listId){const O=this.position.getPositionList(),{rowIndex:P}=O[i],T=this.draw.getRowList()[P];l=(T==null?void 0:T.offsetX)||0}const a=this.draw.getContextInnerWidth()-l,R=[],c=a/e;for(let O=0;O1&&O.rowIndex+O.rowspan>=u+1&&(O.rowspan+=1)}}}const R=Mt(),c={height:a.height,id:R,tdList:[]};for(let u=0;u1&&P.rowIndex+P.rowspan>=d+1&&(P.rowspan+=1)}}}const c=Mt(),u={height:R.height,id:c,tdList:[]};for(let d=0;do+l.width,0),r=this.draw.getOriginalInnerWidth();if(n>r){const o=i.filter(a=>a.width>e),l=(n-r)/o.length;for(let a=0;a=e&&(R.width-=l)}}}insertTableLeftCol(){const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:i,tableId:n}=t,o=this.draw.getOriginalElementList()[e],l=o.trList,a=i;for(let u=0;uR&&L.rowspan--}}for(let c=0;c1){const d=Mt(),g=l[i+1];g.tdList.splice(c,0,{id:d,rowspan:u.rowspan-1,colspan:u.colspan,value:[{value:k,size:16,tableId:o.id,trId:g.id,tdId:d}]})}}l.splice(i,1),this.position.setPositionContext({isTable:!1}),this.range.clearRange(),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTableCol(){var u;const t=this.position.getPositionContext();if(!t.isTable)return;const{index:e,tdIndex:i,trIndex:n}=t,o=this.draw.getOriginalElementList()[e],l=o.trList,R=l[n].tdList[i].colIndex;if(!l.find(d=>d.tdList.length>1)){this.deleteTable();return}for(let d=0;dR&&(O.colspan>1?O.colspan--:g.tdList.splice(L,1))}}(u=o.colgroup)==null||u.splice(R,1),this.position.setPositionContext({isTable:!1}),this.range.setRange(0,0),this.draw.render({curIndex:t.index}),this.tableTool.dispose()}deleteTable(){const t=this.position.getPositionContext();if(!t.isTable)return;this.draw.getOriginalElementList().splice(t.index,1);const i=t.index-1;this.position.setPositionContext({isTable:!1,index:i}),this.range.setRange(i,i),this.draw.render({curIndex:i}),this.tableTool.dispose()}mergeTableCell(){const t=this.position.getPositionContext();if(!t.isTable)return;const{isCrossRowCol:e,startTdIndex:i,endTdIndex:n,startTrIndex:r,endTrIndex:o}=this.range.getRange();if(!e)return;const{index:l}=t,c=this.draw.getOriginalElementList()[l].trList;let u=c[r].tdList[i],d=c[o].tdList[n];(u.x>d.x||u.y>d.y)&&([u,d]=[d,u]);const g=u.colIndex,L=d.colIndex+(d.colspan-1),O=u.rowIndex,P=d.rowIndex+(d.rowspan-1),M=[];for(let Q=0;Q=g&&x<=L&&y>=O&&y<=P&&f.push(G)}f.length&&M.push(f)}if(!M.length)return;const T=M[M.length-1],X=M[0][0],S=T[T.length-1],F=X.x,W=X.y,I=S.x+S.width,Z=S.y+S.height;for(let Q=0;QG||W>x||I1){for(let d=1;d1){for(let d=1;d{var l;return!((l=o.borderTypes)==null?void 0:l.includes(t))});i.forEach(o=>{o.borderTypes||(o.borderTypes=[]);const l=o.borderTypes.findIndex(a=>a===t);n?~l||o.borderTypes.push(t):~l&&o.borderTypes.splice(l,1),o.borderTypes.length||delete o.borderTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdSlashType(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;const i=e.flat(),n=i.some(o=>{var l;return!((l=o.slashTypes)==null?void 0:l.includes(t))});i.forEach(o=>{o.slashTypes||(o.slashTypes=[]);const l=o.slashTypes.findIndex(a=>a===t);n?~l||o.slashTypes.push(t):~l&&o.slashTypes.splice(l,1),o.slashTypes.length||delete o.slashTypes});const{endIndex:r}=this.range.getRange();this.draw.render({curIndex:r})}tableTdBackgroundColor(t){const e=this.tableParticle.getRangeRowCol();if(!e)return;for(let n=0;n`[^${a}][${a}]`).join("|")}`),this.rowList=[],this.pageRowList=[],this.painterStyle=null,this.painterOptions=null,this.visiblePageNoList=[],this.intersectionPageNo=0,this.lazyRenderIntersectionObserver=null,this.printModeData=null,this.render({isInit:!0,isSetCursor:!1,isFirstRender:!0})}getLetterReg(){return this.LETTER_REG}getMode(){return this.mode}setMode(t){if(this.mode!==t){if(t===Rt.PRINT){this.printModeData={header:this.header.getElementList(),main:this.elementList,footer:this.footer.getElementList()};const e=Ot(this.printModeData);["header","main","footer"].forEach(n=>{e[n]=this.control.filterAssistElement(e[n])}),this.setEditorData(e)}this.mode===Rt.PRINT&&this.printModeData&&(this.setEditorData(this.printModeData),this.printModeData=null),this.clearSideEffect(),this.range.clearRange(),this.mode=t,this.options.mode=t,this.render({isSetCursor:!1,isSubmitHistory:!1})}}isReadonly(){switch(this.mode){case Rt.DESIGN:return!1;case Rt.READONLY:case Rt.PRINT:return!0;case Rt.FORM:return!this.control.getIsRangeWithinControl();default:return!1}}isDisabled(){var r,o,l,a,R;if(this.mode===Rt.DESIGN)return!1;const{startIndex:t,endIndex:e}=this.range.getRange(),i=this.getElementList();if((r=this.getTd())==null?void 0:r.disabled)return!0;if(t===e){const c=i[t],u=i[t+1];return!!(((o=c==null?void 0:c.title)==null?void 0:o.disabled)&&((l=u==null?void 0:u.title)==null?void 0:l.disabled)||((a=c==null?void 0:c.control)==null?void 0:a.disabled)&&((R=u==null?void 0:u.control)==null?void 0:R.disabled))}return i.slice(t+1,e+1).some(c=>{var u,d;return((u=c.title)==null?void 0:u.disabled)||((d=c.control)==null?void 0:d.disabled)})}isDesignMode(){return this.mode===Rt.DESIGN}getOriginalWidth(){const{paperDirection:t,width:e,height:i}=this.options;return t===Oe.VERTICAL?e:i}getOriginalHeight(){const{paperDirection:t,width:e,height:i}=this.options;return t===Oe.VERTICAL?i:e}getWidth(){return Math.floor(this.getOriginalWidth()*this.options.scale)}getHeight(){return Math.floor(this.getOriginalHeight()*this.options.scale)}getMainHeight(){return this.getHeight()-this.getMainOuterHeight()}getMainOuterHeight(){const t=this.getMargins(),e=this.header.getExtraHeight(),i=this.footer.getExtraHeight();return t[0]+t[2]+e+i}getCanvasWidth(t=-1){return this.getPage(t).width}getCanvasHeight(t=-1){return this.getPage(t).height}getInnerWidth(){const t=this.getWidth(),e=this.getMargins();return t-e[1]-e[3]}getOriginalInnerWidth(){const t=this.getOriginalWidth(),e=this.getOriginalMargins();return t-e[1]-e[3]}getContextInnerWidth(){const t=this.position.getPositionContext();if(t.isTable){const{index:e,trIndex:i,tdIndex:n}=t,o=this.getOriginalElementList()[e].trList[i].tdList[n],l=this.getTdPadding();return o.width-l[1]-l[3]}return this.getOriginalInnerWidth()}getMargins(){return this.getOriginalMargins().map(t=>t*this.options.scale)}getOriginalMargins(){const{margins:t,paperDirection:e}=this.options;return e===Oe.VERTICAL?t:[t[1],t[2],t[3],t[0]]}getPageGap(){return this.options.pageGap*this.options.scale}getOriginalPageGap(){return this.options.pageGap}getPageNumberBottom(){const{pageNumber:{bottom:t},scale:e}=this.options;return t*e}getMarginIndicatorSize(){return this.options.marginIndicatorSize*this.options.scale}getDefaultBasicRowMarginHeight(){return this.options.defaultBasicRowMarginHeight*this.options.scale}getTdPadding(){const{table:{tdPadding:t},scale:e}=this.options;return t.map(i=>i*e)}getContainer(){return this.container}getPageContainer(){return this.pageContainer}getVisiblePageNoList(){return this.visiblePageNoList}setVisiblePageNoList(t){this.visiblePageNoList=t,this.listener.visiblePageNoListChange&&this.listener.visiblePageNoListChange(this.visiblePageNoList),this.eventBus.isSubscribe("visiblePageNoListChange")&&this.eventBus.emit("visiblePageNoListChange",this.visiblePageNoList)}getIntersectionPageNo(){return this.intersectionPageNo}setIntersectionPageNo(t){this.intersectionPageNo=t,this.listener.intersectionPageNoChange&&this.listener.intersectionPageNoChange(this.intersectionPageNo),this.eventBus.isSubscribe("intersectionPageNoChange")&&this.eventBus.emit("intersectionPageNoChange",this.intersectionPageNo)}getPageNo(){return this.pageNo}setPageNo(t){this.pageNo=t}getPage(t=-1){return this.pageList[~t?t:this.pageNo]}getPageList(){return this.pageList}getPageCount(){return this.pageList.length}getTableRowList(t){const e=this.position.getPositionContext(),{index:i,trIndex:n,tdIndex:r}=e;return t[i].trList[n].tdList[r].rowList}getOriginalRowList(){const t=this.getZone();return t.isHeaderActive()?this.header.getRowList():t.isFooterActive()?this.footer.getRowList():this.rowList}getRowList(){return this.position.getPositionContext().isTable?this.getTableRowList(this.getOriginalElementList()):this.getOriginalRowList()}getPageRowList(){return this.pageRowList}getCtx(){return this.ctxList[this.pageNo]}getOptions(){return this.options}getSearch(){return this.search}getGroup(){return this.group}getHistoryManager(){return this.historyManager}getPosition(){return this.position}getZone(){return this.zone}getRange(){return this.range}getLineBreakParticle(){return this.lineBreakParticle}getTextParticle(){return this.textParticle}getHeaderElementList(){return this.header.getElementList()}getTableElementList(t){var o;const e=this.position.getPositionContext(),{index:i,trIndex:n,tdIndex:r}=e;return((o=t[i].trList)==null?void 0:o[n].tdList[r].value)||[]}getElementList(){const t=this.position.getPositionContext(),e=this.getOriginalElementList();return t.isTable?this.getTableElementList(e):e}getMainElementList(){return this.position.getPositionContext().isTable?this.getTableElementList(this.elementList):this.elementList}getOriginalElementList(){const t=this.getZone();return t.isHeaderActive()?this.getHeaderElementList():t.isFooterActive()?this.getFooterElementList():this.elementList}getOriginalMainElementList(){return this.elementList}getFooterElementList(){return this.footer.getElementList()}getTd(){const t=this.position.getPositionContext(),{index:e,trIndex:i,tdIndex:n,isTable:r}=t;return r?this.getOriginalElementList()[e].trList[i].tdList[n]:null}insertElementList(t){if(!t.length||!this.range.getIsCanInput())return;const{startIndex:e,endIndex:i}=this.range.getRange();if(!~e&&!~i)return;Bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let n=-1,r=this.control.getActiveControl();if(!r&&this.control.getIsRangeWithinControl()&&(this.control.initControl(),r=this.control.getActiveControl()),r&&this.control.getIsRangeWithinControl())n=r.setValue(t,void 0,{isIgnoreDisabledRule:!0});else{const o=this.getElementList(),l=e===i,a=e+1;l||this.spliceElementList(o,a,i-e),this.spliceElementList(o,a,0,...t),n=e+t.length;const R=o[a-1];t[0].listId&&R&&!R.listId&&(R==null?void 0:R.value)===k&&(!R.type||R.type===N.TEXT)&&(o.splice(e,1),n-=1)}~n&&(this.range.setRange(n,n),this.render({curIndex:n}))}appendElementList(t,e={}){if(!t.length)return;Bt(t,{isHandleFirstElement:!1,editorOptions:this.options});let i;const{isPrepend:n}=e;n?(this.elementList.splice(1,0,...t),i=t.length):(this.elementList.push(...t),i=this.elementList.length-1),this.range.setRange(i,i),this.render({curIndex:i})}spliceElementList(t,e,i,...n){var o,l,a,R;const r=this.isDesignMode();if(i>0){const c=e+i,u=t[c],d=u==null?void 0:u.listId;if(d&&((o=t[e-1])==null?void 0:o.listId)!==d){let g=c;for(;g=e;){const O=t[L];(r||g!==!1&&((a=O==null?void 0:O.control)==null?void 0:a.deletable)!==!1&&((R=O==null?void 0:O.title)==null?void 0:R.deletable)!==!1)&&t.splice(L,1),L--}}}for(let c=0;cl.toDataURL());return e&&this.setPagePixelRatio(null),r&&this.setMode(n),o}getPainterStyle(){return this.painterStyle&&Object.keys(this.painterStyle).length?this.painterStyle:null}getPainterOptions(){return this.painterOptions}setPainterStyle(t,e){this.painterStyle=t,this.painterOptions=e||null,this.getPainterStyle()&&this.pageList.forEach(i=>i.style.cursor="copy")}setDefaultRange(){!this.elementList.length||setTimeout(()=>{const t=this.elementList.length-1;this.range.setRange(t,t),this.range.setRangeStyle()})}getIsPagingMode(){return this.options.pageMode===me.PAGING}setPageMode(t){if(!t||this.options.pageMode===t)return;if(this.options.pageMode=t,t===me.PAGING){const{height:n}=this.options,r=this.getPagePixelRatio(),o=this.pageList[0];o.style.height=`${n}px`,o.height=n*r,this._initPageContext(this.ctxList[0])}else this._disconnectLazyRender(),this.header.recovery(),this.footer.recovery(),this.zone.setZone(lt.MAIN);const{startIndex:e}=this.range.getRange(),i=this.range.getIsCollapsed();this.render({isSetCursor:!0,curIndex:e,isSubmitHistory:!1}),i||this.cursor.drawCursor({isShow:!1}),setTimeout(()=>{this.listener.pageModeChange&&this.listener.pageModeChange(t),this.eventBus.isSubscribe("pageModeChange")&&this.eventBus.emit("pageModeChange",t)})}setPageScale(t){const e=this.getPagePixelRatio();this.options.scale=t;const i=this.getWidth(),n=this.getHeight();this.container.style.width=`${i}px`,this.pageList.forEach((o,l)=>{o.width=i*e,o.height=n*e,o.style.width=`${i}px`,o.style.height=`${n}px`,o.style.marginBottom=`${this.getPageGap()}px`,this._initPageContext(this.ctxList[l])});const r=this.position.getCursorPosition();this.render({isSubmitHistory:!1,isSetCursor:!!r,curIndex:r==null?void 0:r.index}),this.listener.pageScaleChange&&this.listener.pageScaleChange(t),this.eventBus.isSubscribe("pageScaleChange")&&this.eventBus.emit("pageScaleChange",t)}getPagePixelRatio(){return this.pagePixelRatio||window.devicePixelRatio}setPagePixelRatio(t){!this.pagePixelRatio&&t===window.devicePixelRatio||t===this.pagePixelRatio||(this.pagePixelRatio=t,this.setPageDevicePixel())}setPageDevicePixel(){const t=this.getPagePixelRatio(),e=this.getWidth(),i=this.getHeight();this.pageList.forEach((n,r)=>{n.width=e*t,n.height=i*t,this._initPageContext(this.ctxList[r])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperSize(t,e){this.options.width=t,this.options.height=e;const i=this.getPagePixelRatio(),n=this.getWidth(),r=this.getHeight();this.container.style.width=`${n}px`,this.pageList.forEach((o,l)=>{o.width=n*i,o.height=r*i,o.style.width=`${n}px`,o.style.height=`${r}px`,this._initPageContext(this.ctxList[l])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperDirection(t){const e=this.getPagePixelRatio();this.options.paperDirection=t;const i=this.getWidth(),n=this.getHeight();this.container.style.width=`${i}px`,this.pageList.forEach((r,o)=>{r.width=i*e,r.height=n*e,r.style.width=`${i}px`,r.style.height=`${n}px`,this._initPageContext(this.ctxList[o])}),this.render({isSubmitHistory:!1,isSetCursor:!1})}setPaperMargin(t){this.options.margins=t,this.render({isSubmitHistory:!1,isSetCursor:!1})}getValue(t={}){const{pageNo:e,extraPickAttrs:i}=t;let n=this.elementList;Number.isInteger(e)&&e>=0&&eo.elementList));const r={header:Tt(this.getHeaderElementList(),{extraPickAttrs:i}),main:Tt(n,{extraPickAttrs:i}),footer:Tt(this.getFooterElementList(),{extraPickAttrs:i})};return{version:Lo,data:r,options:Ot(this.options)}}setValue(t,e){const{header:i,main:n,footer:r}=Ot(t);if(!i&&!n&&!r)return;const{isSetCursor:o=!1}=e||{};[i,n,r].forEach(R=>{!R||Bt(R,{editorOptions:this.options,isForceCompensation:!0})}),this.setEditorData({header:i,main:n,footer:r}),this.historyManager.recovery();const a=o?(n==null?void 0:n.length)?n.length-1:0:void 0;a!==void 0&&this.range.setRange(a,a),this.render({curIndex:a,isSetCursor:o,isFirstRender:!0})}setEditorData(t){const{header:e,main:i,footer:n}=t;e&&this.header.setElementList(e),i&&(this.elementList=i),n&&this.footer.setElementList(n)}_wrapContainer(t){const e=document.createElement("div");return t.append(e),e}_formatContainer(){this.container.style.position="relative",this.container.style.width=`${this.getWidth()}px`,this.container.setAttribute(he,le.MAIN)}_createPageContainer(){const t=document.createElement("div");return t.classList.add(`${_}-page-container`),this.container.append(t),t}_createPage(t){const e=this.getWidth(),i=this.getHeight(),n=document.createElement("canvas");n.style.width=`${e}px`,n.style.height=`${i}px`,n.style.display="block",n.style.backgroundColor="#ffffff",n.style.marginBottom=`${this.getPageGap()}px`,n.setAttribute("data-index",String(t)),this.pageContainer.append(n);const r=this.getPagePixelRatio();n.width=e*r,n.height=i*r,n.style.cursor="text";const o=n.getContext("2d");this._initPageContext(o),this.pageList.push(n),this.ctxList.push(o)}_initPageContext(t){const e=this.getPagePixelRatio();t.scale(e,e),t.letterSpacing="0px",t.wordSpacing="0px",t.direction="ltr"}getElementFont(t,e=1){const{defaultSize:i,defaultFont:n}=this.options,r=t.font||n,o=t.actualSize||t.size||i;return`${t.italic?"italic ":""}${t.bold?"bold ":""}${o*e}px ${r}`}getElementSize(t){return t.actualSize||t.size||this.options.defaultSize}getElementRowMargin(t){var r;const{defaultBasicRowMarginHeight:e,defaultRowMargin:i,scale:n}=this.options;return e*((r=t.rowMargin)!=null?r:i)*n}computeRowList(t){var Y,Q,U,f,E,G,x,y,J,q,st,Wt;const{innerWidth:e,elementList:i,isPagingMode:n=!1,isFromTable:r=!1,startX:o=0,startY:l=0,pageHeight:a=0,mainOuterHeight:R=0,surroundElementList:c=[]}=t,{defaultSize:u,defaultRowMargin:d,scale:g,table:{tdPadding:L},defaultTabWidth:O}=this.options,P=this.getDefaultBasicRowMarginHeight(),T=document.createElement("canvas").getContext("2d"),X=this.listParticle.computeListStyle(T,i),S=[];i.length&&S.push({width:0,height:0,ascent:0,elementList:[],startIndex:0,rowIndex:0,rowFlex:((Y=i==null?void 0:i[0])==null?void 0:Y.rowFlex)||((Q=i==null?void 0:i[1])==null?void 0:Q.rowFlex)});let F=o,W=l,I=0,Z,V=0,m=0;for(let ot=0;otit){const Lt=Yt*it/ut;C.width=it/g,C.height=Lt/g,A.width=it,A.height=Lt,A.boundingBoxDescent=Lt}else A.width=ut,A.height=Yt,A.boundingBoxDescent=Yt}A.boundingBoxAscent=0}else if(C.type===N.TABLE){const ut=L[1]+L[3],Yt=L[0]+L[2];if(C.pagingId){let Vt=ot+1,Ct=0;for(;Vt!Jt.pagingRepeat);C.trList.push(...Nt),C.height+=pt.height,Vt++,Ct++}else break}Ct&&i.splice(ot+1,Ct)}C.pagingIndex=(f=C.pagingIndex)!=null?f:0,this.tableParticle.computeRowColInfo(C);const Lt=C.trList;for(let Vt=0;Vtxt+Dt.height,0);Nt.rowList=Jt;const Pt=Ft/g+Yt;if(Nt.height{qt.height+=xt})}let yt=0,bt=0,Ut=0;for(;Ut0){const Nt=Lt[Vt];Nt.height-=pt,Nt.tdList.forEach(Jt=>{Jt.height-=pt})}}this.tableParticle.computeRowColInfo(C);const Ie=this.tableParticle.getTableHeight(C),$e=this.tableParticle.getTableWidth(C);C.width=$e,C.height=Ie;const qe=$e*g,je=Ie*g;if(A.width=qe,A.height=je,A.boundingBoxDescent=je,A.boundingBoxAscent=-St,((E=i[ot+1])==null?void 0:E.type)===N.TABLE&&(A.boundingBoxAscent-=St),n){const Vt=this.getHeight(),Ct=this.getMainOuterHeight();let pt=Ct;for(let Ft=0;FtVt||((G=S[Ft-1])==null?void 0:G.isPageBreak)?pt=Ct+Pt.height:pt+=Pt.height}const Nt=St*2*g,Jt=C.trList[0].height*g;if((pt+Jt+Nt>Vt||C.pagingIndex!==0&&C.trList[0].pagingRepeat)&&(pt=Ct),pt+Nt+je>Vt){const Ft=C.trList;let Pt=0,yt=0,bt=0;if(Ft.length>1)for(let Ut=0;UtVt){const qt=xt.tdList.reduce((ce,Ke)=>ce+Ke.colspan,0);((x=C.colgroup)==null?void 0:x.length)!==qt&&(yt=0);break}else Pt=Ut+1,yt=Ft.length-Pt,bt+=Dt}if(yt){const Ut=Ft.splice(Pt,yt),xt=Ut.reduce((ue,We)=>ue+We.height,0),Dt=xt*g,qt=C.pagingId||Mt();C.pagingId=qt,C.height-=xt,A.height-=Dt,A.boundingBoxDescent-=Dt;const ce=Ot(C);ce.pagingId=qt,ce.pagingIndex=C.pagingIndex+1;const Ke=Ft.filter(ue=>ue.pagingRepeat);if(Ke.length){const ue=Ot(Ke);ue.forEach(We=>We.id=Mt()),Ut.unshift(...ue)}ce.trList=Ut,ce.id=Mt(),this.spliceElementList(i,ot+1,0,ce)}}if(C.pagingId){const Ft=this.position.getPositionContext();if(Ft.isTable){let Pt=-1,yt=-1,bt=ot;for(;btDt.id===Ft.trId);if(~xt){Pt=bt,yt=xt;break}bt++}~Pt&&(Ft.index=Pt,Ft.trIndex=yt,this.position.setPositionContext(Ft))}}}}else if(C.type===N.SEPARATOR){const{separator:{lineWidth:ut}}=this.options;C.width=it/g,A.width=it,A.height=ut*g,A.boundingBoxAscent=-St,A.boundingBoxDescent=-St+A.height}else if(C.type===N.PAGE_BREAK)C.width=it/g,A.width=it,A.height=u;else if(C.type===N.RADIO||C.controlComponent===D.RADIO){const{width:ut,height:Yt,gap:Lt}=this.options.radio,Zt=ut+Lt*2;C.width=Zt,A.width=Zt*g,A.height=Yt*g}else if(C.type===N.CHECKBOX||C.controlComponent===D.CHECKBOX){const{width:ut,height:Yt,gap:Lt}=this.options.checkbox,Zt=ut+Lt*2;C.width=Zt,A.width=Zt*g,A.height=Yt*g}else if(C.type===N.TAB)A.width=O*g,A.height=u*g,A.boundingBoxDescent=0,A.boundingBoxAscent=A.height;else if(C.type===N.BLOCK){if(!C.width)A.width=it;else{const ut=C.width*g;A.width=Math.min(ut,it)}A.height=C.height*g,A.boundingBoxDescent=A.height,A.boundingBoxAscent=0}else{const ut=C.size||u;(C.type===N.SUPERSCRIPT||C.type===N.SUBSCRIPT)&&(C.actualSize=Math.ceil(ut*.6)),A.height=(C.actualSize||ut)*g,T.font=this.getElementFont(C);const Yt=this.textParticle.measureText(T,C);A.width=Yt.width*g,C.letterSpacing&&(A.width+=C.letterSpacing*g),A.boundingBoxAscent=(C.value===k?C.size||u:Yt.actualBoundingBoxAscent)*g,A.boundingBoxDescent=Yt.actualBoundingBoxDescent*g,C.type===N.SUPERSCRIPT?A.boundingBoxAscent+=A.height/2:C.type===N.SUBSCRIPT&&(A.boundingBoxDescent+=A.height/2)}const Et=C.imgDisplay!==et.INLINE&&C.type===N.IMAGE||C.type===N.LATEX?A.height+St:A.boundingBoxAscent+St,$t=St+A.boundingBoxAscent+A.boundingBoxDescent+St,Qt=Object.assign(C,{metrics:A,left:0,style:this.getElementFont(C,g)});((y=Qt.control)==null?void 0:y.minWidth)&&(Qt.controlComponent&&(m+=A.width),Qt.controlComponent===D.POSTFIX&&(this.control.setMinWidthControlInfo({row:$,rowElement:Qt,availableWidth:it,controlRealWidth:m}),m=0));const gt=i[ot-1];let Se=i[ot+1],Re=$.width+A.width;if(this.options.wordBreak===mi.BREAK_WORD&&(!(gt==null?void 0:gt.type)||(gt==null?void 0:gt.type)===N.TEXT)&&(!C.type||C.type===N.TEXT)){const ut=`${(gt==null?void 0:gt.value)||""}${C.value}`;if(this.WORD_LIKE_REG.test(ut)){const{width:Lt,endElement:Zt}=this.textParticle.measureWord(T,i,ot),Ie=Lt*g;Ie<=it&&(Re+=Ie,Se=Zt)}Re+=this.textParticle.measurePunctuationWidth(T,Se)*g}C.listId&&(C.listId!==Z?V=0:C.value===k&&!C.listWrap&&V++),Z=C.listId;const Be=this.position.setSurroundPosition({pageNo:I,rowElement:Qt,row:$,rowElementRect:{x:F,y:W,height:$t,width:A.width},availableWidth:it,surroundElementList:c});F=Be.x,Re+=Be.rowIncreaseWidth,F+=A.width;const ke=C.type===N.SEPARATOR||C.type===N.TABLE||(gt==null?void 0:gt.type)===N.TABLE||(gt==null?void 0:gt.type)===N.BLOCK||C.type===N.BLOCK||(gt==null?void 0:gt.imgDisplay)===et.INLINE||C.imgDisplay===et.INLINE||(gt==null?void 0:gt.listId)!==C.listId||ot!==0&&C.value===k,_e=Re>it,ze=ke||_e;if(ze){const ut={width:A.width,height:$t,startIndex:ot,elementList:[Qt],ascent:Et,rowIndex:$.rowIndex+1,rowFlex:((J=i[ot])==null?void 0:J.rowFlex)||((q=i[ot+1])==null?void 0:q.rowFlex),isPageBreak:C.type===N.PAGE_BREAK};if(Qt.controlComponent!==D.PREFIX&&((st=Qt.control)==null?void 0:st.indentation)===qi.VALUE_START){const Yt=$.elementList.findIndex(Lt=>Lt.controlId===Qt.controlId&&Lt.controlComponent!==D.PREFIX);if(~Yt){const Zt=this.position.computeRowPosition({row:$,innerWidth:this.getInnerWidth()})[Yt];Zt&&(ut.offsetX=Zt.coordinate.leftTop[0])}}C.listId&&(ut.isList=!0,ut.offsetX=X.get(C.listId),ut.listIndex=V),S.push(ut)}else $.width+=A.width,ot===0&&ye(i[1])?($.height=P,$.ascent=P):$.height<$t&&($.height=$t,$.ascent=Et),$.elementList.push(Qt);if((ze||ot===i.length-1)&&($.isWidthNotEnough=_e&&!ke,!$.isSurround&&((gt==null?void 0:gt.rowFlex)===at.JUSTIFY||(gt==null?void 0:gt.rowFlex)===at.ALIGNMENT&&$.isWidthNotEnough))){const ut=((Wt=$.elementList[0])==null?void 0:Wt.value)===k?$.elementList.slice(1):$.elementList,Yt=(it-$.width)/(ut.length-1);for(let Lt=0;Lta||C.type===N.PAGE_BREAK)&&(W=l,Nr(c,I),I+=1),Qt.left=0;const ut=S[S.length-1];F=this.position.setSurroundPosition({pageNo:I,rowElement:Qt,row:ut,rowElementRect:{x:F,y:W,height:$t,width:A.width},availableWidth:it,surroundElementList:c}).x,F+=A.width}}return S}_computePageList(){var a;const t=[[]],{pageMode:e,pageNumber:{maxPageNo:i}}=this.options,n=this.getHeight(),r=this.getMainOuterHeight();let o=r,l=0;if(e===me.CONTINUITY){t[0]=this.rowList,o+=this.rowList.reduce((d,g)=>d+g.height,0);const R=this.getPagePixelRatio(),c=this.pageList[0],u=Number(c.style.height.replace("px",""));if(o>u)c.style.height=`${o}px`,c.height=o*R;else{const d=on||((a=this.rowList[R-1])==null?void 0:a.isPageBreak)){if(Number.isInteger(i)&&l>=i){this.elementList=this.elementList.slice(0,c.startIndex);break}o=r+c.height,t.push([c]),l++}else o+=c.height,t[l].push(c)}return t}_drawHighlight(t,e){var l;const{control:{activeBackgroundColor:i}}=this.options,{rowList:n,positionList:r}=e,o=(l=this.control.getActiveControl())==null?void 0:l.getElement();for(let a=0;a{i.forEach(n=>{if(n.isIntersecting){const r=Number(n.target.dataset.index);this._drawPage({elementList:e,positionList:t,rowList:this.pageRowList[r],pageNo:r})}})}),this.pageList.forEach(i=>{this.lazyRenderIntersectionObserver.observe(i)})}_immediateRender(){const t=this.position.getOriginalMainPositionList(),e=this.getOriginalMainElementList();for(let i=0;iO){const M=P-O;this.ctxList.splice(O,M),this.pageList.splice(O,M).forEach(T=>T.remove())}l&&g?this._lazyRender():this._immediateRender(),r?u=this.setCursor(u):this.range.getIsSelection()&&this.cursor.focus(),(n&&!c||u!==void 0&&this.historyManager.isStackEmpty())&&this.submitHistory(u),Ti(()=>{o&&this.control.getActiveControl()&&this.control.reAwakeControl(),o&&!this.isReadonly()&&this.position.getPositionContext().isTable&&this.tableTool.render(),o&&!this.zone.isMainActive()&&this.zone.drawZoneIndicator(),L!==this.pageRowList.length&&(this.listener.pageSizeChange&&this.listener.pageSizeChange(this.pageRowList.length),this.eventBus.isSubscribe("pageSizeChange")&&this.eventBus.emit("pageSizeChange",this.pageRowList.length)),(n||R)&&!a&&(this.listener.contentChange&&this.listener.contentChange(),this.eventBus.isSubscribe("contentChange")&&this.eventBus.emit("contentChange"))})}setCursor(t){var r;const e=this.position.getPositionContext(),i=this.position.getPositionList();if(e.isTable){const{index:o,trIndex:l,tdIndex:a}=e,c=(r=this.getOriginalElementList()[o].trList)==null?void 0:r[l].tdList[a].positionList;t===void 0&&c&&(t=c.length-1);const u=c==null?void 0:c[t];this.position.setCursorPosition(u||null)}else this.position.setCursorPosition(t!==void 0?i[t]:null);let n=!0;if(t!==void 0&&e.isImage&&e.isDirectHit){const l=this.getElementList()[t];if(Eo.includes(l.type)){n=!1;const a=this.position.getCursorPosition();this.previewer.updateResizer(l,a)}}return this.cursor.drawCursor({isShow:n}),t}submitHistory(t){const e=this.position.getPositionContext(),i=nn(this.elementList),n=nn(this.header.getElementList()),r=nn(this.footer.getElementList()),o=Ot(this.range.getRange()),l=this.pageNo,a=Ot(e),R=this.zone.getZone();this.historyManager.execute(()=>{this.zone.setZone(R),this.setPageNo(l),this.position.setPositionContext(Ot(a)),this.header.setElementList(Ot(n)),this.footer.setElementList(Ot(r)),this.elementList=Ot(i),this.range.replaceRange(Ot(o)),this.render({curIndex:t,isSubmitHistory:!1,isSourceHistory:!0})})}destroy(){this.container.remove(),this.globalEvent.removeEvent(),this.scrollObserver.removeEvent(),this.selectionObserver.removeEvent()}clearSideEffect(){this.getPreviewer().clearResizer(),this.getTableTool().dispose(),this.getHyperlinkParticle().clearHyperlinkPopup(),this.getDateParticle().clearDatePicker()}}class ca{constructor(t){h(this,"executeMode");h(this,"executeCut");h(this,"executeCopy");h(this,"executePaste");h(this,"executeSelectAll");h(this,"executeBackspace");h(this,"executeSetRange");h(this,"executeReplaceRange");h(this,"executeSetPositionContext");h(this,"executeForceUpdate");h(this,"executeBlur");h(this,"executeUndo");h(this,"executeRedo");h(this,"executePainter");h(this,"executeApplyPainterStyle");h(this,"executeFormat");h(this,"executeFont");h(this,"executeSize");h(this,"executeSizeAdd");h(this,"executeSizeMinus");h(this,"executeBold");h(this,"executeItalic");h(this,"executeUnderline");h(this,"executeStrikeout");h(this,"executeSuperscript");h(this,"executeSubscript");h(this,"executeAiEdit");h(this,"executeAiArticle");h(this,"executeColor");h(this,"executeHighlight");h(this,"executeTitle");h(this,"executeList");h(this,"executeRowFlex");h(this,"executeRowMargin");h(this,"executeInsertTable");h(this,"executeInsertTableTopRow");h(this,"executeInsertTableBottomRow");h(this,"executeInsertTableLeftCol");h(this,"executeInsertTableRightCol");h(this,"executeDeleteTableRow");h(this,"executeDeleteTableCol");h(this,"executeDeleteTable");h(this,"executeMergeTableCell");h(this,"executeCancelMergeTableCell");h(this,"executeTableTdVerticalAlign");h(this,"executeTableBorderType");h(this,"executeTableTdBorderType");h(this,"executeTableTdSlashType");h(this,"executeTableTdBackgroundColor");h(this,"executeTableSelectAll");h(this,"executeImage");h(this,"executeHyperlink");h(this,"executeDeleteHyperlink");h(this,"executeCancelHyperlink");h(this,"executeEditHyperlink");h(this,"executeSeparator");h(this,"executePageBreak");h(this,"executeAddWatermark");h(this,"executeDeleteWatermark");h(this,"executeSearch");h(this,"executeSearchNavigatePre");h(this,"executeSearchNavigateNext");h(this,"executeReplace");h(this,"executePrint");h(this,"executeReplaceImageElement");h(this,"executeSaveAsImageElement");h(this,"executeChangeImageDisplay");h(this,"executePageMode");h(this,"executePageScaleRecovery");h(this,"executePageScaleMinus");h(this,"executePageScaleAdd");h(this,"executePaperSize");h(this,"executePaperDirection");h(this,"executeSetPaperMargin");h(this,"executeInsertElementList");h(this,"executeAppendElementList");h(this,"executeUpdateElementById");h(this,"executeSetValue");h(this,"executeRemoveControl");h(this,"executeSetLocale");h(this,"executeLocationCatalog");h(this,"executeWordTool");h(this,"executeSetHTML");h(this,"executeSetGroup");h(this,"executeDeleteGroup");h(this,"executeLocationGroup");h(this,"executeSetZone");h(this,"executeSetControlValue");h(this,"executeSetControlExtension");h(this,"executeSetControlProperties");h(this,"executeSetControlHighlight");h(this,"executeLocationControl");h(this,"executeInsertControl");h(this,"executeUpdateOptions");h(this,"executeInsertTitle");h(this,"executeFocus");h(this,"getCatalog");h(this,"getImage");h(this,"getOptions");h(this,"getValue");h(this,"getHTML");h(this,"getText");h(this,"getWordCount");h(this,"getCursorPosition");h(this,"getRange");h(this,"getRangeText");h(this,"getRangeContext");h(this,"getRangeRow");h(this,"getRangeParagraph");h(this,"getKeywordRangeList");h(this,"getKeywordContext");h(this,"getPaperMargin");h(this,"getSearchNavigateInfo");h(this,"getLocale");h(this,"getGroupIds");h(this,"getControlValue");h(this,"getControlList");h(this,"getContainer");h(this,"getTitleValue");h(this,"getPositionContextByEvent");h(this,"getElementById");this.executeMode=t.mode.bind(t),this.executeCut=t.cut.bind(t),this.executeCopy=t.copy.bind(t),this.executePaste=t.paste.bind(t),this.executeSelectAll=t.selectAll.bind(t),this.executeBackspace=t.backspace.bind(t),this.executeSetRange=t.setRange.bind(t),this.executeReplaceRange=t.replaceRange.bind(t),this.executeSetPositionContext=t.setPositionContext.bind(t),this.executeForceUpdate=t.forceUpdate.bind(t),this.executeBlur=t.blur.bind(t),this.executeUndo=t.undo.bind(t),this.executeRedo=t.redo.bind(t),this.executePainter=t.painter.bind(t),this.executeApplyPainterStyle=t.applyPainterStyle.bind(t),this.executeFormat=t.format.bind(t),this.executeFont=t.font.bind(t),this.executeSize=t.size.bind(t),this.executeSizeAdd=t.sizeAdd.bind(t),this.executeSizeMinus=t.sizeMinus.bind(t),this.executeBold=t.bold.bind(t),this.executeItalic=t.italic.bind(t),this.executeUnderline=t.underline.bind(t),this.executeStrikeout=t.strikeout.bind(t),this.executeSuperscript=t.superscript.bind(t),this.executeSubscript=t.subscript.bind(t),this.executeAiEdit=t.aiEdit.bind(t),this.executeAiArticle=t.aiArticle.bind(t),this.executeColor=t.color.bind(t),this.executeHighlight=t.highlight.bind(t),this.executeTitle=t.title.bind(t),this.executeList=t.list.bind(t),this.executeRowFlex=t.rowFlex.bind(t),this.executeRowMargin=t.rowMargin.bind(t),this.executeInsertTable=t.insertTable.bind(t),this.executeInsertTableTopRow=t.insertTableTopRow.bind(t),this.executeInsertTableBottomRow=t.insertTableBottomRow.bind(t),this.executeInsertTableLeftCol=t.insertTableLeftCol.bind(t),this.executeInsertTableRightCol=t.insertTableRightCol.bind(t),this.executeDeleteTableRow=t.deleteTableRow.bind(t),this.executeDeleteTableCol=t.deleteTableCol.bind(t),this.executeDeleteTable=t.deleteTable.bind(t),this.executeMergeTableCell=t.mergeTableCell.bind(t),this.executeCancelMergeTableCell=t.cancelMergeTableCell.bind(t),this.executeTableTdVerticalAlign=t.tableTdVerticalAlign.bind(t),this.executeTableBorderType=t.tableBorderType.bind(t),this.executeTableTdBorderType=t.tableTdBorderType.bind(t),this.executeTableTdSlashType=t.tableTdSlashType.bind(t),this.executeTableTdBackgroundColor=t.tableTdBackgroundColor.bind(t),this.executeTableSelectAll=t.tableSelectAll.bind(t),this.executeImage=t.image.bind(t),this.executeHyperlink=t.hyperlink.bind(t),this.executeDeleteHyperlink=t.deleteHyperlink.bind(t),this.executeCancelHyperlink=t.cancelHyperlink.bind(t),this.executeEditHyperlink=t.editHyperlink.bind(t),this.executeSeparator=t.separator.bind(t),this.executePageBreak=t.pageBreak.bind(t),this.executeAddWatermark=t.addWatermark.bind(t),this.executeDeleteWatermark=t.deleteWatermark.bind(t),this.executeSearch=t.search.bind(t),this.executeSearchNavigatePre=t.searchNavigatePre.bind(t),this.executeSearchNavigateNext=t.searchNavigateNext.bind(t),this.executeReplace=t.replace.bind(t),this.executePrint=t.print.bind(t),this.executeReplaceImageElement=t.replaceImageElement.bind(t),this.executeSaveAsImageElement=t.saveAsImageElement.bind(t),this.executeChangeImageDisplay=t.changeImageDisplay.bind(t),this.executePageMode=t.pageMode.bind(t),this.executePageScaleRecovery=t.pageScaleRecovery.bind(t),this.executePageScaleMinus=t.pageScaleMinus.bind(t),this.executePageScaleAdd=t.pageScaleAdd.bind(t),this.executePaperSize=t.paperSize.bind(t),this.executePaperDirection=t.paperDirection.bind(t),this.executeSetPaperMargin=t.setPaperMargin.bind(t),this.executeInsertElementList=t.insertElementList.bind(t),this.executeAppendElementList=t.appendElementList.bind(t),this.executeUpdateElementById=t.updateElementById.bind(t),this.executeSetValue=t.setValue.bind(t),this.executeRemoveControl=t.removeControl.bind(t),this.executeSetLocale=t.setLocale.bind(t),this.executeLocationCatalog=t.locationCatalog.bind(t),this.executeWordTool=t.wordTool.bind(t),this.executeSetHTML=t.setHTML.bind(t),this.executeSetGroup=t.setGroup.bind(t),this.executeDeleteGroup=t.deleteGroup.bind(t),this.executeLocationGroup=t.locationGroup.bind(t),this.executeSetZone=t.setZone.bind(t),this.executeUpdateOptions=t.updateOptions.bind(t),this.executeInsertTitle=t.insertTitle.bind(t),this.executeFocus=t.focus.bind(t),this.getImage=t.getImage.bind(t),this.getOptions=t.getOptions.bind(t),this.getValue=t.getValue.bind(t),this.getHTML=t.getHTML.bind(t),this.getText=t.getText.bind(t),this.getWordCount=t.getWordCount.bind(t),this.getCursorPosition=t.getCursorPosition.bind(t),this.getRange=t.getRange.bind(t),this.getRangeText=t.getRangeText.bind(t),this.getRangeContext=t.getRangeContext.bind(t),this.getRangeRow=t.getRangeRow.bind(t),this.getRangeParagraph=t.getRangeParagraph.bind(t),this.getKeywordRangeList=t.getKeywordRangeList.bind(t),this.getKeywordContext=t.getKeywordContext.bind(t),this.getCatalog=t.getCatalog.bind(t),this.getPaperMargin=t.getPaperMargin.bind(t),this.getSearchNavigateInfo=t.getSearchNavigateInfo.bind(t),this.getLocale=t.getLocale.bind(t),this.getGroupIds=t.getGroupIds.bind(t),this.getContainer=t.getContainer.bind(t),this.getTitleValue=t.getTitleValue.bind(t),this.getPositionContextByEvent=t.getPositionContextByEvent.bind(t),this.getElementById=t.getElementById.bind(t),this.executeSetControlValue=t.setControlValue.bind(t),this.executeSetControlExtension=t.setControlExtension.bind(t),this.executeSetControlProperties=t.setControlProperties.bind(t),this.executeSetControlHighlight=t.setControlHighlight.bind(t),this.getControlValue=t.getControlValue.bind(t),this.getControlList=t.getControlList.bind(t),this.executeLocationControl=t.locationControl.bind(t),this.executeInsertControl=t.insertControl.bind(t)}}function ua(s,t){return s===1125&&t===1593?{size:"a3",width:"297mm",height:"420mm"}:s===794&&t===1123?{size:"a4",width:"210mm",height:"297mm"}:s===565&&t===796?{size:"a5",width:"148mm",height:"210mm"}:{size:"",width:`${s}px`,height:`${t}px`}}function da(s,t){const{width:e,height:i,direction:n=Oe.VERTICAL}=t,r=document.createElement("iframe");r.style.visibility="hidden",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.width="0",r.style.height="0",r.style.border="none",document.body.append(r);const o=r.contentWindow,l=o.document;l.open();const a=document.createElement("div"),R=ua(e,i);s.forEach(d=>{const g=document.createElement("img");g.style.width=n===Oe.HORIZONTAL?R.height:R.width,g.style.height=n===Oe.HORIZONTAL?R.width:R.height,g.src=d,a.append(g)});const c=document.createElement("style"),u=` + * { + margin: 0; + padding: 0; + } + @page { + margin: 0; + size: ${R.size} ${n===Oe.HORIZONTAL?"landscape":"portrait"}; + }`;c.append(document.createTextNode(u)),setTimeout(()=>{l.write(`${c.outerHTML}${a.innerHTML}`),o.print(),l.close(),window.addEventListener("mouseover",()=>{r==null||r.remove()},{once:!0})})}class ha{constructor(t){h(this,"draw");h(this,"range");h(this,"position");h(this,"historyManager");h(this,"canvasEvent");h(this,"options");h(this,"control");h(this,"workerManager");h(this,"searchManager");h(this,"i18n");h(this,"zone");h(this,"tableOperate");this.draw=t,this.range=t.getRange(),this.position=t.getPosition(),this.historyManager=t.getHistoryManager(),this.canvasEvent=t.getCanvasEvent(),this.options=t.getOptions(),this.control=t.getControl(),this.workerManager=t.getWorkerManager(),this.searchManager=t.getSearch(),this.i18n=t.getI18n(),this.zone=t.getZone(),this.tableOperate=t.getTableOperate()}mode(t){this.draw.setMode(t)}cut(){this.draw.isReadonly()||this.draw.isDisabled()||this.canvasEvent.cut()}copy(){this.canvasEvent.copy()}paste(t){this.draw.isReadonly()||this.draw.isDisabled()||Ir(this.canvasEvent,t)}selectAll(){this.canvasEvent.selectAll()}backspace(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.draw.getElementList(),{startIndex:i,endIndex:n}=this.range.getRange(),r=i===n;if(r&&e[i].value===k&&i===0)return;r?this.draw.spliceElementList(e,i,1):this.draw.spliceElementList(e,i+1,n-i);const o=r?i-1:i;this.range.setRange(o,o),this.draw.render({curIndex:o})}setRange(t,e,i,n,r,o,l){if(t<0||e<0||ec.id===e);if(!~o)return;const a=r[o].trList[i],R=a.tdList[n];this.position.setPositionContext({isTable:!0,index:o,trIndex:i,tdIndex:n,tdId:R.id,trId:a.id,tableId:e})}else this.position.setPositionContext({isTable:!1})}forceUpdate(t){const{isSubmitHistory:e=!1}=t||{};this.range.clearRange(),this.draw.render({isSubmitHistory:e,isSetCursor:!1})}blur(){this.range.clearRange(),this.draw.getCursor().recoveryCursor()}undo(){this.draw.isReadonly()||this.historyManager.undo()}redo(){this.draw.isReadonly()||this.historyManager.redo()}painter(t){if(!t.isDblclick&&this.draw.getPainterStyle()){this.canvasEvent.clearPainterStyle();return}const e=this.range.getSelection();if(!e)return;const i={};e.forEach(n=>{Fe.forEach(o=>{const l=o;i[l]===void 0&&(i[l]=n[l])})}),this.draw.setPainterStyle(i,t)}applyPainterStyle(){this.draw.isReadonly()||this.draw.isDisabled()||this.canvasEvent.applyPainterStyle()}format(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getSelectionElementList();let i={},n=[];if(e==null?void 0:e.length)n=e,i={isSetCursor:!1};else{const{endIndex:r}=this.range.getRange(),l=this.draw.getElementList()[r];(l==null?void 0:l.value)===k&&(n.push(l),i={curIndex:r})}!n.length||(n.forEach(r=>{Fe.forEach(o=>{delete r[o]})}),this.draw.render(i))}font(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelectionElementList();if(i==null?void 0:i.length)i.forEach(n=>{n.font=t}),this.draw.render({isSetCursor:!1});else{const{endIndex:n}=this.range.getRange(),o=this.draw.getElementList()[n];(o==null?void 0:o.value)===k&&(o.font=t,this.draw.render({curIndex:n,isCompute:!1}))}}size(t){const{minSize:e,maxSize:i,defaultSize:n}=this.options;if(ti||this.draw.isReadonly()||this.draw.isDisabled())return;let o={},l=[];const a=this.range.getTextLikeSelectionElementList();if(a==null?void 0:a.length)l=a,o={isSetCursor:!1};else{const{endIndex:c}=this.range.getRange(),d=this.draw.getElementList()[c];(d==null?void 0:d.value)===k&&(l.push(d),o={curIndex:c})}if(!l.length)return;let R=!1;l.forEach(c=>{!c.size&&t===n||c.size&&c.size===t||(c.size=t,R=!0)}),R&&this.draw.render(o)}sizeAdd(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getTextLikeSelectionElementList();let i={},n=[];if(e==null?void 0:e.length)n=e,i={isSetCursor:!1};else{const{endIndex:a}=this.range.getRange(),c=this.draw.getElementList()[a];(c==null?void 0:c.value)===k&&(n.push(c),i={curIndex:a})}if(!n.length)return;const{defaultSize:r,maxSize:o}=this.options;let l=!1;n.forEach(a=>{a.size||(a.size=r),!(a.size>=o)&&(a.size+2>o?a.size=o:a.size+=2,l=!0)}),l&&this.draw.render(i)}sizeMinus(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getTextLikeSelectionElementList();let i={},n=[];if(e==null?void 0:e.length)n=e,i={isSetCursor:!1};else{const{endIndex:a}=this.range.getRange(),c=this.draw.getElementList()[a];(c==null?void 0:c.value)===k&&(n.push(c),i={curIndex:a})}if(!n.length)return;const{defaultSize:r,minSize:o}=this.options;let l=!1;n.forEach(a=>{a.size||(a.size=r),!(a.size<=o)&&(a.size-2!n.bold);e.forEach(n=>{n.bold=!!~i}),this.draw.render({isSetCursor:!1})}else{const{endIndex:i}=this.range.getRange(),r=this.draw.getElementList()[i];(r==null?void 0:r.value)===k&&(r.bold=!r.bold,this.draw.render({curIndex:i,isCompute:!1}))}}italic(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getSelectionElementList();if(e==null?void 0:e.length){const i=e.findIndex(n=>!n.italic);e.forEach(n=>{n.italic=!!~i}),this.draw.render({isSetCursor:!1})}else{const{endIndex:i}=this.range.getRange(),r=this.draw.getElementList()[i];(r==null?void 0:r.value)===k&&(r.italic=!r.italic,this.draw.render({curIndex:i,isCompute:!1}))}}underline(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelectionElementList();if(i==null?void 0:i.length){const n=i.some(r=>!r.underline||!t&&r.textDecoration||t&&!r.textDecoration||t&&r.textDecoration&&!Vo(r.textDecoration,t));i.forEach(r=>{r.underline=n,n&&t?r.textDecoration=t:delete r.textDecoration}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{const{endIndex:n}=this.range.getRange(),o=this.draw.getElementList()[n];(o==null?void 0:o.value)===k&&(o.underline=!o.underline,this.draw.render({curIndex:n,isCompute:!1}))}}strikeout(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getSelectionElementList();if(e==null?void 0:e.length){const i=e.findIndex(n=>!n.strikeout);e.forEach(n=>{n.strikeout=!!~i}),this.draw.render({isSetCursor:!1,isCompute:!1})}else{const{endIndex:i}=this.range.getRange(),r=this.draw.getElementList()[i];(r==null?void 0:r.value)===k&&(r.strikeout=!r.strikeout,this.draw.render({curIndex:i,isCompute:!1}))}}superscript(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getSelectionElementList();if(!e)return;const i=e.findIndex(n=>n.type===N.SUPERSCRIPT);e.forEach(n=>{~i?n.type===N.SUPERSCRIPT&&(n.type=N.TEXT,delete n.actualSize):(!n.type||n.type===N.TEXT||n.type===N.SUBSCRIPT)&&(n.type=N.SUPERSCRIPT)}),this.draw.render({isSetCursor:!1})}subscript(){if(this.draw.isReadonly()||this.draw.isDisabled())return;const e=this.range.getSelectionElementList();if(!e)return;const i=e.findIndex(n=>n.type===N.SUBSCRIPT);e.forEach(n=>{~i?n.type===N.SUBSCRIPT&&(n.type=N.TEXT,delete n.actualSize):(!n.type||n.type===N.TEXT||n.type===N.SUPERSCRIPT)&&(n.type=N.SUBSCRIPT)}),this.draw.render({isSetCursor:!1})}aiArticle(t){if(this.selectAll(),this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelectionElementList();let n="";return i==null||i.forEach(r=>{n+=r.value}),n===""&&(this.setHTML({main:"

"}),n=" "),this.search(n),this.replace(n+t),n}aiEdit(t,e){if(this.draw.isReadonly()||this.draw.isDisabled())return;const n=this.range.getSelectionElementList();if(!n)return;let r="";return n.forEach(o=>{r+=o.value}),this.search(r),t&&t=="creation_ask"?window.parent.postMessage({type:"aiCreater",data:{title:e,content:r},action:t},"*"):t&&r&&window.parent.postMessage({type:"aiCreater",data:r,action:t},"*"),r}color(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelectionElementList();if(i==null?void 0:i.length)i.forEach(n=>{t?n.color=t:delete n.color}),this.draw.render({isSetCursor:!1,isCompute:!1});else{const{endIndex:n}=this.range.getRange(),o=this.draw.getElementList()[n];(o==null?void 0:o.value)===k&&(t?o.color=t:delete o.color,this.draw.render({curIndex:n,isCompute:!1}))}}highlight(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const i=this.range.getSelectionElementList();if(i==null?void 0:i.length)i.forEach(n=>{t?n.highlight=t:delete n.highlight}),this.draw.render({isSetCursor:!1,isCompute:!1});else{const{endIndex:n}=this.range.getRange(),o=this.draw.getElementList()[n];(o==null?void 0:o.value)===k&&(t?o.highlight=t:delete o.highlight,this.draw.render({curIndex:n,isCompute:!1}))}}title(t){if(this.draw.isReadonly()||this.draw.isDisabled())return;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return;const r=this.draw.getElementList(),o=i===n?this.range.getRangeParagraphElementList():r.slice(i+1,n+1);if(!o||!o.length)return;const l=Mt(),a=this.draw.getOptions().title;o.forEach(u=>{!u.type&&u.value===k||(t?(u.level=t,u.titleId=l,os(u)&&(u.size=a[is[t]],u.bold=!0)):u.titleId&&(delete u.titleId,delete u.title,delete u.level,delete u.size,delete u.bold))});const R=i===n,c=R?n:i;this.draw.render({curIndex:c,isSetCursor:R})}list(t,e){this.draw.isReadonly()||this.draw.getListParticle().setList(t,e)}rowFlex(t){if(this.draw.isReadonly())return;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(a=>{a.rowFlex=t});const o=i===n,l=o?n:i;this.draw.render({curIndex:l,isSetCursor:o})}rowMargin(t){if(this.draw.isReadonly())return;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return;const r=this.range.getRangeRowElementList();if(!r)return;r.forEach(a=>{a.rowMargin=t});const o=i===n,l=o?n:i;this.draw.render({curIndex:l,isSetCursor:o})}insertTable(t,e){this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl()||this.tableOperate.insertTable(t,e)}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()}tableTdVerticalAlign(t){this.draw.isReadonly()||this.tableOperate.tableTdVerticalAlign(t)}tableBorderType(t){this.draw.isReadonly()||this.tableOperate.tableBorderType(t)}tableTdBorderType(t){this.draw.isReadonly()||this.tableOperate.tableTdBorderType(t)}tableTdSlashType(t){this.draw.isReadonly()||this.tableOperate.tableTdSlashType(t)}tableTdBackgroundColor(t){this.draw.isReadonly()||this.tableOperate.tableTdBackgroundColor(t)}tableSelectAll(){this.tableOperate.tableSelectAll()}hyperlink(t){if(this.draw.isReadonly()||this.draw.isDisabled()||this.control.getActiveControl())return;const{startIndex:n,endIndex:r}=this.range.getRange();if(!~n&&!~r)return;const o=this.draw.getElementList(),{valueList:l,url:a}=t,R=Mt(),c=l==null?void 0:l.map(g=>({url:a,hyperlinkId:R,value:g.value,type:N.HYPERLINK}));if(!c)return;const u=n+1;Ht(o,c,n,{editorOptions:this.options}),this.draw.spliceElementList(o,u,n===r?0:r-n,...c);const d=u+c.length-1;this.range.setRange(d,d),this.draw.render({curIndex:d})}getHyperlinkRange(){let t=-1,e=-1;const{startIndex:i,endIndex:n}=this.range.getRange();if(!~i&&!~n)return null;const r=this.draw.getElementList(),o=r[i];if(o.type!==N.HYPERLINK)return null;let l=i;for(;l>0;){if(r[l].hyperlinkId!==o.hyperlinkId){t=l+1;break}l--}let a=i+1;for(;a0;){const m=l[V],Y=l[V-1];if(m.titleId&&m.titleId!==(Y==null?void 0:Y.titleId)){I=m.titleId,Z=c[V].pageNo;break}V--}return Ot({isCollapsed:n,startElement:a,endElement:R,startPageNo:u,endPageNo:d,rangeRects:g,zone:M,isTable:T,trIndex:X!=null?X:null,tdIndex:S!=null?S:null,tableElement:W,selectionText:r,selectionElementList:o,titleId:I,titleStartPageNo:Z})}getRangeRow(){const t=this.range.getRangeRowElementList();return t?Tt(t):null}getRangeParagraph(){const t=this.range.getRangeParagraphElementList();return t?Tt(t):null}getKeywordRangeList(t){return this.range.getKeywordRangeList(t)}getKeywordContext(t){var o,l,a,R;const e=this.getKeywordRangeList(t);if(!e.length)return null;const i=[],n=this.position.getOriginalMainPositionList(),r=this.draw.getOriginalMainElementList();for(let c=0;cF.id===L);S&&(M=((R=(a=(l=(o=S.trList)==null?void 0:o[O])==null?void 0:l.tdList)==null?void 0:a[P])==null?void 0:R.positionList)||[])}const T=Ot(M[d]),X=Ot(M[g]);i.push({range:u,startPosition:T,endPosition:X})}return i}pageMode(t){this.draw.setPageMode(t)}pageScaleRecovery(){const{scale:t}=this.options;t!==1&&this.draw.setPageScale(1)}pageScaleMinus(){const{scale:t}=this.options,e=t*10-1;e>=5&&this.draw.setPageScale(e/10)}pageScaleAdd(){const{scale:t}=this.options,e=t*10+1;e<=30&&this.draw.setPageScale(e/10)}paperSize(t,e){this.draw.setPaperSize(t,e)}paperDirection(t){this.draw.setPaperDirection(t)}getPaperMargin(){return this.options.margins}setPaperMargin(t){return this.draw.setPaperMargin(t)}insertElementList(t){if(!t.length||this.draw.isReadonly()||this.draw.isDisabled())return;const i=Ot(t),{startIndex:n}=this.range.getRange(),r=this.draw.getElementList();Ht(r,i,n,{isBreakWhenWrap:!0,editorOptions:this.options}),this.draw.insertElementList(i)}appendElementList(t,e){!t.length||this.draw.isReadonly()||this.draw.appendElementList(Ot(t),e)}updateElementById(t){const{id:e,conceptId:i}=t;if(!e&&!i)return;function n(o){for(let l=0;l{let a=0;for(;al!==void 0?oi(l,{innerWidth:r}):void 0;this.setValue({header:o(e),main:o(i),footer:o(n)})}setGroup(){return this.draw.isReadonly()?null:this.draw.getGroup().setGroup()}deleteGroup(t){this.draw.isReadonly()||this.draw.getGroup().deleteGroup(t)}getGroupIds(){return this.draw.getWorkerManager().getGroupIds()}locationGroup(t){const e=this.draw.getOriginalMainElementList(),i=this.draw.getGroup().getContextByGroupId(e,t);if(!i)return;const{isTable:n,index:r,trIndex:o,tdIndex:l,tdId:a,trId:R,tableId:c,endIndex:u}=i;this.position.setPositionContext({isTable:n,index:r,trIndex:o,tdIndex:l,tdId:a,trId:R,tableId:c}),this.range.setRange(u,u),this.draw.render({curIndex:u,isCompute:!1,isSubmitHistory:!1})}setZone(t){this.draw.getZone().setZone(t)}getControlValue(t){return this.draw.getControl().getValueById(t)}setControlValue(t){this.draw.getControl().setValueById(t)}setControlExtension(t){this.draw.getControl().setExtensionById(t)}setControlProperties(t){this.draw.getControl().setPropertiesById(t)}setControlHighlight(t){this.draw.getControl().setHighlightList(t),this.draw.render({isSubmitHistory:!1})}updateOptions(t){const e=en(t);Object.entries(e).forEach(([i,n])=>{Reflect.set(this.options,i,n)}),this.forceUpdate()}getControlList(){return this.draw.getControl().getList()}locationControl(t,e){const i=(e==null?void 0:e.position)===ii.AFTER;function n(o,l){let a=0;for(;a{var R;let a=0;for(;a{ni(l,o,R)}),this.draw.insertElementList([i])}focus(t){const{position:e=ii.AFTER}=t||{},i=e===ii.BEFORE?0:this.draw.getOriginalMainElementList().length-1;this.range.setRange(i,i),this.draw.render({curIndex:i,isCompute:!1,isSubmitHistory:!1});const n=this.draw.getPosition().getPositionList();this.draw.getCursor().moveCursorToVisible({cursorPosition:n[i],direction:Kt.DOWN})}}class ga{constructor(){h(this,"rangeStyleChange");h(this,"visiblePageNoListChange");h(this,"intersectionPageNoChange");h(this,"pageSizeChange");h(this,"pageScaleChange");h(this,"saved");h(this,"contentChange");h(this,"controlChange");h(this,"pageModeChange");h(this,"zoneChange");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.pageModeChange=null,this.zoneChange=null}}class La{constructor(t){h(this,"contextMenuList");h(this,"getContextMenuList");h(this,"shortcutList");h(this,"langMap");const{contextMenu:e,shortcut:i,i18n:n}=t;this.contextMenuList=e.registerContextMenuList.bind(e),this.getContextMenuList=e.getContextMenuList.bind(e),this.shortcutList=i.registerShortcutList.bind(i),this.langMap=n.registerLangMap.bind(n)}}const Ws={SELECTED_TEXT:"%s"},ai={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"}},{CONTROL:{DELETE:Oa}}=ai,Ma=[{key:Oa,i18nPath:"contextmenu.control.delete",when:s=>{var t;return!s.isReadonly&&!s.editorHasSelection&&!!((t=s.startElement)==null?void 0:t.controlId)&&s.options.mode!==Rt.FORM},callback:s=>{s.executeRemoveControl()}}],{GLOBAL:{CUT:Pa,COPY:Ta,PASTE:Sa,SELECT_ALL:Xa,PRINT:Na}}=ai,Fa=[{key:Pa,i18nPath:"contextmenu.global.cut",shortCut:`${Qe?"\u2318":"Ctrl"} + X`,when:s=>!s.isReadonly,callback:s=>{s.executeCut()}},{key:Ta,i18nPath:"contextmenu.global.copy",shortCut:`${Qe?"\u2318":"Ctrl"} + C`,when:s=>s.editorHasSelection||s.isCrossRowCol,callback:s=>{s.executeCopy()}},{key:Sa,i18nPath:"contextmenu.global.paste",shortCut:`${Qe?"\u2318":"Ctrl"} + V`,when:s=>!s.isReadonly&&s.editorTextFocus,callback:s=>{s.executePaste()}},{key:Xa,i18nPath:"contextmenu.global.selectAll",shortCut:`${Qe?"\u2318":"Ctrl"} + A`,when:s=>s.editorTextFocus,callback:s=>{s.executeSelectAll()}},{isDivider:!0},{key:Na,i18nPath:"contextmenu.global.print",icon:"print",when:()=>!0,callback:s=>{s.executePrint()}}],{HYPERLINK:{DELETE:fa,CANCEL:pa,EDIT:ma}}=ai,Ia=[{key:fa,i18nPath:"contextmenu.hyperlink.delete",when:s=>{var t;return!s.isReadonly&&((t=s.startElement)==null?void 0:t.type)===N.HYPERLINK},callback:s=>{s.executeDeleteHyperlink()}},{key:pa,i18nPath:"contextmenu.hyperlink.cancel",when:s=>{var t;return!s.isReadonly&&((t=s.startElement)==null?void 0:t.type)===N.HYPERLINK},callback:s=>{s.executeCancelHyperlink()}},{key:ma,i18nPath:"contextmenu.hyperlink.edit",when:s=>{var t;return!s.isReadonly&&((t=s.startElement)==null?void 0:t.type)===N.HYPERLINK},callback:(s,t)=>{var i;const e=window.prompt("\u7F16\u8F91\u94FE\u63A5",(i=t.startElement)==null?void 0:i.url);e&&s.executeEditHyperlink(e)}}],{IMAGE:{CHANGE:Wa,SAVE_AS:Va,TEXT_WRAP:Ya,TEXT_WRAP_EMBED:Ua,TEXT_WRAP_UP_DOWN:Za,TEXT_WRAP_SURROUND:Qa,TEXT_WRAP_FLOAT_TOP:Da,TEXT_WRAP_FLOAT_BOTTOM:Ka}}=ai,Ea=[{key:Wa,i18nPath:"contextmenu.image.change",icon:"image-change",when:s=>{var t;return!s.isReadonly&&!s.editorHasSelection&&((t=s.startElement)==null?void 0:t.type)===N.IMAGE},callback:s=>{const t=document.createElement("input");t.type="file",t.accept=".png, .jpg, .jpeg",t.onchange=()=>{const e=t.files[0],i=new FileReader;i.readAsDataURL(e),i.onload=()=>{const n=i.result;s.executeReplaceImageElement(n)}},t.click()}},{key:Va,i18nPath:"contextmenu.image.saveAs",icon:"image",when:s=>{var t;return!s.editorHasSelection&&((t=s.startElement)==null?void 0:t.type)===N.IMAGE},callback:s=>{s.executeSaveAsImageElement()}},{key:Ya,i18nPath:"contextmenu.image.textWrap",when:s=>{var t;return!s.isReadonly&&!s.editorHasSelection&&((t=s.startElement)==null?void 0:t.type)===N.IMAGE},childMenus:[{key:Ua,i18nPath:"contextmenu.image.textWrapType.embed",when:()=>!0,callback:(s,t)=>{s.executeChangeImageDisplay(t.startElement,et.BLOCK)}},{key:Za,i18nPath:"contextmenu.image.textWrapType.upDown",when:()=>!0,callback:(s,t)=>{s.executeChangeImageDisplay(t.startElement,et.INLINE)}},{key:Qa,i18nPath:"contextmenu.image.textWrapType.surround",when:()=>!0,callback:(s,t)=>{s.executeChangeImageDisplay(t.startElement,et.SURROUND)}},{key:Da,i18nPath:"contextmenu.image.textWrapType.floatTop",when:()=>!0,callback:(s,t)=>{s.executeChangeImageDisplay(t.startElement,et.FLOAT_TOP)}},{key:Ka,i18nPath:"contextmenu.image.textWrapType.floatBottom",when:()=>!0,callback:(s,t)=>{s.executeChangeImageDisplay(t.startElement,et.FLOAT_BOTTOM)}}]}],{TABLE:{BORDER:ba,BORDER_ALL:xa,BORDER_EMPTY:Ca,BORDER_DASH:wa,BORDER_EXTERNAL:Ha,BORDER_INTERNAL:ya,BORDER_TD:Ga,BORDER_TD_TOP:va,BORDER_TD_LEFT:Ja,BORDER_TD_BOTTOM:Aa,BORDER_TD_RIGHT:Ba,BORDER_TD_BACK:ka,BORDER_TD_FORWARD:_a,VERTICAL_ALIGN:za,VERTICAL_ALIGN_TOP:$a,VERTICAL_ALIGN_MIDDLE:qa,VERTICAL_ALIGN_BOTTOM:ja,INSERT_ROW_COL:tR,INSERT_TOP_ROW:eR,INSERT_BOTTOM_ROW:iR,INSERT_LEFT_COL:nR,INSERT_RIGHT_COL:sR,DELETE_ROW_COL:oR,DELETE_ROW:rR,DELETE_COL:lR,DELETE_TABLE:aR,MERGE_CELL:RR,CANCEL_MERGE_CELL:cR}}=ai,uR=[{isDivider:!0},{key:ba,i18nPath:"contextmenu.table.border",icon:"border-all",when:s=>!s.isReadonly&&s.isInTable&&s.options.mode!==Rt.FORM,childMenus:[{key:xa,i18nPath:"contextmenu.table.borderAll",icon:"border-all",when:()=>!0,callback:s=>{s.executeTableBorderType(vt.ALL)}},{key:Ca,i18nPath:"contextmenu.table.borderEmpty",icon:"border-empty",when:()=>!0,callback:s=>{s.executeTableBorderType(vt.EMPTY)}},{key:wa,i18nPath:"contextmenu.table.borderDash",icon:"border-dash",when:()=>!0,callback:s=>{s.executeTableBorderType(vt.DASH)}},{key:Ha,i18nPath:"contextmenu.table.borderExternal",icon:"border-external",when:()=>!0,callback:s=>{s.executeTableBorderType(vt.EXTERNAL)}},{key:ya,i18nPath:"contextmenu.table.borderInternal",icon:"border-internal",when:()=>!0,callback:s=>{s.executeTableBorderType(vt.INTERNAL)}},{key:Ga,i18nPath:"contextmenu.table.borderTd",icon:"border-td",when:()=>!0,childMenus:[{key:va,i18nPath:"contextmenu.table.borderTdTop",icon:"border-td-top",when:()=>!0,callback:s=>{s.executeTableTdBorderType(kt.TOP)}},{key:Ba,i18nPath:"contextmenu.table.borderTdRight",icon:"border-td-right",when:()=>!0,callback:s=>{s.executeTableTdBorderType(kt.RIGHT)}},{key:Aa,i18nPath:"contextmenu.table.borderTdBottom",icon:"border-td-bottom",when:()=>!0,callback:s=>{s.executeTableTdBorderType(kt.BOTTOM)}},{key:Ja,i18nPath:"contextmenu.table.borderTdLeft",icon:"border-td-left",when:()=>!0,callback:s=>{s.executeTableTdBorderType(kt.LEFT)}},{key:_a,i18nPath:"contextmenu.table.borderTdForward",icon:"border-td-forward",when:()=>!0,callback:s=>{s.executeTableTdSlashType(Je.FORWARD)}},{key:ka,i18nPath:"contextmenu.table.borderTdBack",icon:"border-td-back",when:()=>!0,callback:s=>{s.executeTableTdSlashType(Je.BACK)}}]}]},{key:za,i18nPath:"contextmenu.table.verticalAlign",icon:"vertical-align",when:s=>!s.isReadonly&&s.isInTable&&s.options.mode!==Rt.FORM,childMenus:[{key:$a,i18nPath:"contextmenu.table.verticalAlignTop",icon:"vertical-align-top",when:()=>!0,callback:s=>{s.executeTableTdVerticalAlign(It.TOP)}},{key:qa,i18nPath:"contextmenu.table.verticalAlignMiddle",icon:"vertical-align-middle",when:()=>!0,callback:s=>{s.executeTableTdVerticalAlign(It.MIDDLE)}},{key:ja,i18nPath:"contextmenu.table.verticalAlignBottom",icon:"vertical-align-bottom",when:()=>!0,callback:s=>{s.executeTableTdVerticalAlign(It.BOTTOM)}}]},{key:tR,i18nPath:"contextmenu.table.insertRowCol",icon:"insert-row-col",when:s=>!s.isReadonly&&s.isInTable&&s.options.mode!==Rt.FORM,childMenus:[{key:eR,i18nPath:"contextmenu.table.insertTopRow",icon:"insert-top-row",when:()=>!0,callback:s=>{s.executeInsertTableTopRow()}},{key:iR,i18nPath:"contextmenu.table.insertBottomRow",icon:"insert-bottom-row",when:()=>!0,callback:s=>{s.executeInsertTableBottomRow()}},{key:nR,i18nPath:"contextmenu.table.insertLeftCol",icon:"insert-left-col",when:()=>!0,callback:s=>{s.executeInsertTableLeftCol()}},{key:sR,i18nPath:"contextmenu.table.insertRightCol",icon:"insert-right-col",when:()=>!0,callback:s=>{s.executeInsertTableRightCol()}}]},{key:oR,i18nPath:"contextmenu.table.deleteRowCol",icon:"delete-row-col",when:s=>!s.isReadonly&&s.isInTable&&s.options.mode!==Rt.FORM,childMenus:[{key:rR,i18nPath:"contextmenu.table.deleteRow",icon:"delete-row",when:()=>!0,callback:s=>{s.executeDeleteTableRow()}},{key:lR,i18nPath:"contextmenu.table.deleteCol",icon:"delete-col",when:()=>!0,callback:s=>{s.executeDeleteTableCol()}},{key:aR,i18nPath:"contextmenu.table.deleteTable",icon:"delete-table",when:()=>!0,callback:s=>{s.executeDeleteTable()}}]},{key:RR,i18nPath:"contextmenu.table.mergeCell",icon:"merge-cell",when:s=>!s.isReadonly&&s.isCrossRowCol&&s.options.mode!==Rt.FORM,callback:s=>{s.executeMergeTableCell()}},{key:cR,i18nPath:"contextmenu.table.mergeCancelCell",icon:"merge-cancel-cell",when:s=>!s.isReadonly&&s.isInTable&&s.options.mode!==Rt.FORM,callback:s=>{s.executeCancelMergeTableCell()}}];class dR{constructor(t,e){h(this,"options");h(this,"draw");h(this,"command");h(this,"range");h(this,"position");h(this,"i18n");h(this,"container");h(this,"contextMenuList");h(this,"contextMenuContainerList");h(this,"contextMenuRelationShip");h(this,"context");h(this,"_proxyContextMenuEvent",t=>{this.context=this._getContext();const e=this._filterMenuList(this.contextMenuList);e.some(n=>!n.isDivider)&&(this.dispose(),this._render({contextMenuList:e,left:t.x,top:t.y})),t.preventDefault()});h(this,"_handleSideEffect",t=>{if(this.contextMenuContainerList.length){const e=(t==null?void 0:t.composedPath()[0])||t.target;Mi(e,n=>!!n&&n.nodeType===1&&n.getAttribute(he)===le.CONTEXTMENU,!0)||this.dispose()}});this.options=t.getOptions(),this.draw=t,this.command=e,this.range=t.getRange(),this.position=t.getPosition(),this.i18n=t.getI18n(),this.container=t.getContainer(),this.context=null,this.contextMenuList=[...Fa,...uR,...Ea,...Ma,...Ia],this.contextMenuContainerList=[],this.contextMenuRelationShip=new Map,this._addEvent()}getContextMenuList(){return this.contextMenuList}_addEvent(){this.container.addEventListener("contextmenu",this._proxyContextMenuEvent),document.addEventListener("mousedown",this._handleSideEffect)}removeEvent(){this.container.removeEventListener("contextmenu",this._proxyContextMenuEvent),document.removeEventListener("mousedown",this._handleSideEffect)}_filterMenuList(t){var n;const{contextMenuDisableKeys:e}=this.options,i=[];for(let r=0;r!V.isDivider)&&(X.classList.add(`${_}-contextmenu-sub-item`),X.onmouseenter=()=>{this._setHoverStatus(X,!0),this._removeSubMenu(o);const V=X.getBoundingClientRect(),m=V.left+V.width,Y=V.top;a=this._render({contextMenuList:I,left:m,top:Y,parentMenuContainer:o})},X.onmouseleave=V=>{(!a||!a.contains(V.relatedTarget))&&this._setHoverStatus(X,!1)})}else X.onmouseenter=()=>{this._setHoverStatus(X,!0),this._removeSubMenu(o)},X.onmouseleave=()=>{this._setHoverStatus(X,!1)},X.onclick=()=>{T.callback&&this.context&&T.callback(this.command,this.context),this.dispose()};const S=document.createElement("i");X.append(S),T.icon&&S.classList.add(`${_}-contextmenu-${T.icon}`);const F=document.createElement("span"),W=T.i18nPath?this._formatName(this.i18n.t(T.i18nPath)):this._formatName(T.name||"");if(F.append(document.createTextNode(W)),X.append(F),T.shortCut){const I=document.createElement("span");I.classList.add(`${_}-shortcut`),I.append(document.createTextNode(T.shortCut)),X.append(I)}l.append(X)}}o.append(l),o.style.display="block";const R=window.innerWidth,c=o.getBoundingClientRect(),u=c.width,d=i+u>R?i-u:i;o.style.left=`${d}px`;const g=window.innerHeight,L=c.height,O=n+L>g?n-L:n;return o.style.top=`${O}px`,this.contextMenuContainerList.push(o),o}_removeSubMenu(t){const e=this.contextMenuRelationShip.get(t);e&&(this._removeSubMenu(e),e.remove(),this.contextMenuRelationShip.delete(t))}_setHoverStatus(t,e){var i;e?((i=t.parentNode)==null||i.querySelectorAll(`${_}-contextmenu-item`).forEach(n=>n.classList.remove("hover")),t.classList.add("hover")):t.classList.remove("hover")}_formatName(t){const e=Object.values(Ws),i=new RegExp(`${e.join("|")}`);let n=t;if(i.test(n)){const r=new RegExp(Ws.SELECTED_TEXT,"g");if(r.test(n)){const o=this.range.toString();n=n.replace(r,o)}}return n}registerContextMenuList(t){this.contextMenuList.push(...t)}dispose(){this.contextMenuContainerList.forEach(t=>t.remove()),this.contextMenuContainerList=[],this.contextMenuRelationShip.clear()}}const hR=[{key:z.X,ctrl:!0,shift:!0,callback:s=>{s.executeStrikeout()}},{key:z.LEFT_BRACKET,mod:!0,callback:s=>{s.executeSizeAdd()}},{key:z.RIGHT_BRACKET,mod:!0,callback:s=>{s.executeSizeMinus()}},{key:z.B,mod:!0,callback:s=>{s.executeBold()}},{key:z.I,mod:!0,callback:s=>{s.executeItalic()}},{key:z.U,mod:!0,callback:s=>{s.executeUnderline()}},{key:Qe?z.COMMA:z.RIGHT_ANGLE_BRACKET,mod:!0,shift:!0,callback:s=>{s.executeSuperscript()}},{key:Qe?z.PERIOD:z.LEFT_ANGLE_BRACKET,mod:!0,shift:!0,callback:s=>{s.executeSubscript()}},{key:z.L,mod:!0,callback:s=>{s.executeRowFlex(at.LEFT)}},{key:z.E,mod:!0,callback:s=>{s.executeRowFlex(at.CENTER)}},{key:z.R,mod:!0,callback:s=>{s.executeRowFlex(at.RIGHT)}},{key:z.J,mod:!0,callback:s=>{s.executeRowFlex(at.ALIGNMENT)}},{key:z.J,mod:!0,shift:!0,callback:s=>{s.executeRowFlex(at.JUSTIFY)}}],gR=[{key:z.ZERO,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(null)}},{key:z.ONE,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.FIRST)}},{key:z.TWO,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.SECOND)}},{key:z.THREE,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.THIRD)}},{key:z.FOUR,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.FOURTH)}},{key:z.FIVE,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.FIFTH)}},{key:z.SIX,alt:!0,ctrl:!0,callback:s=>{s.executeTitle(ht.SIXTH)}}],LR=[{key:z.I,shift:!0,mod:!0,callback:s=>{s.executeList(oe.UL,Gt.DISC)}},{key:z.U,shift:!0,mod:!0,callback:s=>{s.executeList(oe.OL)}}];class OR{constructor(t,e){h(this,"command");h(this,"globalShortcutList");h(this,"agentShortcutList");h(this,"_globalKeydown",t=>{!this.globalShortcutList.length||this._execute(t,this.globalShortcutList)});this.command=e,this.globalShortcutList=[],this.agentShortcutList=[],this._addShortcutList([...hR,...gR,...LR]),this._addEvent(),t.getCursor().getAgentDom().addEventListener("keydown",this._agentKeydown.bind(this))}_addEvent(){document.addEventListener("keydown",this._globalKeydown)}removeEvent(){document.removeEventListener("keydown",this._globalKeydown)}_addShortcutList(t){for(let e=t.length-1;e>=0;e--){const i=t[e];i.isGlobal?this.globalShortcutList.unshift(i):this.agentShortcutList.unshift(i)}}registerShortcutList(t){this._addShortcutList(t)}_agentKeydown(t){!this.agentShortcutList.length||this._execute(t,this.agentShortcutList)}_execute(t,e){var i;for(let n=0;nn(e))}}off(t,e){if(!t||typeof e!="function")return;const i=this.eventHub.get(t);!i||i.delete(e)}isSubscribe(t){const e=this.eventHub.get(t);return!!e&&e.size>0}}class TR{constructor(){h(this,"paste");h(this,"copy");h(this,"drop")}}class SR{constructor(t,e,i={}){h(this,"command");h(this,"listener");h(this,"eventBus");h(this,"override");h(this,"register");h(this,"destroy");h(this,"use");const n=en(i);e=Ot(e);let r=[],o=[],l=[];Array.isArray(e)?o=e:(r=e.header||[],o=e.main,l=e.footer||[]),[r,o,l].forEach(g=>{Bt(g,{editorOptions:n,isForceCompensation:!0})}),this.listener=new ga,this.eventBus=new PR,this.override=new TR;const R=new Ra(t,n,{header:r,main:o,footer:l},this.listener,this.eventBus,this.override);this.command=new ca(new ha(R));const c=new dR(R,this.command),u=new OR(R,this.command);this.register=new La({contextMenu:c,shortcut:u,i18n:R.getI18n()}),this.destroy=()=>{R.destroy(),u.removeEvent(),c.removeEvent()};const d=new MR(this);this.use=d.use.bind(d)}}class _t{constructor(t){h(this,"options");h(this,"mask");h(this,"container");h(this,"inputList");this.options=t,this.mask=null,this.container=null,this.inputList=[],this._render()}_render(){var P;const{title:t,data:e,onClose:i,onCancel:n,onConfirm:r}=this.options,o=document.createElement("div");o.classList.add("dialog-mask"),o.setAttribute(he,le.COMPONENT),document.body.append(o);const l=document.createElement("div");l.classList.add("dialog-container"),l.setAttribute(he,le.COMPONENT);const a=document.createElement("div");a.classList.add("dialog"),l.append(a);const R=document.createElement("div");R.classList.add("dialog-title");const c=document.createElement("span");c.append(document.createTextNode(t));const u=document.createElement("i");u.onclick=()=>{i&&i(),this._dispose()},R.append(c),R.append(u),a.append(R);const d=document.createElement("div");d.classList.add("dialog-option");for(let M=0;M{const W=document.createElement("option");W.value=F.value,W.label=F.label,S.append(W)})):T.type==="textarea"?S=document.createElement("textarea"):(S=document.createElement("input"),S.type=T.type),T.width&&(S.style.width=`${T.width}px`),T.height&&(S.style.height=`${T.height}px`),S.name=T.name,S.value=T.value||"",S instanceof HTMLSelectElement||(S.placeholder=T.placeholder||""),X.append(S),d.append(X),this.inputList.push(S)}a.append(d);const g=document.createElement("div");g.classList.add("dialog-menu");const L=document.createElement("button");L.classList.add("dialog-menu__cancel"),L.append(document.createTextNode("\u53D6\u6D88")),L.type="button",L.onclick=()=>{n&&n(),this._dispose()},g.append(L);const O=document.createElement("button");O.append(document.createTextNode("\u786E\u5B9A")),O.type="submit",O.onclick=()=>{if(r){const M=this.inputList.map(T=>({name:T.name,value:T.value}));r(M)}this._dispose()},g.append(O),a.append(g),document.body.append(l),this.container=l,this.mask=o}_dispose(){var t,e;(t=this.mask)==null||t.remove(),(e=this.container)==null||e.remove()}}function XR(s){switch(s){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 NR(s){const t=[];function e(i){for(let n=0;n{t&&t(),this._dispose()},l.append(a),l.append(R),o.append(l);const c=document.createElement("div");c.classList.add("signature-operation");const u=document.createElement("div");u.classList.add("signature-operation__undo");const d=document.createElement("i"),g=document.createElement("span");g.innerText="\u64A4\u9500",u.append(d),u.append(g),c.append(u);const L=document.createElement("div");L.classList.add("signature-operation__trash");const O=document.createElement("i"),P=document.createElement("span");P.innerText="\u6E05\u7A7A",L.append(O),L.append(P),c.append(L),o.append(c);const M=document.createElement("div");M.classList.add("signature-canvas");const T=document.createElement("canvas");T.width=this.canvasWidth,T.height=this.canvasHeight,T.style.width=`${this.canvasWidth/this.dpr}px`,T.style.height=`${this.canvasHeight/this.dpr}px`,M.append(T),o.append(M);const X=document.createElement("div");X.classList.add("signature-menu");const S=document.createElement("button");S.classList.add("signature-menu__cancel"),S.append(document.createTextNode("\u53D6\u6D88")),S.type="button",S.onclick=()=>{e&&e(),this._dispose()},X.append(S);const F=document.createElement("button");return F.append(document.createTextNode("\u786E\u5B9A")),F.type="submit",F.onclick=()=>{i&&i(this._toData()),this._dispose()},X.append(F),o.append(X),document.body.append(r),this.container=r,this.mask=n,{mask:n,canvas:T,container:r,trashContainer:L,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(t){for(this.undoStack.push(t);this.undoStack.length>this.MAX_RECORD_COUNT;)this.undoStack.shift()}_clearUndoFn(){const t=()=>{this.ctx.clearRect(0,0,this.canvasWidth,this.canvasHeight)};this.undoStack=[t]}_clearCanvas(){this._clearUndoFn(),this.ctx.clearRect(0,0,this.canvasWidth,this.canvasHeight)}_startDraw(t){this.isDrawing=!0,this.x=t.offsetX,this.y=t.offsetY,this.ctx.lineWidth=1}_draw(t){if(!this.isDrawing)return;const e=performance.now(),n=Math.sqrt(t.movementX**2+t.movementY**2)/(e-this.preTimeStamp),o=Math.min(5,Math.max(1,5-n*3)),l=.2;this.ctx.lineWidth=this.ctx.lineWidth*(1-l)+o*l;const{offsetX:a,offsetY:R}=t;this.ctx.beginPath(),this.ctx.moveTo(this.x,this.y),this.ctx.lineTo(a,R),this.ctx.stroke(),this.x=a,this.y=R,this.linePoints.push([a,R]),this.isDrawn=!0,this.preTimeStamp=e}_stopDraw(){if(this.isDrawing=!1,this.isDrawn){const t=this.ctx.getImageData(0,0,this.canvasWidth,this.canvasHeight),e=this;this._saveUndoFn(function(){e.ctx.clearRect(0,0,e.canvasWidth,e.canvasHeight),e.ctx.putImageData(t,0,0)}),this.isDrawn=!1}}_toData(){if(!this.linePoints.length)return null;const t=this.linePoints[0][0],e=this.linePoints[0][1];let i=t,n=e,r=t,o=e;for(let L=0;LO[0]&&(i=O[0]),rO[1]&&(n=O[1]),o{s.apply(this,i)},t)}}function pR(s,t){if(!t){s.scrollTop=0;return}const e=[];let i=t.offsetParent;for(;i&&s!==i&&s.contains(i);)e.push(i),i=i.offsetParent;const n=t.offsetTop+e.reduce((a,R)=>a+R.offsetTop,0),r=n+t.offsetHeight,o=s.scrollTop,l=o+s.clientHeight;nl&&(s.scrollTop=r-s.clientHeight)}function Vs(s){(window.requestIdleCallback||window.setTimeout)(()=>{s()})}function mR(s){return`data:image/svg+xml;base64,${btoa(decodeURIComponent(s.outerHTML))}`}function IR(s){const t=s.command;t.executeInsertBarcode1D=(e,i,n,r)=>{const o=document.createElement("svg");As(o,e,r),t.executeInsertElementList([{type:N.IMAGE,value:mR(o),width:i,height:n}])}}function WR(s){return`data:image/svg+xml;base64,${btoa(decodeURIComponent(s.outerHTML))}`}function VR(s){const t=s.command;t.executeInsertBarcode2D=(e,i,n,r)=>{const o=new ks;r||(r=new Map),r.has(xn.MARGIN)||r.set(xn.MARGIN,0);const l=o.write(e,i,n,r);l.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.executeInsertElementList([{type:N.IMAGE,value:WR(l),width:i,height:n}])},s.register.contextMenuList([{name:"\u8BC6\u522B\u4E8C\u7EF4\u7801\u94FE\u63A5",icon:"qrcode",when:e=>{var i;return e.startElement===e.endElement&&((i=e.startElement)==null?void 0:i.type)===N.IMAGE},callback:async(e,i)=>{var a;const n=(a=i.startElement)==null?void 0:a.value;if(!n)return;const l=(await new Bs().decodeFromImageUrl(n)).getText();new _t({title:"\u8BC6\u522B\u5185\u5BB9",data:[{type:"text",label:"\u8BC6\u522B\u5185\u5BB9",name:"name",placeholder:"\u8BF7\u8F93\u5165\u6587\u672C",value:l}]})}}])}var ae;(function(s){s.SIZE_ADD="size-add",s.SIZE_MINUS="size-minus",s.BOLD="bold",s.ITALIC="italic",s.UNDERLINE="underline",s.STRIKEOUT="strikeout",s.COLOR="color",s.HIGHLIGHT="highlight",s.AI_EDIT="ai-edit"})(ae||(ae={}));const zt="ce",ee={tips:'',check:'',refresh:'',aiPanelStart:'',aiPanelStop:'',addContent:'',replace:' ',cancle:'',optimize:'',checkGrammar:'',simplification:'',richContent:'',translation:'',summary:'',outline:'',compose:''};function Ys(s,t,e){const i=document.createElement("div");i.classList.add(`${zt}-picker`),i.classList.add(`${zt}-${t}`);const n=document.createElement("div");n.classList.add(`${zt}-picker-container`);const r=document.createElement("div");n.append(r),i.append(n),s.append(i);const o="#000000",l=new _s({el:r,theme:"nano",useAsButton:!0,inline:!0,default:o,i18n:{"btn:save":"\u2713"},components:{preview:!0,opacity:!0,hue:!0,interaction:{input:!0,save:!0}}}),a=document.createElement("i");i.append(a);const R=document.createElement("span");R.style.backgroundColor=o,i.append(R),i.onclick=c=>{const u=c.target;n!==u&&!n.contains(u)&&l.show()},l.on("save",c=>{l.hide();const u=c.toHEXA().toString();R.style.backgroundColor=u,e(u)})}const YR=[{icon:ee.optimize,title:"\u4F18\u5316",key:"creation_optimization"},{icon:ee.checkGrammar,title:"\u7EA0\u9519",key:"creation_proofreading"},{icon:ee.richContent,title:"\u7EED\u5199",key:"creation_continuation"},"
",{icon:ee.translation,title:"\u7FFB\u8BD1",key:"creation_translation"},{icon:ee.summary,title:"\u603B\u7ED3",key:"creation_summarize"}];function UR(s,t,e){const i=document.createElement("div");i.classList.add(`${zt}-picker-ai`),i.classList.add(`${zt}-${t}`);const n=YR;i.innerHTML=` + +
+
+
+
${ee.refresh}
+ +
+
+
+
+ ${ee.tips} + \u63D0\u793A\uFF1A\u60A8\u53EF\u4EE5\u5728\u4E0A\u9762\u8F93\u5165\u6587\u5B57\u6216\u8005\u9009\u62E9\u4E0B\u65B9\u7684\u64CD\u4F5C +
+
+ + + + +
+ `,s.append(i),ZR(s,e)}function Us(s){var e,i,n;const t=s.querySelector("#aiLoader");t==null||t.classList.remove("ai-hide"),(e=s.querySelector("#footer-one"))==null||e.classList.remove("ai-hide"),(i=s.querySelector("#footer-two"))==null||i.classList.add("ai-hide"),(n=s.querySelector(".aie-ai-panel-body-content"))==null||n.classList.remove("ai-hide"),s.querySelector("#aiStart").classList.add("ai-hide"),s.querySelector("#aiStop").classList.remove("ai-hide"),s.querySelector("#goAskAi").disabled=!0}function ZR(s,t){var n;const e=s.querySelector("#aiTextarea");(n=s.querySelector("#ai-edit-btn"))==null||n.addEventListener("click",()=>{const r=s.querySelector(`.${zt}-ai-edit`),o=r.classList.contains("ai-active");o?r.classList.remove("ai-active"):r.classList.add("ai-active");const l=s.querySelector(".aie-container");o?l==null||l.classList.add("ai-hide"):l==null||l.classList.remove("ai-hide")}),Array.from(s.querySelectorAll("#ai-operate")).forEach(r=>{r.addEventListener("click",()=>{Us(s);const o=r.getAttribute("data-type");t.command.executeAiEdit(o)})}),s.querySelector("#goAskAi").addEventListener("click",()=>{const r=s.querySelector("#inputOption");r.value&&(Us(s),t.command.executeAiEdit("creation_ask",r.value))}),s.querySelector("#replace").addEventListener("click",()=>{t.command.executeReplace(e.value)}),s.querySelector("#insert").addEventListener("click",()=>{const r=t.command.executeAiEdit("");t.command.executeReplace(r+e.value),t.command.executeSearch("")}),s.querySelector("#hide").addEventListener("click",()=>{t.command.executeSearch(""),Zs(s,t)})}function QR(s){const t=document.querySelector("#aiLoader"),e=document.querySelector("#aiTextarea");s.data&&(e.value=s.data),t==null||t.classList.add("ai-hide"),document.querySelector("#aiStart").classList.remove("ai-hide"),document.querySelector("#aiStop").classList.add("ai-hide"),document.querySelector("#goAskAi").disabled=!1}function Zs(s,t){var n,r,o,l,a;t.command.executeSearch(""),s.querySelector("#aiStart").classList.remove("ai-hide"),s.querySelector("#aiStop").classList.add("ai-hide"),s.querySelector("#goAskAi").disabled=!1,(n=s.querySelector(".aie-container"))==null||n.classList.add("ai-hide"),(r=s.querySelector(`.${zt}-ai-edit`))==null||r.classList.remove("ai-active"),(o=s.querySelector("#footer-one"))==null||o.classList.add("ai-hide"),(l=s.querySelector("#footer-two"))==null||l.classList.remove("ai-hide"),(a=s.querySelector(".aie-ai-panel-body-content"))==null||a.classList.add("ai-hide");const e=s.querySelector("#inputOption");e.value="";const i=s.querySelector("textarea");i.value=""}const DR=[{render(s,t){UR(s,ae.AI_EDIT,t)}},{isDivider:!0},{key:ae.SIZE_ADD,callback(s){s.command.executeSizeAdd()}},{key:ae.SIZE_MINUS,callback(s){s.command.executeSizeMinus()}},{isDivider:!0},{key:ae.BOLD,callback(s){s.command.executeBold()}},{key:ae.ITALIC,callback(s){s.command.executeItalic()}},{key:ae.UNDERLINE,callback(s){s.command.executeUnderline()}},{key:ae.STRIKEOUT,callback(s){s.command.executeStrikeout()}},{isDivider:!0},{render(s,t){Ys(s,ae.COLOR,e=>{t.command.executeColor(e)})}},{render(s,t){Ys(s,ae.HIGHLIGHT,e=>{t.command.executeHighlight(e)})}}];function KR(s){const t=document.createElement("div");t.classList.add(`${zt}-floating-toolbar`);for(const e of DR)if(e.render)e.render(t,s);else if(e.isDivider){const i=document.createElement("div");i.classList.add(`${zt}-divider`),t.append(i)}else{const{key:i,callback:n}=e,r=document.createElement("div");r.classList.add(`${zt}-${i}`);const o=document.createElement("i");r.append(o),r.onclick=()=>{n==null||n(s)},t.append(r)}return t}function dn(s,t){t?s.classList.remove("hide"):s.classList.add("hide")}function Zi(s,t){t?s.classList.add("active"):s.classList.remove("active")}function ER(s){const t=KR(s);s.command.getContainer().append(t),s.eventBus.on("rangeStyleChange",i=>{if(i.type===null){dn(t,!1);return}const n=s.command.getRangeContext();if(!n||n.isCollapsed||!n.rangeRects[0]){dn(t,!1),Zs(t,s);return}const r=n.rangeRects[0];t.style.left=`${r.x}px`,t.style.top=`${r.y+r.height}px`;const o=t.querySelector(`.${zt}-bold`);o&&Zi(o,i.bold);const l=t.querySelector(`.${zt}-italic`);l&&Zi(l,i.italic);const a=t.querySelector(`.${zt}-underline`);a&&Zi(a,i.underline);const R=t.querySelector(`.${zt}-strikeout`);R&&Zi(R,i.strikeout),dn(t,!0)})}const bR=6,xR=8.6,CR=40,wR={top:It.TOP,middle:It.MIDDLE,bottom:It.BOTTOM,distributed:It.TOP,justify:It.TOP};function HR(s){return async function(t){const e=new zs.Workbook;await e.xlsx.load(t.arrayBuffer);const i=[];e.eachSheet(function(n){var l;const r=n.columns.map(a=>({width:(a.width||xR)*bR})),o={type:N.TABLE,value:"",colgroup:r,trList:[]};n.eachRow((a,R)=>{var g,L,O,P,M,T;const c=R-1,u=a.model,d=[];if(!!Array.isArray(a.values)){for(let X=1;X{var f,E,G,x,y;Z.push({value:U.text,bold:(f=U.font)==null?void 0:f.bold,italic:(E=U.font)==null?void 0:E.italic,size:(G=U.font)==null?void 0:G.size,strikeout:(x=U.font)==null?void 0:x.strike,underline:!!((y=U.font)==null?void 0:y.underline)})}):Z.push({value:(W==null?void 0:W.toString())||"",bold:(O=F==null?void 0:F.font)==null?void 0:O.bold,italic:(P=F==null?void 0:F.font)==null?void 0:P.italic,size:(M=F==null?void 0:F.font)==null?void 0:M.size,strikeout:(T=F==null?void 0:F.font)==null?void 0:T.strike});let m=1,Y=1;const Q=n.model.rows;for(let U=c;Uc&&E===X-1&&(Y+=1))}}d.push({colspan:m,rowspan:Y,verticalAlign:I,value:Z})}if(d.length){const X=(u==null?void 0:u.height)||CR;o.trList.push({height:X,minHeight:X,tdList:d})}}}),((l=o.trList)==null?void 0:l.length)&&i.push(o)}),i.length&&s.executeSetValue({main:i})}}function yR(s){const t=s.command;t.executeImportExcel=HR(t)}function GR(s,t){const e=document.createElement("a");e.href=window.URL.createObjectURL(s),e.download=t,e.click(),window.URL.revokeObjectURL(e.href)}const vR={[ht.FIRST]:xe.HEADING_1,[ht.SECOND]:xe.HEADING_2,[ht.THIRD]:xe.HEADING_3,[ht.FOURTH]:xe.HEADING_4,[ht.FIFTH]:xe.HEADING_5,[ht.SIXTH]:xe.HEADING_6};function hn(s){var t;return s.type===N.IMAGE?new so({type:"png",data:s.value,transformation:{width:s.width,height:s.height}}):s.type===N.HYPERLINK?new oo({children:[new Oi({text:(t=s.valueList)==null?void 0:t.map(e=>e.value).join(""),style:"Hyperlink"})],link:s.url}):s.type===N.TAB?new Oi({children:[new ro]}):s.type===N.LATEX?new lo(s.value):new Oi({font:s.font,text:s.value,bold:s.bold,size:`${(s.size||16)/.75}pt`,color:ao(s.color).hex()||"#000000",italics:s.italic,strike:s.strikeout,superScript:s.type===N.SUPERSCRIPT,subScript:s.type===N.SUBSCRIPT,underline:s.underline?{}:void 0})}function Qi(s){var n,r,o;const t=[];let e=[];function i(){e.length&&(t.push(new xi({children:e})),e=[])}for(let l=0;lhn(R)))||[]}));else if(a.type===N.LIST){i();const R=((r=a.valueList)==null?void 0:r.map(c=>c.value).join("").split(` +`).map((c,u)=>new xi({children:[new Oi({text:`${!a.listStyle||a.listStyle===Gt.DECIMAL?`${u+1}. `:"\u2022 "}${c}`})]})))||[];t.push(...R)}else if(a.type===N.TABLE){i();const{trList:R}=a,c=[];for(let u=0;uhn(R)))||[]):(/^\n/.test(a.value)&&(i(),a.value=a.value.replace(/^\n/,"")),e.push(hn(a)))}return i(),t}function JR(s){return function(t){const{fileName:e,isFile:i}=t,{data:{header:n,main:r,footer:o}}=s.getValue(),l=new $s({sections:[{headers:{default:new qs({children:Qi(n||[])})},footers:{default:new js({children:Qi(o||[])})},children:Qi(r||[])}]});i?Cn.toBlob(l).then(a=>{GR(a,`${e}.docx`)}):Cn.toBase64String(l).then(a=>{const R={data:JSON.stringify({content:a,title:e}),type:"exportDocx"};window.parent.postMessage(R,"*")})}}function Qs(s){if(s.children){const t=Ro.map(s.children,Qs);s=tt(b({},s),{children:t})}return s.type==="paragraph"&&(s=AR(s)),s}function AR(s){return s.alignment==="center"&&!s.styleId?tt(b({},s),{styleId:"Heading2"}):s}function BR(s){return async function(t){const{arrayBuffer:e}=t,i=await wn.convertToHtml({arrayBuffer:e},{transformDocument:Qs,styleMap:["p[style-name='Normal'] => p","p[style-name='Heading 1'] => h1:fresh","p[style-name='Heading 2'] => h2:fresh","p[style-name='Heading 3'] => h3:fresh","p[style-name='Heading 4'] => h4:fresh","p[style-name='Heading 5'] => h5:fresh","p[style-name='Heading 6'] => h6:fresh","p[style-name='Title'] => h1:fresh","p[style-name='Subtitle'] => h2:fresh","p[style-name='Quote'] => blockquote","p[style-name='List Paragraph'] => li","r[style-name='Emphasis'] => em","r[style-name='Strong'] => strong","r[style-name='Underline'] => u","r[style-name='Strikethrough'] => del","r[style-name='Comment Reference'] => sup","b => strong","i => em","u => u","strike => del","comment-reference => sup"],convertImage:wn.images.imgElement(function(n){return n.read("base64").then(function(r){return{src:"data:"+n.contentType+";base64,"+r}})})});s.executeSetHTML({main:i.value})}}function kR(s){const t=s.command;t.executeImportDocx=BR(t),t.executeExportDocx=JR(t)}window.onload=function(){const s=typeof navigator!="undefined"&&/Mac OS X/.test(navigator.userAgent),t=document.querySelector(".editor"),e=new SR(t,{header:[],main:ho,footer:[{value:"",size:12}]},go);e.use(IR),e.use(VR),e.use(ER),e.use(yR),e.use(kR);const i=document.querySelector("#file-docx"),n=document.querySelector("#file-excel");let r="";Reflect.set(window,"editor",e),window.addEventListener("click",p=>{const K=document.querySelector(".visible");!K||K.contains(p.target)||K.classList.remove("visible")},{capture:!0});const o=document.querySelector(".menu-item__undo");o.title=`\u64A4\u9500(${s?"\u2318":"Ctrl"}+Z)`,o.onclick=function(){console.log("undo"),e.command.executeUndo()};const l=document.querySelector(".menu-item__redo");l.title=`\u91CD\u505A(${s?"\u2318":"Ctrl"}+Y)`,l.onclick=function(){console.log("redo"),e.command.executeRedo()};const a=document.querySelector(".menu-item__painter");let R=!0,c;a.onclick=function(){R?(R=!1,c=window.setTimeout(()=>{console.log("painter-click"),R=!0,e.command.executePainter({isDblclick:!1})},200)):window.clearTimeout(c)},a.ondblclick=function(){console.log("painter-dblclick"),R=!0,window.clearTimeout(c),e.command.executePainter({isDblclick:!0})},document.querySelector(".menu-item__format").onclick=function(){console.log("format"),e.command.executeFormat()};const u=document.querySelector(".menu-item__font"),d=u.querySelector(".select"),g=u.querySelector(".options");u.onclick=function(){console.log("font"),g.classList.toggle("visible")},g.onclick=function(p){const K=p.target;e.command.executeFont(K.dataset.family)};const L=document.querySelector(".menu-item__size"),O=L.querySelector(".select"),P=L.querySelector(".options");L.title="\u8BBE\u7F6E\u5B57\u53F7",L.onclick=function(){console.log("size"),P.classList.toggle("visible")},P.onclick=function(p){const K=p.target;e.command.executeSize(Number(K.dataset.size))};const M=document.querySelector(".menu-item__size-add");M.title=`\u589E\u5927\u5B57\u53F7(${s?"\u2318":"Ctrl"}+[)`,M.onclick=function(){console.log("size-add"),e.command.executeSizeAdd()};const T=document.querySelector(".menu-item__size-minus");T.title=`\u51CF\u5C0F\u5B57\u53F7(${s?"\u2318":"Ctrl"}+])`,T.onclick=function(){console.log("size-minus"),e.command.executeSizeMinus()};const X=document.querySelector(".menu-item__bold");X.title=`\u52A0\u7C97(${s?"\u2318":"Ctrl"}+B)`,X.onclick=function(){console.log("bold"),e.command.executeBold()};const S=document.querySelector(".menu-item__italic");S.title=`\u659C\u4F53(${s?"\u2318":"Ctrl"}+I)`,S.onclick=function(){console.log("italic"),e.command.executeItalic()};const F=document.querySelector(".menu-item__underline");F.title=`\u4E0B\u5212\u7EBF(${s?"\u2318":"Ctrl"}+U)`;const W=F.querySelector(".options");F.querySelector(".select").onclick=function(){W.classList.toggle("visible")},F.querySelector("i").onclick=function(){console.log("underline"),e.command.executeUnderline(),W.classList.remove("visible")},F.querySelector("ul").onmousedown=function(p){const w=p.target.dataset.decorationStyle;e.command.executeUnderline({style:w}),W.classList.remove("visible")};const I=document.querySelector(".menu-item__strikeout");I.onclick=function(){console.log("strikeout"),e.command.executeStrikeout()};const Z=document.querySelector(".menu-item__superscript");Z.title=`\u4E0A\u6807(${s?"\u2318":"Ctrl"}+Shift+,)`,Z.onclick=function(){console.log("superscript"),e.command.executeSuperscript()};const V=document.querySelector(".menu-item__subscript");V.title=`\u4E0B\u6807(${s?"\u2318":"Ctrl"}+Shift+.)`,V.onclick=function(){console.log("subscript"),e.command.executeSubscript()};const m=document.querySelector("#color");m.oninput=function(){e.command.executeColor(m.value)};const Y=document.querySelector(".menu-item__color"),Q=Y.querySelector("span");Y.onclick=function(){console.log("color"),m.click()};const U=document.querySelector("#highlight");U.oninput=function(){e.command.executeHighlight(U.value)};const f=document.querySelector(".menu-item__highlight"),E=f.querySelector("span");f.onclick=function(){console.log("highlight"),U==null||U.click()};const G=document.querySelector(".menu-item__title"),x=G.querySelector(".select"),y=G.querySelector(".options");y.querySelectorAll("li").forEach((p,K)=>{p.title=`Ctrl+${s?"Option":"Alt"}+${K}`}),G.onclick=function(){console.log("title"),y.classList.toggle("visible")},y.onclick=function(p){const w=p.target.dataset.level;e.command.executeTitle(w||null)};const J=document.querySelector(".menu-item__left");J.title=`\u5DE6\u5BF9\u9F50(${s?"\u2318":"Ctrl"}+L)`,J.onclick=function(){console.log("left"),e.command.executeRowFlex(at.LEFT)};const q=document.querySelector(".menu-item__center");q.title=`\u5C45\u4E2D\u5BF9\u9F50(${s?"\u2318":"Ctrl"}+E)`,q.onclick=function(){console.log("center"),e.command.executeRowFlex(at.CENTER)};const st=document.querySelector(".menu-item__right");st.title=`\u53F3\u5BF9\u9F50(${s?"\u2318":"Ctrl"}+R)`,st.onclick=function(){console.log("right"),e.command.executeRowFlex(at.RIGHT)};const Wt=document.querySelector(".menu-item__alignment");Wt.title=`\u4E24\u7AEF\u5BF9\u9F50(${s?"\u2318":"Ctrl"}+J)`,Wt.onclick=function(){console.log("alignment"),e.command.executeRowFlex(at.ALIGNMENT)};const ot=document.querySelector(".menu-item__justify");ot.title=`\u5206\u6563\u5BF9\u9F50(${s?"\u2318":"Ctrl"}+Shift+J)`,ot.onclick=function(){console.log("justify"),e.command.executeRowFlex(at.JUSTIFY)};const $=document.querySelector(".menu-item__row-margin"),C=$.querySelector(".options");$.onclick=function(){console.log("row-margin"),C.classList.toggle("visible")},C.onclick=function(p){const K=p.target;e.command.executeRowMargin(Number(K.dataset.rowmargin))};const St=document.querySelector(".menu-item__list");St.title=`\u5217\u8868(${s?"\u2318":"Ctrl"}+Shift+U)`;const A=St.querySelector(".options");St.onclick=function(){console.log("list"),A.classList.toggle("visible")},A.onclick=function(p){const K=p.target,w=K.dataset.listType||null,v=K.dataset.listStyle;e.command.executeList(w,v)};const ft=document.querySelector(".menu-item__table"),it=document.querySelector(".menu-item__table__collapse"),Et=document.querySelector(".table-close"),$t=document.querySelector(".table-select"),Qt=document.querySelector(".table-panel"),gt=[];for(let p=0;p<10;p++){const K=document.createElement("tr");K.classList.add("table-row");const w=[];for(let v=0;v<10;v++){const H=document.createElement("td");H.classList.add("table-cel"),K.append(H),w.push(H)}Qt.append(K),gt.push(w)}let Se=0,Re=0;function Be(){gt.forEach(p=>{p.forEach(K=>K.classList.remove("active"))})}function ke(p){$t.innerText=p}function _e(){Be(),ke("\u63D2\u5165"),Se=0,Re=0,it.style.display="none"}ft.onclick=function(){console.log("table"),it.style.display="block"},Qt.onmousemove=function(p){const K=16,w=10,v=6,{offsetX:H,offsetY:B}=p;Be(),Se=Math.ceil(H/(K+v))||1,Re=Math.ceil(B/(K+w))||1,gt.forEach((j,nt)=>{j.forEach((rt,Xt)=>{Xt{var v,H;const K=(v=p.find(B=>B.name==="name"))==null?void 0:v.value;if(!K)return;const w=(H=p.find(B=>B.name==="url"))==null?void 0:H.value;!w||e.command.executeHyperlink({type:N.HYPERLINK,value:"",url:w,valueList:jt(K).map(B=>({value:B,size:16}))})}})};const Lt=document.querySelector(".menu-item__separator"),Zt=Lt.querySelector(".options");Lt.onclick=function(){console.log("separator"),Zt.classList.toggle("visible")},Zt.onmousedown=function(p){var H;let K=[];const v=(H=p.target.dataset.separator)==null?void 0:H.split(",").map(Number);v&&(v.every(j=>j===0)||(K=v)),e.command.executeSeparator(K)};const Ie=document.querySelector(".menu-item__page-break");Ie.onclick=function(){console.log("pageBreak"),e.command.executePageBreak()};const $e=document.querySelector(".menu-item__watermark"),qe=$e.querySelector(".options");$e.onclick=function(){console.log("watermark"),qe.classList.toggle("visible")},qe.onmousedown=function(p){const w=p.target.dataset.menu;qe.classList.toggle("visible"),w==="add"?new _t({title:"\u6C34\u5370",data:[{type:"text",label:"\u5185\u5BB9",name:"data",required:!0,placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9"},{type:"color",label:"\u989C\u8272",name:"color",required:!0,value:"#AEB5C0"},{type:"number",label:"\u5B57\u4F53\u5927\u5C0F",name:"size",required:!0,value:"120"},{type:"number",label:"\u900F\u660E\u5EA6",name:"opacity",required:!0,value:"0.3"},{type:"select",label:"\u91CD\u590D",name:"repeat",value:"0",required:!1,options:[{label:"\u4E0D\u91CD\u590D",value:"0"},{label:"\u91CD\u590D",value:"1"}]},{type:"number",label:"\u6C34\u5E73\u95F4\u9694",name:"horizontalGap",required:!1,value:"10"},{type:"number",label:"\u5782\u76F4\u95F4\u9694",name:"verticalGap",required:!1,value:"10"}],onConfirm:v=>{if(~v.findIndex(nt=>!nt.value))return;const B=v.reduce((nt,rt)=>(nt[rt.name]=rt.value,nt),{}),j=B.repeat==="1";e.command.executeAddWatermark({data:B.data,color:B.color,size:Number(B.size),opacity:Number(B.opacity),repeat:j,gap:j&&B.horizontalGap&&B.verticalGap?[Number(B.horizontalGap),Number(B.verticalGap)]:void 0})}}):e.command.executeDeleteWatermark()};const je=document.querySelector(".menu-item__codeblock");je.onclick=function(){console.log("codeblock"),new _t({title:"\u4EE3\u7801\u5757",data:[{type:"textarea",name:"codeblock",placeholder:"\u8BF7\u8F93\u5165\u4EE3\u7801",width:500,height:300}],onConfirm:p=>{var B;const K=(B=p.find(j=>j.name==="codeblock"))==null?void 0:B.value;if(!K)return;const w=Hn.tokenize(K,Hn.languages.javascript),v=NR(w),H=[];for(let j=0;j{var j,nt;const H=(j=v.find(rt=>rt.name==="placeholder"))==null?void 0:j.value;if(!H)return;const B=((nt=v.find(rt=>rt.name==="value"))==null?void 0:nt.value)||"";e.command.executeInsertElementList([{type:N.CONTROL,value:"",control:{type:w,value:B?[{value:B}]:null,placeholder:H}}])}});break;case dt.SELECT:new _t({title:"\u5217\u4E3E\u63A7\u4EF6",data:[{type:"text",label:"\u5360\u4F4D\u7B26",name:"placeholder",required:!0,placeholder:"\u8BF7\u8F93\u5165\u5360\u4F4D\u7B26"},{type:"text",label:"\u9ED8\u8BA4\u503C",name:"code",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C"},{type:"textarea",label:"\u503C\u96C6",name:"valueSets",required:!0,height:100,placeholder:`\u8BF7\u8F93\u5165\u503C\u96C6JSON\uFF0C\u4F8B\uFF1A +[{ +"value":"\u6709", +"code":"98175" +}]`}],onConfirm:v=>{var nt,rt,Xt;const H=(nt=v.find(mt=>mt.name==="placeholder"))==null?void 0:nt.value;if(!H)return;const B=(rt=v.find(mt=>mt.name==="valueSets"))==null?void 0:rt.value;if(!B)return;const j=(Xt=v.find(mt=>mt.name==="code"))==null?void 0:Xt.value;e.command.executeInsertElementList([{type:N.CONTROL,value:"",control:{type:w,code:j,value:null,placeholder:H,valueSets:JSON.parse(B)}}])}});break;case dt.CHECKBOX:new _t({title:"\u590D\u9009\u6846\u63A7\u4EF6",data:[{type:"text",label:"\u9ED8\u8BA4\u503C",name:"code",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C\uFF0C\u591A\u4E2A\u503C\u4EE5\u82F1\u6587\u9017\u53F7\u5206\u5272"},{type:"textarea",label:"\u503C\u96C6",name:"valueSets",required:!0,height:100,placeholder:`\u8BF7\u8F93\u5165\u503C\u96C6JSON\uFF0C\u4F8B\uFF1A +[{ +"value":"\u6709", +"code":"98175" +}]`}],onConfirm:v=>{var j,nt;const H=(j=v.find(rt=>rt.name==="valueSets"))==null?void 0:j.value;if(!H)return;const B=(nt=v.find(rt=>rt.name==="code"))==null?void 0:nt.value;e.command.executeInsertElementList([{type:N.CONTROL,value:"",control:{type:w,code:B,value:null,valueSets:JSON.parse(H)}}])}});break;case dt.RADIO:new _t({title:"\u5355\u9009\u6846\u63A7\u4EF6",data:[{type:"text",label:"\u9ED8\u8BA4\u503C",name:"code",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C"},{type:"textarea",label:"\u503C\u96C6",name:"valueSets",required:!0,height:100,placeholder:`\u8BF7\u8F93\u5165\u503C\u96C6JSON\uFF0C\u4F8B\uFF1A +[{ +"value":"\u6709", +"code":"98175" +}]`}],onConfirm:v=>{var j,nt;const H=(j=v.find(rt=>rt.name==="valueSets"))==null?void 0:j.value;if(!H)return;const B=(nt=v.find(rt=>rt.name==="code"))==null?void 0:nt.value;e.command.executeInsertElementList([{type:N.CONTROL,value:"",control:{type:w,code:B,value:null,valueSets:JSON.parse(H)}}])}});break;case dt.DATE:new _t({title:"\u65E5\u671F\u63A7\u4EF6",data:[{type:"text",label:"\u5360\u4F4D\u7B26",name:"placeholder",required:!0,placeholder:"\u8BF7\u8F93\u5165\u5360\u4F4D\u7B26"},{type:"text",label:"\u9ED8\u8BA4\u503C",name:"value",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u503C"},{type:"select",label:"\u65E5\u671F\u683C\u5F0F",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"}]}],onConfirm:v=>{var nt,rt,Xt;const H=(nt=v.find(mt=>mt.name==="placeholder"))==null?void 0:nt.value;if(!H)return;const B=((rt=v.find(mt=>mt.name==="value"))==null?void 0:rt.value)||"",j=((Xt=v.find(mt=>mt.name==="dateFormat"))==null?void 0:Xt.value)||"";e.command.executeInsertElementList([{type:N.CONTROL,value:"",control:{type:w,dateFormat:j,value:B?[{value:B}]:null,placeholder:H}}])}});break}};const pt=document.querySelector(".menu-item__checkbox");pt.onclick=function(){console.log("checkbox"),e.command.executeInsertElementList([{type:N.CHECKBOX,checkbox:{value:!1},value:""}])};const Nt=document.querySelector(".menu-item__radio");Nt.onclick=function(){console.log("radio"),e.command.executeInsertElementList([{type:N.RADIO,checkbox:{value:!1},value:""}])};const Jt=document.querySelector(".menu-item__latex");Jt.onclick=function(){console.log("LaTeX"),new _t({title:"LaTeX",data:[{type:"textarea",height:100,name:"value",placeholder:"\u8BF7\u8F93\u5165LaTeX\u6587\u672C"}],onConfirm:p=>{var w;const K=(w=p.find(v=>v.name==="value"))==null?void 0:w.value;!K||e.command.executeInsertElementList([{type:N.LATEX,value:K}])}})};const Ft=document.querySelector(".menu-item__date"),Pt=Ft.querySelector(".options");Ft.onclick=function(){console.log("date"),Pt.classList.toggle("visible");const p=document.body.getBoundingClientRect(),K=Pt.getBoundingClientRect();K.left+K.width>p.width?(Pt.style.right="0px",Pt.style.left="unset"):(Pt.style.right="unset",Pt.style.left="0px");const w=new Date,v=w.getFullYear().toString(),H=(w.getMonth()+1).toString().padStart(2,"0"),B=w.getDate().toString().padStart(2,"0"),j=w.getHours().toString().padStart(2,"0"),nt=w.getMinutes().toString().padStart(2,"0"),rt=w.getSeconds().toString().padStart(2,"0"),Xt=`${v}-${H}-${B}`,mt=`${Xt} ${j}:${nt}:${rt}`;Pt.querySelector("li:first-child").innerText=Xt,Pt.querySelector("li:last-child").innerText=mt},Pt.onmousedown=function(p){const K=p.target,w=K.dataset.format;Pt.classList.toggle("visible"),e.command.executeInsertElementList([{type:N.DATE,value:"",dateFormat:w,valueList:[{value:K.innerText.trim()}]}])};const yt=document.querySelector(".menu-item__block");yt.onclick=function(){console.log("block"),new _t({title:"\u5185\u5BB9\u5757",data:[{type:"select",label:"\u7C7B\u578B",name:"type",value:"iframe",required:!0,options:[{label:"\u7F51\u5740",value:"iframe"},{label:"\u89C6\u9891",value:"video"}]},{type:"number",label:"\u5BBD\u5EA6",name:"width",placeholder:"\u8BF7\u8F93\u5165\u5BBD\u5EA6\uFF08\u9ED8\u8BA4\u9875\u9762\u5185\u5BBD\u5EA6\uFF09"},{type:"number",label:"\u9AD8\u5EA6",name:"height",required:!0,placeholder:"\u8BF7\u8F93\u5165\u9AD8\u5EA6"},{type:"input",label:"\u5730\u5740",name:"src",required:!1,placeholder:"\u8BF7\u8F93\u5165\u5730\u5740"},{type:"textarea",label:"HTML",height:100,name:"srcdoc",required:!1,placeholder:"\u8BF7\u8F93\u5165HTML\u4EE3\u7801\uFF08\u4EC5\u7F51\u5740\u7C7B\u578B\u6709\u6548\uFF09"}],onConfirm:p=>{var rt,Xt,mt,de,ti;const K=(rt=p.find(wt=>wt.name==="type"))==null?void 0:rt.value;if(!K)return;const w=(Xt=p.find(wt=>wt.name==="width"))==null?void 0:Xt.value,v=(mt=p.find(wt=>wt.name==="height"))==null?void 0:mt.value;if(!v)return;const H=(de=p.find(wt=>wt.name==="src"))==null?void 0:de.value,B=(ti=p.find(wt=>wt.name==="srcdoc"))==null?void 0:ti.value,j={type:K};if(j.type===Ae.IFRAME){if(!H&&!B)return;j.iframeBlock={src:H,srcdoc:B}}else if(j.type===Ae.VIDEO){if(!H)return;j.videoBlock={src:H}}const nt={type:N.BLOCK,value:"",height:Number(v),block:j};w&&(nt.width=Number(w)),e.command.executeInsertElementList([nt])}})};const bt=document.querySelector(".menu-item__ai-edit"),Ut=document.querySelector(".menu-item__ai-edit-box"),xt=document.querySelector(".menu-item__ai-edit-box span"),Dt=document.querySelector(".ai-edit-outline-box"),qt=document.querySelector(".ai-edit-content-box"),ce=document.querySelector("#aiTitle"),Ke=document.querySelector("#aiSelect"),ue=document.querySelector("#watchOutline"),We=document.querySelector("#watchArticle"),On=document.querySelector("#outlineView"),Mn=document.querySelector("#articleView"),Ve=document.querySelector("#articleInsert"),Ye=document.querySelector("#createArticle"),Ri=document.querySelector("#outlineText"),ci=document.querySelector("#articleText"),Pn=document.querySelector("#articleLoader"),Di=document.querySelector("#outlineLoader");bt.title="ai\u5199\u4F5C",bt.onclick=function(){Ut.classList.contains("hide")?Ut.classList.remove("hide"):Ut.classList.add("hide")};function Tn(){Ut.classList.add("hide"),Ut.classList.remove("add-height"),Dt==null||Dt.classList.remove("hide"),qt==null||qt.classList.add("hide"),ui("outline"),ci.value="",Ri.value=""}xt.onclick=function(){Tn()},document.querySelector("#aiArticle").onclick=function(){const p=ce.value,K=Ke.value;p==""||K==""||(window.parent.postMessage({type:"aiCreater",data:{title:p,category:K},action:"creation_leader"},"*"),Dt==null||Dt.classList.add("hide"),qt==null||qt.classList.remove("hide"),Ut.classList.add("add-height"),Di.classList.remove("hide"))};function ui(p){switch(Ri.value==""&&Di.classList.remove("hide"),ci.value==""&&Pn.classList.remove("hide"),p){case"outline":ue.classList.add("active-ai"),We.classList.remove("active-ai"),Ye==null||Ye.classList.remove("hide"),Ve==null||Ve.classList.add("hide"),On.classList.remove("hide"),Mn.classList.add("hide");break;case"article":We.classList.add("active-ai"),ue.classList.remove("active-ai"),Ye==null||Ye.classList.add("hide"),Ve==null||Ve.classList.remove("hide"),On.classList.add("hide"),Mn.classList.remove("hide");break}}ue.onclick=()=>ui("outline"),We.onclick=()=>ui("article"),Ye.onclick=function(){ui("article"),window.parent.postMessage({type:"aiCreater",data:{title:ce.value,outline:Ri.value},action:"creation_builder"},"*")};function Sn(p,K){K=="outline"?(Ri.value=p,Di.classList.add("hide")):(ci.value=p,Pn.classList.add("hide"))}Ve.onclick=function(){const p=ci.value||"";e.command.executeAiArticle(p),Tn()};const ie=document.querySelector(".menu-item__search__collapse"),Xe=document.querySelector(".menu-item__search__collapse__search input"),Xn=document.querySelector(".menu-item__search__collapse__replace input"),di=document.querySelector(".menu-item__search");di.title=`\u641C\u7D22\u4E0E\u66FF\u6362(${s?"\u2318":"Ctrl"}+F)`;const Nn=ie.querySelector(".search-result");function Ee(){const p=e.command.getSearchNavigateInfo();if(p){const{index:K,count:w}=p;Nn.innerText=`${K}/${w}`}else Nn.innerText=""}di.onclick=function(){console.log("search"),ie.style.display="block";const p=document.body.getBoundingClientRect(),K=di.getBoundingClientRect(),w=ie.getBoundingClientRect();K.left+w.width>p.width?(ie.style.right="0px",ie.style.left="unset"):ie.style.right="unset",Xe.focus()},ie.querySelector("span").onclick=function(){ie.style.display="none",Xe.value="",Xn.value="",e.command.executeSearch(null),Ee()},Xe.oninput=function(){e.command.executeSearch(Xe.value||null),Ee()},Xe.onkeydown=function(p){p.key==="Enter"&&(e.command.executeSearch(Xe.value||null),Ee())},ie.querySelector("button").onclick=function(){const p=Xe.value,K=Xn.value;p&&K&&p!==K&&e.command.executeReplace(K)},ie.querySelector(".arrow-left").onclick=function(){e.command.executeSearchNavigatePre(),Ee()},ie.querySelector(".arrow-right").onclick=function(){e.command.executeSearchNavigateNext(),Ee()};const Fn=document.querySelector(".menu-item__print");Fn.title=`\u6253\u5370(${s?"\u2318":"Ctrl"}+P)`,Fn.onclick=function(){console.log("print"),e.command.executePrint()};const Ds=document.querySelector(".editor-option");Ds.onclick=function(){const p=e.command.getOptions();new _t({title:"\u7F16\u8F91\u5668\u914D\u7F6E",data:[{type:"textarea",name:"option",width:350,height:300,required:!0,value:JSON.stringify(p,null,2),placeholder:"\u8BF7\u8F93\u5165\u7F16\u8F91\u5668\u914D\u7F6E"}],onConfirm:K=>{var H;const w=(H=K.find(B=>B.name==="option"))==null?void 0:H.value;if(!w)return;const v=JSON.parse(w);e.command.executeUpdateOptions(v)}})};async function fn(){const p=await e.command.getCatalog(),K=document.querySelector(".catalog__main");if(K.innerHTML="",p){const w=(v,H)=>{for(let B=0;B{e.command.executeLocationCatalog(j.id)},nt.append(rt),j.subCatalog&&j.subCatalog.length&&w(nt,j.subCatalog),v.append(nt)}};w(K,p)}}let hi=!0;const pn=document.querySelector(".catalog"),Ks=document.querySelector(".catalog-mode"),Es=document.querySelector(".catalog__header__close"),mn=()=>{hi=!hi,hi?(pn.style.display="block",fn()):pn.style.display="none"};Ks.onclick=mn,Es.onclick=mn;const In=document.querySelector(".page-mode"),gi=In.querySelector(".options");In.onclick=function(){gi.classList.toggle("visible")},gi.onclick=function(p){const K=p.target;e.command.executePageMode(K.dataset.pageMode)},document.querySelector(".page-scale-percentage").onclick=function(){console.log("page-scale-recovery"),e.command.executePageScaleRecovery()},document.querySelector(".page-scale-minus").onclick=function(){console.log("page-scale-minus"),e.command.executePageScaleMinus()},document.querySelector(".page-scale-add").onclick=function(){console.log("page-scale-add"),e.command.executePageScaleAdd()};const Wn=document.querySelector(".paper-size"),Ki=Wn.querySelector(".options");Wn.onclick=function(){Ki.classList.toggle("visible")},Ki.onclick=function(p){const K=p.target,w=K.dataset.paperSize,[v,H]=w.split("*").map(Number);e.command.executePaperSize(v,H),Ki.querySelectorAll("li").forEach(B=>B.classList.remove("active")),K.classList.add("active")};const Vn=document.querySelector(".paper-direction"),Ei=Vn.querySelector(".options");Vn.onclick=function(){Ei.classList.toggle("visible")},Ei.onclick=function(p){const K=p.target,w=K.dataset.paperDirection;e.command.executePaperDirection(w),Ei.querySelectorAll("li").forEach(v=>v.classList.remove("active")),K.classList.add("active")};const bs=document.querySelector(".paper-margin");bs.onclick=function(){const[p,K,w,v]=e.command.getPaperMargin();new _t({title:"\u9875\u8FB9\u8DDD",data:[{type:"text",label:"\u4E0A\u8FB9\u8DDD",name:"top",required:!0,value:`${p}`,placeholder:"\u8BF7\u8F93\u5165\u4E0A\u8FB9\u8DDD"},{type:"text",label:"\u4E0B\u8FB9\u8DDD",name:"bottom",required:!0,value:`${w}`,placeholder:"\u8BF7\u8F93\u5165\u4E0B\u8FB9\u8DDD"},{type:"text",label:"\u5DE6\u8FB9\u8DDD",name:"left",required:!0,value:`${v}`,placeholder:"\u8BF7\u8F93\u5165\u5DE6\u8FB9\u8DDD"},{type:"text",label:"\u53F3\u8FB9\u8DDD",name:"right",required:!0,value:`${K}`,placeholder:"\u8BF7\u8F93\u5165\u53F3\u8FB9\u8DDD"}],onConfirm:H=>{var Xt,mt,de,ti;const B=(Xt=H.find(wt=>wt.name==="top"))==null?void 0:Xt.value;if(!B)return;const j=(mt=H.find(wt=>wt.name==="bottom"))==null?void 0:mt.value;if(!j)return;const nt=(de=H.find(wt=>wt.name==="left"))==null?void 0:de.value;if(!nt)return;const rt=(ti=H.find(wt=>wt.name==="right"))==null?void 0:ti.value;!rt||e.command.executeSetPaperMargin([Number(B),Number(rt),Number(j),Number(nt)])}})};const Yn=document.querySelector(".fullscreen");Yn.onclick=Un,window.addEventListener("keydown",p=>{p.key==="F11"&&(Un(),p.preventDefault())}),document.addEventListener("fullscreenchange",()=>{Yn.classList.toggle("exist")});function Un(){console.log("fullscreen"),document.fullscreenElement?document.exitFullscreen():document.documentElement.requestFullscreen()}let Li=0;const Zn=[{mode:Rt.EDIT,name:"\u7F16\u8F91\u6A21\u5F0F"},{mode:Rt.CLEAN,name:"\u6E05\u6D01\u6A21\u5F0F"},{mode:Rt.READONLY,name:"\u53EA\u8BFB\u6A21\u5F0F"},{mode:Rt.FORM,name:"\u8868\u5355\u6A21\u5F0F"},{mode:Rt.PRINT,name:"\u6253\u5370\u6A21\u5F0F"},{mode:Rt.DESIGN,name:"\u8BBE\u8BA1\u6A21\u5F0F"}],Qn=document.querySelector(".editor-mode");Qn.onclick=function(){Li===Zn.length-1?Li=0:Li++;const{name:p,mode:K}=Zn[Li];Qn.innerText=p,e.command.executeMode(K);const w=K===Rt.READONLY,v=["search","print"];document.querySelectorAll(".menu-item>div").forEach(H=>{const B=H.dataset.menu;w&&(!B||!v.includes(B))?H.classList.add("disable"):H.classList.remove("disable")})};const be=document.querySelector(".comment");async function xs(){const p=await e.command.getGroupIds();for(const K of yn){const w=be.querySelector(`.comment-item[data-id='${K.id}']`);if(p.includes(K.id)){if(!w){const v=document.createElement("div");v.classList.add("comment-item"),v.setAttribute("data-id",K.id),v.onclick=()=>{e.command.executeLocationGroup(K.id)},be.append(v);const H=document.createElement("div");H.classList.add("comment-item__title"),H.append(document.createElement("span"));const B=document.createElement("span");B.innerText=K.rangeText,H.append(B);const j=document.createElement("i");j.onclick=()=>{e.command.executeDeleteGroup(K.id)},H.append(j),v.append(H);const nt=document.createElement("div");nt.classList.add("comment-item__info");const rt=document.createElement("span");rt.innerText=K.userName;const Xt=document.createElement("span");Xt.innerText=K.createdDate,nt.append(rt),nt.append(Xt),v.append(nt);const mt=document.createElement("div");mt.classList.add("comment-item__content"),mt.innerText=K.content,v.append(mt),be.append(v)}}else w==null||w.remove()}}e.listener.rangeStyleChange=function(p){if(p.type===N.AIEDIT?bt.classList.add("active"):bt.classList.remove("active"),p.type===N.SUBSCRIPT?V.classList.add("active"):V.classList.remove("active"),p.type===N.SUPERSCRIPT?Z.classList.add("active"):Z.classList.remove("active"),p.type===N.SEPARATOR?Lt.classList.add("active"):Lt.classList.remove("active"),Zt.querySelectorAll("li").forEach(H=>H.classList.remove("active")),p.type===N.SEPARATOR){const H=p.dashArray.join(",")||"0,0",B=Zt.querySelector(`[data-separator='${H}']`);B&&B.classList.add("active")}g.querySelectorAll("li").forEach(H=>H.classList.remove("active"));const K=g.querySelector(`[data-family='${p.font}']`);K&&(d.innerText=K.innerText,d.style.fontFamily=p.font,K.classList.add("active")),P.querySelectorAll("li").forEach(H=>H.classList.remove("active"));const w=P.querySelector(`[data-size='${p.size}']`);if(w?(O.innerText=w.innerText,w.classList.add("active")):O.innerText=`${p.size}`,p.bold?X.classList.add("active"):X.classList.remove("active"),p.italic?S.classList.add("active"):S.classList.remove("active"),p.underline?F.classList.add("active"):F.classList.remove("active"),p.strikeout?I.classList.add("active"):I.classList.remove("active"),p.color?(Y.classList.add("active"),m.value=p.color,Q.style.backgroundColor=p.color):(Y.classList.remove("active"),m.value="#000000",Q.style.backgroundColor="#000000"),p.highlight?(f.classList.add("active"),U.value=p.highlight,E.style.backgroundColor=p.highlight):(f.classList.remove("active"),U.value="#ffff00",E.style.backgroundColor="#ffff00"),J.classList.remove("active"),q.classList.remove("active"),st.classList.remove("active"),Wt.classList.remove("active"),ot.classList.remove("active"),p.rowFlex&&p.rowFlex==="right"?st.classList.add("active"):p.rowFlex&&p.rowFlex==="center"?q.classList.add("active"):p.rowFlex&&p.rowFlex==="alignment"?Wt.classList.add("active"):p.rowFlex&&p.rowFlex==="justify"?ot.classList.add("active"):J.classList.add("active"),C.querySelectorAll("li").forEach(H=>H.classList.remove("active")),C.querySelector(`[data-rowmargin='${p.rowMargin}']`).classList.add("active"),p.undo?o.classList.remove("no-allow"):o.classList.add("no-allow"),p.redo?l.classList.remove("no-allow"):l.classList.add("no-allow"),p.painter?a.classList.add("active"):a.classList.remove("active"),y.querySelectorAll("li").forEach(H=>H.classList.remove("active")),p.level){const H=y.querySelector(`[data-level='${p.level}']`);x.innerText=H.innerText,H.classList.add("active")}else x.innerText="\u6B63\u6587",y.querySelector("li:first-child").classList.add("active");if(A.querySelectorAll("li").forEach(H=>H.classList.remove("active")),p.listType){St.classList.add("active");const H=p.listType,B=p.listType===oe.OL?Gt.DECIMAL:p.listType,j=A.querySelector(`[data-list-type='${H}'][data-list-style='${B}']`);j&&j.classList.add("active")}else St.classList.remove("active");if(be.querySelectorAll(".comment-item").forEach(H=>{H.classList.remove("active")}),p.groupIds){const[H]=p.groupIds,B=be.querySelector(`.comment-item[data-id='${H}']`);B&&(B.classList.add("active"),pR(be,B))}},e.listener.visiblePageNoListChange=function(p){const K=p.map(w=>w+1).join("\u3001");document.querySelector(".page-no-list").innerText=K},e.listener.pageSizeChange=function(p){document.querySelector(".page-size").innerText=`${p}`},e.listener.intersectionPageNoChange=function(p){document.querySelector(".page-no").innerText=`${p+1}`},e.listener.pageScaleChange=function(p){document.querySelector(".page-scale-percentage").innerText=`${Math.floor(p*10*10)}%`},e.listener.controlChange=function(p){["table","hyperlink","separator","page-break","control"].forEach(w=>{const v=document.querySelector(`.menu-item__${w}`);p?v.classList.add("disable"):v.classList.remove("disable")})},e.listener.pageModeChange=function(p){const K=gi.querySelector(`[data-page-mode='${p}']`);gi.querySelectorAll("li").forEach(w=>w.classList.remove("active")),K.classList.add("active")};const Dn=async function(){const p=await e.command.getWordCount();document.querySelector(".word-count").innerText=`${p||0}`,hi&&Vs(()=>{fn()}),Vs(()=>{xs()})};e.listener.contentChange=fR(Dn,200),Dn(),e.listener.saved=function(p){console.log("elementList: ",p)},e.register.contextMenuList([{name:"\u63D2\u5165\u6761\u5F62\u7801",when:p=>!p.isReadonly&&p.editorTextFocus,callback:p=>{const K=window.prompt("\u8BF7\u8F93\u5165\u5185\u5BB9");p.executeInsertBarcode1D(K,200,100)}},{name:"\u63D2\u5165\u4E8C\u7EF4\u7801",when:p=>!p.isReadonly&&p.editorTextFocus,callback:p=>{const K=window.prompt("\u8BF7\u8F93\u5165\u5185\u5BB9");p.executeInsertBarcode2D(K,200,200)}},{name:"\u5BFC\u51FA\u6587\u6863",when:()=>!0,callback:p=>{r==""&&(r=window.prompt("\u8BF7\u8F93\u5165\u6587\u6863\u6807\u9898")),p.executeExportDocx({fileName:r,isFile:!0})}},{name:"\u5BFC\u5165\u6587\u6863",when:()=>!0,callback:()=>{i.click()}},{name:"\u5BFC\u5165excel",when:()=>!0,callback:()=>{n.click()}},{name:"\u6279\u6CE8",when:p=>!p.isReadonly&&p.editorHasSelection&&p.zone===lt.MAIN,callback:p=>{new _t({title:"\u6279\u6CE8",data:[{type:"textarea",label:"\u6279\u6CE8",height:100,name:"value",required:!0,placeholder:"\u8BF7\u8F93\u5165\u6279\u6CE8"}],onConfirm:K=>{var H;const w=(H=K.find(B=>B.name==="value"))==null?void 0:H.value;if(!w)return;const v=p.executeSetGroup();!v||yn.push({id:v,content:w,userName:"godoos",rangeText:p.getRangeText(),createdDate:new Date().toLocaleString()})}})}},{name:"\u7B7E\u540D",icon:"signature",when:p=>!p.isReadonly&&p.editorTextFocus,callback:p=>{new FR({onConfirm(K){if(!K)return;const{value:w,width:v,height:H}=K;!w||!v||!H||p.executeInsertElementList([{value:w,width:v,height:H,type:N.IMAGE}])}})}},{name:"\u683C\u5F0F\u6574\u7406",icon:"word-tool",when:p=>!p.isReadonly,callback:p=>{p.executeWordTool()}}]),n.onchange=()=>{var w;const p=(w=n==null?void 0:n.files)==null?void 0:w[0];if(!p)return;const K=new FileReader;K.onload=v=>{var B;const H=(B=v==null?void 0:v.target)==null?void 0:B.result;H instanceof ArrayBuffer&&e.command.executeImportExcel({arrayBuffer:H}),n.value=""},K.readAsArrayBuffer(p)},i.onchange=()=>{var w;const p=(w=i==null?void 0:i.files)==null?void 0:w[0];if(!p)return;const K=new FileReader;K.onload=v=>{var B;const H=(B=v==null?void 0:v.target)==null?void 0:B.result;H instanceof ArrayBuffer&&e.command.executeImportDocx({arrayBuffer:H}),i.value=""},K.readAsArrayBuffer(p)};const Kn=()=>{r==""&&(r=window.prompt("\u8BF7\u8F93\u5165\u6587\u6863\u6807\u9898")),console.log(r),e.command.executeExportDocx({fileName:r,isFile:!1})};e.register.shortcutList([{key:z.S,mod:!0,isGlobal:!0,callback:()=>{Kn()}},{key:z.P,mod:!0,isGlobal:!0,callback:p=>{p.executePrint()}},{key:z.F,mod:!0,isGlobal:!0,callback:p=>{const K=p.getRangeText();di.click(),K&&(Xe.value=K,e.command.executeSearch(K),Ee())}},{key:z.MINUS,ctrl:!0,isGlobal:!0,callback:p=>{p.executePageScaleMinus()}},{key:z.EQUAL,ctrl:!0,isGlobal:!0,callback:p=>{p.executePageScaleAdd()}},{key:z.ZERO,ctrl:!0,isGlobal:!0,callback:p=>{p.executePageScaleRecovery()}}]),document.querySelector(".menu-item__save").addEventListener("click",()=>{Kn()});const Cs=p=>{const K=window.atob(p),w=K.length,v=new Uint8Array(w);for(let H=0;H{const K=p.data;if(K.type==="start"){r=K.title;return}if(K.type==="init"){const w=K.data;if(!w||!w.title)return;r=w.title,ws(w.content)&&(w.content=Cs(w.content)),w.content instanceof ArrayBuffer?e.command.executeImportDocx({arrayBuffer:w.content}):alert("\u5BFC\u5165\u5931\u8D25");return}K.type=="aiReciver"&&(K.action=="creation_leader"?Sn(K.data,"outline"):K.action=="creation_builder"?Sn(K.data,"article"):QR(K))};window.parent.postMessage({type:"initSuccess"},"*"),window.addEventListener("message",En),window.addEventListener("unload",()=>{window.removeEventListener("message",En)})}; diff --git a/frontend/public/docx/assets/index.ec407d42.css b/frontend/public/docx/assets/index.ec407d42.css new file mode 100644 index 0000000..fdfa304 --- /dev/null +++ b/frontend/public/docx/assets/index.ec407d42.css @@ -0,0 +1 @@ +::-webkit-scrollbar{height:16px;width:16px;overflow:visible}::-webkit-scrollbar-button{width:0;height:0}::-webkit-scrollbar-corner{background:transparent}::-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;background-clip:padding-box}*{margin:0;padding:0}body{background-color:#fff}ul{list-style:none}.menu{width:98%;left:1%;height:60px;top:0;z-index:9;position:fixed;display:flex;flex-wrap:wrap;align-items:center;justify-content:left;background:#fff;box-shadow:0 0 10px #8091a533}.menu-divider{width:1px;height:16px;margin:0 8px;display:inline-block;background-color:#cfd2d8}.menu-item{height:24px;display:flex;align-items:center;position:relative}.menu-item>div{width:24px;height:24px;cursor:pointer;display:flex;align-items:center;justify-content:center;margin:0 2px}.menu-item>div:hover{background:rgba(25,55,88,.04)}.menu-item>div.active{background:rgba(25,55,88,.08)}.menu-item i{width:16px;height:16px;display:inline-block;background-repeat:no-repeat;background-size:100% 100%}.menu-item>div>span{width:16px;height:3px;display:inline-block;border:1px solid #e2e6ed}.menu-item .select{border:none;font-size:12px;line-height:24px;user-select:none}.menu-item .select:after{position:absolute;content:"";top:11px;width:0;height:0;right:2px;border-color:#767c85 transparent transparent;border-style:solid solid none;border-width:3px 3px 0}.menu-item .options{width:70px;position:absolute;left:0;top:25px;padding:10px;background:#fff;font-size:14px;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px;display:none}.menu-item .options.visible{display:block}.menu-item .options li{padding:5px;margin:5px 0;user-select:none;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{width:50px;text-align:center;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(./undo.5b47bbb8.svg)}.menu-item__redo i{background-image:url(./redo.f5199371.svg)}.menu-item__painter i{background-image:url(./painter.74846ea5.svg)}.menu-item__format i{background-image:url(./format.b4e40a32.svg)}.menu-item__size-add i{background-image:url(./size-add.5305a5f4.svg)}.menu-item__size-minus i{background-image:url(./size-minus.98cd7296.svg)}.menu-item__bold i{background-image:url(./bold.9b041cb0.svg)}.menu-item__italic i{background-image:url(./italic.37e67191.svg)}.menu-item .menu-item__underline{width:30px;position:relative}.menu-item__underline>i{flex-shrink:0;background-image:url(./underline.695d43bb.svg)}.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(./line-single.1d77ee2c.svg)}.menu-item__underline li[data-decoration-style=double]{background-image:url(./line-double.9a142773.svg)}.menu-item__underline li[data-decoration-style=dashed]{background-image:url(./line-dash-small-gap.c7edb562.svg)}.menu-item__underline li[data-decoration-style=dotted]{background-image:url(./line-dot.a1eb7d4b.svg)}.menu-item__underline li[data-decoration-style=wavy]{background-image:url(./line-wavy.30db23e3.svg)}.menu-item__strikeout i{background-image:url(./strikeout.333ad365.svg)}.menu-item__superscript i{background-image:url(./superscript.04146d71.svg)}.menu-item__subscript i{background-image:url(./subscript.6ccfd46a.svg)}.menu-item__color,.menu-item__highlight{display:flex;flex-direction:column}.menu-item__color #color,.menu-item__highlight #highlight{width:1px;height:1px;visibility:hidden;outline:none;appearance:none}.menu-item__color i{background-image:url(./color.e467364a.svg)}.menu-item__color span{background-color:#000}.menu-item__highlight i{background-image:url(./highlight.8e896be3.svg)}.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{transform:translate(-5px);background-image:url(./title.a8e61a1b.svg)}.menu-item__title .options{width:80px}.menu-item__left i{background-image:url(./left.bd5ac83a.svg)}.menu-item__center i{background-image:url(./center.9cbc1716.svg)}.menu-item__right i{background-image:url(./right.86c5b6ab.svg)}.menu-item__alignment i{background-image:url(./alignment.d88c7c86.svg)}.menu-item__justify i{background-image:url(./justify.b2efed4b.svg)}.menu-item__row-margin{position:relative}.menu-item__row-margin i{background-image:url(./row-margin.9432e8ef.svg)}.menu-item__list{position:relative}.menu-item__list i{background-image:url(./list.218db157.svg)}.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(./image.bdd4200c.svg)}.menu-item__image input{display:none}.menu-item__table{position:relative}.menu-item__table i{background-image:url(./table.ec6435b9.svg)}.menu-item .menu-item__table__collapse{width:270px;height:310px;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;box-sizing:border-box;border-radius:2px;position:absolute;display:none;z-index:99;top:25px;left:0;padding:14px 27px;cursor:auto}.menu-item .menu-item__table__collapse .table-close{position:absolute;right:10px;top:5px;cursor:pointer}.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{display:flex;justify-content:flex-start;padding-bottom:5px;border-bottom:1px solid #e2e6ed}.table-title span{font-size:12px;color:#3d4757;display:inline;margin:0}.table-panel{cursor:pointer}.table-panel .table-row{display:flex;flex-wrap:nowrap;margin-top:10px;pointer-events:none}.table-panel .table-cel{width:16px;height:16px;box-sizing:border-box;border:1px solid #e2e6ed;background:#fff;position:relative;margin-right:6px;pointer-events:none}.table-panel .table-cel.active{border:1px solid rgba(73,145,242,.2);background:rgba(73,145,242,.15)}.table-panel .table-row .table-cel:last-child{margin-right:0}.menu-item__hyperlink i{background-image:url(./hyperlink.a004b98b.svg)}.menu-item__separator{position:relative}.menu-item__separator>i{background-image:url(./separator.39224551.svg)}.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(./line-single.1d77ee2c.svg)}.menu-item__separator li[data-separator="1,1"]{background-image:url(./line-dot.a1eb7d4b.svg)}.menu-item__separator li[data-separator="3,1"]{background-image:url(./line-dash-small-gap.c7edb562.svg)}.menu-item__separator li[data-separator="4,4"]{background-image:url(./line-dash-large-gap.54f6f106.svg)}.menu-item__separator li[data-separator="7,3,3,3"]{background-image:url(./line-dash-dot.b265be14.svg)}.menu-item__separator li[data-separator="6,2,2,2,2,2"]{background-image:url(./line-dash-dot-dot.6a5fc08b.svg)}.menu-item__watermark>i{background-image:url(./watermark.3690fb86.svg)}.menu-item__watermark{position:relative}.menu-item__codeblock i{background-image:url(./codeblock.f3a0b0a7.svg)}.menu-item__page-break i{background-image:url(./page-break.b7c0f09b.svg)}.menu-item__control{position:relative}.menu-item__control i{background-image:url(./control.cdb06a96.svg)}.menu-item__checkbox i{background-image:url(./checkbox.028841bf.svg)}.menu-item__radio i{background-image:url(./radio.37698364.svg)}.menu-item__latex i{background-image:url(./latex.dcd59a60.svg)}.menu-item__date{position:relative}.menu-item__date i{background-image:url(./date.ebf6c298.svg)}.menu-item__date .options{width:160px}.menu-item__block i{background-image:url(./block.d93ff716.svg)}.menu-item .menu-item__control .options{width:55px}.menu-item__search{position:relative}.menu-item__search i{background-image:url(./search.089df67f.svg)}.menu-item .menu-item__search__collapse{width:260px;height:72px;box-sizing:border-box;position:absolute;display:none;z-index:99;top:25px;left:0;background:#ffffff;box-shadow:0 5px 5px #e3dfdf}.menu-item .menu-item__search__collapse:hover{background:#ffffff}.menu-item .menu-item__search__collapse>div{width:250px;height:36px;padding:0 5px;line-height:36px;display:flex;align-items:center;justify-content:space-between;border-radius:4px}.menu-item .menu-item__search__collapse>div input{width:205px;height:27px;appearance:none;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #ebebeb;box-sizing:border-box;color:#606266;display:inline-block;line-height:27px;outline:none;padding:0 5px}.menu-item .menu-item__search__collapse>div span{height:100%;color:#dcdfe6;font-size:25px;display:inline-block;border:0;padding:0 10px}.menu-item .menu-item__search__collapse__replace button{display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#fff;line-height:22px;padding:0 6px;white-space:nowrap;margin-left:4px;cursor:pointer;font-size:12px}.menu-item .menu-item__search__collapse__replace button:hover{background:rgba(25,55,88,.04)}.menu-item .menu-item__search__collapse__search{position:relative}.menu-item .menu-item__search__collapse__search label{right:110px;font-size:12px;color:#3d4757;position:absolute}.menu-item .menu-item__search__collapse__search>input{padding:5px 90px 5px 5px!important}.menu-item .menu-item__search__collapse__search>div{width:28px;height:27px;display:flex;justify-content:center;align-items:center;position:absolute;border-left:1px solid #e2e6ed;transition:all .5s}.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(./arrow-left.f85352cf.svg) 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(./arrow-right.1499ec3c.svg) no-repeat}.menu-item__print i{background-image:url(./print.6447a229.svg)}.catalog{width:250px;position:fixed;left:0;bottom:0;top:100px;padding:0 20px 40px}.catalog .catalog__header{height:48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2e6ed}.catalog .catalog__header span{color:#3d4757;font-size:14px;font-weight:bold}.catalog .catalog__header i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(./close.9c6aa488.svg) no-repeat;transition:all .2s}.catalog .catalog__header>div:hover{background:rgba(235,238,241)}.catalog__main{height:calc(100% - 60px);padding:10px 0;overflow-y:auto;overflow-x:hidden}.catalog__main .catalog-item{width:100%;padding-left:10px;box-sizing:border-box}.catalog__main>.catalog-item{padding-left:0}.catalog__main .catalog-item .catalog-item__content{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.catalog__main .catalog-item .catalog-item__content:hover>span{color:#4991f2}.catalog__main .catalog-item .catalog-item__content span{color:#3d4757;line-height:30px;font-size:12px;white-space:nowrap;cursor:pointer;user-select:none}.editor>div{margin:80px auto}.ce-page-container canvas{box-shadow:#9ea1a566 0 2px 12px}.comment{width:250px;height:650px;position:fixed;transform:translate(420px);top:200px;left:50%;overflow-y:auto}.comment-item{background:#ffffff;border:1px solid #e2e6ed;position:relative;border-radius:8px;padding:15px;font-size:14px;margin-bottom:20px;cursor:pointer;transition:all .5s}.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{height:22px;position:relative;display:flex;align-items:center;color:#c1c6ce}.comment-item__title span:first-child{background-color:#dbdbdb;width:4px;height:16px;margin-right:5px;display:inline-block;border-radius:999px}.comment-item__title span:nth-child(2){width:200px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.comment-item__title i{width:16px;height:16px;cursor:pointer;position:absolute;right:-8px;top:-8px;background:url(./close.9c6aa488.svg) no-repeat}.comment-item__title i:hover{opacity:.6}.comment-item__info{height:28px;display:flex;align-items:center;justify-content:space-between}.comment-item__info>span:first-child{font-weight:600}.comment-item__info>span:last-child{color:#c1c6ce}.comment-item__content{line-height:22px}.footer{width:100%;height:30px;display:flex;align-items:center;justify-content:space-between;background:#f2f4f7;z-index:9;position:fixed;bottom:0;left:0;font-size:12px;padding:0 4px 0 20px;box-sizing:border-box}.footer>div:first-child{display:flex;align-items:center}.footer .catalog-mode{padding:1px;position:relative}.footer .catalog-mode i{width:16px;height:16px;margin-right:5px;cursor:pointer;display:inline-block;background-image:url(./catalog.d4a039d5.svg)}.footer .page-mode{padding:1px;position:relative}.footer .page-mode i{width:16px;height:16px;margin-right:5px;cursor:pointer;display:inline-block;background-image:url(./page-mode.12c584e4.svg)}.footer .options{width:70px;position:absolute;left:0;bottom:25px;padding:10px;background:#fff;font-size:14px;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px;display:none}.footer .options.visible{display:block}.footer .options li{padding:5px;margin:5px 0;user-select:none;transition:all .3s;text-align:center;cursor:pointer}.footer .options li:hover{background-color:#ebecef}.footer .options li.active{background-color:#e2e6ed}.footer>div:first-child>span{display:inline-block;margin-right:5px;letter-spacing:1px}.footer>div:last-child{display:flex;align-items:center;justify-content:space-between}.footer>div:last-child>div{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.footer>div:last-child>div:hover{background:rgba(25,55,88,.04)}.footer>div:last-child i{width:16px;height:16px;display:inline-block;cursor:pointer}.footer .editor-option i{background-image:url(./option.30cf6b62.svg)}.footer .page-scale-minus i{background-image:url(./page-scale-minus.437c124e.svg)}.footer .page-scale-add i{background-image:url(./page-scale-add.afb32753.svg)}.footer .page-scale-percentage{cursor:pointer;user-select:none}.footer .fullscreen i{background-image:url(./request-fullscreen.9f679a3d.svg)}.footer .fullscreen.exist i{background-image:url(./exit-fullscreen.095667d8.svg)}.footer .paper-margin i{background-image:url(./paper-margin.cdcaf903.svg)}.footer .editor-mode{cursor:pointer;user-select:none}.footer .paper-size{position:relative}.footer .paper-size i{background-image:url(./paper-size.415dc564.svg)}.footer .paper-size .options{right:0;left:unset}.footer .paper-direction{position:relative}.footer .paper-direction i{background-image:url(./paper-direction.e0baa33d.svg)}.footer .paper-direction .options{right:0;left:unset}.ce-contextmenu-signature{background-image:url(./signature.553c891c.svg)}.ce-contextmenu-word-tool{background-image:url(./word-tool.c4c4b5ab.svg)}.menu-item__save{position:relative}.menu-item__save i{background-image:url(./save.5057a734.svg)}.menu-item__ai-edit i{width:20px;height:20px;background-image:url(./ai-edit.48ceb865.svg)}.outline-svg i{display:inline-block;width:16px;height:16px;margin-right:5px;background-image:url(./outline.e20214df.svg)}.article-svg i{display:inline-block;width:16px;height:16px;margin-right:5px;background-image:url(./article.3b97a2e3.svg)}.hide{display:none!important}.active-ai{font-weight:bold}.add-height{height:300px!important}.menu .menu-item__ai-edit-box{position:absolute;top:90px;left:10%;width:500px;min-height:120px;font-size:14px;padding:10px 15px 10px 0;background-color:#ebf9fb!important;box-shadow:0 5px 5px #e3dfdf}.menu .menu-item__ai-edit-box span{position:absolute;top:0px;right:0px;width:25px;height:25px;color:#dcdfe6;font-size:25px;text-align:center;line-height:25px;border:0}.menu .menu-item__ai-edit-box input,.menu .menu-item__ai-edit-box select{width:180px;height:27px;appearance:none;background-color:#fff;background-image:none;border-radius:4px;border:1px solid #ebebeb;box-sizing:border-box;color:#606266;display:inline-block;line-height:27px;outline:none;padding:0 10px}.menu .menu-item__ai-edit-box button{display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#fff;line-height:22px;padding:0 6px;white-space:nowrap;margin-left:4px;cursor:pointer;font-size:12px}.menu .ai-edit-outline-box,.menu .ai-edit-content-box{width:100%;height:100%;text-align:center}.menu .ai-menu{display:inline-block;position:relative;width:20%;min-width:85px;height:100%;padding:10px 0;box-sizing:border-box;vertical-align:top}.menu .ai-menu button{position:absolute;bottom:10px;right:10px}.menu .ai-menu button:hover{background:rgba(25,55,88,.04)}.menu .ai-menu p{display:inline-block;height:25px;line-height:25px;vertical-align:middle}.menu .ai-content-box{display:inline-block;position:relative;width:70%;height:100%;border-radius:5px;background-color:#fff;box-sizing:border-box}.menu .ai-content-box textarea{width:100%;height:100%;padding:10px 15px;border-color:#f4f4f5;border-radius:5px;outline:none;resize:none;box-sizing:border-box}.ai-content-box div{margin:5px 0}.menu #articleLoader,.menu #outlineLoader{position:absolute;top:40%;left:40%;width:48px;height:48px;background-image:url(./loader.d32cdde3.svg);animation:rotate 2s linear infinite}.ce-select-control-popup{max-width:160px;min-width:69px;max-height:225px;position:absolute;z-index:1;border:1px solid #e4e7ed;border-radius:4px;background-color:#fff;box-shadow:0 2px 12px #0000001a;box-sizing:border-box;margin:5px 0;overflow-y:auto}.ce-select-control-popup ul{list-style:none;padding:3px 0;margin:0;box-sizing:border-box}.ce-select-control-popup ul li{font-size:13px;padding:0 20px;position:relative;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#666;height:36px;line-height:36px;box-sizing:border-box;cursor:pointer}.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-date-container{display:none;width:300px;overflow:hidden;left:0;right:0;position:absolute;z-index:1;color:#606266;background:#ffffff;border-radius:4px;padding:10px;user-select:none;border:1px solid #e4e7ed;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-title{display:flex;justify-content:center;align-items:center;text-align:center;color:#606266;font-size:16px}.ce-date-title>span{display:inline-block}.ce-date-title>span:not(.ce-date-title__now){font-family:cursive;cursor:pointer}.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__next-year,.ce-date-title .ce-date-title__next-month{width:15%}.ce-date-week{width:100%;display:flex;justify-content:center;margin-top:15px;padding-bottom:5px;border-bottom:1px solid #e4e7ed}.ce-date-week>span{list-style:none;width:14.28571%;text-align:center;color:#606266;font-size:14px}.ce-date-day{width:100%;display:flex;flex-wrap:wrap;align-items:center;margin-top:5px}.ce-date-day>div{width:14.28571%;height:40px;text-align:center;color:#606266;font-size:14px;cursor:pointer;line-height:40px;border-radius:4px}.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-time-wrap{display:none;padding:10px;height:286px}.ce-time-wrap ::-webkit-scrollbar{width:0}.ce-time-wrap.active{display:flex}.ce-time-wrap li{list-style:none}.ce-time-wrap>li{width:33.3%;height:100%;text-align:center}.ce-time-wrap>li>span{transform:translateY(-5px);display:inline-block}.ce-time-wrap>li>ol{height:calc(100% - 20px);overflow-y:auto;border:1px solid #e2e2e2;position:relative}.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{line-height:30px;cursor:pointer;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{width:100%;height:28px;display:flex;justify-content:flex-end;align-items:center;padding-top:10px;position:relative;border-top:1px solid #e4e7ed}.ce-date-menu button{display:inline-block;line-height:1;white-space:nowrap;cursor:pointer;background:#fff;border:1px solid #dcdfe6;color:#606266;appearance:none;text-align:center;box-sizing:border-box;outline:none;transition:.1s;font-weight:500;user-select:none;padding:7px 15px;font-size:12px;border-radius:3px;margin:0 0 0 10px}.ce-date-menu button:hover{color:#5175f4;border-color:#5175f4}.ce-date-menu button.ce-date-menu__time{border:1px solid transparent;position:absolute;left:0;margin-left:0}.ce-date-menu button.ce-date-menu__time:hover{color:#5175f4}.ce-block-item{position:absolute;z-index:0;overflow:hidden;border-radius:8px;background-color:#fff;border:1px solid rgb(235 236 240)}.ce-table-tool__row{position:absolute;width:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed}.ce-table-tool__row .ce-table-tool__row__item{width:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__row .ce-table-tool__row__item:after{content:"";position:absolute;bottom:0;left:2px;width:8px;height:1px;background-color:#c0c6cf}.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{width:16px;height:16px;position:absolute;border-radius:50%;background-color:#e2e6ed;cursor:pointer}.ce-table-tool__quick__add:after{content:"+";color:#fff;position:absolute;top:50%;left:50%;transform:translate(-50%,-55%)}.ce-table-tool__select{width:16px;height:18px;position:absolute;border-radius:3px;cursor:pointer}.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{position:absolute;height:12px;border-radius:6.5px;overflow:hidden;background-color:#e2e6ed;display:flex}.ce-table-tool__col .ce-table-tool__col__item{height:100%;position:relative;cursor:pointer;transition:all .3s}.ce-table-tool__col .ce-table-tool__col__item:after{content:"";position:absolute;top:2px;left:-1px;width:1px;height:8px;z-index:1;background-color:#c0c6cf}.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{right:-5px;width:10px;height:12px;z-index:9;position:absolute;cursor:col-resize}.ce-table-tool__row .ce-table-tool__anchor{bottom:-5px;left:0;width:12px;height:10px;z-index:9;position:absolute;cursor:row-resize}.ce-table-anchor__line{z-index:9;position:absolute;border:1px dotted #000000}.ce-table-tool__border{position:absolute;z-index:1;background:transparent;pointer-events:none}.ce-table-tool__border__row{position:absolute;cursor:row-resize;pointer-events:auto}.ce-table-tool__border__col{position:absolute;cursor:col-resize;pointer-events:auto}.ce-resizer-selection{position:absolute;border:1px solid;pointer-events:none}.ce-resizer-selection .resizer-handle{position:absolute;z-index:9;width:10px;height:10px;box-shadow:0 1px 4px #0000004d;border-radius:5px;border:2px solid #ffffff;box-sizing:border-box;pointer-events:initial}.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{display:flex;align-items:center;height:20px;white-space:nowrap;position:absolute;z-index:9;top:-30px;left:0;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px}.ce-resizer-size-view span{color:#fff;font-size:12px}.ce-resizer-image{position:absolute;opacity:.5}.ce-image-previewer{position:fixed;left:0;top:0;z-index:1000;width:100%;height:100%;overflow:hidden;background:#f2f4f7;display:flex;align-items:center;justify-content:center;animation:previewerAnimation .3s}@keyframes previewerAnimation{0%{opacity:.1}to{opacity:1}}.ce-image-previewer .image-close{width:24px;height:24px;display:inline-block;position:absolute;right:50px;top:30px;z-index:99;cursor:pointer;background:url(./close.70d16839.svg) no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.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{height:50px;position:absolute;bottom:50px;z-index:99;display:flex;align-items:center;justify-content:center}.ce-image-previewer .ce-image-menu i{width:32px;height:32px;margin:0 8px;cursor:pointer;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;transition:all .3s;border-radius:50%}.ce-image-previewer .ce-image-menu i:hover{background-color:#e2e6ed}.ce-image-previewer .ce-image-menu i.zoom-in{background-image:url(./zoom-in.d38f91f8.svg)}.ce-image-previewer .ce-image-menu i.zoom-out{background-image:url(./zoom-out.321f6c04.svg)}.ce-image-previewer .ce-image-menu i.rotate{background-image:url(./rotate.eddbefb0.svg)}.ce-image-previewer .ce-image-menu i.original-size{background-image:url(./original-size.762bbfa1.svg)}.ce-image-previewer .ce-image-menu i.image-download{background-image:url(./image-download.e70be036.svg)}.ce-contextmenu-container{z-index:9;position:fixed;display:none;padding:4px;overflow-x:hidden;overflow-y:auto;background:#fff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.ce-contextmenu-content{display:flex;flex-direction:column}.ce-contextmenu-content .ce-contextmenu-sub-item:after{position:absolute;content:"";width:16px;height:16px;right:12px;background:url(./submenu-dropdown.d0bb681b.svg)}.ce-contextmenu-content .ce-contextmenu-item{min-width:140px;padding:0 32px 0 16px;height:30px;display:flex;align-items:center;white-space:nowrap;box-sizing:border-box;cursor:pointer}.ce-contextmenu-content .ce-contextmenu-item.hover{background:rgba(25,55,88,.04)}.ce-contextmenu-content .ce-contextmenu-item span{max-width:300px;font-size:12px;color:#3d4757;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-contextmenu-content .ce-contextmenu-item span.ce-shortcut{color:#767c85;height:30px;flex:1;text-align:right;line-height:30px;margin-left:20px}.ce-contextmenu-content .ce-contextmenu-item i{width:16px;height:16px;vertical-align:middle;display:inline-block;background-repeat:no-repeat;background-size:100% 100%;flex-shrink:0;margin-right:8px}.ce-contextmenu-divider{background-color:#e2e6ed;margin:4px 16px;height:1px}.ce-contextmenu-print{background-image:url(./print.6447a229.svg)}.ce-contextmenu-image{background-image:url(./image.bdd4200c.svg)}.ce-contextmenu-image-change{background-image:url(./image-change.e1d36fce.svg)}.ce-contextmenu-insert-row-col{background-image:url(./insert-row-col.23cd20c7.svg)}.ce-contextmenu-insert-top-row{background-image:url(./insert-top-row.e91bd7ae.svg)}.ce-contextmenu-insert-bottom-row{background-image:url(./insert-bottom-row.157af373.svg)}.ce-contextmenu-insert-left-col{background-image:url(./insert-left-col.349e08a6.svg)}.ce-contextmenu-insert-right-col{background-image:url(./insert-right-col.57c425d9.svg)}.ce-contextmenu-delete-row-col{background-image:url(./delete-row-col.98cf4f89.svg)}.ce-contextmenu-delete-row{background-image:url(./delete-row.5bd901f3.svg)}.ce-contextmenu-delete-col{background-image:url(./delete-col.4bc7b7e1.svg)}.ce-contextmenu-delete-table{background-image:url(./delete-table.78487d9a.svg)}.ce-contextmenu-merge-cell{background-image:url(./merge-cell.41898a3a.svg)}.ce-contextmenu-merge-cancel-cell{background-image:url(./merge-cancel-cell.9cfbc8af.svg)}.ce-contextmenu-vertical-align{background-image:url(./left.bd5ac83a.svg)}.ce-contextmenu-vertical-align-top{background-image:url(./vertical-align-top.bffbf9d9.svg)}.ce-contextmenu-vertical-align-middle{background-image:url(./vertical-align-middle.5bf6db6c.svg)}.ce-contextmenu-vertical-align-bottom{background-image:url(./vertical-align-bottom.20c3eaa5.svg)}.ce-contextmenu-border-all{background-image:url(./table-border-all.ced726eb.svg)}.ce-contextmenu-border-empty{background-image:url(./table-border-empty.0e58e33f.svg)}.ce-contextmenu-border-dash{background-image:url(./table-border-dash.8cfd45a5.svg)}.ce-contextmenu-border-external{background-image:url(./table-border-external.eb6f9ad3.svg)}.ce-contextmenu-border-internal{background-image:url(./table-border-internal.78ae9ca1.svg)}.ce-contextmenu-border-td{background-image:url(./table-border-td.3962a057.svg)}.ce-contextmenu-border-td-top{background-image:url(./table-border-td-top.2c0f9729.svg)}.ce-contextmenu-border-td-left{background-image:url(./table-border-td-left.81a7eb4b.svg)}.ce-contextmenu-border-td-bottom{background-image:url(./table-border-td-bottom.f28b5b1d.svg)}.ce-contextmenu-border-td-right{background-image:url(./table-border-td-right.0513e99c.svg)}.ce-contextmenu-border-td-forward{background-image:url(./table-border-td-forward.6e10f972.svg)}.ce-contextmenu-border-td-back{background-image:url(./table-border-td-back.a4f60939.svg)}.ce-hyperlink-popup{background:#fff;box-shadow:0 2px 12px #626b8433;border-radius:2px;color:#3d4757;padding:12px 16px;position:absolute;z-index:1;text-align:center;display:none}.ce-hyperlink-popup a{min-width:100px;max-width:300px;font-size:12px;display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;text-decoration:none;border-bottom-width:1px;border-bottom-style:solid;color:#00f}.ce-zone-indicator>div{padding:3px 6px;color:#000;font-size:12px;background:rgb(218 231 252);position:absolute;transform-origin:0 0}.ce-zone-indicator-border__top,.ce-zone-indicator-border__bottom,.ce-zone-indicator-border__left,.ce-zone-indicator-border__right{display:block;position:absolute;z-index:0}.ce-zone-indicator-border__top{border-top:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__bottom{border-top:2px dashed rgb(238,238,238);width:100%}.ce-zone-indicator-border__left{border-left:2px dashed rgb(238,238,238)}.ce-zone-indicator-border__right{border-right:2px dashed rgb(238,238,238)}.ce-zone-tip{display:none;align-items:center;height:30px;white-space:nowrap;position:fixed;opacity:.9;background-color:#000;padding:0 5px;border-radius:4px;z-index:9;transition:all .3s;outline:none;user-select:none;pointer-events:none;transform:translate(10px,10px)}.ce-zone-tip.show{display:flex}.ce-zone-tip span{color:#fff;font-size:12px}.ce-inputarea{width:100px;height:30px;min-width:0;min-height:0;margin:0;padding:0;left:0;top:0;letter-spacing:0;font-size:12px;position:absolute;z-index:-1;outline:none;resize:none;border:none;overflow:hidden;color:transparent;user-select:none;caret-color:transparent;background-color:transparent}.ce-cursor{width:1px;height:20px;left:0;right:0;position:absolute;outline:none;background-color:#000;pointer-events:none}.ce-cursor.ce-cursor--animation{animation-duration:1s;animation-iteration-count:infinite;animation-name:cursorAnimation}@keyframes cursorAnimation{0%{opacity:1}13%{opacity:0}50%{opacity:0}63%{opacity:1}to{opacity:1}}.ce-float-image{position:absolute;opacity:.5;pointer-events:none}.dialog-mask{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.dialog-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.dialog{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.dialog-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:30px;height:60px;display:flex;align-items:center;justify-content:space-between}.dialog-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(./close.9c6aa488.svg)}.dialog-option__item{margin-bottom:18px;display:flex;align-items:center;justify-content:space-between}.dialog-option__item span{margin-right:12px;font-size:14px;color:#3d4757;position:relative}.dialog-option__item input,.dialog-option__item textarea,.dialog-option__item select{width:276px;height:30px;border-radius:2px;border:1px solid #d3d3d3;min-height:30px;padding:5px;box-sizing:border-box;outline:none;appearance:none;user-select:none;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{display:flex;align-items:center;justify-content:flex-end}.dialog-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.dialog-menu button:hover{background:rgba(25,55,88,.04)}.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{position:fixed;left:0;top:0;width:100%;height:100%;opacity:.5;background:#000000;z-index:99}.signature-container{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;z-index:999;margin:0;display:flex;justify-content:center;align-items:center}.signature{position:absolute;padding:0 30px 30px;background:#ffffff;box-shadow:0 2px 12px #38383833;border:1px solid #e2e6ed;border-radius:2px}.signature-title{position:relative;border-bottom:1px solid #e2e6ed;margin-bottom:15px;height:60px;display:flex;align-items:center;justify-content:space-between}.signature-title i{width:16px;height:16px;cursor:pointer;display:inline-block;background:url(./close.9c6aa488.svg)}.signature-operation>div{cursor:pointer;display:inline-flex;align-items:center;color:#3d4757;user-select:none}.signature-operation>div:hover{color:#6e7175}.signature-operation>div i{width:24px;height:24px;display:inline-block}.signature-operation__undo{background:url(./signature-undo.07c67083.svg) no-repeat}.signature-operation__trash{background:url(./trash.f5190069.svg) no-repeat}.signature-operation>div span{font-size:12px;margin:0 5px}.signature-canvas{margin:15px 0;user-select:none}.signature-canvas canvas{background:#f3f5f7}.signature-menu{display:flex;align-items:center;justify-content:flex-end}.signature-menu button{position:relative;display:inline-block;border:1px solid #e2e6ed;border-radius:2px;background:#ffffff;line-height:22px;padding:0 16px;white-space:nowrap;cursor:pointer}.signature-menu button:hover{background:rgba(25,55,88,.04)}.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}/*! Pickr 1.9.1 MIT | https://github.com/Simonwep/pickr */.pickr{position:relative;overflow:visible;transform:translateY(0)}.pickr *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr .pcr-button{position:relative;height:2em;width:2em;padding:.5em;cursor:pointer;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;border-radius:.15em;background:url('data:image/svg+xml;utf8, ') no-repeat center;background-size:0;transition:all .3s}.pickr .pcr-button:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pickr .pcr-button:before{z-index:initial}.pickr .pcr-button:after{position:absolute;content:"";top:0;left:0;height:100%;width:100%;transition:background .3s;background:var(--pcr-color);border-radius:.15em}.pickr .pcr-button.clear{background-size:70%}.pickr .pcr-button.clear:before{opacity:0}.pickr .pcr-button.clear:focus{box-shadow:0 0 0 1px #ffffffd9,0 0 0 3px var(--pcr-color)}.pickr .pcr-button.disabled{cursor:not-allowed}.pickr *,.pcr-app *{box-sizing:border-box;outline:none;border:none;-webkit-appearance:none}.pickr input:focus,.pickr input.pcr-active,.pickr button:focus,.pickr button.pcr-active,.pcr-app input:focus,.pcr-app input.pcr-active,.pcr-app button:focus,.pcr-app button.pcr-active{box-shadow:0 0 0 1px #ffffffd9,0 0 0 3px var(--pcr-color)}.pickr .pcr-palette,.pickr .pcr-slider,.pcr-app .pcr-palette,.pcr-app .pcr-slider{transition:box-shadow .3s}.pickr .pcr-palette:focus,.pickr .pcr-slider:focus,.pcr-app .pcr-palette:focus,.pcr-app .pcr-slider:focus{box-shadow:0 0 0 1px #ffffffd9,0 0 0 3px #00000040}.pcr-app{position:fixed;display:flex;flex-direction:column;z-index:10000;border-radius:.1em;background:#fff;opacity:0;visibility:hidden;transition:opacity .3s,visibility 0s .3s;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Helvetica Neue",Arial,sans-serif;box-shadow:0 .15em 1.5em #0000001a,0 0 1em #00000008;left:0;top:0}.pcr-app.visible{transition:opacity .3s;visibility:visible;opacity:1}.pcr-app .pcr-swatches{display:flex;flex-wrap:wrap;margin-top:.75em}.pcr-app .pcr-swatches.pcr-last{margin:0}@supports (display: grid){.pcr-app .pcr-swatches{display:grid;align-items:center;grid-template-columns:repeat(auto-fit,1.75em)}}.pcr-app .pcr-swatches>button{font-size:1em;position:relative;width:calc(1.75em - 5px);height:calc(1.75em - 5px);border-radius:.15em;cursor:pointer;margin:2.5px;flex-shrink:0;justify-self:center;transition:all .15s;overflow:hidden;background:rgba(0,0,0,0);z-index:1}.pcr-app .pcr-swatches>button:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:6px;border-radius:.15em;z-index:-1}.pcr-app .pcr-swatches>button:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background:var(--pcr-color);border:1px solid rgba(0,0,0,.05);border-radius:.15em;box-sizing:border-box}.pcr-app .pcr-swatches>button:hover{filter:brightness(1.05)}.pcr-app .pcr-swatches>button:not(.pcr-active){box-shadow:none}.pcr-app .pcr-interaction{display:flex;flex-wrap:wrap;align-items:center;margin:0 -.2em}.pcr-app .pcr-interaction>*{margin:0 .2em}.pcr-app .pcr-interaction input{letter-spacing:.07em;font-size:.75em;text-align:center;cursor:pointer;color:#75797e;background:#f1f3f4;border-radius:.15em;transition:all .15s;padding:.45em .5em;margin-top:.75em}.pcr-app .pcr-interaction input:hover{filter:brightness(.975)}.pcr-app .pcr-interaction input:focus{box-shadow:0 0 0 1px #ffffffd9,0 0 0 3px #4285f4bf}.pcr-app .pcr-interaction .pcr-result{color:#75797e;text-align:left;flex:1 1 8em;min-width:8em;transition:all .2s;border-radius:.15em;background:#f1f3f4;cursor:text}.pcr-app .pcr-interaction .pcr-result::-moz-selection,.pcr-app .pcr-interaction .pcr-result::selection{background:#4285f4;color:#fff}.pcr-app .pcr-interaction .pcr-type.active{color:#fff;background:#4285f4}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff;width:auto}.pcr-app .pcr-interaction .pcr-save,.pcr-app .pcr-interaction .pcr-cancel,.pcr-app .pcr-interaction .pcr-clear{color:#fff}.pcr-app .pcr-interaction .pcr-save:hover,.pcr-app .pcr-interaction .pcr-cancel:hover,.pcr-app .pcr-interaction .pcr-clear:hover{filter:brightness(.925)}.pcr-app .pcr-interaction .pcr-save{background:#4285f4}.pcr-app .pcr-interaction .pcr-clear,.pcr-app .pcr-interaction .pcr-cancel{background:#f44250}.pcr-app .pcr-interaction .pcr-clear:focus,.pcr-app .pcr-interaction .pcr-cancel:focus{box-shadow:0 0 0 1px #ffffffd9,0 0 0 3px #f44250bf}.pcr-app .pcr-selection .pcr-picker{position:absolute;height:18px;width:18px;border:2px solid #fff;border-radius:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pcr-app .pcr-selection .pcr-color-palette,.pcr-app .pcr-selection .pcr-color-chooser,.pcr-app .pcr-selection .pcr-color-opacity{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;display:flex;flex-direction:column;cursor:grab;cursor:-webkit-grab}.pcr-app .pcr-selection .pcr-color-palette:active,.pcr-app .pcr-selection .pcr-color-chooser:active,.pcr-app .pcr-selection .pcr-color-opacity:active{cursor:grabbing;cursor:-webkit-grabbing}.pcr-app[data-theme=nano]{width:14.25em;max-width:95vw}.pcr-app[data-theme=nano] .pcr-swatches{margin-top:.6em;padding:0 .6em}.pcr-app[data-theme=nano] .pcr-interaction{padding:0 .6em .6em}.pcr-app[data-theme=nano] .pcr-selection{display:grid;grid-gap:.6em;grid-template-columns:1fr 4fr;grid-template-rows:5fr auto auto;align-items:center;height:10.5em;width:100%;align-self:flex-start}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-preview{grid-area:2/1/4/1;height:100%;width:100%;display:flex;flex-direction:row;justify-content:center;margin-left:.6em}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-preview .pcr-last-color{display:none}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-preview .pcr-current-color{position:relative;background:var(--pcr-color);width:2em;height:2em;border-radius:50em;overflow:hidden}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-preview .pcr-current-color:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-palette{grid-area:1/1/2/3;width:100%;height:100%;z-index:1}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-palette .pcr-palette{border-radius:.15em;width:100%;height:100%}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-palette .pcr-palette:before{position:absolute;content:"";top:0;left:0;width:100%;height:100%;background:url('data:image/svg+xml;utf8, ');background-size:.5em;border-radius:.15em;z-index:-1}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser{grid-area:2/2/2/2}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity{grid-area:3/2/3/2}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser,.pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity{height:.5em;margin:0 .6em}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser .pcr-picker,.pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity .pcr-picker{top:50%;transform:translateY(-50%)}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser .pcr-slider,.pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity .pcr-slider{flex-grow:1;border-radius:50em}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-chooser .pcr-slider{background:linear-gradient(to right,hsl(0,100%,50%),hsl(60,100%,50%),hsl(120,100%,50%),hsl(180,100%,50%),hsl(240,100%,50%),hsl(300,100%,50%),hsl(0,100%,50%))}.pcr-app[data-theme=nano] .pcr-selection .pcr-color-opacity .pcr-slider{background:linear-gradient(to right,transparent,black),url('data:image/svg+xml;utf8, ');background-size:100%,.25em}.ce-floating-toolbar{display:flex;position:absolute;z-index:9;align-items:center;height:36px;background:#ffffff;transition:all .3s ease-in-out;box-shadow:0 2px 8px #44494d29;border-radius:4px;padding:0 8px}.ce-floating-toolbar.hide{display:none}.ce-floating-toolbar>div{min-width:20px;margin:0 3px;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:2px}.ce-floating-toolbar>div:hover,.ce-floating-toolbar>div.active{background-color:#19375812}.ce-floating-toolbar>div i{width:16px;height:16px;display:inline-block}.ce-floating-toolbar>div.ce-divider{padding:0;min-width:unset;width:1px;height:16px;margin:0 3px;display:inline-block;background-color:#cfd2d8}.ce-floating-toolbar>div.ce-ai-edit i{background:url(./ai-edit.8119651f.svg)}.ce-floating-toolbar>div.ce-size-add i{background:url(./size-add.5305a5f4.svg)}.ce-floating-toolbar>div.ce-size-minus i{background:url(./size-minus.98cd7296.svg)}.ce-floating-toolbar>div.ce-bold i{background:url(./bold.9b041cb0.svg)}.ce-floating-toolbar>div.ce-italic i{background:url(./italic.37e67191.svg)}.ce-floating-toolbar>div.ce-underline i{background:url(./underline.695d43bb.svg)}.ce-floating-toolbar>div.ce-strikeout i{background:url(./strikeout.333ad365.svg)}.ce-floating-toolbar>div.ce-picker{height:20px;display:flex;flex-direction:column}.ce-floating-toolbar>div.ce-picker>span{width:16px;height:3px;display:inline-block;border:1px solid #e2e6ed}.ce-floating-toolbar>div.ce-picker .ce-picker-container{position:relative}.ce-floating-toolbar>div.ce-picker .ce-picker-container .pcr-app{position:absolute!important}.ce-floating-toolbar>div.ce-color i{background:url(./color.e467364a.svg)}.ce-floating-toolbar>div.ce-highlight i{background:url(./highlight.8e896be3.svg)}.ai-hide{display:none!important}.ai-active{background-color:#19375812}.aie-container{position:absolute;top:40px;left:0;height:100%}.aie-container *,.aie-container :before,.aie-container :after{box-sizing:content-box}.aie-container .aie-ai-panel-body{width:350px;border:solid 1px;background:#ffffff;border-radius:5px;border-color:#eee;box-shadow:0 0 7px #00000026;display:flex;flex-direction:column;overflow:hidden}.aie-container .aie-ai-panel-body-tips{width:100%;padding:10px;color:#999;font-size:12px;background-color:#fafafa;box-sizing:border-box;display:flex;align-items:center}.aie-container .aie-ai-panel-body-tips svg{width:15px;height:15px;margin-right:5px}.aie-container .aie-ai-panel-body-content{width:100%;max-height:300px;position:relative}.aie-container .aie-ai-panel-body-content .loader{position:absolute;top:10px;right:10px}.aie-container .aie-ai-panel-body-content .loader svg{width:16px;color:#999;animation:rotate 2s linear infinite}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.aie-container .aie-ai-panel-body-content textarea{width:100%;min-height:130px;padding:15px;box-sizing:border-box;font-size:14px;line-height:1.6em;font-family:Arial,"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;border:none;resize:none}.aie-container .aie-ai-panel-body-content textarea:focus-visible{outline:none}.aie-container .aie-ai-panel-body-input{display:flex;justify-content:space-between;box-sizing:border-box;border-bottom:1px solid;border-bottom-color:#eee;align-items:center;padding:5px 10px 5px 5px}.aie-container .aie-ai-panel-body-input input{width:92%;height:90%;border:none;margin:0;background:#ffffff;font-size:12px;font-family:Arial,"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;background-color:#edf0f5;padding:10px;box-sizing:border-box;border-radius:4px}.aie-container .aie-ai-panel-body-input input::-webkit-input-placeholder{color:#ccc;font-size:12px}.aie-container .aie-ai-panel-body-input input:focus-visible{outline:none}.aie-container .aie-ai-panel-body-input button{border:none;border-radius:50%;width:25px;height:25px;padding:0;margin-left:5px;background:#609eec}.aie-container .aie-ai-panel-body-input button svg{fill:#fff;width:14px;margin-top:2px}.aie-container .aie-ai-panel-body-input button:hover{background:#ccc;cursor:pointer}.aie-container .aie-ai-panel-footer{width:fit-content;border:solid 1px;border-color:#eee;background:#ffffff;border-radius:5px;box-shadow:0 0 7px #00000026;display:flex;padding:10px 0;flex-direction:column;margin-top:5px}.aie-container .aie-ai-panel-footer-tips{padding:5px 10px;color:#999;font-size:12px;margin-bottom:5px}.aie-container .aie-ai-panel-footer hr{height:1px;width:100%;margin:5px 0;background-color:#eaeaea;border:none}.aie-container .aie-ai-panel-footer p{width:100%;margin:0}.aie-container .aie-ai-panel-footer p{cursor:pointer;display:flex;align-items:center;width:100%;box-sizing:border-box;height:25px;line-height:25px;font-weight:600;font-size:12px;padding:0 20px;color:#666;text-decoration:none;font-family:Arial,"Helvetica Neue",Helvetica,"PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif}.aie-container .aie-ai-panel-footer p:hover{background:#e3e2e2}.aie-container .aie-ai-panel-footer svg{width:16px;height:16px;margin-right:10px} diff --git a/frontend/public/docx/assets/justify.b2efed4b.svg b/frontend/public/docx/assets/justify.b2efed4b.svg new file mode 100644 index 0000000..e522de5 --- /dev/null +++ b/frontend/public/docx/assets/justify.b2efed4b.svg @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/frontend/public/docx/assets/loader.d32cdde3.svg b/frontend/public/docx/assets/loader.d32cdde3.svg new file mode 100644 index 0000000..11a5877 --- /dev/null +++ b/frontend/public/docx/assets/loader.d32cdde3.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/docx/assets/outline.e20214df.svg b/frontend/public/docx/assets/outline.e20214df.svg new file mode 100644 index 0000000..c537630 --- /dev/null +++ b/frontend/public/docx/assets/outline.e20214df.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/frontend/public/docx/assets/radio.37698364.svg b/frontend/public/docx/assets/radio.37698364.svg new file mode 100644 index 0000000..ecc25ed --- /dev/null +++ b/frontend/public/docx/assets/radio.37698364.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/frontend/public/docx/index.html b/frontend/public/docx/index.html index 935cbb5..e0b50ac 100644 --- a/frontend/public/docx/index.html +++ b/frontend/public/docx/index.html @@ -6,9 +6,9 @@ word - + - + @@ -337,10 +337,59 @@ + +
diff --git a/frontend/src/system/applist.ts b/frontend/src/system/applist.ts index 26b8cb2..a5839be 100644 --- a/frontend/src/system/applist.ts +++ b/frontend/src/system/applist.ts @@ -80,8 +80,8 @@ export const appList = [ { name: "document", appIcon: "word", - //url: "/docx/index.html", - url:"http://localhost:3000/", + url: "/docx/index.html", + //url:"http://localhost:3000/", width: 800, frame: true, height: 600, diff --git a/godo/files/fs.go b/godo/files/fs.go index 0607876..e3875ce 100644 --- a/godo/files/fs.go +++ b/godo/files/fs.go @@ -126,6 +126,7 @@ func HandleStat(w http.ResponseWriter, r *http.Request) { libs.HTTPError(w, http.StatusNotFound, err.Error()) return } + // fmt.Printf("basePath: %+s", basePath) if osFileInfo.IsFile { // 是否为加密文件 file, err := os.Open(filepath.Join(basePath, path)) diff --git a/godo/sys/setting.go b/godo/sys/setting.go index 084a771..f1acaa8 100644 --- a/godo/sys/setting.go +++ b/godo/sys/setting.go @@ -56,6 +56,7 @@ func ConfigHandler(w http.ResponseWriter, r *http.Request) { libs.ErrorMsg(w, "The InitOsSystem is error:"+err.Error()) return } + } } else if req.Name == "aiDir" { aiPath := req.Value.(string) @@ -83,6 +84,11 @@ func ConfigHandler(w http.ResponseWriter, r *http.Request) { libs.SetConfig(req) } } + err = libs.LoadConfig() + if err != nil { + libs.ErrorMsg(w, "The LoadConfig is error:"+err.Error()) + return + } libs.SuccessMsg(w, "success", "The config set success!") }