@umoteam/editor 2.3.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -14
- package/README.zh-CN.md +4 -13
- package/dist/style.css +1 -0
- package/dist/umo-editor.mjs +46464 -0
- package/package.json +54 -45
- package/dist/es/style.css +0 -1
- package/dist/es/umo-editor.mjs +0 -40968
- package/dist/umd/style.css +0 -1
- package/dist/umd/umo-editor.js +0 -8
- package/dist/umd/umo-editor.js.gz +0 -0
package/dist/umd/umo-editor.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @umoteam/editor 2.3.1
|
|
3
|
-
* @license MIT
|
|
4
|
-
* @author umodoc https://umodoc.com
|
|
5
|
-
* @see https://editor.umodoc.com/en/docs
|
|
6
|
-
**/
|
|
7
|
-
|
|
8
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("katex"),require("mermaid"),require("@imgly/background-removal"),require("jsbarcode"),require("qrcode-svg"),require("plyr")):"function"==typeof define&&define.amd?define(["exports","vue","katex","mermaid","@imgly/background-removal","jsbarcode","qrcode-svg","plyr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UmoEditor={},e.Vue,e.katex,e.mermaid,e.imglyRemoveBackground,e.JsBarcode,e.QRCode,e.Plyr)}(this,(function(e,t,n,r,o,a,i,l){"use strict";var s,c,u=Object.defineProperty,d=e=>{throw TypeError(e)},p=(e,t,n)=>((e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n)(e,"symbol"!=typeof t?t+"":t,n),f=(e,t,n)=>(((e,t,n)=>{t.has(e)||d("Cannot "+n)})(e,t,"read from private field"),n?n.call(e):t.get(e)),h=(e,t,n)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);if("undefined"!=typeof window){let e=function(){var e=document.body,t=document.getElementById("__svg__icons__dom__");t||((t=document.createElementNS("http://www.w3.org/2000/svg","svg")).style.position="absolute",t.style.width="0",t.style.height="0",t.id="__svg__icons__dom__",t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),t.innerHTML='<symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-center"><path d="M1.75 2.25h12.504M4.754 8h6.496m-9.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-distributed"><path d="M1.75 9.834h12.504M1.75 13.75h12.504m0-9.5-2-2m2 2-2 2m2-2H1.8m2-2-2 2m0 0 2 2" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-justify"><path d="M1.75 2.25h12.504M1.75 8h12.504M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-left"><path d="M1.75 2.25h12.504M1.75 8h6.496M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-align-right"><path d="M1.75 2.25h12.504M7.754 8h6.496m-12.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-arrow-down"><path d="M36 18 24 30 12 18" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-audio"><rect x="16" y="4" width="16" height="28" rx="8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M10 21v3c0 7.732 6.268 14 14 14s14-6.268 14-14v-3M24 5v6m-8 5h5m6 0h5m-16 6h5m6 0h5" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 38v6" stroke="currentColor" stroke-width="3" /><path d="M16 44h16" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-auto-width"><path d="M6 7h36M8 24h32" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M13.99 30 8 24.005 14 18m20.01 0L40 23.995 34 30" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M6 41h36" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-background-color"><g stroke="currentColor" stroke-width="2" fill="none" fill-rule="evenodd"><rect x=".5" y=".5" width="23" height="23" rx="3" /><path stroke-linecap="round" stroke-linejoin="round" d="m12.167 5-7.5 14m3-4.384h9M12.167 5l7.5 14" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-barcode"><path d="M16 6H8a2 2 0 0 0-2 2v8m10 26H8a2 2 0 0 1-2-2v-8m26 10h8a2 2 0 0 0 2-2v-8M32 6h8a2 2 0 0 1 2 2v8m-18 0v16m8-16v16M16 16v16" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-block-add"><path d="m24.06 10-.036 28M10 24h28" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-block-menu"><path fill-rule="evenodd" clip-rule="evenodd" d="M19 10a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm-4 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm22-32a4 4 0 1 1-8 0 4 4 0 0 1 8 0zm-4 18a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8z" fill="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-bold"><path d="M3.25 7.75h5.5a3 3 0 1 0 0-6h-4a1.5 1.5 0 0 0-1.5 1.5v4.5zm0 0H9.5a3.25 3.25 0 0 1 0 6.5H4.75a1.5 1.5 0 0 1-1.5-1.5v-5z" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-break-marks"><path d="M6 4v40M42 4v40M18 26l-4 4 4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M15 30h13a6 6 0 0 0 0-12H14" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-bullet-list-2"><path d="M9 42a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0-28a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 14a4 4 0 1 0 0-8 4 4 0 0 0 0 8z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M21 24h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-circle"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4zm0-10a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0 1a2 2 0 1 0 0 4 2 2 0 0 0 0-4z" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-disc"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11 27a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6zm0-9a3 3 0 1 1 0 6 3 3 0 0 1 0-6z" /></symbol><symbol viewBox="0 0 44 44" id="icon-bullet-list-square"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-bullet-list"><path d="M5.734 7.747h8.5m-8.5 5.5h8.5M5.734 2.25h8.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M2.25 3.5a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5zM3.5 7.748a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0zm-1.25 6.748a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5z" fill="var(--umo-primary-color)" fill-rule="evenodd" clip-rule="evenodd" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-chinese-case"><path d="M38 10 10 38M6 6l6 8 6-8M5 14h14M5 20h14m-7-6v12m20.846 0H42v16H22v-5.85" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-clear-cache"><path d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M33.542 27c-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7v6m19.084-18v6c-1.274-4.057-5.064-7-9.542-7-4.477 0-8.268 2.943-9.542 7" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-clear-format"><g stroke="currentColor"><path d="m13.83 6.061-3.37-3.37a1.5 1.5 0 0 0-2.121 0L2.223 8.807a1.5 1.5 0 0 0 0 2.122l3.322 3.322h2.218l6.068-6.068a1.5 1.5 0 0 0 0-2.122zm-9.908.569 6.081 6.081" vector-effect="non-scaling-stroke" /><path d="M6 14.25h8.25" stroke-linecap="round" vector-effect="non-scaling-stroke" /></g></symbol><symbol fill="none" viewBox="0 0 24 24" id="icon-close"><path fill="currentColor" d="M7.05 5.64 12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-block"><path d="M23 40H7a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v14.882" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><path d="m34 33-4 4 4 4m6-8 4 4-4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-line-number"><path d="M9 4v9m3 0H6m6 14H6m0-7s3-3 5 0-5 7-5 7m0 7.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1m5-3.5H9M9 4 6 6m15 18h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code-word-wrap"><path d="M6 9h36M6 19h36M6 29h18M6 39h10m8 0h13a5 5 0 0 0 0-10h-5m-8 10 4-4m-4 4 4 4" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-code"><path d="M16 13 4 25.432 16 37m16-24 12 12.432L32 37" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m28 4-7 40" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-color"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M12.5 2.5 4 21.5m3.4-6.045h10.2M12.5 2.5l8.5 19" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-copy"><path d="M13 38h28V16H30V4H13v34zM30 4l11 12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M7 20v24h21" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M19 20h4m-4 8h12" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-date"><path stroke="currentColor" stroke-width="3" stroke-linejoin="round" d="M4 8h40v36H4z" /><path clip-rule="evenodd" d="M28 20v14h8V20h-8z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M17 4v8m14-8v8m-19 8h8v14h-8m8-7h-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-diagrams"><path d="M40.99 8.027H12.182C9.455 8.027 4 9.55 4 15.967 4 22.384 9.455 24 12.182 24h23.812C38.72 24 44 25.568 44 31.985c0 6.416-5.279 8.018-8.006 8.018H6.065" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m8.046 35.993-3.979 4.066L8.046 44M38.043 3.954 42.02 8.02l-3.978 3.941" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-download"><path d="M6 24.008V42h36V24" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m33 23-9 9-9-9m8.992-17v26" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-edit"><path d="M5.325 43.5h8.485l31.113-31.113-8.486-8.485L5.325 35.015V43.5z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="m27.952 12.387 8.485 8.485" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-embed"><rect x="4" y="8" width="40" height="32" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-emoji"><path d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M31 18v1m-14-1v1m14 12s-2 4-7 4-7-4-7-4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-equal-proportion"><path d="M42 7H6a2 2 0 0 0-2 2v30a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" /><path d="M12 20.58 16 18v12m15-9.42L35 18v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 20v1m0 6v1" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-exit"><path d="M23.992 6H6v36h18m9-9 9-9-9-9m-17 8.992h26" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-expand-down"><path d="M6 9h36M6 19h36M6 26l18 14 18-14" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-file"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2ZM30 4l10 10M24 21v14M17 28h14" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-font-size-decrease"><path d="m2 13.5 1.422-3.412m0 0 3.301-7.923a.3.3 0 0 1 .554 0l3.301 7.923m-7.156 0h7.156m0 0L12 13.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M11.043 2.75h3.173" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-font-size-increase"><path d="m2 13.5 1.422-3.412m0 0 3.301-7.923a.3.3 0 0 1 .554 0l3.301 7.923m-7.156 0h7.156m0 0L12 13.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M11 2.75h3.476M12.75 4.549V1" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-format-paint"><path d="M6.543 3.961s-1.03 1.203-2.494 1.892c-1.006.473-2.181.585-2.734.626-.2.015-.344.21-.277.398.293.82 1.112 2.801 2.658 4.347 2.126 2.126 3.659 2.968 4.142 3.202.1.048.215.03.299-.04.385-.326 1.5-1.278 2.21-1.987.891-.89 2.186-2.447 2.186-2.447m.48.055a.3.3 0 0 1-.425 0L6.325 3.743a.3.3 0 0 1 0-.424l.68-.68a1.5 1.5 0 0 1 2.121 0l1.357 1.356 1.604-2.02a1.629 1.629 0 1 1 2.279 2.295L12.34 5.853l1.353 1.352a1.5 1.5 0 0 1 0 2.121l-.68.68z" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-format"><path stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M8 24h32v18H8zM4 13h14V6h12v7h14v11H4V13Z" /><path d="M16 32v10" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-full-screen-exit"><path d="M33 6v9h9M15 6v9H6M15 42v-9H6M33 42v-9h8.9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-full-screen"><path d="M33 6h9v9M42 33v9h-9M15 42H6v-9M6 15V6h9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-hard-break"><path d="M6 9h36M6 19h36M6 29h18M6 39h10m8 0h13a5 5 0 0 0 0-10h-5m-8 10 4-4m-4 4 4 4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-heading"><path d="M12 5v38M36 5v38M12 24h24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-help"><path d="M24 44a19.937 19.937 0 0 0 14.142-5.858A19.937 19.937 0 0 0 44 24a19.938 19.938 0 0 0-5.858-14.142A19.937 19.937 0 0 0 24 4 19.938 19.938 0 0 0 9.858 9.858 19.938 19.938 0 0 0 4 24a19.937 19.937 0 0 0 5.858 14.142A19.938 19.938 0 0 0 24 44z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M24 28.625v-4a6 6 0 1 0-6-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path fill-rule="evenodd" clip-rule="evenodd" d="M24 37.625a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-hide-toolbar"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="2" stroke-linejoin="round" /><path d="M6 16h36M20 32l4-4 4 4M6 10v12M42 10v12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-highlight"><path d="M6 44V25h6v-8h24v8h6v19H6z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M17 17V8l14-4v13" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-home-page"><path clip-rule="evenodd" d="M24 44c11.046 0 20-8.954 20-20S35.046 4 24 4 4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 24h40" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path clip-rule="evenodd" d="M24 44c4.418 0 8-8.954 8-20S28.418 4 24 4s-8 8.954-8 20 3.582 20 8 20z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M9.858 10.142A19.937 19.937 0 0 0 24 16a19.937 19.937 0 0 0 14.142-5.858m0 27.716A19.937 19.937 0 0 0 24 32a19.937 19.937 0 0 0-14.142 5.858" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-hr"><path d="M5 24h38M21 38h6m10 0h6M21 10h6M5 38h6M5 10h6m26 0h6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-html5"><path d="M37.804 5H10.196a2 2 0 0 0-1.991 2.187l2.688 28.666a2 2 0 0 0 1.153 1.63l11.116 5.13a2 2 0 0 0 1.676 0l11.116-5.13a2 2 0 0 0 1.154-1.63l2.687-28.666A2 2 0 0 0 37.804 5z" stroke="currentColor" stroke-width="3" /><path d="M32 12H16l1 9h14l-1 11-6 3-6-3-.5-5" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-download"><path d="M44 24a2 2 0 1 0-4 0h4zM24 8a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zM8 39V9H4v30h4zm32-15v15h4V24h-4zM9 8h15V4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zM8 9a1 1 0 0 1 1-1V4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M32 13l5 5 5-5m-5-7v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-draggable"><path d="M9.583 27.182C7.867 28.354 7.009 30.293 7.009 33c0 4.06 4.991 11 9.492 11h11.515c4.405 0 7.08-3.85 7.08-6.94V24.6a3.253 3.253 0 0 0-3.243-3.253 3.235 3.235 0 0 0-3.245 3.226v.11" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M10.981 29.445V7.662a3.217 3.217 0 0 1 6.435 0v15.986" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M17.416 24v-4.192a2.804 2.804 0 0 1 5.608 0v4.62" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M23 24.658v-2.85a2.804 2.804 0 0 1 5.608 0v3.195" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M11 8h30" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="m36 12.5 1.667-1.5L41 8l-3.333-3L36 3.5" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 1024 1024" id="icon-image-failed"><path d="M480 164.571 580.571 376.87 461.824 512l158.5 193.06-79.25 154.369H73.143V164.57z" opacity=".12" /><path d="m566.857 164.571 99.109 212.444-118.547 134.948 159.16 193.354-79.58 154.112h323.858V164.57z" fill-opacity=".12" /><path d="M182.894 749.714v-85.357L315.209 525.75l157.312 132.206 56.759-63.744 90.917 110.884-22.803 44.617zm658.249 0H683.575l22.985-44.47-132.681-161.207 93.257-105.18 174.062 215.845z" fill-opacity=".12" /><path d="M256 347.429a73.143 73.143 0 1 0 146.286 0 73.143 73.143 0 1 0-146.286 0z" opacity=".12" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-flip"><path d="M24 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m4 34 12-22v22H4zm40 0H32V12l12 22z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-preview"><path d="M44 24a2 2 0 1 0-4 0h4zM24 8a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zM8 39V9H4v30h4zm32-15v15h4V24h-4zM9 8h15V4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zM8 9a1 1 0 0 1 1-1V4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M30 12h12m-6-6v12" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-remove-background"><path d="M44 23.994a2 2 0 0 0-4 0h4zm-20-16a2 2 0 1 0 0-4v4zm15 32H9v4h30v-4zm-31-1v-30H4v30h4zm32-15v15h4v-15h-4zm-31-16h15v-4H9v4zm0 32a1 1 0 0 1-1-1H4a5 5 0 0 0 5 5v-4zm30 4a5 5 0 0 0 5-5h-4a1 1 0 0 1-1 1v4zm-31-35a1 1 0 0 1 1-1v-4a5 5 0 0 0-5 5h4z" fill="currentColor" /><path d="m6 35 10.693-9.802a2 2 0 0 1 2.653-.044L32 36m-4-5 4.773-4.773a2 2 0 0 1 2.615-.186L42 31M33 7l8 8m0-8-8 8" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-reset"><path d="M11.272 36.728A17.943 17.943 0 0 0 24 42c9.941 0 18-8.059 18-18S33.941 6 24 6c-4.97 0-9.47 2.015-12.728 5.272C9.614 12.93 6 17 6 17" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="M6 9v8h8" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image-rotate"><path d="M12 24h30v18H12V24z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M6 8v9h9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M38.475 13.299C35.195 8.87 29.933 6 24 6c-5.821 0-10.997 2.763-14.287 7.05L6 17" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-image"><path clip-rule="evenodd" d="M5 10a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V10z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path clip-rule="evenodd" d="M14.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m15 24 5 4 6-7 17 13v4a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-4l10-10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-indent"><path d="M1.75 2.25h12.504M1.75 8h7.496M1.75 13.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="m12.25 6 1.993 1.993a.01.01 0 0 1 0 .014L12.25 10" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-italic"><path d="M7.75 1.75h5.5M10.5 2l-5 12m-2.75.25h5.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-laser-pointer"><g clip-path="url(#icon-laser-pointer_a)"><rect x="35.193" y="5.322" width="12" height="38" rx="6" transform="rotate(45 35.193 5.322)" stroke="currentColor" stroke-width="3" /><path d="m18 23 8 8M6 43l6-6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><rect x="33.268" y="12.34" width="4" height="4" rx="2" transform="rotate(30 33.268 12.34)" fill="currentColor" /></g><defs><clipPath id="icon-laser-pointer_a"><path fill="currentColor" d="M0 0h48v48H0z" /></clipPath></defs></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-line-height"><path d="m1.75 3.806 2-2.056 2 2.056m-2 10.144-2-2.056m2 2.056 2-2.056m-2 2.056.012-12.187" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /><path d="M8.754 13.75h5.5m-5.5-4h5.5m-5.5-4h5.5m-5.504-4h5.504" vector-effect="non-scaling-stroke" stroke="currentColor" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-line-number"><path d="M9 4v9m3 0H6m6 14H6m0-7s3-3 5 0-5 7-5 7m0 7.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1m5-3.5H9M9 4 6 6m15 18h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-link"><path d="m26.24 16.373-9.14-9.14c-2.661-2.661-7.035-2.603-9.768.131-2.734 2.734-2.793 7.107-.131 9.768l7.935 7.936m17.767-2.065 7.935 7.935c2.661 2.662 2.603 7.035-.13 9.769-2.735 2.734-7.108 2.792-9.77.13l-9.14-9.14m4.312-5.555c2.733-2.734 2.792-7.108.13-9.769m-4.441 5.425c-2.734 2.734-2.792 7.108-.131 9.769" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-loading"><path d="M4 24c0 11.046 8.954 20 20 20s20-8.954 20-20S35.046 4 24 4" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 1024 1024" id="icon-markdown"><path stroke="currentColor" d="M896 192a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64h768zm-768-64A128 128 0 0 0 0 256v512a128 128 0 0 0 128 128h768a128 128 0 0 0 128-128V256a128 128 0 0 0-128-128H128z" data-spm-anchor-id="a313x.search_index.0.i1.3d203a817x9KY2" /><path stroke="currentColor" d="M585.344 521.344a32 32 0 0 1 45.312 0L736 626.752l105.344-105.408a32.064 32.064 0 0 1 45.312 45.312l-128 128a31.872 31.872 0 0 1-45.312 0l-128-128a32 32 0 0 1 0-45.312z" /><path stroke="currentColor" d="M736 320a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V352a32 32 0 0 1 32-32zM227.84 704V448.64h3.584l91.392 207.296h49.536l90.88-207.36h3.584V704h68.672V320.064h-76.8L349.248 569.28h-2.496l-109.44-249.216H160V704h67.84z" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-math"><path d="m40 9-3-3H8l18 18L8 42h29l3-3" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-menu"><path d="M7.95 11.95h32m-32 12h32m-32 12h32" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-mermaid"><path d="M41 14 24 4 7 14v20l17 10 17-10V14z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M16 18.998 23.993 24l8.002-5.002M24 24v9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-message"><path d="M43 5 29.7 43l-7.6-17.1L5 18.3 43 5z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M43 5 22.1 25.9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-mind-map"><path d="M8 28a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM42 8a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 18a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M32 6H20v36h12M12 24h20" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-minus"><path d="M10.5 24h28" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-node-add"><path d="M24 30v-6M6 30h36v12H6V30zm0-17.5v-1M6 18v-1M6 7V6m36 6.5v-1m0 6.5v-1m0-10V6m0 12h-1M7 18H6M7 6H6m8 0h-1m8 0h-1m1 12h-1m8-12h-1M14 18h-1m15 0h-1m8-12h-1m1 12h-1m8-12h-1" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-node-delete-2"><path d="M9 10v34h30V10H9z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M20 20v13m8-13v13M4 10h40" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m16 10 3.289-6h9.488L32 10H16z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-node-delete"><path d="M9 10v34h30V10H9z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M20 20v13m8-13v13M4 10h40" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m16 10 3.289-6h9.488L32 10H16z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-ordered-list-2"><path d="M9 4v9m3 0H6m6 14H6m0-7s3-3 5 0-5 7-5 7m0 7.5s2-3 5-1 0 4.5 0 4.5 3 2.5 0 4.5-5-1-5-1m5-3.5H9M9 4 6 6m15 18h22M21 38h22M21 10h22" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-decimal-leading-zero"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M5.714 15.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm6.078.914V8.531H10.79c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.344 0v-1.235h-1.235V15h1.235zm-9.422 9.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm7.088.914v-1.147H10.35c.065-.111.149-.226.253-.343.104-.117.35-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.493-.824.104-.263.156-.539.156-.829 0-.51-.181-.936-.544-1.279-.364-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.152-.155.357-.233.615-.233.261 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.467.536-1.024 1.055-.691.641-1.154 1.156-1.388 1.544-.235.389-.375.8-.422 1.233h4.328zm2.334 0v-1.235h-1.235V24h1.235zM5.714 34.11c.624 0 1.11-.22 1.46-.66.421-.533.632-1.408.632-2.627 0-1.222-.21-2.096-.629-2.624-.351-.445-.839-.668-1.463-.668-.624 0-1.11.22-1.459.66-.422.533-.633 1.406-.633 2.619 0 1.236.192 2.095.576 2.577.384.482.89.723 1.516.723zm0-1.024a.614.614 0 0 1-.398-.14c-.115-.094-.211-.283-.287-.565-.077-.283-.115-.802-.115-1.558s.043-1.294.128-1.613c.064-.246.155-.417.272-.512a.617.617 0 0 1 .4-.143.61.61 0 0 1 .398.143c.116.095.211.284.288.567.076.283.114.802.114 1.558s-.043 1.292-.128 1.608c-.064.246-.155.417-.272.512a.617.617 0 0 1-.4.143zm4.992 1.024c.616 0 1.13-.2 1.543-.598.413-.398.62-.88.62-1.446 0-.39-.111-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.618-.337.927-.788.927-1.353 0-.399-.15-.756-.452-1.073-.366-.386-.853-.58-1.46-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.667.55c-.16.232-.28.544-.359.933l1.139.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.214 0 .386.065.515.194s.193.302.193.518c0 .255-.088.46-.264.613-.175.154-.43.227-.764.218l-.136 1.006c.22-.061.408-.092.566-.092.24 0 .444.09.611.272.167.182.25.428.25.739 0 .328-.086.589-.26.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.308-.698l-1.195.145c.062.542.284.98.668 1.316.384.335.867.503 1.45.503zm4.43-.11v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-decimal"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M10.29 15V8.531H9.286c-.14.393-.4.736-.778 1.03-.378.295-.728.495-1.05.6v1.121a4.257 4.257 0 0 0 1.595-.936V15h1.235zm3.343 0v-1.235h-1.235V15h1.235zM11.3 24v-1.147H8.848c.064-.111.148-.226.252-.343.104-.117.351-.354.74-.712.39-.357.66-.631.81-.821.225-.288.39-.562.494-.824.104-.263.156-.539.156-.829 0-.51-.182-.936-.545-1.279-.363-.342-.863-.514-1.499-.514-.58 0-1.063.148-1.45.444-.387.296-.617.784-.69 1.463l1.23.124c.024-.36.112-.619.264-.774.153-.155.358-.233.616-.233.26 0 .465.074.613.222.148.148.222.36.222.635 0 .25-.085.501-.255.756-.126.185-.468.536-1.024 1.055-.692.641-1.155 1.156-1.389 1.544-.234.389-.375.8-.422 1.233H11.3zm2.333 0v-1.235h-1.235V24h1.235zM9.204 34.11c.615 0 1.129-.2 1.542-.598.413-.398.62-.88.62-1.446 0-.39-.11-.722-.332-.997a1.5 1.5 0 0 0-.886-.532c.619-.337.928-.788.928-1.353 0-.399-.151-.756-.453-1.073-.366-.386-.852-.58-1.459-.58a2.25 2.25 0 0 0-.96.2 1.617 1.617 0 0 0-.668.55c-.16.232-.28.544-.358.933l1.138.194c.032-.282.123-.495.272-.642.15-.146.33-.22.54-.22.215 0 .386.065.515.194s.193.302.193.518c0 .255-.087.46-.263.613-.176.154-.43.227-.765.218l-.136 1.006c.22-.061.409-.092.567-.092.24 0 .444.09.61.272.168.182.251.428.251.739 0 .328-.087.589-.261.782a.833.833 0 0 1-.644.29.841.841 0 0 1-.607-.242c-.167-.16-.27-.394-.307-.698l-1.196.145c.062.542.285.98.668 1.316.384.335.868.503 1.45.503zm4.43-.11v-1.235h-1.236V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-lower-latin"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M9.62 14.105c.272 0 .528-.05.768-.153s.466-.257.677-.462c.009.024.023.072.044.145.047.161.086.283.119.365h1.221a2.649 2.649 0 0 1-.222-.626c-.04-.195-.059-.498-.059-.908l.013-1.441c0-.536-.055-.905-.165-1.105-.11-.201-.3-.367-.569-.497-.27-.13-.68-.195-1.23-.195-.607 0-1.064.108-1.371.325-.308.217-.525.55-.65 1.002l1.12.202c.076-.217.176-.369.299-.455.123-.086.294-.13.514-.13.325 0 .546.05.663.152.118.101.176.27.176.508v.123c-.222.093-.622.194-1.2.303-.427.082-.755.178-.982.288-.227.11-.403.268-.53.474a1.327 1.327 0 0 0-.188.706c0 .398.138.728.415.988.277.261.656.391 1.136.391zm.368-.87a.675.675 0 0 1-.492-.189.606.606 0 0 1-.193-.448c0-.176.08-.32.241-.435.106-.07.33-.142.673-.215a7.19 7.19 0 0 0 .751-.19v.247c0 .296-.016.496-.048.602a.773.773 0 0 1-.295.409 1.07 1.07 0 0 1-.637.22zm4.645.765v-1.235h-1.235V14h1.235zM10.2 25.105c.542 0 1.003-.215 1.382-.646.38-.43.57-1.044.57-1.84 0-.771-.187-1.362-.559-1.774a1.82 1.82 0 0 0-1.41-.617c-.522 0-.973.216-1.354.65v-2.32H7.594V25h1.147v-.686a1.9 1.9 0 0 0 .67.592c.26.133.523.2.79.2zm-.299-.975c-.354 0-.638-.164-.852-.492-.153-.232-.229-.59-.229-1.073 0-.468.098-.818.295-1.048a.93.93 0 0 1 .738-.345c.302 0 .55.118.743.354.193.236.29.62.29 1.154 0 .5-.096.868-.288 1.1-.192.233-.424.35-.697.35zm4.478.87v-1.235h-1.234V25h1.234zm-4.017 9.105c.6 0 1.08-.142 1.437-.426.357-.284.599-.704.725-1.261l-1.213-.207c-.061.326-.167.555-.316.688a.832.832 0 0 1-.576.2.916.916 0 0 1-.75-.343c-.185-.228-.278-.62-.278-1.173 0-.498.091-.853.274-1.066.183-.212.429-.318.736-.318.232 0 .42.061.565.184.145.123.238.306.28.55l1.216-.22c-.146-.501-.387-.874-.722-1.119-.336-.244-.788-.366-1.356-.366-.695 0-1.245.214-1.653.643-.407.43-.61 1.03-.61 1.8 0 .762.202 1.358.608 1.788.406.431.95.646 1.633.646zM14.633 34v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-lower-roman"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11.88 8.7V7.558h-1.234V8.7h1.234zm0 5.3V9.333h-1.234V14h1.234zm2.5 0v-1.235h-1.234V14h1.235zm-4.75 4.7v-1.142H8.395V18.7H9.63zm0 5.3v-4.667H8.395V24H9.63zm2.5-5.3v-1.142h-1.234V18.7h1.235zm0 5.3v-4.667h-1.234V24h1.235zm2.501 0v-1.235h-1.235V24h1.235zM7.38 28.7v-1.142H6.145V28.7H7.38zm0 5.3v-4.667H6.145V34H7.38zm2.5-5.3v-1.142H8.646V28.7H9.88zm0 5.3v-4.667H8.646V34H9.88zm2.5-5.3v-1.142h-1.234V28.7h1.235zm0 5.3v-4.667h-1.234V34h1.235zm2.501 0v-1.235h-1.235V34h1.235z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-simp-chinese-formal"><g fill="none" fill-rule="evenodd"><path d="M36 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" fill="#000" fill-rule="nonzero" /><path d="M0 0h44v44H0z" /><path d="M9.648 11.728v.624h4.704v-.624H9.648zm-.136.968v1.712h.816l.216.512H8.432v.696h7.128v-.696h-2.136l.248-.512h.816v-1.712H9.512zm1.872 2.224-.216-.512h1.624l-.248.512h-1.16zm2.28-1.136h-3.328v-.48h3.328v.48zM8.696 8.816v.672H11.6v.328H9.2v.64h5.712v-.64H12.4v-.328h2.928v-.672H12.4v-.4h-.8v.4H8.696zm6.712 1.936H8.584v1.28h.768v-.624h5.288v.624h.768v-1.28zM8.36 18.16v.752h4.624c.032 1.232.128 2.312.272 3.232.264 1.728.712 2.608 1.344 2.64.48 0 .848-.624 1.112-1.856l-.696-.392c-.168.856-.304 1.288-.416 1.288-.128-.008-.288-.44-.48-1.288-.184-.912-.296-2.12-.336-3.624h1.808v-.752h-.44a4.676 4.676 0 0 0-.392-.776l-.72.264c.12.16.232.328.328.512h-.6c-.008-.248-.008-.504-.008-.776h-.8c0 .256 0 .512.008.776H8.36zm.72 1.032v.608h3.256v-.608H9.08zm-.448.888v.624h4.128v-.624H8.632zm3.936.936H8.832v2.424h.824v-1.784h2.088v1.72h.824v-2.36zm-1.264 2.336-.472.584c.64.288 1.16.608 1.576.96l.544-.656a9.288 9.288 0 0 0-1.648-.888zm-1.016-1.408v.464c-.032.456-.168.824-.424 1.112-.256.256-.744.48-1.48.656l.44.696c.784-.2 1.344-.488 1.696-.856.368-.4.568-.936.6-1.608v-.464h-.832zm-.128 8.736v.384h3.688v-.44a7.26 7.26 0 0 0 1.536.824l.352-.736c-.896-.28-1.576-.656-2.04-1.12h1.792v-.752h-3.576c.096-.176.176-.36.24-.552.592-.032 1.16-.056 1.712-.088.168.176.32.344.456.512l.688-.48c-.4-.448-.968-.968-1.704-1.576l-.632.4c.192.168.376.336.552.504-.824.04-1.664.072-2.528.104.432-.288.864-.624 1.288-1.008l-.8-.272c-.832.832-1.472 1.264-1.912 1.312l.136.68c.648-.016 1.272-.04 1.88-.056-.072.176-.16.352-.264.52H8.512v.752h1.872c-.52.464-1.232.84-2.128 1.12l.376.744a8.521 8.521 0 0 0 1.528-.776zm1.256-1.088H12.8c.192.264.424.512.696.752h-2.864c.296-.232.56-.48.784-.752zm-1.68 1.96v.728h4.52v-.728h-4.52zM8.848 32.8v.768h6.296V32.8H8.848z" fill="#000" fill-rule="nonzero" /></g></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-trad-chinese-informal"><g fill="none" fill-rule="evenodd"><path d="M36 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H19a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" fill="#000" fill-rule="nonzero" /><path d="M15.416 12.416H8.584v-.88h6.832zm-.296 6.992H8.864v-.888h6.256v.888zm.448 4.704H8.432v-.888h7.136v.888zm-.384 3.944h-6.4v-.848h6.4v.848zm.384 5.584H8.416v-.84h7.152v.84zm-.72-2.912H9.192v-.848h5.656v.848z" fill="#000" fill-rule="nonzero" /><path d="M0 0h44v44H0z" /></g></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-upper-latin"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="m7.88 15 .532-1.463h2.575L11.549 15h1.415l-2.58-6.442H9.01L6.5 15h1.38zm2.69-2.549H8.811l.87-2.39.887 2.39zM14.88 15v-1.235h-1.234V15h1.234zM9.352 25c.83-.006 1.352-.02 1.569-.044.346-.038.636-.14.872-.305.236-.166.422-.387.558-.664.137-.277.205-.562.205-.855 0-.372-.106-.695-.317-.97-.21-.276-.512-.471-.905-.585a1.51 1.51 0 0 0 .661-.567 1.5 1.5 0 0 0 .244-.83c0-.28-.066-.53-.197-.754a1.654 1.654 0 0 0-.495-.539 1.676 1.676 0 0 0-.672-.266c-.25-.042-.63-.063-1.14-.063H7.158V25h2.193zm.142-3.88H8.46v-1.49h.747c.612 0 .983.007 1.112.022.217.026.38.102.49.226.11.125.165.287.165.486a.68.68 0 0 1-.192.503.86.86 0 0 1-.525.23 11.47 11.47 0 0 1-.944.023h.18zm.17 2.795H8.46v-1.723h1.05c.592 0 .977.03 1.154.092.177.062.313.16.406.295a.84.84 0 0 1 .14.492c0 .228-.06.41-.181.547a.806.806 0 0 1-.473.257c-.126.026-.423.04-.892.04zM14.88 25v-1.235h-1.234V25h1.234zm-5.018 9.11c.691 0 1.262-.17 1.711-.512.45-.341.772-.864.965-1.567l-1.261-.4c-.109.472-.287.818-.536 1.037-.25.22-.547.33-.892.33-.47 0-.85-.173-1.143-.519-.293-.345-.44-.925-.44-1.74 0-.767.15-1.322.447-1.665.297-.343.684-.514 1.162-.514.346 0 .64.096.881.29.242.193.4.457.477.79l1.288-.307c-.147-.516-.367-.911-.66-1.187-.492-.465-1.132-.698-1.92-.698-.902 0-1.63.296-2.184.89-.554.593-.83 1.426-.83 2.498 0 1.014.275 1.813.825 2.397.551.585 1.254.877 2.11.877zM14.88 34v-1.235h-1.234V34h1.234z" /></symbol><symbol viewBox="0 0 44 44" id="icon-ordered-list-upper-roman"><path d="M35 29a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17zm0-9a1 1 0 0 1 1 1v1a1 1 0 0 1-1 1H18a1 1 0 0 1-1-1v-1a1 1 0 0 1 1-1h17z" fill-opacity=".163" /><path d="M11.916 15V8.558h-1.301V15h1.3zm2.465 0v-1.235h-1.235V15h1.235zM9.665 25v-6.442h-1.3V25h1.3zm2.5 0v-6.442h-1.3V25h1.3zm2.466 0v-1.235h-1.235V25h1.235zm-7.216 9v-6.442h-1.3V34h1.3zm2.5 0v-6.442h-1.3V34h1.3zm2.501 0v-6.442h-1.3V34h1.3zm2.465 0v-1.235h-1.235V34h1.235z" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-ordered-list"><path d="M7.734 7.747h6.5m-6.5 5.5h6.5M7.734 2.25h6.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M2.75 6.113V2.127l-.817.802a.546.546 0 0 1-.778-.011.56.56 0 0 1 .012-.786L2.407.914C2.948.384 3.85.77 3.85 1.53v4.583a.553.553 0 0 1-.55.556.553.553 0 0 1-.55-.556zm-.267 2.879c.409-.322.904-.322 1.312 0 .383.301.493.87.204 1.277a4.4 4.4 0 0 1-.23.29c-.197.23-.456.508-.744.803a56.575 56.575 0 0 1-1.709 1.66c-.557.521-.181 1.447.588 1.447H4.64c.304 0 .55-.242.55-.54a.545.545 0 0 0-.55-.542H2.517a49.34 49.34 0 0 0 1.3-1.275c.297-.303.575-.6.795-.858.109-.128.208-.252.289-.366.075-.105.157-.233.205-.363.318-.857.158-1.761-.623-2.377a2.125 2.125 0 0 0-2.688 0c-.594.469-.692 1.098-.706 1.484a.545.545 0 0 0 .53.56.546.546 0 0 0 .569-.521c.01-.26.068-.5.295-.68z" fill="var(--umo-primary-color)" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-outdent"><path d="M1.75 2.25h12.504M6.754 8h7.496m-12.5 5.75h12.504" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /><path d="M3.75 6 1.757 7.993a.01.01 0 0 0 0 .014L3.75 10" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="var(--umo-primary-color)" /></symbol><symbol viewBox="0 0 24 24" id="icon-page-background"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-page-break"><path d="M8 6v6h32V6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M14 24h20" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M8 42v-6h32v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-page-footer"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.5 18.5h17" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-header"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="3.5" stroke-width="1.5" y="1.5" width="17" height="21" rx="1" /><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M3.5 5.5h17" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-margin"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="3.5" y="1.5" stroke-width="1.5" width="17" height="21" rx="1" /><path d="M3.5 4.5h17m-14 18v-21m11 21v-21m-14 18h17" stroke="currentColor" opacity=".3" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-orientation"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" x="1" y="2.5" stroke-width="1.5" width="13" height="18" rx="1" /><rect stroke="currentColor" transform="rotate(90 15.5 17.5)" x="10" y="10" stroke-width="1.5" width="11" height="15" rx="1" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-page-size"><g fill="none" fill-rule="evenodd" stroke-width="1.5"><path d="M0 0h24v24H0z" /><path d="M4.5 2.5h11a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1v-14a1 1 0 0 1 1-1z" stroke="currentColor" /><path d="m15 20.5 1.5 1.5-1.5 1.5m-10-3L3.5 22 5 23.5M3.5 22h12m6-5L20 18.5 18.5 17m3-13L20 2.5 18.5 4M20 2.5V18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-page"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2zM30 4l10 10" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-palette-color"><path d="M24 44c5.96 0 2.336-8.864 6-13 3.126-3.53 14-1.914 14-7 0-11.046-8.954-20-20-20S4 12.954 4 24s8.954 20 20 20z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M28 17a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm-12 4a3 3 0 1 0 0-6 3 3 0 0 0 0 6zm1 13a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-paragraph"><path d="M8 10.933V6h32v4.933M24 6v36m-8 0h16" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-pdf"><path d="M10 4h20l10 10v28a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path clip-rule="evenodd" d="M18 18h12v7.992L18.008 26 18 18z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M18 18v16" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-plus"><path d="m24.06 10-.036 28M10 24h28" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-preview"><path d="M12 35.014H4V8.013a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v27h-8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M24 32 14 42h20L24 32Z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-print"><path d="M37 32H11v12h26V32z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path clip-rule="evenodd" d="M4 20h40v18h-6.983v-6H10.98v6H4V20z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M38 4H10v16h28V4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-qrcode"><path stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" d="M32 6h10v10H32zm0 26h10v10H32zM6 32h10v10H6zM6 6h10v10H6zm2 18h22m8 0h2M24 37v2m0-22v14m0-23v2" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-quote"><path fill-rule="evenodd" clip-rule="evenodd" d="M18.853 9.116C11.323 13.952 7.14 19.58 6.303 26.003 5 36 13.94 40.893 18.47 36.497 23 32.1 20.285 26.52 17.005 24.994c-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.016-7.69 9.116-10.322a.749.749 0 0 0 .114-1.02L20.285 9.3c-.44-.572-.862-.55-1.432-.185zm19.826 0c-7.53 4.836-11.714 10.465-12.55 16.887-1.303 9.997 7.637 14.89 12.167 10.494 4.53-4.397 1.815-9.977-1.466-11.503-3.28-1.525-5.286-.994-4.936-3.033.35-2.038 5.017-7.69 9.117-10.322a.749.749 0 0 0 .113-1.02L40.11 9.3c-.44-.572-.862-.55-1.431-.185z" fill="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-redo"><g stroke="currentColor" stroke-linecap="round"><path d="M14.113 4.75h-7.5a4.75 4.75 0 0 0 0 9.5h3.75" vector-effect="non-scaling-stroke" /><path d="m11.113 1.75 2.993 2.993a.01.01 0 0 1 0 .014L11.113 7.75" vector-effect="non-scaling-stroke" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-seal"><path d="M5 37a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5Z" stroke="currentColor" stroke-width="3" /><path d="M5 31a2 2 0 0 1 2-2h34a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V31Z" stroke="currentColor" stroke-width="3" /><path d="M18.763 15.664a1 1 0 0 1 .942-.664h8.59a1 1 0 0 1 .942.664L34 29H14l4.763-13.336Z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><rect x="15" y="4" width="18" height="10.8" rx="5.4" stroke="currentColor" stroke-width="3" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-search-replace"><path d="M40 27V6a2 2 0 0 0-2-2H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2h11m-4-32h14m-14 8h14m-14 8h6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M37 37c0 1.38-.56 2.63-1.465 3.535A5 5 0 1 1 37 37z" /><path d="m39 44-3.465-3.465m0 0a5 5 0 1 0-7.071-7.07 5 5 0 0 0 7.072 7.07z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-select-all"><path d="M32 16h9a2 2 0 0 1 2 2v23a2 2 0 0 1-2 2H18a2 2 0 0 1-2-2v-9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M32 16V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v23a2 2 0 0 0 2 2h9m25-16L17 40M32 7 7 32m25-16L16 32m27-8L24 43m0-38L5 24m38 10-9 9M14 5l-9 9" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-setting"><path d="M1.853 3.966a.01.01 0 0 0-.016.003 4.307 4.307 0 0 0 5.714 5.7l4.87 4.871a1.5 1.5 0 1 0 2.122-2.12L9.671 7.546a4.307 4.307 0 0 0-5.713-5.704.01.01 0 0 0-.003.016l2.6 2.6L4.45 6.563 1.853 3.966z" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-share"><path d="M35 16a5 5 0 1 0 0-10 5 5 0 0 0 0 10zM13 29a5 5 0 1 0 0-10 5 5 0 0 0 0 10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="m30 13.575-12.66 7.67m-.002 5.319 13.34 7.883" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M35 32a5 5 0 1 1 0 10 5 5 0 0 1 0-10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-shortcut"><path d="M42 7H6a2 2 0 0 0-2 2v28a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M12 19h2m7 0h2m6 0h7m-24 9h24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-signature"><path clip-rule="evenodd" d="M24 24v-5L39 4l5 5-15 15h-5z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M16 24H9a5 5 0 0 0 0 10h30a5 5 0 0 1 0 10H18" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-spellcheck"><path d="m34 10 8 8m0-8-8 8m10 12-7 8-4-4m-7-24H4v8h22v-8zm0 20H4v8h22v-8z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-strike"><path d="M1.5 8.25h13m-11.75 6 1.415-3.503m9.085 3.504-1.401-3.504M6.178 5.28l1.544-3.872a.3.3 0 0 1 .556 0L9.816 5.28" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-subscript"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.266 10.905a.402.402 0 0 0 .399.446h.171c.236 0 .424-.208.464-.46v-.005c.03-.16.078-.305.142-.432a.841.841 0 0 1 .253-.316.633.633 0 0 1 .395-.124c.228 0 .414.08.558.24.15.155.224.374.224.657a.983.983 0 0 1-.112.473c-.07.139-.159.263-.268.374-.104.11-.221.213-.35.308-.13.088-.25.177-.365.265-.223.172-.437.341-.64.507a3.246 3.246 0 0 0-.521.549l-.037.048a2.273 2.273 0 0 0-.328.614c-.084.25-.108.951.699.951h2.581c.236 0 .428-.207.428-.461v-.091c0-.255-.192-.462-.428-.462h-2.037l.036-.056c.12-.187.258-.4.411-.535.169-.15.342-.288.521-.416.179-.132.355-.265.529-.398.178-.133.337-.28.476-.44.14-.167.25-.355.335-.566a2.03 2.03 0 0 0 .127-.756c0-.282-.05-.537-.149-.764a1.648 1.648 0 0 0-.96-.93A1.851 1.851 0 0 0 14.141 9c-.313 0-.59.06-.834.183a1.602 1.602 0 0 0-.595.498c-.16.21-.278.46-.358.748-.043.151-.072.31-.09.476z" fill="var(--umo-primary-color)" /><path d="m10.75 1.75-9 12.5m9 0-9-12.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-superscript"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.665 3.351a.402.402 0 0 1-.4-.446c.018-.166.047-.325.09-.476.08-.288.199-.537.357-.748a1.61 1.61 0 0 1 .596-.498c.243-.122.521-.183.834-.183.238 0 .464.042.678.125a1.648 1.648 0 0 1 .96.93c.1.227.149.482.149.764 0 .294-.042.546-.127.756a2.08 2.08 0 0 1-.335.565c-.139.16-.298.308-.476.44-.174.134-.35.266-.529.4a6.289 6.289 0 0 0-.521.415c-.153.136-.29.348-.41.535l-.037.056h2.037c.236 0 .428.207.428.462v.09c0 .255-.192.462-.428.462H12.95c-.807 0-.783-.701-.7-.95.083-.229.196-.443.329-.615l.037-.049c.149-.199.322-.382.52-.548.204-.166.418-.335.641-.507a7.68 7.68 0 0 1 .365-.265c.129-.095.246-.197.35-.308.11-.11.198-.235.268-.374a.984.984 0 0 0 .112-.473c0-.283-.075-.501-.224-.657a.715.715 0 0 0-.558-.24.633.633 0 0 0-.395.124.842.842 0 0 0-.253.316 1.593 1.593 0 0 0-.141.432l-.001.006c-.04.251-.228.46-.464.46h-.171z" fill="var(--umo-primary-color)" /><path d="m10.75 1.75-9 12.5m9 0-9-12.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-symbol"><path d="M4 40.003h14.004C11.334 35.636 8 30.301 8 24c0-9.453 7.017-16 16.008-16C33 8 40 15 40 24c0 6-3.331 11.334-9.993 16.003H44" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-column-after"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M14.5 17h28v14h-28z" /><path d="M6.5 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-column-before"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M6 17h28v14H6z" /><path d="M42 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-row-after"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M17 6h14v28H17z" /><path d="M42 42H6" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-add-row-before"><path stroke="currentColor" stroke-width="4" stroke-linejoin="round" d="M17 14.5h14v28H17z" /><path d="M42 6.5H6" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-cells-align"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M22 30h4m-8-6h12m-10-6h8" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-cells-background"><path fill-rule="evenodd" clip-rule="evenodd" d="M37 37a4 4 0 0 0 4-4c0-1.473-1.333-3.473-4-6-2.667 2.527-4 4.527-4 6a4 4 0 0 0 4 4z" fill="currentColor" /><path d="m20.854 5.504 3.535 3.536" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="M23.682 8.333 8.125 23.889 19.44 35.203l15.556-15.557L23.682 8.333z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="m12 20.073 16.961 5.577M4 43h40" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-table-delete-column"><g fill="none" fill-rule="evenodd"><path d="m10 17.5 4 4m-4 0 4-4m-4-4v-11h4v11h-4z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M0 0v24h24V0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M3 21.5v-19m18 18.75v-19" /></g></symbol><symbol viewBox="0 0 24 24" id="icon-table-delete-row"><g fill="none" fill-rule="evenodd"><path d="m17.5 14 4-4m0 4-4-4m-4 4h-11v-4h11v4z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M0 24h24V0H0z" /><path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M21.5 21h-19M21.25 3h-19" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-delete"><path d="M14 11 4 24l10 13h30V11H14zm7 8 10 10m0-10L21 29" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-fix"><rect x="5" y="5" width="38" height="38" rx="2" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M5 18h38M5 30h38M17 5v38M30 5v38" stroke="currentColor" stroke-width="3" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-cell"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M16.123 6 6 15m20.003-9L6 24M35 6 6 33m13-3L6 42m35-32L29.243 20.852M19 21v21m0-21h23" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-column"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M16.123 6 6 15m13-3L6 24m13-3L6 33m13-3L6 42M19 6v36" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-header-row"><path d="M40 6H8a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h32a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="4" stroke-linejoin="round" /><path d="M6 19.059h36M16.123 6 6 15m36-4.993L32 19M26.123 6l-14.2 12.624M36.123 6l-14.2 12.624" stroke="currentColor" stroke-width="4" stroke-linecap="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-merge-cell"><path d="M20 14V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v38a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-9m8 0v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V5a1 1 0 0 0-1-1H29a1 1 0 0 0-1 1v9m0 10h16M5 24h15" stroke="currentColor" stroke-width="4" stroke-linecap="round" /><path d="m32.748 28.818-1.59-1.59-3.182-3.183 3.181-3.182 1.591-1.59m-17.373 9.545 1.591-1.59 3.182-3.183-3.182-3.182-1.591-1.59" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-next-cell"><path d="M42 19V9a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h10" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m34 24 8 8-8 8m-10-8h18" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-previous-cell"><path d="M42 19V9a3 3 0 0 0-3-3H9a3 3 0 0 0-3 3v30a3 3 0 0 0 3 3h10" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /><path d="m32 24-8 8 8 8m-8-8h18" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table-split-cell"><path d="M4 14V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v38a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-9m40 0v9a1 1 0 0 1-1 1H29a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v9M28 24l16 .013m-40 0L20 24" stroke="currentColor" stroke-width="4" stroke-linecap="round" /><path d="m39.227 28.778 1.592-1.591L44 24.005l-3.181-3.182-1.592-1.591M8.755 28.786l-1.59-1.59-3.183-3.183 3.182-3.182 1.591-1.59" stroke="currentColor" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-table"><path d="M42 6H6a2 2 0 0 0-2 2v32a2 2 0 0 0 2 2h36a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M4 18h40m-26.5 0v24m13-24v24M4 30h40m0-22v32a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-task-list-2"><g clip-path="url(#icon-task-list-2_a)" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M42 20v19a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9a3 3 0 0 1 3-3h21" /><path d="m16 20 10 8L41 7" /></g><defs><clipPath id="icon-task-list-2_a"><path fill="currentColor" d="M0 0h48v48H0z" /></clipPath></defs></symbol><symbol viewBox="0 0 14 14" id="icon-task-list"><g fill="none" fill-rule="evenodd"><path d="M0 0h14v14H0z" /><path d="M13 5.667V12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h7" stroke="currentColor" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round" /><path stroke="var(--umo-primary-color)" stroke-width="1.333" stroke-linecap="round" stroke-linejoin="round" d="m4.333 5.667 3.334 2.666 5-7" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-template"><path d="M23 4H4v22h19V4zm21 30H4v9h40v-9zm0-30H31v8h13V4zm0 14H31v8h13v-8z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-text-box"><path d="M12 4H4v8h8V4zm32 32h-8v8h8v-8zm-32 0H4v8h8v-8zM44 4h-8v8h8V4z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M8 36V12m32 24V12M12 8h24M12 40h24" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-text"><path d="M10 44h28a2 2 0 0 0 2-2V14H30V4H10a2 2 0 0 0-2 2v36a2 2 0 0 0 2 2zM30 4l10 10m-16 8v14m-6-14h12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toc"><rect x="8" y="4" width="32" height="40" rx="2" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M21 14h12M21 24h12M21 34h12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path fill-rule="evenodd" clip-rule="evenodd" d="M15 16a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4z" fill="currentColor" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-classic"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M6 16h36M6 13v6m36-6v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-ribbon"><rect x="6" y="6" width="36" height="36" rx="3" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M6 32h36M6 29v6m36-6v6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-toolbar-source"><rect x="4" y="8" width="40" height="32" rx="2" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v6H4v-6z" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m25 23-2 11" stroke="currentColor" stroke-width="3" stroke-linecap="round" /><path d="m31 23 6 5-6 6M17 23l-6 5 6 6" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-underline"><path d="M12.25 1.75V7a4.25 4.25 0 0 1-8.5 0V1.75m-.5 12.5h9.5" stroke-linecap="round" vector-effect="non-scaling-stroke" stroke="currentColor" /></symbol><symbol fill="none" stroke-width="1.5" viewBox="0 0 16 16" id="icon-undo"><g stroke="currentColor" stroke-linecap="round"><path d="M2 4.75h7.5a4.75 4.75 0 1 1 0 9.5H5.75" vector-effect="non-scaling-stroke" /><path d="M4.886 1.75 1.894 4.743a.01.01 0 0 0 0 .014L4.886 7.75" vector-effect="non-scaling-stroke" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-video"><path d="M4 10a2 2 0 0 1 2-2h36a2 2 0 0 1 2 2v28a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V10z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /><path d="M36 8v32M12 8v32m26-22h6m-6 12h6M4 18h6m-6-2v4M9 8h6M9 40h6M33 8h6m-6 32h6M4 30h6m-6-2v4m40-4v4m0-16v4" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="m21 19 8 5-8 5V19z" stroke="currentColor" stroke-width="3" stroke-linejoin="round" /></symbol><symbol viewBox="0 0 24 24" id="icon-watermark"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z" /><rect stroke="currentColor" stroke-width="1.5" x="3.5" y="1.5" width="17" height="21" rx="1" /><path d="m8.5 4.5-3 3m13 9L16 19M13.5 4.5l-8 8m13-7-13 13m13-7L11 19" opacity=".334" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" /></g></symbol><symbol viewBox="0 0 48 48" fill="none" id="icon-web-page"><path d="M25 40H7a3 3 0 0 1-3-3V11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v13.941" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><path d="M4 11a3 3 0 0 1 3-3h34a3 3 0 0 1 3 3v9H4v-9z" stroke="currentColor" stroke-width="3" /><path d="M32 35h12m-6-6v12" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /><circle r="2" transform="matrix(0 -1 -1 0 10 14)" fill="currentColor" /><circle r="2" transform="matrix(0 -1 -1 0 16 14)" fill="currentColor" /></symbol>',e.insertBefore(t,e.lastChild)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function v(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}function g(e){return function(e){if(Array.isArray(e))return m(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=b(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==b(t)?t:t+""}function w(e,t,n){return(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function x(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var E=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const C=x(E);var S="object"==typeof k&&k&&k.Object===Object&&k,O=S,_="object"==typeof self&&self&&self.Object===Object&&self,N=O||_||Function("return this")(),T=N.Symbol,A=T,M=Object.prototype,I=M.hasOwnProperty,P=M.toString,L=A?A.toStringTag:void 0;var R=function(e){var t=I.call(e,L),n=e[L];try{e[L]=void 0;var r=!0}catch(a){}var o=P.call(e);return r&&(t?e[L]=n:delete e[L]),o},B=Object.prototype.toString;var D=R,V=function(e){return B.call(e)},j=T?T.toStringTag:void 0;var F=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":j&&j in Object(e)?D(e):V(e)},z=F,$=E;var H=function(e){if(!$(e))return!1;var t=z(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t};const U=x(H);var W,G=N["__core-js_shared__"],K=(W=/[^.]+$/.exec(G&&G.keys&&G.keys.IE_PROTO||""))?"Symbol(src)_1."+W:"";var q=function(e){return!!K&&K in e},Y=Function.prototype.toString;var X=function(e){if(null!=e){try{return Y.call(e)}catch(t){}try{return e+""}catch(t){}}return""},Z=H,J=q,Q=E,ee=X,te=/^\[object .+?Constructor\]$/,ne=Function.prototype,re=Object.prototype,oe=ne.toString,ae=re.hasOwnProperty,ie=RegExp("^"+oe.call(ae).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var le=function(e){return!(!Q(e)||J(e))&&(Z(e)?ie:te).test(ee(e))},se=function(e,t){return null==e?void 0:e[t]};var ce=function(e,t){var n=se(e,t);return le(n)?n:void 0},ue=ce,de=function(){try{var e=ue(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),pe=de;var fe=function(e,t,n){"__proto__"==t&&pe?pe(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n};var he=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}();var me=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var ve=function(e){return null!=e&&"object"==typeof e},ge=F,be=ve;var ye=function(e){return be(e)&&"[object Arguments]"==ge(e)},we=ve,ke=Object.prototype,xe=ke.hasOwnProperty,Ee=ke.propertyIsEnumerable,Ce=ye(function(){return arguments}())?ye:function(e){return we(e)&&xe.call(e,"callee")&&!Ee.call(e,"callee")},Se=Ce,Oe=Array.isArray;const _e=x(Oe);var Ne,Te,Ae,Me,Ie,Pe,Le,Re,Be={exports:{}};Ne=Be,Ae=N,Me=function(){return!1},Ie=(Te=Be.exports)&&!Te.nodeType&&Te,Pe=Ie&&Ne&&!Ne.nodeType&&Ne,Le=Pe&&Pe.exports===Ie?Ae.Buffer:void 0,Re=(Le?Le.isBuffer:void 0)||Me,Ne.exports=Re;var De=Be.exports,Ve=/^(?:0|[1-9]\d*)$/;var je=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ve.test(e))&&e>-1&&e%1==0&&e<t};var Fe=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ze=F,$e=Fe,He=ve,Ue={};Ue["[object Float32Array]"]=Ue["[object Float64Array]"]=Ue["[object Int8Array]"]=Ue["[object Int16Array]"]=Ue["[object Int32Array]"]=Ue["[object Uint8Array]"]=Ue["[object Uint8ClampedArray]"]=Ue["[object Uint16Array]"]=Ue["[object Uint32Array]"]=!0,Ue["[object Arguments]"]=Ue["[object Array]"]=Ue["[object ArrayBuffer]"]=Ue["[object Boolean]"]=Ue["[object DataView]"]=Ue["[object Date]"]=Ue["[object Error]"]=Ue["[object Function]"]=Ue["[object Map]"]=Ue["[object Number]"]=Ue["[object Object]"]=Ue["[object RegExp]"]=Ue["[object Set]"]=Ue["[object String]"]=Ue["[object WeakMap]"]=!1;var We=function(e){return He(e)&&$e(e.length)&&!!Ue[ze(e)]};var Ge=function(e){return function(t){return e(t)}},Ke={exports:{}};!function(e,t){var n=S,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=i}(Ke,Ke.exports);var qe=Ke.exports,Ye=We,Xe=Ge,Ze=qe&&qe.isTypedArray,Je=Ze?Xe(Ze):Ye,Qe=me,et=Se,tt=Oe,nt=De,rt=je,ot=Je,at=Object.prototype.hasOwnProperty;var it=function(e,t){var n=tt(e),r=!n&&et(e),o=!n&&!r&&nt(e),a=!n&&!r&&!o&&ot(e),i=n||r||o||a,l=i?Qe(e.length,String):[],s=l.length;for(var c in e)!t&&!at.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||rt(c,s))||l.push(c);return l},lt=Object.prototype;var st=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||lt)};var ct=function(e,t){return function(n){return e(t(n))}},ut=ct(Object.keys,Object),dt=st,pt=ut,ft=Object.prototype.hasOwnProperty;var ht=function(e){if(!dt(e))return pt(e);var t=[];for(var n in Object(e))ft.call(e,n)&&"constructor"!=n&&t.push(n);return t},mt=H,vt=Fe;var gt=function(e){return null!=e&&vt(e.length)&&!mt(e)},bt=it,yt=ht,wt=gt;var kt=function(e){return wt(e)?bt(e):yt(e)},xt=he,Et=kt;var Ct=function(e,t){return e&&xt(e,t,Et)};var St=function(){this.__data__=[],this.size=0};var Ot=function(e,t){return e===t||e!=e&&t!=t},_t=Ot;var Nt=function(e,t){for(var n=e.length;n--;)if(_t(e[n][0],t))return n;return-1},Tt=Nt,At=Array.prototype.splice;var Mt=Nt;var It=Nt;var Pt=Nt;var Lt=St,Rt=function(e){var t=this.__data__,n=Tt(t,e);return!(n<0)&&(n==t.length-1?t.pop():At.call(t,n,1),--this.size,!0)},Bt=function(e){var t=this.__data__,n=Mt(t,e);return n<0?void 0:t[n][1]},Dt=function(e){return It(this.__data__,e)>-1},Vt=function(e,t){var n=this.__data__,r=Pt(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function jt(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}jt.prototype.clear=Lt,jt.prototype.delete=Rt,jt.prototype.get=Bt,jt.prototype.has=Dt,jt.prototype.set=Vt;var Ft=jt,zt=Ft;var $t=function(){this.__data__=new zt,this.size=0};var Ht=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var Ut=function(e){return this.__data__.get(e)};var Wt=function(e){return this.__data__.has(e)},Gt=ce(N,"Map"),Kt=ce(Object,"create"),qt=Kt;var Yt=function(){this.__data__=qt?qt(null):{},this.size=0};var Xt=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Zt=Kt,Jt=Object.prototype.hasOwnProperty;var Qt=function(e){var t=this.__data__;if(Zt){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Jt.call(t,e)?t[e]:void 0},en=Kt,tn=Object.prototype.hasOwnProperty;var nn=Kt;var rn=Yt,on=Xt,an=Qt,ln=function(e){var t=this.__data__;return en?void 0!==t[e]:tn.call(t,e)},sn=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nn&&void 0===t?"__lodash_hash_undefined__":t,this};function cn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}cn.prototype.clear=rn,cn.prototype.delete=on,cn.prototype.get=an,cn.prototype.has=ln,cn.prototype.set=sn;var un=cn,dn=Ft,pn=Gt;var fn=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var hn=function(e,t){var n=e.__data__;return fn(t)?n["string"==typeof t?"string":"hash"]:n.map},mn=hn;var vn=hn;var gn=hn;var bn=hn;var yn=function(){this.size=0,this.__data__={hash:new un,map:new(pn||dn),string:new un}},wn=function(e){var t=mn(this,e).delete(e);return this.size-=t?1:0,t},kn=function(e){return vn(this,e).get(e)},xn=function(e){return gn(this,e).has(e)},En=function(e,t){var n=bn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function Cn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cn.prototype.clear=yn,Cn.prototype.delete=wn,Cn.prototype.get=kn,Cn.prototype.has=xn,Cn.prototype.set=En;var Sn=Cn,On=Ft,_n=Gt,Nn=Sn;var Tn=Ft,An=$t,Mn=Ht,In=Ut,Pn=Wt,Ln=function(e,t){var n=this.__data__;if(n instanceof On){var r=n.__data__;if(!_n||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(e,t),this.size=n.size,this};function Rn(e){var t=this.__data__=new Tn(e);this.size=t.size}Rn.prototype.clear=An,Rn.prototype.delete=Mn,Rn.prototype.get=In,Rn.prototype.has=Pn,Rn.prototype.set=Ln;var Bn=Rn;var Dn=Sn,Vn=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},jn=function(e){return this.__data__.has(e)};function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Dn;++t<n;)this.add(e[t])}Fn.prototype.add=Fn.prototype.push=Vn,Fn.prototype.has=jn;var zn=Fn;var $n=function(e,t){return e.has(t)},Hn=zn,Un=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},Wn=$n;var Gn=function(e,t,n,r,o,a){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&n?new Hn:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var h=e[d],m=t[d];if(r)var v=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!Un(t,(function(e,t){if(!Wn(f,t)&&(h===e||o(h,e,n,r,a)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p},Kn=N.Uint8Array;var qn=Kn,Yn=Ot,Xn=Gn,Zn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},Jn=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},Qn=T?T.prototype:void 0,er=Qn?Qn.valueOf:void 0;var tr=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new qn(e),new qn(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Yn(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=Zn;case"[object Set]":var s=1&r;if(l||(l=Jn),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=Xn(l(e),l(t),r,o,a,i);return i.delete(e),u;case"[object Symbol]":if(er)return er.call(e)==er.call(t)}return!1};var nr=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e},rr=nr,or=Oe;var ar=function(e,t,n){var r=t(e);return or(e)?r:rr(r,n(e))};var ir=function(){return[]},lr=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a},sr=ir,cr=Object.prototype.propertyIsEnumerable,ur=Object.getOwnPropertySymbols,dr=ur?function(e){return null==e?[]:(e=Object(e),lr(ur(e),(function(t){return cr.call(e,t)})))}:sr,pr=ar,fr=dr,hr=kt;var mr=function(e){return pr(e,hr,fr)},vr=mr,gr=Object.prototype.hasOwnProperty;var br=function(e,t,n,r,o,a){var i=1&n,l=vr(e),s=l.length;if(s!=vr(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:gr.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=i;++c<s;){var m=e[u=l[c]],v=t[u];if(r)var g=i?r(v,m,u,t,e,a):r(m,v,u,e,t,a);if(!(void 0===g?m===v||o(m,v,n,r,a):g)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f},yr=ce(N,"DataView"),wr=Gt,kr=ce(N,"Promise"),xr=ce(N,"Set"),Er=ce(N,"WeakMap"),Cr=F,Sr=X,Or="[object Map]",_r="[object Promise]",Nr="[object Set]",Tr="[object WeakMap]",Ar="[object DataView]",Mr=Sr(yr),Ir=Sr(wr),Pr=Sr(kr),Lr=Sr(xr),Rr=Sr(Er),Br=Cr;(yr&&Br(new yr(new ArrayBuffer(1)))!=Ar||wr&&Br(new wr)!=Or||kr&&Br(kr.resolve())!=_r||xr&&Br(new xr)!=Nr||Er&&Br(new Er)!=Tr)&&(Br=function(e){var t=Cr(e),n="[object Object]"==t?e.constructor:void 0,r=n?Sr(n):"";if(r)switch(r){case Mr:return Ar;case Ir:return Or;case Pr:return _r;case Lr:return Nr;case Rr:return Tr}return t});var Dr=Br,Vr=Bn,jr=Gn,Fr=tr,zr=br,$r=Dr,Hr=Oe,Ur=De,Wr=Je,Gr="[object Arguments]",Kr="[object Array]",qr="[object Object]",Yr=Object.prototype.hasOwnProperty;var Xr=function(e,t,n,r,o,a){var i=Hr(e),l=Hr(t),s=i?Kr:$r(e),c=l?Kr:$r(t),u=(s=s==Gr?qr:s)==qr,d=(c=c==Gr?qr:c)==qr,p=s==c;if(p&&Ur(e)){if(!Ur(t))return!1;i=!0,u=!1}if(p&&!u)return a||(a=new Vr),i||Wr(e)?jr(e,t,n,r,o,a):Fr(e,t,s,n,r,o,a);if(!(1&n)){var f=u&&Yr.call(e,"__wrapped__"),h=d&&Yr.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,v=h?t.value():t;return a||(a=new Vr),o(m,v,n,r,a)}}return!!p&&(a||(a=new Vr),zr(e,t,n,r,o,a))},Zr=ve;var Jr=function e(t,n,r,o,a){return t===n||(null==t||null==n||!Zr(t)&&!Zr(n)?t!=t&&n!=n:Xr(t,n,r,o,e,a))},Qr=Bn,eo=Jr;var to=E;var no=function(e){return e==e&&!to(e)},ro=no,oo=kt;var ao=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},io=function(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var s=(l=n[o])[0],c=e[s],u=l[1];if(i&&l[2]){if(void 0===c&&!(s in e))return!1}else{var d=new Qr;if(r)var p=r(c,u,s,e,t,d);if(!(void 0===p?eo(u,c,3,r,d):p))return!1}}return!0},lo=function(e){for(var t=oo(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ro(o)]}return t},so=ao;var co=function(e){var t=lo(e);return 1==t.length&&t[0][2]?so(t[0][0],t[0][1]):function(n){return n===e||io(n,e,t)}},uo=F,po=ve;var fo=function(e){return"symbol"==typeof e||po(e)&&"[object Symbol]"==uo(e)},ho=Oe,mo=fo,vo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,go=/^\w*$/;var bo=function(e,t){if(ho(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!mo(e))||(go.test(e)||!vo.test(e)||null!=t&&e in Object(t))},yo=Sn;function wo(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(wo.Cache||yo),n}wo.Cache=yo;var ko=wo;var xo=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Eo=/\\(\\)?/g,Co=function(e){var t=ko(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(xo,(function(e,n,r,o){t.push(r?o.replace(Eo,"$1"):n||e)})),t}));var So=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},Oo=So,_o=Oe,No=fo,To=T?T.prototype:void 0,Ao=To?To.toString:void 0;var Mo=function e(t){if("string"==typeof t)return t;if(_o(t))return Oo(t,e)+"";if(No(t))return Ao?Ao.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},Io=Mo;var Po=function(e){return null==e?"":Io(e)},Lo=Oe,Ro=bo,Bo=Co,Do=Po;var Vo=function(e,t){return Lo(e)?e:Ro(e,t)?[e]:Bo(Do(e))},jo=fo;var Fo=function(e){if("string"==typeof e||jo(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},zo=Vo,$o=Fo;var Ho=function(e,t){for(var n=0,r=(t=zo(t,e)).length;null!=e&&n<r;)e=e[$o(t[n++])];return n&&n==r?e:void 0},Uo=Ho;var Wo=function(e,t,n){var r=null==e?void 0:Uo(e,t);return void 0===r?n:r};const Go=x(Wo);var Ko=Vo,qo=Se,Yo=Oe,Xo=je,Zo=Fe,Jo=Fo;var Qo=function(e,t){return null!=e&&t in Object(e)},ea=function(e,t,n){for(var r=-1,o=(t=Ko(t,e)).length,a=!1;++r<o;){var i=Jo(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&Zo(o)&&Xo(i,o)&&(Yo(e)||qo(e))};var ta=function(e,t){return null!=e&&ea(e,t,Qo)},na=Jr,ra=Wo,oa=ta,aa=bo,ia=no,la=ao,sa=Fo;var ca=function(e){return e};var ua=Ho;var da=function(e){return function(t){return null==t?void 0:t[e]}},pa=function(e){return function(t){return ua(t,e)}},fa=bo,ha=Fo;var ma=co,va=function(e,t){return aa(e)&&ia(t)?la(sa(e),t):function(n){var r=ra(n,e);return void 0===r&&r===t?oa(n,e):na(t,r,3)}},ga=ca,ba=Oe,ya=function(e){return fa(e)?da(ha(e)):pa(e)};var wa=function(e){return"function"==typeof e?e:null==e?ga:"object"==typeof e?ba(e)?va(e[0],e[1]):ma(e):ya(e)},ka=fe,xa=Ct,Ea=wa;const Ca=x((function(e,t){var n={};return t=Ea(t),xa(e,(function(e,r,o){ka(n,t(e,r,o),e)})),n}));var Sa=Jr;const Oa=x((function(e,t){return Sa(e,t)}));var _a=fe,Na=Ot;var Ta=function(e,t,n){(void 0!==n&&!Na(e[t],n)||void 0===n&&!(t in e))&&_a(e,t,n)},Aa={exports:{}};!function(e,t){var n=N,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}}(Aa,Aa.exports);var Ma=Aa.exports,Ia=Kn;var Pa=function(e){var t=new e.constructor(e.byteLength);return new Ia(t).set(new Ia(e)),t},La=Pa;var Ra=function(e,t){var n=t?La(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Ba=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},Da=E,Va=Object.create,ja=function(){function e(){}return function(t){if(!Da(t))return{};if(Va)return Va(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),Fa=ct(Object.getPrototypeOf,Object),za=ja,$a=Fa,Ha=st;var Ua=function(e){return"function"!=typeof e.constructor||Ha(e)?{}:za($a(e))},Wa=gt,Ga=ve;var Ka=function(e){return Ga(e)&&Wa(e)},qa=F,Ya=Fa,Xa=ve,Za=Function.prototype,Ja=Object.prototype,Qa=Za.toString,ei=Ja.hasOwnProperty,ti=Qa.call(Object);var ni=function(e){if(!Xa(e)||"[object Object]"!=qa(e))return!1;var t=Ya(e);if(null===t)return!0;var n=ei.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Qa.call(n)==ti};var ri=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},oi=fe,ai=Ot,ii=Object.prototype.hasOwnProperty;var li=function(e,t,n){var r=e[t];ii.call(e,t)&&ai(r,n)&&(void 0!==n||t in e)||oi(e,t,n)},si=li,ci=fe;var ui=function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var l=t[a],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),o?ci(n,l,s):si(n,l,s)}return n};var di=E,pi=st,fi=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},hi=Object.prototype.hasOwnProperty;var mi=it,vi=function(e){if(!di(e))return fi(e);var t=pi(e),n=[];for(var r in e)("constructor"!=r||!t&&hi.call(e,r))&&n.push(r);return n},gi=gt;var bi=function(e){return gi(e)?mi(e,!0):vi(e)},yi=ui,wi=bi;var ki=Ta,xi=Ma,Ei=Ra,Ci=Ba,Si=Ua,Oi=Se,_i=Oe,Ni=Ka,Ti=De,Ai=H,Mi=E,Ii=ni,Pi=Je,Li=ri,Ri=function(e){return yi(e,wi(e))};var Bi=Bn,Di=Ta,Vi=he,ji=function(e,t,n,r,o,a,i){var l=Li(e,n),s=Li(t,n),c=i.get(s);if(c)ki(e,n,c);else{var u=a?a(l,s,n+"",e,t,i):void 0,d=void 0===u;if(d){var p=_i(s),f=!p&&Ti(s),h=!p&&!f&&Pi(s);u=s,p||f||h?_i(l)?u=l:Ni(l)?u=Ci(l):f?(d=!1,u=xi(s,!0)):h?(d=!1,u=Ei(s,!0)):u=[]:Ii(s)||Oi(s)?(u=l,Oi(l)?u=Ri(l):Mi(l)&&!Ai(l)||(u=Si(s))):d=!1}d&&(i.set(s,u),o(u,s,r,a,i),i.delete(s)),ki(e,n,u)}},Fi=E,zi=bi,$i=ri;var Hi=function e(t,n,r,o,a){t!==n&&Vi(n,(function(i,l){if(a||(a=new Bi),Fi(i))ji(t,n,l,r,e,o,a);else{var s=o?o($i(t,l),i,l+"",t,n,a):void 0;void 0===s&&(s=i),Di(t,l,s)}}),zi)};var Ui=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},Wi=Math.max;var Gi=function(e,t,n){return t=Wi(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Wi(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),Ui(e,this,l)}};var Ki=function(e){return function(){return e}},qi=de,Yi=qi?function(e,t){return qi(e,"toString",{configurable:!0,enumerable:!1,value:Ki(t),writable:!0})}:ca,Xi=Date.now;var Zi=function(e){var t=0,n=0;return function(){var r=Xi(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},Ji=Zi(Yi),Qi=ca,el=Gi,tl=Ji;var nl=function(e,t){return tl(el(e,t,Qi),e+"")},rl=Ot,ol=gt,al=je,il=E;var ll=nl,sl=function(e,t,n){if(!il(n))return!1;var r=typeof t;return!!("number"==r?ol(n)&&al(t,n.length):"string"==r&&t in n)&&rl(n[t],e)};var cl=function(e){return ll((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&sl(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t}))},ul=Hi;const dl=x(cl((function(e,t,n){ul(e,t,n)})));function pl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fl(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function hl(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var ml=F,vl=Oe,gl=ve;const bl=x((function(e){return"string"==typeof e||!vl(e)&&gl(e)&&"[object String]"==ml(e)}));const yl=x((function(e){return null===e}));const wl=x((function(e){return void 0===e}));var kl=F,xl=ve;const El=x((function(e){return"number"==typeof e||xl(e)&&"[object Number]"==kl(e)}));function Cl(){if("undefined"==typeof navigator||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){var r=new RegExp("MSIE (\\d+\\.\\d+);"),o=e.match(r);if(!o)return-1;var a=parseFloat(o[1]);return a<7?6:a}return n?11:Number.MAX_SAFE_INTEGER}function Sl(e,t){var n=El(t);if(!e||0===e.length)return n?{length:0,characters:e}:0;for(var r=0,o=0;o<e.length;o++){var a=0;if(a=e.charCodeAt(o)>127?2:1,n&&r+a>t)return{length:r,characters:e.slice(0,o)};r+=a}return n?{length:r,characters:e}:r}function Ol(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ol(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ol(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Nl=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},Tl=ui,Al=kt;var Ml=function(e,t){return e&&Tl(t,Al(t),e)},Il=ui,Pl=bi;var Ll=function(e,t){return e&&Il(t,Pl(t),e)},Rl=ui,Bl=dr;var Dl=function(e,t){return Rl(e,Bl(e),t)},Vl=nr,jl=Fa,Fl=dr,zl=ir,$l=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)Vl(t,Fl(e)),e=jl(e);return t}:zl,Hl=ui,Ul=$l;var Wl=function(e,t){return Hl(e,Ul(e),t)},Gl=ar,Kl=$l,ql=bi;var Yl=function(e){return Gl(e,ql,Kl)},Xl=Object.prototype.hasOwnProperty;var Zl=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Xl.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Jl=Pa;var Ql=function(e,t){var n=t?Jl(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},es=/\w*$/;var ts=function(e){var t=new e.constructor(e.source,es.exec(e));return t.lastIndex=e.lastIndex,t},ns=T?T.prototype:void 0,rs=ns?ns.valueOf:void 0;var as=Pa,is=Ql,ls=ts,ss=function(e){return rs?Object(rs.call(e)):{}},cs=Ra;var us=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return as(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return is(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return cs(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return ls(e);case"[object Symbol]":return ss(e)}},ds=Dr,ps=ve;var fs=function(e){return ps(e)&&"[object Map]"==ds(e)},hs=Ge,ms=qe&&qe.isMap,vs=ms?hs(ms):fs,gs=Dr,bs=ve;var ys=function(e){return bs(e)&&"[object Set]"==gs(e)},ws=Ge,ks=qe&&qe.isSet,xs=ks?ws(ks):ys,Es=Bn,Cs=Nl,Ss=li,Os=Ml,_s=Ll,Ns=Ma,Ts=Ba,As=Dl,Ms=Wl,Is=mr,Ps=Yl,Ls=Dr,Rs=Zl,Bs=us,Ds=Ua,Vs=Oe,js=De,Fs=vs,zs=E,$s=xs,Hs=kt,Us=bi,Ws="[object Arguments]",Gs="[object Function]",Ks="[object Object]",qs={};qs[Ws]=qs["[object Array]"]=qs["[object ArrayBuffer]"]=qs["[object DataView]"]=qs["[object Boolean]"]=qs["[object Date]"]=qs["[object Float32Array]"]=qs["[object Float64Array]"]=qs["[object Int8Array]"]=qs["[object Int16Array]"]=qs["[object Int32Array]"]=qs["[object Map]"]=qs["[object Number]"]=qs[Ks]=qs["[object RegExp]"]=qs["[object Set]"]=qs["[object String]"]=qs["[object Symbol]"]=qs["[object Uint8Array]"]=qs["[object Uint8ClampedArray]"]=qs["[object Uint16Array]"]=qs["[object Uint32Array]"]=!0,qs["[object Error]"]=qs[Gs]=qs["[object WeakMap]"]=!1;var Ys=function e(t,n,r,o,a,i){var l,s=1&n,c=2&n,u=4&n;if(r&&(l=a?r(t,o,a,i):r(t)),void 0!==l)return l;if(!zs(t))return t;var d=Vs(t);if(d){if(l=Rs(t),!s)return Ts(t,l)}else{var p=Ls(t),f=p==Gs||"[object GeneratorFunction]"==p;if(js(t))return Ns(t,s);if(p==Ks||p==Ws||f&&!a){if(l=c||f?{}:Ds(t),!s)return c?Ms(t,_s(l,t)):As(t,Os(l,t))}else{if(!qs[p])return a?t:{};l=Bs(t,p,s)}}i||(i=new Es);var h=i.get(t);if(h)return h;i.set(t,l),$s(t)?t.forEach((function(o){l.add(e(o,n,r,o,t,i))})):Fs(t)&&t.forEach((function(o,a){l.set(a,e(o,n,r,a,t,i))}));var m=d?void 0:(u?c?Ps:Is:c?Us:Hs)(t);return Cs(m||t,(function(o,a){m&&(o=t[a=o]),Ss(l,a,e(o,n,r,a,t,i))})),l},Xs=Ys;const Zs=x((function(e){return Xs(e,5)}));var Js=Hi;const Qs=x(cl((function(e,t,n,r){Js(e,t,n,r)})));var ec="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function tc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}!function(e){e.exports=function(){var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",l="day",s="week",c="month",u="quarter",d="year",p="date",f="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},b={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,c),a=n-o<0,i=t.clone().add(r+(a?-1:1),c);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:s,d:l,D:p,h:i,m:a,s:o,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},y="en",w={};w[y]=v;var k="$isDayjsObject",x=function(e){return e instanceof O||!(!e||!e[k])},E=function e(t,n,r){var o;if(!t)return y;if("string"==typeof t){var a=t.toLowerCase();w[a]&&(o=a),n&&(w[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var l=t.name;w[l]=t,o=l}return!r&&o&&(y=o),o||!r&&y},C=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new O(n)},S=b;S.l=E,S.i=x,S.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var O=function(){function v(e){this.$L=E(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[k]=!0}var g=v.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(h);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return!(this.$d.toString()===f)},g.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return C(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<C(e)},g.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!S.u(t)||t,u=S.p(e),f=function(e,t){var o=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(l)},h=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,v=this.$M,g=this.$D,b="set"+(this.$u?"UTC":"");switch(u){case d:return r?f(1,0):f(31,11);case c:return r?f(1,v):f(0,v+1);case s:var y=this.$locale().weekStart||0,w=(m<y?m+7:m)-y;return f(r?g-w:g+(6-w),v);case l:case p:return h(b+"Hours",0);case i:return h(b+"Minutes",1);case a:return h(b+"Seconds",2);case o:return h(b+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,s=S.p(e),u="set"+(this.$u?"UTC":""),f=(n={},n[l]=u+"Date",n[p]=u+"Date",n[c]=u+"Month",n[d]=u+"FullYear",n[i]=u+"Hours",n[a]=u+"Minutes",n[o]=u+"Seconds",n[r]=u+"Milliseconds",n)[s],h=s===l?this.$D+(t-this.$W):t;if(s===c||s===d){var m=this.clone().set(p,1);m.$d[f](h),m.init(),this.$d=m.set(p,Math.min(this.$D,m.daysInMonth())).$d}else f&&this.$d[f](h);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[S.p(e)]()},g.add=function(r,u){var p,f=this;r=Number(r);var h=S.p(u),m=function(e){var t=C(f);return S.w(t.date(t.date()+Math.round(e*r)),f)};if(h===c)return this.set(c,this.$M+r);if(h===d)return this.set(d,this.$y+r);if(h===l)return m(1);if(h===s)return m(7);var v=(p={},p[a]=t,p[i]=n,p[o]=e,p)[h]||1,g=this.$d.getTime()+r*v;return S.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=S.z(this),a=this.$H,i=this.$m,l=this.$M,s=n.weekdays,c=n.months,u=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},p=function(e){return S.s(a%12||12,e,"0")},h=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return S.s(t.$y,4,"0");case"M":return l+1;case"MM":return S.s(l+1,2,"0");case"MMM":return d(n.monthsShort,l,c,3);case"MMMM":return d(c,l);case"D":return t.$D;case"DD":return S.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return S.s(a,2,"0");case"h":return p(1);case"hh":return p(2);case"a":return h(a,i,!0);case"A":return h(a,i,!1);case"m":return String(i);case"mm":return S.s(i,2,"0");case"s":return String(t.$s);case"ss":return S.s(t.$s,2,"0");case"SSS":return S.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,p,f){var h,m=this,v=S.p(p),g=C(r),b=(g.utcOffset()-this.utcOffset())*t,y=this-g,w=function(){return S.m(m,g)};switch(v){case d:h=w()/12;break;case c:h=w();break;case u:h=w()/3;break;case s:h=(y-b)/6048e5;break;case l:h=(y-b)/864e5;break;case i:h=y/n;break;case a:h=y/t;break;case o:h=y/e;break;default:h=y}return f?h:S.a(h)},g.daysInMonth=function(){return this.endOf(c).$D},g.$locale=function(){return w[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=E(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},v}(),_=O.prototype;return C.prototype=_,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",l],["$M",c],["$y",d],["$D",p]].forEach((function(e){_[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,O,C),e.$i=!0),C},C.locale=E,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=w[y],C.Ls=w,C.p={},C}()}({exports:{}});var nc={pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条数据"},cascader:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},calendar:{yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:"一,二,三,四,五,六,日",cellMonth:"1 月,2 月,3 月,4 月,5 月,6 月,7 月,8 月,9 月,10 月,11 月,12 月"},transfer:{title:"{checked} / {total} 项",empty:"暂无数据",placeholder:"请输入关键词搜索"},timePicker:{dayjsLocale:"zh-cn",now:"此刻",confirm:"确定",anteMeridiem:"上午",postMeridiem:"下午",placeholder:"选择时间"},dialog:{confirm:"确认",cancel:"取消"},drawer:{confirm:"确认",cancel:"取消"},popconfirm:{confirm:{content:"确定"},cancel:{content:"取消"}},table:{empty:"暂无数据",loadingText:"正在加载中,请稍后",loadingMoreText:"点击加载更多",filterInputPlaceholder:"请输入内容(无默认值)",sortAscendingOperationText:"点击升序",sortCancelOperationText:"点击取消排序",sortDescendingOperationText:"点击降序",clearFilterResultButtonText:"清空筛选",columnConfigButtonText:"列配置",columnConfigTitleText:"表格列配置",columnConfigDescriptionText:"请选择需要在表格中显示的数据列",confirmText:"确认",cancelText:"取消",resetText:"重置",selectAllText:"全选",searchResultText:"搜索“{result}”,找到 {count} 条结果"},select:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},tree:{empty:"暂无数据"},treeSelect:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},datePicker:{dayjsLocale:"zh-cn",placeholder:{date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"},weekdays:["一","二","三","四","五","六","日"],months:["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],quarters:["一季度","二季度","三季度","四季度"],rangeSeparator:" - ",direction:"ltr",format:"YYYY-MM-DD",dayAriaLabel:"日",weekAbbreviation:"周",yearAriaLabel:"年",monthAriaLabel:"月",confirm:"确定",selectTime:"选择时间",selectDate:"选择日期",nextYear:"下一年",preYear:"上一年",nextMonth:"下个月",preMonth:"上个月",preDecade:"上个十年",nextDecade:"下个十年",now:"当前"},upload:{sizeLimitMessage:"文件大小不能超过 {sizeLimit}",cancelUploadText:"取消上传",triggerUploadText:{fileInput:"选择文件",image:"点击上传图片",normal:"点击上传",reupload:"重新选择",continueUpload:"继续选择",delete:"删除",uploading:"上传中"},dragger:{dragDropText:"释放鼠标",draggingText:"拖拽到此区域",clickAndDragText:"点击上方“选择文件”或将文件拖拽到此区域"},file:{fileNameText:"文件名",fileSizeText:"文件大小",fileStatusText:"状态",fileOperationText:"操作",fileOperationDateText:"上传日期"},progress:{uploadingText:"上传中",waitingText:"待上传",failText:"上传失败",successText:"上传成功"}},form:{errorMessage:{date:"请输入正确的${name}",url:"请输入正确的${name}",required:"${name}必填",max:"${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符",min:"${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符",len:"${name}字符长度必须是 ${validate}",enum:"${name}只能是${validate}等",idcard:"请输入正确的${name}",telnumber:"请输入正确的${name}",pattern:"请输入正确的${name}",validator:"${name}不符合要求",boolean:"${name}数据类型必须是布尔类型",number:"${name}必须是数字"}},input:{placeholder:"请输入"},list:{loadingText:"正在加载中,请稍等",loadingMoreText:"点击加载更多"},alert:{expandText:"展开更多",collapseText:"收起"},anchor:{copySuccessText:"链接复制成功",copyText:"复制链接"},colorPicker:{swatchColorTitle:"系统预设颜色",recentColorTitle:"最近使用颜色",clearConfirmText:"确定清空最近使用的颜色吗?"},guide:{finishButtonProps:{content:"完成",theme:"primary"},nextButtonProps:{content:"下一步",theme:"primary"},skipButtonProps:{content:"跳过",theme:"default"},prevButtonProps:{content:"上一步",theme:"default"}},image:{errorText:"图片无法显示",loadingText:"图片加载中"},imageViewer:{errorText:"图片加载失败,可尝试重新加载",mirrorTipText:"镜像",rotateTipText:"旋转",originalSizeTipText:"原始大小"},typography:{expandText:"展开",collapseText:"收起",copiedText:"复制成功"}},rc=function(e){return e.ripple="ripple",e.expand="expand",e.fade="fade",e}(rc||{}),oc=dl({classPrefix:"t",animation:{include:["ripple","expand","fade"],exclude:[]},calendar:{firstDayOfWeek:1,fillWithZero:!0,controllerConfig:void 0},icon:{},input:{autocomplete:""},dialog:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,confirmBtnTheme:{default:"primary",info:"primary",warning:"primary",danger:"primary",success:"primary"}},message:{},popconfirm:{confirmBtnTheme:{default:"primary",warning:"primary",danger:"primary"}},table:{expandIcon:void 0,sortIcon:void 0,filterIcon:void 0,treeExpandAndFoldIcon:void 0,hideSortTips:!1,size:"medium"},select:{clearIcon:void 0,filterable:!1},drawer:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,size:"small"},tree:{folderIcon:void 0},datePicker:{firstDayOfWeek:1},steps:{checkIcon:void 0,errorIcon:void 0},tag:{closeIcon:void 0},form:{requiredMark:void 0}},nc),ac=Symbol("configProvide"),ic=t.ref();function lc(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1?arguments[1]:void 0,r=t.getCurrentInstance()?t.inject(ac,null):ic,o=t.computed((function(){return(null==r?void 0:r.value)||oc})),a=t.computed((function(){return Object.assign({},o.value[e],n)}));return{t:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=r[0];if(bl(e)){if(!a)return e;return e.replace(/\{\s*([\w-]+)\s*\}/g,(function(e,t){return a?String(a[t]):""}))}return U(e)?r.length?e.apply(void 0,r):e(t.h):""},global:a,globalConfig:a,classPrefix:t.computed((function(){return o.value.classPrefix}))}}var sc=function(e){var n=Zs(oc),r=t.computed((function(){return t=n,r=e.globalConfig,Qs(t,r,(function(e,t){if(_e(e))return t}));var t,r}));return t.provide(ac,r),ic.value||(ic.value=r.value),r};function cc(e){var n=lc("classPrefix").classPrefix;return t.computed((function(){return e?"".concat(n.value,"-").concat(e):n.value}))}function uc(){var e=lc("classPrefix").classPrefix;return{SIZE:t.computed((function(){return{small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")}})),STATUS:t.computed((function(){return{loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")}}))}}var dc=t.defineComponent({name:"TLoadingGradient",setup:function(){var e=cc();return t.onMounted((function(){var e=t.getCurrentInstance().refs.circle;t.nextTick((function(){!function(e){var t,n,r,o={};if(e&&"undefined"!=typeof window){var a=null===(t=window)||void 0===t||null===(n=t.getComputedStyle)||void 0===n?void 0:n.call(t,e),i=a.color,l=a.fontSize,s=null===(r=window)||void 0===r||null===(r=r.navigator)||void 0===r?void 0:r.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||u)&&(o={transformOrigin:"0px 0px",transform:"scale(".concat(parseInt(l,10)/12,")")}),i&&Cl()>11){var d=i.match(/[\d.]+/g),p=d?"rgba(".concat(d[0],", ").concat(d[1],", ").concat(d[2],", 0)"):"";fl(e,_l(_l({},o),{},{background:"conic-gradient(from 90deg at 50% 50%,".concat(p," 0deg, ").concat(i," 360deg)")}))}else fl(e,_l(_l({},o),{},{background:""}))}}(e)}))})),{classPrefix:e}},render:function(){var e=this.classPrefix,n="".concat(e,"-loading__gradient"),r=[n,"".concat(e,"-icon-loading")];return t.createVNode("svg",{class:r,viewBox:"0 0 12 12",version:"1.1",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("foreignObject",{x:"0",y:"0",width:"12",height:"12"},[t.createVNode("div",{class:"".concat(n,"-conic"),ref:"circle"},null)])])}}),pc=function(e,t,n,r){var o=(n-t)/2,a=e/(r/2);return a<1?o*a*a*a+t:o*((a-=2)*a*a+2)+t},fc={exports:{}},hc={exports:{}};(function(){var e,t,n,r,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?hc.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(hc.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),a=1e9*process.uptime(),o=r-a):Date.now?(hc.exports=function(){return Date.now()-n},n=Date.now()):(hc.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(ec);for(var mc=hc.exports,vc="undefined"==typeof window?ec:window,gc=["moz","webkit"],bc="AnimationFrame",yc=vc["request"+bc],wc=vc["cancel"+bc]||vc["cancelRequest"+bc],kc=0;!yc&&kc<gc.length;kc++)yc=vc[gc[kc]+"Request"+bc],wc=vc[gc[kc]+"Cancel"+bc]||vc[gc[kc]+"CancelRequest"+bc];if(!yc||!wc){var xc=0,Ec=0,Cc=[],Sc=1e3/60;yc=function(e){if(0===Cc.length){var t=mc(),n=Math.max(0,Sc-(t-xc));xc=n+t,setTimeout((function(){var e=Cc.slice(0);Cc.length=0;for(var t=function(){if(!e[n].cancelled)try{e[n].callback(xc)}catch(t){setTimeout((function(){throw t}),0)}},n=0;n<e.length;n++)t()}),Math.round(n))}return Cc.push({handle:++Ec,callback:e,cancelled:!1}),Ec},wc=function(e){for(var t=0;t<Cc.length;t++)Cc[t].handle===e&&(Cc[t].cancelled=!0)}}fc.exports=function(e){return yc.call(vc,e)},fc.exports.cancel=function(){wc.apply(vc,arguments)},fc.exports.polyfill=function(e){e||(e=vc),e.requestAnimationFrame=yc,e.cancelAnimationFrame=wc};var Oc=fc.exports,_c="undefined"==typeof window,Nc=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},Tc=!_c&&document.addEventListener?function(e,t,n,r){e&&t&&n&&e.addEventListener(t,n,r)}:function(e,t,n){e&&t&&n&&e.attachEvent("on".concat(t),n)},Ac=!_c&&document.removeEventListener?function(e,t,n,r){e&&t&&e.removeEventListener(t,n,r)}:function(e,t,n){e&&t&&e.detachEvent("on".concat(t),n)};function Mc(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):" ".concat(e.className," ").indexOf(" ".concat(t," "))>-1}function Ic(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),o=0,a=r.length;o<a;o++){var i=r[o];i&&(e.classList?e.classList.add(i):Mc(e,i)||(n+=" ".concat(i)))}e.classList||(e.className=n)}}function Pc(e,t){if(e&&t){for(var n=t.split(" "),r=" ".concat(e.className," "),o=0,a=n.length;o<a;o++){var i=n[o];i&&(e.classList?e.classList.remove(i):Mc(e,i)&&(r=r.replace(" ".concat(i," ")," ")))}e.classList||(e.className=Nc(r))}}var Lc=function(e,t){var n=U(e)?e(t):e;return n?bl(n)?document.querySelector(n):n instanceof HTMLElement?n:document.body:document.body};function Rc(e){return e&&e===e.window}function Bc(e,t){var n=t.container,r=void 0===n?window:n,o=t.duration,a=void 0===o?450:o,i=t.easing,l=void 0===i?pc:i,s=function(e){if(_c||!e)return 0;var t="scrollTop",n=0;return Rc(e)?n=e.pageYOffset:e instanceof Document?n=e.documentElement[t]:e&&(n=e[t]),n}(r),c=Date.now();return new Promise((function(t){Oc((function n(){var o=Date.now()-c,i=l(Math.min(o,a),s,e,a);Rc(r)?r.scrollTo(window.pageXOffset,i):r instanceof Document||"HTMLDocument"===r.constructor.name?r.documentElement.scrollTop=i:r.scrollTop=i,Oc(o<a?n:t)}))}))}var Dc=function(e){if(!(e instanceof HTMLFormElement))throw new Error("target must be HTMLFormElement");var t=document.createElement("input");t.type="submit",t.hidden=!0,e.appendChild(t),t.click(),e.removeChild(t)},Vc=ht,jc=Dr,Fc=Se,zc=Oe,$c=gt,Hc=De,Uc=st,Wc=Je,Gc=Object.prototype.hasOwnProperty;const Kc=x((function(e){if(null==e)return!0;if($c(e)&&(zc(e)||"string"==typeof e||"function"==typeof e.splice||Hc(e)||Wc(e)||Fc(e)))return!e.length;var t=jc(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(Uc(e))return!Vc(e).length;for(var n in e)if(Gc.call(e,n))return!1;return!0}));var qc=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a},Yc=qc;var Xc=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Yc(e,t,n)},Zc=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Jc=function(e){return Zc.test(e)};var Qc=function(e){return e.split("")},eu="\\ud800-\\udfff",tu="["+eu+"]",nu="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ru="\\ud83c[\\udffb-\\udfff]",ou="[^"+eu+"]",au="(?:\\ud83c[\\udde6-\\uddff]){2}",iu="[\\ud800-\\udbff][\\udc00-\\udfff]",lu="(?:"+nu+"|"+ru+")"+"?",su="[\\ufe0e\\ufe0f]?",cu=su+lu+("(?:\\u200d(?:"+[ou,au,iu].join("|")+")"+su+lu+")*"),uu="(?:"+[ou+nu+"?",nu,au,iu,tu].join("|")+")",du=RegExp(ru+"(?="+ru+")|"+uu+cu,"g");var pu=Qc,fu=Jc,hu=function(e){return e.match(du)||[]};var mu=Xc,vu=Jc,gu=function(e){return fu(e)?hu(e):pu(e)},bu=Po;var yu=function(e){return function(t){t=bu(t);var n=vu(t)?gu(t):void 0,r=n?n[0]:t.charAt(0),o=n?mu(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"),wu=Po,ku=yu;var xu=function(e){return ku(wu(e).toLowerCase())};var Eu=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n};var Cu=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Su=Po,Ou=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_u=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var Nu=function(e){return(e=Su(e))&&e.replace(Ou,Cu).replace(_u,"")},Tu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Au=function(e){return e.match(Tu)||[]},Mu=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Iu=function(e){return Mu.test(e)},Pu="\\ud800-\\udfff",Lu="\\u2700-\\u27bf",Ru="a-z\\xdf-\\xf6\\xf8-\\xff",Bu="A-Z\\xc0-\\xd6\\xd8-\\xde",Du="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Vu="["+Du+"]",ju="\\d+",Fu="["+Lu+"]",zu="["+Ru+"]",$u="[^"+Pu+Du+ju+Lu+Ru+Bu+"]",Hu="(?:\\ud83c[\\udde6-\\uddff]){2}",Uu="[\\ud800-\\udbff][\\udc00-\\udfff]",Wu="["+Bu+"]",Gu="(?:"+zu+"|"+$u+")",Ku="(?:"+Wu+"|"+$u+")",qu="(?:['’](?:d|ll|m|re|s|t|ve))?",Yu="(?:['’](?:D|LL|M|RE|S|T|VE))?",Xu="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Zu="[\\ufe0e\\ufe0f]?",Ju=Zu+Xu+("(?:\\u200d(?:"+["[^"+Pu+"]",Hu,Uu].join("|")+")"+Zu+Xu+")*"),Qu="(?:"+[Fu,Hu,Uu].join("|")+")"+Ju,ed=RegExp([Wu+"?"+zu+"+"+qu+"(?="+[Vu,Wu,"$"].join("|")+")",Ku+"+"+Yu+"(?="+[Vu,Wu+Gu,"$"].join("|")+")",Wu+"?"+Gu+"+"+qu,Wu+"+"+Yu,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ju,Qu].join("|"),"g");var td=Au,nd=Iu,rd=Po,od=function(e){return e.match(ed)||[]};var ad=Eu,id=Nu,ld=function(e,t,n){return e=rd(e),void 0===(t=n?void 0:t)?nd(e)?od(e):td(e):e.match(t)||[]},sd=RegExp("['’]","g");var cd=function(e){return function(t){return ad(ld(id(t).replace(sd,"")),e,"")}},ud=xu;const dd=x(cd((function(e,t,n){return t=t.toLowerCase(),e+(n?ud(t):t)})));const pd=x(cd((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})));function fd(e){var n;return C(e)&&"defaultNode"in e?n=e.defaultNode:(t.isVNode(e)||bl(e))&&(n=e),n}function hd(e){return C(e)&&"params"in e?e.params:{}}function md(e,t,n){var r,o,a,i,l=null===(r=(o=e.$slots)[dd(n)])||void 0===r?void 0:r.call(o,t);return l||((l=null===(a=(i=e.$slots)[pd(n)])||void 0===a?void 0:a.call(i,t))||null)}var vd=function(e,n,r){var o,a=hd(r),i=fd(r);if(n in e&&(o=e[n]),!1!==o&&null!==o)return!0===o&&i?md(e,a,n)||i:U(o)?o(t.h,a):[void 0,a,""].includes(o)&&(e.$slots[dd(n)]||e.$slots[pd(n)])?md(e,a,n):o},gd={attach:{type:[String,Function],default:""},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:"medium"},text:{type:[String,Function]},zIndex:{type:Number}},bd=function(e,n){var r=U(e)?t.computed(e):t.ref(e),o=U(n)?t.computed(n):t.ref(n),a=t.ref(),i=function(){a.value=Lc(r.value,o.value)};return t.onMounted((function(){return i()})),t.watch([r,o],(function(){return i()})),a},yd=t.defineComponent({name:"TLoading",inheritAttrs:!1,props:gd,setup:function(e,n){var r=n.slots,o=t.ref(!1),a={name:cc("loading"),centerClass:cc("loading--center"),fullscreenClass:cc("loading__fullscreen"),lockClass:cc("loading--lock"),overlayClass:cc("loading__overlay"),relativeClass:cc("loading__parent"),fullClass:cc("loading--full"),inheritColorClass:cc("loading--inherit-color")},i=a.name,l=a.centerClass,s=a.fullscreenClass,c=a.lockClass,u=a.overlayClass,d=a.relativeClass,p=a.fullClass,f=a.inheritColorClass,h=cc(),m=uc().SIZE,v=function(){o.value=!1;var t=setTimeout((function(){o.value=!0,clearTimeout(t)}),e.delay)},g=bd((function(){return e.attach})),b=t.computed((function(){return Boolean(!e.delay||e.delay&&o.value)})),y=t.computed((function(){var t={};return void 0!==e.zIndex&&(t.zIndex=e.zIndex),["small","medium","large"].includes(e.size)||(t["font-size"]=e.size),t})),k=t.computed((function(){return Boolean(e.default||r.default||e.content||r.content)})),x=t.computed((function(){return e.preventScrollThrough&&e.fullscreen})),E=t.computed((function(){return Boolean(e.text||r.text)})),C=t.computed((function(){return k.value&&e.loading&&b.value})),S=t.computed((function(){return e.fullscreen&&e.loading&&b.value})),O=t.computed((function(){return e.attach&&e.loading&&b.value})),_=t.computed((function(){return e.attach&&e.loading&&b.value})),N=t.computed((function(){var t=[l.value,m.value[e.size],w({},f.value,e.inheritColor)],n=[i.value,s.value,l.value,u.value];return{baseClasses:t,attachClasses:t.concat([i.value,p.value,w({},u.value,e.showOverlay)]),withContentClasses:t.concat([i.value,p.value,w({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([i.value])}})),T=t.toRefs(e).loading;return t.watch([T],(function(e){pl(e,1)[0]?(v(),x.value&&Ic(document.body,c.value)):x.value&&Pc(document.body,c.value)})),t.onMounted((function(){e.delay&&v()})),{classPrefix:h,relativeClass:d,delayShowLoading:o,styles:y,showText:E,hasContent:k,classes:N,lockFullscreen:x,showWrapLoading:C,showNormalLoading:O,showFullScreenLoading:S,showAttachedLoading:_,teleportElement:g}},render:function(){var e,n,r,o,a,i,l,s,c,u,d=this,p=this.classes,f=p.fullScreenClasses,h=p.baseClasses,m=p.withContentClasses,v=p.attachClasses,g=p.normalClasses,b=t.createVNode(dc,{size:this.size},null),y=this.loading&&vd(this,"indicator",b),w=this.showText&&t.createVNode("div",{class:"".concat(this.classPrefix,"-loading__text")},[vd(this,"text")]);return this.fullscreen?this.showFullScreenLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:f,style:d.styles},d.$attrs),[t.createVNode("div",{class:h},[y,w])])]}}):null:this.hasContent?t.createVNode("div",t.mergeProps({class:this.relativeClass},this.$attrs),[(e=this,n="default",r="content",a=hd(o),i=fd(o),l=a?{params:a}:void 0,s=vd(e,n,l),c=vd(e,r,l),u=Kc(s)?c:s,Kc(u)?i:u),this.showWrapLoading&&t.createVNode("div",{class:m,style:this.styles},[y,w])]):this.attach?this.showAttachedLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:v,style:d.styles},d.$attrs),[y,w])]}}):null:this.loading?t.createVNode("div",t.mergeProps({class:g,style:this.styles},this.$attrs),[y,w]):null}});function wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var kd=null;function xd(e){var n=function(e){return dl({fullscreen:!1,attach:"body",loading:!0,preventScrollThrough:!0},e)}(e);if(n.fullscreen&&kd)return kd;var r=t.defineComponent({setup:function(){return{loadingOptions:t.reactive(n)}},render:function(){return t.h(yd,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wd(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.loadingOptions))}}),o=Lc(n.fullscreen?"body":n.attach),a=t.createApp(r),i=a.mount(document.createElement("div")),l=cc("loading__parent--relative").value,s=cc("loading--lock");return n.preventScrollThrough&&n.fullscreen&&Ic(document.body,s.value),o?Ic(o,l):console.error("attach is not exist"),{hide:function(){i.loading=!1,Pc(o,l),Pc(document.body,s.value),a.unmount()}}}function Ed(e){return!0===e?kd=xd({fullscreen:!0,loading:!0,attach:"body",preventScrollThrough:!0}):!1===e?(null===(t=kd)||void 0===t||t.hide(),void(kd=null)):xd(e);var t}var Cd=Ed;Cd.install=function(e){e.config.globalProperties.$loading=Ed};var Sd=Symbol("TdLoading"),Od=function(e,t){var n=t.modifiers,r=n.fullscreen,o=n.inheritColor,a={attach:function(){return e},fullscreen:null!=r&&r,inheritColor:null!=o&&o,loading:t.value};C(t.value)&&Ca(t.value,(function(e,t){a[t]=e})),e[Sd]={options:a,instance:Cd(a)}},_d={mounted:function(e,t){t.value&&Od(e,t)},updated:function(e,t){var n,r=e[Sd],o=t.value,a=t.oldValue;Oa(o,a)||((null!==(n=null==o?void 0:o.loading)&&void 0!==n?n:o)?Od(e,t):null==r||r.instance.hide())},unmounted:function(e){var t;null===(t=e[Sd])||void 0===t||t.instance.hide()}};function Nd(e,t,n){var r=e;return r.install=function(o,a){o.component(t||a||r.name,e),n&&o.directive(n.name,n.comp)},r}var Td=Nd(yd,yd.name,{name:"loading",comp:_d}),Ad={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,loadingProps:{type:Object},shape:{type:String,default:"rectangle",validator:function(e){return!e||["rectangle","square","round","circle"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["extra-small","small","medium","large"].includes(e)}},suffix:{type:Function},tag:{type:String,validator:function(e){return!e||["button","a","div"].includes(e)}},theme:{type:String,validator:function(e){return!e||["default","primary","danger","warning","success"].includes(e)}},type:{type:String,default:"button",validator:function(e){return!e||["submit","reset","button"].includes(e)}},variant:{type:String,default:"base",validator:function(e){return!e||["base","outline","dashed","text"].includes(e)}},onClick:Function},Md=rc.expand,Id=rc.ripple,Pd=rc.fade;function Ld(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Rd(e,n){var r,o,a=t.ref(null),i=cc(),l=(r=lc("animation").globalConfig,{keepExpand:(o=function(e){var t,n,o=r.value;return o&&!(null!==(t=o.exclude)&&void 0!==t&&t.includes(e))&&(null===(n=o.include)||void 0===n?void 0:n.includes(e))})(Md),keepRipple:o(Id),keepFade:o(Pd)}).keepRipple,s=function(t){var n=e.value,r=function(e){var t;if(null!=e&&null!==(t=e.dataset)&&void 0!==t&&t.ripple)return e.dataset.ripple;var n=getComputedStyle(e).getPropertyValue("--ripple-color");return n||"rgba(0, 0, 0, 0.35)"}(n);if(0===t.button&&e&&l&&!(n.classList.contains("".concat(i.value,"-is-active"))||n.classList.contains("".concat(i.value,"-is-disabled"))||n.classList.contains("".concat(i.value,"-is-checked"))||n.classList.contains("".concat(i.value,"-is-loading")))){var o=getComputedStyle(n),s=parseInt(o.borderWidth,10),c=s>0?s:0,u=n.offsetWidth,d=n.offsetHeight;null===a.value.parentNode&&(Ld(a.value,{position:"absolute",left:"".concat(0-c,"px"),top:"".concat(0-c,"px"),width:"".concat(u,"px"),height:"".concat(d,"px"),borderRadius:o.borderRadius,pointerEvents:"none",overflow:"hidden"}),n.appendChild(a.value));var p=document.createElement("div");Ld(p,{marginTop:"0",marginLeft:"0",right:"".concat(u,"px"),width:"".concat(u+20,"px"),height:"100%",transition:"transform ".concat(200,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(400,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:r,opacity:"0.9"});for(var f=new WeakMap,h=n.children.length,m=0;m<h;++m){var v=n.children[m];""===v.style.zIndex&&v!==a.value&&(v.style.zIndex="1",f.set(v,!0))}var g=n.style.position?n.style.position:getComputedStyle(n).position;""!==g&&"static"!==g||(n.style.position="relative"),a.value.insertBefore(p,a.value.firstChild),setTimeout((function(){p.style.transform="translateX(".concat(u,"px)")}),0);var b=function t(){p.style.backgroundColor="rgba(0, 0, 0, 0)",e.value&&(e.value.removeEventListener("pointerup",t,!1),e.value.removeEventListener("pointerleave",t,!1),setTimeout((function(){p.remove(),0===a.value.children.length&&a.value.remove()}),500))};e.value.addEventListener("pointerup",b,!1),e.value.addEventListener("pointerleave",b,!1)}};t.onMounted((function(){var t=null==e?void 0:e.value;t&&(a.value=document.createElement("div"),t.addEventListener("pointerdown",s,!1))})),t.onUnmounted((function(){var t;null==e||null===(t=e.value)||void 0===t||t.removeEventListener("pointerdown",s,!1)}))}function Bd(e,t,n){var r,o,a,i,l=null===(r=(o=e.slots)[dd(t)])||void 0===r?void 0:r.call(o,n);return l&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length||(l=null===(a=(i=e.slots)[pd(t)])||void 0===a?void 0:a.call(i,n))&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length?l:null}function Dd(e){return!![void 0,null,""].includes(e)||!(e instanceof Array?e:[e]).filter((function(e){var t;return"Symbol(Comment)"!==(null==e||null===(t=e.type)||void 0===t?void 0:t.toString())})).length}var Vd=function(){var e=t.getCurrentInstance();return function(n,r){var o,a=hd(r),i=fd(r),l=function(e){return C(e)&&"slotFirst"in e?e.slotFirst:{}}(r);if(Object.keys(e.props).includes(n)&&(o=e.props[n]),!1!==o&&null!==o)return!0===o?Bd(e,n,a)||i:U(o)?o(t.h,a):([void 0,a,""].includes(o)||l)&&(e.slots[dd(n)]||e.slots[pd(n)])?Bd(e,n,a):o}},jd=function(){var e=Vd();return function(t,n){var r=fd(n);return e(t,n)||r}},Fd=function(){var e=Vd();return function(t,n,r){var o=hd(r),a=fd(r),i=o?{params:o}:void 0,l=e(t,i),s=e(n,i),c=Dd(l)?s:l;return Dd(c)?a:c}},zd=F,$d=ve;const Hd=x((function(e){return!0===e||!1===e||$d(e)&&"[object Boolean]"==zd(e)}));function Ud(e){var n=t.getCurrentInstance(),r=t.computed((function(){return n.props.disabled})),o=t.inject("formDisabled",Object.create(null));return t.computed((function(){var t,n,a;return Hd(null==e||null===(t=e.beforeDisabled)||void 0===t?void 0:t.value)?e.beforeDisabled.value:Hd(r.value)?r.value:Hd(null==e||null===(n=e.afterDisabled)||void 0===n?void 0:n.value)?e.afterDisabled.value:!!Hd(null===(a=o.disabled)||void 0===a?void 0:a.value)&&o.disabled.value}))}function Wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wd(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kd=Nd(t.defineComponent({name:"TButton",props:Ad,setup:function(e,n){var r=n.attrs,o=n.slots,a=Vd(),i=Fd(),l=cc("button"),s=uc(),c=s.STATUS,u=s.SIZE,d=t.ref();Rd(d);var p=Ud(),f=t.computed((function(){var t=e.theme,n=e.variant;return t||("base"===n?"primary":"default")})),h=t.computed((function(){return["".concat(l.value),"".concat(l.value,"--variant-").concat(e.variant),"".concat(l.value,"--theme-").concat(f.value),w(w(w(w(w(w({},u.value[e.size],"medium"!==e.size),c.value.disabled,p.value),c.value.loading,e.loading),"".concat(l.value,"--shape-").concat(e.shape),"rectangle"!==e.shape),"".concat(l.value,"--ghost"),e.ghost),u.value.block,e.block)]}));return function(){var n=i("default","content"),s=e.loading?t.createVNode(Td,Gd({inheritColor:!0},e.loadingProps),null):a("icon"),c=s&&!n,u=e.suffix||o.suffix?t.createVNode("span",{className:"".concat(l.value,"__suffix")},[a("suffix")]):null;n=n?t.createVNode("span",{class:"".concat(l.value,"__text")},[n]):"",s&&(n=[s,n]),u&&(n=[n].concat(u));var f={class:[].concat(g(h.value),[w({},"".concat(l.value,"--icon-only"),c)]),type:e.type,disabled:p.value||e.loading,href:e.href,tabindex:p.value?void 0:"0"};return t.h(!e.tag&&e.href?"a":e.tag||"button",Gd(Gd(Gd({ref:d},r),f),{},{onClick:e.onClick}),[n])}}}));function qd(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xd(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yd(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Zd(e,n){var r=Object.keys(e.attrs).reduce(((t,n)=>{var r;return t[(r=n,["fillOpacity","fillRule","clipRule"].includes(r)?r.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase():r)]=e.attrs[n],t}),{});return t.h(e.tag,Xd(Xd({},r),n),(e.children||[]).map((e=>Zd(e,{}))))}var Jd={classPrefix:"t",locale:"zh-CN"};function Qd(e){var n=function(){var{classPrefix:e}=Jd;return{SIZE:{default:"",xs:"".concat(e,"-size-xs"),small:"".concat(e,"-size-s"),medium:"".concat(e,"-size-m"),large:"".concat(e,"-size-l"),xl:"".concat(e,"-size-xl"),block:"".concat(e,"-size-full-width")},STATUS:{loading:"".concat(e,"-is-loading"),disabled:"".concat(e,"-is-disabled"),focused:"".concat(e,"-is-focused"),success:"".concat(e,"-is-success"),error:"".concat(e,"-is-error"),warning:"".concat(e,"-is-warning"),selected:"".concat(e,"-is-selected"),active:"".concat(e,"-is-active"),checked:"".concat(e,"-is-checked"),current:"".concat(e,"-is-current"),hidden:"".concat(e,"-is-hidden"),visible:"".concat(e,"-is-visible"),expanded:"".concat(e,"-is-expanded"),indeterminate:"".concat(e,"-is-indeterminate")}}}().SIZE,r=t.computed((()=>e.value in n?n[e.value]:""));return{style:t.computed((()=>void 0===e.value||e.value in n?{}:{fontSize:e.value})),className:r}}function ep(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ep(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ep(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var np={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 4v7h7v2h-7v7h-2v-7H4v-2h7V4h2z"}}]},rp=t.defineComponent({name:"AddIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-add",a.value])),s=t.computed((()=>tp(tp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(np,c.value)}});function op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?op(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):op(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ip={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 4h16v2H4V4zm8 3.59l6.91 6.91-1.41 1.41-4.5-4.5V21h-2v-9.59l-4.5 4.5-1.41-1.41L12 7.59z"}}]},lp=t.defineComponent({name:"BacktopIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-backtop",a.value])),s=t.computed((()=>ap(ap({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(ip,c.value)}});function sp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?sp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var up={tag:"svg",attrs:{fill:"none",viewBox:"0 0 26 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 1.59l6.17 6.17 7.07 7.07L23.41 21 22 22.41l-2.97-2.96A12.5 12.5 0 011.08 12.3L1 12l.1-.3c.77-2.4 2.24-4.5 4.18-6.02L2.59 3 4 1.59zM6.7 7.1A10.53 10.53 0 003.1 12a10.5 10.5 0 0014.45 5.97l-1.8-1.8a5 5 0 01-6.93-6.93L6.7 7.11zm3.6 3.6a3 3 0 004 4l-4-4zM13 5c-.58 0-1.14.05-1.7.14l-.98.16L10 3.32l.99-.16A12.5 12.5 0 0124.9 11.7l.1.31-.1.3c-.41 1.3-1.03 2.5-1.82 3.58l-.59.8-1.61-1.18.59-.8c.6-.82 1.08-1.73 1.42-2.7A10.5 10.5 0 0013 5zm.51 1.93l.96.29a5 5 0 013.31 3.31l.3.96-1.92.58-.3-.95a3 3 0 00-1.98-1.99l-.95-.3.58-1.9z"}}]},dp=t.defineComponent({name:"BrowseOffIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-browse-off",a.value])),s=t.computed((()=>cp(cp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(up,c.value)}});function pp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"g",attrs:{clipPath:"url(#clip0_8726_7319)"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"}}]}]},mp=t.defineComponent({name:"BrowseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-browse",a.value])),s=t.computed((()=>fp(fp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(hp,c.value)}});function vp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM7.5 10.59l3 3 6-6L17.91 9l-7.41 7.41L6.09 12l1.41-1.41z"}}]},yp=t.defineComponent({name:"CheckCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-check-circle-filled",a.value])),s=t.computed((()=>gp(gp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(bp,c.value)}});function wp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z"}}]},Ep=t.defineComponent({name:"ChevronDownIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-down",a.value])),s=t.computed((()=>kp(kp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(xp,c.value)}});function Cp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Op={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.91 17.5l-5.5-5.5 5.5-5.5-1.41-1.41L7.59 12l6.91 6.91 1.41-1.41z"}}]},_p=t.defineComponent({name:"ChevronLeftIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-left",a.value])),s=t.computed((()=>Sp(Sp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Op,c.value)}});function Np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Np(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Np(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ap={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8.09 17.5l5.5-5.5-5.5-5.5L9.5 5.09 16.41 12 9.5 18.91 8.09 17.5z"}}]},Mp=t.defineComponent({name:"ChevronRightIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-right",a.value])),s=t.computed((()=>Tp(Tp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Ap,c.value)}});function Ip(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ip(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ip(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M17.5 15.91l-5.5-5.5-5.5 5.5-1.41-1.41L12 7.59l6.91 6.91-1.41 1.41z"}}]},Rp=t.defineComponent({name:"ChevronUpIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-chevron-up",a.value])),s=t.computed((()=>Pp(Pp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Lp,c.value)}});function Bp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Vp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM8.82 7.4L12 10.6l3.18-3.19 1.42 1.42L13.4 12l3.19 3.18-1.42 1.42L12 13.4 8.82 16.6 7.4 15.18 10.6 12 7.4 8.82 8.82 7.4z"}}]},jp=t.defineComponent({name:"CloseCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-close-circle-filled",a.value])),s=t.computed((()=>Dp(Dp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Vp,c.value)}});function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $p={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z"}}]},Hp=t.defineComponent({name:"CloseIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-close",a.value])),s=t.computed((()=>zp(zp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd($p,c.value)}});function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Up(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7.5 1h9v3H22v2h-2.03l-.5 17H4.53l-.5-17H2V4h5.5V1zm2 3h5V3h-5v1zM6.03 6l.44 15h11.06l.44-15H6.03zM13 8v11h-2V8h2z"}}]},Kp=t.defineComponent({name:"DeleteIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-delete",a.value])),s=t.computed((()=>Wp(Wp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Gp,c.value)}});function qp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Yp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xp={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 3v9.59l3.5-3.5 1.41 1.41L12 16.41 6.09 10.5 7.5 9.09l3.5 3.5V3h2zM4.5 14v5h15v-5h2v7h-19v-7h2z"}}]},Zp=t.defineComponent({name:"DownloadIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-download",a.value])),s=t.computed((()=>Yp(Yp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Xp,c.value)}});function Jp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jp(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ef={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 1a11 11 0 110 22 11 11 0 010-22zm-1 13h2V6.5h-2V14zm2 1.5h-2v2h2v-2z"}}]},tf=t.defineComponent({name:"ErrorCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-error-circle-filled",a.value])),s=t.computed((()=>Qp(Qp({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(ef,c.value)}});function nf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var of={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zm-.17-11.11c.43-.53.97-.97 1.4-1.32A2 2 0 0012 7a2 2 0 00-1.89 1.33l-.33.95L7.9 8.6l.34-.94a4 4 0 116.24 4.47 7 7 0 00-1.1 1.01c-.27.34-.37.61-.37.85v1.25h-2V14c0-.87.39-1.57.83-2.11zM11 18.25v-2h2v2h-2z"}}]},af=t.defineComponent({name:"HelpCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-help-circle-filled",a.value])),s=t.computed((()=>rf(rf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(of,c.value)}});function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var cf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v10h-2V4H4v9.59l5-5L14.41 14 13 15.41l-4-4-5 5V20h8v2H2V2zm13.55 5a1 1 0 100 2 1 1 0 000-2zm-3 1a3 3 0 116 0 3 3 0 01-6 0zm3.62 6.76L19 17.59l2.83-2.83 1.41 1.41L20.41 19l2.83 2.83-1.41 1.41L19 20.41l-2.83 2.83-1.41-1.41L17.59 19l-2.83-2.83 1.41-1.41z"}}]},uf=t.defineComponent({name:"ImageErrorIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-image-error",a.value])),s=t.computed((()=>sf(sf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(cf,c.value)}});function df(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?df(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):df(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ff={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 2h20v20H2V2zm2 18h13.59L9 11.41l-5 5V20zm16-.41V4H4v9.59l5-5 11 11zM15.55 7a1 1 0 100 2 1 1 0 000-2zm-3 1a3 3 0 116 0 3 3 0 01-6 0z"}}]},hf=t.defineComponent({name:"ImageIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-image",a.value])),s=t.computed((()=>pf(pf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(ff,c.value)}});function mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var gf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 23a11 11 0 100-22 11 11 0 000 22zM11 8.5v-2h2v2h-2zm2 1.5v7.5h-2V10h2z"}}]},bf=t.defineComponent({name:"InfoCircleFilledIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-info-circle-filled",a.value])),s=t.computed((()=>vf(vf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(gf,c.value)}});function yf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function wf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M13 2v20h-2V2h2zM9 4.64V18.5H1.3L9 4.64zm6 0l7.7 13.86H15V4.64zM4.7 16.5H7v-4.14L4.7 16.5zM17 12.36v4.14h2.3L17 12.36z"}}]},xf=t.defineComponent({name:"MirrorIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-mirror",a.value])),s=t.computed((()=>wf(wf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(kf,c.value)}});function Ef(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Cf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ef(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ef(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Sf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 11h16v2H4v-2z"}}]},Of=t.defineComponent({name:"RemoveIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-remove",a.value])),s=t.computed((()=>Cf(Cf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Sf,c.value)}});function _f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_f(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M4 2v9a9 9 0 019 9h9v2H2V2h2zm0 18h7a7 7 0 00-7-7v7z"}}]},Af=t.defineComponent({name:"RotationIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-rotation",a.value])),s=t.computed((()=>Nf(Nf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Tf,c.value)}});function Mf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function If(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Pf={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.1 5.9a6.5 6.5 0 10-9.2 9.2 6.5 6.5 0 009.2-9.2zM4.49 4.5a8.5 8.5 0 0112.69 11.27l5.34 5.35-1.41 1.41-5.35-5.34A8.5 8.5 0 014.5 4.49zM11.5 6.5v3h3v2h-3v3h-2v-3h-3v-2h3v-3h2z"}}]},Lf=t.defineComponent({name:"ZoomInIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-zoom-in",a.value])),s=t.computed((()=>If(If({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Pf,c.value)}});function Rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Rf(Object(n),!0).forEach((function(t){qd(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Df={tag:"svg",attrs:{fill:"none",viewBox:"0 0 24 24",width:"1em",height:"1em"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M15.1 5.9a6.5 6.5 0 10-9.2 9.2 6.5 6.5 0 009.2-9.2zM4.49 4.5a8.5 8.5 0 0112.69 11.27l5.34 5.35-1.41 1.41-5.35-5.34A8.5 8.5 0 014.5 4.49zM6.5 11.5v-2h8v2h-8z"}}]},Vf=t.defineComponent({name:"ZoomOutIcon",props:{size:{type:String},onClick:{type:Function}},setup(e,n){var{attrs:r}=n,o=t.computed((()=>e.size)),{className:a,style:i}=Qd(o),l=t.computed((()=>["t-icon","t-icon-zoom-out",a.value])),s=t.computed((()=>Bf(Bf({},i.value),r.style))),c=t.computed((()=>({class:l.value,style:s.value,onClick:t=>{var n;return null===(n=e.onClick)||void 0===n?void 0:n.call(e,{e:t})}})));return()=>Zd(Df,c.value)}}),jf={align:{type:String,default:"center",validator:function(e){return!e||["left","right","center"].includes(e)}},content:{type:[String,Function]},dashed:Boolean,default:{type:[String,Function]},layout:{type:String,default:"horizontal",validator:function(e){return!e||["horizontal","vertical"].includes(e)}},theme:{type:String,validator:function(e){return!e||["horizontal","vertical"].includes(e)}}};function Ff(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var zf=t.defineComponent({name:"TDivider",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ff(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ff(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},jf),setup:function(e){var n=cc("divider"),r=Fd();return function(){var o=e.layout,a=e.dashed,i=e.align,l=r("default","content"),s=["".concat(n.value),["".concat(n.value,"--").concat(o)],w(w(w({},"".concat(n.value,"--dashed"),!!a),"".concat(n.value,"--with-text"),!!l),"".concat(n.value,"--with-text-").concat(i),!!l)];return t.createVNode("div",{class:s},[l&&t.createVNode("span",{class:"".concat(n.value,"__inner-text")},[l])])}}}),$f=Nd(zf),Hf={align:{type:String,validator:function(e){return!e||["start","end","center","baseline"].includes(e)}},breakLine:Boolean,direction:{type:String,default:"horizontal",validator:function(e){return!e||["vertical","horizontal"].includes(e)}},separator:{type:[String,Function]},size:{type:[String,Number,Array],default:"medium"}};function Uf(){var e=t.getCurrentInstance();return function(n,r){var o,a;r||(r=e.slots);var i=(null===(o=r)||void 0===o||null===(a=o.default)||void 0===a?void 0:a.call(o))||[],l=[];return function e(n){if(_e(n))return n.forEach((function(n){if(n.children&&_e(n.children)){if(n.type!==t.Fragment)return;e(n.children)}else l.push(n)})),l}(i).filter((function(e){var t;return null===(t=e.type.name)||void 0===t?void 0:t.endsWith(n)}))}}function Wf(){var e=t.getCurrentInstance();return function(){var n,r=e.slots;return((null==r||null===(n=r.default)||void 0===n?void 0:n.call(r))||[]).filter((function(e){return!("symbol"===b(e.type)&&!e.children)&&e.type!==t.Comment})).map((function(e){return e.children&&_e(e.children)&&e.type===t.Fragment?e.children:e})).flat()}}function Gf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kf(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gf(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gf(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qf={small:"8px",medium:"16px",large:"24px"},Yf=function(){var e,t,n;if("undefined"==typeof navigator||!navigator)return!1;var r=navigator.userAgent,o=r.match(/AppleWebKit.+Chrome\/(.+) Safari\/.+/i);if(Number(null==o||null===(e=o[1])||void 0===e?void 0:e.split(".")[0])<100)return!0;var a=r.match(/AppleWebKit.+Version\/(.+) Safari\/.+/i);if(Number(null==a||null===(t=a[1])||void 0===t?void 0:t.split(".")[0])<12)return!0;if(Cl()<=11)return!0;var i=r.match(/Firefox\/(.+)/i);return Number(null==i||null===(n=i[1])||void 0===n?void 0:n.split(".")[0])<100}(),Xf=Nd(t.defineComponent({name:"TSpace",props:Kf(Kf({},Hf),{},{forceFlexGapPolyfill:Boolean}),setup:function(e){var n=cc("space"),r=Vd(),o=Wf(),a=t.computed((function(){return e.forceFlexGapPolyfill||Yf})),i=t.computed((function(){var t="";_e(e.size)?t=e.size.map((function(e){return El(e)?"".concat(e,"px"):bl(e)&&qf[e]||e})).join(" "):bl(e.size)?t=qf[e.size]||e.size:El(e.size)&&(t="".concat(e.size,"px"));var n={};if(a.value){var r=pl(t.split(" "),2),o=r[0],i=r[1];n["--td-space-column-gap"]=o,n["--td-space-row-gap"]=i||o}else n.gap=t;return n}));return function(){var l,s,c=["".concat(n.value),w(w(w(w({},"".concat(n.value,"-align-").concat(e.align),e.align),"".concat(n.value,"-").concat(e.direction),e.direction),"".concat(n.value,"--break-line"),e.breakLine),"".concat(n.value,"--polyfill"),a.value)];return t.createVNode("div",{class:c,style:i.value},[(l=o(),s=r("separator"),l.map((function(e,r){var o=r+1!==l.length&&s;return t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"".concat(n.value,"-item")},[e]),o&&t.createVNode("div",{class:"".concat(n.value,"-item-separator")},[s])])})))])}}}));const Zf=x((function(e){return null==e}));function Jf(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(c){return void n(c)}l.done?t(s):Promise.resolve(s).then(r,o)}function Qf(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Jf(a,r,o,i,l,"next",e)}function l(e){Jf(a,r,o,i,l,"throw",e)}i(void 0)}))}}var eh={exports:{}},th={exports:{}};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(th);var nh=th.exports;!function(e){var t=nh.default;function n(){e.exports=n=function(){return o},e.exports.__esModule=!0,e.exports.default=e.exports;var r,o={},a=Object.prototype,i=a.hasOwnProperty,l=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",d=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(R){p=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof w?t:w,a=Object.create(o.prototype),i=new P(r||[]);return l(a,"_invoke",{value:T(e,n,i)}),a}function h(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}o.wrap=f;var m="suspendedStart",v="suspendedYield",g="executing",b="completed",y={};function w(){}function k(){}function x(){}var E={};p(E,c,(function(){return this}));var C=Object.getPrototypeOf,S=C&&C(C(L([])));S&&S!==a&&i.call(S,c)&&(E=S);var O=x.prototype=w.prototype=Object.create(E);function _(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,n){function r(o,a,l,s){var c=h(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==t(d)&&i.call(d,"__await")?n.resolve(d.__await).then((function(e){r("next",e,l,s)}),(function(e){r("throw",e,l,s)})):n.resolve(d).then((function(e){u.value=e,l(u)}),(function(e){return r("throw",e,l,s)}))}s(c.arg)}var o;l(this,"_invoke",{value:function(e,t){function a(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(a,a):a()}})}function T(e,t,n){var o=m;return function(a,i){if(o===g)throw Error("Generator is already running");if(o===b){if("throw"===a)throw i;return{value:r,done:!0}}for(n.method=a,n.arg=i;;){var l=n.delegate;if(l){var s=A(l,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=g;var c=h(e,t,n);if("normal"===c.type){if(o=n.done?b:v,c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(o=b,n.method="throw",n.arg=c.arg)}}}function A(e,t){var n=t.method,o=e.iterator[n];if(o===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=r,A(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=h(o,e.iterator,t.arg);if("throw"===a.type)return t.method="throw",t.arg=a.arg,t.delegate=null,y;var i=a.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,y):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function M(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function I(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(M,this),this.reset(!0)}function L(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return k.prototype=x,l(O,"constructor",{value:x,configurable:!0}),l(x,"constructor",{value:k,configurable:!0}),k.displayName=p(x,d,"GeneratorFunction"),o.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===k||"GeneratorFunction"===(t.displayName||t.name))},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,p(e,d,"GeneratorFunction")),e.prototype=Object.create(O),e},o.awrap=function(e){return{__await:e}},_(N.prototype),p(N.prototype,u,(function(){return this})),o.AsyncIterator=N,o.async=function(e,t,n,r,a){void 0===a&&(a=Promise);var i=new N(f(e,t,n,r),a);return o.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},_(O),p(O,d,"Generator"),p(O,c,(function(){return this})),p(O,"toString",(function(){return"[object Generator]"})),o.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},o.values=L,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(I),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return l.type="throw",l.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(s&&c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),I(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;I(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),y}},o}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(eh);var rh=(0,eh.exports)(),oh=rh;try{regeneratorRuntime=rh}catch(rle){"object"==typeof globalThis?globalThis.regeneratorRuntime=rh:Function("r","regeneratorRuntime = r")(rh)}const ah=x(oh);function ih(e){var t=lc("icon").globalConfig,n={};return Object.keys(e).forEach((function(r){var o;n[r]=(null===(o=t.value)||void 0===o?void 0:o[r])||e[r]})),n}var lh="top",sh="bottom",ch="right",uh="left",dh="auto",ph=[lh,sh,ch,uh],fh="start",hh="end",mh="clippingParents",vh="viewport",gh="popper",bh="reference",yh=ph.reduce((function(e,t){return e.concat([t+"-"+fh,t+"-"+hh])}),[]),wh=[].concat(ph,[dh]).reduce((function(e,t){return e.concat([t,t+"-"+fh,t+"-"+hh])}),[]),kh=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function xh(e){return e?(e.nodeName||"").toLowerCase():null}function Eh(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ch(e){return e instanceof Eh(e).Element||e instanceof Element}function Sh(e){return e instanceof Eh(e).HTMLElement||e instanceof HTMLElement}function Oh(e){return"undefined"!=typeof ShadowRoot&&(e instanceof Eh(e).ShadowRoot||e instanceof ShadowRoot)}const _h={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];Sh(o)&&xh(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});Sh(r)&&xh(r)&&(Object.assign(r.style,a),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function Nh(e){return e.split("-")[0]}var Th=Math.max,Ah=Math.min,Mh=Math.round;function Ih(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function Ph(){return!/^((?!chrome|android).)*safari/i.test(Ih())}function Lh(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,a=1;t&&Sh(e)&&(o=e.offsetWidth>0&&Mh(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Mh(r.height)/e.offsetHeight||1);var i=(Ch(e)?Eh(e):window).visualViewport,l=!Ph()&&n,s=(r.left+(l&&i?i.offsetLeft:0))/o,c=(r.top+(l&&i?i.offsetTop:0))/a,u=r.width/o,d=r.height/a;return{width:u,height:d,top:c,right:s+u,bottom:c+d,left:s,x:s,y:c}}function Rh(e){var t=Lh(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Bh(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Oh(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Dh(e){return Eh(e).getComputedStyle(e)}function Vh(e){return["table","td","th"].indexOf(xh(e))>=0}function jh(e){return((Ch(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fh(e){return"html"===xh(e)?e:e.assignedSlot||e.parentNode||(Oh(e)?e.host:null)||jh(e)}function zh(e){return Sh(e)&&"fixed"!==Dh(e).position?e.offsetParent:null}function $h(e){for(var t=Eh(e),n=zh(e);n&&Vh(n)&&"static"===Dh(n).position;)n=zh(n);return n&&("html"===xh(n)||"body"===xh(n)&&"static"===Dh(n).position)?t:n||function(e){var t=/firefox/i.test(Ih());if(/Trident/i.test(Ih())&&Sh(e)&&"fixed"===Dh(e).position)return null;var n=Fh(e);for(Oh(n)&&(n=n.host);Sh(n)&&["html","body"].indexOf(xh(n))<0;){var r=Dh(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Hh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Uh(e,t,n){return Th(e,Ah(t,n))}function Wh(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Gh(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Kh(e){return e.split("-")[1]}var qh={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Yh(e){var t,n=e.popper,r=e.popperRect,o=e.placement,a=e.variation,i=e.offsets,l=e.position,s=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,p=i.x,f=void 0===p?0:p,h=i.y,m=void 0===h?0:h,v="function"==typeof u?u({x:f,y:m}):{x:f,y:m};f=v.x,m=v.y;var g=i.hasOwnProperty("x"),b=i.hasOwnProperty("y"),y=uh,w=lh,k=window;if(c){var x=$h(n),E="clientHeight",C="clientWidth";if(x===Eh(n)&&"static"!==Dh(x=jh(n)).position&&"absolute"===l&&(E="scrollHeight",C="scrollWidth"),o===lh||(o===uh||o===ch)&&a===hh)w=sh,m-=(d&&x===k&&k.visualViewport?k.visualViewport.height:x[E])-r.height,m*=s?1:-1;if(o===uh||(o===lh||o===sh)&&a===hh)y=ch,f-=(d&&x===k&&k.visualViewport?k.visualViewport.width:x[C])-r.width,f*=s?1:-1}var S,O=Object.assign({position:l},c&&qh),_=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Mh(n*o)/o||0,y:Mh(r*o)/o||0}}({x:f,y:m},Eh(n)):{x:f,y:m};return f=_.x,m=_.y,s?Object.assign({},O,((S={})[w]=b?"0":"",S[y]=g?"0":"",S.transform=(k.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",S)):Object.assign({},O,((t={})[w]=b?m+"px":"",t[y]=g?f+"px":"",t.transform="",t))}var Xh={passive:!0};var Zh={left:"right",right:"left",bottom:"top",top:"bottom"};function Jh(e){return e.replace(/left|right|bottom|top/g,(function(e){return Zh[e]}))}var Qh={start:"end",end:"start"};function em(e){return e.replace(/start|end/g,(function(e){return Qh[e]}))}function tm(e){var t=Eh(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function nm(e){return Lh(jh(e)).left+tm(e).scrollLeft}function rm(e){var t=Dh(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function om(e){return["html","body","#document"].indexOf(xh(e))>=0?e.ownerDocument.body:Sh(e)&&rm(e)?e:om(Fh(e))}function am(e,t){var n;void 0===t&&(t=[]);var r=om(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),a=Eh(r),i=o?[a].concat(a.visualViewport||[],rm(r)?r:[]):r,l=t.concat(i);return o?l:l.concat(am(Fh(i)))}function im(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function lm(e,t,n){return t===vh?im(function(e,t){var n=Eh(e),r=jh(e),o=n.visualViewport,a=r.clientWidth,i=r.clientHeight,l=0,s=0;if(o){a=o.width,i=o.height;var c=Ph();(c||!c&&"fixed"===t)&&(l=o.offsetLeft,s=o.offsetTop)}return{width:a,height:i,x:l+nm(e),y:s}}(e,n)):Ch(t)?function(e,t){var n=Lh(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):im(function(e){var t,n=jh(e),r=tm(e),o=null==(t=e.ownerDocument)?void 0:t.body,a=Th(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),i=Th(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+nm(e),s=-r.scrollTop;return"rtl"===Dh(o||n).direction&&(l+=Th(n.clientWidth,o?o.clientWidth:0)-a),{width:a,height:i,x:l,y:s}}(jh(e)))}function sm(e,t,n,r){var o="clippingParents"===t?function(e){var t=am(Fh(e)),n=["absolute","fixed"].indexOf(Dh(e).position)>=0&&Sh(e)?$h(e):e;return Ch(n)?t.filter((function(e){return Ch(e)&&Bh(e,n)&&"body"!==xh(e)})):[]}(e):[].concat(t),a=[].concat(o,[n]),i=a[0],l=a.reduce((function(t,n){var o=lm(e,n,r);return t.top=Th(o.top,t.top),t.right=Ah(o.right,t.right),t.bottom=Ah(o.bottom,t.bottom),t.left=Th(o.left,t.left),t}),lm(e,i,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function cm(e){var t,n=e.reference,r=e.element,o=e.placement,a=o?Nh(o):null,i=o?Kh(o):null,l=n.x+n.width/2-r.width/2,s=n.y+n.height/2-r.height/2;switch(a){case lh:t={x:l,y:n.y-r.height};break;case sh:t={x:l,y:n.y+n.height};break;case ch:t={x:n.x+n.width,y:s};break;case uh:t={x:n.x-r.width,y:s};break;default:t={x:n.x,y:n.y}}var c=a?Hh(a):null;if(null!=c){var u="y"===c?"height":"width";switch(i){case fh:t[c]=t[c]-(n[u]/2-r[u]/2);break;case hh:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function um(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,a=n.strategy,i=void 0===a?e.strategy:a,l=n.boundary,s=void 0===l?mh:l,c=n.rootBoundary,u=void 0===c?vh:c,d=n.elementContext,p=void 0===d?gh:d,f=n.altBoundary,h=void 0!==f&&f,m=n.padding,v=void 0===m?0:m,g=Wh("number"!=typeof v?v:Gh(v,ph)),b=p===gh?bh:gh,y=e.rects.popper,w=e.elements[h?b:p],k=sm(Ch(w)?w:w.contextElement||jh(e.elements.popper),s,u,i),x=Lh(e.elements.reference),E=cm({reference:x,element:y,strategy:"absolute",placement:o}),C=im(Object.assign({},y,E)),S=p===gh?C:x,O={top:k.top-S.top+g.top,bottom:S.bottom-k.bottom+g.bottom,left:k.left-S.left+g.left,right:S.right-k.right+g.right},_=e.modifiersData.offset;if(p===gh&&_){var N=_[o];Object.keys(O).forEach((function(e){var t=[ch,sh].indexOf(e)>=0?1:-1,n=[lh,sh].indexOf(e)>=0?"y":"x";O[e]+=N[n]*t}))}return O}function dm(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function pm(e){return[lh,ch,sh,uh].some((function(t){return e[t]>=0}))}function fm(e,t,n){void 0===n&&(n=!1);var r,o,a=Sh(t),i=Sh(t)&&function(e){var t=e.getBoundingClientRect(),n=Mh(t.width)/e.offsetWidth||1,r=Mh(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),l=jh(t),s=Lh(e,i,n),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(a||!a&&!n)&&(("body"!==xh(t)||rm(l))&&(c=(r=t)!==Eh(r)&&Sh(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:tm(r)),Sh(t)?((u=Lh(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):l&&(u.x=nm(l))),{x:s.left+c.scrollLeft-u.x,y:s.top+c.scrollTop-u.y,width:s.width,height:s.height}}function hm(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}var mm={placement:"bottom",modifiers:[],strategy:"absolute"};function vm(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function gm(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,a=void 0===o?mm:o;return function(e,t,n){void 0===n&&(n=a);var o,i,l={placement:"bottom",orderedModifiers:[],options:Object.assign({},mm,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],c=!1,u={state:l,setOptions:function(n){var o="function"==typeof n?n(l.options):n;d(),l.options=Object.assign({},a,l.options,o),l.scrollParents={reference:Ch(e)?am(e):e.contextElement?am(e.contextElement):[],popper:am(t)};var i,c,p=function(e){var t=hm(e);return kh.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}((i=[].concat(r,l.options.modifiers),c=i.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{}),Object.keys(c).map((function(e){return c[e]}))));return l.orderedModifiers=p.filter((function(e){return e.enabled})),l.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,o=e.effect;if("function"==typeof o){var a=o({state:l,name:t,instance:u,options:r}),i=function(){};s.push(a||i)}})),u.update()},forceUpdate:function(){if(!c){var e=l.elements,t=e.reference,n=e.popper;if(vm(t,n)){l.rects={reference:fm(t,$h(n),"fixed"===l.options.strategy),popper:Rh(n)},l.reset=!1,l.placement=l.options.placement,l.orderedModifiers.forEach((function(e){return l.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0;r<l.orderedModifiers.length;r++)if(!0!==l.reset){var o=l.orderedModifiers[r],a=o.fn,i=o.options,s=void 0===i?{}:i,d=o.name;"function"==typeof a&&(l=a({state:l,options:s,name:d,instance:u})||l)}else l.reset=!1,r=-1}}},update:(o=function(){return new Promise((function(e){u.forceUpdate(),e(l)}))},function(){return i||(i=new Promise((function(e){Promise.resolve().then((function(){i=void 0,e(o())}))}))),i}),destroy:function(){d(),c=!0}};if(!vm(e,t))return u;function d(){s.forEach((function(e){return e()})),s=[]}return u.setOptions(n).then((function(e){!c&&n.onFirstUpdate&&n.onFirstUpdate(e)})),u}}var bm=gm({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,a=void 0===o||o,i=r.resize,l=void 0===i||i,s=Eh(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach((function(e){e.addEventListener("scroll",n.update,Xh)})),l&&s.addEventListener("resize",n.update,Xh),function(){a&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Xh)})),l&&s.removeEventListener("resize",n.update,Xh)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=cm({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,a=n.adaptive,i=void 0===a||a,l=n.roundOffsets,s=void 0===l||l,c={placement:Nh(t.placement),variation:Kh(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Yh(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:i,roundOffsets:s})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Yh(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:s})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},_h,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,a=void 0===o?[0,0]:o,i=wh.reduce((function(e,n){return e[n]=function(e,t,n){var r=Nh(e),o=[uh,lh].indexOf(r)>=0?-1:1,a="function"==typeof n?n(Object.assign({},t,{placement:e})):n,i=a[0],l=a[1];return i=i||0,l=(l||0)*o,[uh,ch].indexOf(r)>=0?{x:l,y:i}:{x:i,y:l}}(n,t.rects,a),e}),{}),l=i[t.placement],s=l.x,c=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=s,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=i}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0===i||i,s=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,p=n.altBoundary,f=n.flipVariations,h=void 0===f||f,m=n.allowedAutoPlacements,v=t.options.placement,g=Nh(v),b=s||(g===v||!h?[Jh(v)]:function(e){if(Nh(e)===dh)return[];var t=Jh(e);return[em(e),t,em(t)]}(v)),y=[v].concat(b).reduce((function(e,n){return e.concat(Nh(n)===dh?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,a=n.rootBoundary,i=n.padding,l=n.flipVariations,s=n.allowedAutoPlacements,c=void 0===s?wh:s,u=Kh(r),d=u?l?yh:yh.filter((function(e){return Kh(e)===u})):ph,p=d.filter((function(e){return c.indexOf(e)>=0}));0===p.length&&(p=d);var f=p.reduce((function(t,n){return t[n]=um(e,{placement:n,boundary:o,rootBoundary:a,padding:i})[Nh(n)],t}),{});return Object.keys(f).sort((function(e,t){return f[e]-f[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:h,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,k=t.rects.popper,x=new Map,E=!0,C=y[0],S=0;S<y.length;S++){var O=y[S],_=Nh(O),N=Kh(O)===fh,T=[lh,sh].indexOf(_)>=0,A=T?"width":"height",M=um(t,{placement:O,boundary:u,rootBoundary:d,altBoundary:p,padding:c}),I=T?N?ch:uh:N?sh:lh;w[A]>k[A]&&(I=Jh(I));var P=Jh(I),L=[];if(a&&L.push(M[_]<=0),l&&L.push(M[I]<=0,M[P]<=0),L.every((function(e){return e}))){C=O,E=!1;break}x.set(O,L)}if(E)for(var R=function(e){var t=y.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return C=t,"break"},B=h?3:1;B>0;B--){if("break"===R(B))break}t.placement!==C&&(t.modifiersData[r]._skip=!0,t.placement=C,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,a=void 0===o||o,i=n.altAxis,l=void 0!==i&&i,s=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,p=n.tether,f=void 0===p||p,h=n.tetherOffset,m=void 0===h?0:h,v=um(t,{boundary:s,rootBoundary:c,padding:d,altBoundary:u}),g=Nh(t.placement),b=Kh(t.placement),y=!b,w=Hh(g),k="x"===w?"y":"x",x=t.modifiersData.popperOffsets,E=t.rects.reference,C=t.rects.popper,S="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,O="number"==typeof S?{mainAxis:S,altAxis:S}:Object.assign({mainAxis:0,altAxis:0},S),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(x){if(a){var T,A="y"===w?lh:uh,M="y"===w?sh:ch,I="y"===w?"height":"width",P=x[w],L=P+v[A],R=P-v[M],B=f?-C[I]/2:0,D=b===fh?E[I]:C[I],V=b===fh?-C[I]:-E[I],j=t.elements.arrow,F=f&&j?Rh(j):{width:0,height:0},z=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},$=z[A],H=z[M],U=Uh(0,E[I],F[I]),W=y?E[I]/2-B-U-$-O.mainAxis:D-U-$-O.mainAxis,G=y?-E[I]/2+B+U+H+O.mainAxis:V+U+H+O.mainAxis,K=t.elements.arrow&&$h(t.elements.arrow),q=K?"y"===w?K.clientTop||0:K.clientLeft||0:0,Y=null!=(T=null==_?void 0:_[w])?T:0,X=P+G-Y,Z=Uh(f?Ah(L,P+W-Y-q):L,P,f?Th(R,X):R);x[w]=Z,N[w]=Z-P}if(l){var J,Q="x"===w?lh:uh,ee="x"===w?sh:ch,te=x[k],ne="y"===k?"height":"width",re=te+v[Q],oe=te-v[ee],ae=-1!==[lh,uh].indexOf(g),ie=null!=(J=null==_?void 0:_[k])?J:0,le=ae?re:te-E[ne]-C[ne]-ie+O.altAxis,se=ae?te+E[ne]+C[ne]-ie-O.altAxis:oe,ce=f&&ae?(de=Uh(le,te,ue=se))>ue?ue:de:Uh(f?le:re,te,f?se:oe);x[k]=ce,N[k]=ce-te}var ue,de;t.modifiersData[r]=N}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,a=n.elements.arrow,i=n.modifiersData.popperOffsets,l=Nh(n.placement),s=Hh(l),c=[uh,ch].indexOf(l)>=0?"height":"width";if(a&&i){var u=function(e,t){return Wh("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Gh(e,ph))}(o.padding,n),d=Rh(a),p="y"===s?lh:uh,f="y"===s?sh:ch,h=n.rects.reference[c]+n.rects.reference[s]-i[s]-n.rects.popper[c],m=i[s]-n.rects.reference[s],v=$h(a),g=v?"y"===s?v.clientHeight||0:v.clientWidth||0:0,b=h/2-m/2,y=u[p],w=g-d[c]-u[f],k=g/2-d[c]/2+b,x=Uh(y,k,w),E=s;n.modifiersData[r]=((t={})[E]=x,t.centerOffset=x-k,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&Bh(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,a=t.modifiersData.preventOverflow,i=um(t,{elementContext:"reference"}),l=um(t,{altBoundary:!0}),s=dm(i,r),c=dm(l,o,a),u=pm(s),d=pm(c);t.modifiersData[n]={referenceClippingOffsets:s,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),ym=N,wm=/\s/;var km=function(e){for(var t=e.length;t--&&wm.test(e.charAt(t)););return t},xm=/^\s+/;var Em=function(e){return e?e.slice(0,km(e)+1).replace(xm,""):e},Cm=E,Sm=fo,Om=/^[-+]0x[0-9a-f]+$/i,_m=/^0b[01]+$/i,Nm=/^0o[0-7]+$/i,Tm=parseInt;var Am=E,Mm=function(){return ym.Date.now()},Im=function(e){if("number"==typeof e)return e;if(Sm(e))return NaN;if(Cm(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Cm(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Em(e);var n=_m.test(e);return n||Nm.test(e)?Tm(e.slice(2),n?2:8):Om.test(e)?NaN:+e},Pm=Math.max,Lm=Math.min;var Rm=function(e,t,n){var r,o,a,i,l,s,c=0,u=!1,d=!1,p=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,a=o;return r=o=void 0,c=t,i=e.apply(a,n)}function h(e){var n=e-s;return void 0===s||n>=t||n<0||d&&e-c>=a}function m(){var e=Mm();if(h(e))return v(e);l=setTimeout(m,function(e){var n=t-(e-s);return d?Lm(n,a-(e-c)):n}(e))}function v(e){return l=void 0,p&&r?f(e):(r=o=void 0,i)}function g(){var e=Mm(),n=h(e);if(r=arguments,o=this,s=e,n){if(void 0===l)return function(e){return c=e,l=setTimeout(m,t),u?f(e):i}(s);if(d)return clearTimeout(l),l=setTimeout(m,t),f(s)}return void 0===l&&(l=setTimeout(m,t)),i}return t=Im(t)||0,Am(n)&&(u=!!n.leading,a=(d="maxWait"in n)?Pm(Im(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),g.cancel=function(){void 0!==l&&clearTimeout(l),c=0,r=s=o=l=void 0},g.flush=function(){return void 0===l?i:v(Mm())},g};const Bm=x(Rm);function Dm(e,n,r,o){var a=t.getCurrentInstance(),i=a.emit,l=a.vnode,s=t.ref(),c=l.props||{};return Object.prototype.hasOwnProperty.call(c,o)||Object.prototype.hasOwnProperty.call(c,pd(o))?[e,function(e){i("update:".concat(o),e);for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];null==r||r.apply(void 0,[e].concat(n))}]:(s.value=n,[s,function(e){s.value=e;for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];null==r||r.apply(void 0,[e].concat(n))}])}function Vm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vm(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fm(e,n,r,o){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"value",i=t.getCurrentInstance(),l=i.emit,s=i.vnode,c=t.ref(),u=s.props||{},d=Object.prototype.hasOwnProperty.call(u,"modelValue")||Object.prototype.hasOwnProperty.call(u,"model-value"),p=Object.prototype.hasOwnProperty.call(u,a)||Object.prototype.hasOwnProperty.call(u,pd(a));return d?[n,function(e){l("update:modelValue",e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}]:p?[e,function(e){l("update:".concat(a),e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}]:(c.value=r,[c,function(e){c.value=e;for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];null==o||o.apply(void 0,[e].concat(n))}])}var zm=new Set,$m={warn:function(e,t){console.warn("TDesign ".concat(e," Warn: ").concat(t))},warnOnce:function(e,t){var n="TDesign ".concat(e," Warn: ").concat(t);zm.has(n)||(zm.add(n),console.warn(n))},error:function(e,t){console.error("TDesign ".concat(e," Error: ").concat(t))},errorOnce:function(e,t){var n="TDesign ".concat(e," Error: ").concat(t);zm.has(n)||(zm.add(n),console.error(n))},info:function(e,t){console.info("TDesign ".concat(e," Info: ").concat(t))}};function Hm(e){var n=t.ref("");return t.watch([e],(function(e,t){var r,o=pl(e,1)[0];pl(t,1)[0]!==o&&("string"!=typeof o?(r=o,new Promise((function(e){if(r){var t=new FileReader;t.readAsDataURL(r),t.onload=function(t){var n;e(null===(n=t.target)||void 0===n?void 0:n.result)}}else e("")}))).then((function(e){n.value=e})):n.value=o)}),{immediate:!0}),{previewUrl:n}}var Um={attach:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:[Number,Array]},destroyOnClose:Boolean,disabled:Boolean,hideEmptyPopup:Boolean,overlayClassName:{type:[String,Object,Array]},overlayInnerClassName:{type:[String,Object,Array]},overlayInnerStyle:{type:[Boolean,Object,Function]},overlayStyle:{type:[Boolean,Object,Function]},placement:{type:String,default:"top"},popperOptions:{type:Object},showArrow:Boolean,trigger:{type:String,default:"hover",validator:function(e){return!e||["hover","click","focus","mousedown","context-menu"].includes(e)}},triggerElement:{type:[String,Function]},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onOverlayClick:Function,onScroll:Function,onScrollToBottom:Function,onVisibleChange:Function};function Wm(e,n){if("undefined"!=typeof window&&(window&&window.ResizeObserver)){var r=null,o=function(){r&&e.value&&(r.unobserve(e.value),r.disconnect(),r=null)};e&&t.watch(e,(function(e){o(),e&&function(e){(r=new ResizeObserver(n)).observe(e)}(e)}),{immediate:!0,flush:"post"}),t.onBeforeUnmount((function(){o()}))}}function Gm(){var e=[];return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){_e(n)?e.push.apply(e,g(n)):n.type===t.Fragment?e.push.apply(e,g(Gm(n.children))):e.push(n)})),e.filter((function(e){return!(e&&(e.type===t.Comment||e.type===t.Fragment&&0===e.children.length||e.type===t.Text&&""===e.children.trim()))}))}function Km(e){var n=t.getCurrentInstance(),r=t.ref();return t.onMounted((function(){r.value=e(n)})),t.onUpdated((function(){var t=e(n);r.value!==t&&(r.value=t)})),r}var qm=t.defineComponent({name:"TPopupTrigger",props:{forwardRef:Function},emits:["resize"],setup:function(e,n){var r=n.emit,o=n.slots,a=Km((function(e){return e.parent.vnode.el.nextElementSibling})),i=t.ref();return t.watch(a,(function(){var t;null===(t=e.forwardRef)||void 0===t||t.call(e,a.value)})),Wm(a,(function(e){var t=pl(e,1)[0].contentRect;i.value=t})),t.watch(i,(function(e,t){var n,o;o=t,!(n=e)&&!o||n&&o&&!["width","height","x","y"].some((function(e){return n[e]!==o[e]}))||r("resize")})),function(){var e,n,r=Gm(null===(e=o.default)||void 0===e?void 0:e.call(o));return r.length>1||(null===(n=r[0])||void 0===n?void 0:n.type)===t.Text?t.createVNode("span",null,[r]):r[0]}}}),Ym=t.defineComponent({name:"TPopupContent",emits:["resize"],setup:function(e,n){var r=n.emit,o=n.slots;return Wm(Km((function(e){return e.vnode.el.children[0]})),(function(){r("resize")})),function(){return t.createVNode("div",{style:"position: absolute; top: 0px; left: 0px; width: 100%"},[o.default()])}}}),Xm=t.defineComponent({name:"TPopupContainer",inheritAttrs:!1,props:{parent:Object,visible:Boolean,attach:Um.attach,forwardRef:Function},emits:["resize","contentMounted"],setup:function(e,n){var r=n.emit,o=n.attrs,a=n.slots,i=n.expose,l=t.ref(),s=t.ref(!1);function c(){r("resize")}return t.onMounted((function(){requestAnimationFrame((function(){s.value=e.visible}))})),t.watch((function(){return e.visible}),(function(t){t&&(s.value=e.visible)})),i({unmountContent:function(){s.value=!1}}),function(){var n,i,u=function(){return Lc(e.attach,l.value)};return t.createVNode(t.Fragment,null,[t.createVNode(qm,{class:o.class,forwardRef:function(t){e.forwardRef(t),l.value=t},onResize:c},(i=n=a.default(),"function"==typeof i||"[object Object]"===Object.prototype.toString.call(i)&&!t.isVNode(i)?n:{default:function(){return[n]}})),s.value&&t.createVNode(t.Teleport,{disabled:!u(),to:u()},{default:function(){return[t.createVNode(Ym,{onResize:c,onVnodeMounted:function(){return r("contentMounted")}},{default:function(){return[a.content&&a.content()]}})]}})])}}});function Zm(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zm(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zm(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qm="data-td-popup",ev="data-td-popup-parent";function tv(e,t){var n=[],r=[ev,Qm];return e?(t&&r.unshift(r.pop()),function e(t){document.querySelectorAll("[".concat(r[0],'="').concat(t,'"]')).forEach((function(o){n.push(o);var a=o.getAttribute(r[1]);a&&a!==t&&e(a)}))}(e),n):n}var nv=Symbol();var rv=Nd(t.defineComponent({name:"TPopup",props:Jm(Jm({},Um),{},{expandAnimation:{type:Boolean}}),setup:function(e,n){var r,o,a,i,l=n.expose,s=t.toRefs(e),c=pl(Fm(s.visible,s.modelValue,e.defaultVisible,e.onVisibleChange,"visible"),2),u=c[0],d=c[1],p=Vd(),f=Fd(),h=t.ref(null),m=t.ref(null),v=t.ref(null),g=t.ref(null),b=t.ref(!1),y="undefined"!=typeof process&&null!==(r=process.env)&&void 0!==r&&r.TEST?"":Date.now().toString(36),k=t.inject(nv,void 0);t.provide(nv,{id:y,assertMouseLeave:D});var x,E,S=cc("popup"),O=uc().STATUS,_=t.computed((function(){var t,n,r="hover"!==e.trigger?[0,0]:[].concat(null!==(t=e.delay)&&void 0!==t?t:[250,150]);return{show:r[0],hide:null!==(n=r[1])&&void 0!==n?n:r[0]}})),N=(x=h,E=[],{add:function(e,t){e&&(Tc(x.value,e,t),E.push((function(){Ac(x.value,e,t)})))},clean:function(){E.forEach((function(e){return null==e?void 0:e()})),E.length=0}});function T(){var t=e.overlayStyle;if(h.value&&m.value)return U(t)?t(h.value,m.value):C(t)?t:void 0}function A(){var t=e.overlayInnerStyle;h.value&&m.value&&(U(t)?fl(m.value,t(h.value,m.value)):C(t)&&fl(m.value,t))}function M(){var n;if(v.value&&u.value)if(o)if(h.value.getRootNode()instanceof ShadowRoot)o.state.elements.reference=h.value,o.update();else{for(var r=h.value.getBoundingClientRect(),a=h.value;a&&a!==document.body;)a=a.parentElement;a!==document.body||0===r.width&&0===r.height?d(!1,{trigger:R({type:"mouseenter"})}):(o.state.elements.reference=h.value,o.update())}else o=bm(h.value,v.value,Jm({placement:(n=e.placement,n.replace(/-(left|top)$/,"-start").replace(/-(right|bottom)$/,"-end")),onFirstUpdate:function(){t.nextTick(M)}},e.popperOptions))}function I(){var t,n;o&&(null===(t=o)||void 0===t||t.destroy(),o=null);e.destroyOnClose&&(null===(n=g.value)||void 0===n||n.unmountContent())}function P(e){L(),i=setTimeout((function(){d(!1,{trigger:R(e),e:e})}),_.value.hide)}function L(){clearTimeout(a),clearTimeout(i)}function R(e){switch(null==e?void 0:e.type){case"mouseenter":case"mouseleave":return"trigger-element-hover";case"focusin":return"trigger-element-focus";case"focusout":return"trigger-element-blur";case"click":return"trigger-element-click";case"context-menu":case"keydown":return"keydown-esc";case"mousedown":return"document";default:return"trigger-element-close"}}function B(e){var t,n;if(!(null!==(t=v.value)&&void 0!==t&&t.contains(e.target)||null!==(n=h.value)&&void 0!==n&&n.contains(e.target))){var r=tv(y).find((function(t){return t.contains(e.target)}));r&&tv(r.getAttribute(ev),!0).some((function(e){return e===v.value}))||P(e)}}function D(t){(b.value=!1,"hover"!==e.trigger||h.value.contains(t.target))||(tv(y).some((function(e){var n=e.getBoundingClientRect();return t.x>n.x&&t.x<n.x+n.width&&t.y>n.y&&t.y<n.y+n.height}))||(P(t),null==k||k.assertMouseLeave(t)))}function V(){b.value=!0,u.value&&"hover"===e.trigger&&L()}function j(t){var n;null===(n=e.onOverlayClick)||void 0===n||n.call(e,{e:t})}t.watch((function(){return[e.trigger,h.value]}),(function(){h.value&&(N.clean(),N.add({hover:"mouseenter",focus:"focusin","context-menu":"contextmenu",click:"click"}[e.trigger],(function(t){e.disabled||("contextmenu"===t.type&&t.preventDefault(),"click"!==t.type&&"contextmenu"!==t.type||!u.value?function(e){L(),a=setTimeout((function(){d(!0,{trigger:R(e)})}),_.value.show)}(t):P(t))})),N.add({hover:"mouseleave",focus:"focusout"}[e.trigger],P))})),t.watch((function(){return[e.overlayStyle,e.overlayInnerStyle,m.value]}),(function(){A(),M()})),t.watch((function(){return e.placement}),(function(){I(),M()})),t.watch((function(){return u.value}),(function(t){if(t)return Tc(document,"mousedown",B,!0),void("focus"===e.trigger&&(n=h.value,r="keydown",i=U(o=function(e){var t,n="undefined"!=typeof process&&null!==(t=process.env)&&void 0!==t&&t.TEST?"27":"Escape";e.code===n&&P(e)})?o:o.handleEvent,Tc(n,r,(function e(t){i(t),Ac(n,r,e,a)}),a)));var n,r,o,a,i;Ac(document,"mousedown",B,!0)})),t.onUnmounted((function(){I(),L(),Ac(document,"mousedown",B,!0)})),l({update:M,getOverlay:function(){return m.value},getOverlayState:function(){return{hover:b.value}},close:function(){return P()}});var F=t.inject("updateScrollTop",void 0);function z(t){var n,r=t.target,o=r.scrollTop,a=r.clientHeight,i=r.scrollHeight,l=Bm((function(t){var n;return null===(n=e.onScrollToBottom)||void 0===n?void 0:n.call(e,{e:t})}),100);a+Math.floor(o)===i&&l(t),null===(n=e.onScroll)||void 0===n||n.call(e,{e:t})}return t.watch((function(){return[u.value,m.value]}),(function(){u.value&&m.value&&F&&(null==F||F(m.value))})),function(){var n=p("content"),r=e.hideEmptyPopup&&["",void 0,null].includes(n),o=u.value||!e.destroyOnClose?t.withDirectives(t.createVNode("div",t.mergeProps(w(w({},Qm,y),ev,null==k?void 0:k.id),{class:[S.value,e.overlayClassName],ref:function(e){return v.value=e},style:[{zIndex:e.zIndex},T(),r&&{visibility:"hidden"}],onClick:j,onMouseenter:V,onMouseleave:D}),[t.createVNode("div",{class:["".concat(S.value,"__content"),w(w(w({},"".concat(S.value,"__content--text"),bl(e.content)),"".concat(S.value,"__content--arrow"),e.showArrow),O.value.disabled,e.disabled),e.overlayInnerClassName],ref:m,onScroll:z},[n,e.showArrow&&t.createVNode("div",{class:"".concat(S.value,"__arrow")},null)])]),[[t.vShow,u.value]]):null;return t.createVNode(Xm,{ref:function(e){return g.value=e},forwardRef:function(e){return h.value=e},onContentMounted:function(){if(u.value){M();var e=setTimeout((function(){A(),clearTimeout(e)}),60)}},onResize:function(){u.value&&M()},visible:u.value,attach:e.attach},{content:function(){return t.createVNode(t.Transition,{name:"".concat(S.value,"--animation").concat(e.expandAnimation?"-expand":""),appear:!0,onEnter:M,onAfterLeave:I},"function"==typeof(n=o)||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?o:{default:function(){return[o]}});var n},default:function(){return f("default","triggerElement")}})}}}));var ov=Ho,av=qc;var iv=Vo,lv=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},sv=function(e,t){return t.length<2?e:ov(e,av(t,0,-1))},cv=Fo;var uv=function(e,t){return t=iv(t,e),null==(e=sv(e,t))||delete e[cv(lv(t))]},dv=ni;var pv=function(e){return dv(e)?void 0:e},fv=Se,hv=Oe,mv=T?T.isConcatSpreadable:void 0;var vv=nr,gv=function(e){return hv(e)||fv(e)||!!(mv&&e&&e[mv])};var bv=function e(t,n,r,o,a){var i=-1,l=t.length;for(r||(r=gv),a||(a=[]);++i<l;){var s=t[i];n>0&&r(s)?n>1?e(s,n-1,r,o,a):vv(a,s):o||(a[a.length]=s)}return a},yv=bv;var wv=function(e){return(null==e?0:e.length)?yv(e,1):[]},kv=Gi,xv=Ji;var Ev=function(e){return xv(kv(e,void 0,wv),e+"")},Cv=So,Sv=Ys,Ov=uv,_v=Vo,Nv=ui,Tv=pv,Av=Yl;const Mv=x(Ev((function(e,t){var n={};if(null==e)return n;var r=!1;t=Cv(t,(function(t){return t=_v(t,e),r||(r=t.length>1),t})),Nv(e,Av(e),n),r&&(n=Sv(n,7,Tv));for(var o=t.length;o--;)Ov(n,t[o]);return n})));var Iv={delay:{type:Number},destroyOnClose:{type:Boolean,default:!0},duration:{type:Number},placement:{type:String,default:"top"},showArrow:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","primary","success","danger","warning","light"].includes(e)}}};function Pv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rv=Nd(t.defineComponent({name:"TTooltip",props:Lv(Lv({},Um),Iv),setup:function(e,n){var r=t.ref(null),o=t.ref(null),a=t.toRefs(e),i=pl(Fm(a.visible,a.modelValue,e.defaultVisible,e.onVisibleChange,"visible"),2),l=i[0],s=i[1],c=t.getCurrentInstance(),u=t.ref(e.visible||e.defaultVisible),d=cc(),p=Vd(),f=Fd(),h=function(){var e=t.ref(0),n=t.ref(0),r=function(t){e.value=t.clientX,n.value=t.clientY};return _c||(t.onMounted((function(){window.addEventListener("mousemove",r,{passive:!0})})),t.onUnmounted((function(){window.removeEventListener("mousemove",r)}))),{x:e,y:n}}(),m=h.x,v=t.ref(m.value);t.onMounted((function(){e.duration&&u.value&&(r.value=setTimeout((function(){s(!1,{}),clearTimeout(r.value),r.value=null}),e.duration))}));var g=function(e,t){r.value&&"document"!==(null==t?void 0:t.trigger)||(e&&(v.value=m.value),s(e,t))},b=t.computed((function(){return["".concat(d.value,"-tooltip"),w({},"".concat(d.value,"-tooltip--").concat(e.theme),e.theme),e.overlayClassName]})),y=t.computed((function(){return Lv(Lv({},(null==c?void 0:c.vnode.props)||{}),{},{placement:"mouse"===e.placement?"bottom-left":e.placement,showArrow:"mouse"!==e.placement&&e.showArrow,overlayClassName:b.value,onVisibleChange:g,disabled:e.disabled})})),k=t.computed((function(){if("mouse"!==e.placement||0===v.value)return e.overlayInnerStyle;var t=function(e){return{transform:"translateX(".concat(v.value-e.getBoundingClientRect().left,"px)")}};return e.overlayInnerStyle?function(n,r){return Lv(Lv({},t(n)),U(e.overlayInnerStyle)?e.overlayInnerStyle(n,r):e.overlayInnerStyle)}:t}));t.watch((function(){return u.value}),(function(){r.value&&!u.value&&(clearTimeout(r.value),r.value=null)}));return n.expose({updatePopper:function(){var e,t;null===(e=o.value)||void 0===e||null===(t=e.update)||void 0===t||t.call(e)}}),function(){var n=p("content");return n||e.content?t.createVNode(rv,t.mergeProps(Mv(y.value,["content","default"]),{ref:o,overlayInnerStyle:k.value,visible:l.value}),{default:function(){return[f("default","triggerElement")]},content:function(){return n}}):f("default","triggerElement")}}})),Bv={active:Boolean,content:{type:[String,Function],default:""},disabled:Boolean,divider:Boolean,prefixIcon:{type:Function},theme:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},value:{type:[String,Number,Object]},onClick:Function};function Dv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vv(e,t){for(var n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e),r=0;r<t.length;r++){delete n[t[r]]}return n}function jv(e){return El(e)?"".concat(e,"px"):e}function Fv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $v=t.defineComponent({name:"TDropdownItem",props:zv(zv({},Bv),{},{maxColumnWidth:{type:[String,Number],default:100},minColumnWidth:{type:[String,Number],default:10},isSubmenu:Boolean}),setup:function(e){var n=Vd(),r=Fd(),o=t.ref();Rd(e.isSubmenu?null:o);var a=n("prefixIcon"),i=cc("dropdown__item"),l=function(t){var n;e.disabled||null===(n=e.onClick)||void 0===n||n.call(e,e.value,{e:t})};return function(){var n=r("default","content"),s=[i.value,"".concat(i.value,"--theme-").concat(e.theme),w(w({},"".concat(i.value,"--active"),e.active),"".concat(i.value,"--disabled"),e.disabled)];return t.createVNode("li",{class:s,onClick:l,style:{maxWidth:jv(e.maxColumnWidth),minWidth:jv(e.minColumnWidth)},ref:o},[e.prefixIcon?t.createVNode("div",{class:"".concat(i.value,"-icon")},[a]):null,n])}}}),Hv={direction:{type:String,default:"right",validator:function(e){return!e||["left","right"].includes(e)}},disabled:Boolean,hideAfterItemClick:{type:Boolean,default:!0},maxColumnWidth:{type:[String,Number],default:100},maxHeight:{type:Number,default:300},minColumnWidth:{type:[String,Number],default:10},options:{type:Array,default:function(){return[]}},panelBottomContent:{type:[String,Function]},panelTopContent:{type:[String,Function]},placement:{type:String,default:"bottom-left",validator:function(e){return!e||["top","left","right","bottom","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"].includes(e)}},popupProps:{type:Object},trigger:{type:String,default:"hover",validator:function(e){return!e||["hover","click","focus","context-menu"].includes(e)}},onClick:Function};function Uv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Wv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Uv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Uv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Gv=t.defineComponent({name:"TDropdownMenu",props:Wv({},Hv),setup:function(e){var n=cc("dropdown"),r=cc("dropdown__menu"),o=t.reactive({}),a=t.ref(),i=t.ref(!1),l=ih({ChevronRightIcon:Mp}).ChevronRightIcon,s=function(e,t){var n=e.target.scrollTop;o[t]=n};t.onMounted((function(){var t;a.value&&(parseInt(null===(t=window)||void 0===t?void 0:t.getComputedStyle(a.value).height,10)>=e.maxHeight&&(i.value=!0))}));var c=function(e){return U(e)?e(t.h):e},u=function r(a,i){var u,d,p=[];return null===(u=a.forEach)||void 0===u||u.call(a,(function(a,u){var f=Wv({},a),h=u-Math.ceil(o[i]/30),m=h>=0?h:u;f.children?(f.children=r(f.children,i+1),d=t.createVNode("div",{key:u},[t.createVNode($v,{style:f.style,class:["".concat(n.value,"__item"),"".concat(n.value,"__item--suffix"),f.class],value:f.value,theme:f.theme,active:f.active,prefixIcon:f.prefixIcon,disabled:f.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,isSubmenu:!0},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"__item-content")},[t.createVNode("span",{class:"".concat(n.value,"__item-text")},[c(f.content)]),t.createVNode(l,{class:"".concat(n.value,"__item-direction"),size:"16"},null)]),t.createVNode("div",{class:["".concat(n.value,"__submenu-wrapper"),w({},"".concat(n.value,"__submenu-wrapper--").concat(e.direction),e.direction)],style:{position:"absolute",top:"".concat(30*m,"px")}},[t.createVNode("div",{class:["".concat(n.value,"__submenu"),w({},"".concat(n.value,"__submenu--disabled"),f.disabled)],style:{position:"static",maxHeight:"".concat(e.maxHeight,"px")},onScroll:function(e){return s(e,i+1)}},[t.createVNode("ul",null,[f.children])])])]}}),f.divider?t.createVNode($f,null,null):null])):d=t.createVNode("div",{key:u},[t.createVNode($v,{style:f.style,class:["".concat(n.value,"__item"),f.class],value:f.value,theme:f.theme,active:f.active,prefixIcon:f.prefixIcon,disabled:f.disabled,minColumnWidth:e.minColumnWidth,maxColumnWidth:e.maxColumnWidth,onClick:f.disabled||f.children?function(){return null}:function(t,n){return function(t){var n,r,o=t.data,a=t.context;null==o||null===(n=o.onClick)||void 0===n||n.call(o,o,a),null===(r=e.onClick)||void 0===r||r.call(e,o,a)}({data:f,context:n})}},{default:function(){return[t.createVNode("span",{class:"".concat(n.value,"__item-text")},[c(f.content)])]}}),f.divider?t.createVNode($f,null,null):null]),p.push(d)})),p};return function(){return t.createVNode("div",{class:[r.value,"".concat(r.value,"--").concat(e.direction),w({},"".concat(r.value,"--overflow"),i.value)],style:{maxHeight:"".concat(e.maxHeight,"px")},ref:a,onScroll:function(e){return s(e,0)}},[u(e.options,0)])}}});function Kv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Yv=function e(t){var n,r,o;if(!t)return[];if("TDropdownMenu"===(null===(n=t[0])||void 0===n||null===(n=n.type)||void 0===n?void 0:n.name)){var a,i,l=null===(a=t[0])||void 0===a||null===(a=a.children)||void 0===a||null===(i=a.default)||void 0===i?void 0:i.call(a);if(_e(l))return e(l)}return _e(t)?(t=t.reduce((function(e,t){return e=e.concat(_e(t.children)?t.children:t)}),[])).map((function(t){var n,r,o,a,i,l,s,c,u,d,p=null===(n=t.children)||void 0===n||null===(r=n.content)||void 0===r?void 0:r.call(n),f=(null===(o=t.children)||void 0===o||null===(a=o.prefixIcon)||void 0===a?void 0:a.call(o))||(null===(i=t.children)||void 0===i||null===(l=i["prefix-icon"])||void 0===l?void 0:l.call(i)),h=null===(s=t.children)||void 0===s||null===(c=s.default)||void 0===c?void 0:c.call(s),m=null==h||null===(u=h.filter)||void 0===u?void 0:u.call(h,(function(e){var t;return!["TDropdownMenu","TDropdownItem"].includes(null===(t=e.type)||void 0===t?void 0:t.name)})),v=null==h||null===(d=h.filter)||void 0===d?void 0:d.call(h,(function(e){var t;return!bl(e.children)&&["TDropdownMenu","TDropdownItem"].includes(null===(t=e.type)||void 0===t?void 0:t.name)}));return qv(qv(qv({content:p||m||h},Object.keys(t.props||{}).reduce((function(e,n){var r;return""===t.props[n]&&"TDropdownItem"===(null===(r=t.type)||void 0===r?void 0:r.name)&&["active","divider","disabled"].includes(n)?e[dd(n)]=!0:e[dd(n)]=t.props[n],e}),{})),f?{prefixIcon:function(){return f}}:{}),{},{children:(null==v?void 0:v.length)>0?e(v):null})})).filter((function(e){return!!e.content})):_e(null===(r=t[0])||void 0===r?void 0:r.children)?e(null===(o=t[0])||void 0===o?void 0:o.children):[]};function Xv(e){var n,r,o,a,i=Uf(),l=t.getCurrentInstance(),s=(null===(n=i("DropdownMenu"))||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.children)||void 0===n||null===(r=n.default)||void 0===r?void 0:r.call(n))||(null===(o=l.slots)||void 0===o||null===(a=o.dropdown)||void 0===a?void 0:a.call(o));return t.computed((function(){return e.options&&e.options.length>0?e.options:Yv(s)}))}function Zv(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zv(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zv(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qv=Nd(t.defineComponent({name:"TDropdown",props:Hv,setup:function(e,n){var r=n.attrs,o=Vd(),a=cc("dropdown"),i=t.ref(null),l=t.ref(!1),s=t.computed((function(){var t,n,r=null===(t=e.popupProps)||void 0===t?void 0:t.delay;return El(r)?r+10:_e(r)?(null!==(n=r[1])&&void 0!==n?n:r[0])+10:160})),c=function(t,n){var r,o,a,i,c;e.hideAfterItemClick&&(setTimeout((function(){return l.value=!1}),s.value),null===(o=e.popupProps)||void 0===o||null===(a=o.onVisibleChange)||void 0===a||a.call(o,!1,n),null===(i=e.popupProps)||void 0===i||null===(c=i["on-visible-change"])||void 0===c||c.call(i,!1,n));null==e||null===(r=e.onClick)||void 0===r||r.call(e,t,n)},u=function(t,n){var r,o,a,i;l.value=t,null===(r=e.popupProps)||void 0===r||null===(o=r.onVisibleChange)||void 0===o||o.call(r,t,n),null===(a=e.popupProps)||void 0===a||null===(i=a["on-visible-change"])||void 0===i||i.call(a,t,n)};return function(){var n,s,d=null===(n=o("default"))||void 0===n?void 0:n[0],p=Xv(e),f=Jv(Jv(Jv({},r),{},{disabled:e.disabled,placement:e.placement,trigger:e.trigger},Mv(e.popupProps,["onVisibleChange","on-visible-change"])),{},{overlayInnerClassName:[a.value,null===(s=e.popupProps)||void 0===s?void 0:s.overlayInnerClassName]});return t.createVNode(rv,t.mergeProps({destroyOnClose:!0,ref:i,visible:l.value,onVisibleChange:u,expandAnimation:!0},f),{default:function(){return[d]},content:function(){return t.createVNode(Gv,t.mergeProps(Mv(e,"onClick"),{options:p.value,onClick:c}),null)}})}}})),eg=Nd($v),tg=Nd(Gv);function ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rg(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,y(r.key),r)}}function og(e,t,n){return t&&rg(e.prototype,t),n&&rg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var ag=t.defineComponent({name:"TFakeArrow",props:{isActive:{type:Boolean},overlayClassName:{type:[String,Object,Array]},overlayStyle:{type:Object||String}},setup:function(e){var n=cc("fake-arrow");return{classes:t.computed((function(){return[n.value,w({},"".concat(n.value,"--active"),e.isActive),e.overlayClassName]}))}},render:function(){return t.createVNode("svg",{class:this.classes,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:this.overlayStyle},[t.createVNode("path",{d:"M3.75 5.7998L7.99274 10.0425L12.2361 5.79921",stroke:"black","stroke-opacity":"0.9","stroke-width":"1.3"},null)])}}),ig={align:{type:String,default:"left",validator:function(e){return!e||["left","center","right"].includes(e)}},allowInputOverMax:Boolean,autoWidth:Boolean,autocomplete:{type:String,default:void 0},autofocus:Boolean,borderless:Boolean,clearable:Boolean,disabled:{type:Boolean,default:void 0},format:{type:Function},inputClass:{type:[String,Object,Array]},label:{type:[String,Function]},maxcharacter:{type:Number},maxlength:{type:[String,Number]},name:{type:String,default:""},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:{type:Boolean,default:void 0},showClearIconOnEmpty:Boolean,showLimitNumber:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},spellCheck:Boolean,status:{type:String,default:void 0,validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tips:{type:[String,Function]},type:{type:String,default:"text",validator:function(e){return!e||["text","number","url","tel","password","search","submit","hidden"].includes(e)}},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onCompositionend:Function,onCompositionstart:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onValidate:Function,onWheel:Function};function lg(e){var n=t.getCurrentInstance(),r=t.computed((function(){return n.props.readonly})),o=t.inject("formReadonly",Object.create(null));return t.computed((function(){var t,n,a;return Hd(null==e||null===(t=e.beforeReadonly)||void 0===t?void 0:t.value)?e.beforeReadonly.value:Hd(null==r?void 0:r.value)?r.value:Hd(null==e||null===(n=e.afterReadonly)||void 0===n?void 0:n.value)?e.afterReadonly.value:!!Hd(null===(a=o.readonly)||void 0===a?void 0:a.value)&&o.readonly.value}))}var sg=function(){var e=cc();return t.computed((function(){var t="".concat(e.value,"-form"),n="".concat(e.value,"-input"),r="".concat(e.value,"-is");return{form:t,label:"".concat(t,"__label"),labelTop:"".concat(t,"__label--top"),inline:"".concat(t,"-inline"),formItem:"".concat(t,"__item"),formItemWithHelp:"".concat(t,"__item-with-help"),formItemWithExtra:"".concat(t,"__item-with-extra"),controls:"".concat(t,"__controls"),controlsContent:"".concat(t,"__controls-content"),status:"".concat(t,"__status"),extra:"".concat(n,"__extra"),help:"".concat(n,"__help"),success:"".concat(r,"-success"),successBorder:"".concat(t,"--success-border"),error:"".concat(r,"-error"),warning:"".concat(r,"-warning")}}))},cg=function(e){return e.TO_BE_VALIDATED="not",e.SUCCESS="success",e.FAIL="fail",e}(cg||{}),ug=Symbol("FormProvide"),dg=Symbol("FormItemProvide");function pg(e){var n=t.computed((function(){var t,n=e.value,r=n.maxlength,o=n.maxcharacter,a=n.value;if(El(a))return String(a);if(r&&o&&$m.warn("Input","Pick one of maxlength and maxcharacter please."),r){var i=null!=a&&a.length?g(null!=(t=a)?t:"").length:0;return"".concat(i,"/").concat(r)}return o?"".concat(Sl(a||""),"/").concat(o):""})),r=t.computed((function(){if(n.value){var e=pl(n.value.split("/"),2),t=e[0],r=e[1];return Number(t)>Number(r)?"error":""}return""})),o=t.computed((function(){return e.value.status||r.value})),a=function(){var t,n;null===(t=(n=e.value).onValidate)||void 0===t||t.call(n,{error:r.value?"exceed-maximum":void 0})};return t.watch(r,a),t.onMounted((function(){r.value&&a()})),{tStatus:o,limitNumber:n,getValueByLimitNumber:function(t){var n,r,o,a=e.value,i=a.allowInputOverMax,l=a.maxlength,s=a.maxcharacter;if(!l&&!s||i||!t)return t;if(l)return n=t,r=l,g(null!=o?o:"").slice().length===r?o||"":g(null!=n?n:"").slice(0,r).join("");if(s){var c=Sl(t,s);if(C(c))return c.characters}}}}function fg(e,t){return"number"===t?e||0===e?Number(e):void 0:e}function hg(e,n){var r=t.toRefs(e),o=r.value,a=r.modelValue,i=t.ref(),l=t.ref(!1),s=t.ref(),c=t.ref(null),u=t.ref(),d=Ud(),p=pl(Fm(o,a,e.defaultValue,e.onChange),2),f=p[0],h=p[1],m=t.ref(!1),v=t.ref(!1),g=t.ref(e.type),b=t.ref(null),y=pg(t.computed((function(){return{value:[void 0,null].includes(f.value)?void 0:String(f.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}))),w=y.limitNumber,k=y.getValueByLimitNumber,x=y.tStatus,E=t.computed((function(){return(f.value&&!d.value&&e.clearable&&!e.readonly||e.showClearIconOnEmpty)&&m.value})),C=function(){var e;v.value=!0,null===(e=b.value)||void 0===e||e.focus()},S=function(n){var r,o=n.target.value;"number"!==e.type&&"string"==typeof f.value&&o.length>(null===(r=f.value)||void 0===r?void 0:r.length)&&(o=k(o)),h(fg(o,e.type),{e:n,trigger:"input"}),t.nextTick((function(){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=b.value;if(t){var n=String(e);t.value&&t.value!==n&&(t.value=n)}}(f.value)}))},O=t.inject(dg,void 0);return t.watch((function(){return e.autofocus}),(function(e){!0===e&&t.nextTick((function(){var e;null===(e=b.value)||void 0===e||e.focus()}))}),{immediate:!0}),t.watch(f,(function(t,n){var r="number"===e.type;void 0===n&&e.format&&"number"!=typeof t&&!r?i.value=e.format(t):i.value=t;var o="number"==typeof t?t:k(t);o===t||r||h(o,{trigger:"initial"})}),{immediate:!0}),t.watch((function(){return e.type}),(function(e){g.value=e}),{immediate:!0}),n({inputRef:b,focus:C,blur:function(){var e;v.value=!1,null===(e=b.value)||void 0===e||e.blur()}}),{isHover:m,focused:v,renderType:g,showClear:E,inputRef:b,clearIconRef:c,inputValue:i,isComposition:l,compositionValue:s,limitNumber:w,tStatus:x,emitFocus:function(t){var n;m.value&&v.value||(i.value=f.value,e.disabled||(v.value=!0,null===(n=e.onFocus)||void 0===n||n.call(e,f.value,{e:t})))},formatAndEmitBlur:function(t){var n;(function(){var e,t=u.value;if(!(t&&t.tagName&&null!==(e=c.value)&&void 0!==e&&e.$el&&["path","svg"].includes(t.tagName)))return!1;for(;t;){var n;if((null===(n=c.value)||void 0===n?void 0:n.$el)===t)return!0;t=t.parentNode}return!1})()?C():(e.format&&(i.value="number"==typeof f.value||"number"===e.type?f.value:e.format(f.value)),v.value=!1,null===(n=e.onBlur)||void 0===n||n.call(e,f.value,{e:t}),null==O||O.handleBlur())},onHandleCompositionend:function(t){var n;l.value=!1,s.value="",S(t),null===(n=e.onCompositionend)||void 0===n||n.call(e,String(f.value),{e:t})},onHandleCompositionstart:function(t){var n;l.value=!0;var r=t.currentTarget.value;s.value=r,null===(n=e.onCompositionstart)||void 0===n||n.call(e,String(f.value),{e:t})},onRootClick:function(t){var n,r;null===(n=b.value)||void 0===n||n.focus(),null===(r=e.onClick)||void 0===r||r.call(e,{e:t})},emitPassword:function(){var e="password"===g.value?"text":"password";g.value=e},handleInput:function(e){var t=e.inputType&&"insertCompositionText"===e.inputType,n=e.currentTarget.value;t||l.value?s.value=n:S(e)},emitClear:function(t){var n,r=t.e,o="number"===e.type?void 0:"";h(o,{e:r,trigger:"clear"}),null===(n=e.onClear)||void 0===n||n.call(e,{e:r})},onClearIconMousedown:function(e){u.value=e.target},innerValue:f}}function mg(e,n,r){var o=t.toRefs(e),a=o.autoWidth,i=o.placeholder,l=t.ref(null),s=t.ref(null),c=function(){if(l.value&&n.value){var e=l.value.getBoundingClientRect().width;n.value.style.width="".concat(e||0,"px")}};Wm(n,(function(){a.value&&(s.value=setTimeout((function(){c(),clearTimeout(s.value)}),100))})),t.onBeforeUnmount((function(){clearTimeout(s.value)}));return t.onMounted((function(){a.value&&t.watch([r,i],(function(){a.value&&t.nextTick((function(){c()}))}),{immediate:!0})})),{inputPreRef:l}}var vg=["isHover","tStatus","inputRef","renderType","showClear","focused","inputValue","isComposition","compositionValue","innerValue","limitNumber"];function gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gg(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yg(e){var t={};return Object.keys(e).forEach((function(n){wl(e[n])||(t[n]=e[n])})),t}var wg=t.defineComponent({name:"TInput",props:bg(bg({},ig),{},{showInput:{type:Boolean,default:!0},keepWrapperWidth:{type:Boolean,default:!1}}),setup:function(e,n){var r=n.expose,o=lc("input").globalConfig,a=ih({BrowseIcon:mp,BrowseOffIcon:dp,CloseCircleFilledIcon:jp}),i=a.BrowseIcon,l=a.BrowseOffIcon,s=a.CloseCircleFilledIcon,c=lg(),u=Ud(),d=cc("input"),p=cc("input__wrap"),f=cc("input__tips"),h=uc(),m=h.STATUS,v=h.SIZE,g=cc(),b=Vd(),y=hg(e,r),k=y.isHover,x=y.tStatus,E=y.inputRef,C=y.renderType,S=y.showClear,O=y.focused,_=y.inputValue,N=y.isComposition,T=y.compositionValue,A=y.innerValue,M=y.limitNumber,I=hl(y,vg),P=mg(e,E,A).inputPreRef,L=function(e,t){var n=function(e){return t.value=e};return{isHover:t,handleKeydown:function(t){if(!e.disabled){var n,r,o=t.code,a=fg(t.currentTarget.value,e.type);/enter/i.test(o)||/enter/i.test(t.key)?null===(n=e.onEnter)||void 0===n||n.call(e,a,{e:t}):null===(r=e.onKeydown)||void 0===r||r.call(e,a,{e:t})}},handleKeyUp:function(t){var n;if(!e.disabled){var r=fg(t.currentTarget.value,e.type);null===(n=e.onKeyup)||void 0===n||n.call(e,r,{e:t})}},handleKeypress:function(t){var n;if(!e.disabled){var r=fg(t.currentTarget.value,e.type);null===(n=e.onKeypress)||void 0===n||n.call(e,r,{e:t})}},onHandlePaste:function(t){var n;if(!e.disabled){var r=t.clipboardData||window.clipboardData;null===(n=e.onPaste)||void 0===n||n.call(e,{e:t,pasteValue:null==r?void 0:r.getData("text/plain")})}},onHandleMousewheel:function(t){var n;return null===(n=e.onWheel)||void 0===n?void 0:n.call(e,{e:t})},onInputMouseenter:function(t){var r;n(!0),null===(r=e.onMouseenter)||void 0===r||r.call(e,{e:t})},onInputMouseleave:function(t){var r;n(!1),null===(r=e.onMouseleave)||void 0===r||r.call(e,{e:t})}}}(e,k),R=t.computed((function(){var t;return null!==(t=e.placeholder)&&void 0!==t?t:o.value.placeholder})),B=t.computed((function(){var t;return yg({autofocus:e.autofocus,disabled:u.value,readonly:c.value,placeholder:R.value,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0,type:C.value,autocomplete:null!==(t=e.autocomplete)&&void 0!==t?t:o.value.autocomplete||void 0,unselectable:c.value?"on":void 0,spellcheck:e.spellCheck})})),D=t.computed((function(){return[p.value,w({},"".concat(d.value,"--auto-width"),e.autoWidth&&!e.keepWrapperWidth)]})),V=yg({onFocus:I.emitFocus,onBlur:I.formatAndEmitBlur,onKeydown:L.handleKeydown,onKeyup:L.handleKeyUp,onKeypress:L.handleKeypress,onPaste:L.onHandlePaste,onCompositionend:I.onHandleCompositionend,onCompositionstart:I.onHandleCompositionstart});return function(){var n,r,o=b("prefixIcon"),a=b("suffixIcon"),p=b("passwordIcon"),h=b("label",{silent:!0}),y=b("suffix"),k=M.value&&e.showLimitNumber?t.createVNode("div",{class:["".concat(g.value,"-input__limit-number"),w({},"".concat(g.value,"-is-disabled"),u.value)]},[M.value]):null,j=h?t.createVNode("div",{class:"".concat(d.value,"__prefix")},[h]):null,F=y||k?t.createVNode("div",{class:"".concat(d.value,"__suffix")},[y,k]):null;"password"===e.type&&("password"===C.value?a=t.createVNode(l,{class:"".concat(d.value,"__suffix-clear"),onClick:I.emitPassword},null):"text"===C.value&&(a=t.createVNode(i,{class:"".concat(d.value,"__suffix-clear"),onClick:I.emitPassword},null))),S.value&&("password"===e.type?p=t.createVNode(s,{ref:I.clearIconRef,class:"".concat(d.value,"__suffix-clear"),onClick:I.emitClear,onMousedown:I.onClearIconMousedown},null):a=t.createVNode(s,{ref:I.clearIconRef,class:"".concat(d.value,"__suffix-clear"),onClick:I.emitClear,onMousedown:I.onClearIconMousedown},null));var z=[d.value,e.inputClass,w(w(w(w(w(w(w(w(w(w({},v.value[e.size],"medium"!==e.size),m.value.disabled,u.value),m.value.focused,!u.value&&O.value),"".concat(g.value,"-is-").concat(x.value),x.value&&"default"!==x.value),"".concat(g.value,"-align-").concat(e.align),"left"!==e.align),"".concat(g.value,"-is-readonly"),c.value),"".concat(d.value,"--prefix"),o||j),"".concat(d.value,"--suffix"),a||F),"".concat(d.value,"--borderless"),e.borderless),"".concat(d.value,"--focused"),O.value)],$=b("tips"),H=[f.value,"".concat(g.value,"-tips"),"".concat(g.value,"-is-").concat(x.value||"default")];return t.withDirectives(t.createVNode("div",{class:D.value},[t.createVNode("div",{class:z,onClick:I.onRootClick,onMouseenter:L.onInputMouseenter,onMouseleave:L.onInputMouseleave,onWheel:L.onHandleMousewheel},[o?t.createVNode("span",{class:["".concat(d.value,"__prefix"),"".concat(d.value,"__prefix-icon")]},[o]):null,j,t.createVNode("input",t.mergeProps({class:["".concat(d.value,"__inner"),w({},"".concat(d.value,"--soft-hidden"),!e.showInput)]},B.value,V,{ref:E,value:N.value?null!==(n=T.value)&&void 0!==n?n:"":null!==(r=_.value)&&void 0!==r?r:"",onInput:function(e){return I.handleInput(e)}}),null),e.autoWidth&&t.createVNode("span",{ref:P,class:"".concat(g.value,"-input__input-pre")},[A.value||R.value]),F,p?t.createVNode("span",{class:["".concat(d.value,"__suffix"),"".concat(d.value,"__suffix-icon"),"".concat(d.value,"__clear")]},[p]):null,a?t.createVNode("span",{class:["".concat(d.value,"__suffix"),"".concat(d.value,"__suffix-icon"),w({},"".concat(d.value,"__clear"),S.value)]},[a]):null]),$&&t.createVNode("div",{class:H},[$])]),[[t.vShow,"hidden"!==e.type]])}}}),kg={separate:Boolean},xg=t.defineComponent({name:"TInputGroup",props:kg,setup:function(e){var n=cc("input-group"),r=Vd(),o=t.computed((function(){return[n.value,w({},"".concat(n.value,"--separate"),e.separate)]}));return function(){return t.createVNode("div",{class:o.value},[r("default")])}}}),Eg=Nd(wg);Nd(xg);var Cg={align:{type:String,validator:function(e){return!e||["left","center","right"].includes(e)}},allowInputOverLimit:{type:Boolean,default:!0},autoWidth:Boolean,decimalPlaces:{type:Number,default:void 0},disabled:{type:Boolean,default:void 0},format:{type:Function},inputProps:{type:Object},label:{type:[String,Function]},largeNumber:Boolean,max:{type:[String,Number],default:1/0},min:{type:[String,Number],default:-1/0},placeholder:{type:String,default:void 0},readonly:{type:Boolean,default:void 0},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},step:{type:[String,Number],default:1},suffix:{type:[String,Function]},theme:{type:String,default:"row",validator:function(e){return!e||["column","row","normal"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number],default:void 0},modelValue:{type:[String,Number],default:void 0},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onEnter:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};function Sg(e){return new Array(e).fill(0).join("")}function Og(e){if(!e)return!0;if(El(e))return!Number.isNaN(e);if(!/^[0-9|e|E|-]+\.*[0-9|e|E|-]*$/.test(e))return!1;for(var t=0,n=0,r=0,o=0,a=e.length;o<a;o++){if("."===e[o]&&(r+=1)>1)return!1;if(/(e|E)+/.test(e[o])&&(t+=1)>1)return!1;if("-"===e[o]&&(n+=1)>2)return!1}return!0}function _g(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return-1!==e.indexOf(".")?($m.error("InputNumber","num is not a integer number."),e):!e||"0"===e&&t?"":"0"===e?e:(t?e.replace(/0+$/,""):e.replace(/^0+/,""))||"0"}function Ng(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=_g(e,n),o=_g(t,n),a=r.length>o.length,i=a?r:o,l=a?o:r,s=[],c=[],u=n?0:i.length-l.length,d=n?l.length:i.length,p=d-1;p>=0;p--){var f=p-u,h=Number(i[p])+(Number(l[f])||0)+(c[p]||0);h>=10&&(c[p-1]=1),s.unshift(String(h%10))}return c[-1]&&s.unshift("1"),n?s.concat(i.slice(d,i.length)).join(""):s.join("")}function Tg(e,t){var n=pl(e.split("."),2),r=n[0],o=void 0===r?"0":r,a=n[1],i=void 0===a?"0":a,l=pl(t.split("."),2),s=l[0],c=void 0===s?"0":s,u=l[1],d=void 0===u?"0":u,p=Ng(o,c);if("0"===i&&"0"===d)return p;var f=_g(i,!0),h=_g(d,!0),m=Ng(f,h,!0),v=m.length;return v>f.length&&v>h.length?[_g(Ng(p,"1")),_g(m.slice(1),!0)].filter((function(e){return e})).join("."):[_g(p),_g(m,!0)].filter((function(e){return e})).join(".")}function Ag(e,t){var n=_g(e),r=_g(t);if(n.length===r.length){for(var o=0,a=n.length;o<a;o++){if(n[o]>r[o])return 1;if(n[o]<r[o])return-1}return 0}return n.length>r.length?1:-1}function Mg(e,t){for(var n=e&&"0"!==e?e.replace(/0+$/,""):"0",r=t&&"0"!==t?t.replace(/0+$/,""):"0",o=0,a=Math.max(n.length,r.length);o<a;o++){if((n[o]||0)>(r[o]||0))return 1;if((n[o]||0)<(r[o]||0))return-1}return 0}function Ig(e){var t=pl(e.split("e"),2),n=t[0],r=t[1];if(!r)return e;var o=pl(e.split("."),2),a=o[0],i=o[1],l=void 0===i?"":i,s=Number(r),c=pl(l.split("e"),1)[0];if(s>c.length){var u=Sg(s-c.length);return n.replace(/(^0+|\.)/g,"")+u}var d=a.replace(/^0+/,"")+c.slice(0,s),p=c.slice(s);return p?[d,p].join("."):d}function Pg(e){return[-1/0,1/0].includes(Number(e))}function Lg(e){return Number(e)<Number.MAX_SAFE_INTEGER&&Number(e)>Number.MIN_SAFE_INTEGER}function Rg(e,t,n){var r=Lg(e)&&Lg(t)&&!n,o=Pg(e)||Pg(t);return r||o?Number(e)===Number(t)?0:Number(e)>Number(t)?1:-1:function(e,t){var n=pl(Ig(e).split("."),2),r=n[0],o=n[1],a=pl(Ig(t).split("."),2),i=a[0],l=a[1],s=Ag(r.replace("-",""),i.replace("-","")),c=r.includes("-"),u=i.includes("-");return c&&!u?-1:!c&&u?1:c&&u?0===s?0:s>0?-1:1:0===s?Mg(o,l):s}(String(e),String(t))}function Bg(e,t,n){if(e===t)return"0";for(var r=n||{},o=r.decimal,a=r.stayZero,i=_g(e),l=_g(t),s=Ag(i,l)>0,c=s?i:l,u=s?l:i,d=[],p=[],f=o?0:c.length-u.length,h=o?u.length:c.length,m=h-1;m>=0;m--){var v=m-f,g=Number(c[m])-(Number(u[v])||0)-(p[m]||0);g<0&&(p[m-1]=1,g+=10),d.unshift(String(g))}if(o)return d.concat(c.slice(h,c.length)).join("");var b=d.join("");return a||(b=b.replace(/^0+/,"")),_g(s?b:"-".concat(b))}function Dg(e,t){if(e===t)return"0";var n=Rg(e,t,!0)>0,r=n?t:e,o=pl((n?e:t).split("."),2),a=o[0],i=o[1],l=void 0===i?"0":i,s=pl(r.split("."),2),c=s[0],u=s[1],d=void 0===u?"0":u,p=Bg(a,c);if("0"===l&&"0"===d)return n?p:"-".concat(p);var f="",h=l;l.length<d.length&&(h="".concat(l).concat(Sg(d.length-l.length))),Mg(h,d)>=0?f=Bg(h,d,{decimal:!0}):(l.length<d.length||"0"===l?(f=Bg("1".concat(h),d,{stayZero:!0}),f=Sg(d.length-f.length)+f):f=Bg(l,d,{decimal:!0}),p=Bg(p,"1"));var m=f?[p,f].join("."):p;return n?m:"-".concat(m)}function Vg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]))return Number(e).toFixed(t);if(!bl(e))return String(e);var n=pl(e.split("."),2),r=n[0],o=n[1];if(!o)return t?[e,Sg(t)].join("."):e;if(0===t)return Number(o[0])>=5?Tg(r,"1"):r;var a=o.slice(0,t);return o.length<t?a+=Sg(t-o.length):a=Number(o[t])>=5?Tg(a,"1"):a,[r,a].join(".")}function jg(e,t){var n,r;if(!e||!t)return(e||0)+(t||0);var o=(null===(n=e.toString().split(".")[1])||void 0===n?void 0:n.length)||0,a=(null===(r=t.toString().split(".")[1])||void 0===r?void 0:r.length)||0;if(!o&&!a)return e+t;var i=e,l=t,s=Math.abs(o-a),c=Math.pow(10,Math.max(o,a));if(s>0){var u=Math.pow(10,s);o>a?(i=Number(e.toString().replace(".","")),l=Number(t.toString().replace(".",""))*u):(i=Number(e.toString().replace(".",""))*u,l=Number(t.toString().replace(".","")))}else i=Number(e.toString().replace(".","")),l=Number(t.toString().replace(".",""));return(i+l)/c}function Fg(e,t){var n,r;if(!e||!t)return(e||0)-(t||0);var o=(null===(n=e.toString().split(".")[1])||void 0===n?void 0:n.length)||0,a=(null===(r=t.toString().split(".")[1])||void 0===r?void 0:r.length)||0,i=Math.pow(10,Math.max(o,a));return Number(((e*i-t*i)/i).toFixed(o>=a?o:a))}function zg(e){var t=e.op,n=e.step,r=e.lastValue,o=e.max,a=e.min,i=e.largeNumber;if(n<=0)return $m.error("InputNumber","step must be larger than 0."),r;var l,s,c,u=El(n)?String(n):n;return"add"===t?i&&bl(r)?l=function(e,t){var n="-"===e[0],r="-"===t[0];if(n&&!r)return Dg(t,e.slice(1));if(n&&r){var o=Tg(t.slice(1),e.slice(1));return"-".concat(o)}return!n&&r?Dg(e,t.slice(1)):Tg(e,t)}(String(r),String(u)):(s=Number(r||0),c=Number(n),l=s<0&&c>0?Fg(c,Math.abs(s)):s<0&&c<0?-1*jg(Math.abs(s),Math.abs(c)):s>0&&c<0?Fg(s,Math.abs(c)):jg(s,c)):"reduce"===t&&(l=i&&bl(r)?function(e,t){var n="-"===e[0],r="-"===t[0];if(n&&!r){var o=Tg(e.slice(1),t);return"-".concat(o)}return n&&r?Dg(t.slice(1),e.slice(1)):!n&&r?Tg(e,t.slice(1)):Dg(e,t)}(String(r),String(u)):function(e,t){return e<0&&t>0?-1*jg(Math.abs(e),t):e<0&&t<0?Fg(Math.abs(t),Math.abs(e)):e>0&&t<0?jg(e,Math.abs(t)):Fg(e,t)}(Number(r||0),Number(n))),wl(r)&&(l=function(e,t){if(""!==e){var n=t.max,r=t.min,o=t.lastValue,a=t.largeNumber;return Og(e)?!a||!bl(n)&&n!==1/0||!bl(r)&&r!==-1/0?Math.max(Number(r),Math.min(Number(n),Number(e))):Rg(n,e,a)<0?n:Rg(r,e,a)>0?r:e:o}}(l,{max:o,min:a,lastValue:r,largeNumber:i})),i?l:Number(l)}function $g(e){var t=e.largeNumber,n=e.value,r=e.max,o=e.min;if(!wl(n)&&!wl(t))return t&&El(n)&&$m.warn("InputNumber","largeNumber value must be a string."),Rg(n,r,t)>0?"exceed-maximum":Rg(n,o,t)<0?"below-minimum":void 0}var Hg=["-",".","e","E","+"];function Ug(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!["",null,void 0].includes(e)&&/\d+/.test(e)){var n=t.decimalPlaces,r=t.largeNumber,o=t.isToFixed,a=e.replace(/[.|+|\-|e]$/,"");return r&&(a=Ig(a)),void 0!==n&&(a=Vg(a,n,r)),r||o?a:parseFloat(a)}}function Wg(e){var n=function(){var e=lc().classPrefix,t={small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")},n={loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")};return{classPrefix:e,sizeClassNames:t,statusClassNames:n,classNames:{size:t,status:n}}}(),r=n.classPrefix,o=n.sizeClassNames,a=n.statusClassNames,i=t.toRefs(e),l=i.value,s=i.modelValue,c=i.max,u=i.min,d=pl(Fm(l,s,e.defaultValue,e.onChange),2),p=d[0],f=d[1],h=t.ref(),m=t.ref(""),v=Ud(),g=lg(),b=t.ref(),y=t.computed((function(){return v.value||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e&&0!==e||(n&&bl(e)?Rg(e,t,n)>0:e>t)}(p.value,e.min,e.largeNumber)})),k=t.computed((function(){return v.value||!function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return!e&&0!==e||(n&&bl(e)?Rg(e,t,n)<0:e<t)}(p.value,e.max,e.largeNumber)})),x=t.computed((function(){return["".concat(r.value,"-input-number"),o[e.size],w(w(w(w({},a.disabled,v.value),"".concat(r.value,"-is-controls-right"),"column"===e.theme),"".concat(r.value,"-input-number--").concat(e.theme),e.theme),"".concat(r.value,"-input-number--auto-width"),e.autoWidth)]})),E=t.computed((function(){return["".concat(r.value,"-input-number__decrease"),w({},a.disabled,y.value)]})),C=t.computed((function(){return["".concat(r.value,"-input-number__increase"),w({},a.disabled,k.value)]})),S=function(t){var n;if(!t&&0!==t)return"";var r=t||0===t?String(t):"";if(null===(n=h.value)||void 0===n||null===(n=n.inputRef)||void 0===n||!n.contains(document.activeElement)){var o=Ug(r,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber,isToFixed:!0});r=o||0===o?String(o):"",e.format&&(r=String(e.format(t,{fixedNumber:r})))}return r};t.watch(p,(function(t){var n=e.largeNumber,r=e.decimalPlaces,o=[void 0,null].includes(t)?"":String(t);if(!n&&!Number.isNaN(m.value)){parseFloat(m.value)!==t&&(m.value=S(o));var a=Number(Vg(o,r,n));void 0===r||[void 0,null].includes(t)||Number(a)===Number(p.value)||f(a,{type:"props",e:void 0})}n&&(m.value=S(o),void 0!==r&&Vg(o,r,n)!==t&&f(m.value,{type:"props",e:void 0}))}),{immediate:!0}),t.watch([p,c,u],(function(){var t;if(![void 0,"",null].includes(p.value)){var n=e.max,r=e.min,o=e.largeNumber,a=$g({value:p.value,largeNumber:o,max:n,min:r});b.value=a,null===(t=e.onValidate)||void 0===t||t.call(e,{error:a})}}),{immediate:!0});var O=function(t){var n=zg({op:t,step:e.step,max:e.max,min:e.min,lastValue:p.value,largeNumber:e.largeNumber});return{overLimit:$g({value:n,largeNumber:e.largeNumber,max:e.max,min:e.min}),newValue:n}},_=function(t){if(!y.value&&!g.value){var n=O("reduce");n.overLimit&&!e.allowInputOverLimit||f(n.newValue,{type:"reduce",e:t})}},N=function(t){if(!k.value&&!g.value){var n=O("add");n.overLimit&&!e.allowInputOverLimit||f(n.newValue,{type:"add",e:t})}},T=function(){h.value.focus()};return{classPrefix:r,wrapClasses:x,reduceClasses:E,addClasses:C,tDisabled:v,isError:b,listeners:{onBlur:function(t,n){var r,o=e.largeNumber,a=e.max,i=e.min,l=e.decimalPlaces;if(!e.allowInputOverLimit&&void 0!==p.value){var s,c,u=$g({value:p.value,largeNumber:o,max:a,min:i});if("below-minimum"===u)return f(i,{type:"blur",e:n.e}),void(null===(s=e.onBlur)||void 0===s||s.call(e,i,n));if("exceed-maximum"===u)return f(a,{type:"blur",e:n.e}),void(null===(c=e.onBlur)||void 0===c||c.call(e,a,n))}var d=Ug(t,{decimalPlaces:l,largeNumber:o});m.value=S(d),d!==p.value&&f(d,{type:"blur",e:n.e}),null===(r=e.onBlur)||void 0===r||r.call(e,d,n)},onFocus:function(t,n){var r;m.value=p.value||0===p.value?String(p.value):"",null===(r=e.onFocus)||void 0===r||r.call(e,t,n)},onKeydown:function(t,n){var r;if(!v.value){var o=n.e,a={ArrowUp:N,ArrowDown:_},i=o.code||o.key;void 0!==a[i]&&a[i](o),null===(r=e.onKeydown)||void 0===r||r.call(e,t,n)}},onKeyup:function(t,n){var r;null===(r=e.onKeyup)||void 0===r||r.call(e,t,n)},onKeypress:function(t,n){var r;null===(r=e.onKeypress)||void 0===r||r.call(e,t,n)},onEnter:function(t,n){var r;m.value=S(t);var o=Ug(t,{decimalPlaces:e.decimalPlaces,largeNumber:e.largeNumber});o!==t&&String(o)!==t&&f(o,{type:"enter",e:n.e}),null===(r=e.onEnter)||void 0===r||r.call(e,o,n)},onClick:T},userInput:m,tValue:p,inputRef:h,focus:T,blur:function(){h.value.blur()},handleReduce:_,handleAdd:N,onInnerInputChange:function(t,n){var r,o=n.e,a=/^[-+]?\d{1,3}(,\d{3})*(\.(\d*))?$/.test(r=t)?r.replace(/,/g,""):r;if(function(e,t){var n;if(["",null,void 0].includes(e))return!0;if("00"===e.slice(0,2))return!1;if((null===(n=e.match(/\./g))||void 0===n?void 0:n.length)>1)return!1;var r=e.slice(1);return!(/(\+|-)/.test(r)&&!/e+/i.test(r)||!(t&&Og(e)||!Number.isNaN(Number(e))||Hg.includes(e.slice(-1)))||/e/i.test(e)&&!/\de/i.test(e))}(a,e.largeNumber))if(m.value=a,e.largeNumber)f(a,{type:"input",e:o});else if(function(e,t){return parseFloat(e)!==t&&!Number.isNaN(Number(e))}(String(a),Number(p.value))){var i=""===a?void 0:Number(a);f(i,{type:"input",e:o})}},isReadonly:g}}function Gg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Kg=t.defineComponent({name:"TInputNumber",props:Cg,setup:function(e,n){var r=Vd(),o=ih({AddIcon:rp,RemoveIcon:Of,ChevronDownIcon:Ep,ChevronUpIcon:Rp}),a=o.AddIcon,i=o.RemoveIcon,l=o.ChevronDownIcon,s=o.ChevronUpIcon,c=Wg(e),u=c.inputRef;return n.expose(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gg(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},c)),function(){var o="column"===e.theme?t.createVNode(l,{size:e.size},null):t.createVNode(i,{size:e.size},null),d="column"===e.theme?t.createVNode(s,{size:e.size},null):t.createVNode(a,{size:e.size},null),p=c.isError.value?"error":e.status,f=c.classPrefix.value,h=r("tips");return t.createVNode("div",{class:c.wrapClasses.value},["normal"!==e.theme&&t.createVNode(Kd,{class:c.reduceClasses.value,disabled:c.tDisabled.value,onClick:c.handleReduce,variant:"outline",shape:"square",icon:function(){return o}},null),t.createVNode(Eg,t.mergeProps({ref:u,disabled:c.tDisabled.value,readonly:c.isReadonly.value,autocomplete:"off",placeholder:e.placeholder,unselectable:c.isReadonly.value?"on":"off",autoWidth:e.autoWidth,align:e.align||("row"===e.theme?"center":void 0),status:p,label:e.label,suffix:e.suffix},c.listeners,e.inputProps,{value:c.userInput.value,onChange:c.onInnerInputChange}),n.slots),"normal"!==e.theme&&t.createVNode(Kd,{class:c.addClasses.value,disabled:c.tDisabled.value,onClick:c.handleAdd,variant:"outline",shape:"square",icon:function(){return d}},null),h&&t.createVNode("div",{class:"".concat(f,"-input__tips ").concat(f,"-tips ").concat(f,"-is-").concat(p)},[h])])}}}),qg=Nd(Kg),Yg=li,Xg=Vo,Zg=je,Jg=E,Qg=Fo;var eb=function(e,t,n,r){if(!Jg(e))return e;for(var o=-1,a=(t=Xg(t,e)).length,i=a-1,l=e;null!=l&&++o<a;){var s=Qg(t[o]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(o!=i){var u=l[s];void 0===(c=r?r(u,s,l):void 0)&&(c=Jg(u)?u:Zg(t[o+1])?[]:{})}Yg(l,s,c),l=l[s]}return e},tb=Ho,nb=eb,rb=Vo;var ob=function(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],l=tb(e,i);n(l,i)&&nb(a,rb(i,e),l)}return a},ab=ob,ib=ta;var lb=function(e,t){return ab(e,t,(function(t,n){return ib(e,n)}))};const sb=x(Ev((function(e,t){return null==e?{}:lb(e,t)})));var cb=function(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1},ub=function(e){return e!=e},db=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1};var pb=function(e,t,n){return t==t?db(e,t,n):cb(e,ub,n)};var fb=zn,hb=function(e,t){return!!(null==e?0:e.length)&&pb(e,t,0)>-1},mb=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1},vb=So,gb=Ge,bb=$n,yb=Math.min;var wb=Ka;var kb=So,xb=function(e,t,n){for(var r=n?mb:hb,o=e[0].length,a=e.length,i=a,l=Array(a),s=1/0,c=[];i--;){var u=e[i];i&&t&&(u=vb(u,gb(t))),s=yb(u.length,s),l[i]=!n&&(t||o>=120&&u.length>=120)?new fb(i&&u):void 0}u=e[0];var d=-1,p=l[0];e:for(;++d<o&&c.length<s;){var f=u[d],h=t?t(f):f;if(f=n||0!==f?f:0,!(p?bb(p,h):r(c,h,n))){for(i=a;--i;){var m=l[i];if(!(m?bb(m,h):r(e[i],h,n)))continue e}p&&p.push(h),c.push(f)}}return c},Eb=function(e){return wb(e)?e:[]};const Cb=x(nl((function(e){var t=kb(e,Eb);return t.length&&t[0]===e[0]?xb(t):[]})));var Sb={allowInput:Boolean,autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:{type:Boolean,default:void 0},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,minCollapsedNum:{type:Number,default:0},multiple:Boolean,panel:{type:[String,Function]},placeholder:{type:String,default:""},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,prefixIcon:{type:Function},readonly:Boolean,reserveKeyword:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array,Date],default:void 0},valueDisplay:{type:[String,Function]},onBlur:Function,onClear:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onPopupVisibleChange:Function,onTagChange:Function},Ob=["tips"];function _b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nb(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_b(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Tb=["status","clearable","disabled","label","placeholder","readonly","prefixIcon","suffix","suffixIcon","onPaste","onMouseenter","onMouseleave","size","autofocus"],Ab={label:"label",value:"value",children:"children"};function Mb(e,n,r){var o,a=t.toRefs(e),i=a.value,l=a.keys,s=a.inputValue,c=cc(),u=t.ref(e.autofocus),d=t.ref(),p=pl(Dm(s,null!==(o=e.defaultInputValue)&&void 0!==o?o:"",e.onInputChange,"inputValue"),2),f=p[0],h=p[1],m=Vd(),v=Ud(),g=t.computed((function(){return Nb(Nb({},sb(e,Tb)),{},{disabled:v.value})})),b=function(t){var n,r;null==t||null===(n=t.e)||void 0===n||n.stopPropagation(),null===(r=e.onClear)||void 0===r||r.call(e,t),h("",{trigger:"clear"})},y=function(t,n){e.allowInput&&h(t,Nb(Nb({},n),{},{trigger:n.trigger||"input"}))},w=function(t,n){var r,o,a=m("label");if(!a&&!t)return[];if(t&&(null!==(r=e.valueDisplayOptions)&&void 0!==r&&r.usePlaceholder&&!i.value||null!==(o=e.valueDisplayOptions)&&void 0!==o&&o.useInputDisplay&&n))return[a];return[a,t]},k=function(t,n,r){var o,a;if(t&&(null===(o=e.valueDisplayOptions)||void 0===o||!o.useInputDisplay||null!==(a=e.valueDisplayOptions)&&void 0!==a&&a.useInputDisplay&&!r))return;return n},x=function(t){var n,r;if(t&&(null===(n=e.valueDisplayOptions)||void 0===n||!n.usePlaceholder||null!==(r=e.valueDisplayOptions)&&void 0!==r&&r.usePlaceholder&&i.value))return"";return e.placeholder};return{inputRef:d,isSingleFocus:u,commonInputProps:g,singleInputValue:f,onInnerClear:b,renderSelectSingle:function(o){var a,s=m("valueDisplay"),p=o&&e.allowInput?f.value:function(e,t){var n=Nb(Nb({},Ab),t);return C(e)?e[n.label]:e}(i.value,l.value),h=w(s,o),E=Nb(Nb({},g.value),{},{value:k(s,p,o),label:h.length?function(){return h}:void 0,autoWidth:e.autoWidth,readonly:!e.allowInput||e.readonly,placeholder:x(s),suffixIcon:!v.value&&e.loading?function(){return t.createVNode(Td,{loading:!0,size:"small"},null)}:e.suffixIcon,showClearIconOnEmpty:Boolean(e.clearable&&(f.value||p)&&!v.value&&!e.readonly)},e.inputProps),S=n.slots;S.tips;var O=hl(S,Ob),_=o?["".concat(c.value,"-input--focused"),"".concat(c.value,"-is-focused"),null==E?void 0:E.inputClass]:null==E?void 0:E.inputClass;return t.createVNode(Eg,t.mergeProps({ref:d,style:null===(a=n.attrs)||void 0===a?void 0:a.style},Nb({onChange:y,onClear:b,onEnter:function(t,n){var r;null===(r=e.onEnter)||void 0===r||r.call(e,i.value,Nb(Nb({},n),{},{inputValue:t}))},onFocus:function(t,n){var o,a,l=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();u.value||null!=l&&l.hover||(u.value=!0,null===(a=e.onFocus)||void 0===a||a.call(e,i.value,Nb(Nb({},n),{},{inputValue:t})))},onBlur:function(t,n){var o,a,l=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();null!=l&&l.hover||(u.value=!1,null===(a=e.onBlur)||void 0===a||a.call(e,i.value,Nb(Nb({},n),{},{inputValue:t})))}},E),{inputClass:_}),O)}}}var Ib={autoWidth:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},disabled:Boolean,dragSort:Boolean,excessTagsDisplayType:{type:String,default:"break-line",validator:function(e){return!e||["scroll","break-line"].includes(e)}},inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number],default:""},label:{type:[String,Function]},max:{type:Number},minCollapsedNum:{type:Number,default:0},placeholder:{type:String,default:void 0},prefixIcon:{type:Function},readonly:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tag:{type:[String,Function]},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},valueDisplay:{type:[String,Function]},onBlur:Function,onChange:Function,onClear:Function,onClick:Function,onDragSort:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onMouseenter:Function,onMouseleave:Function,onPaste:Function,onRemove:Function};function Pb(e){return(Pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Lb=/^\s+/,Rb=/\s+$/;function Bb(e,t){if(t=t||{},(e=e||"")instanceof Bb)return e;if(!(this instanceof Bb))return new Bb(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,l=!1;"string"==typeof e&&(e=function(e){e=e.replace(Lb,"").replace(Rb,"").toLowerCase();var t,n=!1;if(Qb[e])e=Qb[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=py.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=py.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=py.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=py.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=py.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=py.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=py.hex8.exec(e))return{r:oy(t[1]),g:oy(t[2]),b:oy(t[3]),a:sy(t[4]),format:n?"name":"hex8"};if(t=py.hex6.exec(e))return{r:oy(t[1]),g:oy(t[2]),b:oy(t[3]),format:n?"name":"hex"};if(t=py.hex4.exec(e))return{r:oy(t[1]+""+t[1]),g:oy(t[2]+""+t[2]),b:oy(t[3]+""+t[3]),a:sy(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=py.hex3.exec(e))return{r:oy(t[1]+""+t[1]),g:oy(t[2]+""+t[2]),b:oy(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==Pb(e)&&(fy(e.r)&&fy(e.g)&&fy(e.b)?(s=e.r,c=e.g,u=e.b,t={r:255*ny(s,255),g:255*ny(c,255),b:255*ny(u,255)},i=!0,l="%"===String(e.r).substr(-1)?"prgb":"rgb"):fy(e.h)&&fy(e.s)&&fy(e.v)?(r=iy(e.s),o=iy(e.v),t=function(e,t,n){e=6*ny(e,360),t=ny(t,100),n=ny(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),l=n*(1-(1-o)*t),s=r%6,c=[n,i,a,a,l,n][s],u=[l,n,n,i,a,a][s],d=[a,a,l,n,n,i][s];return{r:255*c,g:255*u,b:255*d}}(e.h,r,o),i=!0,l="hsv"):fy(e.h)&&fy(e.s)&&fy(e.l)&&(r=iy(e.s),a=iy(e.l),t=function(e,t,n){var r,o,a;function i(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=ny(e,360),t=ny(t,100),n=ny(n,100),0===t)r=o=a=n;else{var l=n<.5?n*(1+t):n+t-n*t,s=2*n-l;r=i(s,l,e+1/3),o=i(s,l,e),a=i(s,l,e-1/3)}return{r:255*r,g:255*o,b:255*a}}(e.h,r,a),i=!0,l="hsl"),e.hasOwnProperty("a")&&(n=e.a));var s,c,u;return n=ty(n),{ok:i,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function Db(e,t,n){e=ny(e,255),t=ny(t,255),n=ny(n,255);var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),l=(a+i)/2;if(a==i)r=o=0;else{var s=a-i;switch(o=l>.5?s/(2-a-i):s/(a+i),a){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,l:l}}function Vb(e,t,n){e=ny(e,255),t=ny(t,255),n=ny(n,255);var r,o,a=Math.max(e,t,n),i=Math.min(e,t,n),l=a,s=a-i;if(o=0===a?0:s/a,a==i)r=0;else{switch(a){case e:r=(t-n)/s+(t<n?6:0);break;case t:r=(n-e)/s+2;break;case n:r=(e-t)/s+4}r/=6}return{h:r,s:o,v:l}}function jb(e,t,n,r){var o=[ay(Math.round(e).toString(16)),ay(Math.round(t).toString(16)),ay(Math.round(n).toString(16))];return r&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Fb(e,t,n,r){return[ay(ly(r)),ay(Math.round(e).toString(16)),ay(Math.round(t).toString(16)),ay(Math.round(n).toString(16))].join("")}function zb(e,t){t=0===t?0:t||10;var n=Bb(e).toHsl();return n.s-=t/100,n.s=ry(n.s),Bb(n)}function $b(e,t){t=0===t?0:t||10;var n=Bb(e).toHsl();return n.s+=t/100,n.s=ry(n.s),Bb(n)}function Hb(e){return Bb(e).desaturate(100)}function Ub(e,t){t=0===t?0:t||10;var n=Bb(e).toHsl();return n.l+=t/100,n.l=ry(n.l),Bb(n)}function Wb(e,t){t=0===t?0:t||10;var n=Bb(e).toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(-t/100*255))),n.g=Math.max(0,Math.min(255,n.g-Math.round(-t/100*255))),n.b=Math.max(0,Math.min(255,n.b-Math.round(-t/100*255))),Bb(n)}function Gb(e,t){t=0===t?0:t||10;var n=Bb(e).toHsl();return n.l-=t/100,n.l=ry(n.l),Bb(n)}function Kb(e,t){var n=Bb(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,Bb(n)}function qb(e){var t=Bb(e).toHsl();return t.h=(t.h+180)%360,Bb(t)}function Yb(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var n=Bb(e).toHsl(),r=[Bb(e)],o=360/t,a=1;a<t;a++)r.push(Bb({h:(n.h+a*o)%360,s:n.s,l:n.l}));return r}function Xb(e){var t=Bb(e).toHsl(),n=t.h;return[Bb(e),Bb({h:(n+72)%360,s:t.s,l:t.l}),Bb({h:(n+216)%360,s:t.s,l:t.l})]}function Zb(e,t,n){t=t||6,n=n||30;var r=Bb(e).toHsl(),o=360/n,a=[Bb(e)];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(Bb(r));return a}function Jb(e,t){t=t||6;for(var n=Bb(e).toHsv(),r=n.h,o=n.s,a=n.v,i=[],l=1/t;t--;)i.push(Bb({h:r,s:o,v:a})),a=(a+l)%1;return i}Bb.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=ty(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=Vb(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=Vb(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=Db(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=Db(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return jb(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,o){var a=[ay(Math.round(e).toString(16)),ay(Math.round(t).toString(16)),ay(Math.round(n).toString(16)),ay(ly(r))];if(o&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*ny(this._r,255))+"%",g:Math.round(100*ny(this._g,255))+"%",b:Math.round(100*ny(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*ny(this._r,255))+"%, "+Math.round(100*ny(this._g,255))+"%, "+Math.round(100*ny(this._b,255))+"%)":"rgba("+Math.round(100*ny(this._r,255))+"%, "+Math.round(100*ny(this._g,255))+"%, "+Math.round(100*ny(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(ey[jb(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+Fb(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var o=Bb(e);n="#"+Fb(o._r,o._g,o._b,o._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return Bb(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(Ub,arguments)},brighten:function(){return this._applyModification(Wb,arguments)},darken:function(){return this._applyModification(Gb,arguments)},desaturate:function(){return this._applyModification(zb,arguments)},saturate:function(){return this._applyModification($b,arguments)},greyscale:function(){return this._applyModification(Hb,arguments)},spin:function(){return this._applyModification(Kb,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(Zb,arguments)},complement:function(){return this._applyCombination(qb,arguments)},monochromatic:function(){return this._applyCombination(Jb,arguments)},splitcomplement:function(){return this._applyCombination(Xb,arguments)},triad:function(){return this._applyCombination(Yb,[3])},tetrad:function(){return this._applyCombination(Yb,[4])}},Bb.fromRatio=function(e,t){if("object"==Pb(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:iy(e[r]));e=n}return Bb(e,t)},Bb.equals=function(e,t){return!(!e||!t)&&Bb(e).toRgbString()==Bb(t).toRgbString()},Bb.random=function(){return Bb.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},Bb.mix=function(e,t,n){n=0===n?0:n||50;var r=Bb(e).toRgb(),o=Bb(t).toRgb(),a=n/100;return Bb({r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a})},Bb.readability=function(e,t){var n=Bb(e),r=Bb(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},Bb.isReadable=function(e,t,n){var r,o,a=Bb.readability(e,t);switch(o=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":o=a>=4.5;break;case"AAlarge":o=a>=3;break;case"AAAsmall":o=a>=7}return o},Bb.mostReadable=function(e,t,n){var r,o,a,i,l=null,s=0;o=(n=n||{}).includeFallbackColors,a=n.level,i=n.size;for(var c=0;c<t.length;c++)(r=Bb.readability(e,t[c]))>s&&(s=r,l=Bb(t[c]));return Bb.isReadable(e,l,{level:a,size:i})||!o?l:(n.includeFallbackColors=!1,Bb.mostReadable(e,["#fff","#000"],n))};var Qb=Bb.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},ey=Bb.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(Qb);function ty(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function ny(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function ry(e){return Math.min(1,Math.max(0,e))}function oy(e){return parseInt(e,16)}function ay(e){return 1==e.length?"0"+e:""+e}function iy(e){return e<=1&&(e=100*e+"%"),e}function ly(e){return Math.round(255*parseFloat(e)).toString(16)}function sy(e){return oy(e)/255}var cy,uy,dy,py=(uy="[\\s|\\(]+("+(cy="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+cy+")[,|\\s]+("+cy+")\\s*\\)?",dy="[\\s|\\(]+("+cy+")[,|\\s]+("+cy+")[,|\\s]+("+cy+")[,|\\s]+("+cy+")\\s*\\)?",{CSS_UNIT:new RegExp(cy),rgb:new RegExp("rgb"+uy),rgba:new RegExp("rgba"+dy),hsl:new RegExp("hsl"+uy),hsla:new RegExp("hsla"+dy),hsv:new RegExp("hsv"+uy),hsva:new RegExp("hsva"+dy),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function fy(e){return!!py.CSS_UNIT.exec(e)}var hy={closable:Boolean,color:{type:String,default:""},content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,icon:{type:Function,default:void 0},maxWidth:{type:[String,Number]},shape:{type:String,default:"square",validator:function(e){return!e||["square","round","mark"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},theme:{type:String,default:"default",validator:function(e){return!e||["default","primary","warning","danger","success"].includes(e)}},variant:{type:String,default:"dark",validator:function(e){return!e||["dark","light","outline","light-outline"].includes(e)}},onClick:Function,onClose:Function};function my(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var vy=t.defineComponent({name:"TTag",props:hy,setup:function(e){var n=lc("tag").globalConfig,r=cc("tag"),o=ih({CloseIcon:Hp}).CloseIcon,a=Vd(),i=Fd(),l=uc().SIZE,s=t.computed((function(){return["".concat(r.value),"".concat(r.value,"--").concat(e.theme),"".concat(r.value,"--").concat(e.variant),w(w(w(w({},"".concat(r.value,"--ellipsis"),e.maxWidth),"".concat(r.value,"--close"),e.closable),"".concat(r.value,"--disabled"),e.disabled),l.value[e.size],"medium"!==e.size),"square"!==e.shape&&"".concat(r.value,"--").concat(e.shape)]})),c=t.computed((function(){var t=e.maxWidth,n=u();return e.maxWidth?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?my(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):my(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({maxWidth:isNaN(Number(t))?String(t):"".concat(t,"px")},n):n})),u=function(){var t=e.color,n=e.variant;if(!t)return{};var r,o,a,i,l={color:Bb(t).getLuminance()>.5?"black":"white"};if("outline"!==n&&"light-outline"!==n||(l.borderColor=t),"outline"!==n){l.backgroundColor="dark"===n?t:(r=Bb(t).toRgb(),o=r.r,a=r.g,i=r.b,"rgba(".concat(o,", ").concat(a,", ").concat(i,", 0.1)"))}return"dark"!==n&&(l.color=t),l},d=function(t){var n;e.disabled||null===(n=e.onClick)||void 0===n||n.call(e,{e:t})};return function(){var l=function(){if(!e.closable)return null;var a="".concat(r.value,"__icon-close");return n.value.closeIcon?t.h(n.value.closeIcon(t.h),{class:a}):t.createVNode(o,{onClick:function(t){var n,r=t.e;r.stopPropagation(),null===(n=e.onClose)||void 0===n||n.call(e,{e:r})},class:a},null)}(),u=i("default","content"),p=a("icon"),f=bl(u)?u:"",h=f&&e.maxWidth?f:void 0;return t.createVNode("div",{class:s.value,style:c.value,onClick:d},[p,t.createVNode("span",{class:"".concat(r.value,"--text"),title:h},[u]),!e.disabled&&l])}}}),gy={checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,checkedProps:{type:Object},content:{type:[String,Number,Array,Function]},default:{type:[String,Function]},disabled:Boolean,size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},uncheckedProps:{type:Object},value:{type:[String,Number]},onChange:Function,onClick:Function},by=/^Space$/i,yy=/^Enter$/i,wy=/^(Enter|Space)$/i;function ky(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function xy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ky(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ky(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ey=t.defineComponent({name:"TCheckTag",props:gy,setup:function(e){var n=cc("tag"),r=uc().SIZE,o=Fd(),a=t.toRefs(e),i=pl(Fm(a.checked,a.modelValue,e.defaultChecked,e.onChange,"checked"),2),l=i[0],s=i[1],c=t.computed((function(){return["".concat(n.value),"".concat(n.value,"--check"),r.value[e.size],w(w({},"".concat(n.value,"--checked"),l.value),"".concat(n.value,"--disabled"),e.disabled)]})),u=t.computed((function(){var t=xy({theme:"primary"},e.checkedProps),n=xy({},e.uncheckedProps);return l.value?t:n})),d=function(t){var n,r=t.e;e.disabled||(null===(n=e.onClick)||void 0===n||n.call(e,{e:r}),s(!l.value,{e:r,value:e.value}))},p=function(t){var n,r=t.code||(null===(n=t.key)||void 0===n?void 0:n.trim());(by.test(r)||yy.test(r))&&(t.preventDefault(),s(!l.value,{e:t,value:e.value}))},f=function(e){e.currentTarget.addEventListener("keydown",p)},h=function(e){e.currentTarget.removeEventListener("keydown",p)};return function(){var n,r=o("default","content");return t.createVNode(vy,t.mergeProps({class:c.value,disabled:e.disabled,tabindex:e.disabled?void 0:"0",onFocus:f,onBlur:h},u.value,{onClick:d}),"function"==typeof(n=r)||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?r:{default:function(){return[r]}})}}}),Cy={checkedProps:{type:Object},multiple:Boolean,options:{type:Array},uncheckedProps:{type:Object},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function};var Sy=t.defineComponent({name:"TCheckTagGroup",props:Cy,setup:function(e,n){var r=t.toRefs(e),o=r.value,a=r.modelValue,i=r.options,l=cc("check-tag-group"),s=t.computed((function(){return[l.value]})),c=pl(Fm(o,a,e.defaultValue,e.onChange),2),u=c[0],d=c[1],p=function(t,n){var r=n.value;if(t)e.multiple?d(u.value.concat(r),{e:n.e,type:"check",value:r}):d([r],{e:n.e,type:"check",value:r});else{var o=[];e.multiple&&(o=u.value.filter((function(e){return e!==r}))),d(o,{e:n.e,type:"uncheck",value:r})}};return function(){return t.createVNode("div",{class:s.value},[(i.value||[]).map((function(r){var o,a;return t.createVNode(Ey,{key:r.value,value:r.value,checkedProps:e.checkedProps,uncheckedProps:e.uncheckedProps,checked:u.value.includes(r.value),onChange:p,disabled:r.disabled,size:r.size,"data-value":r.value},(a=o=function(e){return n.slots.option?n.slots.option(e):n.slots.label?n.slots.label(e):e.label?U(e.label)?e.label(t.h):e.label:e.content&&U(e.content)?e.content(t.h):e.default&&U(e.default)?e.default(t.h):e.value}(r),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!t.isVNode(a)?o:{default:function(){return[o]}}))}))])}}}),Oy=Nd(vy);function _y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ny(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_y(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ay(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ty(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ty(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Nd(Ey),Nd(Sy);var My=Nd(t.defineComponent({name:"TTagInput",props:Ay({},Ib),setup:function(e){var n={NAME_CLASS:cc("tag-input"),CLEAR_CLASS:cc("tag-input__suffix-clear"),BREAK_LINE_CLASS:cc("tag-input--break-line")},r=n.NAME_CLASS,o=n.CLEAR_CLASS,a=n.BREAK_LINE_CLASS,i=ih({CloseCircleFilledIcon:jp}).CloseCircleFilledIcon,l=t.toRefs(e),s=l.inputValue,c=l.inputProps,u=pl(Dm(s,e.defaultInputValue,e.onInputChange,"inputValue"),2),d=u[0],p=u[1],f=t.toRefs(e),h=f.excessTagsDisplayType,m=f.readonly,v=f.disabled,b=f.clearable,y=f.placeholder,k=function(e){var n=e.disabled,r=e.readonly,o=e.onMouseenter,a=e.onMouseleave,i=t.ref(!1);return{isHover:i,addHover:function(e){r||n||(i.value=!0,null==o||o(e))},cancelHover:function(e){r||n||(i.value=!1,null==a||a(e))}}}({readonly:e.readonly,disabled:e.disabled,onMouseenter:e.onMouseenter,onMouseleave:e.onMouseleave}),x=k.isHover,E=k.addHover,C=k.cancelHover,S=t.ref(!1),O=lc().classPrefix,_=t.ref(!1),N=function(e){var n=e.sortOnDraggable,r=e.onDragSort,o=e.onDragOverCheck,a=t.ref(-1),i=t.ref(null),l=t.ref(null),s=t.reactive({nodeX:0,nodeWidth:0,mouseX:0}),c=function(e,t,n){if(e.preventDefault(),a.value!==t&&-1!==a.value){var l=e.target;if(null==o||!o.targetClassNameRegExp||null!=o&&o.targetClassNameRegExp.test(l.className)){if(null!=o&&o.x&&l){if(!s.nodeWidth)return;var c=l.getBoundingClientRect(),u=c.x,d=c.width,p=u+d/2,f=e.clientX-(s.mouseX-s.nodeX),h=f+s.nodeWidth;if(!(f>u&&f<u+d?f<p:h>p))return}null==r||r({currentIndex:a.value,current:i,target:n,targetIndex:t}),a.value=t}}};if(!n)return{};function u(e,t,n){a.value=t,i.value=n;var r=e.target;if(o&&r){var l=r.getBoundingClientRect(),c=l.x,u=l.width;s.nodeX=c,s.nodeWidth=u,s.mouseX=e.clientX}}function d(){l.value=!0}function p(){l.value,l.value=!1,a.value=-1,i.value=null}return{onDragStart:u,onDragOver:c,onDrop:d,onDragEnd:p,getDragProps:function(e,t){return n?{draggable:!0,onDragstart:function(n){u(n,e,t)},onDragover:function(n){c(n,e,t)},onDrop:function(){d()},onDragend:function(){p()}}:{}},dragging:-1!==a.value}}(Ay(Ay({},e),{},{sortOnDraggable:e.dragSort,onDragOverCheck:{x:!0,targetClassNameRegExp:new RegExp("^".concat(O.value,"-tag"))}})),T=N.getDragProps,A=function(e){var n=t.ref(),r=t.toRefs(e),o=r.excessTagsDisplayType,a=r.readonly,i=r.disabled,l=t.ref(0),s=t.ref(),c=t.ref(),u=t.ref(!1),d=function(e){var t=e.children[0];s.value=t},p=function(){l.value=s.value.scrollWidth-s.value.clientWidth},f=function(e){var t;U(null===(t=s.value)||void 0===t?void 0:t.scroll)&&s.value.scroll({left:e,behavior:"smooth"})},h=function(){p(),f(l.value),setTimeout((function(){u.value=!0}),200)};return t.onMounted((function(){var e,t=null===(e=n.value)||void 0===e?void 0:e.$el;t&&d(t)})),t.onUnmounted((function(){clearTimeout(c.value)})),{tagInputRef:n,scrollElement:s,scrollDistance:l,scrollTo:f,scrollToRight:h,scrollToLeft:function(){f(0)},updateScrollElement:d,updateScrollDistance:p,onWheel:function(e){var t=e.e;if(!a.value&&!i.value&&s.value)if(t.deltaX>0){var n=Math.min(s.value.scrollLeft+120,l.value);f(n)}else{var r=Math.max(s.value.scrollLeft-120,0);f(r)}},scrollToRightOnEnter:function(){"scroll"===o.value&&(c.value=setTimeout((function(){h(),clearTimeout(c.value)}),100))},scrollToLeftOnLeave:function(){"scroll"===o.value&&(u.value=!1,f(0),clearTimeout(c.value))},isScrollable:u}}(e),M=A.scrollToRight,I=A.onWheel,P=A.scrollToRightOnEnter,L=A.scrollToLeftOnLeave,R=A.tagInputRef,B=A.isScrollable,D=function(e){var n=Vd(),r=cc(),o=t.toRefs(e),a=o.value,i=o.modelValue,l=o.onRemove,s=o.max,c=o.minCollapsedNum,u=o.size,d=o.disabled,p=o.readonly,f=o.tagProps,h=o.getDragProps,m=pl(Fm(a,i,e.defaultValue||[],e.onChange),2),v=m[0],b=m[1],y=t.ref(),w=function(e){var t,n=g(v.value),r=pl(n.splice(e.index,1),1)[0];b(n,Ny(Ny({trigger:"tag-remove"},e),{},{item:r})),null===(t=l.value)||void 0===t||t.call(l,Ny(Ny({},e),{},{item:r,trigger:"tag-remove",value:n}))};return{tagValue:v,clearAll:function(e){b([],{trigger:"clear",e:e.e})},onClose:w,onInnerEnter:function(t,n){var r,o,a=t?String(t).trim():"",i=s&&(null===(r=v.value)||void 0===r?void 0:r.length)>=s.value,l=v.value;!i&&a&&(l=v.value instanceof Array?v.value.concat(String(a)):[a],b(l,{trigger:"enter",index:l.length-1,item:a,e:n.e})),null==e||null===(o=e.onEnter)||void 0===o||o.call(e,l,Ny(Ny({},n),{},{inputValue:t}))},onInputBackspaceKeyUp:function(e){v.value&&v.value.length&&(y.value=e)},onInputBackspaceKeyDown:function(e,t){var n=t.e;if(v.value&&v.value.length&&"Process"!==n.key){var r=/(Backspace|NumpadDelete)/i.test(n.code)||/(Backspace|NumpadDelete)/i.test(n.key);if(!e&&r){var o,a=v.value.length-1,i=v.value[a],s="backspace",c=v.value.slice(0,-1);b(c,{e:n,index:a,item:i,trigger:s}),null===(o=l.value)||void 0===o||o.call(l,{e:n,index:a,item:i,trigger:s,value:c})}y.value=e}},renderLabel:function(e){var o,a=e.displayNode,i=e.label,l=c.value?v.value.slice(0,c.value):v.value,s=a?[a]:(null==l||null===(o=l.map)||void 0===o?void 0:o.call(l,(function(e,r){var o,a=n("tag",{params:{value:e}});return t.createVNode(Oy,t.mergeProps({key:"".concat(e).concat(r),size:u.value,disabled:d.value,onClose:function(e){return w({e:e.e,index:r})},closable:!p.value&&!d.value},null===(o=h.value)||void 0===o?void 0:o.call(h,r,e),f.value),{default:function(){return[null!=a?a:e]}})})))||[];if([null,void 0,""].includes(i)||s.unshift(t.createVNode("div",{class:"".concat(r.value,"-tag-input__prefix"),key:"label"},[i])),l.length!==(v.value||[]).length){var m=v.value.length-l.length,g=n("collapsedItems",{params:{value:v.value,count:v.value.length-c.value,collapsedTags:v.value.slice(c.value,v.value.length),collapsedSelectedItems:v.value.slice(c.value,v.value.length),onClose:w}});s.push(null!=g?g:t.createVNode(Oy,{key:"more",size:u.value},{default:function(){return["+",m]}}))}return s}}}(t.reactive(Ay(Ay({},t.toRefs(e)),{},{getDragProps:T}))),V=D.tagValue,j=D.onInnerEnter,F=D.onInputBackspaceKeyUp,z=D.onInputBackspaceKeyDown,$=D.clearAll,H=D.renderLabel,W=D.onClose,G=t.computed((function(){var e=!(_e(V.value)&&V.value.length);return[r.value,w(w(w({},a.value,"break-line"===h.value),"".concat(O.value,"-is-empty"),e),"".concat(O.value,"-tag-input--with-tag"),!e)]})),K=t.computed((function(){var e;return null!==(e=V.value)&&void 0!==e&&e.length?"":y.value})),q=t.computed((function(){var e;return Boolean(!m.value&&!v.value&&b.value&&x.value&&((null===(e=V.value)||void 0===e?void 0:e.length)||d.value))}));return t.watch((function(){return B.value}),(function(t){if("scroll"===e.excessTagsDisplayType){var n="".concat(O.value,"-input__prefix"),r=R.value.$el.querySelector(".".concat(n));t?r.classList.add("".concat(n,"--scrollable")):r.classList.remove("".concat(n,"--scrollable"))}})),{CLEAR_CLASS:o,CloseCircleFilledIcon:i,tagValue:V,tInputValue:d,isHover:x,tagInputPlaceholder:K,showClearIcon:q,tagInputRef:R,classPrefix:O,isFocused:_,focus:function(){R.value.focus()},blur:function(){R.value.blur()},setTInputValue:p,onMouseEnter:function(e){E(e),P()},onMouseLeave:function(e){C(e),L()},onInnerFocus:function(t,n){var r;_.value||(_.value=!0,null===(r=e.onFocus)||void 0===r||r.call(e,V.value,{e:n.e,inputValue:t}))},onInnerBlur:function(t,n){var r;_.value=!1,p("",{e:n.e,trigger:"blur"}),null===(r=e.onBlur)||void 0===r||r.call(e,V.value,{e:n.e,inputValue:t})},onInnerChange:function(e,t){p(e,Ay(Ay({},t),{},{trigger:"input"}))},addHover:E,cancelHover:C,onInputEnter:function(e,n){var r,o;null===(r=n.e)||void 0===r||null===(o=r.preventDefault)||void 0===o||o.call(r),p("",{e:n.e,trigger:"enter"}),!S.value&&j(e,n),t.nextTick((function(){M(),S.value=!1}))},onInnerEnter:j,onInputBackspaceKeyUp:F,onInputBackspaceKeyDown:z,renderLabel:H,onWheel:I,scrollToRightOnEnter:P,scrollToLeftOnLeave:L,onClick:function(t){var n;v.value||(_.value=!0,R.value.focus(),null===(n=e.onClick)||void 0===n||n.call(e,t))},onClearClick:function(t){var n;$(t),p("",{e:t.e,trigger:"clear"}),null===(n=e.onClear)||void 0===n||n.call(e,t)},onClose:W,onInputCompositionstart:function(e,t){var n,r;S.value=!0,null===(n=c.value)||void 0===n||null===(r=n.onCompositionstart)||void 0===r||r.call(n,e,t)},onInputCompositionend:function(e,t){var n,r;S.value=!1,null===(n=c.value)||void 0===n||null===(r=n.onCompositionend)||void 0===r||r.call(n,e,t)},classes:G}},render:function(){var e,n=this,r=this.CloseCircleFilledIcon,o=this.showClearIcon?t.createVNode(r,{class:this.CLEAR_CLASS,onClick:this.onClearClick},null):vd(this,"suffixIcon"),a=vd(this,"prefixIcon"),i="".concat(this.classPrefix,"-tag-input__with-suffix-icon");o&&!this.classes.includes(i)&&this.classes.push(i);var l=vd(this,"valueDisplay",{params:{value:this.tagValue,onClose:function(e){return n.onClose({index:e})}}}),s=vd(this,"label",{silent:!0}),c=this.inputProps,u=this.readonly||(null==c?void 0:c.readonly);return t.createVNode(Eg,t.mergeProps({ref:"tagInputRef",borderless:this.borderless,readonly:u,showInput:!u||!this.tagValue||!(null!==(e=this.tagValue)&&void 0!==e&&e.length),value:this.tInputValue,autoWidth:!0,size:this.size,disabled:this.disabled,label:function(){return n.renderLabel({displayNode:l,label:s})},class:this.classes,tips:this.tips,status:this.status,placeholder:this.tagInputPlaceholder,suffix:this.suffix,suffixIcon:function(){return o},prefixIcon:function(){return a},keepWrapperWidth:!this.autoWidth,onWheel:this.onWheel,onChange:this.onInnerChange,onPaste:this.onPaste,onEnter:this.onInputEnter,onKeyup:this.onInputBackspaceKeyUp,onKeydown:this.onInputBackspaceKeyDown,onMouseenter:this.onMouseEnter,onMouseleave:this.onMouseLeave,onFocus:this.onInnerFocus,onBlur:this.onInnerBlur,onClick:this.onClick,onCompositionstart:this.onInputCompositionstart,onCompositionend:this.onInputCompositionend},this.inputProps),{suffix:this.$slots.suffix})}})),Iy=["tips"];function Py(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ly(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Py(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Py(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ry={label:"label",key:"key",children:"children"};function By(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?By(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):By(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Vy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vy(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Fy=Nd(t.defineComponent({name:"TSelectInput",props:jy(jy({},Sb),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r={NAME_CLASS:cc("select-input"),BASE_CLASS_BORDERLESS:cc("select-input--borderless"),BASE_CLASS_MULTIPLE:cc("select-input--multiple"),BASE_CLASS_POPUP_VISIBLE:cc("select-input--popup-visible"),BASE_CLASS_EMPTY:cc("select-input--empty")},o=r.NAME_CLASS,a=r.BASE_CLASS_BORDERLESS,i=r.BASE_CLASS_MULTIPLE,l=r.BASE_CLASS_POPUP_VISIBLE,s=r.BASE_CLASS_EMPTY,c=cc(),u=Vd(),d=t.ref(),p=t.ref(),f=t.toRefs(e),h=f.multiple,m=f.value,v=f.popupVisible,g=f.borderless,y=function(e){var n=t.toRefs(e),r=n.popupProps,o=n.autoWidth,a=t.ref(!1),i=Ud(),l=function(e,t){var n=(t.scrollHeight,t.offsetHeight,0),o=t.offsetWidth+n>=e.offsetWidth?t.offsetWidth:e.offsetWidth,a={};return r.value&&"object"===b(r.value.overlayInnerStyle)&&!r.value.overlayInnerStyle.width&&(a=r.value.overlayInnerStyle),Dy({width:"".concat(Math.min(o,1e3),"px")},a)},s=function(e,t){var n;return Dy({width:"".concat(Math.max(e.offsetWidth,t.offsetWidth),"px")},null===(n=r.value)||void 0===n?void 0:n.overlayInnerStyle)};return{tOverlayInnerStyle:t.computed((function(){var e,t=(null===(e=r.value)||void 0===e?void 0:e.overlayInnerStyle)||{};return U(t)||C(t)&&t.width?t:o.value?s:l})),innerPopupVisible:a,onInnerPopupVisibleChange:function(t,n){if(!i.value&&!e.readonly){var r,o=!("trigger-element-click"!==n.trigger||!e.allowInput)||t;e.popupVisible!==o&&(a.value=o,null===(r=e.onPopupVisibleChange)||void 0===r||r.call(e,o,n))}}}}(e),k=y.tOverlayInnerStyle,x=y.innerPopupVisible,E=y.onInnerPopupVisibleChange,S=Mb(e,n,p),O=S.isSingleFocus,_=S.commonInputProps,N=S.onInnerClear,T=S.renderSelectSingle,A=function(e,n,r){var o=t.toRefs(e).inputValue,a=cc(),i=t.ref(),l=t.ref(e.autofocus),s=pl(Dm(o,e.defaultInputValue,e.onInputChange,"inputValue"),2),c=s[0],u=s[1],d=Ud(),p=t.computed((function(){return Ly(Ly({},Ry),e.keys)})),f=t.computed((function(){return e.value instanceof Array?e.value.map((function(e){return C(e)?e[p.value.label]:e})):C(e.value)?[e.value[p.value.label]]:[e.value]})),h=t.computed((function(){return f.value&&f.value.length?"":e.placeholder})),m=function(t,n){var r,o;"tag-remove"===n.trigger&&(null===(o=n.e)||void 0===o||o.stopPropagation()),null===(r=e.onTagChange)||void 0===r||r.call(e,t,n)},v=function(e,t){"enter"!==t.trigger&&"blur"!==t.trigger&&u(e,{trigger:t.trigger,e:t.e})},g=function(t,n){var o,a,i=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();null!=i&&i.hover||(l.value=!1,null===(a=e.onBlur)||void 0===a||a.call(e,e.value,Ly(Ly({},n),{},{tagInputValue:t})))},b=function(t,n){var o,a,i=null===(o=r.value)||void 0===o?void 0:o.getOverlayState();if(!(l.value||null!=i&&i.hover)){l.value=!0;var s=Ly(Ly({},n),{},{tagInputValue:t});null===(a=e.onFocus)||void 0===a||a.call(e,e.value,s)}},y=function(t,n){var r,o=Ly(Ly({},n),{},{tagInputValue:t});null===(r=e.onEnter)||void 0===r||r.call(e,e.value,o)};return{tags:f,tPlaceholder:h,tagInputRef:i,isMultipleFocus:l,multipleInputValue:c,renderSelectMultiple:function(r){var o=Ly(Ly({},r.commonInputProps),{},{tagProps:e.tagProps,label:e.label,autoWidth:e.autoWidth,readonly:e.readonly,placeholder:h.value,minCollapsedNum:e.minCollapsedNum,collapsedItems:e.collapsedItems,tag:e.tag,value:f.value,valueDisplay:e.valueDisplay,inputValue:r.popupVisible&&r.allowInput?c.value:"",inputProps:Ly({readonly:!e.allowInput||e.readonly,inputClass:w({},"".concat(a.value,"-input--focused"),r.popupVisible)},e.inputProps),suffixIcon:!d.value&&e.loading?function(){return t.createVNode(Td,{loading:!0,size:"small"},null)}:e.suffixIcon},e.tagInputProps),l=n.slots;l.tips;var s=hl(l,Iy);return t.createVNode(My,t.mergeProps({ref:i},o,{onInputChange:v,onChange:m,onClear:r.onInnerClear,onBlur:g,onEnter:y,onFocus:b}),s)}}}(e,n,p),M=A.isMultipleFocus,I=A.tagInputRef,P=A.renderSelectMultiple,L=t.computed((function(){return e.multiple?M.value:O.value})),R=t.computed((function(){var e;return["".concat(o.value),w(w(w(w({},i.value,h.value),a.value,g.value),l.value,null!==(e=v.value)&&void 0!==e?e:x.value),s.value,m.value instanceof Array?!m.value.length:!m.value)]})),B=function(t){var r,o=t.code||(null===(r=t.key)||void 0===r?void 0:r.trim());if(/(ArrowDown|ArrowUp)/.test(o)&&!v.value){var a,i=jy(jy({},n),{},{trigger:"trigger-element-focus"});null===(a=e.onPopupVisibleChange)||void 0===a||a.call(e,!0,i)}};t.watch([L],(function(e){var t=pl(e,1)[0];v.value||(t?d.value.addEventListener("keydown",B):d.value.removeEventListener("keydown",B))})),t.onMounted((function(){!v.value&&L&&d.value.addEventListener("keydown",B)})),t.onBeforeUnmount((function(){d.value.removeEventListener("keydown",B)}));return{classPrefix:c,NAME_CLASS:o,innerPopupVisible:x,commonInputProps:_,tOverlayInnerStyle:k,selectInputRef:d,popupRef:p,classes:R,onInnerClear:N,renderTNodeJSX:u,renderSelectSingle:T,renderSelectMultiple:P,onOverlayClick:function(t){var n,r;null===(n=t.e)||void 0===n||n.stopPropagation(),t.e.target.tabIndex>=0||e.multiple&&(null===(r=I.value)||void 0===r||r.focus())},onInnerPopupVisibleChange:E}},render:function(){var e,n,r=this,o={visible:null!==(e=this.popupVisible)&&void 0!==e?e:this.innerPopupVisible},a=t.createVNode(rv,t.mergeProps({ref:"popupRef",trigger:(null===(n=this.popupProps)||void 0===n?void 0:n.trigger)||"click",placement:"bottom-left"},o,{content:this.panel,hideEmptyPopup:!0},jy(jy({onVisibleChange:this.onInnerPopupVisibleChange,onOverlayClick:this.onOverlayClick},this.popupProps),{},{overlayInnerStyle:this.tOverlayInnerStyle})),jy({default:function(){return[r.multiple?r.renderSelectMultiple({commonInputProps:r.commonInputProps,onInnerClear:r.onInnerClear,popupVisible:o.visible,allowInput:r.allowInput}):r.renderSelectSingle(o.visible)]}},jy(jy({},this.$slots),{},{content:this.$slots.panel}))),i=this.renderTNodeJSX("tips"),l=["".concat(this.classPrefix,"-input__tips"),"".concat(this.classPrefix,"-tips"),"".concat(this.classPrefix,"-is-").concat(this.status)];return t.createVNode("div",{ref:"selectInputRef",class:this.classes},[a,i&&t.createVNode("div",{class:l},[i])])}})),zy={checkAll:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:Boolean,label:{type:String,default:""},title:{type:String,default:""},value:{type:[String,Number]}},$y={checkAll:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},indeterminate:Boolean,label:{type:[String,Function]},lazyLoad:Boolean,name:{type:String,default:""},value:{type:[String,Number,Boolean]},onChange:Function},Hy=Symbol("CheckboxGroupProvide");function Uy(e,t,n,r){if("undefined"==typeof window)return null;if(!window||!window.IntersectionObserver)return n(),null;var o=null;try{(o=new window.IntersectionObserver((function(t){t[0].isIntersecting&&(n(),o.unobserve(e))}),{rootMargin:"0px 0px ".concat(r,"px 0px"),root:t})).observe(e)}catch(a){console.error(a),n()}return o}function Wy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Wy(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ky=t.defineComponent({name:"TCheckbox",props:Gy(Gy({},$y),{},{needRipple:Boolean,stopLabelTrigger:Boolean,index:Number,data:Object}),setup:function(e){var n=t.ref();e.needRipple&&Rd(n);var r=uc().STATUS,o=t.toRefs(e),a=o.checked,i=o.modelValue,l=o.lazyLoad,s=pl(Fm(a,i,e.defaultChecked,e.onChange,"checked"),2),c=s[0],u=s[1],d=t.inject(Hy,void 0),p=t.ref();t.watch((function(){return[e.name,null==d?void 0:d.value.name].join("_")}),(function(){var t=e.name||(null==d?void 0:d.value.name);t&&(p.value=t)}),{immediate:!0});var f=t.ref(!1);t.watch((function(){var e;return[c.value,null==d?void 0:d.value.isCheckAll,null==d||null===(e=d.value.checkedValues)||void 0===e?void 0:e.join(",")]}),(function(){var t;f.value=(t=e.value,e.checkAll?null==d?void 0:d.value.isCheckAll:null!=d&&d.value?d.value.checkedValues.includes(t):c.value)}),{immediate:!0});var h=Ud({beforeDisabled:t.computed((function(){return!(e.checkAll||f.value||null==d||!d.value.maxExceeded)||null})),afterDisabled:t.computed((function(){return null==d?void 0:d.value.disabled}))}),m=lg({afterReadonly:t.computed((function(){return null==d?void 0:d.value.readonly}))}),v=t.ref(!1);t.watch((function(){return[e.checkAll,e.indeterminate,null==d?void 0:d.value.indeterminate]}),(function(){v.value=e.checkAll?null==d?void 0:d.value.indeterminate:e.indeterminate}),{immediate:!0});var g=cc("checkbox"),b=t.ref({});t.watch([f,h,v],(function(){b.value=["".concat(g.value),w(w(w({},r.value.checked,f.value),r.value.disabled,h.value),r.value.indeterminate,v.value)]}),{immediate:!0});var y=function(t){if(!m.value){var n=!f.value;u(n,{e:t}),null!=d&&d.value.handleCheckboxChange&&d.value.onCheckedChange({checked:n,checkAll:e.checkAll,e:t,option:e})}},k=Fd(),x=function(t){e.stopLabelTrigger&&t.preventDefault()},E=function(e,n){var r=t.ref(),o=t.ref(!0),a=function(){if(n.value){o.value=!1;var t=Uy(e.value,null,(function(){o.value=!0}),0);r.value=t}};return t.onMounted(a),t.watch([n,e],a),t.onBeforeUnmount((function(){n.value&&r.value.unobserve(e.value)})),{showCheckbox:o}}(n,l),C=E.showCheckbox,S=function(e){var t=function(t){(wy.test(t.key)||wy.test(t.code))&&(t.preventDefault(),!t.currentTarget.querySelector("input").disabled&&e(t))};return{onCheckboxFocus:function(e){e.currentTarget.addEventListener("keydown",t)},onCheckboxBlur:function(e){e.currentTarget.removeEventListener("keydown",t)}}}(y),O=S.onCheckboxFocus,_=S.onCheckboxBlur;return function(){return t.createVNode("label",{ref:n,class:b.value,tabindex:h.value?void 0:"0",onFocus:O,onBlur:_},[C.value?[t.createVNode("input",{type:"checkbox",tabindex:"-1",class:"".concat(g.value,"__former"),disabled:h.value,readonly:m.value,indeterminate:v.value,name:p.value,value:e.value?e.value:void 0,checked:f.value,onChange:y,key:"input"},null),t.createVNode("span",{class:"".concat(g.value,"__input"),key:"input-span"},null),t.createVNode("span",{class:"".concat(g.value,"__label"),key:"label",onClick:x},[k("default","label")])]:null])}}}),qy={disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},lazyLoad:Boolean,max:{type:Number,default:void 0},name:{type:String,default:""},options:{type:Array},value:{type:Array,default:void 0},modelValue:{type:Array,default:void 0},defaultValue:{type:Array,default:function(){return[]}},onChange:Function},Yy=t.defineComponent({name:"TCheckboxGroup",props:qy,setup:function(e){var n=cc("checkbox-group"),r=Vd(),o=Array.isArray,a=t.toRefs(e),i=pl(Fm(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref([]),u=t.computed((function(){if(!o(l.value))return 0;var e=c.value.map((function(e){return e.value}));return Cb(l.value,e).length})),d=t.computed((function(){var e=c.value.filter((function(e){return!e.disabled&&!e.readonly&&!e.checkAll})).map((function(e){return e.value}));return Cb(e,l.value).length===e.length})),p=t.computed((function(){return!d.value&&u.value<c.value.length&&0!==u.value})),f=t.computed((function(){return!wl(e.max)&&l.value.length===e.max}));t.watchEffect((function(){if(!e.options)return[];c.value=e.options.map((function(e){return C(e)?e:{label:String(e),value:e}}))}));var h=function(e,t){var n=e?function(){for(var e=new Set,t=0,n=c.value.length;t<n;t++){var r=c.value[t];if(!r.checkAll&&!r.disabled&&!r.readonly&&(e.add(r.value),f.value))break}return g(e)}():[];s(n,{e:t.e,type:e?"check":"uncheck",current:void 0,option:void 0})},m=function(e){var t=e.option.value;if(o(l.value)){var n=g(l.value);if(e.checked)n.push(t);else{var r=n.indexOf(t);n.splice(r,1)}s(n,{e:e.e,current:e.option.value,option:e.option,type:e.checked?"check":"uncheck"})}else console.warn("TDesign CheckboxGroup Warn: `value` must be an array, instead of ".concat(b(l.value)))},v=function(e){var t=e.checked,n=e.checkAll,r=e.e;n?h(t,{e:r}):m(e)},y=Uf();return t.provide(Hy,t.computed((function(){return{name:e.name,isCheckAll:d.value,checkedValues:l.value||[],maxExceeded:f.value,disabled:e.disabled,readonly:e.readonly,indeterminate:p.value,handleCheckboxChange:m,onCheckedChange:v}}))),function(){var o,a=null;if(null!==(o=e.options)&&void 0!==o&&o.length){var i;a=null===(i=c.value)||void 0===i?void 0:i.map((function(n,r){var o;return t.createVNode(Ky,t.mergeProps({key:"".concat(n.value||"").concat(r),lazyLoad:e.lazyLoad},n,{index:r,checked:null===(o=l.value)||void 0===o?void 0:o.includes(n.value),data:n}),null)}))}else{var s=r("default");c.value=function(){var e=y("Checkbox"),t=[];return null==e||e.forEach((function(e){var n=e.props;n&&(""!==n["check-all"]&&!0!==n["check-all"]||(n.checkAll=!0),t.push(n))})),t}(),a=s}return t.createVNode("div",{class:n.value,role:"group","aria-label":"checkbox-group"},[a])}}}),Xy=Nd(Ky);function Zy(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Jy(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jy(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function Jy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}Nd(Yy);var Qy=Symbol("selectProvide"),ew=function(e,t){var n=t.value.get(e);return(null==n?void 0:n.label)||(null==e?void 0:e.toString())},tw=function(e,t){var n=Zs(e),r=n.indexOf(t);return r<0?n.push(t):n.splice(r,1),{value:n,isCheck:r<0}};function nw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ow=t.defineComponent({name:"TOption",props:rw(rw({},zy),{},{createAble:Boolean,multiple:Boolean,index:Number,rowIndex:Number,trs:Map,scrollType:String,isVirtual:Boolean,bufferSize:Number,checkAll:Boolean}),emits:["row-mounted"],setup:function(e,n){var r=t.inject(Qy),o=Ud(),a=t.computed((function(){return 0!==r.value.max&&r.value.max<=r.value.selectValue.length})),i=t.computed((function(){return o.value||e.multiple&&a.value&&!h.value&&!r.value.isCheckAll})),l=Fd(),s=cc("select"),c=uc(),u=c.STATUS,d=c.SIZE,p=t.ref(),f=t.ref(!1),h=t.computed((function(){return!(!r.value.isCheckAll||e.disabled)||(e.multiple?r.value.selectValue.includes(e.value):r.value.selectValue===e.value)})),m=t.computed((function(){return!!e.checkAll&&r.value.indeterminate})),v=t.computed((function(){return["".concat(s.value,"-option"),[d.value[r.value.size]],w(w(w({},u.value.disabled,i.value),u.value.selected,h.value),"".concat(s.value,"-option__hover"),(f.value||r.value.hoverIndex===e.index)&&!i.value)]})),b=t.computed((function(){return e.label||e.value})),y=function(t){if(!e.disabled&&!i.value){if(e.multiple)return k(!h.value,{e:t}),void t.preventDefault();var n,o;if(e.createAble)if(null===(n=(o=r.value).handleCreate)||void 0===n||n.call(o,e.value),r.value.multiple)return void r.value.handleValueChange([].concat(g(r.value.selectValue),[e.value]),{selectedOptions:r.value.getSelectedOptions(),trigger:"check",e:t});var a=r.value.getSelectedOptions(e.value);r.value.handleValueChange(e.value,{option:null==a?void 0:a[0],selectedOptions:a,trigger:"check",e:t}),r.value.handlePopupVisibleChange(!1,{e:t})}},k=function(t,n){if(e.checkAll)r.value.onCheckAllChange(t);else{var o=tw(r.value.selectValue,e.value),a=r.value.getSelectedOptions(o.value);r.value.handleValueChange(o.value,{option:a.find((function(t){return t.value===e.value})),selectedOptions:a,trigger:t?"check":"uncheck",e:n.e}),r.value.reserveKeyword||r.value.handlerInputChange("")}};return t.onMounted((function(){var t=e.trs,r=e.rowIndex;e.isVirtual&&(t.set(r,p.value),n.emit("row-mounted"))})),t.onBeforeUnmount((function(){if(e.isVirtual){var t=e.trs,n=e.rowIndex;t.delete(n)}})),Rd(p),function(){var n,o=l("default","content")||b.value;return t.createVNode("li",{ref:p,class:v.value,title:e.title||"".concat(b.value),onMouseenter:function(){return f.value=!0},onMouseleave:function(){return f.value=!1},onClick:y},[r&&e.multiple?t.createVNode(Xy,{checked:h.value,disabled:i.value,onChange:k,indeterminate:m.value},(n=o,"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?o:{default:function(){return[o]}})):t.createVNode("span",null,[o])])}}}),aw={divider:{type:Boolean,default:!0},label:{type:String,default:""}};function iw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var lw=t.defineComponent({name:"TOptionGroup",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},aw),setup:function(e){var n=t.inject(Qy),r=cc("select-option-group"),o=uc().SIZE,a=Vd(),i=t.computed((function(){return[r.value,o.value[n.value.size],w({},"".concat(r.value,"__divider"),e.divider)]}));return function(){return t.createVNode("li",{class:i.value},[t.createVNode("div",{class:"".concat(r.value,"__header")},[e.label]),a("default")])}}}),sw={autoWidth:Boolean,autofocus:Boolean,borderless:Boolean,clearable:Boolean,collapsedItems:{type:Function},creatable:Boolean,disabled:{type:Boolean,default:void 0},empty:{type:[String,Function]},filter:{type:Function},filterable:Boolean,inputProps:{type:Object},inputValue:{type:[String,Number],default:void 0},defaultInputValue:{type:[String,Number]},keys:{type:Object},label:{type:[String,Function]},loading:Boolean,loadingText:{type:[String,Function]},max:{type:Number,default:0},minCollapsedNum:{type:Number,default:0},multiple:Boolean,options:{type:Array},panelBottomContent:{type:[String,Function]},panelTopContent:{type:[String,Function]},placeholder:{type:String,default:void 0},popupProps:{type:Object},popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:Boolean,prefixIcon:{type:Function},readonly:Boolean,reserveKeyword:Boolean,scroll:{type:Object},selectInputProps:{type:Object},showArrow:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},status:{type:String,default:"default",validator:function(e){return!e||["default","success","warning","error"].includes(e)}},suffix:{type:[String,Function]},suffixIcon:{type:Function},tagInputProps:{type:Object},tagProps:{type:Object},tips:{type:[String,Function]},value:{type:[String,Number,Boolean,Object,Array],default:void 0},modelValue:{type:[String,Number,Boolean,Object,Array],default:void 0},defaultValue:{type:[String,Number,Boolean,Object,Array],default:void 0},valueDisplay:{type:[String,Function]},valueType:{type:String,default:"value",validator:function(e){return!e||["value","object"].includes(e)}},onBlur:Function,onChange:Function,onClear:Function,onCreate:Function,onEnter:Function,onFocus:Function,onInputChange:Function,onPopupVisibleChange:Function,onRemove:Function,onSearch:Function},cw=function(e){var n,r,o,a,i,l=t.computed((function(){var t,n,r;return"virtual"===(null===(t=e.scroll)||void 0===t?void 0:t.type)&&(null===(n=e.options.value)||void 0===n?void 0:n.length)>((null===(r=e.scroll)||void 0===r?void 0:r.threshold)||100)})),s="virtual"===(null===(n=e.scroll)||void 0===n?void 0:n.type)?function(e){var n=e.data,r=e.container,o=e.fixedHeight,a=void 0!==o&&o,i=e.lineHeight,l=void 0===i?30:i,s=e.bufferSize,c=void 0===s?20:s,u=e.threshold,d=void 0===u?100:u,p=t.reactive({visibleData:[],cachedHeight:[],cachedScrollY:[]}),f=t.computed((function(){return n.value.length>d})),h=t.ref(0),m=new Map,v=0,g=0,b=0,y=0,w=0,k=0,x=function(){n.value.forEach((function(e,t){e.$index=t,a&&(p.cachedScrollY[t]=t*l)})),a||(p.cachedScrollY[n.value.length-1]=void 0)};x();var E=t.computed((function(){var e=p.cachedHeight;if(e.length){var t=e.reduce((function(e,t){return e+t||l}),0);if(e.length===n.value.length)return t;var r=t/e.length;return t+(n.value.length-e.length)*r}return f.value?n.value.length*l:0})),C=t.computed((function(){var e=p.visibleData,t=e[0];return t?1===e.length?0:p.cachedScrollY[t.$index]:0})),S=function(){k=Math.min(w+v+2*c,n.value.length),p.visibleData=n.value.slice(w,k)},O=function(){var e,o=m.get(b);if(o){var a=null==o||null===(e=o.getBoundingClientRect())||void 0===e?void 0:e.height;p.cachedScrollY[b]=r.value.scrollTop-y,p.cachedHeight[b]=a;for(var i=b+1;i<=(null===(l=p.visibleData[p.visibleData.length-1])||void 0===l?void 0:l.$index);i++){var l,s=m.get(i),c=((null==s?void 0:s.getBoundingClientRect())||{}).height;p.cachedHeight[i]=c;var u=p.cachedScrollY[i-1]+p.cachedHeight[i-1];p.cachedScrollY.splice(i,1,u)}for(var d=b-1;d>=(null===(f=p.visibleData[0])||void 0===f?void 0:f.$index);d--){var f,h=m.get(d),v=((null==h?void 0:h.getBoundingClientRect())||{}).height;p.cachedHeight[d]=v;var x=p.cachedScrollY[d+1]-p.cachedHeight[d];p.cachedScrollY.splice(d,1,x)}if(p.cachedScrollY[0]>0){for(var E=p.cachedScrollY[0],C=Math.min(k,n.value.length),S=0;S<C;S++)p.cachedScrollY.splice(S,1,p.cachedScrollY[S]-E);var O=p.cachedScrollY[b-1]?p.cachedScrollY[b-1]+y:y;r.value.scrollTop=O,g=O}if(p.cachedScrollY[w]<0){var _=p.cachedHeight.slice(0,Math.max(0,b)).reduce((function(e,t){return e+t}),0)+y;r.value.scrollTop=_,g=_,0===_&&(b=0,y=0)}t.nextTick((function(){var e=r.value,t=e.scrollTop,n=e.scrollHeight;if(t+e.clientHeight===n)for(var o=k-1;o>=w;o--)o===k-1?p.cachedScrollY.splice(o,1,n.value-p.cachedHeight[o]):p.cachedScrollY.splice(o,1,p.cachedScrollY[o+1]-p.cachedHeight[o])}))}};!a&&t.watch(h,O,{flush:"post"}),t.watch(n,(function(){x(),p.visibleData=[],p.cachedScrollY=[],p.cachedHeight=[],g=0,b=0,y=0,w=0,m.clear(),n.value.length<=d?p.visibleData=n.value:S(),r.value&&(r.value.scrollTop=0)}));var _=!1,N=function(){_&&(v=Math.ceil(r.value.offsetHeight/l),S())};return t.onMounted((function(){if(window&&window.IntersectionObserver){var e=new window.IntersectionObserver((function(t){var n=t[0];(n.isIntersecting||n.intersectionRatio)&&(_=!0,f.value&&N(),e.unobserve(r.value))}));r.value&&e.observe(r.value)}})),jm(jm({trs:m,scrollHeight:E},t.toRefs(p)),{},{translateY:C,handleScroll:function(){if(f.value){var e=r.value.scrollTop,t=e-g;g=e;var o=b;if(t+=y){if(t>=0){for(;o<n.value.length&&t>(p.cachedHeight[o]||l);)p.cachedHeight[o]||(p.cachedHeight[o]=l),t-=p.cachedHeight[o],o++;o>=n.value.length?(b=n.value.length-1,y=0):(b=o,y=t);var a=r.value;e+a.clientHeight===a.scrollHeight&&(b=n.value.length-v+1),w<=b-c&&(w=Math.min(n.value.length-v,b-c))<0&&(w=0)}else{for(;t<0;)o--,p.cachedHeight[o]||(p.cachedHeight[o]=l),t+=p.cachedHeight[o];o<0?(b=0,y=0):(b=o,y=t),O(),w>b-c&&(w=Math.max(0,b-c))}S()}}},handleRowMounted:function(){f.value&&h.value++},refreshContainer:N,fixedHeight:a,calculateScrollY:O})}({container:e.popupContentRef,data:e.options,fixedHeight:(null===(r=e.scroll)||void 0===r?void 0:r.isFixedRowHeight)||!1,lineHeight:(null===(o=e.scroll)||void 0===o?void 0:o.rowHeight)||28,bufferSize:(null===(a=e.scroll)||void 0===a?void 0:a.bufferSize)||20,threshold:(null===(i=e.scroll)||void 0===i?void 0:i.threshold)||100}):{},c=s.trs,u=void 0===c?null:c,d=s.visibleData,p=void 0===d?null:d,f=s.handleScroll,h=void 0===f?null:f,m=s.scrollHeight,v=void 0===m?null:m,g=s.translateY,b=void 0===g?null:g,y=s.handleRowMounted,w=void 0===y?null:y,k=-1,x=function(e){if(l.value){var t=e.target.scrollTop;Math.abs(k-t)>5?(h(),k=t):k=-1}};t.onMounted((function(){var t;null===(t=e.popupContentRef.value)||void 0===t||t.addEventListener("scroll",x)})),t.onBeforeUnmount((function(){var t;null===(t=e.popupContentRef.value)||void 0===t||t.removeEventListener("scroll",x)}));var E=t.computed((function(){return{position:"absolute",width:"1px",height:"1px",transition:"transform 0.2s",transform:"translate(0, ".concat(v.value,"px)"),"-ms-transform":"translate(0, ".concat(v.value,"px)"),"-moz-transform":"translate(0, ".concat(v.value,"px)"),"-webkit-transform":"translate(0, ".concat(v.value,"px)")}})),C=t.computed((function(){return{transform:"translate(0, ".concat(b.value,"px)"),"-ms-transform":"translate(0, ".concat(b.value,"px)"),"-moz-transform":"translate(0, ".concat(b.value,"px)"),"-webkit-transform":"translate(0, ".concat(b.value,"px)")}}));return{trs:u,scrollHeight:v,translateY:b,visibleData:p,handleRowMounted:w,isVirtual:l,cursorStyle:E,panelStyle:C}};var uw=t.defineComponent({name:"TSelectPanel",props:{inputValue:sw.inputValue,panelTopContent:sw.panelTopContent,panelBottomContent:sw.panelBottomContent,empty:sw.empty,creatable:sw.creatable,loading:sw.loading,loadingText:sw.loadingText,multiple:sw.multiple,filterable:sw.filterable,filter:sw.filter,scroll:sw.scroll,size:sw.size},setup:function(e,n){var r=n.expose,o=cc("select"),a=Vd(),i=jd(),l=lc("select"),s=l.t,c=l.globalConfig,u=t.inject(Qy),d=t.ref(null),p=t.computed((function(){return u.value.popupContentRef.value})),f=t.computed((function(){return e.creatable&&e.filterable&&e.inputValue})),h=t.computed((function(){return u.value.displayOptions})),m=cw({scroll:e.scroll,popupContentRef:p,options:h}),v=m.trs,g=m.visibleData,b=m.handleRowMounted,y=m.isVirtual,w=m.panelStyle,k=m.cursorStyle,x=t.computed((function(){return!h.value.length})),E=function n(r){return t.createVNode("ul",{class:"".concat(o.value,"__list")},[r.map((function(r,o){var a,i,l,s;return r.group?t.createVNode(lw,{label:r.group,divider:r.divider},"function"==typeof(s=l=n(r.children))||"[object Object]"===Object.prototype.toString.call(s)&&!t.isVNode(s)?l:{default:function(){return[l]}}):t.createVNode(ow,t.mergeProps(Mv(r,"index","$index","className","tagName"),y.value?{rowIndex:r.$index,trs:v,scrollType:null===(a=e.scroll)||void 0===a?void 0:a.type,isVirtual:y.value,bufferSize:null===(i=e.scroll)||void 0===i?void 0:i.bufferSize,key:"".concat(r.$index||"","_").concat(o)}:{key:"".concat(o,"_").concat(r.value)},{index:o,multiple:e.multiple,onRowMounted:b}),r.slots)}))])},C=t.computed((function(){return{small:"s",medium:"m",large:"l"}[u.value.size]}));r({innerRef:d,visibleData:g,isVirtual:y,displayOptions:h});return{renderPanel:function(n,r){return t.createVNode("div",{ref:d,class:["".concat(o.value,"__dropdown-inner"),"".concat(o.value,"__dropdown-inner--size-").concat(C.value)],style:r},[f.value&&t.createVNode("ul",{class:["".concat(o.value,"__create-option"),"".concat(o.value,"__list")]},[t.createVNode(ow,{value:e.inputValue,label:"".concat(e.inputValue),createAble:!0,class:"".concat(o.value,"__create-option--special")},null)]),e.loading&&i("loadingText",{defaultNode:t.createVNode("div",{class:"".concat(o.value,"__loading-tips")},[s(c.value.loadingText)])}),!e.loading&&x.value&&!f.value&&i("empty",{defaultNode:t.createVNode("div",{class:"".concat(o.value,"__empty")},[s(c.value.empty)])}),!x.value&&!e.loading&&E(n)])},panelStyle:w,cursorStyle:k,isVirtual:y,displayOptions:h,visibleData:g,renderTNodeJSX:a}},render:function(){return this.isVirtual?t.createVNode(t.Fragment,null,[this.renderTNodeJSX("panelTopContent"),t.createVNode("div",null,[t.createVNode("div",{style:this.cursorStyle},null),this.renderPanel(this.visibleData,this.panelStyle)]),this.renderTNodeJSX("panelBottomContent")]):t.createVNode(t.Fragment,null,[this.renderTNodeJSX("panelTopContent"),this.renderPanel(this.displayOptions),this.renderTNodeJSX("panelBottomContent")])}});function dw(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return pw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pw(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function fw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?fw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var mw=["overlayClassName"];function vw(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return gw(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?gw(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function gw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function bw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ww=t.defineComponent({name:"TSelect",props:yw(yw({},sw),{},{valueDisplayOptions:{type:Object}}),setup:function(e,n){var r=n.slots,o=cc(),a=Ud(),i=Vd(),l=cc("select"),s=lc("select"),c=s.globalConfig,u=s.t,d=t.toRefs(e),p=d.popupVisible,f=d.inputValue,h=d.modelValue,m=d.value,v=pl(Dm(f,e.defaultInputValue,e.onInputChange,"inputValue"),2),b=v[0],y=v[1],k=pl(Fm(m,h,e.defaultValue,e.onChange),2),x=k[0],E=k[1],C=t.ref(null),S=t.ref(null),O=t.computed((function(){var t,n,r;return{label:(null===(t=e.keys)||void 0===t?void 0:t.label)||"label",value:(null===(n=e.keys)||void 0===n?void 0:n.value)||"value",disabled:(null===(r=e.keys)||void 0===r?void 0:r.disabled)||"disabled"}})),_=function(e,n,r){var o=Uf(),a=t.ref([]),i=t.computed((function(){var t,r=0,a=(null===(t=e.options)||void 0===t?void 0:t.map((function(e){var t=function(e){var t=n.value,o=t.value,a=t.label,i=t.disabled,l=hw(hw({},e),{},{index:r,label:Go(e,a),value:Go(e,o),disabled:Go(e,i)});return r++,l};return e.group&&e.children?hw(hw({},e),{},{children:e.children.map((function(e){return t(e)}))}):t(e)})))||[],i=o("Option"),l=o("OptionGroup");if(_e(l)){var s,c=dw(l);try{for(c.s();!(s=c.n()).done;){var u,d=s.value,p=hw(hw({group:null===(u=d.props)||void 0===u?void 0:u.label},d.props),{},{children:[]}),f=o("Option",d.children);if(_e(f)){var h,m=dw(f);try{for(m.s();!(h=m.n()).done;){var v=h.value;p.children.push(hw(hw({},v.props),{},{slots:v.children,index:r})),r++}}catch(w){m.e(w)}finally{m.f()}a.push(p)}}}catch(w){c.e(w)}finally{c.f()}}if(_e(i)){var g,b=dw(i);try{for(b.s();!(g=b.n()).done;){var y=g.value;a.push(hw(hw({},y.props),{},{slots:y.children,index:r})),r++}}catch(w){b.e(w)}finally{b.f()}}return a})),l=t.computed((function(){var e=[];return function t(n){var r,o=dw(n);try{for(o.s();!(r=o.n()).done;){var a=r.value;a.group?t(a.children):e.push(a)}}catch(i){o.e(i)}finally{o.f()}}(i.value),e})),s=t.computed((function(){var e=new Map;return a.value.concat(l.value).forEach((function(t){e.set(t.value,t)})),e})),c=t.computed((function(){if(e.onSearch&&e.filterable)return i.value;if(!r.value||!e.filterable&&!U(e.filter))return i.value;var t=function(t){var n,o;return U(e.filter)?e.filter("".concat(r.value),t):(null===(n=t.label)||void 0===n||null===(o=n.toLowerCase)||void 0===o?void 0:o.call(n).indexOf("".concat(r.value).toLowerCase()))>-1},n=[];return i.value.forEach((function(e){e.group&&e.children&&n.push(hw(hw({},e),{},{children:e.children.filter(t)})),t(e)&&n.push(e)})),n}));return{options:i,optionsMap:s,optionsList:l,optionsCache:a,displayOptions:c}}(e,O,b),N=_.optionsMap,T=_.optionsList,A=_.optionsCache,M=_.displayOptions,I=t.computed((function(){return void 0===x.value?e.multiple?[]:void 0:"object"===e.valueType?e.multiple?x.value.map((function(e){return e[O.value.value]})):x.value[O.value.value]:x.value})),P=function(t,n){if("object"===e.valueType){var r=O.value,o=r.value,a=r.label,i=function(e){if(void 0!==e){var t=N.value.get(e);return w(w({},o,Go(t,o)),a,Go(t,a))}};t=e.multiple?t.map((function(e){return i(e)})):i(t)}t!==x.value&&E(t,yw({selectedOptions:K(t)},n))},L=pl(Dm(p,!1,(function(t,n){var r;null===(r=e.onPopupVisibleChange)||void 0===r||r.call(e,t,n)}),"popupVisible"),2),R=L[0],B=L[1],D=t.computed((function(){var t;return null!==(t=!e.multiple&&R.value&&ew(I.value,N)||e.placeholder)&&void 0!==t?t:u(c.value.placeholder)})),V=t.computed((function(){return e.multiple?function(e,t){var n,r=[],o=Zy(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=ew(a,t);i&&r.push(i)}}catch(l){o.e(l)}finally{o.f()}return r}(I.value,N):ew(I.value,N)})),j=t.computed((function(){var t,n=e.multiple&&_e(I.value)?I.value.map((function(e){var t;return{value:e,label:null===(t=N.value.get(e))||void 0===t?void 0:t.label}})):I.value,r={value:n,onClose:e.multiple?function(e){return $(e)}:function(){}};return e.minCollapsedNum&&e.multiple?yw(yw({},r),{},{displayValue:null==n||null===(t=n.slice)||void 0===t?void 0:t.call(n,0,e.minCollapsedNum)}):r})),F=t.computed((function(){return Boolean(e.filterable||c.value.filterable||U(e.filter))})),z=t.computed((function(){return Boolean((e.filterable||c.value.filterable)&&U(e.onSearch))})),$=function(t,n){var r,o=Zs(I.value),a=o[t];o.splice(t,1),P(o,{selectedOptions:K(o),trigger:"tag-remove",e:n}),null===(r=e.onRemove)||void 0===r||r.call(e,{value:a,data:N.value.get(a),e:n})},H=function(){var t;b.value&&(null===(t=e.onCreate)||void 0===t||t.call(e,b.value),y(""))},W=t.computed((function(){var e;return null===(e=S.value)||void 0===e?void 0:e.popupRef.getOverlay()})),G=t.computed((function(){return T.value.filter((function(e){return!e.disabled&&!e["check-all"]&&!e.checkAll}))})),K=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:I.value;return T.value.filter((function(t){if(!t.checkAll)return _e(e)?e.includes(t.value):e===t.value}))},q=function(e){var n=e.displayOptions,r=e.optionsList,o=e.innerPopupVisible,a=e.setInnerPopupVisible,i=e.selectPanelRef,l=e.isFilterable,s=e.isRemoteSearch,c=e.getSelectedOptions,u=e.setInnerValue,d=e.innerValue,p=e.popupContentRef,f=e.multiple,h=e.max,m=t.ref(-1),v=t.ref([]),g=t.ref([]),b=cc();return t.watch(o,(function(e){e&&(m.value=-1,g.value=[],v.value=[])})),t.watch(m,(function(e){var t,n=(null===(t=i.value)||void 0===t||null===(t=t.innerRef)||void 0===t?void 0:t.querySelector(".".concat(b.value,"-select-option")).clientHeight)*e;p.value.scrollTo({top:n,behavior:"smooth"})})),{hoverIndex:m,handleKeyDown:function(e){var t,p,b=n.value.length,y=m.value;switch(e.code){case"ArrowUp":e.preventDefault(),-1===m.value?y=0:0===m.value||m.value>n.value.length-1?y=b-1:y--,null!==(t=r.value[y])&&void 0!==t&&t.disabled&&y--,m.value=y;break;case"ArrowDown":e.preventDefault(),-1===m.value||m.value>=b-1?y=0:y++,null!==(p=r.value[y])&&void 0!==p&&p.disabled&&y++,m.value=y;break;case"Enter":if(-1===m.value)break;var w=i.value.isVirtual&&l.value&&g.value.length?g.value:s.value?r.value:v.value;if(w.length||(w=r.value),!o.value){a(!0,{e:e});break}if(f){var k;if(-1===m.value)return;var x=null===(k=w[m.value])||void 0===k?void 0:k.value;if(!x)return;var E=tw(d.value,x);if(h>0&&E.value.length>h)return;var C=c(E.value);u(E.value,{option:C.find((function(e){return e.value==x})),selectedOptions:C,trigger:E.isCheck?"check":"uncheck",e:e}),v.value=[]}else{var S=c(w[m.value].value);u(w[m.value].value,{option:null==S?void 0:S[0],selectedOptions:c(w[m.value].value),trigger:"check",e:e}),a(!1,{e:e})}break;case"Escape":a(!1,{e:e})}},virtualFilteredOptions:g,filteredOptions:v}}({displayOptions:M,optionsList:T,innerPopupVisible:R,setInnerPopupVisible:B,selectPanelRef:C,isFilterable:F,isRemoteSearch:z,getSelectedOptions:K,setInnerValue:P,innerValue:I,popupContentRef:W,multiple:e.multiple,max:e.max}),Y=q.hoverIndex,X=q.virtualFilteredOptions,Z=q.handleKeyDown,J=q.filteredOptions,Q=function(t){if(e.multiple){var n=t?G.value.map((function(e){return e.value})):[];P(n,{selectedOptions:K(n),trigger:t?"check":"clear"})}},ee=t.computed((function(){var e=G.value.map((function(e){return e.value}));return Cb(I.value,e).length})),te=t.computed((function(){return ee.value===G.value.length})),ne=t.computed((function(){return!te.value&&0!==ee.value})),re=t.computed((function(){return{max:e.max,multiple:e.multiple,hoverIndex:Y.value,selectValue:I.value,reserveKeyword:e.reserveKeyword,handleValueChange:P,handlerInputChange:y,handlePopupVisibleChange:B,handleCreate:H,size:e.size,popupContentRef:W,indeterminate:ne.value,isCheckAll:te.value,onCheckAllChange:Q,getSelectedOptions:K,displayOptions:M.value}}));t.provide(Qy,re);var oe=function(){!e.multiple&&_e(x.value)&&E(void 0,{selectedOptions:[],trigger:"default"}),e.multiple&&!_e(x.value)&&E([],{selectedOptions:[],trigger:"default"})},ae=Bm((function(t,n){var r,o=n.e;null===(r=e.onSearch)||void 0===r||r.call(e,"".concat(t),{e:o})}),300),ie=function(e,n){e&&!R.value&&B(!0,{e:n.e}),y(e),ae("".concat(e),{e:n.e}),t.nextTick((function(){var e,t;X.value=null===(e=C.value)||void 0===e?void 0:e.visibleData,J.value=null===(t=C.value)||void 0===t?void 0:t.displayOptions}))},le=function(e,t){B(e,t),e&&"trigger-element-click"===t.trigger&&y("")};t.watch(x,(function(n){oe(),t.nextTick((function(){!function(t){if(e.multiple){var n,r=[],o=vw(t||[]);try{for(o.s();!(n=o.n()).done;){var a=n.value,i=N.value.get(a);i&&r.push(i)}}catch(s){o.e(s)}finally{o.f()}A.value=Array.from(new Set([].concat(r,g(A.value))))}else{var l=N.value.get(t);l&&(A.value=Array.from(new Set([l].concat(g(A.value)))))}}(n)}))}),{immediate:!0}),t.watch((function(){return e.multiple}),(function(){oe()}));return t.provide("updateScrollTop",(function(e){var n;if(C.value){var r=null===(n=C.value)||void 0===n||null===(n=n.innerRef)||void 0===n?void 0:n.querySelector(".".concat(o.value,"-is-selected"));t.nextTick((function(){if(r&&e){var t=getComputedStyle(r).paddingBottom,n=getComputedStyle(e).marginBottom,o=parseInt(t,10)+parseInt(n,10),a=r.offsetTop-e.offsetTop-(e.clientHeight-r.clientHeight)+o;e.scrollTop=a}}))}})),function(){var n=e.popupProps||{},o=n.overlayClassName,s=hl(n,mw);return t.createVNode("div",{class:"".concat(l.value,"__wrap")},[t.createVNode(Fy,t.mergeProps({autoWidth:e.autoWidth,readonly:e.readonly,borderless:e.borderless,multiple:e.multiple,clearable:e.clearable,loading:e.loading,status:e.status,tips:e.tips,minCollapsedNum:e.minCollapsedNum,autofocus:e.autofocus,suffix:e.suffix,valueDisplayOptions:e.valueDisplayOptions},{ref:S,class:l.value,value:V.value,disabled:a.value,popupVisible:R.value,inputValue:R.value?b.value:"",placeholder:"".concat(D.value),allowInput:F.value,"collapsed-items":e.collapsedItems,inputProps:yw(yw({size:e.size,autofocus:e.autofocus},e.inputProps),{},{onkeydown:Z}),tagInputProps:yw({size:e.size},e.tagInputProps),onTagChange:function(e,t){$(t.index)},tagProps:yw({},e.tagProps),popupProps:yw({overlayClassName:["".concat(l.value,"__dropdown"),o]},s),label:e.label,prefixIcon:e.prefixIcon,suffix:e.suffix,suffixIcon:function(){return e.suffixIcon||r.suffixIcon?i("suffixIcon"):e.showArrow&&t.createVNode(ag,{overlayClassName:"".concat(l.value,"__right-icon"),isActive:R.value},null)},valueDisplay:function(){return i("valueDisplay",{params:j.value})},onPopupVisibleChange:le,onInputChange:ie,onClear:function(t){var n,r=t.e;P(e.multiple?[]:void 0,{option:null,selectedOptions:K(e.multiple?[]:void 0),trigger:"clear",e:r}),null===(n=e.onClear)||void 0===n||n.call(e,{e:r})},onEnter:function(t,n){var r=n.e;setTimeout((function(){var t;null===(t=e.onEnter)||void 0===t||t.call(e,{inputValue:"".concat(b.value),e:r,value:I.value}),H()}),0)},onBlur:function(t,n){var r,o=n.e;null===(r=e.onBlur)||void 0===r||r.call(e,{e:o,value:I.value})},onFocus:function(t,n){var r,o=n.e;null===(r=e.onFocus)||void 0===r||r.call(e,{e:o,value:I.value})}},e.selectInputProps),{label:r.label,prefixIcon:r.prefixIcon,suffix:r.suffix,panel:function(){return t.createVNode(uw,t.mergeProps({ref:C},sb(e,["size","multiple","empty","loading","loadingText","filterable","creatable","panelTopContent","panelBottomContent","filter","scroll"]),{inputValue:b.value}),r)},collapsedItems:r.collapsedItems})])}}}),kw=Nd(ww),xw=Nd(ow),Ew=Nd(lw),Cw={container:{type:[String,Function],default:"body"},content:{type:[String,Function]},default:{type:[String,Function]},duration:{type:Number,default:200},offset:{type:Array,default:function(){return["24px","80px"]}},shape:{type:String,default:"square",validator:function(e){return!e||["circle","square"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["medium","small"].includes(e)}},target:{type:[String,Function],default:"body"},theme:{type:String,default:"light",validator:function(e){return!e||["light","primary","dark"].includes(e)}},visibleHeight:{type:[String,Number],default:"200px"},onClick:Function},Sw=Nd(t.defineComponent({name:"TBackTop",props:Cw,setup:function(e){var n=t.ref(!1),r=t.ref(null),o=cc("back-top"),a=lc("alert").classPrefix,i=ih({BacktopIcon:lp}).BacktopIcon,l=Fd(),s=function(e){return"string"==typeof e&&void 0!==("undefined"==typeof document?"undefined":b(document))?"body"===e?document:document.querySelector(e):"function"==typeof e?e():null};return t.onMounted((function(){var t,o;(r.value=s(e.container),0!==(t="string"==typeof e.visibleHeight?Number(e.visibleHeight.replace("px","")):e.visibleHeight))?(o=void 0===r.value.scrollTop?document.documentElement:r.value,r.value.onscroll=function(){var e,r=null===(e=o)||void 0===e?void 0:e.scrollTop;r>=t&&(n.value=!0),r<t&&n.value&&(n.value=!1)}):n.value=!0})),t.onBeforeUnmount((function(){r.value.onscroll=null})),function(){var c=e.theme,u=e.shape,d=e.size,p=e.target,f=e.duration,h=e.offset,m=e.container,v=Wf()();v.length<1&&(v=null);var g=t.computed((function(){return w(w(w(w(w(w({},o.value,!0),"".concat(o.value,"--theme-").concat(c),!0),"".concat(o.value,"--").concat(u),!0),"".concat(o.value,"--show"),n.value),"".concat(a.value,"-size-s"),"small"===d),"".concat(a.value,"-size-m"),"medium"===d)})),b=t.createVNode(t.Fragment,null,[t.createVNode(i,{class:"".concat(o.value,"__icon"),size:"24"},null),t.createVNode("span",{class:"".concat(o.value,"__text")},[t.createTextVNode("TOP")])]),y=t.computed((function(){return{insetInlineEnd:h[0],insetBlockEnd:h[1]}}));return t.createVNode("button",{type:"button",class:g.value,style:y.value,onClick:function(t){var n;Bc(function(){if(p===m)return 0;if("body"===p)return 0;if(!p)return 0;var e=s(p);return e?e.getBoundingClientRect().y:0}(),{container:r.value,duration:f}),null===(n=e.onClick)||void 0===n||n.call(e,{e:t})}},[l("content","default",b)])}}})),Ow=eb;const _w=x((function(e,t,n){return null==e?e:Ow(e,t,n)}));var Nw={exports:{}},Tw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;for(var n in t)void 0===e[n]&&(e[n]=t[n]);return e},e.exports=t.default,e.exports.default=t.default}(Tw,Tw.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t="string"==typeof t?(0,r.default)({format:t},i):(0,r.default)(t,i);if("string"==typeof e&&(w=t.format,/(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(w))){var n,a=t.delimiters.find((function(e){return-1!==t.format.indexOf(e)})),l=t.strictMode?a:t.delimiters.find((function(t){return-1!==e.indexOf(t)})),s=function(e,t){for(var n=[],r=Math.min(e.length,t.length),o=0;o<r;o++)n.push([e[o],t[o]]);return n}(e.split(l),t.format.toLowerCase().split(a)),c={},u=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=o(e))||t){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){s=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw i}}}}(s);try{for(u.s();!(n=u.n()).done;){var d=(b=n.value,y=2,function(e){if(Array.isArray(e))return e}(b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(b,y)||o(b,y)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),p=d[0],f=d[1];if(p.length!==f.length)return!1;c[f.charAt(0)]=p}}catch(k){u.e(k)}finally{u.f()}var h=c.y;if(h.startsWith("-"))return!1;if(2===c.y.length){var m=parseInt(c.y,10);if(isNaN(m))return!1;h=m<(new Date).getFullYear()%100?"20".concat(c.y):"19".concat(c.y)}var v=c.m;1===c.m.length&&(v="0".concat(c.m));var g=c.d;return 1===c.d.length&&(g="0".concat(c.d)),new Date("".concat(h,"-").concat(v,"-").concat(g,"T00:00:00.000Z")).getUTCDate()===+c.d}var b,y;var w;if(!t.strictMode)return"[object Date]"===Object.prototype.toString.call(e)&&isFinite(e);return!1};var n,r=(n=Tw.exports)&&n.__esModule?n:{default:n};function o(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i={format:"YYYY/MM/DD",delimiters:["/","-"],strictMode:!1};e.exports=t.default,e.exports.default=t.default}(Nw,Nw.exports);var Aw=tc(Nw.exports),Mw={exports:{}},Iw={exports:{}};!function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(!("string"==typeof e||e instanceof String)){var t=n(e);throw null===e?t="null":"object"===t&&(t=e.constructor.name),new TypeError("Expected a string but received a ".concat(t))}},e.exports=t.default,e.exports.default=t.default}(Iw,Iw.exports);var Pw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,a;(0,r.default)(e),"object"===o(t)?(n=t.min||0,a=t.max):(n=arguments[1],a=arguments[2]);var i=encodeURI(e).split(/%..|./).length-1;return i>=n&&(void 0===a||i<=a)};var n,r=(n=Iw.exports)&&n.__esModule?n:{default:n};function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.exports=t.default,e.exports.default=t.default}(Pw,Pw.exports);var Lw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){(0,n.default)(e),(t=(0,r.default)(t,a)).allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));!0===t.allow_wildcard&&0===e.indexOf("*.")&&(e=e.substring(2));var o=e.split("."),i=o[o.length-1];if(t.require_tld){if(o.length<2)return!1;if(!t.allow_numeric_tld&&!/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(i))return!1;if(/\s/.test(i))return!1}if(!t.allow_numeric_tld&&/^\d+$/.test(i))return!1;return o.every((function(e){return!(e.length>63&&!t.ignore_max_length)&&(!!/^[a-z_\u00a1-\uffff0-9-]+$/i.test(e)&&(!/[\uff01-\uff5e]/.test(e)&&(!/^-|-$/.test(e)&&!(!t.allow_underscores&&/_/.test(e)))))}))};var n=o(Iw.exports),r=o(Tw.exports);function o(e){return e&&e.__esModule?e:{default:e}}var a={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_numeric_tld:!1,allow_wildcard:!1,ignore_max_length:!1};e.exports=t.default,e.exports.default=t.default}(Lw,Lw.exports);var Rw={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,r.default)(t),!(n=String(n)))return e(t,4)||e(t,6);if("4"===n)return i.test(t);if("6"===n)return s.test(t);return!1};var n,r=(n=Iw.exports)&&n.__esModule?n:{default:n};var o="(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",a="(".concat(o,"[.]){3}").concat(o),i=new RegExp("^".concat(a,"$")),l="(?:[0-9a-fA-F]{1,4})",s=new RegExp("^("+"(?:".concat(l,":){7}(?:").concat(l,"|:)|")+"(?:".concat(l,":){6}(?:").concat(a,"|:").concat(l,"|:)|")+"(?:".concat(l,":){5}(?::").concat(a,"|(:").concat(l,"){1,2}|:)|")+"(?:".concat(l,":){4}(?:(:").concat(l,"){0,1}:").concat(a,"|(:").concat(l,"){1,3}|:)|")+"(?:".concat(l,":){3}(?:(:").concat(l,"){0,2}:").concat(a,"|(:").concat(l,"){1,4}|:)|")+"(?:".concat(l,":){2}(?:(:").concat(l,"){0,3}:").concat(a,"|(:").concat(l,"){1,5}|:)|")+"(?:".concat(l,":){1}(?:(:").concat(l,"){0,4}:").concat(a,"|(:").concat(l,"){1,6}|:)|")+"(?::((?::".concat(l,"){0,5}:").concat(a,"|(?::").concat(l,"){1,7}|:))")+")(%[0-9a-zA-Z-.:]{1,})?$");e.exports=t.default,e.exports.default=t.default}(Rw,Rw.exports),function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),(t=(0,i.default)(t,s)).require_display_name||t.allow_display_name){var l=e.match(c);if(l){var v=l[1];if(e=e.replace(v,"").replace(/(^<|>$)/g,""),v.endsWith(" ")&&(v=v.slice(0,-1)),!function(e){var t=e.replace(/^"(.+)"$/,"$1");if(!t.trim())return!1;if(/[\.";<>]/.test(t)){if(t===e)return!1;if(!(t.split('"').length===t.split('\\"').length))return!1}return!0}(v))return!1}else if(t.require_display_name)return!1}if(!t.ignore_max_length&&e.length>m)return!1;var g=e.split("@"),b=g.pop(),y=b.toLowerCase();if(t.host_blacklist.includes(y))return!1;if(t.host_whitelist.length>0&&!t.host_whitelist.includes(y))return!1;var w=g.join("@");if(t.domain_specific_validation&&("gmail.com"===y||"googlemail.com"===y)){var k=(w=w.toLowerCase()).split("+")[0];if(!(0,r.default)(k.replace(/\./g,""),{min:6,max:30}))return!1;for(var x=k.split("."),E=0;E<x.length;E++)if(!d.test(x[E]))return!1}if(!(!1!==t.ignore_max_length||(0,r.default)(w,{max:64})&&(0,r.default)(b,{max:254})))return!1;if(!(0,o.default)(b,{require_tld:t.require_tld,ignore_max_length:t.ignore_max_length,allow_underscores:t.allow_underscores})){if(!t.allow_ip_domain)return!1;if(!(0,a.default)(b)){if(!b.startsWith("[")||!b.endsWith("]"))return!1;var C=b.slice(1,-1);if(0===C.length||!(0,a.default)(C))return!1}}if('"'===w[0])return w=w.slice(1,w.length-1),t.allow_utf8_local_part?h.test(w):p.test(w);for(var S=t.allow_utf8_local_part?f:u,O=w.split("."),_=0;_<O.length;_++)if(!S.test(O[_]))return!1;if(t.blacklisted_chars&&-1!==w.search(new RegExp("[".concat(t.blacklisted_chars,"]+"),"g")))return!1;return!0};var n=l(Iw.exports),r=l(Pw.exports),o=l(Lw.exports),a=l(Rw.exports),i=l(Tw.exports);function l(e){return e&&e.__esModule?e:{default:e}}var s={allow_display_name:!1,allow_underscores:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0,blacklisted_chars:"",ignore_max_length:!1,host_blacklist:[],host_whitelist:[]},c=/^([^\x00-\x1F\x7F-\x9F\cX]+)</i,u=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,d=/^[a-z\d]+$/,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,f=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A1-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,h=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i,m=254;e.exports=t.default,e.exports.default=t.default}(Mw,Mw.exports);var Bw=tc(Mw.exports),Dw={exports:{}};function Vw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function jw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Fw(e){return"[object Date]"!==Object.prototype.toString.call(e)&&(C(e)?Kc(e):["",void 0,null].includes(e))}!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e),!e||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;if((t=(0,a.default)(t,s)).validate_length&&e.length>=2083)return!1;if(!t.allow_fragments&&e.includes("#"))return!1;if(!t.allow_query_components&&(e.includes("?")||e.includes("&")))return!1;var i,d,p,f,h,m,v,g;if(v=e.split("#"),e=v.shift(),v=e.split("?"),e=v.shift(),(v=e.split("://")).length>1){if(i=v.shift().toLowerCase(),t.require_valid_protocol&&-1===t.protocols.indexOf(i))return!1}else{if(t.require_protocol)return!1;if("//"===e.slice(0,2)){if(!t.allow_protocol_relative_urls)return!1;v[0]=e.slice(2)}}if(""===(e=v.join("://")))return!1;if(v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if((v=e.split("@")).length>1){if(t.disallow_auth)return!1;if(""===v[0])return!1;if((d=v.shift()).indexOf(":")>=0&&d.split(":").length>2)return!1;var b=d.split(":"),y=(E=2,function(e){if(Array.isArray(e))return e}(x=b)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(x,E)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(x,E)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),w=y[0],k=y[1];if(""===w&&""===k)return!1}var x,E;f=v.join("@"),m=null,g=null;var C=f.match(c);C?(p="",g=C[1],m=C[2]||null):(p=(v=f.split(":")).shift(),v.length&&(m=v.join(":")));if(null!==m&&m.length>0){if(h=parseInt(m,10),!/^[0-9]+$/.test(m)||h<=0||h>65535)return!1}else if(t.require_port)return!1;if(t.host_whitelist)return u(p,t.host_whitelist);if(""===p&&!t.require_host)return!0;if(!((0,o.default)(p)||(0,r.default)(p,t)||g&&(0,o.default)(g,6)))return!1;if(p=p||g,t.host_blacklist&&u(p,t.host_blacklist))return!1;return!0};var n=i(Iw.exports),r=i(Lw.exports),o=i(Rw.exports),a=i(Tw.exports);function i(e){return e&&e.__esModule?e:{default:e}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1,allow_fragments:!0,allow_query_components:!0,validate_length:!0},c=/^\[([^\]]+)\](?::([0-9]+))?$/;function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(e===r||(o=r,"[object RegExp]"===Object.prototype.toString.call(o)&&r.test(e)))return!0}var o;return!1}e.exports=t.default,e.exports.default=t.default}(Dw,Dw.exports);var zw={date:Aw,url:tc(Dw.exports),email:Bw,required:function(e){return!Fw(e)},whitespace:function(e){return!(/^\s+$/.test(e)||""===e)},boolean:function(e){return Hd(e)},max:function(e,t){return El(e)?e<=t:Sl(e)<=t},min:function(e,t){return El(e)?e>=t:Sl(e)>=t},len:function(e,t){return Sl(String(e))===t},number:function(e){return El(e)},enum:function(e,t){return t.includes(e)},idcard:function(e){return/^(\d{18,18}|\d{15,15}|\d{17,17}x)$/i.test(e)},telnumber:function(e){return/^1[3-9]\d{9}$/.test(e)},pattern:function(e,t){return t.test(e)},validator:function(e,t){return t(e)}};function $w(e,t){return Hw.apply(this,arguments)}function Hw(){return(Hw=Qf(ah.mark((function e(t,n){var r,o,a,i,l,s,c;return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r={result:!0},o=Object.keys(n),l=0;case 3:if(!(l<o.length)){e.next=15;break}if(s=o[l],n.required||!Fw(t)||n.validator){e.next=7;break}return e.abrupt("return",r);case 7:if(!(c=zw[s])||!n[s]&&0!==n[s]){e.next=12;break}return a=!0===n[s]?void 0:n[s],i=c,e.abrupt("break",15);case 12:l++,e.next=3;break;case 15:if(!i){e.next=23;break}return e.next=18,i(t,a);case 18:if(r=e.sent,!Hd(r)){e.next=21;break}return e.abrupt("return",jw(jw({},n),{},{result:r}));case 21:if(!C(r)){e.next=23;break}return e.abrupt("return",r);case 23:return e.abrupt("return",r);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Uw(e,t){return Ww.apply(this,arguments)}function Ww(){return(Ww=Qf(ah.mark((function e(t,n){var r,o;return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.map((function(e){return $w(t,e)})),e.next=3,Promise.all(r);case 3:return o=e.sent,e.abrupt("return",o);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Gw={for:{type:String,default:""},help:{type:[String,Function]},label:{type:[String,Function],default:""},labelAlign:{type:String,validator:function(e){return!e||["left","right","top"].includes(e)}},labelWidth:{type:[String,Number]},name:{type:String,default:""},requiredMark:{type:Boolean,default:void 0},rules:{type:Array},showErrorMessage:{type:Boolean,default:void 0},status:{type:String,default:""},statusIcon:{type:[Boolean,Function],default:void 0},successBorder:Boolean,tips:{type:[String,Function]}};function Kw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Kw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Kw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yw(e,t){return t?"".concat(e,"__").concat(t).replace(/(\[|\]\.)/g,"_"):""}var Xw=t.defineComponent({name:"TFormItem",props:qw({},Gw),setup:function(e,n){var r=n.slots,o=Vd(),a=sg(),i=lc("form").globalConfig,l=ih({CheckCircleFilledIcon:yp,CloseCircleFilledIcon:jp,ErrorCircleFilledIcon:tf}),s=l.CheckCircleFilledIcon,c=l.CloseCircleFilledIcon,u=l.ErrorCircleFilledIcon,d=t.inject(ug,void 0),p=cc(),f=cc("form-item"),h=t.computed((function(){var t,n,r=null!==(t=null!==(n=e.requiredMark)&&void 0!==n?n:null==d?void 0:d.requiredMark)&&void 0!==t?t:i.value.requiredMark,o=B.value.filter((function(e){return e.required})).length>0;return null!=r?r:o})),m=t.computed((function(){return r.label||e.label})),v=t.computed((function(){return!(null==d||!d.colon||!m.value)})),g=cc("form__label"),b=t.computed((function(){return Zf(e.labelAlign)?null==d?void 0:d.labelAlign:e.labelAlign})),y=t.computed((function(){return Zf(e.labelWidth)?null==d?void 0:d.labelWidth:e.labelWidth})),k=t.computed((function(){return[a.value.label,w(w(w(w(w({},"".concat(g.value,"--required"),h.value),"".concat(g.value,"--colon"),v.value),"".concat(g.value,"--top"),m.value&&("top"===b.value||!y.value)),"".concat(g.value,"--left"),"left"===b.value&&y.value),"".concat(g.value,"--right"),"right"===b.value&&y.value)]})),x=function(){if(0!==Number(y.value)){var n={};return y.value&&"top"!==b.value&&(n=El(y.value)?{width:"".concat(y.value,"px")}:{width:y.value}),t.createVNode("div",{class:k.value,style:n},[t.createVNode("label",{for:e.for||null},[o("label")])])}},E=function(){var e=function(e){return t.createVNode("span",{class:a.value.status},[t.createVNode(e,null,null)])},n=N.value;if(A.value===cg.SUCCESS)return e(s);if(null!=n&&n[0]){var r=n[0].type||"error";return e({error:c,warning:u}[r]||s)}return null},C=function(){if(!1!==e.statusIcon){var n=o("statusIcon",{defaultNode:E()});if(n)return t.createVNode("span",{class:a.value.status},[n]);if(!1!==n)return(n=null==d?void 0:d.renderContent("statusIcon",{defaultNode:E(),params:e}))||void 0}},S=t.computed((function(){return W.value?A.value===cg.SUCCESS?e.successBorder?[a.value.success,a.value.successBorder].join(" "):a.value.success:N.value.length?"error"===(N.value[0].type||"error")?a.value.error:a.value.warning:void 0:""})),O=t.computed((function(){return[a.value.controls,S.value]})),_=t.computed((function(){var e={};return y.value&&"top"!==b.value&&(e=El(y.value)?{marginLeft:"".concat(y.value,"px")}:{marginLeft:y.value}),e})),N=t.ref([]),T=t.ref([]),A=t.ref(cg.TO_BE_VALIDATED),M=t.ref(!1),I=t.ref(!1),P=function(){I.value=!1,N.value=[],T.value=[],A.value=cg.TO_BE_VALIDATED},L=function(){var n=Qf(ah.mark((function n(){var r,o=arguments;return ah.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(r=o.length>0&&void 0!==o[0]?o[0]:null==d?void 0:d.resetType,e.name){n.next=3;break}return n.abrupt("return");case 3:return"empty"===r?_w(null==d?void 0:d.data,e.name,(a=void 0,i=void 0,"[object String]"===(i=Object.prototype.toString.call(Go(null==d?void 0:d.data,e.name)))&&(a=""),"[object Array]"===i&&(a=[]),"[object Object]"===i&&(a={}),a)):"initial"===r&&_w(null==d?void 0:d.data,e.name,z.value),n.next=6,t.nextTick();case 6:M.value?I.value=!0:P();case 7:case"end":return n.stop()}var a,i}),n)})));return function(){return n.apply(this,arguments)}}(),R=t.computed((function(){var e;return null!==(e=null==d?void 0:d.errorMessage)&&void 0!==e?e:i.value.errorMessage})),B=t.computed((function(){var t;if(null!==(t=e.rules)&&void 0!==t&&t.length)return e.rules;if(!e.name)return[];var n="".concat(e.name).lastIndexOf(".")||-1,r="".concat(e.name).slice(n+1);return Go(null==d?void 0:d.rules,e.name)||Go(null==d?void 0:d.rules,r)||[]})),D=function(){var t=Qf(ah.mark((function t(n){var r,o;return ah.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((o={successList:[],errorList:[],rules:[],resultList:[],allowSetValue:!1}).rules="all"===n?B.value:B.value.filter((function(e){return(e.trigger||"change")===n})),!B.value.length||null!==(r=o.rules)&&void 0!==r&&r.length){t.next=4;break}return t.abrupt("return",o);case 4:return o.allowSetValue=!0,t.next=7,Uw(F.value,o.rules);case 7:return o.resultList=t.sent,o.errorList=o.resultList.filter((function(e){return!0!==e.result})).map((function(t){return Object.keys(t).forEach((function(n){if(!t.message&&R.value[n]){var r=bl(e.label)?e.label:e.name;t.message=(o=R.value[n],a={name:r,validate:t[n]},o.replace(/\${(.*?)}/g,(function(e,t){return a[t.trim()]||""})))}var o,a})),t})),o.successList=o.resultList.filter((function(e){return!0===e.result&&e.message&&"success"===e.type})),t.abrupt("return",o);case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),V=function(){var t=Qf(ah.mark((function t(n,r){var o,a,i,l,s;return ah.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return M.value=!0,U.value=r,t.next=4,D(n);case 4:return o=t.sent,a=o.successList,i=o.errorList,l=o.rules,s=o.resultList,o.allowSetValue&&(T.value=a,N.value=i),l.length&&(A.value=i.length?cg.FAIL:cg.SUCCESS),I.value&&P(),M.value=!1,t.abrupt("return",w({},e.name,0===i.length||s));case 15:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),j=function(){var t=Qf(ah.mark((function t(n){var r,o,a;return ah.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,D(n);case 2:return r=t.sent,o=r.errorList,a=r.resultList,t.abrupt("return",w({},e.name,0===o.length||a));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),F=t.computed((function(){return(null==d?void 0:d.data)&&Go(null==d?void 0:d.data,e.name)})),z=t.ref(void 0),$=t.toRefs(e).name,H=t.reactive({name:$,resetHandler:P,resetField:L,validate:V,validateOnly:j,setValidateMessage:function(e){(e||_e(e))&&(0===e.length&&(N.value=[],A.value=cg.SUCCESS),N.value=e.map((function(e){return qw(qw({},e),{},{result:!1})})),A.value=cg.FAIL)}});t.onMounted((function(){z.value=Zs(F.value),null==d||d.children.push(H)})),t.onBeforeUnmount((function(){d&&(d.children=null==d?void 0:d.children.filter((function(e){return e!==H})))})),t.watch(F,Qf(ah.mark((function e(){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V("change");case 2:case"end":return e.stop()}}),e)}))),{deep:!0}),t.watch((function(){return[e.name,JSON.stringify(e.rules)].join(",")}),(function(){V("change")}));var U=t.ref(void 0),W=t.computed((function(){return Hd(U.value)?U.value:Hd(e.showErrorMessage)?e.showErrorMessage:null==d?void 0:d.showErrorMessage})),G=t.computed((function(){return[a.value.formItem,Yw(f.value,e.name),w(w({},a.value.formItemWithHelp,K.value),a.value.formItemWithExtra,q.value)]})),K=t.computed((function(){var e=o("help");return e?t.createVNode("div",{class:a.value.help},[e]):null})),q=t.computed((function(){var e,n=function(e){return t.createVNode("div",{class:a.value.extra,title:e},[e])},r=N.value;return W.value&&null!=r&&null!==(e=r[0])&&void 0!==e&&e.message?n(r[0].message):T.value.length?n(T.value[0].message):null})),Y=t.computed((function(){var n=o("tips");if(!n)return null;var r=["".concat(f.value,"-tips"),"".concat(p.value,"-tips"),"".concat(p.value,"-is-").concat(e.status||"default")];return t.createVNode("div",{class:r},[n])})),X=function(){var e=Qf(ah.mark((function e(){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V("blur");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return t.provide(dg,{handleBlur:X}),function(){return t.createVNode("div",{class:G.value},[x(),t.createVNode("div",{class:O.value,style:_.value},[t.createVNode("div",{class:a.value.controlsContent},[o("default"),C()]),K.value,Y.value,q.value])])}}}),Zw={colon:Boolean,data:{type:Object,default:function(){return{}}},disabled:{type:Boolean,default:void 0},errorMessage:{type:Object},formControlledComponents:{type:Array},labelAlign:{type:String,default:"right",validator:function(e){return!e||["left","right","top"].includes(e)}},labelWidth:{type:[String,Number],default:"100px"},layout:{type:String,default:"vertical",validator:function(e){return!e||["vertical","inline"].includes(e)}},preventSubmitDefault:{type:Boolean,default:!0},readonly:{type:Boolean,default:void 0},requiredMark:{type:Boolean,default:void 0},resetType:{type:String,default:"empty",validator:function(e){return!e||["empty","initial"].includes(e)}},rules:{type:Object},scrollToFirstError:{type:String,validator:function(e){return!e||["","smooth","auto"].includes(e)}},showErrorMessage:{type:Boolean,default:!0},statusIcon:{type:[Boolean,Function],default:void 0},submitWithWarningMessage:Boolean,onReset:Function,onSubmit:Function,onValidate:Function};function Jw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Qw=t.defineComponent({name:"TForm",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jw(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Zw),setup:function(e,n){var r=n.expose,o=Vd(),a=t.toRefs(e),i=a.disabled,l=a.readonly;t.provide("formDisabled",{disabled:i}),t.provide("formReadonly",{readonly:l});var s=t.ref(null),c=t.ref([]),u=t.toRefs(e),d=u.showErrorMessage,p=u.labelWidth,f=u.labelAlign,h=u.data,m=u.colon,v=u.requiredMark,g=u.rules,b=u.errorMessage,y=u.resetType;t.provide(ug,t.reactive({showErrorMessage:d,labelWidth:p,labelAlign:f,data:h,colon:m,requiredMark:v,rules:g,errorMessage:b,resetType:y,children:c,renderContent:o}));var k=cc("form"),x=sg(),E=t.computed((function(){return[x.value.form,w({},"".concat(k.value,"-inline"),"inline"===e.layout)]})),C=cc("form-item"),S=function(t){if(Hd(t))return"";var n=pl(Object.keys(t),1)[0];if(e.scrollToFirstError){var r=Yw(C.value,n);O(r)}var o=t[n];return _e(o)?o.filter((function(e){return!e.result}))[0].message:""},O=function(t){var n=pl(s.value.getElementsByClassName(t),1)[0],r=e.scrollToFirstError;r&&n&&n.scrollIntoView({behavior:r})},_=function(e,t){return!t||!_e(t)||-1!==t.indexOf("".concat(e))},N=function(e){var t=e.reduce((function(e,t){return Object.assign(e||{},t)}),{});return Object.keys(t).forEach((function(e){!0===t[e]&&delete t[e]})),!!Kc(t)||t},T=function(){var t=Qf(ah.mark((function t(n){var r,o,a,i,l,s,u,d,p,f;return ah.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=(o=n||{}).fields,i=o.trigger,l=void 0===i?"all":i,s=o.showErrorMessage,u=c.value.filter((function(e){return U(e.validate)&&_(String(e.name),a)})).map((function(e){return e.validate(l,s)})),t.next=4,Promise.all(u);case 4:return d=t.sent,p=N(d),f=S(p),null===(r=e.onValidate)||void 0===r||r.call(e,{validateResult:p,firstError:f}),t.abrupt("return",p);case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),A=function(){var e=Qf(ah.mark((function e(t){var n,r,o,a,i,l;return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=(n=t||{}).fields,o=n.trigger,a=void 0===o?"all":o,i=c.value.filter((function(e){return U(e.validateOnly)&&_(String(e.name),r)})).map((function(e){return e.validateOnly(a)})),e.next=4,Promise.all(i);case 4:return l=e.sent,e.abrupt("return",N(l));case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=t.ref(),I=function(){var e=Qf(ah.mark((function e(t){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M.value=t,Dc(s.value);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=t.ref();return r({validate:T,submit:I,reset:function(e){P.value=e,s.value.reset()},clearValidate:function(e){c.value.forEach((function(t){U(t.resetHandler)&&_(String(t.name),e)&&t.resetHandler()}))},setValidateMessage:function(e){var t=Object.keys(e);if(t.length){var n=c.value.filter((function(e){return U(e.setValidateMessage)&&t.includes("".concat(e.name))})).map((function(t){return t.setValidateMessage(e[t.name])}));Promise.all(n)}},validateOnly:A}),function(){return t.createVNode("form",{ref:s,class:E.value,onSubmit:function(t){return function(t){e.preventSubmitDefault&&t&&(t.preventDefault(),t.stopPropagation()),T(M.value).then((function(n){var r;null===(r=e.onSubmit)||void 0===r||r.call(e,{validateResult:n,firstError:S(n),e:t})})),M.value=void 0}(t)},onReset:function(t){return function(t){var n;e.preventSubmitDefault&&t&&(t.preventDefault(),t.stopPropagation()),c.value.filter((function(e){var t;return U(e.resetField)&&_(String(e.name),null===(t=P.value)||void 0===t?void 0:t.fields)})).forEach((function(e){var t;return e.resetField(null===(t=P.value)||void 0===t?void 0:t.type)})),P.value=void 0,null===(n=e.onReset)||void 0===n||n.call(e,{e:t})}(t)}},[o("default")])}}}),ek=Nd(Qw),tk=Nd(Xw),nk={allowUncheck:Boolean,checked:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultChecked:Boolean,default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},label:{type:[String,Function]},name:{type:String,default:""},readonly:Boolean,value:{type:[String,Number,Boolean],default:void 0},onChange:Function,onClick:Function},rk=Symbol("RadioGroupProvide"),ok=Symbol("RadioButtonProvide");function ak(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var ik=t.defineComponent({name:"TRadio",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ak(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ak(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},nk),setup:function(e,n){var r=n.attrs,o=t.ref(),a=t.toRefs(e),i=pl(Fm(a.checked,a.modelValue,e.defaultChecked,e.onChange,"checked"),2),l=i[0],s=i[1],c=t.computed((function(){return u?e.value===u.value:l.value})),u=t.inject(rk,void 0),d=t.computed((function(){return Boolean(e.allowUncheck||(null==u?void 0:u.allowUncheck))})),p=function(e){e.stopPropagation()},f=function(t){var n;if(!v.value&&!e.readonly&&(null===(n=e.onClick)||void 0===n||n.call(e,{e:t}),!c.value||d.value))if(u){var r=c.value&&d.value?void 0:e.value;u.setValue(r,{e:t})}else{var o=!d.value||!c.value;s(o,{e:t})}},h=t.computed((function(){return e={focus:r.onFocus,blur:r.onBlur,keydown:r.onKeydown,keyup:r.onKeyup,keypresss:r.onKeypresss},t={},Object.keys(e).forEach((function(n){wl(e[n])||(t[n]=e[n])})),t;var e,t})),m=t.computed((function(){var e=[].concat(g(Object.keys(h.value)),["input","change"]).map((function(e){return"on".concat(e[0].toUpperCase()).concat(e.slice(1))}));return Vv(r,e)})),v=Ud({afterDisabled:t.computed((function(){return null==u?void 0:u.disabled}))}),b=t.computed((function(){return{name:u?u.name:e.name,checked:c.value,disabled:v.value,readonly:e.readonly,value:e.value}})),y=uc().STATUS,k=t.inject(ok,void 0),x=cc("radio-button"),E=cc("radio"),C=t.computed((function(){return k?x.value:E.value})),S=t.computed((function(){return["".concat(C.value),w(w({},y.value.checked,b.value.checked),y.value.disabled,b.value.disabled)]})),O=Fd();return function(){return t.createVNode("label",t.mergeProps({ref:o,class:S.value},m.value,{tabindex:v.value?void 0:"0",onClick:f}),[t.createVNode("input",t.mergeProps({type:"radio",class:"".concat(C.value,"__former")},h.value,b.value,{onClick:p,tabindex:"-1","data-value":bl(e.value)?"'".concat(e.value,"'"):e.value,"data-allow-uncheck":d.value||void 0}),null),t.createVNode("span",{class:"".concat(C.value,"__input")},null),t.createVNode("span",{class:"".concat(C.value,"__label")},[O("default","label")])])}}}),lk=Rm,sk=E;const ck=x((function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return sk(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),lk(e,t,{leading:r,maxWait:t,trailing:o})}));var uk={allowUncheck:Boolean,disabled:{type:Boolean,default:void 0},name:{type:String,default:""},options:{type:Array},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},value:{type:[String,Number,Boolean],default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},defaultValue:{type:[String,Number,Boolean]},variant:{type:String,default:"outline",validator:function(e){return!e||["outline","primary-filled","default-filled"].includes(e)}},onChange:Function};var dk=["window"],pk="undefined"!=typeof window?window:void 0;function fk(e,n){var r,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=a.window,l=void 0===i?pk:i,s=hl(a,dk),c=l&&"MutationObserver"in l,u=function(){r&&(r.disconnect(),r=void 0)},d=t.watch((function(){return n=e,o=t.unref(n),null!==(r=null==o?void 0:o.$el)&&void 0!==r?r:o;var n,r,o}),(function(e){u(),c&&l&&e&&(r=new MutationObserver(n)).observe(e,s)}),{immediate:!0}),p=function(){u(),d()};return o=p,t.getCurrentScope()&&t.onScopeDispose(o),{isSupported:c,stop:p}}function hk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vk=t.defineComponent({name:"TRadioGroup",props:mk({},uk),setup:function(e){var n=t.toRefs(e),r=pl(Fm(n.value,n.modelValue,e.defaultValue,e.onChange),2),o=r[0],a=r[1],i=t.ref(),l=cc("radio-button"),s=uc(),c=s.STATUS,u=s.SIZE;!function(e,n){var r=function(e){if(wy.test(e.key)||wy.test(e.code)){e.preventDefault();var t=e.target.querySelector("input");if(!t)return;var r=t.dataset;if(t.checked&&r.allowUncheck)n(void 0,{e:e});else{var o=isNaN(Number(r.value))?r.value:Number(r.value);o=bl(o)&&{true:!0,false:!1}[o]||o,o=bl(o)&&"'"===o[0]?o.replace(/'/g,""):o,n(o,{e:e})}}};t.onMounted((function(){Tc(e.value,"keydown",r)})),t.onBeforeMount((function(){Ac(e.value,"keydown",r)}))}(i,a);var d,p=t.computed((function(){return".".concat(l.value,".").concat(c.value.checked)})),f=t.ref({width:"0px",height:"0px",left:"0px",top:"0px","transition-property":"none"}),h=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("outline"!==e.variant){var n=i.value.querySelector(p.value),r=t?"none":"all";if(n){var o=n.offsetWidth,a=n.offsetHeight,l=n.offsetLeft,s=n.offsetTop;o?f.value={"transition-property":r,width:"".concat(o,"px"),height:"".concat(a,"px"),left:"".concat(l,"px"),top:"".concat(s,"px")}:function(){var e=document.createElement("div");e.setAttribute("style","position: absolute; visibility: hidden;"),e.appendChild(i.value.cloneNode(!0)),document.body.appendChild(e);var t=e.querySelector(p.value),n=t.offsetWidth,r=t.offsetHeight,o=t.offsetLeft,a=t.offsetTop;f.value=mk(mk({},f.value),{},{width:"".concat(n,"px"),height:"".concat(r,"px"),left:"".concat(o,"px"),top:"".concat(a,"px")}),document.body.removeChild(e)}()}else f.value={"transition-property":r,width:"0px",height:"9px",left:"0px",top:"0px"}}};t.watch(o,Qf(ah.mark((function e(){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.nextTick();case 2:h();case 3:case"end":return e.stop()}}),e)})))),t.onMounted((function(){h(!0),Wm(i,ck(Qf(ah.mark((function e(){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.nextTick();case 2:h();case 3:case"end":return e.stop()}}),e)}))),300));var e=i.value.querySelector("".concat(p.value," .").concat(l.value,"__label"));e&&(d=fk(e,(function(e){e.forEach((function(e){"characterData"===e.type&&h()}))}),{attributes:!0,childList:!0,characterData:!0,subtree:!0}))})),t.onUnmounted((function(){var e;null===(e=d)||void 0===e||e.stop()}));var m=t.toRefs(e),v=m.name,g=m.disabled;t.provide(rk,t.reactive({name:v,disabled:g,value:o,allowUncheck:e.allowUncheck,setValue:a}));var b=cc("radio-group"),y=jd(),k=function(){if(e.variant.includes("filled")&&!Zf(o.value))return t.createVNode("div",{style:f.value,class:"".concat(b.value,"__bg-block")},null)},x=t.computed((function(){return["".concat(b.value),u.value[e.size],w(w(w({},"".concat(b.value,"__outline"),"outline"===e.variant),"".concat(b.value,"--filled"),e.variant.includes("filled")),"".concat(b.value,"--primary-filled"),"primary-filled"===e.variant)]}));return function(){return t.createVNode("div",{ref:i,class:x.value},[y("default")||(null===(n=e.options)||void 0===n?void 0:n.map((function(n){var r=n;return(El(n)||bl(n))&&(r={value:n,label:n.toString()}),t.createVNode(ik,{key:"radio-group-options-".concat(r.value,"-").concat(Math.random()),name:e.name,checked:o.value===r.value,disabled:"disabled"in r?r.disabled:e.disabled,value:r.value},{default:function(){return[U(r.label)?r.label(t.h):r.label]}})}))),k()]);var n}}});function gk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?gk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var yk=t.defineComponent({name:"TRadioButton",inheritAttrs:!1,props:bk({},nk),setup:function(e,n){var r=n.attrs;t.provide(ok,t.reactive({}));var o=t.computed((function(){return bk(bk({},e),Vv(r,Object.keys(r).filter((function(e){return e.startsWith("on")}))))})),a=Fd();return function(){var e,n;return t.createVNode(ik,o.value,"function"==typeof(n=e=a("default","label"))||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?e:{default:function(){return[e]}})}}});Nd(ik);var wk=Nd(vk),kk=Nd(yk),xk={disabled:{type:Boolean,default:void 0},inputNumberProps:{type:[Boolean,Object],default:!1},label:{type:[String,Boolean,Function],default:!0},layout:{type:String,default:"horizontal",validator:function(e){return!e||["vertical","horizontal"].includes(e)}},marks:{type:[Object,Array]},max:{type:Number,default:100},min:{type:Number,default:0},range:Boolean,showStep:Boolean,step:{type:Number,default:1},tooltipProps:{type:Object},value:{type:[Number,Array],default:void 0},modelValue:{type:[Number,Array],default:void 0},defaultValue:{type:[Number,Array],default:0},onChange:Function,onChangeEnd:Function},Ek=function(e,t){return t?{top:"calc(".concat(100-e,"% - 1px)")}:{left:"".concat(e,"%")}},Ck=function(e,t){return"first"===t?e instanceof Array?e[0]:e:e instanceof Array?e[1]:0};function Sk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ok(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _k={visible:!1,trigger:"hover",showArrow:!0,overlayInnerStyle:void 0,overlayClassName:void 0,attach:"body",theme:"default"},Nk=function(e){var n=t.ref(),r=t.computed({get:function(){return!1==!e.value.tooltipProps},set:function(e){return e}}),o=t.ref(Ok({},_k)),a=Vd();return{tooltipRef:n,tooltipProps:t.computed((function(){var t=e.value,n=t.vertical,r=t.tooltipProps,i=t.label,l=t.value,s=t.position,c=t.range,u=n?"right":"top",d=!0===i?String(l):"string"==typeof i?function(e,t){if(!1===Boolean(e))return String(t);if(bl(e)){var n=String(t);try{var r=/\${value}%/g;if(!r.test(e))throw n=e,new Error;n=e.replace(r,String(t))}catch(o){console.warn("fail to parse label prop, please pass string such as '${value}%'")}return n}return e}(i,l):a("label",{params:c?{value:l,position:s}:{value:l}});return r instanceof Object?(null!=r&&r.placement||(o.value.placement=u),r.content&&(d=r.content),Ok(Ok(Ok({},o.value),r),{},{content:d})):Ok(Ok({},o.value),{},{placement:u,content:d})})),toggleTooltip:function(e){r.value&&(o.value.visible=e)},showTooltip:r}},Tk=Symbol("sliderProps"),Ak=t.defineComponent({name:"TSliderButton",props:{value:{type:[Number],default:0},vertical:{type:Boolean,default:!1},tooltipProps:{type:[Boolean,Object],default:!0},label:{type:[String,Boolean,Function]},range:{type:Boolean,default:!1},position:{type:String}},emits:["input","mouseup"],setup:function(e,n){var r=cc("slider__button"),o=t.computed((function(){return e})),a=Nk(o),i=a.tooltipRef,l=a.tooltipProps,s=a.toggleTooltip,c=a.showTooltip,u=t.inject(Tk),d=t.ref(),p=t.ref(!1),f=t.reactive({dragging:!1,isClick:!1,startX:0,startY:0,startPos:0,newPos:null}),h=t.computed((function(){return Number(u.max)-Number(u.min)})),m=t.computed((function(){return"".concat((e.value-u.min)/h.value*100,"%")})),v=t.computed((function(){return u.step})),g=t.computed((function(){return e.vertical?{bottom:m.value}:{left:m.value}}));t.watchEffect((function(){u.toggleDragging(f.dragging)}));var b=function(e){var r=e;if(null!==r&&!Number.isNaN(r)){r>100?r=100:r<0&&(r=0);var o=100*v.value/h.value,a=Math.round(r/o)*o*h.value*.01;a+=u.min,a=Number(parseFloat("".concat(a)).toFixed(u.precision)),n.emit("input",a),t.nextTick((function(){var e,t;i.value&&(null===(e=(t=i.value).updatePopper)||void 0===e||e.call(t))}))}},y=function(){d.value.focus(),s(!0)},k=function(){f.dragging||s(!1)},x=function(t){var n=t;if(f.dragging){p.value=!0,f.isClick=!1,null!=u&&u.resetSize&&U(null==u?void 0:u.resetSize)&&u.resetSize();var r=0,o=u.sliderSize;r=(r=e.vertical?f.startY-n.clientY:n.clientX-f.startX)/o*100,f.newPos=f.startPos+r,b(f.newPos)}},E=function e(){f.dragging&&(setTimeout((function(){f.dragging=!1,s(!1),f.isClick||b(f.newPos),p.value&&n.emit("mouseup"),p.value=!1}),0),window.removeEventListener("mousemove",x),window.removeEventListener("touchmove",x),window.removeEventListener("mouseup",e),window.removeEventListener("touchend",e),window.removeEventListener("contextmenu",e))};function C(t){u.disabled||(t.preventDefault(),function(t){f.dragging=!0,f.isClick=!0;var n=t.type,r=t.clientY,o=t.clientX;if("touchstart"===n){var a=t.touches,i=[a[0].clientY,a[0].clientX];r=i[0],o=i[1]}e.vertical?f.startY=r:f.startX=o,f.startPos=parseFloat(m.value),f.newPos=f.startPos}(t),window.addEventListener("mousemove",x),window.addEventListener("mouseup",E),window.addEventListener("touchmove",x),window.addEventListener("touchend",E),window.addEventListener("contextmenu",E))}var S=function(e){if(!u.disabled){var t=v.value/h.value*100;"sub"===e&&(t=-t),f.newPos=parseFloat(m.value)+t,b(f.newPos)}},O=function(e){var t=e.code;e.preventDefault(),"ArrowDown"!==t&&"ArrowLeft"!==t||S("sub"),"ArrowUp"!==t&&"ArrowRight"!==t||S("add")};return n.expose({setPosition:b}),function(){return t.createVNode("div",{ref:d,class:"".concat(r.value,"-wrapper"),style:g.value,tabindex:"0","show-tooltip":c.value,disabled:u.disabled,onmouseenter:y,onmouseleave:k,onmousedown:C,onTouchstart:C,onfocus:y,onblur:k,onKeydown:O},[t.createVNode(Rv,t.mergeProps({ref:i,hideEmptyPopup:!0,disabled:!c.value},l.value),{default:function(){return[t.createVNode("div",{class:[r.value,w({},"".concat(r.value,"--dragging"),f.dragging)]},null)]}})])}}}),Mk=t.defineComponent({name:"TSliderMark",props:{mark:{type:[Object,Array,String,Number]},point:{type:Number},onClickMarkPoint:{type:Function,default:function(){}}},setup:function(e){var n=cc("slider__mark"),r=function(t){var n;t.stopPropagation(),null==e||null===(n=e.onClickMarkPoint)||void 0===n||n.call(e,e.point)};return function(){return t.createVNode("div",{class:"".concat(n.value,"-text"),onClick:r},[e.mark])}}});function Ik(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ik(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ik(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Lk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Rk,Bk=t.defineComponent({name:"TSlider",model:{prop:"value",event:"change"},props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},xk),setup:function(e){var n=Ud(),r=cc("slider"),o=uc().STATUS,a=t.toRefs(e),i=pl(Fm(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref(),u=t.ref(),d=t.ref(),p=t.ref(),f=t.ref(Ck(l.value,"first")),h=t.ref(Ck(l.value,"second")),m=t.ref(!1),v=t.ref(1),b=t.computed((function(){return"vertical"===e.layout})),y=t.computed((function(){return["".concat(r.value,"__container"),{"is-vertical":b.value}]})),k=t.computed((function(){return["".concat(r.value),w(w(w({"is-vertical":b.value},"".concat(r.value,"--with-input"),e.inputNumberProps),"".concat(r.value,"--vertical"),b.value),o.value.disabled,n.value)]})),x=t.computed((function(){return["".concat(r.value,"__rail"),{"show-input":e.inputNumberProps,disabled:n.value}]})),E=t.computed((function(){return b.value?{height:"100%"}:{}})),C=t.computed((function(){var t=e.range?"".concat(100*(O.value-e.min)/S.value,"%"):"0%",n=e.range?_.value-O.value:f.value-e.min,r="".concat(100*n/S.value,"%");return b.value?{height:r,bottom:t}:{width:r,left:t}})),S=t.computed((function(){return e.max-e.min})),O=t.computed((function(){return Math.min(f.value,h.value)})),_=t.computed((function(){return Math.max(f.value,h.value)})),N=t.computed((function(){if(!e.showStep||e.min>e.max)return[];if(0===e.step)return console.warn("[Element Warn][Slider]step should not be 0."),[];for(var t=S.value/e.step,n=100*e.step/S.value,r=[],o=1;o<t;o++)r.push(o*n);return e.range?r.filter((function(t){return t<100*(O.value-e.min)/S.value||e.step>100*(_.value-e.max)/S.value})):r.filter((function(t){return t>100*(f.value-e.min)/S.value}))})),T=t.computed((function(){var t=[e.min,e.max,e.step].map((function(e){var t="".concat(e).split(".");return t[1]?t[1].length:0}));return Math.max.apply(null,t)})),A=function(t){var n=[e.min,e.max],r=n[0],o=n[1];if(!(r>o)){if(e.range&&_e(t)){var a=[Math.min.apply(Math,g(t)),Math.max.apply(Math,g(t))],i=a[0],l=a[1];i>o&&(i=f.value),i<r&&(i=r),l<r&&(l=h.value),l>o&&(l=o);var s=[i,l];return f.value=s[0],h.value=s[1],[i,l]}var c=t;return c<r&&(c=r),c>o&&(c=o),c}console.warn("[Slider] max should be greater than min.")},M=function(t){var n=t;void 0===n&&(n=e.range?[f.value,h.value]:f.value);var r=A(n);s(r)},I=function(){u.value&&(v.value=u.value["client".concat(b.value?"Height":"Width")])},P=t.ref(!1),L=function(){var t;e.range?(_e(l.value)?(f.value=Math.max(e.min||0,l.value[0]),h.value=Math.min(e.max||100,l.value[1])):(f.value=e.min||0,h.value=e.max||100),t="".concat(f.value,"-").concat(h.value)):(El(l.value)?f.value=Math.min(e.max,Math.max(e.min,l.value)):f.value=e.min,t=String(f.value)),c.value&&c.value.setAttribute("aria-valuetext",t),I(),window.addEventListener("resize",I)},R=function(t){var n,r=t*S.value/100;(r=e.min+r,e.range||!d.value)?("button1"===(n=Math.abs(O.value-r)<Math.abs(_.value-r)?f.value<h.value?"button1":"button2":f.value>h.value?"button1":"button2")&&d.value&&d.value.setPosition(t),"button2"===n&&p.value&&p.value.setPosition(t)):d.value.setPosition(t)},B=function(){var t=e.range?[f.value,h.value]:f.value;return A(t)},D=function(t){var r;if(!n.value&&!m.value&&u.value){I();var o=0;if(b.value){o=(u.value.getBoundingClientRect().bottom-t.clientY)/v.value*100,R(o)}else{var a=u.value.getBoundingClientRect().left;o=(t.clientX-a)/v.value*100,R(o)}var i=B();null===(r=e.onChangeEnd)||void 0===r||r.call(e,i)}},V=function(t){var r;if(!n.value&&!m.value){I();var o=Number(t/S.value*100);R(o),M(t);var a=B();null===(r=e.onChangeEnd)||void 0===r||r.call(e,a)}};t.watch((function(){return l.value}),(function(t){if(!0!==m.value)if(_e(t)&&e.range){var n=pl(t,2);f.value=n[0],h.value=n[1]}else f.value=t})),t.watch([f,h,m],(function(t,n){t[0]!==n[0]&&(e.range?M([O.value,_.value]):M(f.value)),t[1]!==n[1]&&e.range&&M([O.value,_.value]),t[2]!==n[2]&&!1===t[2]&&L()})),t.onMounted((function(){L(),P.value=!0})),t.onBeforeUnmount((function(){window.removeEventListener("resize",I)}));var j,F,z,$=t.computed((function(){return{max:e.max,min:e.min,marks:e.marks,vertical:b.value,prefixName:r.value}})),H=(F=(j=$).value.prefixName,z=t.computed((function(){var e=j.value;if(!e.marks)return[];var t=[];if(_e(e.marks)){var n=Zs(e.marks).sort((function(e,t){return e-t})),r=Math.max.apply(Math,g(n).concat([e.max])),o=Math.min.apply(Math,g(n).concat([e.min]));o<e.min&&$m.errorOnce("TSlider","marks min value should >= props min"),r>e.max&&$m.errorOnce("TSlider","marks max value should <= props max"),n.forEach((function(e){t.push({point:e,position:(e-o)/(r-o)*100,mark:e})}))}else Object.keys(e.marks).map(parseFloat).sort((function(e,t){return e-t})).filter((function(t){return t<=e.max&&t>=e.min})).forEach((function(n){var r={point:n,position:100*(n-e.min)/(e.max-e.min),mark:e.marks[n]};t.push(r)}));return t})),function(e){return z.value.length?t.createVNode("div",null,[t.createVNode("div",{class:"".concat(F,"__stops")},[z.value.map((function(e,n){return 0===e.position||100===e.position?null:t.createVNode("div",{class:"".concat(F,"__stop ").concat(F,"__mark-stop"),style:Ek(e.position,j.value.vertical),key:n},null)}))]),t.createVNode("div",{class:"".concat(F,"__mark")},[z.value.map((function(n,r){return t.createVNode(Mk,{mark:n.mark,point:n.point,key:r,style:Ek(n.position,j.value.vertical),onClickMarkPoint:e},null)}))])]):null}),U=function(e){var n=e.value.prefixName,r=t.computed((function(){var t,n={format:void 0,placeholder:"",theme:"column",decimalPlaces:(null===(t=e.value.step.toString().split(".")[1])||void 0===t?void 0:t.length)||0},r=e.value;if(!Hd(r.inputNumberProps)){var o,a=null===(o=r.inputNumberProps)||void 0===o?void 0:o.theme;n=Pk(Pk({},n),Mv(r.inputNumberProps,"onChange")),["column","row","normal"].includes(a)&&(n.theme=a)}return n})),o=t.computed((function(){return["".concat(n,"__input"),{"is-vertical":e.value.vertical}]}));return function(n,a){return t.createVNode(qg,t.mergeProps(r.value,{class:o.value,value:n,step:e.value.step,onChange:function(t,n){var r,o;void 0===t||isNaN(t)||a(t),null===(r=e.value)||void 0===r||null===(r=r.inputNumberProps)||void 0===r||null===(o=r.onChange)||void 0===o||o.call(r,t,n)},disabled:e.value.disabled,min:e.value.min,max:e.value.max}),null)}}(t.computed((function(){return{max:e.max,min:e.min,inputNumberProps:e.inputNumberProps,step:e.step,prefixName:r.value,vertical:b.value,disabled:n.value}}))),W=t.toRefs(e),G=W.min,K=W.max,q=W.step;return t.provide(Tk,t.reactive({min:G,max:K,step:q,dragging:m,toggleDragging:function(e){m.value=e},precision:T,disabled:n,resetSize:I,sliderSize:v})),function(){return t.createVNode("div",{class:y.value,ref:c},[t.createVNode("div",{class:k.value,role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-orientation":e.layout,"aria-disabled":n.value,"tooltip-props":e.tooltipProps},[t.createVNode("div",{class:x.value,style:E.value,onClick:D,ref:u},[t.createVNode("div",{class:"".concat(r.value,"__track"),style:C.value},null),t.createVNode(Ak,{vertical:b.value,value:f.value,ref:d,disabled:n.value,range:e.range,position:"start","tooltip-props":e.tooltipProps,label:e.label,onInput:function(e){f.value=e},onMouseup:function(){var t,n=B();null===(t=e.onChangeEnd)||void 0===t||t.call(e,n)}},null),e.range&&t.createVNode(Ak,{vertical:b.value,value:h.value,ref:p,disabled:n.value,label:e.label,range:e.range,position:"end","tooltip-props":e.tooltipProps,onInput:function(e){h.value=e},onMouseup:function(){var t,n=B();null===(t=e.onChangeEnd)||void 0===t||t.call(e,n)}},null),e.showStep&&t.createVNode("div",{class:"".concat(r.value,"__stops")},[N.value.map((function(e,n){return 0===e.position||100===e.position?null:t.createVNode("div",{class:"".concat(r.value,"__stop"),key:n,style:Ek(e,b.value)},null)}))]),H(V)])]),P.value&&e.inputNumberProps&&(o=A(f.value),a=A(h.value),t.createVNode("div",{class:["".concat(r.value,"__input-container"),{"is-vertical":b.value}]},[U(o,(function(e){f.value=A(e)})),e.range&&t.createVNode("div",{class:"".concat(r.value,"__center-line")},null),e.range&&U(a,(function(e){h.value=A(e)}))]))]);var o,a}}}),Dk=Nd(Bk);Nd(Ak);var Vk=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing"];function jk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Rk||(Rk=document.createElement("textarea"),document.body.appendChild(Rk));var r=function(e){if("undefined"!=typeof window&&e){var t=window.getComputedStyle(e),n=t.getPropertyValue("box-sizing")||t.getPropertyValue("-moz-box-sizing")||t.getPropertyValue("-webkit-box-sizing"),r=parseFloat(t.getPropertyValue("padding-bottom"))+parseFloat(t.getPropertyValue("padding-top")),o=parseFloat(t.getPropertyValue("border-bottom-width"))+parseFloat(t.getPropertyValue("border-top-width"));return{sizingStyle:Vk.map((function(e){return"".concat(e,":").concat(t.getPropertyValue(e))})).join(";"),paddingSize:r,borderSize:o,boxSizing:n}}}(e),o=r.paddingSize,a=r.borderSize,i=r.boxSizing,l=r.sizingStyle;Rk.setAttribute("style","".concat(l,";").concat("\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow-y:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important\n")),Rk.value=e.value||e.placeholder||"";var s=Rk.scrollHeight,c={};"border-box"===i?s+=a:"content-box"===i&&(s-=o),Rk.value="";var u=Rk.scrollHeight-o;if(null!==t){var d=u*t;"border-box"===i&&(d=d+o+a),s=Math.max(d,s),c.minHeight="".concat(d,"px")}if(null!==n){var p=u*n;"border-box"===i&&(p=p+o+a),s=Math.min(p,s)}return c.height="".concat(s,"px"),Rk.parentNode&&Rk.parentNode.removeChild(Rk),Rk=null,c}var Fk={allowInputOverMax:{type:Boolean,default:!1},autofocus:Boolean,autosize:{type:[Boolean,Object],default:!1},disabled:{type:Boolean,default:void 0},maxcharacter:{type:Number},maxlength:{type:[Number,String]},name:{type:String,default:""},placeholder:{type:String,default:void 0},readonly:Boolean,status:{type:String,validator:function(e){return["default","success","warning","error"].includes(e)}},tips:{type:[String,Function]},value:{type:[String,Number]},modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},onBlur:Function,onChange:Function,onFocus:Function,onKeydown:Function,onKeypress:Function,onKeyup:Function,onValidate:Function};function zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $k(e){var t={};return Object.keys(e).forEach((function(n){wl(e[n])||(t[n]=e[n])})),t}var Hk=t.defineComponent({name:"TTextarea",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Fk),setup:function(e,n){var r=n.attrs,o=n.expose,a=cc(),i=cc("textarea"),l=t.computed((function(){return"".concat(i.value,"__tips")})),s=t.computed((function(){return"".concat(i.value,"__limit")})),c=t.toRefs(e),u=pl(Fm(c.value,c.modelValue,e.defaultValue,e.onChange),2),d=u[0],p=u[1],f=Ud(),h=t.ref({}),m=t.ref(),v=t.ref(!1),g=t.ref(!1),y=function(){var t;if(!0===e.autosize)h.value=jk(m.value);else if(e.autosize&&"object"===b(e.autosize)){var n=e.autosize,o=n.minRows,a=n.maxRows;h.value=jk(m.value,o,a)}else r.rows?h.value={height:"auto",minHeight:"auto"}:r.style&&null!==(t=m.value)&&void 0!==t&&null!==(t=t.style)&&void 0!==t&&t.height&&(h.value={height:m.value.style.height})},k=function(n){var r=n.target.value;if(e.maxcharacter&&e.maxcharacter>=0){var o=Sl(r,e.maxcharacter);r="object"===b(o)&&o.characters}!g.value&&p(r,{e:n}),t.nextTick((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=m.value,n=String(e);t&&t.value!==n&&(t.value=n,d.value=n)}(r)})),y()},x=function(e){k(e)},E=function(){g.value=!0},C=function(e){g.value=!1,k(e)},S=function(t,n){var r;if(!f.value){var o="on".concat(t[0].toUpperCase()).concat(t.slice(1));null===(r=e[o])||void 0===r||r.call(e,d.value,{e:n})}},O=function(e){S("keydown",e)},_=function(e){S("keyup",e)},N=function(e){S("keypress",e)},T=function(t){var n;y(),f.value||(v.value=!0,null===(n=e.onFocus)||void 0===n||n.call(e,d.value,{e:t}))},A=t.inject(dg,void 0),M=function(t){var n;y(),v.value=!1,null===(n=e.onBlur)||void 0===n||n.call(e,d.value,{e:t}),null==A||A.handleBlur()},I=t.computed((function(){return[i.value,w(w({},"".concat(a.value,"-is-disabled"),f.value),"".concat(a.value,"-is-readonly"),e.readonly)]})),P=t.computed((function(){return $k({autofocus:e.autofocus,disabled:f.value,readonly:e.readonly,placeholder:e.placeholder,maxlength:!e.allowInputOverMax&&e.maxlength||void 0,name:e.name||void 0})})),L=t.computed((function(){var e=Sl(String(d.value||""));return"object"===b(e)?e.length:e})),R=pg(t.computed((function(){return{value:[void 0,null].includes(d.value)?void 0:String(d.value),status:e.status,maxlength:Number(e.maxlength),maxcharacter:e.maxcharacter,allowInputOverMax:e.allowInputOverMax,onValidate:e.onValidate}}))).tStatus;t.watch((function(){return d.value}),(function(){return y()})),t.watch(m,(function(e){e&&y()})),t.watch((function(){return e.autofocus}),(function(e){e&&m.value.focus()})),t.watch(h,(function(e){var t=r.style;fl(m.value,dl(t,e))})),t.watch(d,(function(){t.nextTick((function(){return y()}))})),t.watch((function(){return e.autosize}),y,{deep:!0}),o({focus:function(){var e;return null===(e=m.value)||void 0===e?void 0:e.focus()},blur:function(){var e;return null===(e=m.value)||void 0===e?void 0:e.blur()}}),t.onMounted((function(){y()}));var B=Vd();return function(){var n,o=$k({onFocus:T,onBlur:M,onKeydown:O,onKeyup:_,onKeypress:N}),c=uc().STATUS,u=t.computed((function(){return["".concat(i.value,"__inner"),w(w(w(w({},"".concat(a.value,"-is-").concat(R.value),R.value),c.value.disabled,f.value),c.value.focused,v.value),"".concat(a.value,"-resize-none"),"object"===b(e.autosize)),"narrow-scrollbar"]})),p=B("tips"),h=p&&t.createVNode("div",{class:"".concat(l.value," ").concat(i.value,"__tips--").concat(e.status||"normal")},[p]),g=e.maxcharacter&&t.createVNode("span",{class:s.value},["".concat(L.value,"/").concat(e.maxcharacter)])||!e.maxcharacter&&e.maxlength&&t.createVNode("span",{class:s.value},["".concat(d.value?null===(n=String(d.value))||void 0===n?void 0:n.length:0,"/").concat(e.maxlength)]);return t.createVNode("div",t.mergeProps({class:I.value},Vv(r,["style"])),[t.createVNode("textarea",t.mergeProps({onInput:x,onCompositionstart:E,onCompositionend:C,ref:m,value:d.value,class:u.value},o,P.value),null),h||g?t.createVNode("div",{class:["".concat(i.value,"__info_wrapper"),w({},"".concat(i.value,"__info_wrapper_align"),!h)]},[h,g]):null])}}}),Uk=Nd(Hk),Wk={borderless:Boolean,clearable:Boolean,closeBtn:{type:[String,Boolean,Function],default:!0},colorModes:{type:Array,default:function(){return["monochrome","linear-gradient"]}},disabled:Boolean,enableAlpha:Boolean,enableMultipleGradient:{type:Boolean,default:!0},format:{type:String,default:"RGB",validator:function(e){return!e||["RGB","RGBA","HSL","HSLA","HSB","HSV","HSVA","HEX","CMYK","CSS"].includes(e)}},inputProps:{type:Object},multiple:Boolean,popupProps:{type:Object},recentColors:{type:Array,default:void 0},defaultRecentColors:{type:Array,default:function(){return[]}},selectInputProps:{type:Object},showPrimaryColorPreview:{type:Boolean,default:!0},size:{type:String,default:"medium",validator:function(e){return!e||["small","medium","large"].includes(e)}},swatchColors:{type:Array},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},defaultValue:{type:String,default:""},onChange:Function,onPaletteBarChange:Function,onRecentColorsChange:Function},Gk={monochrome:"单色","linear-gradient":"渐变"},Kk="linear-gradient(90deg, rgba(241,29,0,1) 0%, rgba(73,106,220,1) 100%);",qk=["#ECF2FE","#D4E3FC","#BBD3FB","#96BBF8","#699EF5","#4787F0","#266FE8","#0052D9","#0034B5","#001F97","#FDECEE","#F9D7D9","#F8B9BE","#F78D94","#F36D78","#E34D59","#C9353F","#B11F26","#951114","#680506","#FEF3E6","#F9E0C7","#F7C797","#F2995F","#ED7B2F","#D35A21","#BA431B","#9E3610","#842B0B","#5A1907","#E8F8F2","#BCEBDC","#85DBBE","#48C79C","#00A870","#078D5C","#067945","#056334","#044F2A","#033017"],Yk=["HEX","RGB","HSL","HSV","CMYK","CSS"],Xk=function(e){var n=cc("color-picker");return t.computed((function(){return n.value}))};function Zk(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jk(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zk(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qk,ex,tx,nx,rx,ox,ax,ix=t.defineComponent({name:"PanelHeader",props:Jk(Jk({},Wk),{},{mode:{type:String,default:"color"},togglePopup:{type:Function},onModeChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=Xk(),r=t.ref(e.mode);return t.watch((function(){return e.mode}),(function(e){return r.value=e})),{baseClassName:n,modeValue:r,handleModeChange:function(t){return e.onModeChange(t)}}},render:function(){var e,n,r,o=this;if(1===(null===(n=this.colorModes)||void 0===n?void 0:n.length))return null;var a,i=this.baseClassName;return t.createVNode("div",{class:"".concat(i,"__head")},[t.createVNode("div",{class:"".concat(i,"__mode")},[1===(null===(r=this.colorModes)||void 0===r?void 0:r.length)?Gk[this.colorModes[0]]:t.createVNode(wk,{variant:"default-filled",size:"small",modelValue:o.modeValue,"onUpdate:modelValue":function(e){return o.modeValue=e},onChange:this.handleModeChange},(a=e=Object.keys(Gk).map((function(e){return t.createVNode(kk,{key:e,value:e},{default:function(){return[Gk[e]]}})})),"function"==typeof a||"[object Object]"===Object.prototype.toString.call(a)&&!t.isVNode(a)?e:{default:function(){return[e]}}))])])}}),lx=/cmyk\((\d+%?),(\d+%?),(\d+%?),(\d+%?)\)/,sx=function(e){return Math.max(0,Math.min(255,parseInt(e,10)))},cx=function(e){if(/cmyk/i.test(e)){var t=e.replace(/\s/g,"").match(lx),n=function(e,t,n,r){var o=e/100,a=t/100,i=n/100,l=r/100,s=1-(o=o*(1-l)+l),c=1-(a=a*(1-l)+l),u=1-(i=i*(1-l)+l);return{r:s=Math.round(255*s),g:c=Math.round(255*c),b:u=Math.round(255*u)}}(sx(t[1]),sx(t[2]),sx(t[3]),sx(t[4])),r=n.r,o=n.g,a=n.b;return"rgb(".concat(r,", ").concat(o,", ").concat(a,")")}return e},ux=function(e,t){for(var n="",r=0;r<e.length;r++)bl(e[r])?n+=e[r]:n+=e[r].source;return new RegExp(n,t)},dx=(Qk=/\s*,\s*/,ex=/(?:[+-]?\d*\.?\d+)(?:%|[a-z]+)?/,tx=ux(["(?:",/#(?:[a-f0-9]{6}|[a-f0-9]{3})/,"|","(?:rgb|hsl)",/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*\)/,"|","(?:rgba|hsla)",/\(\s*(?:\d{1,3}\s*,\s*){2}\d{1,3}\s*,\s*\d*\.?\d+\)/,"|",/[_a-z-][_a-z0-9-]*/,")"],""),nx=ux([tx,"(?:\\s+",ex,"(?:\\s+",ex,")?)?"],""),rx=ux(["(?:",nx,Qk,")*",nx],""),ox=ux(["(?:(",/(?:[+-]?\d*\.?\d+)(?:deg|grad|rad|turn)/,")|",/to\s+((?:(?:left|right|top|bottom)(?:\s+(?:top|bottom|left|right))?))/,")"],""),{gradientSearch:ux(["(?:(",ox,")",Qk,")?(",rx,")"],"gi"),colorStopSearch:ux(["\\s*(",tx,")","(?:\\s+","(",ex,"))?","(?:",Qk,"\\s*)?"],"gi")}),px=/.*gradient\s*\(((?:\([^)]*\)|[^)(]*)*)\)/gim,fx=function(e){return px.lastIndex=0,px.exec(e)},hx={top:0,right:90,bottom:180,left:270,"top left":225,"left top":225,"top right":135,"right top":135,"bottom left":315,"left bottom":315,"bottom right":45,"right bottom":45},mx=function(e){var t=fx(e);if(!t)return!1;var n={points:[],degree:0},r=function(e,t){var n,r,o;e.gradientSearch.lastIndex=0;var a=e.gradientSearch.exec(t);if(!yl(a))for(n={original:a[0],colorStopList:[]},a[1]&&(n.line=a[1]),a[2]&&(n.angle=a[2]),a[3]&&(n.sideCorner=a[3]),e.colorStopSearch.lastIndex=0,r=e.colorStopSearch.exec(a[4]);!yl(r);)o={color:r[1]},r[2]&&(o.position=r[2]),n.colorStopList.push(o),r=e.colorStopSearch.exec(a[4]);return n}(dx,t[1]);if(r.original.trim()!==t[1].trim())return!1;var o=r.colorStopList.map((function(e){var t=e.color,n=e.position,r=Object.create(null);return r.color=Bb(t).toRgbString(),r.left=parseFloat(n),r}));n.points=o;var a=parseInt(r.angle,10);return Number.isNaN(a)&&(a=hx[r.sideCorner]||90),n.degree=a,n};function vx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var bx=Math.round,yx=function(e){return Bb(e).toRgb()},wx=function(e){var t=e.points,n=e.degree,r=t.sort((function(e,t){return e.left-t.left})).map((function(e){return"".concat(e.color," ").concat(Math.round(100*e.left)/100,"%")}));return"linear-gradient(".concat(n,"deg,").concat(r.join(","),")")},kx=function(e,t){return{id:(1+4294967295*Math.random()).toString(16),left:e,color:t}},xx=function(){return og((function e(t){ng(this,e),w(this,"states",{s:100,v:100,h:100,a:1}),w(this,"originColor",void 0),w(this,"isGradient",void 0),w(this,"gradientStates",{colors:[],degree:0,selectedId:null,css:""}),this.update(t)}),[{key:"update",value:function(e){if(e!==this.originColor){if(this.isGradient){var t=Bb(e).toHsv();return this.states=t,void this.updateCurrentGradientColor()}this.originColor=e,this.isGradient=!1;var n=mx(e),r=e;if(n){var o,a;this.isGradient=!0;var i=n,l=i.points.map((function(e){return kx(e.left,e.color)}));this.gradientStates={colors:l,degree:i.degree,selectedId:(null===(o=l[0])||void 0===o?void 0:o.id)||null},this.gradientStates.css=this.linearGradient,r=null===(a=this.gradientSelectedPoint)||void 0===a?void 0:a.color}this.updateStates(r)}}},{key:"saturation",get:function(){return this.states.s},set:function(e){this.states.s=Math.max(0,Math.min(100,e)),this.updateCurrentGradientColor()}},{key:"value",get:function(){return this.states.v},set:function(e){this.states.v=Math.max(0,Math.min(100,e)),this.updateCurrentGradientColor()}},{key:"hue",get:function(){return this.states.h},set:function(e){this.states.h=Math.max(0,Math.min(360,e)),this.updateCurrentGradientColor()}},{key:"alpha",get:function(){return this.states.a},set:function(e){this.states.a=Math.max(0,Math.min(1,Math.round(100*e)/100)),this.updateCurrentGradientColor()}},{key:"rgb",get:function(){var e=yx(this.states),t=e.r,n=e.g,r=e.b;return"rgb(".concat(bx(t),", ").concat(bx(n),", ").concat(bx(r),")")}},{key:"rgba",get:function(){var e=yx(this.states),t=e.r,n=e.g,r=e.b,o=e.a;return"rgba(".concat(bx(t),", ").concat(bx(n),", ").concat(bx(r),", ").concat(o,")")}},{key:"hsv",get:function(){var e=this.getHsva(),t=e.h,n=e.s,r=e.v;return"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)")}},{key:"hsva",get:function(){var e=this.getHsva(),t=e.h,n=e.s,r=e.v,o=e.a;return"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(o,")")}},{key:"hsl",get:function(){var e=this.getHsla(),t=e.h,n=e.s,r=e.l;return"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)")}},{key:"hsla",get:function(){var e=this.getHsla(),t=e.h,n=e.s,r=e.l,o=e.a;return"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(o,")")}},{key:"hex",get:function(){return Bb(this.states).toHexString()}},{key:"hex8",get:function(){return Bb(this.states).toHex8String()}},{key:"cmyk",get:function(){var e=this.getCmyk(),t=e.c,n=e.m,r=e.y,o=e.k;return"cmyk(".concat(t,", ").concat(n,", ").concat(r,", ").concat(o,")")}},{key:"css",get:function(){return this.isGradient?this.linearGradient:this.rgba}},{key:"linearGradient",get:function(){var e=this.gradientColors,t=this.gradientDegree;return wx({points:e,degree:t})}},{key:"gradientColors",get:function(){return this.gradientStates.colors},set:function(e){this.gradientStates.colors=e,this.gradientStates.css=this.linearGradient}},{key:"gradientSelectedId",get:function(){return this.gradientStates.selectedId},set:function(e){var t;e!==this.gradientSelectedId&&(this.gradientStates.selectedId=e,this.updateStates(null===(t=this.gradientSelectedPoint)||void 0===t?void 0:t.color))}},{key:"gradientDegree",get:function(){return this.gradientStates.degree},set:function(e){this.gradientStates.degree=Math.max(0,Math.min(360,e)),this.gradientStates.css=this.linearGradient}},{key:"gradientSelectedPoint",get:function(){var e=this.gradientColors,t=this.gradientSelectedId;return e.find((function(e){return e.id===t}))}},{key:"getFormatsColorMap",value:function(){return{HEX:this.hex,CMYK:this.cmyk,RGB:this.rgb,RGBA:this.rgba,HSL:this.hsl,HSLA:this.hsla,HSV:this.hsv,HSVA:this.hsva,CSS:this.css,HEX8:this.hex8}}},{key:"updateCurrentGradientColor",value:function(){var e=this.isGradient,t=this.gradientColors,n=this.gradientSelectedId,r=t.length,o=this.gradientSelectedPoint;if(!e||0===r||!o)return!1;var a=t.findIndex((function(e){return e.id===n})),i=gx(gx({},o),{},{color:this.rgba});return t.splice(a,1,i),this.gradientColors=t,this}},{key:"updateStates",value:function(e){var t=Bb(cx(e)).toHsv();this.states=t}},{key:"getRgba",value:function(){var e=yx(this.states),t=e.r,n=e.g,r=e.b,o=e.a;return{r:bx(t),g:bx(n),b:bx(r),a:o}}},{key:"getCmyk",value:function(){var e=this.getRgba(),t=function(e,t,n){var r=0,o=0,a=0,i=parseInt("".concat(e).replace(/\s/g,""),10),l=parseInt("".concat(t).replace(/\s/g,""),10),s=parseInt("".concat(n).replace(/\s/g,""),10);if(0===i&&0===l&&0===s)return[0,0,0,1];r=1-i/255,o=1-l/255,a=1-s/255;var c=Math.min(r,Math.min(o,a));return[r=(r-c)/(1-c),o=(o-c)/(1-c),a=(a-c)/(1-c),c]}(e.r,e.g,e.b),n=pl(t,4),r=n[0],o=n[1],a=n[2],i=n[3];return{c:bx(100*r),m:bx(100*o),y:bx(100*a),k:bx(100*i)}}},{key:"getHsva",value:function(){var e=Bb(this.states).toHsv(),t=e.h,n=e.s,r=e.v,o=e.a;return{h:t=bx(t),s:n=bx(100*n),v:r=bx(100*r),a:o*=1}}},{key:"getHsla",value:function(){var e=Bb(this.states).toHsl(),t=e.h,n=e.s,r=e.l,o=e.a;return{h:t=bx(t),s:n=bx(100*n),l:r=bx(100*r),a:o*=1}}},{key:"equals",value:function(e){return Bb.equals(this.rgba,e)}}],[{key:"isValid",value:function(e){return!!mx(e)||Bb(e).isValid()}},{key:"hsva2color",value:function(e,t,n,r){return Bb({h:e,s:t,v:n,a:r}).toHsvString()}},{key:"hsla2color",value:function(e,t,n,r){return Bb({h:e,s:t,l:n,a:r}).toHslString()}},{key:"rgba2color",value:function(e,t,n,r){return Bb({r:e,g:t,b:n,a:r}).toHsvString()}},{key:"hex2color",value:function(e,t){var n=Bb(e);return n.setAlpha(t),n.toHexString()}},{key:"object2color",value:function(e,t){if("CMYK"===t){var n=e.c,r=e.m,o=e.y,a=e.k;return"cmyk(".concat(n,", ").concat(r,", ").concat(o,", ").concat(a,")")}return Bb(e,{format:t}).toRgbString()}}])}();ax=xx,w(xx,"isGradientColor",(function(e){return!!fx(e)})),w(xx,"compare",(function(e,t){var n=ax.isGradientColor(e),r=ax.isGradientColor(t);return n&&r?wx(mx(e))===wx(mx(t)):!n&&!r&&Bb.equals(e,t)}));var Ex=["alpha","css","hex","hex8","hsl","hsla","hsv","hsva","rgb","rgba","saturation","value","isGradient"],Cx=function(e){if(!e)return null;var t=Object.create(null);return Ex.forEach((function(n){return t[n]=e[n]})),e.isGradient&&(t.linearGradient=e.linearGradient),t};function Sx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ox(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _x(e,t){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.add(e)}function Nx(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Tx={start:function(e,t){},drag:function(e,t){},end:function(e,t){}},Ax=new WeakSet,Mx=function(){return og((function e(t,n){ng(this,e),_x(this,Ax),w(this,"dragging",!1),w(this,"$el",void 0),w(this,"props",void 0),w(this,"handles",void 0),this.$el=t,this.props=Ox(Ox({},Tx),n),this.handles={start:Nx(Ax,this,Ix).bind(this),drag:Nx(Ax,this,Px).bind(this),end:Nx(Ax,this,Lx).bind(this)},this.$el.addEventListener("mousedown",this.handles.start,!1)}),[{key:"destroy",value:function(){this.$el.removeEventListener("mousedown",this.handles.start,!1),window.removeEventListener("mousemove",this.handles.drag,!1),window.removeEventListener("mouseup",this.handles.end,!1),window.removeEventListener("contextmenu",this.handles.end,!1)}}])}();function Ix(e){this.dragging||(window.addEventListener("mousemove",this.handles.drag,!1),window.addEventListener("mouseup",this.handles.end,!1),window.addEventListener("contextmenu",this.handles.end,!1),this.dragging=!0,this.props.start(Nx(Ax,this,Rx).call(this,e),e))}function Px(e){this.dragging&&this.props.drag(Nx(Ax,this,Rx).call(this,e),e)}function Lx(e){var t=this;setTimeout((function(){t.dragging=!1,t.props.end(Nx(Ax,t,Rx).call(t,e),e)}),0),window.removeEventListener("mousemove",this.handles.drag,!1),window.removeEventListener("mouseup",this.handles.end,!1),window.removeEventListener("contextmenu",this.handles.end,!1)}function Rx(e){var t=this.$el.getBoundingClientRect(),n=e,r=n.clientX-t.left,o=n.clientY-t.top;return{y:Math.min(Math.max(0,o),t.height),x:Math.min(Math.max(0,r),t.width)}}var Bx={disabled:Boolean,color:{type:Object},onChange:{type:Function,default:function(){return function(){}}}};function Dx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var jx=["delete","backspace"],Fx=t.defineComponent({name:"LinearGradient",inheritAttrs:!1,props:Vx(Vx({},Bx),{},{enableMultipleGradient:{type:Boolean,default:!0}}),setup:function(e){var n=Xk(),r=uc().STATUS.value,o=t.ref(null),a=t.reactive({left:0,width:176}),i=t.ref(!1),l=t.ref(!1),s=t.ref(e.color.gradientDegree),c=t.ref(e.color.gradientSelectedId),u=t.ref(Zs(e.color.gradientColors));t.watch((function(){return e.color.gradientDegree}),(function(e){return s.value=e})),t.watch((function(){return e.color.gradientSelectedId}),(function(e){return c.value=e})),t.watch((function(){return e.color.gradientColors}),(function(e){u.value=Zs(e)}),{deep:!0});var d=function(t,n,r){e.disabled||e.onChange({key:t,payload:n,addUsedColor:r})},p=function(t){e.disabled||(c.value=t,d("selectedId",t))},f=function(t,n){e.disabled||(u.value=t,d("colors",t,n))},h=function(t){if(i.value&&!e.disabled){var n=t.clientX-a.left;l.value=!0,function(e){var t=u.value.findIndex((function(e){return e.id===c.value}));if(-1!==t){var n=u.value[t],r=(e=Math.max(0,Math.min(a.width,e)))/a.width*100;u.value.splice(t,1,{color:n.color,left:r,id:n.id}),f(u.value)}}(n)}},m=function e(){i.value&&(setTimeout((function(){i.value=!1}),0),l.value&&(f(u.value,!0),l.value=!1),window.removeEventListener("mousemove",h,!1),window.removeEventListener("mouseup",e,!1),window.removeEventListener("contextmenu",e,!1))};return t.onMounted((function(){var e=o.value.getBoundingClientRect();a.left=e.left,a.width=e.width||176})),t.onBeforeUnmount((function(){window.removeEventListener("mousemove",h,!1),window.removeEventListener("mouseup",m,!1),window.removeEventListener("contextmenu",m,!1)})),{baseClassName:n,statusClassNames:r,refSlider:o,degree:s,selectedId:c,colors:u,handleDegreeChange:function(t){e.disabled||t===e.color.gradientDegree||(s.value=t,d("degree",t,!0))},handleStart:function(t){var n=o.value.getBoundingClientRect();a.left=n.left,a.width=n.width||176,i.value||e.disabled||(l.value=!1,i.value=!0,p(t),o.value.focus(),window.addEventListener("mousemove",h,!1),window.addEventListener("mouseup",m,!1),window.addEventListener("contextmenu",m,!1))},handleMove:h,handleEnd:m,handleKeyup:function(t){if(!e.disabled){var n=u.value,r=n.findIndex((function(e){return e.id===c.value})),o=n.length;if(jx.includes(t.key.toLocaleLowerCase())&&o>2&&r>=0&&r<=o-1){n.splice(r,1),n[r]||(r=n[r+1]?r+1:n[r-1]?r-1:0);var a=n[r];f(n,!0),p(null==a?void 0:a.id)}}},handleThumbBarClick:function(t){if(!e.disabled&&e.enableMultipleGradient){var n=t.clientX-a.left,r=(n=Math.max(0,Math.min(a.width,n)))/a.width*100,o=kx(r,e.color.rgba);u.value.push(o),f(u.value,!0),p(o.id)}}}},render:function(){var e=this,n=this.color,r=n.linearGradient,o=n.gradientColors,a=this.colors,i=this.selectedId,l=this.degree,s=this.disabled,c=this.baseClassName,u=this.statusClassNames,d=wx({points:o,degree:90});return t.createVNode("div",{class:"".concat(c,"__gradient")},[t.createVNode("div",{class:"".concat(c,"__gradient-slider")},[t.createVNode("div",{class:["".concat(c,"__slider"),"".concat(c,"--bg-alpha")],onKeyup:this.handleKeyup,tabindex:0,ref:"refSlider"},[t.createVNode("ul",{class:"gradient-thumbs",onClick:this.handleThumbBarClick,style:{background:d}},[a.map((function(n){var r="".concat(Math.round(100*n.left)/100,"%");return t.createVNode("li",{class:["".concat(c,"__thumb"),"gradient-thumbs__item",i===n.id?u.active:""],key:n.id,title:"".concat(n.color," ").concat(r),style:{color:n.color,left:r},onClick:function(e){return e.stopPropagation()},onMousedown:function(){return e.handleStart(n.id)}},[t.createVNode("span",{class:["gradient-thumbs__item-inner","".concat(c,"--bg-alpha")]},null)])}))])])]),t.createVNode("div",{class:"".concat(c,"__gradient-degree"),title:"".concat(l,"deg")},[t.createVNode(qg,{size:"small",theme:"normal",min:0,max:360,step:1,format:function(e){return"".concat(e,"°")},modelValue:e.degree,"onUpdate:modelValue":function(t){return e.degree=t},onBlur:this.handleDegreeChange,onEnter:this.handleDegreeChange,disabled:s},null)]),t.createVNode("div",{class:["".concat(c,"__gradient-preview"),"".concat(c,"--bg-alpha")]},[t.createVNode("span",{class:"preview-inner",style:{background:r}},null)])])}});function zx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var $x=t.defineComponent({name:"SaturationPanel",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Bx),setup:function(e){var n=Xk(),r=t.ref(null),o=t.ref(null),a=t.ref(null),i=t.reactive({width:230,height:168}),l=t.computed((function(){var t=e.color,n=t.saturation,r=t.value,o=i.width,a=i.height,l=Math.round((1-r)*a),s=Math.round(n*o);return{color:e.color.rgb,left:"".concat(s,"px"),top:"".concat(l,"px")}})),s=function(t,n){if(!e.disabled){var r=function(e){var t=i.width,n=i.height,r=e.x,o=e.y;return{saturation:Math.round(r/t*100),value:Math.round(100*(1-o/n))}}(t),o=r.saturation,a=r.value;e.onChange({saturation:o/100,value:a/100,addUsedColor:n})}},c=function(n){e.disabled||t.nextTick((function(){s(n,!0)}))},u=t.computed((function(){return"hsl(".concat(e.color.hue,", 100%, 50%)")}));return t.onMounted((function(){i.width=r.value.offsetWidth||230,i.height=r.value.offsetHeight||168,a.value=new Mx(r.value,{start:function(){i.width=r.value.offsetWidth,i.height=r.value.offsetHeight},drag:function(e){s(e)},end:c})})),t.onBeforeUnmount((function(){a.value.destroy()})),{baseClassName:n,refThumb:o,refPanel:r,styles:l,panelBackground:u}},render:function(){var e=this.baseClassName,n=this.styles,r=this.panelBackground;return t.createVNode("div",{class:["".concat(e,"__saturation")],ref:"refPanel",style:{background:r}},[t.createVNode("span",{class:["".concat(e,"__thumb")],role:"slider",tabindex:0,ref:"refThumb",style:n},null)])}});function Hx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ux(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Hx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Wx=t.defineComponent({name:"ColorSlider",props:Ux(Ux({},Bx),{},{className:{type:String,default:""},value:{type:Number,default:0},maxValue:{type:Number,default:360},railStyle:{type:Object},type:{type:String,default:"hue"}}),setup:function(e){var n=Xk(),r=t.ref(null),o=t.ref(null),a=t.ref(null),i=t.reactive({width:186}),l=t.computed((function(){if(i.width){var t=Math.round(e.value/e.maxValue*100);return{left:"".concat(t,"%"),color:e.color.rgb}}})),s=function(t,n){if(!e.disabled){var r=i.width,o=t.x,a=Math.round(o/r*e.maxValue*100)/100;e.onChange(a,n)}},c=function(t){e.disabled||s(t,!0)};return t.onMounted((function(){i.width=r.value.offsetWidth||186,a.value=new Mx(r.value,{start:function(){i.width=r.value.offsetWidth},drag:function(e){s(e)},end:c})})),t.onBeforeUnmount((function(){a.value.destroy()})),{baseClassName:n,refThumb:o,refPanel:r,styles:l}},render:function(){var e=this.baseClassName,n=this.className,r=this.railStyle,o=this.styles,a=this.type,i=this.color,l={background:"linear-gradient(90deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.0) 93%, ".concat(i.rgb," 93%, ").concat(i.rgb," 100%)")};return t.createVNode("div",{class:["".concat(e,"__slider-wrapper"),"".concat(e,"__slider-wrapper--").concat(a,"-type")]},["alpha"===a&&t.createVNode("div",{className:"".concat(e,"__slider-padding"),style:l},null),t.createVNode("div",{class:["".concat(e,"__slider"),n],ref:"refPanel"},[t.createVNode("div",{class:"".concat(e,"__rail"),style:r},null),t.createVNode("span",{class:["".concat(e,"__thumb")],role:"slider",tabindex:0,ref:"refThumb",style:o},null)])])}});function Gx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Kx=t.defineComponent({name:"HueSlider",inheritAttrs:!1,props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Gx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Bx),setup:function(){return{baseClassName:Xk()}},render:function(){return t.createVNode(Wx,{class:"".concat(this.baseClassName,"__hue"),color:this.color,value:this.color.hue,onChange:this.onChange,disabled:this.disabled,type:"hue"},null)}}),qx=t.defineComponent({name:"AlphaSlider",inheritAttrs:!1,props:{color:{type:Object},disabled:{type:Boolean,default:!1},onChange:{type:Function,default:function(){return function(){}}}},setup:function(e){return{baseClassName:Xk(),railStyle:t.computed((function(){return{background:"linear-gradient(to right, rgba(0, 0, 0, 0), ".concat(e.color.rgb,")")}})),handleChange:function(t,n){e.onChange(t/100,n)}}},render:function(){var e=this.baseClassName;return t.createVNode(Wx,{class:["".concat(e,"__alpha"),"".concat(e,"--bg-alpha")],color:this.color,value:100*this.color.alpha,onChange:this.handleChange,"rail-style":this.railStyle,"max-value":100,disabled:this.disabled,type:"alpha"},null)}});const Yx=x(cd((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})));var Xx={RGB:[{key:"r",min:0,max:255,type:"inputNumber"},{key:"g",min:0,max:255,type:"inputNumber"},{key:"b",min:0,max:255,type:"inputNumber"}],HSV:[{key:"h",min:0,max:360,type:"inputNumber"},{key:"s",min:0,max:100,type:"inputNumber"},{key:"v",min:0,max:100,type:"inputNumber"}],HSL:[{key:"h",min:0,max:360,type:"inputNumber"},{key:"s",min:0,max:100,type:"inputNumber"},{key:"l",min:0,max:100,type:"inputNumber"}],CMYK:[{key:"c",min:0,max:255,type:"inputNumber"},{key:"m",min:0,max:255,type:"inputNumber"},{key:"y",min:0,max:255,type:"inputNumber"},{key:"k",min:0,max:255,type:"inputNumber"}],CSS:[{key:"css",type:"input",flex:3}],HEX:[{key:"hex",type:"input",flex:3}]};function Zx(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zx(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zx(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Qx=t.defineComponent({name:"FormatInputs",inheritAttrs:!1,props:Jx(Jx({},Wk),{},{color:{type:Object},onInputChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=t.computed((function(){var t=g(Xx[e.format]);return e.enableAlpha&&t.push({type:"inputNumber",key:"a",min:0,max:100,format:function(e){return"".concat(e,"%")},flex:1.15}),t})),r=t.reactive({}),o=t.reactive({}),a=function(t){var n=e.color;return"encode"===t?{HSV:n.getHsva(),HSL:n.getHsla(),RGB:n.getRgba(),CMYK:n.getCmyk(),CSS:{css:n.css},HEX:{hex:n.hex}}:{HSV:xx.object2color(r,"HSV"),HSL:xx.object2color(r,"HSL"),RGB:xx.object2color(r,"RGB"),CMYK:xx.object2color(r,"CMYK"),CSS:r.css,HEX:r.hex}},i=function(){var t=e.format,n=e.color,i=a("encode")[t];i.a=Math.round(100*n.alpha),Object.keys(i).forEach((function(e){r[e]=i[e],o[e]=i[e]}))};i();var l=ck(i,100);t.watch((function(){var t=e.color;return[t.saturation,t.hue,t.value,t.alpha,t.css,e.format]}),l);return{modelValue:r,inputConfigs:n,handleChange:function(t,n){if(n!==o[t]){var i=a("decode")[e.format];e.onInputChange(i,r.a/100,t,n)}}}},render:function(){var e=this,n=Jx({},this.inputProps||{});return t.createVNode("div",{class:"input-group"},[this.inputConfigs.map((function(r){return t.createVNode("div",{class:"input-group__item",key:r.key,style:{flex:r.flex||1}},["input"===r.type?t.createVNode(Eg,t.mergeProps(n,{align:"center",size:"small",disabled:e.disabled,modelValue:e.modelValue[r.key],"onUpdate:modelValue":function(t){return e.modelValue[r.key]=t},maxlength:"HEX"===e.format?9:void 0,title:e.modelValue[r.key],onBlur:function(t){return e.handleChange(r.key,t)},onEnter:function(t){return e.handleChange(r.key,t)}}),null):t.createVNode(qg,t.mergeProps(n,{align:"center",size:"small",disabled:e.disabled,modelValue:e.modelValue[r.key],"onUpdate:modelValue":function(t){return e.modelValue[r.key]=t},title:e.modelValue[r.key],min:r.min,max:r.max,step:1,format:r.format,theme:"normal",onBlur:function(t){return e.handleChange(r.key,t)},onEnter:function(t){return e.handleChange(r.key,t)}}),null)])}))])}});function eE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function tE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?eE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nE=t.defineComponent({name:"FormatPanel",inheritAttrs:!1,props:tE(tE({},Wk),{},{color:{type:Object},onModeChange:{type:Function,default:function(){return function(){}}},onInputChange:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=Xk(),r=t.ref(e.format);t.watch((function(){return[e.format]}),(function(){return r.value=e.format}));return{formatModel:r,baseClassName:n,handleModeChange:function(t){r.value=t,e.onModeChange(t)}}},render:function(){var e,n,r=this,o=g(Yk),a=this.baseClassName,i=this.handleModeChange,l=tE(tE({},this.$props),{},{format:this.formatModel}),s=tE({},this.selectInputProps||{});return t.createVNode("div",{class:"".concat(a,"__format")},[t.createVNode("div",{class:"".concat(a,"__format--item")},[t.createVNode(kw,t.mergeProps({size:"small",class:"".concat(a,"__format-mode-select")},s,{popupProps:tE({overlayClassName:"".concat(a,"__select-options")},s.popupProps),modelValue:r.formatModel,"onUpdate:modelValue":function(e){return r.formatModel=e},onChange:i}),(n=e=o.map((function(e){return t.createVNode(xw,{key:e,value:e,label:Yx(e),style:{fontSize:"12px"}},null)})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!t.isVNode(n)?e:{default:function(){return[e]}}))]),t.createVNode("div",{class:"".concat(a,"__format--item")},[t.createVNode(Qx,l,null)])])}});function rE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var aE=t.defineComponent({name:"SwatchesPanel",props:oE(oE({},Bx),{},{colors:{type:Array,default:function(){return[]}},title:{type:String,default:"系统色彩"},editable:{type:Boolean,default:!1},onSetColor:{type:Function,default:function(){return function(){}}},handleAddColor:{type:Function,default:function(){return function(){}}}}),setup:function(e){var n=Xk(),r=ih({DeleteIcon:Kp,AddIcon:rp}),o=r.DeleteIcon,a=r.AddIcon,i=uc().STATUS.value,l=t.ref(!1),s=function(e){l.value=e},c=function(t){return xx.compare(t,e.color.css)},u=t.computed((function(){return e.colors.findIndex((function(e){return c(e)}))}));return{baseClassName:n,DeleteIcon:o,AddIcon:a,statusClassNames:i,selectedColorIndex:u,visiblePopConfirm:l,setVisiblePopConfirm:s,handleClick:function(t){return e.onSetColor(t)},isEqualCurrentColor:c,handleRemoveColor:function(){var t=g(e.colors),n=u.value;n>-1?t.splice(n,1):t.length=0,e.onChange(t),s(!1)}}},render:function(){var e=this,n=this.baseClassName,r=this.DeleteIcon,o=this.AddIcon,a=this.statusClassNames,i=this.title,l=this.editable,s="".concat(n,"__swatches");return t.createVNode("div",{class:s},[t.createVNode("h3",{class:"".concat(s,"--title")},[t.createVNode("span",null,[i]),l?t.createVNode("div",{class:"".concat(s,"--actions")},[t.createVNode("span",{role:"button",class:"".concat(n,"__icon"),onClick:function(){return e.handleAddColor()}},[t.createVNode(o,null,null)]),e.colors.length>0?t.createVNode("span",{role:"button",class:"".concat(n,"__icon"),onClick:function(){return e.handleRemoveColor()}},[t.createVNode(r,null,null)]):null]):null]),t.createVNode("ul",{class:["".concat(s,"--items"),"narrow-scrollbar"]},[this.colors.map((function(r){return t.createVNode("li",{class:["".concat(s,"--item"),e.isEqualCurrentColor(r)&&l?a.active:""],title:r,key:r,onClick:function(){e.disabled||e.handleClick(r)}},[t.createVNode("div",{class:["".concat(s,"--color"),"".concat(n,"--bg-alpha")]},[t.createVNode("span",{class:"".concat(s,"--inner"),style:{background:r}},null)])])}))])])}});function iE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?iE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var sE=t.defineComponent({name:"ColorPanel",props:lE(lE({},Wk),{},{togglePopup:{type:Function}}),setup:function(e){var n,r=Xk(),o=uc().STATUS,a=lc("colorPicker"),i=a.t,l=a.globalConfig,s=o.value,c=t.toRefs(e),u=c.value,d=c.modelValue,p=c.recentColors,f=pl(Fm(u,d,e.defaultValue,e.onChange),2),h=f[0],m=f[1],v=t.computed((function(){return b.value?Kk:"#001F97"})),g=t.ref(1===(null===(n=e.colorModes)||void 0===n?void 0:n.length)?e.colorModes[0]:"monochrome"),b=t.computed((function(){return"linear-gradient"===g.value})),y=t.ref(new xx(h.value||v.value)),w=function(){return y.value.update(h.value||v.value)},k=t.ref(y.value.isGradient?"CSS":"RGB"),x=pl(Dm(p,e.defaultRecentColors,e.onRecentColorsChange,"recentColors"),2),E=x[0],C=x[1],S=function(){return"linear-gradient"===g.value?y.value.linearGradient:y.value.getFormatsColorMap()[e.format]||y.value.css},O=function(e){C(e)},_=function(e){m(S(),{color:Cx(y.value),trigger:e||"palette-saturation-brightness"})};t.watch((function(){return[e.defaultValue,e.enableAlpha]}),w),t.watch((function(){return h.value}),(function(e){e!==S()&&(w(),g.value=y.value.isGradient?"linear-gradient":"monochrome")}));return{baseClassName:r,statusClassNames:s,t:i,globalConfig:l,color:y,mode:g,formatModel:k,recentlyUsedColors:E,isGradient:b,addRecentlyUsedColor:function(){if(null!==E.value&&!1!==E.value){var e=Zs(E.value)||[],t=y.value.isGradient?y.value.linearGradient:y.value.rgba,n=e.indexOf(t);n>-1&&e.splice(n,1),e.unshift(t),e.length>100&&(e.length=100),O(e)}},handleModeChange:function(e){g.value=e,"linear-gradient"===e?y.value.update(y.value.gradientColors.length>0?y.value.linearGradient:Kk):y.value.update(y.value.rgba),_()},handleSatAndValueChange:function(e){var t=e.saturation,n=e.value,r=y.value,o=r.saturation,a=r.value,i="palette-saturation-brightness";if(n!==a&&t!==o)y.value.saturation=t,y.value.value=n,i="palette-saturation-brightness";else if(t!==o)y.value.saturation=t,i="palette-saturation";else{if(n===a)return;y.value.value=n,i="palette-brightness"}y.value.update(y.value.rgba),_(i)},handleHueChange:function(t){var n;y.value.hue=t,_("palette-hue-bar"),null===(n=e.onPaletteBarChange)||void 0===n||n.call(e,{color:Cx(y.value)})},handleAlphaChange:function(e){y.value.alpha=e,_("palette-alpha-bar")},handleGradientChange:function(e){var t=e.key,n=e.payload,r="palette-saturation-brightness";switch(t){case"degree":y.value.gradientDegree=n,r="input";break;case"selectedId":y.value.gradientSelectedId=n;break;case"colors":y.value.gradientColors=n}_(r)},handleSetColor:function(t,n){xx.isGradientColor(n)?e.colorModes.includes("linear-gradient")?(g.value="linear-gradient",y.value.update(n),y.value.updateCurrentGradientColor()):console.warn("该模式不支持渐变色"):"linear-gradient"===g.value?(y.value.updateStates(n),y.value.updateCurrentGradientColor()):y.value.update(n),_()},handleFormatModeChange:function(e){return k.value=e},handleInputChange:function(e,t){y.value.update(e),y.value.alpha=t,_("input")},handleRecentlyUsedColorsChange:O}},render:function(){var e,n=this,r=this.t,o=this.baseClassName,a=this.statusClassNames,i=this.globalConfig,l=this.recentColors,s=this.swatchColors,c=this.showPrimaryColorPreview,u=this.isGradient,d={color:this.color,disabled:this.disabled},p=null!==l&&!1!==l,f=s;void 0===f&&(f=g(qk));var h=(null===(e=f)||void 0===e?void 0:e.length)>0;return t.createVNode("div",{class:["".concat(o,"__panel"),!!this.disabled&&a.disabled]},[t.createVNode(ix,t.mergeProps(this.$props,{mode:this.mode,onModeChange:this.handleModeChange}),null),t.createVNode("div",{class:["".concat(o,"__body")]},[u?t.createVNode(Fx,t.mergeProps(d,{onChange:this.handleGradientChange,enableMultipleGradient:this.enableMultipleGradient}),null):null,t.createVNode($x,t.mergeProps(d,{onChange:this.handleSatAndValueChange}),null),t.createVNode("div",{class:["".concat(o,"__sliders-wrapper")]},[t.createVNode("div",{class:["".concat(o,"__sliders")]},[t.createVNode(Kx,t.mergeProps(d,{onChange:this.handleHueChange}),null),this.enableAlpha?t.createVNode(qx,t.mergeProps(d,{onChange:this.handleAlphaChange}),null):null]),c?t.createVNode("div",{class:["".concat(o,"__sliders-preview"),"".concat(o,"--bg-alpha")]},[t.createVNode("span",{class:"".concat(o,"__sliders-preview-inner"),style:{background:u?this.color.linearGradient:this.color.rgba}},null)]):null]),t.createVNode(nE,t.mergeProps(this.$props,{color:this.color,format:this.formatModel,onModeChange:this.handleFormatModeChange,onInputChange:this.handleInputChange}),null),h||p?t.createVNode(t.Fragment,null,[t.createVNode("div",{class:"".concat(o,"__swatches-wrap")},[p?t.createVNode(aE,t.mergeProps(d,{title:r(i.recentColorTitle),editable:!0,colors:n.recentlyUsedColors,handleAddColor:n.addRecentlyUsedColor,onSetColor:function(e){return n.handleSetColor("used",e)},onChange:n.handleRecentlyUsedColorsChange}),null):null,h?t.createVNode(aE,t.mergeProps(d,{title:r(i.swatchColorTitle),colors:f,onSetColor:function(e){return n.handleSetColor("system",e)}}),null):null])]):null])])}}),cE=So,uE=wa,dE=ob,pE=Yl;const fE=x((function(e,t){if(null==e)return{};var n=cE(pE(e),(function(e){return[e]}));return t=uE(t),dE(e,n,(function(e,n){return t(e,n[0])}))}));function hE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var vE=t.defineComponent({name:"TColorPickerPanel",inheritAttrs:!1,props:mE({},Wk),setup:function(e,n){var r=n.attrs,o=t.computed((function(){return fE(mE(mE({},e),r),(function(e){return void 0!==e}))})),a=cc();return function(){return t.createVNode(sE,t.mergeProps(o.value,{popupProps:null,"close-btn":!1,class:"".concat(a.value,"-is-inline")}),null)}}}),gE=t.defineComponent({name:"DefaultTrigger",inheritAttrs:!1,props:{color:{type:String,default:""},disabled:{type:Boolean,default:!1},borderless:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},inputProps:{type:Object,default:function(){return{autoWidth:!0}}},onTriggerChange:{type:Function,default:function(){return function(){}}},size:{type:String,default:"medium"}},setup:function(e){var n=Xk(),r=t.ref(e.color),o=uc().SIZE;t.watch((function(){return[e.color]}),(function(){return r.value=e.color}));return{baseClassName:n,value:r,handleChange:function(t){t!==e.color&&(t&&!xx.isValid(t)?r.value=e.color:r.value=t,e.onTriggerChange(r.value))},sizeClassNames:o}},render:function(){var e=this,n=this.baseClassName,r=this.sizeClassNames,o={label:function(){return t.createVNode("div",{class:["".concat(n,"__trigger--default__color"),"".concat(n,"--bg-alpha")]},[t.createVNode("span",{class:["color-inner",w({},r[e.size],"medium"!==e.size)],style:{background:e.value}},null)])}};return t.createVNode(Eg,t.mergeProps({borderless:this.borderless,clearable:this.clearable,size:this.size,modelValue:e.value,"onUpdate:modelValue":function(t){return e.value=t},disabled:this.disabled,onBlur:this.handleChange},this.inputProps),o)}});function bE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function yE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?bE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wE=t.defineComponent({name:"TColorPicker",props:yE({},Wk),setup:function(e){var n=Xk(),r=t.ref(!1),o=function(e){return r.value=e},a=t.toRefs(e),i=pl(Fm(a.value,a.modelValue,e.defaultValue,e.onChange),2),l=i[0],s=i[1],c=t.ref();return{baseClassName:n,innerValue:l,visible:r,refTrigger:c,renderPopupContent:function(){if(e.disabled)return null;var n=yE({},e);return delete n.onChange,t.createVNode(sE,t.mergeProps(n,{disabled:e.disabled,value:l.value,togglePopup:o,onChange:function(e,t){return s(e,t)}}),null)},setVisible:o,setInnerValue:s}},render:function(){var e=this,n=this.popupProps,r=this.baseClassName,o=yE(yE({placement:"bottom-left"},n||{}),{},{trigger:"click",attach:"body",overlayClassName:[r],visible:this.visible,overlayInnerStyle:{padding:0},onVisibleChange:function(t,n){"document"===n.trigger&&e.setVisible(!1)}});return t.createVNode(rv,t.mergeProps(o,{content:this.renderPopupContent}),{default:function(){return[t.createVNode("div",{class:"".concat(r,"__trigger"),onClick:function(){return e.setVisible(!e.visible)},ref:"refTrigger"},[(n=e,o="default",a=t.createVNode(gE,{borderless:e.borderless,color:e.innerValue,disabled:e.disabled,clearable:e.clearable,"input-props":e.inputProps,onTriggerChange:e.setInnerValue,size:e.size},null),i=fd(a),vd(n,o,a)||i)])];var n,o,a,i}})}}),kE=Nd(vE);Nd(wE);var xE={alt:{type:String,default:""},error:{type:[String,Function]},fallback:{type:String,default:""},fit:{type:String,default:"fill",validator:function(e){return!e||["contain","cover","fill","none","scale-down"].includes(e)}},gallery:Boolean,lazy:Boolean,loading:{type:[String,Function]},overlayContent:{type:[String,Function]},overlayTrigger:{type:String,default:"always",validator:function(e){return!e||["always","hover"].includes(e)}},placeholder:{type:[String,Function]},position:{type:String,default:"center"},referrerpolicy:{type:String,default:"strict-origin-when-cross-origin",validator:function(e){return!e||["no-referrer","no-referrer-when-downgrade","origin","origin-when-cross-origin","same-origin","strict-origin","strict-origin-when-cross-origin","unsafe-url"].includes(e)}},shape:{type:String,default:"square",validator:function(e){return!e||["circle","round","square"].includes(e)}},src:{type:[String,Object]},srcset:{type:Object},onError:Function,onLoad:Function},EE=Nd(t.defineComponent({name:"TImage",props:xE,setup:function(e){var n=t.ref(null),r=t.ref(null),o=null,a=t.toRefs(e).src,i=Vd();t.onMounted((function(){var t;if(null!==(t=r.value)&&void 0!==t&&t.complete&&!e.lazy&&v(),e.lazy&&n.value){var a=Uy(n.value,null,f,0);o=a}})),t.onUnmounted((function(){n.value&&o&&o.unobserve(n.value)}));var l=lc("image"),s=l.classPrefix,c=l.globalConfig,u=t.ref(a.value);t.watch([a,c],(function(t){var n=pl(t,2),r=n[0],o=(n[1]||{}).replaceImageSrc,a=U(o)?o(e):r;a===u.value&&u.value||(u.value=a)}),{immediate:!0});var d=Hm(u).previewUrl;t.watch([d],(function(){g.value=!1,h.value=!1}));var p=t.ref(!e.lazy),f=function(){p.value=!0},h=t.ref(!1),m=function(t){var n;h.value=!0,null===(n=e.onLoad)||void 0===n||n.call(e,{e:t})},v=function(){var e=new Event("load");Object.defineProperty(e,"target",{value:r.value,enumerable:!0}),m(e)},g=t.ref(!1),b=function(t){var n;g.value=!0,null===(n=e.onError)||void 0===n||n.call(e,{e:t}),e.fallback&&(u.value=e.fallback,g.value=!1)},y=t.computed((function(){return"hover"===e.overlayTrigger})),w=t.computed((function(){return["".concat(s.value,"-image"),"".concat(s.value,"-image--fit-").concat(e.fit),"".concat(s.value,"-image--position-").concat(e.position)]})),k=t.ref(!y.value),x=function(){y.value&&(k.value=!k.value)};function E(){var n="string"==typeof u.value?u.value:d.value;return t.createVNode("img",{ref:r,src:n,onError:b,onLoad:m,class:w.value,alt:e.alt,referrerpolicy:e.referrerpolicy},null)}var C=jd();return function(){return t.createVNode("div",t.mergeProps({ref:n,class:["".concat(s.value,"-image__wrapper"),"".concat(s.value,"-image__wrapper--shape-").concat(e.shape),e.gallery&&"".concat(s.value,"-image__wrapper--gallery"),y.value&&"".concat(s.value,"-image__wrapper--need-hover")],onMouseenter:x,onMouseleave:x},Mv(e,["src","alt","fit","position","shape","placeholder","loading","error","overlayTrigger","overlayContent","lazy","gallery","onLoad","onError"])),[(o=i("placeholder"),o?t.createVNode("div",{class:"".concat(s.value,"-image__placeholder")},[o]):null),e.gallery?t.createVNode("div",{class:"".concat(s.value,"-image__gallery-shadow")},null):null,(g.value||!p.value)&&t.createVNode("div",{class:"".concat(s.value,"-image")},null),!(g.value||!p.value)&&(e.srcset&&Object.keys(e.srcset).length?t.createVNode("picture",null,[Object.entries(e.srcset).map((function(e){var n=pl(e,2),r=n[0],o=n[1];return t.createVNode("source",{type:r,srcset:o},null)})),E()]):E()),!(g.value||!p.value)&&!h.value&&t.createVNode("div",{class:"".concat(s.value,"-image__loading")},[i("loading")||t.createVNode(Xf,{direction:"vertical",size:8,align:"center"},{default:function(){return[t.createVNode(hf,{size:"24px"},null),"string"==typeof e.loading?e.loading:c.value.loadingText]}})]),g.value&&t.createVNode("div",{class:"".concat(s.value,"-image__error")},[C("error",{defaultNode:t.createVNode(Xf,{direction:"vertical",size:8,align:"center"},{default:function(){return[t.createVNode(uf,{size:"24px"},null),"string"==typeof e.error?e.error:c.value.errorText]}})})]),(r=C("overlayContent"),r?t.createVNode("div",{class:["".concat(s.value,"-image__overlay-content"),!k.value&&"".concat(s.value,"-image__overlay-content--hidden")]},[r]):null)]);var r,o}}})),CE=new(og((function e(){var t=this;ng(this,e),w(this,"popupStack",{popup:new Set,dialog:new Set,message:new Set}),w(this,"getNextZIndex",(function(e){return("message"===e?Array.from(t.popupStack.message).pop()||5e3:Array.from(t.popupStack.popup).pop()||1e3)+1})),w(this,"add",(function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),"dialog"===e&&t.popupStack.popup.add(n),n})),w(this,"delete",(function(e,n){t.popupStack[n].delete(e),"dialog"===n&&t.popupStack.popup.delete(e)})),w(this,"isLastDialog",(function(e){return!(t.popupStack.dialog.size>1)||e===Array.from(t.popupStack.dialog).pop()}))})));function SE(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.visible,o=n.runOnMounted,a=t.ref(0),i=function(){a.value=CE.add(e)},l=function(){CE.delete(a.value,e)};return t.watch((function(){return null==r?void 0:r.value}),(function(e){e?i():l()}),{immediate:!0}),o&&(t.onMounted((function(){i()})),t.onBeforeUnmount((function(){l()}))),{zIndex:t.readonly(a),open:i,close:l,isLastDialog:function(){return CE.isLastDialog(a.value)}}}function OE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _E(e){var n=t.ref(e);return{transform:n,mouseDownHandler:function(e){var t=e.pageX,r=e.pageY,o=n.value,a=o.translateX,i=o.translateY,l=function(e){var o=e.pageX,l=e.pageY;n.value={translateX:a+o-t,translateY:i+l-r}};document.addEventListener("mousemove",l),document.addEventListener("mouseup",(function e(){document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",e)}))},resetTransform:function(){n.value=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},e)}}}var NE,TE=t.defineComponent({name:"TImageItem",props:{rotate:Number,scale:Number,mirror:Number,src:[String,Object],placementSrc:[String,Object],isSvg:Boolean},setup:function(e){var n=t.toRefs(e),r=n.src,o=n.placementSrc,a=n.isSvg,i=cc(),l=t.ref(!1),s=t.ref(!1),c=_E({translateX:0,translateY:0}),u=c.transform,d=c.mouseDownHandler,p=lc("imageViewer").globalConfig.value.errorText,f=t.ref(),h=t.computed((function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:!e.placementSrc||s.value?"block":"none"}})),m=t.computed((function(){return{transform:"rotate(".concat(e.rotate,"deg) scale(").concat(e.scale,")"),display:s.value?"none":"block"}})),v=t.computed((function(){var t=u.value,n=t.translateX,r=t.translateY;return{transform:"translate(".concat(n,"px, ").concat(r,"px) scale(").concat(e.mirror,", 1)")}})),g=function(){var e=Qf(ah.mark((function e(t){var n,r,o,a,c,u,d,p,h,m,v,g,b;return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:if((r=e.sent).ok){e.next=6;break}throw l.value=!0,new Error("Failed to fetch SVG: ".concat(r.statusText));case 6:return e.next=8,r.text();case 8:o=e.sent,(a=f.value).innerHTML="",null===(n=a.classList)||void 0===n||n.add("".concat(i.value,"-image-viewer__modal-image-svg")),c=a.attachShadow({mode:"closed"}),(u=document.createElement("div")).style.background="transparent",u.innerHTML=o,c.appendChild(u),(d=u.querySelector("svg"))&&((p=d.getAttribute("viewBox"))?(h=p.split(/[\s\,]/).filter((function(e){return e})).map(parseFloat),m=h[2],v=h[3],u.style.width="".concat(m,"px"),u.style.height="".concat(v,"px")):(g=d.getBBox(),b="".concat(g.x," ").concat(g.y," ").concat(g.width," ").concat(g.height),d.setAttribute("viewBox",b),u.style.width="".concat(g.width,"px"),u.style.height="".concat(g.height,"px"))),s.value=!0;case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),b=Hm(r).previewUrl,y=Hm(o).previewUrl;return t.watch([b,y],(function(){l.value=!1,s.value=!1,a.value&&g(b.value)})),t.onMounted(Qf(ah.mark((function e(){return ah.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!a.value){e.next=3;break}return e.next=3,g(b.value);case 3:case"end":return e.stop()}}),e)})))),function(){return t.createVNode("div",{class:"".concat(i.value,"-image-viewer__modal-pic")},[t.createVNode("div",{class:"".concat(i.value,"-image-viewer__modal-box"),style:v.value},[l.value&&t.createVNode("div",{class:"".concat(i.value,"-image-viewer__img-error")},[t.createVNode("div",{class:"".concat(i.value,"-image-viewer__img-error-content")},[t.createVNode(uf,{size:"4em"},null),t.createVNode("div",{class:"".concat(i.value,"-image-viewer__img-error-text")},[p])])]),!l.value&&!!e.placementSrc&&y.value&&t.createVNode("img",{class:"".concat(i.value,"-image-viewer__modal-image"),onMousedown:function(e){e.stopPropagation(),d(e)},src:y.value,style:m.value,alt:"image",draggable:"false"},null),!l.value&&b.value&&!a.value&&t.createVNode("img",{class:"".concat(i.value,"-image-viewer__modal-image"),onMousedown:function(e){e.stopPropagation(),d(e)},src:b.value,onLoad:function(){return s.value=!0},onError:function(){return l.value=!0},style:h.value,alt:"image",draggable:"false"},null),!l.value&&b.value&&a.value&&t.createVNode("div",{ref:f,class:"".concat(i.value,"-image-viewer__modal-image"),onMousedown:function(e){e.stopPropagation(),d(e)},"data-alt":"svg",style:h.value,draggable:"false"},null)])])}}}),AE=t.defineComponent({name:"TImageModalIcon",props:{disabled:Boolean,onClick:Function,label:String,icon:Function},setup:function(e){var n=cc(),r=Vd(),o=t.computed((function(){return["".concat(n.value,"-image-viewer__modal-icon"),w({},"".concat(n.value,"-is-disabled"),e.disabled)]}));return function(){return t.createVNode("div",{class:o.value,onClick:e.onClick},[r("icon"),e.label&&t.createVNode("span",{class:"".concat(n.value,"-image-viewer__modal-icon-label")},[e.label])])}}}),ME={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},confirmLoading:{type:Boolean,default:void 0},confirmOnEnter:Boolean,default:{type:[String,Function]},destroyOnClose:Boolean,dialogClassName:{type:String,default:""},dialogStyle:{type:Object},draggable:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless","normal","full-screen"].includes(e)}},placement:{type:String,default:"top",validator:function(e){return!e||["top","center"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","info","warning","danger","success"].includes(e)}},top:{type:[String,Number]},visible:Boolean,width:{type:[String,Number]},zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onClosed:Function,onConfirm:Function,onEscKeydown:Function,onOpened:Function,onOverlayClick:Function};function IE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function PE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?IE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function LE(e){var n=t.getCurrentInstance(),r=Vd(),o=function(e,n){var r=n.defaultButtonProps,o=n.className,a=n.confirmLoading,i=r;return bl(e)?i.content=e:C(e)&&(i=PE(PE({},i),e)),void 0!==a&&(i.loading=a),t.createVNode(Kd,t.mergeProps({class:o},i),null)};return{getConfirmBtn:function(a){var i=a.confirmBtn,l=a.className,s=a.confirmLoading;if(null===i)return null;i&&n.slots.confirmBtn&&console.warn("Both $props.confirmBtn and $scopedSlots.confirmBtn exist, $props.confirmBtn is preferred.");var c=function(t){var n,r=t.globalConfirm,o=t.theme,a=t.globalConfirmBtnTheme,i={theme:(null===(n=Mv(a,["info"]))||void 0===n?void 0:n[o])||"primary",size:t.size,onClick:function(t){e.confirmBtnAction(t)}};return bl(r)?i.content=r:C(r)&&(i=PE(PE({},i),r)),i}(a);return i||n.slots.confirmBtn?i&&["string","object"].includes(b(i))?o(i,{defaultButtonProps:c,className:l,confirmLoading:s}):r("confirmBtn"):t.createVNode(Kd,t.mergeProps({class:l,loading:s},c),null)},getCancelBtn:function(a){var i=a.cancelBtn,l=a.className;if(null===i)return null;i&&n.slots.cancelBtn&&console.warn("Both $props.cancelBtn and $scopedSlots.cancelBtn exist, $props.cancelBtn is preferred.");var s=function(t){var n=t.globalCancel,r={theme:"default",size:t.size,onClick:function(t){e.cancelBtnAction(t)}};return bl(n)?r.content=n:C(n)&&(r=PE(PE({},r),n)),r}(a);return i||n.slots.cancelBtn?i&&["string","object"].includes(b(i))?o(i,{defaultButtonProps:s}):r("cancelBtn"):t.createVNode(Kd,t.mergeProps({class:l},s),null)}}}function RE(){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}function BE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function DE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?BE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):BE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function VE(e){return Number.isNaN(Number(e))?e:"".concat(Number(e),"px")}"undefined"!=typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){NE={x:e.clientX,y:e.clientY},setTimeout((function(){NE=null}),100)}),!0);var jE=1,FE=Nd(t.defineComponent({name:"TDialog",directives:{draggable:function(e,t){var n,r,o;e&&t&&t.value&&(n=e,r=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,n.addEventListener("mousedown",(function(e){var t=e.clientX-n.offsetLeft,a=e.clientY-n.offsetTop,i=n.offsetWidth,l=n.offsetHeight;function s(e){var i=e.clientX-t,l=e.clientY-a;i<0&&(i=0),l<0&&(l=0),r-n.offsetWidth-i<0&&(i=r-n.offsetWidth),o-n.offsetHeight-l<0&&(l=o-n.offsetHeight),n.style.position="absolute",n.style.left="".concat(i,"px"),n.style.top="".concat(l,"px")}function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}i>r||l>o||(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),document.addEventListener("dragend",c))})))}},inheritAttrs:!1,props:ME,emits:["update:visible"],setup:function(e,n){var r,o=this,a=cc("dialog"),i=cc(),l=Fd(),s=Vd(),c=t.ref(null),u=lc("dialog").globalConfig,d=ih({CloseIcon:Hp,InfoCircleFilledIcon:bf,CheckCircleFilledIcon:yp,ErrorCircleFilledIcon:tf}),p=d.CloseIcon,f=d.InfoCircleFilledIcon,h=d.CheckCircleFilledIcon,m=d.ErrorCircleFilledIcon,v=LE({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),G({e:t,trigger:"cancel"})}}),g=v.getConfirmBtn,b=v.getCancelBtn,y=bd((function(){return e.attach}));r=t.ref(0),t.provide("t-display-none-element-refresh",r),t.onUpdated((function(){r.value+=1}));var w=t.ref(),k=t.ref(),x=t.computed((function(){return"modal"===e.mode})),E=t.computed((function(){return"modeless"===e.mode})),C=t.computed((function(){return"normal"===e.mode})),S=t.computed((function(){return"full-screen"===e.mode})),O=t.computed((function(){return e.visible})),_=t.computed((function(){return["".concat(a.value,"__mask"),!e.showOverlay&&"".concat(i.value,"-is-hidden")]})),N=t.computed((function(){return C.value?[]:S.value?["".concat(a.value,"__position_fullscreen")]:["".concat(a.value,"__position"),!!e.top&&"".concat(a.value,"--top"),"".concat(e.placement&&!e.top?"".concat(a.value,"--").concat(e.placement):"")]})),T=t.computed((function(){return[!C.value&&"".concat(a.value,"__wrap")]})),A=t.computed((function(){if(S.value)return{};var t=e.top,n={};void 0!==t&&(n={paddingTop:VE(t)});return n})),M=t.computed((function(){var t=["".concat(a.value),"".concat(a.value,"__modal-").concat(e.theme),E.value&&e.draggable&&"".concat(a.value,"--draggable"),e.dialogClassName];return S.value?t.push("".concat(a.value,"__fullscreen")):t.push.apply(t,["".concat(a.value,"--default"),"".concat(a.value,"--").concat(e.placement)]),t})),I=t.computed((function(){return S.value?DE({},e.dialogStyle):DE({width:VE(e.width)},e.dialogStyle)})),P=SE("dialog",{visible:O}).isLastDialog;function L(){var e,t;null===(e=k.value.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,k.value)}t.watch((function(){return e.visible}),(function(n){var r;n?((x.value&&!e.showInAttachedElement||S.value)&&(e.preventScrollThrough&&document.body.appendChild(k.value),t.nextTick((function(){NE&&c.value&&(c.value.style.transformOrigin="".concat(NE.x-c.value.offsetLeft,"px ").concat(NE.y-c.value.offsetTop,"px"))}))),null===(r=document.activeElement)||void 0===r||r.blur()):(clearTimeout(w.value),w.value=setTimeout((function(){L()}),150));V(n)}));var R,B,D,V=function(t){t?(document.addEventListener("keydown",F),e.confirmOnEnter&&document.addEventListener("keydown",j)):(document.removeEventListener("keydown",F),e.confirmOnEnter&&document.removeEventListener("keydown",j))},j=function(t){if("input"!==t.target.tagName.toLowerCase()){var n,r=t.code;if(("Enter"===r||"NumpadEnter"===r)&&P())null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})}},F=function(t){var n,r;"Escape"===t.code&&P()&&(null===(n=e.onEscKeydown)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnEscKeydown)&&void 0!==r?r:u.value.closeOnEscKeydown)&&G({e:t,trigger:"esc"}))},z=(R=function(t){var n,r;e.showOverlay&&(null!==(n=e.closeOnOverlayClick)&&void 0!==n?n:u.value.closeOnOverlayClick)&&(null===(r=e.onOverlayClick)||void 0===r||r.call(e,{e:t}),G({e:t,trigger:"overlay"}))},B=!1,D=!1,{onClick:function(e){B&&D&&R(e),B=!1,D=!1},onMousedown:function(e){B=e.target===e.currentTarget},onMouseup:function(e){D=e.target===e.currentTarget}}),$=z.onClick,H=z.onMousedown,U=z.onMouseup,W=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),G({trigger:"close-btn",e:t})},G=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onMounted((function(){var e=document.documentElement.scrollHeight>document.documentElement.clientHeight?RE():0;k.value=document.createElement("style"),k.value.dataset.id="td_dialog_".concat(+new Date,"_").concat(jE+=1),k.value.innerHTML="\n html body {\n overflow-y: hidden;\n width: calc(100% - ".concat(e,"px);\n }\n ")})),t.onBeforeUnmount((function(){V(!1),L()})),{COMPONENT_NAME:a,isModal:x,isModeLess:E,isFullScreen:S,maskClass:_,dialogClass:M,dialogStyle:I,dialogEle:c,afterEnter:function(){var t;null===(t=e.onOpened)||void 0===t||t.call(e)},afterLeave:function(){var t;E.value&&e.draggable&&c.value&&(c.value.style.position="relative",c.value.style.left="unset",c.value.style.top="unset"),null===(t=e.onClosed)||void 0===t||t.call(e)},hasEventOn:function(e){var t,n=null===(t=o._events)||void 0===t?void 0:t[e];return!(null==n||!n.length)},renderDialog:function(){var n=t.createVNode("h5",{class:"title"},null),r=t.createVNode(p,null,null),o=l("default","body"),d=t.createVNode("div",null,[b({cancelBtn:e.cancelBtn,globalCancel:u.value.cancel,className:"".concat(a.value,"__cancel")}),g({theme:e.theme,confirmBtn:e.confirmBtn,globalConfirm:u.value.confirm,globalConfirmBtnTheme:u.value.confirmBtnTheme,className:"".concat(a.value,"__confirm"),confirmLoading:e.confirmLoading})]),v=S.value?["".concat(a.value,"__header"),"".concat(a.value,"__header--fullscreen")]:"".concat(a.value,"__header"),y=S.value?["".concat(a.value,"__close"),"".concat(a.value,"__close--fullscreen")]:"".concat(a.value,"__close"),w="default"===e.theme?["".concat(a.value,"__body")]:["".concat(a.value,"__body__icon")],k=s("footer",d);S.value&&k?w.push("".concat(a.value,"__body--fullscreen")):S.value&&w.push("".concat(a.value,"__body--fullscreen--without-footer"));var x=S.value?["".concat(a.value,"__footer"),"".concat(a.value,"__footer--fullscreen")]:"".concat(a.value,"__footer"),C=function(t){E.value&&e.draggable&&t.stopPropagation()};return t.createVNode("div",{class:T.value},[t.createVNode("div",{class:N.value,style:A.value,onClick:$,onMousedown:H,onMouseup:U},[t.withDirectives(t.createVNode("div",{key:"dialog",class:M.value,style:I.value,ref:c},[t.createVNode("div",{class:v,onMousedown:C},[t.createVNode("div",{class:"".concat(a.value,"__header-content")},[{info:t.createVNode(f,{class:"".concat(i.value,"-is-info")},null),warning:t.createVNode(m,{class:"".concat(i.value,"-is-warning")},null),danger:t.createVNode(m,{class:"".concat(i.value,"-is-error")},null),success:t.createVNode(h,{class:"".concat(i.value,"-is-success")},null)}[e.theme],s("header",n)]),e.closeBtn?t.createVNode("span",{class:y,onClick:W},[s("closeBtn",r)]):null]),t.createVNode("div",{class:w,onMousedown:C},[o]),k&&t.createVNode("div",{class:x,onMousedown:C},[k])]),[[t.resolveDirective("draggable"),E.value&&e.draggable]])])])},teleportElement:y}},render:function(){var e=this,n=this.COMPONENT_NAME,r=[(this.isModal||this.isFullScreen)&&t.createVNode("div",{key:"mask",class:this.maskClass},null),this.renderDialog()],o={zIndex:this.zIndex},a=["".concat(n,"__ctx"),w(w(w({},"".concat(n,"__ctx--fixed"),this.isModal||this.isFullScreen),"".concat(n,"__ctx--absolute"),this.isModal&&this.showInAttachedElement),"".concat(n,"__ctx--modeless"),this.isModeLess)];return t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode(t.Transition,{duration:300,name:"".concat(n,"-zoom__vue"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave},{default:function(){return[(!e.destroyOnClose||e.visible)&&t.withDirectives(t.createVNode("div",t.mergeProps({class:a,style:o},e.$attrs),[r]),[[t.vShow,e.visible]])]}})]}})}})),zE={closeBtn:{type:[Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:!0},closeOnOverlay:Boolean,draggable:{type:Boolean,default:void 0},imageScale:{type:Object},images:{type:Array,default:function(){return[]}},index:{type:Number,default:void 0},defaultIndex:{type:Number,default:0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless"].includes(e)}},navigationArrow:{type:[Boolean,Function],default:!0},showOverlay:{type:Boolean,default:void 0},title:{type:[String,Function]},trigger:{type:[String,Function]},viewerScale:{type:Object},visible:{type:Boolean,default:void 0},modelValue:{type:Boolean,default:void 0},defaultVisible:Boolean,zIndex:{type:Number},onClose:Function,onIndexChange:Function};function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var HE=function(e){return _e(e)?e.map((function(e){return!(t=e)||bl(t)||t instanceof File?{mainImage:e,thumbnail:e,download:!0}:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$E(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({download:!0,thumbnail:e.mainImage},e);var t})):[]},UE=t.defineComponent({name:"TImageViewerUtils",props:{scale:Number,onRotate:Function,onZoomIn:Function,onZoomOut:Function,onMirror:Function,onReset:Function,currentImage:{type:Object,default:function(){return{}}}},setup:function(e){var n=cc(),r=Hm(t.computed((function(){return e.currentImage.mainImage}))).previewUrl,o=lc("imageViewer").globalConfig;return function(){return t.createVNode("div",{class:"".concat(n.value,"-image-viewer__utils")},[t.createVNode("div",{class:"".concat(n.value,"-image-viewer__utils-content")},[t.createVNode(Rv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.mirrorTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode(AE,{onClick:e.onMirror,icon:function(){return t.createVNode(xf,{size:"medium"},null)}},null)]}}),t.createVNode(Rv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.rotateTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode(AE,{onClick:e.onRotate,icon:function(){return t.createVNode(Af,{size:"medium"},null)}},null)]}}),t.createVNode(AE,{icon:function(){return t.createVNode(Vf,{size:"medium"},null)},onClick:e.onZoomOut},null),t.createVNode(AE,{class:"".concat(n.value,"-image-viewer__utils-scale"),size:"medium",label:"".concat(Vg(String(100*e.scale)),"%")},null),t.createVNode(AE,{icon:function(){return t.createVNode(Lf,{size:"medium"},null)},onClick:e.onZoomIn},null),t.createVNode(Rv,{overlayClassName:"".concat(n.value,"-image-viewer__utils--tip"),content:o.value.originalSizeTipText,destroyOnClose:!0,placement:"top",showArrow:!0,theme:"default"},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"-image-viewer__modal-icon")},[t.createVNode(AE,{icon:function(){return t.createVNode(hf,{size:"medium"},null)},onClick:e.onReset},null)])]}}),e.currentImage.download&&t.createVNode(AE,{icon:function(){return t.createVNode(Zp,{size:"medium"},null)},onClick:function(){var e,t,n,o,a,i;e=r.value,a=new Image,i=(null==e||null===(t=e.split)||void 0===t||null===(t=t.call(e,"?"))||void 0===t||null===(t=t[0])||void 0===t||null===(n=t.split)||void 0===n||null===(n=n.call(t,"#"))||void 0===n||null===(n=n[0])||void 0===n||null===(o=n.split)||void 0===o?void 0:o.call(n,"/").pop())||Math.random().toString(32).slice(2),a.setAttribute("crossOrigin","anonymous"),a.onload=function(){var e=document.createElement("canvas");e.width=a.width,e.height=a.height,e.getContext("2d").drawImage(a,0,0,a.width,a.height),e.toBlob((function(e){var t=URL.createObjectURL(e),n=document.createElement("a");n.download=i,n.href=t,n.click(),n.remove(),URL.revokeObjectURL(t)}))},a.src=e}},null)])])}}}),WE=t.defineComponent({name:"TImageViewerModal",props:{zIndex:Number,visible:Boolean,index:Number,images:zE.images,scale:Number,rotate:Number,mirror:Number,title:zE.title,currentImage:{type:Object,default:function(){return{}}},onRotate:Function,onZoomIn:Function,onZoomOut:Function,onMirror:Function,onReset:Function,onClose:zE.onClose,draggable:{type:Boolean,default:!0},viewerScale:{type:Object,default:function(){return{}}},showOverlay:Boolean,closeBtn:zE.closeBtn},setup:function(e){var n=cc(),r=Vd(),o=t.computed((function(){return{minWidth:e.viewerScale.minWidth,minHeight:e.viewerScale.minHeight}}));return function(){return t.createVNode(FE,{destroyOnClose:!0,attach:"body",onClose:e.onClose,visible:e.visible,placement:"center",mode:"modeless",width:1e3,cancelBtn:null,confirmBtn:null,draggable:e.draggable,zIndex:e.zIndex,showOverlay:e.showOverlay,class:"".concat(n.value,"-image-viewer__dialog"),header:r("title",""),footer:function(){return t.createVNode("div",{class:"".concat(n.value,"-image-viewer-mini__footer")},[t.createVNode(UE,{onZoomIn:e.onZoomIn,onZoomOut:e.onZoomOut,scale:e.scale,currentImage:e.currentImage,onRotate:e.onRotate,onMirror:e.onMirror,onReset:e.onReset},null)])}},{default:function(){return[t.createVNode("div",{class:"".concat(n.value,"-image-viewer-mini__content"),style:o.value},[t.createVNode(TE,{rotate:e.rotate,scale:e.scale,mirror:e.mirror,src:e.currentImage.mainImage,placementSrc:e.currentImage.thumbnail,isSvg:e.currentImage.isSvg},null)])]}})}}}),GE=function(e){return e.left="ArrowLeft",e.up="ArrowUp",e.right="ArrowRight",e.down="ArrowDown",e.esc="Escape",e}(GE||{});function KE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var qE=t.defineComponent({name:"TImageViewer",props:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?KE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},zE),setup:function(e){var n,r=cc(),o=cc("image-viewer"),a=Vd(),i=t.ref(!0),l=t.computed((function(){return function(e){return void 0!==e.showOverlay?e.showOverlay:"modal"===e.mode}(e)})),s=t.toRefs(e),c=s.index,u=s.visible,d=s.modelValue,p=pl(Dm(c,null!==(n=e.defaultIndex)&&void 0!==n?n:0,e.onIndexChange,"index"),2),f=p[0],h=p[1],m=pl(Fm(u,d,e.defaultVisible,(function(){}),"visible"),2),v=m[0],g=m[1],b=t.ref(!0),y=t.ref(),k=t.computed((function(){return[o.value,"".concat(o.value,"-preview-image"),w({},"".concat(r.value,"-is-hide"),!v.value)]})),x=t.computed((function(){return["".concat(r.value,"-image-viewer__modal-header"),w({},"".concat(r.value,"-is-show"),i.value)]})),E=t.computed((function(){var t;return null!==(t=e.zIndex)&&void 0!==t?t:2600})),C=function(){i.value=!i.value},S=function(){var e=t.ref(1);return{mirror:e,onMirror:function(){e.value*=-1},resetMirror:function(){e.value=1}}}(),O=S.mirror,_=S.onMirror,N=S.resetMirror,T=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{max:2,min:.5,step:.5},n=e.max,r=e.min,o=e.step,a=e.defaultScale,i=t.ref(null!=a?a:1),l=function(){i.value=null!=a?a:1},s=function(e){var t=e;e<r&&(t=r),e>n&&(t=n),i.value=t};return t.watch((function(){return e}),(function(){return l()})),{scale:i,onZoomIn:function(){var e=jg(i.value,o);s(e)},onZoomOut:function(){var e=Fg(i.value,o);s(e)},resetScale:l}}(e.imageScale),A=T.scale,M=T.onZoomIn,I=T.onZoomOut,P=T.resetScale,L=function(){var e=t.ref(0);return{rotate:e,onRotate:function(){e.value+=90},resetRotate:function(){e.value=0}}}(),R=L.rotate,B=L.onRotate,D=L.resetRotate,V=function(){N(),P(),D()},j=t.computed((function(){return HE(e.images)})),F=t.computed((function(){var e;return null!==(e=j.value[f.value])&&void 0!==e?e:{mainImage:""}})),z=SE("dialog",{visible:v}).isLastDialog,$=function(){var e=f.value-1;V(),h(e<0?0:e,{trigger:"prev"})},H=function(){var e=f.value+1;V(),h(e>=j.value.length?f.value:e,{trigger:"next"})},U=function(){g(!0)},W=function(t){var n;g(!1),null===(n=e.onClose)||void 0===n||n.call(e,t)},G=function(e){W({e:e,trigger:"close-btn"})},K=function(t){e.closeOnOverlay&&W({e:t,trigger:"overlay"})},q=function(t){switch(t.stopPropagation(),t.code){case GE.left:$();break;case GE.right:H();break;case GE.up:M();break;case GE.down:I();break;case GE.esc:e.closeOnEscKeydown&&z()&&W({e:t,trigger:"esc"})}},Y=t.ref();t.watch((function(){return v.value}),(function(e){clearTimeout(y.value),e?(b.value=!1,t.nextTick().then((function(){var e,t;null===(e=Y.value)||void 0===e||null===(t=e.focus)||void 0===t||t.call(e)})),V()):y.value=setTimeout((function(){b.value=!0}),200)}));var X=function(e){e.preventDefault(),e.deltaY>0?I():M()},Z=t.computed((function(){return{transform:"translateX(calc(-".concat(f.value," * (40px / 9 * 16 + 4px)))")}})),J=function(){return t.createVNode("div",{class:x.value},[t.createVNode(AE,{icon:function(){return t.createVNode(Ep,null,null)},class:"".concat(o.value,"__header-pre-bt"),onClick:C},null),t.createVNode("div",{class:"".concat(o.value,"__header-prev")},[t.createVNode("div",{class:"".concat(o.value,"__header-trans"),style:Z.value},[j.value.map((function(e,n){return t.createVNode("div",{key:n,class:["".concat(o.value,"__header-box"),w({},"".concat(r.value,"-is-active"),n===f.value)]},[t.createVNode(EE,{src:e.thumbnail||e.mainImage,error:"",className:"".concat(o.value,"__header-img"),onClick:function(){h(n,{trigger:"current"})}},null)])}))])])])},Q=function(e){var n="prev"===e?0:180,r=a("navigationArrow",t.createVNode(_p,{style:{transform:"rotate(".concat(n,"deg)")},size:"24px"},null));return t.createVNode(AE,{class:"".concat(o.value,"__modal-").concat(e,"-bt"),onClick:"prev"===e?$:H,icon:function(){return r}},null)},ee=function(){if(!1!==e.closeBtn)return t.createVNode("div",{class:["".concat(o.value,"__modal-icon"),"".concat(o.value,"__modal-close-bt")],onClick:G},[a("closeBtn",t.createVNode(Hp,{size:"24px"},null))])};return function(){return"modeless"===e.mode?t.createVNode(t.Fragment,null,[a("trigger",{params:{open:U}}),t.createVNode(WE,{zIndex:E.value,visible:v.value,index:f.value,images:j.value,scale:A.value,rotate:R.value,mirror:O.value,currentImage:F.value,onRotate:B,onZoomIn:M,onZoomOut:I,onMirror:_,onReset:V,onClose:W,draggable:e.draggable,showOverlay:l.value,title:e.title},null)]):t.createVNode(t.Fragment,null,[a("trigger",{params:{open:U}}),t.createVNode(t.Teleport,{to:"body"},{default:function(){return[t.createVNode(t.Transition,null,{default:function(){return[(v.value||!b.value)&&t.withDirectives(t.createVNode("div",{ref:Y,class:k.value,style:{zIndex:E.value},onWheel:X,tabindex:-1,onKeydown:q},[!!l.value&&t.createVNode("div",{class:"".concat(o.value,"__modal-mask"),onClick:K},null),j.value.length>1&&t.createVNode(t.Fragment,null,[J(),t.createVNode("div",{class:"".concat(o.value,"__modal-index")},[e.title&&a("title"),"".concat(f.value+1,"/").concat(j.value.length)]),Q("prev"),Q("next")]),ee(),t.createVNode(UE,{onZoomIn:M,onZoomOut:I,onMirror:_,onReset:V,onRotate:B,scale:A.value,currentImage:F.value},null),t.createVNode(TE,{scale:A.value,rotate:R.value,mirror:O.value,src:F.value.mainImage,placementSrc:F.value.thumbnail,isSvg:F.value.isSvg},null)]),[[t.vShow,v.value]])]}})]}})])}}}),YE=Nd(qE),XE={alpha:{type:Number,default:1},content:{type:[String,Function]},default:{type:[String,Function]},height:{type:Number},isRepeat:{type:Boolean,default:!0},lineSpace:{type:Number,default:16},movable:Boolean,moveInterval:{type:Number,default:3e3},offset:{type:Array},removable:{type:Boolean,default:!0},rotate:{type:Number,default:-22},watermarkContent:{type:[Object,Array]},width:{type:Number},x:{type:Number},y:{type:Number},zIndex:{type:Number}};function ZE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function JE(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ZE(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ZE(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function QE(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return eC(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?eC(e,t):void 0}}(e))||t){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==n.return||n.return()}finally{if(l)throw a}}}}function eC(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var tC=Nd(t.defineComponent({name:"TWatermark",props:XE,setup:function(e){var n=t.ref(""),r=t.shallowRef(),o=t.shallowRef(),a=t.reactive(e.offset||[]),i=t.computed((function(){return e.movable?0:e.x})),l=t.computed((function(){return e.movable?0:e.y})),s=t.computed((function(){return e.movable?0:e.rotate})),c=t.computed((function(){return e.movable?"no-repeat":e.isRepeat?"repeat":"no-repeat"})),u=t.computed((function(){return a[0]||i.value/2})),d=t.computed((function(){return a[1]||l.value/2})),p=t.computed((function(){return{width:e.width,height:e.height,rotate:s.value,lineSpace:e.lineSpace,alpha:e.alpha,gapX:i.value,gapY:l.value,watermarkContent:e.watermarkContent,offsetLeft:u.value,offsetTop:d.value}})),f=function(){if(function(e,t){var n=e.width,r=e.height,o=e.gapX,a=e.gapY,i=e.offsetLeft,l=e.offsetTop,s=e.rotate,c=e.alpha,u=e.watermarkContent,d=e.lineSpace,p=document.createElement("canvas"),f=p.getContext("2d");if(!f)return console.warn("当前环境不支持Canvas, 无法绘制水印"),void t("");var h=window.devicePixelRatio||1,m=(o+n)*h,v=(a+r)*h;p.width=m,p.height=v,p.style.width="".concat(o+n,"px"),p.style.height="".concat(a+r,"px"),f.translate(i*h,l*h),f.rotate(Math.PI/180*Number(s)),f.globalAlpha=c;var g=n*h,b=r*h;f.fillStyle="transparent",f.fillRect(0,0,g,b);var y=Array.isArray(u)?u:[JE({},u)],w=0;y.forEach((function(e){if(e.url){var o=e.url,a=e.isGrayscale,i=void 0!==a&&a;e.top=w,w+=r;var l=new Image;l.crossOrigin="anonymous",l.referrerPolicy="no-referrer",l.src=o,l.onload=function(){if(f.drawImage(l,0,e.top*h,n*h,r*h),i){for(var o=f.getImageData(0,0,f.canvas.width,f.canvas.height),a=o.data,s=0;s<a.length;s+=4){var c=(a[s]+a[s+1]+a[s+2])/3;a[s]=c,a[s+1]=c,a[s+2]=c}f.putImageData(o,0,0)}t(p.toDataURL())}}else if(e.text){var s=e.text,c=e.fontColor,u=void 0===c?"rgba(0, 0, 0, 0.1)":c,m=e.fontSize,v=void 0===m?16:m,g=e.fontFamily,y=void 0===g?void 0:g,k=e.fontWeight,x=void 0===k?"normal":k;e.top=w,w+=d;var E=Number(v)*h;f.font="normal normal ".concat(x," ").concat(E,"px/").concat(b,"px ").concat(y),f.textAlign="start",f.textBaseline="top",f.fillStyle=u,f.fillText(s,0,e.top*h)}})),t(p.toDataURL())}(p.value,(function(t){var a;o.value&&(o.value.remove(),o.value=null),n.value=t,o.value=document.createElement("div"),fl(o.value,{zIndex:e.zIndex,position:"absolute",left:0,right:0,top:0,bottom:0,width:"100%",height:"100%",backgroundSize:"".concat(i.value+e.width,"px"),pointerEvents:"none",backgroundRepeat:c.value,backgroundImage:"url('".concat(n.value,"')"),animation:e.movable?"watermark infinite ".concat(4*e.moveInterval/60,"s"):"none"}),null===(a=r.value)||void 0===a||a.append(o.value)})),e.movable){var t=(u=Math.floor(4*Math.random()),d=Math.floor(70*Math.random())+30,"\n @keyframes watermark {\n 0% {left: ".concat(1===u?90:3===u?0:d,"%; top: ").concat(0===u?0:2===u?95:d,"%;}\n 25% {left: ").concat(0===u?90:2===u?0:100-d,"%; top: ").concat(1===u?95:3===u?0:d,"%;}\n 50% {left: ").concat(1===u?0:3===u?90:100-d,"%; top: ").concat(0===u?95:2===u?0:100-d,"%; transform: translateX(-100%);}\n 75% {left: ").concat(0===u?0:2===u?90:d,"%; top: ").concat(1===u?0:3===u?95:100-d,"%;}\n 100% {left: ").concat(1===u?90:3===u?0:d,"%; top: ").concat(0===u?0:2===u?95:d,"%;}\n }\n "));a=t,l=document.createElement("style"),s=null,document.head.appendChild(l),(s=l.sheet).insertRule(a,s.cssRules.length)}var a,l,s,u,d};return t.onMounted((function(){f(),fk(r.value,(function(t){if(!e.removable&&o.value){var n,r=QE(t);try{for(r.s();!(n=r.n()).done;){var a=n.value,i=Array.from(a.removedNodes).includes(o.value),l="attributes"===a.type&&o.value===a.target;if(i||l){f();break}}}catch(s){r.e(s)}finally{r.f()}}}),{attributes:!0,childList:!0,characterData:!0,subtree:!0})})),t.watch((function(){return e}),f,{deep:!0,flush:"post"}),{gapX:i,gapY:l,backgroundRepeat:c,backgroundImage:n,watermarkRef:r,watermarkContentRef:o,bgImageOptions:p}},render:function(){var e=cc("watermark"),n=Fd();return t.createVNode("div",{style:{position:"relative",overflow:"hidden",width:"100%"},class:e.value,ref:"watermarkRef"},[n("default","content")])}})),nC={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function]},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},default:{type:[String,Function]},destroyOnClose:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"overlay",validator:function(e){return!e||["overlay","push"].includes(e)}},placement:{type:String,default:"right",validator:function(e){return!e||["left","right","top","bottom"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},size:{type:String,default:void 0},sizeDraggable:{type:[Boolean,Object],default:!1},visible:Boolean,zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onConfirm:Function,onEscKeydown:Function,onOverlayClick:Function,onSizeDragEnd:Function};function rC(e,t,n){return Math.min(Math.max(e,t),n)}var oC=function(e){var n=t.ref(!1),r=t.ref(null),o=function e(){document.removeEventListener("mouseup",e,!0),document.removeEventListener("mousemove",a,!0),n.value=!1},a=function(t){var o,a,i,l=t.x,s=t.y,c=document.documentElement.clientHeight,u=document.documentElement.clientWidth,d="left"===e.placement||"right"===e.placement?u:c,p=("left"===e.placement||e.placement,8),f=(a=e.sizeDraggable,i={max:d,min:p},"boolean"==typeof a?{allowSizeDraggable:a,max:i.max,min:i.min}:{allowSizeDraggable:!0,max:a.max,min:a.min}),h=f.max,m=f.min;if(f.allowSizeDraggable&&n.value){var v=function(e,t){var n,r=t.x,o=t.y,a=t.max,i=t.min,l=t.maxWidth,s=t.maxHeight;switch(e){case"right":n=rC(l-r,i,a);break;case"left":n=rC(r,i,a);break;case"top":n=rC(o,i,a);break;case"bottom":n=rC(s-o,i,a);break;default:return n}return n}(e.placement,{x:l,y:s,maxWidth:u,maxHeight:c,max:h,min:m});void 0!==v&&(r.value="".concat(v,"px"),null===(o=e.onSizeDragEnd)||void 0===o||o.call(e,{e:t,size:v}))}},i=t.computed((function(){var t=["right","left"].includes(e.placement);return w(w(w(w({zIndex:1,position:"absolute",background:"transparent"},{left:"right",right:"left",top:"bottom",bottom:"top"}[e.placement],0),"width",t?"16px":"100%"),"height",t?"100%":"16px"),"cursor",t?"col-resize":"row-resize")}));return{draggedSizeValue:r,enableDrag:function(){document.addEventListener("mouseup",o,!0),document.addEventListener("mousemove",a,!0),n.value=!0},draggableLineStyles:i}},aC=1,iC=Nd(t.defineComponent({name:"TDrawer",inheritAttrs:!1,props:nC,emits:["update:visible"],setup:function(e,n){var r=t.ref(!1),o=t.ref(!1),a=t.ref(),i=t.ref(),l=lc("drawer").globalConfig,s=ih({CloseIcon:Hp}).CloseIcon,c=Vd(),u=Fd(),d=cc("drawer"),p=oC(e),f=p.draggedSizeValue,h=p.enableDrag,m=p.draggableLineStyles,v=bd((function(){return e.attach})),g=LE({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),P({trigger:"cancel",e:t})}}),b=g.getConfirmBtn,y=g.getCancelBtn,k=t.ref(null),x=t.computed((function(){return[d.value,"".concat(d.value,"--").concat(e.placement),w(w(w({},"".concat(d.value,"--open"),o.value),"".concat(d.value,"--attach"),e.showInAttachedElement),"".concat(d.value,"--without-mask"),!e.showOverlay)]})),E=t.computed((function(){var t;if(f.value)return f.value;var n=null!==(t=e.size)&&void 0!==t?t:l.value.size,r=isNaN(Number(n))?n:"".concat(n,"px");return{small:"300px",medium:"500px",large:"760px"}[n]||r})),C=t.computed((function(){return{transform:o.value?"translateX(0)":void 0,width:["left","right"].includes(e.placement)?E.value:"",height:["top","bottom"].includes(e.placement)?E.value:""}})),S=t.computed((function(){return["".concat(d.value,"__content-wrapper"),"".concat(d.value,"__content-wrapper--").concat(e.placement)]})),O=t.computed((function(){return k.value&&k.value.parentNode})),_=t.computed((function(){return[e.mode,e.placement].join()})),N=t.computed((function(){return{display:"flex",justifyContent:"right"===e.placement?"flex-start":"flex-end"}})),T=function(t){var n,r;(null!==(n=e.closeOnEscKeydown)&&void 0!==n?n:l.value.closeOnEscKeydown)&&"Escape"===t.key&&o.value&&(null===(r=e.onEscKeydown)||void 0===r||r.call(e,{e:t}),P({trigger:"esc",e:t}))},A=function(){clearTimeout(i.value),i.value=setTimeout((function(){var e,t;null===(e=a.value)||void 0===e||null===(e=e.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,a.value)}),150)};t.watch(_,(function(){"push"===e.mode&&t.nextTick((function(){O.value&&(O.value.style.cssText="transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;")}))}),{immediate:!0}),t.watch((function(){return e.visible}),(function(t){_c||(t?!e.showInAttachedElement&&e.preventScrollThrough&&a.value&&document.head.appendChild(a.value):A(),e.destroyOnClose?t?(r.value=!1,setTimeout((function(){o.value=!0}))):(o.value=!1,setTimeout((function(){r.value=!0}),200)):!0===r.value&&t?(r.value=!1,setTimeout((function(){o.value=!0}))):o.value=t)}),{immediate:!0});var M=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),P({trigger:"close-btn",e:t})},I=function(t){var n,r;null===(n=e.onOverlayClick)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnOverlayClick)&&void 0!==r?r:l.value.closeOnOverlayClick)&&P({trigger:"overlay",e:t})},P=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onUpdated((function(){!function(){if(O.value&&"push"===e.mode&&O.value){var t={left:"margin: 0 0 0 ".concat(E.value),right:"margin: 0 0 0 -".concat(E.value),top:"margin: ".concat(E.value," 0 0 0"),bottom:"margin: -".concat(E.value," 0 0 0")}[e.placement];o.value?O.value.style.cssText+=t:O.value.style.cssText=O.value.style.cssText.replace(/margin:.+;/,"")}}()})),t.onMounted((function(){var t=document.documentElement.scrollHeight>document.documentElement.clientHeight?RE():0;a.value=document.createElement("style"),a.value.dataset.id="td_drawer_".concat(+new Date,"_").concat(aC+=1),a.value.innerHTML="\n html body {\n overflow-y: hidden;\n transition: margin 300ms cubic-bezier(0.7, 0.3, 0.1, 1) 0s;\n ".concat("push"===e.mode?"":"width: calc(100% - ".concat(t,"px);"),"\n }\n "),o.value&&!e.showInAttachedElement&&e.preventScrollThrough&&document.head.appendChild(a.value),window.addEventListener("keydown",T)})),t.onBeforeUnmount((function(){A(),window.removeEventListener("keydown",T)})),function(){if(!r.value){var o,a,i=u("body","default"),p=c("header"),f=(o=b({confirmBtn:e.confirmBtn,globalConfirm:l.value.confirm,className:"".concat(d.value,"__confirm")}),a=y({cancelBtn:e.cancelBtn,globalCancel:l.value.cancel,className:"".concat(d.value,"__cancel")}),t.createVNode("div",{style:N.value},["right"===e.placement?o:null,a,"right"!==e.placement?o:null]));return t.createVNode(t.Teleport,{disabled:!e.attach||!v.value,to:v.value},{default:function(){return[t.createVNode("div",t.mergeProps({ref:k,class:x.value,style:{zIndex:e.zIndex},onKeydown:T,tabindex:0},n.attrs),[e.showOverlay&&t.createVNode("div",{class:"".concat(d.value,"__mask"),onClick:I},null),t.createVNode("div",{class:S.value,style:C.value},[p&&t.createVNode("div",{class:"".concat(d.value,"__header")},[p]),e.closeBtn&&t.createVNode("div",{class:"".concat(d.value,"__close-btn"),onClick:M},[c("closeBtn",t.createVNode(s,null,null))]),t.createVNode("div",{class:["".concat(d.value,"__body"),"narrow-scrollbar"]},[i]),e.footer&&t.createVNode("div",{class:"".concat(d.value,"__footer")},[c("footer",f)]),e.sizeDraggable&&t.createVNode("div",{style:m.value,onMousedown:h},null)])])]}})}}}})),lC={globalConfig:Object},sC=Nd(t.defineComponent({name:"TConfigProvider",props:lC,setup:function(e){sc(e);var n=Vd();return function(){return t.createVNode(t.Fragment,null,[n("default")])}}}));const cC=["width","height"],uC=["xlink:href","fill"],dC={__name:"icon",props:{name:{type:String,required:!0},size:{type:String,default:"1em"},color:{type:String,default:"currentcolor"}},setup(e){const n=e;return(r,o)=>(t.openBlock(),t.createElementBlock("svg",{class:"icon","aria-hidden":"true",width:e.size,height:e.size},[t.createElementVNode("use",{"xlink:href":`#icon-${n.name}`,fill:e.color},null,8,uC)],8,cC))}},pC=e=>{if(!e)return"";let t=e;return/macintosh|mac os x/gi.test(navigator.userAgent)&&(t=t.replace(/ctrl/gi,"⌘").replace(/shift/gi,"⇧").replace(/alt/gi,"⌥").replace(/Enter/gi,"Return").replace(/Backspace/gi,"Delete")),t},fC="undefined"!=typeof window,hC=(e,t=!1)=>t?Symbol.for(e):Symbol(e),mC=(e,t,n)=>vC({l:e,k:t,s:n}),vC=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),gC=e=>"number"==typeof e&&isFinite(e),bC=e=>"[object Date]"===LC(e),yC=e=>"[object RegExp]"===LC(e),wC=e=>RC(e)&&0===Object.keys(e).length,kC=Object.assign;let xC;const EC=()=>xC||(xC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{});function CC(e){return e.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const SC=Object.prototype.hasOwnProperty;function OC(e,t){return SC.call(e,t)}const _C=Array.isArray,NC=e=>"function"==typeof e,TC=e=>"string"==typeof e,AC=e=>"boolean"==typeof e,MC=e=>null!==e&&"object"==typeof e,IC=e=>MC(e)&&NC(e.then)&&NC(e.catch),PC=Object.prototype.toString,LC=e=>PC.call(e),RC=e=>{if(!MC(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t.constructor===Object};function BC(e){let t=e;return()=>++t}function DC(e,t){"undefined"!=typeof console&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const VC=e=>!MC(e)||_C(e);function jC(e,t){if(VC(e)||VC(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:e,des:t}=n.pop();Object.keys(e).forEach((r=>{VC(e[r])||VC(t[r])?t[r]=e[r]:n.push({src:e[r],des:t[r]})}))}}function FC(e,t,n){return{start:e,end:t}}const zC=/\{([0-9a-zA-Z]+)\}/g;function $C(e,...t){return 1===t.length&&WC(t[0])&&(t=t[0]),t&&t.hasOwnProperty||(t={}),e.replace(zC,((e,n)=>t.hasOwnProperty(n)?t[n]:""))}const HC=Object.assign,UC=e=>"string"==typeof e,WC=e=>null!==e&&"object"==typeof e;function GC(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}const KC={USE_MODULO_SYNTAX:1,__EXTEND_POINT__:2},qC={[KC.USE_MODULO_SYNTAX]:"Use modulo before '{{0}}'."};const YC={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16,__EXTEND_POINT__:17},XC={[YC.EXPECTED_TOKEN]:"Expected token: '{0}'",[YC.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[YC.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[YC.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[YC.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[YC.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[YC.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[YC.EMPTY_PLACEHOLDER]:"Empty placeholder",[YC.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[YC.INVALID_LINKED_FORMAT]:"Invalid linked format",[YC.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[YC.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[YC.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[YC.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[YC.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[YC.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function ZC(e,t,n={}){const{domain:r,messages:o,args:a}=n,i=$C((o||XC)[e]||"",...a||[]),l=new SyntaxError(String(i));return l.code=e,t&&(l.location=t),l.domain=r,l}function JC(e){throw e}const QC=" ",eS="\r",tS="\n",nS=String.fromCharCode(8232),rS=String.fromCharCode(8233);function oS(e){const t=e;let n=0,r=1,o=1,a=0;const i=e=>t[e]===eS&&t[e+1]===tS,l=e=>t[e]===rS,s=e=>t[e]===nS,c=e=>i(e)||(e=>t[e]===tS)(e)||l(e)||s(e),u=e=>i(e)||l(e)||s(e)?tS:t[e];function d(){return a=0,c(n)&&(r++,o=0),i(n)&&n++,n++,o++,t[n]}return{index:()=>n,line:()=>r,column:()=>o,peekOffset:()=>a,charAt:u,currentChar:()=>u(n),currentPeek:()=>u(n+a),next:d,peek:function(){return i(n+a)&&a++,a++,t[n+a]},reset:function(){n=0,r=1,o=1,a=0},resetPeek:function(e=0){a=e},skipToPeek:function(){const e=n+a;for(;e!==n;)d();a=0}}}const aS=void 0,iS="'",lS="tokenizer";function sS(e,t={}){const n=!1!==t.location,r=oS(e),o=()=>r.index(),a=()=>{return e=r.line(),t=r.column(),n=r.index(),{line:e,column:t,offset:n};var e,t,n},i=a(),l=o(),s={currentType:14,offset:l,startLoc:i,endLoc:i,lastType:14,lastOffset:l,lastStartLoc:i,lastEndLoc:i,braceNest:0,inLinked:!1,text:""},c=()=>s,{onError:u}=t;function d(e,t,r,...o){const a=c();if(t.column+=r,t.offset+=r,u){const r=ZC(e,n?FC(a.startLoc,t):null,{domain:lS,args:o});u(r)}}function p(e,t,r){e.endLoc=a(),e.currentType=t;const o={type:t};return n&&(o.loc=FC(e.startLoc,e.endLoc)),null!=r&&(o.value=r),o}const f=e=>p(e,14);function h(e,t){return e.currentChar()===t?(e.next(),t):(d(YC.EXPECTED_TOKEN,a(),0,t),"")}function m(e){let t="";for(;e.currentPeek()===QC||e.currentPeek()===tS;)t+=e.currentPeek(),e.peek();return t}function v(e){const t=m(e);return e.skipToPeek(),t}function g(e){if(e===aS)return!1;const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||95===t}function b(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=function(e){if(e===aS)return!1;const t=e.charCodeAt(0);return t>=48&&t<=57}("-"===e.currentPeek()?e.peek():e.currentPeek());return e.resetPeek(),r}function y(e){m(e);const t="|"===e.currentPeek();return e.resetPeek(),t}function w(e,t=!0){const n=(t=!1,r="",o=!1)=>{const a=e.currentPeek();return"{"===a?"%"!==r&&t:"@"!==a&&a?"%"===a?(e.peek(),n(t,"%",!0)):"|"===a?!("%"!==r&&!o)||!(r===QC||r===tS):a===QC?(e.peek(),n(!0,QC,o)):a!==tS||(e.peek(),n(!0,tS,o)):"%"===r||t},r=n();return t&&e.resetPeek(),r}function k(e,t){const n=e.currentChar();return n===aS?aS:t(n)?(e.next(),n):null}function x(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t}function E(e){return k(e,x)}function C(e){const t=e.charCodeAt(0);return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57||95===t||36===t||45===t}function S(e){return k(e,C)}function O(e){const t=e.charCodeAt(0);return t>=48&&t<=57}function _(e){return k(e,O)}function N(e){const t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function T(e){return k(e,N)}function A(e){let t="",n="";for(;t=_(e);)n+=t;return n}function M(e){let t="";for(;;){const n=e.currentChar();if("{"===n||"}"===n||"@"===n||"|"===n||!n)break;if("%"===n){if(!w(e))break;t+=n,e.next()}else if(n===QC||n===tS)if(w(e))t+=n,e.next();else{if(y(e))break;t+=n,e.next()}else t+=n,e.next()}return t}function I(e){return e!==iS&&e!==tS}function P(e){const t=e.currentChar();switch(t){case"\\":case"'":return e.next(),`\\${t}`;case"u":return L(e,t,4);case"U":return L(e,t,6);default:return d(YC.UNKNOWN_ESCAPE_SEQUENCE,a(),0,t),""}}function L(e,t,n){h(e,t);let r="";for(let o=0;o<n;o++){const n=T(e);if(!n){d(YC.INVALID_UNICODE_ESCAPE_SEQUENCE,a(),0,`\\${t}${r}${e.currentChar()}`);break}r+=n}return`\\${t}${r}`}function R(e){return"{"!==e&&"}"!==e&&e!==QC&&e!==tS}function B(e){v(e);const t=h(e,"|");return v(e),t}function D(e,t){let n=null;switch(e.currentChar()){case"{":return t.braceNest>=1&&d(YC.NOT_ALLOW_NEST_PLACEHOLDER,a(),0),e.next(),n=p(t,2,"{"),v(e),t.braceNest++,n;case"}":return t.braceNest>0&&2===t.currentType&&d(YC.EMPTY_PLACEHOLDER,a(),0),e.next(),n=p(t,3,"}"),t.braceNest--,t.braceNest>0&&v(e),t.inLinked&&0===t.braceNest&&(t.inLinked=!1),n;case"@":return t.braceNest>0&&d(YC.UNTERMINATED_CLOSING_BRACE,a(),0),n=V(e,t)||f(t),t.braceNest=0,n;default:{let r=!0,o=!0,i=!0;if(y(e))return t.braceNest>0&&d(YC.UNTERMINATED_CLOSING_BRACE,a(),0),n=p(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;if(t.braceNest>0&&(5===t.currentType||6===t.currentType||7===t.currentType))return d(YC.UNTERMINATED_CLOSING_BRACE,a(),0),t.braceNest=0,j(e,t);if(r=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t))return n=p(t,5,function(e){v(e);let t="",n="";for(;t=S(e);)n+=t;return e.currentChar()===aS&&d(YC.UNTERMINATED_CLOSING_BRACE,a(),0),n}(e)),v(e),n;if(o=b(e,t))return n=p(t,6,function(e){v(e);let t="";return"-"===e.currentChar()?(e.next(),t+=`-${A(e)}`):t+=A(e),e.currentChar()===aS&&d(YC.UNTERMINATED_CLOSING_BRACE,a(),0),t}(e)),v(e),n;if(i=function(e,t){const{currentType:n}=t;if(2!==n)return!1;m(e);const r=e.currentPeek()===iS;return e.resetPeek(),r}(e,t))return n=p(t,7,function(e){v(e),h(e,"'");let t="",n="";for(;t=k(e,I);)n+="\\"===t?P(e):t;const r=e.currentChar();return r===tS||r===aS?(d(YC.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,a(),0),r===tS&&(e.next(),h(e,"'")),n):(h(e,"'"),n)}(e)),v(e),n;if(!r&&!o&&!i)return n=p(t,13,function(e){v(e);let t="",n="";for(;t=k(e,R);)n+=t;return n}(e)),d(YC.INVALID_TOKEN_IN_PLACEHOLDER,a(),0,n.value),v(e),n;break}}return n}function V(e,t){const{currentType:n}=t;let r=null;const o=e.currentChar();switch(8!==n&&9!==n&&12!==n&&10!==n||o!==tS&&o!==QC||d(YC.INVALID_LINKED_FORMAT,a(),0),o){case"@":return e.next(),r=p(t,8,"@"),t.inLinked=!0,r;case".":return v(e),e.next(),p(t,9,".");case":":return v(e),e.next(),p(t,10,":");default:return y(e)?(r=p(t,1,B(e)),t.braceNest=0,t.inLinked=!1,r):function(e,t){const{currentType:n}=t;if(8!==n)return!1;m(e);const r="."===e.currentPeek();return e.resetPeek(),r}(e,t)||function(e,t){const{currentType:n}=t;if(8!==n&&12!==n)return!1;m(e);const r=":"===e.currentPeek();return e.resetPeek(),r}(e,t)?(v(e),V(e,t)):function(e,t){const{currentType:n}=t;if(9!==n)return!1;m(e);const r=g(e.currentPeek());return e.resetPeek(),r}(e,t)?(v(e),p(t,12,function(e){let t="",n="";for(;t=E(e);)n+=t;return n}(e))):function(e,t){const{currentType:n}=t;if(10!==n)return!1;const r=()=>{const t=e.currentPeek();return"{"===t?g(e.peek()):!("@"===t||"%"===t||"|"===t||":"===t||"."===t||t===QC||!t)&&(t===tS?(e.peek(),r()):w(e,!1))},o=r();return e.resetPeek(),o}(e,t)?(v(e),"{"===o?D(e,t)||r:p(t,11,function(e){const t=n=>{const r=e.currentChar();return"{"!==r&&"%"!==r&&"@"!==r&&"|"!==r&&"("!==r&&")"!==r&&r?r===QC?n:(n+=r,e.next(),t(n)):n};return t("")}(e))):(8===n&&d(YC.INVALID_LINKED_FORMAT,a(),0),t.braceNest=0,t.inLinked=!1,j(e,t))}}function j(e,t){let n={type:14};if(t.braceNest>0)return D(e,t)||f(t);if(t.inLinked)return V(e,t)||f(t);switch(e.currentChar()){case"{":return D(e,t)||f(t);case"}":return d(YC.UNBALANCED_CLOSING_BRACE,a(),0),e.next(),p(t,3,"}");case"@":return V(e,t)||f(t);default:{if(y(e))return n=p(t,1,B(e)),t.braceNest=0,t.inLinked=!1,n;const{isModulo:r,hasSpace:o}=function(e){const t=m(e),n="%"===e.currentPeek()&&"{"===e.peek();return e.resetPeek(),{isModulo:n,hasSpace:t.length>0}}(e);if(r)return o?p(t,0,M(e)):p(t,4,function(e){v(e);const t=e.currentChar();return"%"!==t&&d(YC.EXPECTED_TOKEN,a(),0,t),e.next(),"%"}(e));if(w(e))return p(t,0,M(e));break}}return n}return{nextToken:function(){const{currentType:e,offset:t,startLoc:n,endLoc:i}=s;return s.lastType=e,s.lastOffset=t,s.lastStartLoc=n,s.lastEndLoc=i,s.offset=o(),s.startLoc=a(),r.currentChar()===aS?p(s,14):j(r,s)},currentOffset:o,currentPosition:a,context:c}}const cS="parser",uS=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function dS(e,t,n){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const e=parseInt(t||n,16);return e<=55295||e>=57344?String.fromCodePoint(e):"�"}}}function pS(e={}){const t=!1!==e.location,{onError:n,onWarn:r}=e;function o(e,r,o,a,...i){const l=e.currentPosition();if(l.offset+=a,l.column+=a,n){const e=ZC(r,t?FC(o,l):null,{domain:cS,args:i});n(e)}}function a(e,n,o,a,...i){const l=e.currentPosition();if(l.offset+=a,l.column+=a,r){const e=t?FC(o,l):null;r(function(e,t,...n){const r=$C(qC[e],...n||[]),o={message:String(r),code:e};return t&&(o.location=t),o}(n,e,i))}}function i(e,n,r){const o={type:e};return t&&(o.start=n,o.end=n,o.loc={start:r,end:r}),o}function l(e,n,r,o){t&&(e.end=n,e.loc&&(e.loc.end=r))}function s(e,t){const n=e.context(),r=i(3,n.offset,n.startLoc);return r.value=t,l(r,e.currentOffset(),e.currentPosition()),r}function c(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:o}=n,a=i(5,r,o);return a.index=parseInt(t,10),e.nextToken(),l(a,e.currentOffset(),e.currentPosition()),a}function u(e,t,n){const r=e.context(),{lastOffset:o,lastStartLoc:a}=r,s=i(4,o,a);return s.key=t,!0===n&&(s.modulo=!0),e.nextToken(),l(s,e.currentOffset(),e.currentPosition()),s}function d(e,t){const n=e.context(),{lastOffset:r,lastStartLoc:o}=n,a=i(9,r,o);return a.value=t.replace(uS,dS),e.nextToken(),l(a,e.currentOffset(),e.currentPosition()),a}function p(e){const t=e.context(),n=i(6,t.offset,t.startLoc);let r=e.nextToken();if(9===r.type){const t=function(e){const t=e.nextToken(),n=e.context(),{lastOffset:r,lastStartLoc:a}=n,s=i(8,r,a);return 12!==t.type?(o(e,YC.UNEXPECTED_EMPTY_LINKED_MODIFIER,n.lastStartLoc,0),s.value="",l(s,r,a),{nextConsumeToken:t,node:s}):(null==t.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,n.lastStartLoc,0,fS(t)),s.value=t.value||"",l(s,e.currentOffset(),e.currentPosition()),{node:s})}(e);n.modifier=t.node,r=t.nextConsumeToken||e.nextToken()}switch(10!==r.type&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(r)),r=e.nextToken(),2===r.type&&(r=e.nextToken()),r.type){case 11:null==r.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(r)),n.key=function(e,t){const n=e.context(),r=i(7,n.offset,n.startLoc);return r.value=t,l(r,e.currentOffset(),e.currentPosition()),r}(e,r.value||"");break;case 5:null==r.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(r)),n.key=u(e,r.value||"");break;case 6:null==r.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(r)),n.key=c(e,r.value||"");break;case 7:null==r.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(r)),n.key=d(e,r.value||"");break;default:{o(e,YC.UNEXPECTED_EMPTY_LINKED_KEY,t.lastStartLoc,0);const a=e.context(),s=i(7,a.offset,a.startLoc);return s.value="",l(s,a.offset,a.startLoc),n.key=s,l(n,a.offset,a.startLoc),{nextConsumeToken:r,node:n}}}return l(n,e.currentOffset(),e.currentPosition()),{node:n}}function f(e){const t=e.context(),n=i(2,1===t.currentType?e.currentOffset():t.offset,1===t.currentType?t.endLoc:t.startLoc);n.items=[];let r=null,f=null;do{const i=r||e.nextToken();switch(r=null,i.type){case 0:null==i.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(i)),n.items.push(s(e,i.value||""));break;case 6:null==i.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(i)),n.items.push(c(e,i.value||""));break;case 4:f=!0;break;case 5:null==i.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(i)),n.items.push(u(e,i.value||"",!!f)),f&&(a(e,KC.USE_MODULO_SYNTAX,t.lastStartLoc,0,fS(i)),f=null);break;case 7:null==i.value&&o(e,YC.UNEXPECTED_LEXICAL_ANALYSIS,t.lastStartLoc,0,fS(i)),n.items.push(d(e,i.value||""));break;case 8:{const t=p(e);n.items.push(t.node),r=t.nextConsumeToken||null;break}}}while(14!==t.currentType&&1!==t.currentType);return l(n,1===t.currentType?t.lastOffset:e.currentOffset(),1===t.currentType?t.lastEndLoc:e.currentPosition()),n}function h(e){const t=e.context(),{offset:n,startLoc:r}=t,a=f(e);return 14===t.currentType?a:function(e,t,n,r){const a=e.context();let s=0===r.items.length;const c=i(1,t,n);c.cases=[],c.cases.push(r);do{const t=f(e);s||(s=0===t.items.length),c.cases.push(t)}while(14!==a.currentType);return s&&o(e,YC.MUST_HAVE_MESSAGES_IN_PLURAL,n,0),l(c,e.currentOffset(),e.currentPosition()),c}(e,n,r,a)}return{parse:function(n){const r=sS(n,HC({},e)),a=r.context(),s=i(0,a.offset,a.startLoc);return t&&s.loc&&(s.loc.source=n),s.body=h(r),e.onCacheKey&&(s.cacheKey=e.onCacheKey(n)),14!==a.currentType&&o(r,YC.UNEXPECTED_LEXICAL_ANALYSIS,a.lastStartLoc,0,n[a.offset]||""),l(s,r.currentOffset(),r.currentPosition()),s}}}function fS(e){if(14===e.type)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function hS(e,t){for(let n=0;n<e.length;n++)mS(e[n],t)}function mS(e,t){switch(e.type){case 1:hS(e.cases,t),t.helper("plural");break;case 2:hS(e.items,t);break;case 6:mS(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named")}}function vS(e,t={}){const n=function(e){const t={ast:e,helpers:new Set};return{context:()=>t,helper:e=>(t.helpers.add(e),e)}}(e);n.helper("normalize"),e.body&&mS(e.body,n);const r=n.context();e.helpers=Array.from(r.helpers)}function gS(e){if(1===e.items.length){const t=e.items[0];3!==t.type&&9!==t.type||(e.static=t.value,delete t.value)}else{const t=[];for(let n=0;n<e.items.length;n++){const r=e.items[n];if(3!==r.type&&9!==r.type)break;if(null==r.value)break;t.push(r.value)}if(t.length===e.items.length){e.static=GC(t);for(let t=0;t<e.items.length;t++){const n=e.items[t];3!==n.type&&9!==n.type||delete n.value}}}}const bS="minifier";function yS(e){switch(e.t=e.type,e.type){case 0:{const t=e;yS(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,n=t.cases;for(let e=0;e<n.length;e++)yS(n[e]);t.c=n,delete t.cases;break}case 2:{const t=e,n=t.items;for(let e=0;e<n.length;e++)yS(n[e]);t.i=n,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;yS(t.key),t.k=t.key,delete t.key,t.modifier&&(yS(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}default:throw ZC(YC.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:bS,args:[e.type]})}delete e.type}const wS="parser";function kS(e,t){const{helper:n}=e;switch(t.type){case 0:!function(e,t){t.body?kS(e,t.body):e.push("null")}(e,t);break;case 1:!function(e,t){const{helper:n,needIndent:r}=e;if(t.cases.length>1){e.push(`${n("plural")}([`),e.indent(r());const o=t.cases.length;for(let n=0;n<o&&(kS(e,t.cases[n]),n!==o-1);n++)e.push(", ");e.deindent(r()),e.push("])")}}(e,t);break;case 2:!function(e,t){const{helper:n,needIndent:r}=e;e.push(`${n("normalize")}([`),e.indent(r());const o=t.items.length;for(let a=0;a<o&&(kS(e,t.items[a]),a!==o-1);a++)e.push(", ");e.deindent(r()),e.push("])")}(e,t);break;case 6:!function(e,t){const{helper:n}=e;e.push(`${n("linked")}(`),kS(e,t.key),t.modifier?(e.push(", "),kS(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}(e,t);break;case 8:case 7:case 9:case 3:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${n("interpolate")}(${n("list")}(${t.index}))`,t);break;case 4:e.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(t.key)}))`,t);break;default:throw ZC(YC.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:wS,args:[t.type]})}}const xS=(e,t={})=>{const n=UC(t.mode)?t.mode:"normal",r=UC(t.filename)?t.filename:"message.intl",o=!!t.sourceMap,a=null!=t.breakLineCode?t.breakLineCode:"arrow"===n?";":"\n",i=t.needIndent?t.needIndent:"arrow"!==n,l=e.helpers||[],s=function(e,t){const{sourceMap:n,filename:r,breakLineCode:o,needIndent:a}=t,i=!1!==t.location,l={filename:r,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:o,needIndent:a,indentLevel:0};function s(e,t){l.code+=e}function c(e,t=!0){const n=t?o:"";s(a?n+" ".repeat(e):n)}return i&&e.loc&&(l.source=e.loc.source),{context:()=>l,push:s,indent:function(e=!0){const t=++l.indentLevel;e&&c(t)},deindent:function(e=!0){const t=--l.indentLevel;e&&c(t)},newline:function(){c(l.indentLevel)},helper:e=>`_${e}`,needIndent:()=>l.needIndent}}(e,{mode:n,filename:r,sourceMap:o,breakLineCode:a,needIndent:i});s.push("normal"===n?"function __msg__ (ctx) {":"(ctx) => {"),s.indent(i),l.length>0&&(s.push(`const { ${GC(l.map((e=>`${e}: _${e}`)),", ")} } = ctx`),s.newline()),s.push("return "),kS(s,e),s.deindent(i),s.push("}"),delete e.helpers;const{code:c,map:u}=s.context();return{ast:e,code:c,map:u?u.toJSON():void 0}};function ES(e,t={}){const n=HC({},t),r=!!n.jit,o=!!n.minify,a=null==n.optimize||n.optimize,i=pS(n).parse(e);return r?(a&&function(e){const t=e.body;2===t.type?gS(t):t.cases.forEach((e=>gS(e)))}(i),o&&yS(i),{ast:i,code:""}):(vS(i,n),xS(i,n))}const CS=[];CS[0]={w:[0],i:[3,0],"[":[4],o:[7]},CS[1]={w:[1],".":[2],"[":[4],o:[7]},CS[2]={w:[2],i:[3,0],0:[3,0]},CS[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},CS[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},CS[5]={"'":[4,0],o:8,l:[5,0]},CS[6]={'"':[4,0],o:8,l:[6,0]};const SS=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function OS(e){if(null==e)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function _S(e){const t=e.trim();return("0"!==e.charAt(0)||!isNaN(parseInt(e)))&&(n=t,SS.test(n)?function(e){const t=e.charCodeAt(0);return t!==e.charCodeAt(e.length-1)||34!==t&&39!==t?e:e.slice(1,-1)}(t):"*"+t);var n}const NS=new Map;function TS(e,t){return MC(e)?e[t]:null}const AS=e=>e,MS=e=>"",IS="text",PS=e=>0===e.length?"":function(e,t=""){return e.reduce(((e,n,r)=>0===r?e+n:e+t+n),"")}(e),LS=e=>null==e?"":_C(e)||RC(e)&&e.toString===PC?JSON.stringify(e,null,2):String(e);function RS(e,t){return e=Math.abs(e),2===t?e?e>1?1:0:1:e?Math.min(e,2):0}function BS(e={}){const t=e.locale,n=function(e){const t=gC(e.pluralIndex)?e.pluralIndex:-1;return e.named&&(gC(e.named.count)||gC(e.named.n))?gC(e.named.count)?e.named.count:gC(e.named.n)?e.named.n:t:t}(e),r=MC(e.pluralRules)&&TC(t)&&NC(e.pluralRules[t])?e.pluralRules[t]:RS,o=MC(e.pluralRules)&&TC(t)&&NC(e.pluralRules[t])?RS:void 0,a=e.list||[],i=e.named||{};gC(e.pluralIndex)&&function(e,t){t.count||(t.count=e),t.n||(t.n=e)}(n,i);function l(t){const n=NC(e.messages)?e.messages(t):!!MC(e.messages)&&e.messages[t];return n||(e.parent?e.parent.message(t):MS)}const s=RC(e.processor)&&NC(e.processor.normalize)?e.processor.normalize:PS,c=RC(e.processor)&&NC(e.processor.interpolate)?e.processor.interpolate:LS,u={list:e=>a[e],named:e=>i[e],plural:e=>e[r(n,e.length,o)],linked:(t,...n)=>{const[r,o]=n;let a="text",i="";1===n.length?MC(r)?(i=r.modifier||i,a=r.type||a):TC(r)&&(i=r||i):2===n.length&&(TC(r)&&(i=r||i),TC(o)&&(a=o||a));const s=l(t)(u),c="vnode"===a&&_C(s)&&i?s[0]:s;return i?(d=i,e.modifiers?e.modifiers[d]:AS)(c,a):c;var d},message:l,type:RC(e.processor)&&TC(e.processor.type)?e.processor.type:IS,interpolate:c,normalize:s,values:kC({},a,i)};return u}let DS=null;const VS=jS("function:translate");function jS(e){return t=>DS&&DS.emit(e,t)}const FS=KC.__EXTEND_POINT__,zS=BC(FS),$S={NOT_FOUND_KEY:FS,FALLBACK_TO_TRANSLATE:zS(),CANNOT_FORMAT_NUMBER:zS(),FALLBACK_TO_NUMBER_FORMAT:zS(),CANNOT_FORMAT_DATE:zS(),FALLBACK_TO_DATE_FORMAT:zS(),EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:zS(),__EXTEND_POINT__:zS()},HS=YC.__EXTEND_POINT__,US=BC(HS),WS={INVALID_ARGUMENT:HS,INVALID_DATE_ARGUMENT:US(),INVALID_ISO_DATE_ARGUMENT:US(),NOT_SUPPORT_NON_STRING_MESSAGE:US(),NOT_SUPPORT_LOCALE_PROMISE_VALUE:US(),NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:US(),NOT_SUPPORT_LOCALE_TYPE:US(),__EXTEND_POINT__:US()};function GS(e){return ZC(e,null,void 0)}function KS(e,t){return null!=t.locale?YS(t.locale):YS(e.locale)}let qS;function YS(e){if(TC(e))return e;if(NC(e)){if(e.resolvedOnce&&null!=qS)return qS;if("Function"===e.constructor.name){const t=e();if(IC(t))throw GS(WS.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return qS=t}throw GS(WS.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}throw GS(WS.NOT_SUPPORT_LOCALE_TYPE)}function XS(e,t,n){return[...new Set([n,..._C(t)?t:MC(t)?Object.keys(t):TC(t)?[t]:[n]])]}function ZS(e,t,n){const r=TC(n)?n:rO,o=e;o.__localeChainCache||(o.__localeChainCache=new Map);let a=o.__localeChainCache.get(r);if(!a){a=[];let e=[n];for(;_C(e);)e=JS(a,e,t);const i=_C(t)||!RC(t)?t:t.default?t.default:null;e=TC(i)?[i]:i,_C(e)&&JS(a,e,!1),o.__localeChainCache.set(r,a)}return a}function JS(e,t,n){let r=!0;for(let o=0;o<t.length&&AC(r);o++){const a=t[o];TC(a)&&(r=QS(e,t[o],n))}return r}function QS(e,t,n){let r;const o=t.split("-");do{r=eO(e,o.join("-"),n),o.splice(-1,1)}while(o.length&&!0===r);return r}function eO(e,t,n){let r=!1;if(!e.includes(t)&&(r=!0,t)){r="!"!==t[t.length-1];const o=t.replace(/!/g,"");e.push(o),(_C(n)||RC(n))&&n[o]&&(r=n[o])}return r}const tO="9.13.1",nO=-1,rO="en-US",oO="",aO=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;let iO,lO,sO;function cO(e){iO=e}let uO=null;const dO=()=>uO;let pO=null;const fO=e=>{pO=e},hO=()=>pO;let mO=0;function vO(e={}){const t=NC(e.onWarn)?e.onWarn:DC,n=TC(e.version)?e.version:tO,r=TC(e.locale)||NC(e.locale)?e.locale:rO,o=NC(r)?rO:r,a=_C(e.fallbackLocale)||RC(e.fallbackLocale)||TC(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:o,i=RC(e.messages)?e.messages:{[o]:{}},l=RC(e.datetimeFormats)?e.datetimeFormats:{[o]:{}},s=RC(e.numberFormats)?e.numberFormats:{[o]:{}},c=kC({},e.modifiers||{},{upper:(e,t)=>"text"===t&&TC(e)?e.toUpperCase():"vnode"===t&&MC(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>"text"===t&&TC(e)?e.toLowerCase():"vnode"===t&&MC(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>"text"===t&&TC(e)?aO(e):"vnode"===t&&MC(e)&&"__v_isVNode"in e?aO(e.children):e}),u=e.pluralRules||{},d=NC(e.missing)?e.missing:null,p=!AC(e.missingWarn)&&!yC(e.missingWarn)||e.missingWarn,f=!AC(e.fallbackWarn)&&!yC(e.fallbackWarn)||e.fallbackWarn,h=!!e.fallbackFormat,m=!!e.unresolving,v=NC(e.postTranslation)?e.postTranslation:null,g=RC(e.processor)?e.processor:null,b=!AC(e.warnHtmlMessage)||e.warnHtmlMessage,y=!!e.escapeParameter,w=NC(e.messageCompiler)?e.messageCompiler:iO,k=NC(e.messageResolver)?e.messageResolver:lO||TS,x=NC(e.localeFallbacker)?e.localeFallbacker:sO||XS,E=MC(e.fallbackContext)?e.fallbackContext:void 0,C=e,S=MC(C.__datetimeFormatters)?C.__datetimeFormatters:new Map,O=MC(C.__numberFormatters)?C.__numberFormatters:new Map,_=MC(C.__meta)?C.__meta:{};mO++;const N={version:n,cid:mO,locale:r,fallbackLocale:a,messages:i,modifiers:c,pluralRules:u,missing:d,missingWarn:p,fallbackWarn:f,fallbackFormat:h,unresolving:m,postTranslation:v,processor:g,warnHtmlMessage:b,escapeParameter:y,messageCompiler:w,messageResolver:k,localeFallbacker:x,fallbackContext:E,onWarn:t,__meta:_};return N.datetimeFormats=l,N.numberFormats=s,N.__datetimeFormatters=S,N.__numberFormatters=O,__INTLIFY_PROD_DEVTOOLS__&&function(e,t,n){DS&&DS.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:n})}(N,n,_),N}function gO(e,t,n,r,o){const{missing:a,onWarn:i}=e;if(null!==a){const r=a(e,n,t,o);return TC(r)?r:t}return t}function bO(e,t,n){e.__localeChainCache=new Map,e.localeFallbacker(e,n,t)}function yO(e,t){const n=t.indexOf(e);if(-1===n)return!1;for(let a=n+1;a<t.length;a++)if(r=e,o=t[a],r!==o&&r.split("-")[0]===o.split("-")[0])return!0;var r,o;return!1}function wO(e){return t=>function(e,t){const n=t.b||t.body;if(1===(n.t||n.type)){const t=n,r=t.c||t.cases;return e.plural(r.reduce(((t,n)=>[...t,kO(e,n)]),[]))}return kO(e,n)}(t,e)}function kO(e,t){const n=t.s||t.static;if(n)return"text"===e.type?n:e.normalize([n]);{const n=(t.i||t.items).reduce(((t,n)=>[...t,xO(e,n)]),[]);return e.normalize(n)}}function xO(e,t){const n=t.t||t.type;switch(n){case 3:{const e=t;return e.v||e.value}case 9:{const e=t;return e.v||e.value}case 4:{const n=t;return e.interpolate(e.named(n.k||n.key))}case 5:{const n=t;return e.interpolate(e.list(null!=n.i?n.i:n.index))}case 6:{const n=t,r=n.m||n.modifier;return e.linked(xO(e,n.k||n.key),r?xO(e,r):void 0,e.type)}case 7:{const e=t;return e.v||e.value}case 8:{const e=t;return e.v||e.value}default:throw new Error(`unhandled node type on format message part: ${n}`)}}const EO=e=>e;let CO=Object.create(null);const SO=e=>MC(e)&&(0===e.t||0===e.type)&&("b"in e||"body"in e);function OO(e,t={}){let n=!1;const r=t.onError||JC;return t.onError=e=>{n=!0,r(e)},{...ES(e,t),detectError:n}}const _O=(e,t)=>{if(!TC(e))throw GS(WS.NOT_SUPPORT_NON_STRING_MESSAGE);{!AC(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||EO)(e),r=CO[n];if(r)return r;const{code:o,detectError:a}=OO(e,t),i=new Function(`return ${o}`)();return a?i:CO[n]=i}};const NO=()=>"",TO=e=>NC(e);function AO(e,...t){const{fallbackFormat:n,postTranslation:r,unresolving:o,messageCompiler:a,fallbackLocale:i,messages:l}=e,[s,c]=PO(...t),u=AC(c.missingWarn)?c.missingWarn:e.missingWarn,d=AC(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,p=AC(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,h=TC(c.default)||AC(c.default)?AC(c.default)?a?s:()=>s:c.default:n?a?s:()=>s:"",m=n||""!==h,v=KS(e,c);p&&function(e){_C(e.list)?e.list=e.list.map((e=>TC(e)?CC(e):e)):MC(e.named)&&Object.keys(e.named).forEach((t=>{TC(e.named[t])&&(e.named[t]=CC(e.named[t]))}))}(c);let[g,b,y]=f?[s,v,l[v]||{}]:MO(e,s,v,i,d,u),w=g,k=s;if(f||TC(w)||SO(w)||TO(w)||m&&(w=h,k=w),!(f||(TC(w)||SO(w)||TO(w))&&TC(b)))return o?nO:s;let x=!1;const E=TO(w)?w:IO(e,s,b,w,k,(()=>{x=!0}));if(x)return w;const C=function(e,t,n,r){const{modifiers:o,pluralRules:a,messageResolver:i,fallbackLocale:l,fallbackWarn:s,missingWarn:c,fallbackContext:u}=e,d=r=>{let o=i(n,r);if(null==o&&u){const[,,e]=MO(u,r,t,l,s,c);o=i(e,r)}if(TC(o)||SO(o)){let n=!1;const a=IO(e,r,t,o,r,(()=>{n=!0}));return n?NO:a}return TO(o)?o:NO},p={locale:t,modifiers:o,pluralRules:a,messages:d};e.processor&&(p.processor=e.processor);r.list&&(p.list=r.list);r.named&&(p.named=r.named);gC(r.plural)&&(p.pluralIndex=r.plural);return p}(e,b,y,c),S=function(e,t,n){const r=t(n);return r}(0,E,BS(C)),O=r?r(S,s):S;if(__INTLIFY_PROD_DEVTOOLS__){const t={timestamp:Date.now(),key:TC(s)?s:TO(w)?w.key:"",locale:b||(TO(w)?w.locale:""),format:TC(w)?w:TO(w)?w.source:"",message:O};t.meta=kC({},e.__meta,dO()||{}),VS(t)}return O}function MO(e,t,n,r,o,a){const{messages:i,onWarn:l,messageResolver:s,localeFallbacker:c}=e,u=c(e,r,n);let d,p={},f=null;for(let h=0;h<u.length&&(d=u[h],p=i[d]||{},null===(f=s(p,t))&&(f=p[t]),!(TC(f)||SO(f)||TO(f)));h++)if(!yO(d,u)){const n=gO(e,t,d,0,"translate");n!==t&&(f=n)}return[f,d,p]}function IO(e,t,n,r,o,a){const{messageCompiler:i,warnHtmlMessage:l}=e;if(TO(r)){const e=r;return e.locale=e.locale||n,e.key=e.key||t,e}if(null==i){const e=()=>r;return e.locale=n,e.key=t,e}const s=i(r,function(e,t,n,r,o,a){return{locale:t,key:n,warnHtmlMessage:o,onError:e=>{throw a&&a(e),e},onCacheKey:e=>mC(t,n,e)}}(0,n,o,0,l,a));return s.locale=n,s.key=t,s.source=r,s}function PO(...e){const[t,n,r]=e,o={};if(!(TC(t)||gC(t)||TO(t)||SO(t)))throw GS(WS.INVALID_ARGUMENT);const a=gC(t)?String(t):(TO(t),t);return gC(n)?o.plural=n:TC(n)?o.default=n:RC(n)&&!wC(n)?o.named=n:_C(n)&&(o.list=n),gC(r)?o.plural=r:TC(r)?o.default=r:RC(r)&&kC(o,r),[a,o]}function LO(e,...t){const{datetimeFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:i}=e,{__datetimeFormatters:l}=e,[s,c,u,d]=BO(...t);AC(u.missingWarn)?u.missingWarn:e.missingWarn;AC(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,f=KS(e,u),h=i(e,o,f);if(!TC(s)||""===s)return new Intl.DateTimeFormat(f,d).format(c);let m,v={},g=null;for(let w=0;w<h.length&&(m=h[w],v=n[m]||{},g=v[s],!RC(g));w++)gO(e,s,m,0,"datetime format");if(!RC(g)||!TC(m))return r?nO:s;let b=`${m}__${s}`;wC(d)||(b=`${b}__${JSON.stringify(d)}`);let y=l.get(b);return y||(y=new Intl.DateTimeFormat(m,kC({},g,d)),l.set(b,y)),p?y.formatToParts(c):y.format(c)}const RO=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function BO(...e){const[t,n,r,o]=e,a={};let i,l={};if(TC(t)){const e=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!e)throw GS(WS.INVALID_ISO_DATE_ARGUMENT);const n=e[3]?e[3].trim().startsWith("T")?`${e[1].trim()}${e[3].trim()}`:`${e[1].trim()}T${e[3].trim()}`:e[1].trim();i=new Date(n);try{i.toISOString()}catch(s){throw GS(WS.INVALID_ISO_DATE_ARGUMENT)}}else if(bC(t)){if(isNaN(t.getTime()))throw GS(WS.INVALID_DATE_ARGUMENT);i=t}else{if(!gC(t))throw GS(WS.INVALID_ARGUMENT);i=t}return TC(n)?a.key=n:RC(n)&&Object.keys(n).forEach((e=>{RO.includes(e)?l[e]=n[e]:a[e]=n[e]})),TC(r)?a.locale=r:RC(r)&&(l=r),RC(o)&&(l=o),[a.key||"",i,a,l]}function DO(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__datetimeFormatters.has(e)&&r.__datetimeFormatters.delete(e)}}function VO(e,...t){const{numberFormats:n,unresolving:r,fallbackLocale:o,onWarn:a,localeFallbacker:i}=e,{__numberFormatters:l}=e,[s,c,u,d]=FO(...t);AC(u.missingWarn)?u.missingWarn:e.missingWarn;AC(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const p=!!u.part,f=KS(e,u),h=i(e,o,f);if(!TC(s)||""===s)return new Intl.NumberFormat(f,d).format(c);let m,v={},g=null;for(let w=0;w<h.length&&(m=h[w],v=n[m]||{},g=v[s],!RC(g));w++)gO(e,s,m,0,"number format");if(!RC(g)||!TC(m))return r?nO:s;let b=`${m}__${s}`;wC(d)||(b=`${b}__${JSON.stringify(d)}`);let y=l.get(b);return y||(y=new Intl.NumberFormat(m,kC({},g,d)),l.set(b,y)),p?y.formatToParts(c):y.format(c)}const jO=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function FO(...e){const[t,n,r,o]=e,a={};let i={};if(!gC(t))throw GS(WS.INVALID_ARGUMENT);const l=t;return TC(n)?a.key=n:RC(n)&&Object.keys(n).forEach((e=>{jO.includes(e)?i[e]=n[e]:a[e]=n[e]})),TC(r)?a.locale=r:RC(r)&&(i=r),RC(o)&&(i=o),[a.key||"",l,a,i]}function zO(e,t,n){const r=e;for(const o in n){const e=`${t}__${o}`;r.__numberFormatters.has(e)&&r.__numberFormatters.delete(e)}}"boolean"!=typeof __INTLIFY_PROD_DEVTOOLS__&&(EC().__INTLIFY_PROD_DEVTOOLS__=!1),"boolean"!=typeof __INTLIFY_JIT_COMPILATION__&&(EC().__INTLIFY_JIT_COMPILATION__=!1),"boolean"!=typeof __INTLIFY_DROP_MESSAGE_COMPILER__&&(EC().__INTLIFY_DROP_MESSAGE_COMPILER__=!1);const $O="9.13.1";const HO=$S.__EXTEND_POINT__,UO=BC(HO);UO(),UO(),UO(),UO(),UO(),UO(),UO(),UO(),UO();const WO=WS.__EXTEND_POINT__,GO=BC(WO),KO={UNEXPECTED_RETURN_TYPE:WO,INVALID_ARGUMENT:GO(),MUST_BE_CALL_SETUP_TOP:GO(),NOT_INSTALLED:GO(),NOT_AVAILABLE_IN_LEGACY_MODE:GO(),REQUIRED_VALUE:GO(),INVALID_VALUE:GO(),CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:GO(),NOT_INSTALLED_WITH_PROVIDE:GO(),UNEXPECTED_ERROR:GO(),NOT_COMPATIBLE_LEGACY_VUE_I18N:GO(),BRIDGE_SUPPORT_VUE_2_ONLY:GO(),MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION:GO(),NOT_AVAILABLE_COMPOSITION_IN_LEGACY:GO(),__EXTEND_POINT__:GO()};function qO(e,...t){return ZC(e,null,void 0)}const YO=hC("__translateVNode"),XO=hC("__datetimeParts"),ZO=hC("__numberParts"),JO=hC("__setPluralRules"),QO=hC("__injectWithOption"),e_=hC("__dispose");function t_(e){if(!MC(e))return e;for(const t in e)if(OC(e,t))if(t.includes(".")){const n=t.split("."),r=n.length-1;let o=e,a=!1;for(let e=0;e<r;e++){if(n[e]in o||(o[n[e]]={}),!MC(o[n[e]])){a=!0;break}o=o[n[e]]}a||(o[n[r]]=e[t],delete e[t]),MC(o[n[r]])&&t_(o[n[r]])}else MC(e[t])&&t_(e[t]);return e}function n_(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:a}=t,i=RC(n)?n:_C(r)?{}:{[e]:{}};if(_C(r)&&r.forEach((e=>{if("locale"in e&&"resource"in e){const{locale:t,resource:n}=e;t?(i[t]=i[t]||{},jC(n,i[t])):jC(n,i)}else TC(e)&&jC(JSON.parse(e),i)})),null==o&&a)for(const l in i)OC(i,l)&&t_(i[l]);return i}function r_(e){return e.type}function o_(e,t,n){let r=MC(t.messages)?t.messages:{};"__i18nGlobal"in n&&(r=n_(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);if(o.length&&o.forEach((t=>{e.mergeLocaleMessage(t,r[t])})),MC(t.datetimeFormats)){const n=Object.keys(t.datetimeFormats);n.length&&n.forEach((n=>{e.mergeDateTimeFormat(n,t.datetimeFormats[n])}))}if(MC(t.numberFormats)){const n=Object.keys(t.numberFormats);n.length&&n.forEach((n=>{e.mergeNumberFormat(n,t.numberFormats[n])}))}}function a_(e){return t.createVNode(t.Text,null,e,0)}const i_=()=>[],l_=()=>!1;let s_=0;function c_(e){return(n,r,o,a)=>e(r,o,t.getCurrentInstance()||void 0,a)}function u_(e={},n){const{__root:r,__injectWithOption:o}=e,a=void 0===r,i=e.flatJson,l=fC?t.ref:t.shallowRef,s=!!e.translateExistCompatible;let c=!AC(e.inheritLocale)||e.inheritLocale;const u=l(r&&c?r.locale.value:TC(e.locale)?e.locale:rO),d=l(r&&c?r.fallbackLocale.value:TC(e.fallbackLocale)||_C(e.fallbackLocale)||RC(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:u.value),p=l(n_(u.value,e)),f=l(RC(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),h=l(RC(e.numberFormats)?e.numberFormats:{[u.value]:{}});let m=r?r.missingWarn:!AC(e.missingWarn)&&!yC(e.missingWarn)||e.missingWarn,v=r?r.fallbackWarn:!AC(e.fallbackWarn)&&!yC(e.fallbackWarn)||e.fallbackWarn,g=r?r.fallbackRoot:!AC(e.fallbackRoot)||e.fallbackRoot,b=!!e.fallbackFormat,y=NC(e.missing)?e.missing:null,w=NC(e.missing)?c_(e.missing):null,k=NC(e.postTranslation)?e.postTranslation:null,x=r?r.warnHtmlMessage:!AC(e.warnHtmlMessage)||e.warnHtmlMessage,E=!!e.escapeParameter;const C=r?r.modifiers:RC(e.modifiers)?e.modifiers:{};let S,O=e.pluralRules||r&&r.pluralRules;S=(()=>{a&&fO(null);const t={version:$O,locale:u.value,fallbackLocale:d.value,messages:p.value,modifiers:C,pluralRules:O,missing:null===w?void 0:w,missingWarn:m,fallbackWarn:v,fallbackFormat:b,unresolving:!0,postTranslation:null===k?void 0:k,warnHtmlMessage:x,escapeParameter:E,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};t.datetimeFormats=f.value,t.numberFormats=h.value,t.__datetimeFormatters=RC(S)?S.__datetimeFormatters:void 0,t.__numberFormatters=RC(S)?S.__numberFormatters:void 0;const n=vO(t);return a&&fO(n),n})(),bO(S,u.value,d.value);const _=t.computed({get:()=>u.value,set:e=>{u.value=e,S.locale=u.value}}),N=t.computed({get:()=>d.value,set:e=>{d.value=e,S.fallbackLocale=d.value,bO(S,u.value,e)}}),T=t.computed((()=>p.value)),A=t.computed((()=>f.value)),M=t.computed((()=>h.value));const I=(e,t,n,o,i,l)=>{let s;u.value,d.value,p.value,f.value,h.value;try{__INTLIFY_PROD_DEVTOOLS__,a||(S.fallbackContext=r?hO():void 0),s=e(S)}finally{__INTLIFY_PROD_DEVTOOLS__,a||(S.fallbackContext=void 0)}if("translate exists"!==n&&gC(s)&&s===nO||"translate exists"===n&&!s){const[e,n]=t();return r&&g?o(r):i(e)}if(l(s))return s;throw qO(KO.UNEXPECTED_RETURN_TYPE)};function P(...e){return I((t=>Reflect.apply(AO,null,[t,...e])),(()=>PO(...e)),"translate",(t=>Reflect.apply(t.t,t,[...e])),(e=>e),(e=>TC(e)))}const L={normalize:function(e){return e.map((e=>TC(e)||gC(e)||AC(e)?a_(String(e)):e))},interpolate:e=>e,type:"vnode"};function R(e){return p.value[e]||{}}s_++,r&&fC&&(t.watch(r.locale,(e=>{c&&(u.value=e,S.locale=e,bO(S,u.value,d.value))})),t.watch(r.fallbackLocale,(e=>{c&&(d.value=e,S.fallbackLocale=e,bO(S,u.value,d.value))})));const B={id:s_,locale:_,fallbackLocale:N,get inheritLocale(){return c},set inheritLocale(e){c=e,e&&r&&(u.value=r.locale.value,d.value=r.fallbackLocale.value,bO(S,u.value,d.value))},get availableLocales(){return Object.keys(p.value).sort()},messages:T,get modifiers(){return C},get pluralRules(){return O||{}},get isGlobal(){return a},get missingWarn(){return m},set missingWarn(e){m=e,S.missingWarn=m},get fallbackWarn(){return v},set fallbackWarn(e){v=e,S.fallbackWarn=v},get fallbackRoot(){return g},set fallbackRoot(e){g=e},get fallbackFormat(){return b},set fallbackFormat(e){b=e,S.fallbackFormat=b},get warnHtmlMessage(){return x},set warnHtmlMessage(e){x=e,S.warnHtmlMessage=e},get escapeParameter(){return E},set escapeParameter(e){E=e,S.escapeParameter=e},t:P,getLocaleMessage:R,setLocaleMessage:function(e,t){if(i){const n={[e]:t};for(const e in n)OC(n,e)&&t_(n[e]);t=n[e]}p.value[e]=t,S.messages=p.value},mergeLocaleMessage:function(e,t){p.value[e]=p.value[e]||{};const n={[e]:t};if(i)for(const r in n)OC(n,r)&&t_(n[r]);jC(t=n[e],p.value[e]),S.messages=p.value},getPostTranslationHandler:function(){return NC(k)?k:null},setPostTranslationHandler:function(e){k=e,S.postTranslation=e},getMissingHandler:function(){return y},setMissingHandler:function(e){null!==e&&(w=c_(e)),y=e,S.missing=w},[JO]:function(e){O=e,S.pluralRules=O}};return B.datetimeFormats=A,B.numberFormats=M,B.rt=function(...e){const[t,n,r]=e;if(r&&!MC(r))throw qO(KO.INVALID_ARGUMENT);return P(t,n,kC({resolvedMessage:!0},r||{}))},B.te=function(e,t){return I((()=>{if(!e)return!1;const n=R(TC(t)?t:u.value),r=S.messageResolver(n,e);return s?null!=r:SO(r)||TO(r)||TC(r)}),(()=>[e]),"translate exists",(n=>Reflect.apply(n.te,n,[e,t])),l_,(e=>AC(e)))},B.tm=function(e){const t=function(e){let t=null;const n=ZS(S,d.value,u.value);for(let r=0;r<n.length;r++){const o=p.value[n[r]]||{},a=S.messageResolver(o,e);if(null!=a){t=a;break}}return t}(e);return null!=t?t:r&&r.tm(e)||{}},B.d=function(...e){return I((t=>Reflect.apply(LO,null,[t,...e])),(()=>BO(...e)),"datetime format",(t=>Reflect.apply(t.d,t,[...e])),(()=>oO),(e=>TC(e)))},B.n=function(...e){return I((t=>Reflect.apply(VO,null,[t,...e])),(()=>FO(...e)),"number format",(t=>Reflect.apply(t.n,t,[...e])),(()=>oO),(e=>TC(e)))},B.getDateTimeFormat=function(e){return f.value[e]||{}},B.setDateTimeFormat=function(e,t){f.value[e]=t,S.datetimeFormats=f.value,DO(S,e,t)},B.mergeDateTimeFormat=function(e,t){f.value[e]=kC(f.value[e]||{},t),S.datetimeFormats=f.value,DO(S,e,t)},B.getNumberFormat=function(e){return h.value[e]||{}},B.setNumberFormat=function(e,t){h.value[e]=t,S.numberFormats=h.value,zO(S,e,t)},B.mergeNumberFormat=function(e,t){h.value[e]=kC(h.value[e]||{},t),S.numberFormats=h.value,zO(S,e,t)},B[QO]=o,B[YO]=function(...e){return I((t=>{let n;const r=t;try{r.processor=L,n=Reflect.apply(AO,null,[r,...e])}finally{r.processor=null}return n}),(()=>PO(...e)),"translate",(t=>t[YO](...e)),(e=>[a_(e)]),(e=>_C(e)))},B[XO]=function(...e){return I((t=>Reflect.apply(LO,null,[t,...e])),(()=>BO(...e)),"datetime format",(t=>t[XO](...e)),i_,(e=>TC(e)||_C(e)))},B[ZO]=function(...e){return I((t=>Reflect.apply(VO,null,[t,...e])),(()=>FO(...e)),"number format",(t=>t[ZO](...e)),i_,(e=>TC(e)||_C(e)))},B}function d_(e={},t){{const t=u_(function(e){const t=TC(e.locale)?e.locale:rO,n=TC(e.fallbackLocale)||_C(e.fallbackLocale)||RC(e.fallbackLocale)||!1===e.fallbackLocale?e.fallbackLocale:t,r=NC(e.missing)?e.missing:void 0,o=!AC(e.silentTranslationWarn)&&!yC(e.silentTranslationWarn)||!e.silentTranslationWarn,a=!AC(e.silentFallbackWarn)&&!yC(e.silentFallbackWarn)||!e.silentFallbackWarn,i=!AC(e.fallbackRoot)||e.fallbackRoot,l=!!e.formatFallbackMessages,s=RC(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=NC(e.postTranslation)?e.postTranslation:void 0,d=!TC(e.warnHtmlInMessage)||"off"!==e.warnHtmlInMessage,p=!!e.escapeParameterHtml,f=!AC(e.sync)||e.sync;let h=e.messages;if(RC(e.sharedMessages)){const t=e.sharedMessages;h=Object.keys(t).reduce(((e,n)=>{const r=e[n]||(e[n]={});return kC(r,t[n]),e}),h||{})}const{__i18n:m,__root:v,__injectWithOption:g}=e,b=e.datetimeFormats,y=e.numberFormats,w=e.flatJson,k=e.translateExistCompatible;return{locale:t,fallbackLocale:n,messages:h,flatJson:w,datetimeFormats:b,numberFormats:y,missing:r,missingWarn:o,fallbackWarn:a,fallbackRoot:i,fallbackFormat:l,modifiers:s,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:p,messageResolver:e.messageResolver,inheritLocale:f,translateExistCompatible:k,__i18n:m,__root:v,__injectWithOption:g}}(e)),{__extender:n}=e,r={id:t.id,get locale(){return t.locale.value},set locale(e){t.locale.value=e},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(e){t.fallbackLocale.value=e},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get formatter(){return{interpolate:()=>[]}},set formatter(e){},get missing(){return t.getMissingHandler()},set missing(e){t.setMissingHandler(e)},get silentTranslationWarn(){return AC(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(e){t.missingWarn=AC(e)?!e:e},get silentFallbackWarn(){return AC(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(e){t.fallbackWarn=AC(e)?!e:e},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(e){t.fallbackFormat=e},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(e){t.setPostTranslationHandler(e)},get sync(){return t.inheritLocale},set sync(e){t.inheritLocale=e},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(e){t.warnHtmlMessage="off"!==e},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(e){t.escapeParameter=e},get preserveDirectiveContent(){return!0},set preserveDirectiveContent(e){},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...e){const[n,r,o]=e,a={};let i=null,l=null;if(!TC(n))throw qO(KO.INVALID_ARGUMENT);const s=n;return TC(r)?a.locale=r:_C(r)?i=r:RC(r)&&(l=r),_C(o)?i=o:RC(o)&&(l=o),Reflect.apply(t.t,t,[s,i||l||{},a])},rt:(...e)=>Reflect.apply(t.rt,t,[...e]),tc(...e){const[n,r,o]=e,a={plural:1};let i=null,l=null;if(!TC(n))throw qO(KO.INVALID_ARGUMENT);const s=n;return TC(r)?a.locale=r:gC(r)?a.plural=r:_C(r)?i=r:RC(r)&&(l=r),TC(o)?a.locale=o:_C(o)?i=o:RC(o)&&(l=o),Reflect.apply(t.t,t,[s,i||l||{},a])},te:(e,n)=>t.te(e,n),tm:e=>t.tm(e),getLocaleMessage:e=>t.getLocaleMessage(e),setLocaleMessage(e,n){t.setLocaleMessage(e,n)},mergeLocaleMessage(e,n){t.mergeLocaleMessage(e,n)},d:(...e)=>Reflect.apply(t.d,t,[...e]),getDateTimeFormat:e=>t.getDateTimeFormat(e),setDateTimeFormat(e,n){t.setDateTimeFormat(e,n)},mergeDateTimeFormat(e,n){t.mergeDateTimeFormat(e,n)},n:(...e)=>Reflect.apply(t.n,t,[...e]),getNumberFormat:e=>t.getNumberFormat(e),setNumberFormat(e,n){t.setNumberFormat(e,n)},mergeNumberFormat(e,n){t.mergeNumberFormat(e,n)},getChoiceIndex:(e,t)=>-1};return r.__extender=n,r}}const p_={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>"parent"===e||"global"===e,default:"parent"},i18n:{type:Object}};function f_(e){return t.Fragment}const h_=t.defineComponent({name:"i18n-t",props:kC({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>gC(e)||!isNaN(e)}},p_),setup(e,n){const{slots:r,attrs:o}=n,a=e.i18n||E_({useScope:e.scope,__useComponent:!0});return()=>{const i=Object.keys(r).filter((e=>"_"!==e)),l={};e.locale&&(l.locale=e.locale),void 0!==e.plural&&(l.plural=TC(e.plural)?+e.plural:e.plural);const s=function({slots:e},n){if(1===n.length&&"default"===n[0])return(e.default?e.default():[]).reduce(((e,n)=>[...e,...n.type===t.Fragment?n.children:[n]]),[]);return n.reduce(((t,n)=>{const r=e[n];return r&&(t[n]=r()),t}),{})}(n,i),c=a[YO](e.keypath,s,l),u=kC({},o),d=TC(e.tag)||MC(e.tag)?e.tag:f_();return t.h(d,u,c)}}});function m_(e,n,r,o){const{slots:a,attrs:i}=n;return()=>{const n={part:!0};let l={};e.locale&&(n.locale=e.locale),TC(e.format)?n.key=e.format:MC(e.format)&&(TC(e.format.key)&&(n.key=e.format.key),l=Object.keys(e.format).reduce(((t,n)=>r.includes(n)?kC({},t,{[n]:e.format[n]}):t),{}));const s=o(e.value,n,l);let c=[n.key];_C(s)?c=s.map(((e,t)=>{const n=a[e.type],r=n?n({[e.type]:e.value,index:t,parts:s}):[e.value];var o;return _C(o=r)&&!TC(o[0])&&(r[0].key=`${e.type}-${t}`),r})):TC(s)&&(c=[s]);const u=kC({},i),d=TC(e.tag)||MC(e.tag)?e.tag:f_();return t.h(d,u,c)}}const v_=t.defineComponent({name:"i18n-n",props:kC({value:{type:Number,required:!0},format:{type:[String,Object]}},p_),setup(e,t){const n=e.i18n||E_({useScope:e.scope,__useComponent:!0});return m_(e,t,jO,((...e)=>n[ZO](...e)))}}),g_=t.defineComponent({name:"i18n-d",props:kC({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},p_),setup(e,t){const n=e.i18n||E_({useScope:e.scope,__useComponent:!0});return m_(e,t,RO,((...e)=>n[XO](...e)))}});function b_(e){if(TC(e))return{path:e};if(RC(e)){if(!("path"in e))throw qO(KO.REQUIRED_VALUE);return e}throw qO(KO.INVALID_VALUE)}function y_(e){const{path:t,locale:n,args:r,choice:o,plural:a}=e,i={},l=r||{};return TC(n)&&(i.locale=n),gC(o)&&(i.plural=o),gC(a)&&(i.plural=a),[t,l,i]}function w_(e,n,...r){const o=RC(r[0])?r[0]:{},a=!!o.useI18nComponentName;(!AC(o.globalInstall)||o.globalInstall)&&([a?"i18n":h_.name,"I18nT"].forEach((t=>e.component(t,h_))),[v_.name,"I18nN"].forEach((t=>e.component(t,v_))),[g_.name,"I18nD"].forEach((t=>e.component(t,g_)))),e.directive("t",function(e){const n=t=>{const{instance:n,modifiers:r,value:o}=t;if(!n||!n.$)throw qO(KO.UNEXPECTED_ERROR);const a=function(e,t){const n=e;if("composition"===e.mode)return n.__getInstance(t)||e.global;{const r=n.__getInstance(t);return null!=r?r.__composer:e.global.__composer}}(e,n.$),i=b_(o);return[Reflect.apply(a.t,a,[...y_(i)]),a]};return{created:(r,o)=>{const[a,i]=n(o);fC&&e.global===i&&(r.__i18nWatcher=t.watch(i.locale,(()=>{o.instance&&o.instance.$forceUpdate()}))),r.__composer=i,r.textContent=a},unmounted:e=>{fC&&e.__i18nWatcher&&(e.__i18nWatcher(),e.__i18nWatcher=void 0,delete e.__i18nWatcher),e.__composer&&(e.__composer=void 0,delete e.__composer)},beforeUpdate:(e,{value:t})=>{if(e.__composer){const n=e.__composer,r=b_(t);e.textContent=Reflect.apply(n.t,n,[...y_(r)])}},getSSRProps:e=>{const[t]=n(e);return{textContent:t}}}}(n))}function k_(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[JO](t.pluralizationRules||e.pluralizationRules);const n=n_(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(n).forEach((t=>e.mergeLocaleMessage(t,n[t]))),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach((n=>e.mergeDateTimeFormat(n,t.datetimeFormats[n]))),t.numberFormats&&Object.keys(t.numberFormats).forEach((n=>e.mergeNumberFormat(n,t.numberFormats[n]))),e}const x_=hC("global-vue-i18n");function E_(e={}){const n=t.getCurrentInstance();if(null==n)throw qO(KO.MUST_BE_CALL_SETUP_TOP);if(!n.isCE&&null!=n.appContext.app&&!n.appContext.app.__VUE_I18N_SYMBOL__)throw qO(KO.NOT_INSTALLED);const r=function(e){{const n=t.inject(e.isCE?x_:e.appContext.app.__VUE_I18N_SYMBOL__);if(!n)throw qO(e.isCE?KO.NOT_INSTALLED_WITH_PROVIDE:KO.UNEXPECTED_ERROR);return n}}(n),o=function(e){return"composition"===e.mode?e.global:e.global.__composer}(r),a=r_(n),i=function(e,t){return wC(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}(e,a);if(__VUE_I18N_LEGACY_API__&&"legacy"===r.mode&&!e.__useComponent){if(!r.allowComposition)throw qO(KO.NOT_AVAILABLE_IN_LEGACY_MODE);return function(e,n,r,o={}){const a="local"===n,i=t.shallowRef(null);if(a&&e.proxy&&!e.proxy.$options.i18n&&!e.proxy.$options.__i18n)throw qO(KO.MUST_DEFINE_I18N_OPTION_IN_ALLOW_COMPOSITION);const l=AC(o.inheritLocale)?o.inheritLocale:!TC(o.locale),s=t.ref(!a||l?r.locale.value:TC(o.locale)?o.locale:rO),c=t.ref(!a||l?r.fallbackLocale.value:TC(o.fallbackLocale)||_C(o.fallbackLocale)||RC(o.fallbackLocale)||!1===o.fallbackLocale?o.fallbackLocale:s.value),u=t.ref(n_(s.value,o)),d=t.ref(RC(o.datetimeFormats)?o.datetimeFormats:{[s.value]:{}}),p=t.ref(RC(o.numberFormats)?o.numberFormats:{[s.value]:{}}),f=a?r.missingWarn:!AC(o.missingWarn)&&!yC(o.missingWarn)||o.missingWarn,h=a?r.fallbackWarn:!AC(o.fallbackWarn)&&!yC(o.fallbackWarn)||o.fallbackWarn,m=a?r.fallbackRoot:!AC(o.fallbackRoot)||o.fallbackRoot,v=!!o.fallbackFormat,g=NC(o.missing)?o.missing:null,b=NC(o.postTranslation)?o.postTranslation:null,y=a?r.warnHtmlMessage:!AC(o.warnHtmlMessage)||o.warnHtmlMessage,w=!!o.escapeParameter,k=a?r.modifiers:RC(o.modifiers)?o.modifiers:{},x=o.pluralRules||a&&r.pluralRules;function E(){return[s.value,c.value,u.value,d.value,p.value]}const C=t.computed({get:()=>i.value?i.value.locale.value:s.value,set:e=>{i.value&&(i.value.locale.value=e),s.value=e}}),S=t.computed({get:()=>i.value?i.value.fallbackLocale.value:c.value,set:e=>{i.value&&(i.value.fallbackLocale.value=e),c.value=e}}),O=t.computed((()=>i.value?i.value.messages.value:u.value)),_=t.computed((()=>d.value)),N=t.computed((()=>p.value));function T(){return i.value?i.value.getPostTranslationHandler():b}function A(e){i.value&&i.value.setPostTranslationHandler(e)}function M(){return i.value?i.value.getMissingHandler():g}function I(e){i.value&&i.value.setMissingHandler(e)}function P(e){return E(),e()}function L(...e){return i.value?P((()=>Reflect.apply(i.value.t,null,[...e]))):P((()=>""))}function R(...e){return i.value?Reflect.apply(i.value.rt,null,[...e]):""}function B(...e){return i.value?P((()=>Reflect.apply(i.value.d,null,[...e]))):P((()=>""))}function D(...e){return i.value?P((()=>Reflect.apply(i.value.n,null,[...e]))):P((()=>""))}function V(e){return i.value?i.value.tm(e):{}}function j(e,t){return!!i.value&&i.value.te(e,t)}function F(e){return i.value?i.value.getLocaleMessage(e):{}}function z(e,t){i.value&&(i.value.setLocaleMessage(e,t),u.value[e]=t)}function $(e,t){i.value&&i.value.mergeLocaleMessage(e,t)}function H(e){return i.value?i.value.getDateTimeFormat(e):{}}function U(e,t){i.value&&(i.value.setDateTimeFormat(e,t),d.value[e]=t)}function W(e,t){i.value&&i.value.mergeDateTimeFormat(e,t)}function G(e){return i.value?i.value.getNumberFormat(e):{}}function K(e,t){i.value&&(i.value.setNumberFormat(e,t),p.value[e]=t)}function q(e,t){i.value&&i.value.mergeNumberFormat(e,t)}const Y={get id(){return i.value?i.value.id:-1},locale:C,fallbackLocale:S,messages:O,datetimeFormats:_,numberFormats:N,get inheritLocale(){return i.value?i.value.inheritLocale:l},set inheritLocale(e){i.value&&(i.value.inheritLocale=e)},get availableLocales(){return i.value?i.value.availableLocales:Object.keys(u.value)},get modifiers(){return i.value?i.value.modifiers:k},get pluralRules(){return i.value?i.value.pluralRules:x},get isGlobal(){return!!i.value&&i.value.isGlobal},get missingWarn(){return i.value?i.value.missingWarn:f},set missingWarn(e){i.value&&(i.value.missingWarn=e)},get fallbackWarn(){return i.value?i.value.fallbackWarn:h},set fallbackWarn(e){i.value&&(i.value.missingWarn=e)},get fallbackRoot(){return i.value?i.value.fallbackRoot:m},set fallbackRoot(e){i.value&&(i.value.fallbackRoot=e)},get fallbackFormat(){return i.value?i.value.fallbackFormat:v},set fallbackFormat(e){i.value&&(i.value.fallbackFormat=e)},get warnHtmlMessage(){return i.value?i.value.warnHtmlMessage:y},set warnHtmlMessage(e){i.value&&(i.value.warnHtmlMessage=e)},get escapeParameter(){return i.value?i.value.escapeParameter:w},set escapeParameter(e){i.value&&(i.value.escapeParameter=e)},t:L,getPostTranslationHandler:T,setPostTranslationHandler:A,getMissingHandler:M,setMissingHandler:I,rt:R,d:B,n:D,tm:V,te:j,getLocaleMessage:F,setLocaleMessage:z,mergeLocaleMessage:$,getDateTimeFormat:H,setDateTimeFormat:U,mergeDateTimeFormat:W,getNumberFormat:G,setNumberFormat:K,mergeNumberFormat:q};function X(e){e.locale.value=s.value,e.fallbackLocale.value=c.value,Object.keys(u.value).forEach((t=>{e.mergeLocaleMessage(t,u.value[t])})),Object.keys(d.value).forEach((t=>{e.mergeDateTimeFormat(t,d.value[t])})),Object.keys(p.value).forEach((t=>{e.mergeNumberFormat(t,p.value[t])})),e.escapeParameter=w,e.fallbackFormat=v,e.fallbackRoot=m,e.fallbackWarn=h,e.missingWarn=f,e.warnHtmlMessage=y}return t.onBeforeMount((()=>{if(null==e.proxy||null==e.proxy.$i18n)throw qO(KO.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const t=i.value=e.proxy.$i18n.__composer;"global"===n?(s.value=t.locale.value,c.value=t.fallbackLocale.value,u.value=t.messages.value,d.value=t.datetimeFormats.value,p.value=t.numberFormats.value):a&&X(t)})),Y}(n,i,o,e)}if("global"===i)return o_(o,e,a),o;if("parent"===i){let t=function(e,t,n=!1){let r=null;const o=t.root;let a=function(e,t=!1){if(null==e)return null;return t&&e.vnode.ctx||e.parent}(t,n);for(;null!=a;){const t=e;if("composition"===e.mode)r=t.__getInstance(a);else if(__VUE_I18N_LEGACY_API__){const e=t.__getInstance(a);null!=e&&(r=e.__composer,n&&r&&!r[QO]&&(r=null))}if(null!=r)break;if(o===a)break;a=a.parent}return r}(r,n,e.__useComponent);return null==t&&(t=o),t}const l=r;let s=l.__getInstance(n);if(null==s){const r=kC({},e);"__i18n"in a&&(r.__i18n=a.__i18n),o&&(r.__root=o),s=u_(r),l.__composerExtend&&(s[e_]=l.__composerExtend(s)),function(e,n,r){t.onMounted((()=>{}),n),t.onUnmounted((()=>{const t=r;e.__deleteInstance(n);const o=t[e_];o&&(o(),delete t[e_])}),n)}(l,n,s),l.__setInstance(n,s)}return s}const C_=["locale","fallbackLocale","availableLocales"],S_=["t","rt","d","n","tm","te"];var O_;if("boolean"!=typeof __VUE_I18N_FULL_INSTALL__&&(EC().__VUE_I18N_FULL_INSTALL__=!0),"boolean"!=typeof __VUE_I18N_LEGACY_API__&&(EC().__VUE_I18N_LEGACY_API__=!0),"boolean"!=typeof __INTLIFY_JIT_COMPILATION__&&(EC().__INTLIFY_JIT_COMPILATION__=!1),"boolean"!=typeof __INTLIFY_DROP_MESSAGE_COMPILER__&&(EC().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),"boolean"!=typeof __INTLIFY_PROD_DEVTOOLS__&&(EC().__INTLIFY_PROD_DEVTOOLS__=!1),__INTLIFY_JIT_COMPILATION__?cO((function(e,t){if(__INTLIFY_JIT_COMPILATION__&&!__INTLIFY_DROP_MESSAGE_COMPILER__&&TC(e)){!AC(t.warnHtmlMessage)||t.warnHtmlMessage;const n=(t.onCacheKey||EO)(e),r=CO[n];if(r)return r;const{ast:o,detectError:a}=OO(e,{...t,location:!1,jit:!0}),i=wO(o);return a?i:CO[n]=i}{const t=e.cacheKey;if(t){return CO[t]||(CO[t]=wO(e))}return wO(e)}})):cO(_O),lO=function(e,t){if(!MC(e))return null;let n=NS.get(t);if(n||(n=function(e){const t=[];let n,r,o,a,i,l,s,c=-1,u=0,d=0;const p=[];function f(){const t=e[c+1];if(5===u&&"'"===t||6===u&&'"'===t)return c++,o="\\"+t,p[0](),!0}for(p[0]=()=>{void 0===r?r=o:r+=o},p[1]=()=>{void 0!==r&&(t.push(r),r=void 0)},p[2]=()=>{p[0](),d++},p[3]=()=>{if(d>0)d--,u=4,p[0]();else{if(d=0,void 0===r)return!1;if(r=_S(r),!1===r)return!1;p[1]()}};null!==u;)if(c++,n=e[c],"\\"!==n||!f()){if(a=OS(n),s=CS[u],i=s[a]||s.l||8,8===i)return;if(u=i[0],void 0!==i[1]&&(l=p[i[1]],l&&(o=n,!1===l())))return;if(7===u)return t}}(t),n&&NS.set(t,n)),!n)return null;const r=n.length;let o=e,a=0;for(;a<r;){const e=o[n[a]];if(void 0===e)return null;if(NC(o))return null;o=e,a++}return o},sO=ZS,__INTLIFY_PROD_DEVTOOLS__){const e=EC();e.__INTLIFY__=!0,O_=e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__,DS=O_}const __={toolbar:{ribbon:"专业工具栏",classic:"经典工具栏",toggle:"切换工具栏",show:"显示工具栏",hide:"隐藏工具栏",source:"编辑源代码",base:"开始",insert:"插入",table:"表格",tools:"工具",page:"页面",export:"导出"},base:{align:{title:"对齐方式",left:"左对齐",center:"居中对齐",right:"右对齐",justify:"两端对齐",distributed:"分散对齐"},bgColor:"字体背景颜色",bold:"粗体",clearFormat:"清除文本格式",code:"代码",color:"字体颜色",fontFamily:{text:"选择字体",all:"常用字体",recent:"最近使用",used:"已使用字体",unsupport:"可能无法正常显示该字体,可能是本机未安装该字体"},fontSize:{text:"字体大小",increase:"增大字号",decrease:"减小字号",default:"默认","42pt":"初号","36pt":"小初","26pt":"一号","24pt":"小一","22pt":"二号","18pt":"小二","16pt":"三号","15pt":"小三","14pt":"四号","12pt":"小四","10_5pt":"五号","9pt":"小五","7_5pt":"小六","6_5pt":"默认"},formatPaint:{text:"格式刷",tip:"格式刷: 双击可重复使用"},heading:{text:"标题 {level}",paragraph:"正文",tip:"设置标题,可依据标题生成大纲"},highlight:{text:"高亮显示",clear:"清除高亮显示",yellowBg:"黄色背景",purpleBg:"紫色背景",greenBg:"绿色背景",blueBg:"蓝色背景",red:"红色字体",green:"绿色字体"},indent:"增加缩进",italic:"斜体",lineHeight:{text:"行高",default:" (默认)"},outdent:"减少缩进",markdown:{text:"Markdown",enable:"开启 Markdown 模式",disable:"关闭 Markdown 模式",message:"此操作会重置编辑器,切换后当前历史记录会丢失,将无法进行“撤回”等操作,确定要现在切换吗?",toggle:"立即切换"},quote:"引用",redo:"重做",selectAll:"全选",strike:"中划线",subscript:"下标",superscript:"上标",underline:"下划线",undo:"撤消"},insert:{audio:"音频",codeBlock:"代码块",date:"日期",emoji:"表情",file:"文件",hardBreak:"换行符",hr:{text:"分隔线",title:"分割线类型",color:"分割线颜色",signle:"细线",double:"双细线",dotted:"点线",dashed:"虚线",dashedDouble:"双虚线",signleBold:"粗线",doubleBoldTop:"粗细线",doubleBoldBottom:"细粗线",wavy:"波浪线"},image:"图片",link:{text:"链接",title:"插入链接",insert:"插入",hrefText:"链接文本:",hrefTextTip:"请输入或选中链接文本",href:"链接地址:",hrefTip:"请输入链接地址,一般以 http:// 或 https:// 开头"},math:"数学公式",symbol:"特殊字符",template:"模板",textBox:"文本框",toc:"页面大纲",video:"视频",web:{text:"网页",insert:"插入",title:"插入网页",tip:"某些网页可能不支持嵌入。",placeholder:"请输入网页地址,以 http:// 或 https:// 开头"}},table:{addColumnAfter:"插入列(右)",addColumnBefore:"插入列(左)",addRowAfter:"插入行(后)",addRowBefore:"插入行(前)",borderColor:"边框颜色",cellAlign:{text:"对齐方式",tip:"单元格对齐方式",lt:"靠上左对齐",ct:"靠上居中对齐",rt:"靠上右对齐",jt:"靠上两端对齐",lm:"中间左对齐",cm:"中间居中对齐",rm:"中间右对齐",jm:"中间两端对齐",lb:"靠下左对齐",cb:"靠下居中对齐",rb:"靠下右对齐",jb:"靠下两端对齐"},cellBgColor:{text:"背景颜色",tip:"单元格背景颜色"},deleteColumn:{text:"删除列",title:"删除表格列",message:"此操作会删除当前选中的表格列,是否继续?",delete:"立即删除",success:"删除成功"},deleteRow:{text:"删除行",title:"删除表格行",message:"此操作会删除当前选中的表格行,是否继续?",delete:"立即删除",success:"删除成功"},delete:{text:"删除表格",title:"删除当前表格",message:"此操作会删除当前选中的表格行,是否继续?",delete:"立即删除",success:"删除成功"},fix:{text:"修复",tip:"当表格有错乱时,点击此按钮可自动修复表格"},insert:{text:"插入表格",tip:"插入新表格",property:"表格属性",withHeader:"包含表格",rows:"行数:",cols:"列数:",create:"创建表格"},mergeCells:"合并单元格",nextCell:"下一个单元格",prevCell:"上一个单元格",splitCell:"拆分单元格",toggleHeaderCell:"切换表头单元格",toggleHeaderRow:"切换表头行",toggleHeaderColumn:"切换表头列"},tools:{barcode:{text:"条形码",edit:"编辑条形码",title:"条形码生成",format:"条形码标准",font:"文字字体",lineColor:"条形码及文字颜色",bgColor:"条形码背景颜色",more:"更多",width:"单个条形的宽度:",height:"条形码的高度:",margin:"条形码四周留白:",displayValue:"是否显示文字",displayValueText:"显示文字",textContent:"文字内容:",textContentTip:"填写后会覆盖条形码内容文本",textPosition:"文字所在位置:",top:"顶部",bottom:"底部",textMargin:"文字上下距离:",fontSize:"文字字体大小:",placeholder:"请输入要转化成条形码的内容",error:"您输入的内容可能不符合当前选择的条形码规范约束,请检查。",preview:"预览",renderError:"当前无预览内容",notEmpty:"条形码内容不能为空"},chineseCase:{text:"中文大小写",tip:"中文大小写"},diagrams:{text:"流程图",edit:"编辑流程图",loading:"加载中..."},mermaid:{text:"Mermaid",edit:"编辑 Mermaid",placeholder:"请输入 Mermaid 代码",preview:"预览",notEmpty:"Mermaid 内容不能为空"},mindMap:"思维导图",qrcode:{text:"二维码",edit:"编辑二维码",level:"二维码容错能力",levelL:"低",levelM:"中",levelQ:"高",levelH:"最高",padding:"四周留白:",paddingTip:"二维码四周留白大小",width:"宽高度:",widthTip:"二维码的宽度和高度",color:"二维码颜色",bgColor:"二维码背景颜色",placeholder:"请输入要转化成二维码的内容",preview:"预览",renderError:"二维码生成失败",notEmpty:"二维码内容不能为空"},seal:{text:"电子签章",title:"插入电子签章",insert:"插入",tip:"选择纯色背景电子章的影印件或者照片,将自动扣取电子章,所有操作在本地完成,不会向服务器发送数据,请放心使用。",insertTip:"点击此处选择电子章图片",converting1:"正在加载组件...",converting2:"正在加载组件: {ppercentage}%",converting3:"正在抠图中,请稍后...",convertError:"电子章抠取失败,请重试",notEmpty:"请选择电子章"},signature:{text:"电子签名",title:"插入电子签名",clear:"清空画布",lineWidth:"画笔粗细",tip:"请在当前区域签名",notEmpty:"没有检测到您的签名"}},page:{bg:{text:"页面背景",custom:"自定义页面背景",default:"默认背景",color1:"护眼绿",color2:"淡雅黄",color3:"云水蓝",color4:"天空蓝",color5:"暗夜黑"},breakMarks:"显示换行",break:"分页符",footer:"页脚",header:"页眉",lineNumber:"显示行号",margin:"页边距",orientation:{text:"页面方向",landscape:"横向",portrait:"纵向"},preview:"演示模式",size:{text:"页面大小",cm:"厘米",custom:"自定义设置"},watermark:{text:"页面水印",fontFamily:"水印文字字体",fontSize:"水印文字大小",fontColor:"水印文字颜色",content:"水印文字内容",type:"水印类型",compact:"紧凑型",spacious:"宽松型",clear:"清除水印"}},export:{embed:{text:"Embed",title:"Embed 嵌入",tip:"复制后,请手动修改 iframe 的宽度和高度,以便获得更好的浏览效果。",copy:"复制",copied:"代码已复制到剪切板"},image:{text:"图片",jpg:"JPG 格式",png:"PNG 格式",error:{title:"错误提示",message:"导出图片失败,请重试或尝试刷新页面。"}},share:{text:"分享文档",tip:"复制链接发给需要分享的人。",copy:"复制链接",copied:"链接已复制到剪切板"},text:"文本文档"},list:{bullet:{text:"无序列表",disc:"实心圆点",circle:"空心圆点",square:"实心方块"},ordered:{text:"有序列表",property:"列表属性",startAt:"起始编号:",decimal:"数字",decimalLeadingZero:"以 0 的开头的数字",lowerRoman:"小写罗马数字",upperRoman:"大写罗马数字",lowerLatin:"小写英文编号",upperLatin:"大写英文编号",tradChineseInformal:"中文编号",simpChineseFormal:"大写中文编号"},task:{text:"待办事项",split:"增加任务",sink:"设为子任务",lift:"移除任务"}},colorPicker:{default:"默认颜色",standard:"标准色",recent:"最近使用",more:"更多颜色"},blockMenu:{insert:"插入新节点",select:"选择节点",template:"插入模板",toogleNode:"切换节点类型",other:"其他操作",delete:"删除节点"},bubbleMenu:{code:{copy:{text:"复制代码",success:"代码已复制到剪贴板"},languages:"语言列表",lineNumbers:"显示行号",themes:{text:"主题",light:"浅色主题",dark:"深色主题"},wordWrap:"自动换行"},delete:"删除",file:{download:"下载文件"},image:{download:"下载图片",draggable:"图片浮动",flipX:"水平翻转",flipY:"垂直翻转",preview:"预览图片",proportion:"锁定图片缩放比例",removeBg:"去除图片背景",removingBg:"正在去除图片背景...",reset:"重置图片位置",rotateCC:"逆时针旋转90度",rotateC:"顺时针旋转90度"}},pageOptions:{title:"页面设置",size:{text:"页面尺寸",width:"宽:",height:"高:",custom:"自定义"},margin:{text:"页面边距",default:"默认",narrow:"窄",moderate:"适中",wide:"宽",top:"上:",right:"右:",bottom:"下:",left:"左:"}},source:{loading:"正在加载编辑器..."},document:{untitled:"未命名文档"},search:{text:"查找替换",title:"查找和替换",searchText:"要查找的字符",replaceText:"要替换的字符",caseSensitive:"区分大小写(英文)",search:"查找",replace:"替换",replaceAll:"全部替换"},toc:{title:"页面大纲",show:"显示大纲",hide:"隐藏大纲",empty:"暂无页面大纲"},spellcheck:{enable:"开启拼写检查",disable:"关闭拼写检查"},pageBreak:{title:"分页模式",disable:"退出费用模式"},shortcut:{title:"快捷键列表",text:"文字",commonlyUsed:"常用快捷键",copy:"复制",paste:"粘贴",pasteAsText:"粘贴为纯文本",paragraph:"插入新段落",hardBreak:"换行",format:"文字格式",page:"页面显示",pageZoomIn:"页面放大",pageZoomOut:"页面缩小",pageZoomReset:"缩放到初始比例",pageAutoWidth:"缩放到最佳比例",markdown:"Markdown 格式"},changeLocale:{title:"切换语言",message:"切换语言后,页面将刷新,请先保存文档内容,确定要现在切换吗?",confirm:"立即切换"},resetAll:{title:"重置编辑器",message:"此操作会清空所有的编辑器设置数据,包括当前编辑的内容,并刷新页面,建议保存内容后再重置,确定要现在重置吗?",reset:"立即重置"},feedback:"使用感受和建议反馈",poweredBy:"由「有墨文档」提供技术支持",wordCount:{input:"已输入 {count} 字符,",limit:"总计不能超过 {count} 字符,",selected:"已选中 {count} 字符"},preview:{title:"演示模式",disable:"关闭演示模式",laserPointer:"激光笔",exit:"退出"},fullscreen:{title:"全屏模式",disable:"退出全屏"},zoom:{zoomIn:"增加缩放",zoomOut:"减小缩放",level:"当前缩放比例:",autoWidth:"最佳宽度",autoWidthError:"页面自动宽度计算出错",reset:"快速设置为 100%"},node:{codeBlock:{menu:"菜单栏"},image:{loading:"加载中...",error:"图片加载错误"},textBox:{tip:"双击进行编辑"}},file:{uploading:"文件上传中...",download:"下载文件",limit:"文件”{filename}“大小超过 {size}MB 的限制",notAllow:{title:"错误提示",message:"当前文档不允许插入该类型的文件。"}},save:{text:"保存文档",saved:"文档已保存",unsaved:"文档未保存",network:"网络状态:",online:"在线",offline:"离线",saving:"正在保存文档...",savedAt:"保存时间:",savedAtText:"{time}保存",failed:"文档保存失败",success:"文档保存成功",error:"文档保存出错",cache:{text:"从缓存中恢复",error:{title:"错误提示",message:"当前缓存中没有内容!"}}},print:{text:"打印",title:"打印文档",preview:"页面预览",closePreview:"关闭页面预览",settings:"打印设置",singleColumn:"单列显示页面",showPageNumber:"打印时包含页码",loading:"页面加载中...",page:"第 ' counter(page) ' 页 / 共 ' counter(pages) ' 页"},time:{justNow:"刚刚",past:"{n}前",yesterday:"昨天",day:"{n} 天",hour:"{n} 小时",minute:"{n} 分钟",second:"{n} 秒"},dialog:{cancel:"取消"}},N_={toolbar:{ribbon:"Professional",classic:"Classic",toggle:"Toolbar",show:"Show Toolbar",hide:"Hide Toolbar",source:"Edit Source Code",base:"Home",insert:"Insert",table:"Table",tools:"Tools",page:"Page",export:"Export"},base:{align:{title:"Alignment",left:"Left",center:"Center",right:"Right",justify:"Justify",distributed:"Distributed"},bgColor:"Background Color of Text",bold:"Bold",clearFormat:"Clear Text Formatting",code:"Code",color:"Font Color",fontFamily:{text:"Select Font",all:"Common Fonts",recent:"Recently Used",used:"Used Fonts",unsupport:"This font may not display properly, possibly due to it not being installed on this device"},fontSize:{text:"Font Size",increase:"Increase Font Size",decrease:"Decrease Font Size",default:"Default","42pt":"First","36pt":"Sub-first","26pt":"First Level","24pt":"Sub-first Level","22pt":"Second Level","18pt":"Sub-second Level","16pt":"Third Level","15pt":"Sub-third Level","14pt":"Fourth Level","12pt":"Sub-fourth Level","10_5pt":"Fifth Level","9pt":"Sub-fifth Level","7_5pt":"Sub-sixth Level","6_5pt":"Default"},formatPaint:{text:"Format Painter",tip:"Double click to reuse"},heading:{text:"Title {level}",paragraph:"Normal",tip:"Set heading, can generate document map based on headings"},highlight:{text:"Highlight",clear:"Clear Highlight",yellowBg:"Yellow Background",purpleBg:"Purple Background",greenBg:"Green Background",blueBg:"Blue Background",red:"Red Text",green:"Green Text"},indent:"Increase Indent",italic:"Italic",lineHeight:{text:"Line Height",default:" (Default)"},outdent:"Decrease Indent",markdown:{text:"Markdown",enable:"Enable Markdown",disable:"Disable Markdown",message:"This action will reset the editor, and after switching, current history will be lost, unable to undo, etc. Confirm now?",toggle:"Switch Now"},quote:"Quote",redo:"Redo",selectAll:"Select All",strike:"Strikethrough",subscript:"Subscript",superscript:"Superscript",underline:"Underline",undo:"Undo"},insert:{audio:"Audio",codeBlock:"Code Block",date:"Chinese Date",emoji:"Emoji",file:"File",hardBreak:"Line Break",hr:{text:"Divider",title:"Divider Style",color:"Divider Color",signle:"Single Line",double:"Double Thin Lines",dotted:"Dotted Line",dashed:"Dashed Line",dashedDouble:"Double Dashed Line",signleBold:"Thick Line",doubleBoldTop:"Thick & Thin Lines (Top)",doubleBoldBottom:"Thin & Thick Lines (Bottom)",wavy:"Wavy Line"},image:"Image",link:{text:"Link",title:"Insert Link",insert:"Insert",hrefText:"Link Text:",hrefTextTip:"Enter or select link text",href:"Link URL:",hrefTip:"Enter the link URL, usually starting with http:// or https://"},math:"Mathematics",symbol:"Symbol",template:"Template",textBox:"Text Box",toc:"Document Map",video:"Video",web:{text:"Web Page",insert:"Insert",title:"Insert Web Page",tip:"Some web pages may not support embedding.",placeholder:"Enter a web address, starting with http:// or https://"}},table:{addColumnAfter:"Insert Column After",addColumnBefore:"Insert Column Before",addRowAfter:"Insert Row Below",addRowBefore:"Insert Row Above",borderColor:"Border Color",cellAlign:{text:"Alignment",tip:"Cell Alignment",lt:"Top Left",ct:"Top Center",rt:"Top Right",jt:"Top Justify",lm:"Middle Left",cm:"Middle Center",rm:"Middle Right",jm:"Middle Justify",lb:"Bottom Left",cb:"Bottom Center",rb:"Bottom Right",jb:"Bottom Justify"},cellBgColor:{text:"Background",tip:"Cell Background Color"},deleteColumn:{text:"Delete Column",title:"Delete Table Column",message:"This operation will delete the selected table column. Continue?",delete:"Delete Now",success:"Deleted Successfully"},deleteRow:{text:"Delete Row",title:"Delete Table Row",message:"This operation will delete the selected table row. Continue?",delete:"Delete Now",success:"Deleted Successfully"},delete:{text:"Delete Table",title:"Delete Current Table",message:"This operation will delete the selected table. Continue?",delete:"Delete Now",success:"Deleted Successfully"},fix:{text:"Fix Table",tip:"Click to automatically fix table when it's disordered"},insert:{text:"Insert Table",tip:"Insert New Table",property:"Table Properties",withHeader:"Include Header",rows:"Number of Rows:",cols:"Number of Columns:",create:"Create Table"},mergeCells:"Merge Cells",nextCell:"Next Cell",prevCell:"Previous Cell",splitCell:"Split Cell",toggleHeaderCell:"Header Cell",toggleHeaderRow:"Header Row",toggleHeaderColumn:"Header Column"},tools:{barcode:{text:"Barcode",edit:"Edit Barcode",title:"Barcode",format:"Format",font:"Font Style",lineColor:"Barcode & Text Color",bgColor:"Barcode Background Color",more:"More",width:"Width:",height:"Height:",margin:"Margin:",displayValue:"Display Text",displayValueText:"Show Text",textContent:"Text Content:",textContentTip:"Overrides barcode content text",textPosition:"Text Position:",top:"Top",bottom:"Bottom",textMargin:"Vertical Distance:",fontSize:"Font Size:",placeholder:"Enter content to convert into barcode",error:"Your input may not comply with the current barcode standard constraints, please check.",preview:"Preview",renderError:"No preview available",notEmpty:"Barcode content cannot be empty"},chineseCase:{text:"Chinese Case",tip:"Chinese Case Conversion"},diagrams:{text:"Diagram",edit:"Edit Diagram",loading:"Loading..."},mermaid:{text:"Mermaid",edit:"Edit Mermaid",placeholder:"Enter Mermaid code",preview:"Preview",notEmpty:"Mermaid content cannot be empty"},mindMap:"Mind Map",qrcode:{text:"QR Code",edit:"Edit QR Code",level:"QR Code Error Correction Level",levelL:"Low",levelM:"Medium",levelQ:"Quartile",levelH:"High",padding:"padding:",paddingTip:"white space padding",width:"Size:",widthTip:"QR Code size in pixels",color:"QR Code Color",bgColor:"Color of background",placeholder:"Enter content to convert into QR Code",preview:"Preview",renderError:"QR Code generation failed",notEmpty:"QR Code content cannot be empty"},seal:{text:"Official Seal",title:"Insert Official Seal",insert:"Insert",tip:"Select a photocopy or photo of a solid-color background seal; it will be automatically extracted. All operations are completed locally without sending data to the server, so feel free to use.",insertTip:"Click here to select seal image",converting1:"Loading component...",converting2:"Loading component: {percentage}%",converting3:"Extracting image, please wait...",convertError:"Electronic seal extraction failed, please retry",notEmpty:"Please select a seal"},signature:{text:"E-Signature",title:"Insert Electronic Signature",clear:"Clear",lineWidth:"Pen Thickness",tip:"Please sign in the this area",notEmpty:"No signature detected"}},page:{bg:{text:"Background",custom:"Custom Page Background",default:"Default",color1:"Eye-friendly\nGreen",color2:"Elegant\nYellow",color3:"Cloudy\nBlue",color4:"Sky Blue",color5:"Dark Night\nBlack"},breakMarks:"Line Breaks",break:"Page Break",footer:"Footer",header:"Header",lineNumber:"Line Numbers",margin:"Margins",orientation:{text:"Orientation",landscape:"Landscape",portrait:"Portrait"},preview:"Presentation",size:{text:"Size",cm:"CM",custom:"Custom Settings"},watermark:{text:"Watermark",fontFamily:"Watermark Font",fontSize:"Watermark Size",fontColor:"Watermark Color",content:"Watermark Text",type:"Watermark Style",compact:"Compact",spacious:"Spacious",clear:"Remove Watermark"}},export:{embed:{text:"Embed",title:"Embed Code",tip:"After copying, manually adjust the iframe width and height for optimal viewing.",copy:"Copy",copied:"Code copied to clipboard"},image:{text:"Image",jpg:"JPG",png:"PNG",error:{title:"Error Message",message:"Failed to export image, please try again or refresh the page."}},share:{text:"Share",tip:"Copy the link and send it to those you want to share with.",copy:"Copy Link",copied:"Link copied to clipboard"},text:"Text"},list:{bullet:{text:"Bulleted List",disc:"Filled Circle",circle:"Open Circle",square:"Filled Square"},ordered:{text:"Numbered List",property:"List Properties",startAt:"Starting Number:",decimal:"Numbers",decimalLeadingZero:"Numbers with Leading Zero",lowerRoman:"Lowercase Roman Numerals",upperRoman:"Uppercase Roman Numerals",lowerLatin:"Lowercase Alphabet",upperLatin:"Uppercase Alphabet",tradChineseInformal:"Traditional Chinese Counting",simpChineseFormal:"Formal Uppercase Chinese Counting"},task:{text:"To-Do List",split:"Add Task",sink:"Convert to Sub-task",lift:"Remove as Task"}},colorPicker:{default:"Default Color",standard:"Standard Colors",recent:"Recently Used",more:"More Colors"},blockMenu:{insert:"Insert New Block",select:"Select Block",template:"Insert Template",toogleNode:"Switch Block Type",other:"Other",delete:"Delete Block"},bubbleMenu:{code:{copy:{text:"Copy Code",success:"Code copied to clipboard"},languages:"Languages",lineNumbers:"Show Line Numbers",themes:{text:"Theme",light:"Light Theme",dark:"Dark Theme"},wordWrap:"Word Wrap"},delete:"Delete",file:{download:"Download File"},image:{download:"Download Image",draggable:"Image Floating",flipX:"Flip Horizontally",flipY:"Flip Vertically",preview:"Preview Image",proportion:"Lock Image Aspect Ratio",removeBg:"Remove Image Background",removingBg:"Removing Image Background...",reset:"Reset Image Position",rotateCC:"Rotate Counter-Clockwise 90°",rotateC:"Rotate Clockwise 90°"}},pageOptions:{title:"Page Settings",size:{text:"Page Size",width:"Width:",height:"Height:",custom:"Custom"},margin:{text:"Page Margins",default:"Default",narrow:"Narrow",moderate:"Moderate",wide:"Wide",top:"Top:",right:"Right:",bottom:"Bottom:",left:"Left:"}},source:{loading:"Loading Source Editor..."},document:{untitled:"Untitled Document"},search:{text:"Search",title:"Search and Replace",searchText:"Search...",replaceText:"Replace...",caseSensitive:"Case Sensitive",search:"Search",replace:"Replace",replaceAll:"Replace All"},toc:{title:"Document Map",show:"Document Map",hide:"Hide Document Map",empty:"No Document Map Available"},spellcheck:{enable:"Enable Spell Check",disable:"Disable Spell Check"},pageBreak:{title:"Page Break",disable:"Exit Page Break"},shortcut:{title:"Keyboard Shortcuts",text:"Text",commonlyUsed:"Common",copy:"Copy",paste:"Paste",pasteAsText:"Paste as Plain Text",paragraph:"Insert New Paragraph",hardBreak:"Line Break",format:"Text",page:"Page",pageZoomIn:"Zoom In",pageZoomOut:"Zoom Out",pageZoomReset:"Reset Zoom to Default",pageAutoWidth:"Fit to Best Width",markdown:"Markdown"},changeLocale:{title:"Switch Language",message:"After changing the language, the page will refresh. Please save your document content first. Are you sure you want to switch now?",confirm:"Switch Now"},resetAll:{title:"Reset Editor",message:"This action will clear all editor settings and current content, and refresh the page. It's recommended to save your content before resetting. Are you sure you want to reset now?",reset:"Reset Now"},feedback:"Feedback",poweredBy:"Powered by Umodoc",wordCount:{input:"{count} characters,",limit:"total should not exceed {count} characters,",selected:"{count} characters selected"},preview:{title:"Presentation",disable:"Exit Presentation",laserPointer:"Laser Pointer",exit:"Exit"},fullscreen:{title:"Fullscreen",disable:"Exit Fullscreen"},zoom:{zoomIn:"Zoom In",zoomOut:"Zoom Out",level:"Zoom Level: ",autoWidth:"Best Fit Width",autoWidthError:"Error calculating automatic page width",reset:"Back to 100%"},node:{codeBlock:{menu:"Menu"},image:{loading:"Loading...",error:"Image load failed"},textBox:{tip:"Double-click to edit"}},file:{uploading:"Uploading file...",download:"Download File",limit:'File "{filename}" exceeds the limit of {size}MB',notAllow:{title:"Error Prompt",message:"Insertion of this file type is not allowed in the current document."}},save:{text:"Save",saved:"Saved",unsaved:"Unsaved",network:"Network Status:",online:"Online",offline:"Offline",saving:"Saving document...",savedAt:"Saved at:",savedAtText:"Saved at {time}",failed:"Failed to save document",success:"Document saved successfully",error:"Error saving document",cache:{text:"Restore from Cache",error:{title:"Error Prompt",message:"There is no content in the cache!"}}},print:{text:"Print",title:"Print Document",preview:"Page Preview",closePreview:"Close Page Preview",settings:"Print Settings",singleColumn:"Display in Single Column",showPageNumber:"Include Page Numbers when Printing",loading:"Page loading...",page:"Page 'counter(page)' of 'counter(pages)'"},time:{justNow:"Just now",past:"{n} ago",yesterday:"Yesterday",day:"{n} days",hour:"{n} hours",minute:"{n} minutes",second:"{n} seconds"},dialog:{cancel:"Cancel"}};class T_{static overwrite(e,t){return t}static replace(e,t){return void 0!==t?t:e}static assign(e,t){return Object.assign({},e,t)}}class A_{static array(e){if(!Array.isArray(e))throw new TypeError("Expected an array.")}static boolean(e){if("boolean"!=typeof e)throw new TypeError("Expected a Boolean.")}static number(e){if("number"!=typeof e)throw new TypeError("Expected a number.")}static object(e){if(!e||"object"!=typeof e)throw new TypeError("Expected an object.")}static"object?"(e){if("object"!=typeof e)throw new TypeError("Expected an object or null.")}static string(e){if("string"!=typeof e)throw new TypeError("Expected a string.")}static"string!"(e){if("string"!=typeof e||0===e.length)throw new TypeError("Expected a non-empty string.")}}function M_(e,t){let n=!1;if(t.schema){if("object"!=typeof t.schema)throw new TypeError("Schema must be an object.");n=!0}if("string"==typeof t.merge){if(!(t.merge in T_))throw new TypeError(`Definition for key "${e}" missing valid merge strategy.`)}else if(!n&&"function"!=typeof t.merge)throw new TypeError(`Definition for key "${e}" must have a merge property.`);if("string"==typeof t.validate){if(!(t.validate in A_))throw new TypeError(`Definition for key "${e}" missing valid validation strategy.`)}else if(!n&&"function"!=typeof t.validate)throw new TypeError(`Definition for key "${e}" must have a validate() method.`)}class I_ extends Error{constructor(e){super(`Unexpected key "${e}" found.`)}}class P_ extends Error{constructor(e){super(`Missing required key "${e}".`)}}class L_ extends Error{constructor(e,t){super(`Key "${e}" requires keys "${t.join('", "')}".`)}}class R_ extends Error{constructor(e,t){super(`Key "${e}": ${t.message}`,{cause:t});for(const n of Object.keys(t))n in this||(this[n]=t[n])}}s=new WeakMap,c=new WeakMap;let B_=class e{constructor(t){if(h(this,s,new Map),h(this,c,new Map),!t)throw new Error("Schema definitions missing.");for(const n of Object.keys(t)){if(M_(n,t[n]),"object"==typeof t[n].schema){const r=new e(t[n].schema);t[n]={...t[n],merge:(e={},t={})=>r.merge(e,t),validate(e){A_.object(e),r.validate(e)}}}"string"==typeof t[n].merge&&(t[n]={...t[n],merge:T_[t[n].merge]}),"string"==typeof t[n].validate&&(t[n]={...t[n],validate:A_[t[n].validate]}),f(this,s).set(n,t[n]),t[n].required&&f(this,c).set(n,t[n])}}hasKey(e){return f(this,s).has(e)}merge(...e){if(e.length<2)throw new TypeError("merge() requires at least two arguments.");if(e.some((e=>null===e||"object"!=typeof e)))throw new TypeError("All arguments must be objects.");return e.reduce(((e,t)=>{this.validate(t);for(const[r,o]of f(this,s))try{if(r in e||r in t){const n=o.merge.call(this,e[r],t[r]);void 0!==n&&(e[r]=n)}}catch(n){throw new R_(r,n)}return e}),{})}validate(e){for(const n of Object.keys(e)){if(!this.hasKey(n))throw new I_(n);const r=f(this,s).get(n);if(Array.isArray(r.requires)&&!r.requires.every((t=>t in e)))throw new L_(n,r.requires);try{r.validate.call(r,e[n])}catch(t){throw new R_(n,t)}}for(const[n]of f(this,c))if(!(n in e))throw new P_(n)}};const D_={editorKey:"default",locale:"zh-CN",theme:"light",height:"100%",dicts:{fonts:[{label:{en_US:"Default Font",zh_CN:"默认字体"},value:null},{label:{en_US:"Songti",zh_CN:"宋体"},value:"SimSun"},{label:{en_US:"Heiti",zh_CN:"黑体"},value:"SimHei"},{label:{en_US:"Kaiti",zh_CN:"楷体"},value:"KaiTi"},{label:{en_US:"Kaiti GB2312",zh_CN:"楷体_GB2312"},value:"KaiTi_GB2312"},{label:{en_US:"Fangsong",zh_CN:"仿宋"},value:"FangSong"},{label:{en_US:"Fangsong GB2312",zh_CN:"仿宋_GB2312"},value:"FangSong_GB2312"},{label:{en_US:"STSong",zh_CN:"华文宋体"},value:"STSong"},{label:{en_US:"STFangsong",zh_CN:"华文仿宋"},value:"STFangsong"},{label:{en_US:"FZ Fangsong Simplified",zh_CN:"方正仿宋简体"},value:"FZFangSong-Z02S"},{label:{en_US:"FZ Xiaobiao Song",zh_CN:"方正小标宋"},value:"FZXiaoBiaoSong-B05S"},{label:{en_US:"Microsoft Yahei",zh_CN:"微软雅黑"},value:"Microsoft Yahei"},{label:"Arial",value:"Arial"},{label:"Times New Roman",value:"Times New Roman"},{label:"Verdana",value:"Verdana"},{label:"Helvetica",value:"Helvetica"},{label:"Calibri",value:"Calibri"},{label:"Cambria",value:"Cambria"},{label:"Tahoma",value:"Tahoma"},{label:"Georgia",value:"Georgia"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"}],colors:["#FFF","#000","#4A5366","#3B74EC","#45A2EF","#529867","#CD4A3F","#EA8D40","#EEC543","#8E45D0","#F2F2F2","#7F7F7F","#F4F5F7","#CBDCFC","#E8F6FE","#EDFAF2","#FCEAE9","#FDF3EC","#FEF9E5","#FAECFE","#EEE","#595959","#C6CAD2","#CEEBFD","#CBDCFC","#CBE9D7","#F7CBC9","#FADDC7","#FDEEB5","#EBCAFC","#BFBFBF","#3F3F3F","#828B9D","#A0BEFA","#A7DCFC","#A6D5B8","#F2A19C","#F5BC8C","#FBE281","#CB94F9","#A5A5A5","#262626","#363B44","#2452B2","#3473A1","#417A53","#922B22","#AD642A","#9E8329","#57297D","#939393","#0D0D0D","#25272E","#15316A","#1C415A","#284D34","#511712","#573213","#635217","#36194E"],lineHeights:[{label:{en_US:"Single",zh_CN:"单倍行距"},value:1},{label:{en_US:"1.5 Line Spacing",zh_CN:"1.5 倍行距"},value:1.5,default:!0},{label:{en_US:"Double",zh_CN:"2 倍行距"},value:2},{label:{en_US:"2.5 Line Spacing",zh_CN:"2.5 倍行距"},value:2.5},{label:{en_US:"Triple",zh_CN:"3 倍行距"},value:3}],symbols:[{label:{en_US:"Plain Text",zh_CN:"普通文本"},items:"‹›«»‘’“”‚„¡¿‥…‡‰‱‼⁈⁉⁇©®™§¶⁋"},{label:{en_US:"Currency Symbols",zh_CN:"货币符号"},items:"$€¥£¢₠₡₢₣₤¤₿₥₦₧₨₩₪₫₭₮₯₰₱₲₳₴₵₶₷₸₹₺₻₼₽"},{label:{en_US:"Mathematical Symbols",zh_CN:"数学符号"},items:"<>≤≥–—¯‾°−±÷⁄׃∫∑∞√∼≅≈≠≡∈∉∋∏∧∨¬∩∪∂∀∃∅∇∗∝∠¼½¾"},{label:{en_US:"Arrows",zh_CN:"箭头"},items:"←→↑↓⇐⇒⇑⇓⇠⇢⇡⇣⇤⇥⤒⤓↨"},{label:{en_US:"Latin Script",zh_CN:"拉丁语"},items:"ĀāĂ㥹ĆćĈĉĊċČčĎďĐđĒēĔĕĖėĘęĚěĜĝĞğĠġĢģĤĥĦħĨĩĪīĬĭĮįİıIJijĴĵĶķĸĹĺĻļĽľĿŀŁłŃńŅņŇňʼnŊŋŌōŎŏŐőŒœŔŕŖŗŘřŚśŜŝŞşŠšŢţŤťŦŧŨũŪūŬŭŮůŰűŲųŴŵŶŷŸŹźŻżŽžſ"}],emojis:[{label:{en_US:"Emotions & People",zh_CN:"表情与角色"},items:"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 🫠 😉 😊 😇 🥰 😍 🤩 😘 😗 ☺️ 😚 😙 🥲 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🫢 🫣 🤫 🤔 🫡 🤐 🤨 😐 😑 😶 🫥 😶🌫️ 😏 😒 🙄 😬 😮💨 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵💫 🤯 🤠 🥳 🥸 😎 🤓 🧐 😕 🫤 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 🥹 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 🫱 🫲 🫳 🫴 👌 🤌 🤏 ✌️ 🤞 🫰 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 🫵 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 🫶 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻"},{label:{en_US:"Animals & Nature",zh_CN:"动物与自然"},items:"🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🦬 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦣 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦫 🦔 🦇 🐻 🐻❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦤 🪶 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🪸 🐌 🦋 🐛 🐜 🐝 🪲 🐞 🦗 🪳 🕷️ 🕸️ 🦂 🦟 🪰 🪱 🦠 💐 🌸 💮 🪷 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🪴 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🪹 🪺"},{label:{en_US:"Food & Drink",zh_CN:"食物与食品"},items:"🥬 🥦 🧄 🧅 🍄 🥜 🫘 🌰 🍞 🥐 🥖 🫓 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🫔 🥙 🧆 🥚 🍳 🥘 🍲 🫕 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🫖 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🫗 🥤 🧋 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🫙 🏺"},{label:{en_US:"Activities",zh_CN:"活动"},items:"🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🪄 🧿 🪬 🎮 🕹️ 🎰 🎲 🧩 🧸 🪅 🪩 🪆 ♠️ ♥️ ♦️ ♣️ ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🪡 🧶 🪢"},{label:{en_US:"Travel & Places",zh_CN:"旅行与景点"},items:"🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🛻 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🛼 🚏 🛣️ 🛤️ 🛢️ ⛽ 🛞 🚨 🚥 🚦 🛑 🚧 ⚓ 🛟 ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 ⌛ ⏳ ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 🌡️ ☀️ 🌝 🌞 🪐 ⭐ 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊"},{label:{en_US:"Objects",zh_CN:"物品"},items:"📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🪙 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🪃 🏹 🛡️ 🪚 🔧 🪛 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🪝 🧰 🧲 🪜 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩼 🩺 🩻 🚪 🛗 🪞 🪟 🛏️ 🛋️ 🪑 🚽 🪠 🚿 🛁 🪤 🪒 🧴 🧷 🧹 🧺 🧻 🪣 🧼 🫧 🪥 🧽 🧯 🛒 🚬 ⚰️ 🪦 ⚱️ 🗿 🪧 🪪"},{label:{en_US:"Symbols",zh_CN:"符号"},items:"➰ ➿ 〽️ ✳️ ✴️ ❇️ ©️ ®️ ™️ #️⃣ *️⃣ 0️⃣ 1️⃣ 2️⃣ 3️⃣ 4️⃣ 5️⃣ 6️⃣ 7️⃣ 8️⃣ 9️⃣ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 Ⓜ️ 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 ⬛ ⬜ ◼️ ◻️ ◾ ◽ ▪️ ▫️ 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲"},{label:{en_US:"Flags",zh_CN:"旗帜"},items:"🏁 🇨🇳 🎌 🇩🇪 🇪🇸 🇦🇨 🇦🇩 🇦🇪 🇦🇫 🇦🇬 🇦🇮 🇦🇱 🇦🇲 🇦🇴 🇦🇶 🇦🇷 🇦🇸 🇦🇹 🇦🇺 🇦🇼 🇦🇽 🇦🇿 🇧🇦 🇧🇧 🇧🇩 🇧🇪 🇧🇫 🇧🇬 🇧🇭 🇧🇮 🇧🇯 🇧🇱 🇧🇲 🇧🇳 🇧🇴 🇧🇶 🇧🇷 🇧🇸 🇧🇹 🇧🇻 🇧🇼 🇧🇾 🇧🇿 🇨🇦 🇨🇨 🇨🇩 🇨🇫 🇨🇬 🇨🇭 🇨🇮 🇨🇰 🇨🇱 🇨🇲 🇨🇴 🇨🇵 🇨🇷 🇨🇺 🇨🇻 🇨🇼 🇨🇽 🇨🇾 🇨🇿 🇩🇬 🇩🇯 🇩🇰 🇩🇲 🇩🇴 🇩🇿 🇪🇦 🇪🇨 🇪🇪 🇪🇬 🇪🇭 🏴 🇪🇷 🇪🇹 🇪🇺 🇫🇮 🇫🇯 🇫🇰 🇫🇲 🇫🇴 🇬🇦 🇬🇩 🇬🇪 🇬🇫 🇬🇬 🇬🇭 🇬🇮 🇬🇱 🇬🇲 🇬🇳 🇬🇵 🇬🇶 🇬🇷 🇬🇸 🇬🇹 🇬🇺 🇬🇼 🇬🇾 🇭🇰 🇭🇲 🇭🇳 🇭🇷 🇭🇹 🇭🇺 🇮🇨 🇮🇩 🇮🇪 🇮🇱 🇮🇲 🇮🇳 🇮🇴 🇮🇶 🇮🇷 🇮🇸 🇯🇪 🇯🇲 🇯🇴 🇰🇪 🇰🇬 🇰🇭 🇰🇮 🇰🇲 🇰🇳 🇰🇵 🇰🇼 🇰🇾 🇰🇿 🇱🇦 🇱🇧 🇱🇨 🇱🇮 🇱🇰 🇱🇷 🇱🇸 🇱🇹 🇱🇺 🇱🇻 🇱🇾 🇲🇦 🇲🇨 🇲🇩 🇲🇪 🇲🇫 🇲🇬 🇲🇭 🇲🇰 🇲🇱 🇲🇲 🇲🇳 🇲🇴 🇲🇵 🇲🇶 🇲🇷 🇲🇸 🇲🇹 🇲🇺 🇲🇻 🇲🇼 🇲🇽 🇲🇾 🇲🇿 🇳🇦 🇳🇨 🇳🇪 🇳🇫 🇳🇬 🇳🇮 🇳🇱 🇳🇴"}],pageSizes:[{label:"A4",width:21,height:29.4,default:!0},{label:"A3",width:29.7,height:42},{label:"A5",width:14.8,height:21},{label:"B5",width:17.6,height:25},{label:{en_US:"No. 5 Envelope",zh_CN:"5号信封"},width:10.9,height:12.9},{label:{en_US:"No. 6 Envelope",zh_CN:"6号信封"},width:11.9,height:22.9},{label:{en_US:"No. 7 Envelope",zh_CN:"7号信封"},width:16.1,height:22.8},{label:{en_US:"No. 9 Envelope",zh_CN:"9号信封"},width:22.8,height:32.3},{label:{en_US:"Legal Paper",zh_CN:"法律用纸"},width:21.5,height:33.5},{label:{en_US:"Letter Paper",zh_CN:"信纸"},width:21.5,height:27.9}]},toolbar:{defaultMode:"ribbon",enableSourceEditor:!1,menus:["base","insert","table","tools","page","export"],disableMenuItems:[]},page:{defaultMargin:{left:3.18,right:3.18,top:2.54,bottom:2.54},defaultOrientation:"portrait",defaultBackground:"#fff",showBreakMarks:!0,watermark:{type:"compact",alpha:.2,fontColor:"#000",fontSize:16,fontFamily:"SimSun",fontWeight:"normal",text:""}},document:{title:"",content:"",placeholder:{en_US:"Please enter the document content...",zh_CN:"请输入文档内容..."},enableSpellcheck:!0,enableMarkdown:!0,enableBubbleMenu:!0,enableBlockMenu:!0,readOnly:!1,autofocus:!0,characterLimit:0,typographyRules:{},editorProps:{},parseOptions:{preserveWhitespace:"full"},autoSave:{enabled:!0,interval:3e5}},templates:[],cdnUrl:"https://unpkg.com/@umoteam/editor-external@latest",shareUrl:(null==location?void 0:location.href)||"",diagrams:{domain:"https://embed.diagrams.net",params:{}},file:{allowedMimeTypes:[],maxSize:104857600},extensions:[],translations:{en_US:{},zh_CN:{}},async onSave(e,t,n){throw new Error('Key "onSave": Please set the save method')},async onFileUpload(e){if(!e)throw new Error("File not found");throw new Error('Key "onFileUpload": Please set the upload method')},onFileDelete(e,t){console.error("The file has been deleted. Please configure the onFileDelete to completely delete the file from the server.")}},V_=Object.keys(D_),j_=e=>{if("number"==typeof e)return isFinite(e);if("string"==typeof e){const t=parseFloat(e);return!isNaN(t)&&isFinite(t)&&e===t.toString()}return!1},F_=e=>{if("string"==typeof e&&e.length>0)return!0;if("object"==typeof e&&null!==e){for(let t in e)if(!["en_US","zh_CN"].includes(t))return!1;return!0}return!1},z_=new B_({editorKey:{merge:"replace",validate:"string!"},locale:{merge:"replace",validate(e){if(e&&!["en-US","zh-CN"].includes(e))throw new Error('Key "locale": must be one of "en-US" or "zh-CN".')}},theme:{merge:"replace",validate(e){if(e&&!["dark","light","auto"].includes(e))throw new Error('Key "locale": must be one of "dark", "light" or "auto".')}},height:{merge:"replace",validate:"string!"},dicts:{schema:{fonts:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "fonts" must be a array.');e.forEach((e=>{if(!e.label||!e.value&&null!==e.value)throw new Error('Key "dicts": Key "fonts" must be a array of objects with "label" and "value" properties.')}))}},colors:{merge:"replace",validate:"array"},lineHeights:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "lineHeights": must be a array.');if(!e.find((e=>e.default)))throw new Error('Key "dicts": Key "lineHeights": please set a default value.');e.forEach(((e,t)=>{if(!e.label||!e.value&&null!==e.value)throw new Error(`Key "dicts": Key "lineHeights[${t}]": must be a array of objects with "label" and "value" properties.`);if(!F_(e.label))throw new Error(`Key "dicts": Key "lineHeights[${t}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)}))}},symbols:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "symbols" must be a array.');e.forEach(((e,t)=>{if(!e.label||"string"!=typeof e.items)throw new Error(`Key "dicts": Key "symbols[${t}]": must be a array of objects with "label" and "items" properties.`);if(!F_(e.label))throw new Error(`Key "dicts": Key "symbols[${t}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)}))}},emojis:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "emojis" must be a array.');e.forEach(((e,t)=>{if(!e.label||"string"!=typeof e.items)throw new Error(`Key "dicts": Key "emojis[${t}]": must be a array of objects with "label" and "value" properties.`);if(!F_(e.label))throw new Error(`Key "dicts": Key "emojis[${t}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`)}))}},pageSizes:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "dicts": Key "pageSizes": must be a array.');if(!e.find((e=>e.default)))throw new Error('Key "dicts": Key "pageSizes": please set a default value.');e.forEach(((e,t)=>{if(!e.label||""===e.label)throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "label" cannot be empty.`);if(!F_(e.label))throw new Error(`Key "dicts": Key "pageSizes[${t}]": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.`);if(!j_(e.width))throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "width" must be a number.`);if(!j_(e.height))throw new Error(`Key "dicts": Key "pageSizes[${t}]" Key: "height" must be a number.`)}))}}}},toolbar:{schema:{defaultMode:{merge:"replace",validate(e){if(e&&!["classic","ribbon"].includes(e))throw new Error('Key "toolbar": Key "defaultMode" must be one of "classic" or "ribbon".')}},enableSourceEditor:{merge:"replace",validate:"boolean"},menus:{merge:"replace",validate(e){const t=D_.toolbar.menus;if(e&&!Array.isArray(e))throw new Error('Key "toolbar": Key "menus" must be a array.');if(!e.includes("base"))throw new Error('Key "toolbar": Key "menus" should at least contain "base".');if(!e.every((e=>t.includes(e))))throw new Error(`Key "toolbar": Key "menus" the array items of toolbar.menus must contain only one or multiple of ${JSON.stringify(t)}.`)}},disableMenuItems:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "toolbar": Key "disableMenuItems" must be a array.')}}}},page:{schema:{defaultMargin:{schema:{left:{merge:"replace",validate:"number"},right:{merge:"replace",validate:"number"},top:{merge:"replace",validate:"number"},bottom:{merge:"replace",validate:"number"}}},defaultOrientation:{merge:"replace",validate(e){if(e&&!["portrait","landscape"].includes(e))throw new Error('Key "page": Key "defaultOrientation" must be one of "portrait" or "landscape".')}},defaultBackground:{merge:"replace",validate:"string"},showBreakMarks:{merge:"replace",validate:"boolean"},watermark:{schema:{type:{merge:"replace",validate(e){if(e&&!["compact","spacious"].includes(e))throw new Error('Key "watermark": Key "type" must be one of "compact" or "spacious".')}},alpha:{merge:"replace",validate:"number"},fontColor:{merge:"replace",validate:"string"},fontFamily:{merge:"replace",validate(e){if(null!==e&&"string"!=typeof e)throw new Error('Key "watermark": Key "fontFamily" must be a string.')}},fontSize:{merge:"replace",validate:"number"},fontWeight:{merge:"replace",validate:"string"},text:{merge:"replace",validate:"string"}}}}},document:{schema:{title:{merge:"replace",validate:"string"},content:{merge:"replace",validate(){}},placeholder:{merge:"replace",validate(e){if(!F_(e))throw new Error('Key "document": Key "title": Key "label" must be string, or a object with "en_US" and "zh_CN" properties.')}},enableSpellcheck:{merge:"replace",validate:"boolean"},enableMarkdown:{merge:"replace",validate:"boolean"},enableBubbleMenu:{merge:"replace",validate:"boolean"},enableBlockMenu:{merge:"replace",validate:"boolean"},readOnly:{merge:"replace",validate:"boolean"},autofocus:{merge:"replace",validate(e){if(!["start","end","all",!0,!1,null].includes(e)&&!j_(e))throw new Error('Key "document": Key "autofocus" must be one of "start", "end", "all", Number, true, false, null.')}},characterLimit:{merge:"replace",validate:"number"},typographyRules:{merge:"replace",validate:"object"},editorProps:{merge:"replace",validate:"object"},parseOptions:{merge:"replace",validate:"object"},autoSave:{schema:{enabled:{merge:"replace",validate:"boolean"},interval:{merge:"replace",validate:"number"}}}}},shareUrl:{merge:"replace",validate:"string"},templates:{merge:"replace",validate(e){if(e&&!Array.isArray(e))throw new Error('Key "templates": Key "menus" must be a array.');e.forEach(((e,t)=>{if(!e.title||""===!e.title)throw new Error(`Key "templates[${t}]": Key "title" cannot be empty.`);if(!e.content||""===!e.content)throw new Error(`Key "templates[${t}]": Key "content" cannot be empty.`)}))}},cdnUrl:{merge:"replace",validate:"string"},diagrams:{merge:"assign",validate:"object"},file:{schema:{allowedMimeTypes:{merge:"replace",validate:"array"},maxSize:{merge:"replace",validate:"number"},onUpload:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onUpload" must be a async function.')}},onDelete:{merge:"replace",validate(e){if("function"!=typeof e&&"AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onDelete" must be a function.')}}}},extensions:{merge:"replace",validate:"array"},translations:{merge:"replace",validate:"object"},onSave:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name&&e instanceof Promise)throw new Error('Key "document": Key "saveNethod" must be a async function.')}},onFileUpload:{merge:"replace",validate(e){if("AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onUpload" must be a async function.')}},onFileDelete:{merge:"replace",validate(e){if("function"!=typeof e&&"AsyncFunction"!==e.constructor.name)throw new Error('Key "upload": Key "onDelete" must be a function.')}}}),$_=(e=8)=>Math.random().toString(36).substring(2,e+2);function H_(e){return!!t.getCurrentScope()&&(t.onScopeDispose(e),!0)}function U_(e){return"function"==typeof e?e():t.unref(e)}const W_="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&(globalThis,WorkerGlobalScope);const G_=Object.prototype.toString,K_=e=>"[object Object]"===G_.call(e),q_=()=>+Date.now(),Y_=()=>{},X_=Z_();function Z_(){var e,t;return W_&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null==(t=null==window?void 0:window.navigator)?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null==window?void 0:window.navigator.userAgent))}const J_=e=>e();function Q_(e,t=!1,n="Timeout"){return new Promise(((r,o)=>{t?setTimeout((()=>o(n)),e):setTimeout(r,e)}))}function eN(e,n,r={}){const{eventFilter:o=J_,...a}=r;return t.watch(e,(i=o,l=n,function(...e){return new Promise(((t,n)=>{Promise.resolve(i((()=>l.apply(this,e)),{fn:l,thisArg:this,args:e})).then(t).catch(n)}))}),a);var i,l}function tN(e,n,r={}){const{eventFilter:o,...a}=r,{eventFilter:i,pause:l,resume:s,isActive:c}=function(e=J_){const n=t.ref(!0);return{isActive:t.readonly(n),pause:function(){n.value=!1},resume:function(){n.value=!0},eventFilter:(...t)=>{n.value&&e(...t)}}}(o);return{stop:eN(e,n,{...a,eventFilter:i}),pause:l,resume:s,isActive:c}}function nN(e,n=!0,r){t.getCurrentInstance()?t.onMounted(e,r):n?e():t.nextTick(e)}function rN(e,n=!1){function r(r,{flush:o="sync",deep:a=!1,timeout:i,throwOnTimeout:l}={}){let s=null;const c=[new Promise((i=>{s=t.watch(e,(e=>{r(e)!==n&&(null==s||s(),i(e))}),{flush:o,deep:a,immediate:!0})}))];return null!=i&&c.push(Q_(i,l).then((()=>U_(e))).finally((()=>null==s?void 0:s()))),Promise.race(c)}function o(o,a){if(!t.isRef(o))return r((e=>e===o),a);const{flush:i="sync",deep:l=!1,timeout:s,throwOnTimeout:c}=null!=a?a:{};let u=null;const d=[new Promise((r=>{u=t.watch([e,o],(([e,t])=>{n!==(e===t)&&(null==u||u(),r(e))}),{flush:i,deep:l,immediate:!0})}))];return null!=s&&d.push(Q_(s,c).then((()=>U_(e))).finally((()=>(null==u||u(),U_(e))))),Promise.race(d)}function a(e){return i(1,e)}function i(e=1,t){let n=-1;return r((()=>(n+=1,n>=e)),t)}if(Array.isArray(U_(e))){return{toMatch:r,toContains:function(e,t){return r((t=>{const n=Array.from(t);return n.includes(e)||n.includes(U_(e))}),t)},changed:a,changedTimes:i,get not(){return rN(e,!n)}}}return{toMatch:r,toBe:o,toBeTruthy:function(e){return r((e=>Boolean(e)),e)},toBeNull:function(e){return o(null,e)},toBeNaN:function(e){return r(Number.isNaN,e)},toBeUndefined:function(e){return o(void 0,e)},changed:a,changedTimes:i,get not(){return rN(e,!n)}}}function oN(e){return rN(e)}const aN=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i,iN=/[YMDHhms]o|\[([^\]]+)\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;function lN(e,t,n,r){let o=e<12?"AM":"PM";return r&&(o=o.split("").reduce(((e,t)=>e+`${t}.`),"")),n?o.toLowerCase():o}function sN(e){const t=["th","st","nd","rd"],n=e%100;return e+(t[(n-20)%10]||t[n]||t[0])}function cN(e,n="HH:mm:ss",r={}){return t.computed((()=>function(e,t,n={}){var r;const o=e.getFullYear(),a=e.getMonth(),i=e.getDate(),l=e.getHours(),s=e.getMinutes(),c=e.getSeconds(),u=e.getMilliseconds(),d=e.getDay(),p=null!=(r=n.customMeridiem)?r:lN,f={Yo:()=>sN(o),YY:()=>String(o).slice(-2),YYYY:()=>o,M:()=>a+1,Mo:()=>sN(a+1),MM:()=>`${a+1}`.padStart(2,"0"),MMM:()=>e.toLocaleDateString(n.locales,{month:"short"}),MMMM:()=>e.toLocaleDateString(n.locales,{month:"long"}),D:()=>String(i),Do:()=>sN(i),DD:()=>`${i}`.padStart(2,"0"),H:()=>String(l),Ho:()=>sN(l),HH:()=>`${l}`.padStart(2,"0"),h:()=>`${l%12||12}`.padStart(1,"0"),ho:()=>sN(l%12||12),hh:()=>`${l%12||12}`.padStart(2,"0"),m:()=>String(s),mo:()=>sN(s),mm:()=>`${s}`.padStart(2,"0"),s:()=>String(c),so:()=>sN(c),ss:()=>`${c}`.padStart(2,"0"),SSS:()=>`${u}`.padStart(3,"0"),d:()=>d,dd:()=>e.toLocaleDateString(n.locales,{weekday:"narrow"}),ddd:()=>e.toLocaleDateString(n.locales,{weekday:"short"}),dddd:()=>e.toLocaleDateString(n.locales,{weekday:"long"}),A:()=>p(l,s),AA:()=>p(l,s,!1,!0),a:()=>p(l,s,!0),aa:()=>p(l,s,!0,!0)};return t.replace(iN,((e,t)=>{var n,r;return null!=(r=null!=t?t:null==(n=f[e])?void 0:n.call(f))?r:e}))}(function(e){if(null===e)return new Date(Number.NaN);if(void 0===e)return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){const t=e.match(aN);if(t){const e=t[2]-1||0,n=(t[7]||"0").substring(0,3);return new Date(t[1],e,t[3]||1,t[4]||0,t[5]||0,t[6]||0,n)}}return new Date(e)}(U_(e)),U_(n),r)))}function uN(e,n=1e3,r={}){const{immediate:o=!0,immediateCallback:a=!1}=r;let i=null;const l=t.ref(!1);function s(){i&&(clearInterval(i),i=null)}function c(){l.value=!1,s()}function u(){const t=U_(n);t<=0||(l.value=!0,a&&e(),s(),i=setInterval(e,t))}if(o&&W_&&u(),t.isRef(n)||"function"==typeof n){H_(t.watch(n,(()=>{l.value&&W_&&u()})))}return H_(c),{isActive:l,pause:c,resume:u}}function dN(e){var t;const n=U_(e);return null!=(t=null==n?void 0:n.$el)?t:n}const pN=W_?window:void 0,fN=W_?window.document:void 0,hN=W_?window.navigator:void 0;function mN(...e){let n,r,o,a;if("string"==typeof e[0]||Array.isArray(e[0])?([r,o,a]=e,n=pN):[n,r,o,a]=e,!n)return Y_;Array.isArray(r)||(r=[r]),Array.isArray(o)||(o=[o]);const i=[],l=()=>{i.forEach((e=>e())),i.length=0},s=t.watch((()=>[dN(n),U_(a)]),(([e,t])=>{if(l(),!e)return;const n=K_(t)?{...t}:t;i.push(...r.flatMap((t=>o.map((r=>((e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)))(e,t,r,n))))))}),{immediate:!0,flush:"post"}),c=()=>{s(),l()};return H_(c),c}let vN=!1;function gN(e,t,n={}){const{window:r=pN,ignore:o=[],capture:a=!0,detectIframe:i=!1}=n;if(!r)return Y_;X_&&!vN&&(vN=!0,Array.from(r.document.body.children).forEach((e=>e.addEventListener("click",Y_))),r.document.documentElement.addEventListener("click",Y_));let l=!0;const s=e=>o.some((t=>{if("string"==typeof t)return Array.from(r.document.querySelectorAll(t)).some((t=>t===e.target||e.composedPath().includes(t)));{const n=dN(t);return n&&(e.target===n||e.composedPath().includes(n))}})),c=[mN(r,"click",(n=>{const r=dN(e);r&&r!==n.target&&!n.composedPath().includes(r)&&(0===n.detail&&(l=!s(n)),l?t(n):l=!0)}),{passive:!0,capture:a}),mN(r,"pointerdown",(t=>{const n=dN(e);l=!s(t)&&!(!n||t.composedPath().includes(n))}),{passive:!0}),i&&mN(r,"blur",(n=>{setTimeout((()=>{var o;const a=dN(e);"IFRAME"!==(null==(o=r.document.activeElement)?void 0:o.tagName)||(null==a?void 0:a.contains(r.document.activeElement))||t(n)}),0)}))].filter(Boolean);return()=>c.forEach((e=>e()))}function bN(e){const n=function(){const e=t.ref(!1),n=t.getCurrentInstance();return n&&t.onMounted((()=>{e.value=!0}),n),e}();return t.computed((()=>(n.value,Boolean(e()))))}function yN(e,n={}){const{immediate:r=!0,fpsLimit:o,window:a=pN}=n,i=t.ref(!1),l=o?1e3/o:null;let s=0,c=null;function u(t){if(!i.value||!a)return;s||(s=t);const n=t-s;l&&n<l||(s=t,e({delta:n,timestamp:t})),c=a.requestAnimationFrame(u)}function d(){!i.value&&a&&(i.value=!0,s=0,c=a.requestAnimationFrame(u))}function p(){i.value=!1,null!=c&&a&&(a.cancelAnimationFrame(c),c=null)}return r&&d(),H_(p),{isActive:t.readonly(i),pause:p,resume:d}}function wN(e,n,r){const{immediate:o=!0,delay:a=0,onError:i=Y_,onSuccess:l=Y_,resetOnExecute:s=!0,shallow:c=!0,throwError:u}=null!=r?r:{},d=c?t.shallowRef(n):t.ref(n),p=t.ref(!1),f=t.ref(!1),h=t.shallowRef(void 0);async function m(t=0,...r){s&&(d.value=n),h.value=void 0,p.value=!1,f.value=!0,t>0&&await Q_(t);const o="function"==typeof e?e(...r):e;try{const e=await o;d.value=e,p.value=!0,l(e)}catch(a){if(h.value=a,i(a),u)throw a}finally{f.value=!1}return d.value}o&&m(a);const v={state:d,isReady:p,isLoading:f,error:h,execute:m};return{...v,then:(e,t)=>new Promise(((e,t)=>{oN(f).toBe(!1).then((()=>e(v))).catch(t)})).then(e,t)}}function kN(e,n={}){const{controls:r=!1,navigator:o=hN}=n,a=bN((()=>o&&"permissions"in o));let i;const l="string"==typeof e?{name:e}:e,s=t.ref(),c=()=>{i&&(s.value=i.state)},u=function(e){let t;function n(){return t||(t=e()),t}return n.reset=async()=>{const e=t;t=void 0,e&&await e},n}((async()=>{if(a.value){if(!i)try{i=await o.permissions.query(l),mN(i,"change",c),c()}catch(e){s.value="prompt"}return i}}));return u(),r?{state:s,isSupported:a,query:u}:s}function xN(e={}){const{navigator:n=hN,read:r=!1,source:o,copiedDuring:a=1500,legacy:i=!1}=e,l=bN((()=>n&&"clipboard"in n)),s=kN("clipboard-read"),c=kN("clipboard-write"),u=t.computed((()=>l.value||i)),d=t.ref(""),p=t.ref(!1),f=function(e,n,r={}){const{immediate:o=!0}=r,a=t.ref(!1);let i=null;function l(){i&&(clearTimeout(i),i=null)}function s(){a.value=!1,l()}function c(...t){l(),a.value=!0,i=setTimeout((()=>{a.value=!1,i=null,e(...t)}),U_(n))}return o&&(a.value=!0,W_&&c()),H_(s),{isPending:t.readonly(a),start:c,stop:s}}((()=>p.value=!1),a);function h(e){return"granted"===e||"prompt"===e}return u.value&&r&&mN(["copy","cut"],(function(){var e,t,r;l.value&&h(s.value)?n.clipboard.readText().then((e=>{d.value=e})):d.value=null!=(r=null==(t=null==(e=null==document?void 0:document.getSelection)?void 0:e.call(document))?void 0:t.toString())?r:""})),{isSupported:u,text:d,copied:p,copy:async function(e=U_(o)){u.value&&null!=e&&(l.value&&h(c.value)?await n.clipboard.writeText(e):function(e){const t=document.createElement("textarea");t.value=null!=e?e:"",t.style.position="absolute",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}(e),d.value=e,p.value=!0,f.start())}}}const EN="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},CN="__vueuse_ssr_handlers__",SN=ON();function ON(){return CN in EN||(EN[CN]=EN[CN]||{}),EN[CN]}const _N={boolean:{read:e=>"true"===e,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},NN="vueuse-storage";function TN(e,n,r,o={}){var a;const{flush:i="pre",deep:l=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:p=pN,eventFilter:f,onError:h=e=>{console.error(e)},initOnMounted:m}=o,v=(d?t.shallowRef:t.ref)("function"==typeof n?n():n);if(!r)try{r=function(e,t){return SN[e]||t}("getDefaultStorage",(()=>{var e;return null==(e=pN)?void 0:e.localStorage}))()}catch(S){h(S)}if(!r)return v;const g=U_(n),b=function(e){return null==e?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":"boolean"==typeof e?"boolean":"string"==typeof e?"string":"object"==typeof e?"object":Number.isNaN(e)?"any":"number"}(g),y=null!=(a=o.serializer)?a:_N[b],{pause:w,resume:k}=tN(v,(()=>function(t){try{const n=r.getItem(e);if(null==t)x(n,null),r.removeItem(e);else{const o=y.write(t);n!==o&&(r.setItem(e,o),x(n,o))}}catch(S){h(S)}}(v.value)),{flush:i,deep:l,eventFilter:f});function x(t,n){p&&p.dispatchEvent(new CustomEvent(NN,{detail:{key:e,oldValue:t,newValue:n,storageArea:r}}))}function E(n){if(!n||n.storageArea===r)if(n&&null==n.key)v.value=g;else if(!n||n.key===e){w();try{(null==n?void 0:n.newValue)!==y.write(v.value)&&(v.value=function(t){const n=t?t.newValue:r.getItem(e);if(null==n)return c&&null!=g&&r.setItem(e,y.write(g)),g;if(!t&&u){const e=y.read(n);return"function"==typeof u?u(e,g):"object"!==b||Array.isArray(e)?e:{...g,...e}}return"string"!=typeof n?n:y.read(n)}(n))}catch(S){h(S)}finally{n?t.nextTick(k):k()}}}function C(e){E(e.detail)}return p&&s&&nN((()=>{mN(p,"storage",E),mN(p,NN,C),m&&E()})),m||E(),v}const AN={multiple:!0,accept:"*",reset:!1,directory:!1};function MN(e={}){const{document:n=fN}=e,r=t.ref(null),{on:o,trigger:a}=function(){const e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);const r=()=>t(n);return H_(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map((e=>e(...t))))}}();let i;n&&(i=n.createElement("input"),i.type="file",i.onchange=e=>{const t=e.target;r.value=t.files,a(r.value)});const l=()=>{r.value=null,i&&i.value&&(i.value="",a(null))};return{files:t.readonly(r),open:t=>{if(!i)return;const n={...AN,...e,...t};var r,o;i.multiple=n.multiple,i.accept=n.accept,i.webkitdirectory=n.directory,r=n,o="capture",Object.prototype.hasOwnProperty.call(r,o)&&(i.capture=n.capture),n.reset&&l(),i.click()},reset:l,onChange:o}}const IN=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function PN(e,n={}){const{document:r=fN,autoExit:o=!1}=n,a=t.computed((()=>{var t;return null!=(t=dN(e))?t:null==r?void 0:r.querySelector("html")})),i=t.ref(!1),l=t.computed((()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find((e=>r&&e in r||a.value&&e in a.value)))),s=t.computed((()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find((e=>r&&e in r||a.value&&e in a.value)))),c=t.computed((()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find((e=>r&&e in r||a.value&&e in a.value)))),u=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find((e=>r&&e in r)),d=bN((()=>a.value&&r&&void 0!==l.value&&void 0!==s.value&&void 0!==c.value)),p=()=>{if(c.value){if(r&&null!=r[c.value])return r[c.value];{const e=a.value;if(null!=(null==e?void 0:e[c.value]))return Boolean(e[c.value])}}return!1};async function f(){if(d.value&&i.value){if(s.value)if(null!=(null==r?void 0:r[s.value]))await r[s.value]();else{const e=a.value;null!=(null==e?void 0:e[s.value])&&await e[s.value]()}i.value=!1}}async function h(){if(!d.value||i.value)return;p()&&await f();const e=a.value;l.value&&null!=(null==e?void 0:e[l.value])&&(await e[l.value](),i.value=!0)}const m=()=>{const e=p();(!e||e&&u&&(null==r?void 0:r[u])===a.value)&&(i.value=e)};return mN(r,IN,m,!1),mN((()=>dN(a)),IN,m,!1),o&&H_(f),{isSupported:d,isFullscreen:i,enter:h,exit:f,toggle:async function(){await(i.value?f():h())}}}function LN(e,n={}){const r=wN((()=>async function(e){return new Promise(((t,n)=>{const r=new Image,{src:o,srcset:a,sizes:i,class:l,loading:s,crossorigin:c,referrerPolicy:u}=e;r.src=o,a&&(r.srcset=a),i&&(r.sizes=i),l&&(r.className=l),s&&(r.loading=s),c&&(r.crossOrigin=c),u&&(r.referrerPolicy=u),r.onload=()=>t(r),r.onerror=n}))}(U_(e))),void 0,{resetOnExecute:!0,...n});return t.watch((()=>U_(e)),(()=>r.execute(n.delay)),{deep:!0}),r}function RN(e={}){const{controls:n=!1,interval:r="requestAnimationFrame"}=e,o=t.ref(new Date),a=()=>o.value=new Date,i="requestAnimationFrame"===r?yN(a,{immediate:!0}):uN(a,r,{immediate:!0});return n?{now:o,...i}:o}function BN(e={}){const{isOnline:n}=function(e={}){const{window:n=pN}=e,r=null==n?void 0:n.navigator,o=bN((()=>r&&"connection"in r)),a=t.ref(!0),i=t.ref(!1),l=t.ref(void 0),s=t.ref(void 0),c=t.ref(void 0),u=t.ref(void 0),d=t.ref(void 0),p=t.ref(void 0),f=t.ref("unknown"),h=o.value&&r.connection;function m(){r&&(a.value=r.onLine,l.value=a.value?void 0:Date.now(),s.value=a.value?Date.now():void 0,h&&(c.value=h.downlink,u.value=h.downlinkMax,p.value=h.effectiveType,d.value=h.rtt,i.value=h.saveData,f.value=h.type))}return n&&(mN(n,"offline",(()=>{a.value=!1,l.value=Date.now()})),mN(n,"online",(()=>{a.value=!0,s.value=Date.now()}))),h&&mN(h,"change",m,!1),m(),{isSupported:o,isOnline:a,saveData:i,offlineAt:l,onlineAt:s,downlink:c,downlinkMax:u,effectiveType:p,rtt:d,type:f}}(e);return n}const DN=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],VN={justNow:"just now",past:e=>e.match(/\d/)?`${e} ago`:e,future:e=>e.match(/\d/)?`in ${e}`:e,month:(e,t)=>1===e?t?"last month":"next month":`${e} month${e>1?"s":""}`,year:(e,t)=>1===e?t?"last year":"next year":`${e} year${e>1?"s":""}`,day:(e,t)=>1===e?t?"yesterday":"tomorrow":`${e} day${e>1?"s":""}`,week:(e,t)=>1===e?t?"last week":"next week":`${e} week${e>1?"s":""}`,hour:e=>`${e} hour${e>1?"s":""}`,minute:e=>`${e} minute${e>1?"s":""}`,second:e=>`${e} second${e>1?"s":""}`,invalid:""};function jN(e){return e.toISOString().slice(0,10)}function FN(e,n={}){const{controls:r=!1,updateInterval:o=3e4}=n,{now:a,...i}=RN({interval:o,controls:!0}),l=t.computed((()=>function(e,t={},n=Date.now()){var r;const{max:o,messages:a=VN,fullDateFormatter:i=jN,units:l=DN,showSecond:s=!1,rounding:c="round"}=t,u="number"==typeof c?e=>+e.toFixed(c):Math[c],d=+n-+e,p=Math.abs(d);function f(e,t){return u(Math.abs(e)/t.value)}function h(e,t){const n=f(e,t),r=e>0,o=m(t.name,n,r);return m(r?"past":"future",o,r)}function m(e,t,n){const r=a[e];return"function"==typeof r?r(t,n):r.replace("{0}",t.toString())}if(p<6e4&&!s)return a.justNow;if("number"==typeof o&&p>o)return i(new Date(e));if("string"==typeof o){const t=null==(r=l.find((e=>e.name===o)))?void 0:r.max;if(t&&p>t)return i(new Date(e))}for(const[v,g]of l.entries()){if(f(d,g)<=0&&l[v-1])return h(d,l[v-1]);if(p<g.max)return h(d,g)}return a.invalid}(new Date(U_(e)),n,U_(a))));return r?{timeAgo:l,...i}:l}const zN=function(e){let n,r=!1;const o=t.effectScope(!0);return(...t)=>(r||(n=o.run((()=>e(...t))),r=!0),n)}((()=>{const e=t.ref($_()),n=t.ref(D_),r=t.ref({}),o=t.ref(null),a=t.ref([]),i=t.ref(!1),l=t.ref(!1),s=t.ref(null),c=t.ref(!1),u=t.ref(!1);t.watch((()=>n.value.page),(({defaultBackground:e,defaultMargin:t,defaultOrientation:o,watermark:a,showBreakMarks:i})=>{r.value={size:n.value.dicts.pageSizes.find((e=>e.default)),margin:t,background:e,orientation:o,watermark:a,showBreakMarks:i,showLineNumber:!1,showToc:!1,zoomLevel:100,autoWidth:!1,preview:{enabled:!1,laserPointer:!0}}}),{immediate:!0,once:!0});return t.watch((()=>n.value.document.readOnly),(async t=>{o.value.setEditable(!t),e.value=$_()})),{toolbarKey:e,container:`#umo-editor-${$_(4)}`,options:n,page:r,editor:o,tableOfContents:a,imagePreview:i,searchReplace:l,savedAt:s,printing:c,editorDestroyed:u,setOptions:e=>{const t=(null==e?void 0:e.value)||e;return n.value=z_.merge(n.value,Object.keys(t).reduce(((e,n)=>(void 0!==t[n]&&(e[n]=t[n]),e)),{})),n.value},setEditor:e=>o.value=e,resetStore:()=>{o.value=null,a.value=[],l.value=!1,s.value=null,u.value=!0}}})),{options:$N}=zN(),HN=e=>{const t=$N.value.translations[e];return"object"==typeof t?t:{}},UN=(e,...t)=>("object"==typeof e&&null!==e||(e={}),t.forEach((t=>{null!==t&&"object"==typeof t&&Object.keys(t).forEach((n=>{t[n]&&"object"==typeof t[n]?(e[n]||(e[n]=Array.isArray(t[n])?[]:{}),UN(e[n],t[n])):e[n]=t[n]}))})),e),WN=function(e={}){const n=__VUE_I18N_LEGACY_API__&&AC(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,r=!AC(e.globalInjection)||e.globalInjection,o=!__VUE_I18N_LEGACY_API__||!n||!!e.allowComposition,a=new Map,[i,l]=function(e,n){const r=t.effectScope();{const t=__VUE_I18N_LEGACY_API__&&n?r.run((()=>d_(e))):r.run((()=>u_(e)));if(null==t)throw qO(KO.UNEXPECTED_ERROR);return[r,t]}}(e,n),s=hC("");{const e={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},get allowComposition(){return o},async install(o,...a){if(o.__VUE_I18N_SYMBOL__=s,o.provide(o.__VUE_I18N_SYMBOL__,e),RC(a[0])){const t=a[0];e.__composerExtend=t.__composerExtend,e.__vueI18nExtend=t.__vueI18nExtend}let i=null;!n&&r&&(i=function(e,n){const r=Object.create(null);C_.forEach((e=>{const o=Object.getOwnPropertyDescriptor(n,e);if(!o)throw qO(KO.UNEXPECTED_ERROR);const a=t.isRef(o.value)?{get:()=>o.value.value,set(e){o.value.value=e}}:{get:()=>o.get&&o.get()};Object.defineProperty(r,e,a)})),e.config.globalProperties.$i18n=r,S_.forEach((t=>{const r=Object.getOwnPropertyDescriptor(n,t);if(!r||!r.value)throw qO(KO.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${t}`,r)}));const o=()=>{delete e.config.globalProperties.$i18n,S_.forEach((t=>{delete e.config.globalProperties[`$${t}`]}))};return o}(o,e.global)),__VUE_I18N_FULL_INSTALL__&&w_(o,e,...a),__VUE_I18N_LEGACY_API__&&n&&o.mixin(function(e,n,r){return{beforeCreate(){const o=t.getCurrentInstance();if(!o)throw qO(KO.UNEXPECTED_ERROR);const a=this.$options;if(a.i18n){const t=a.i18n;if(a.__i18n&&(t.__i18n=a.__i18n),t.__root=n,this===this.$root)this.$i18n=k_(e,t);else{t.__injectWithOption=!0,t.__extender=r.__vueI18nExtend,this.$i18n=d_(t);const e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}}else if(a.__i18n)if(this===this.$root)this.$i18n=k_(e,a);else{this.$i18n=d_({__i18n:a.__i18n,__injectWithOption:!0,__extender:r.__vueI18nExtend,__root:n});const e=this.$i18n;e.__extender&&(e.__disposer=e.__extender(this.$i18n))}else this.$i18n=e;a.__i18nGlobal&&o_(n,a,a),this.$t=(...e)=>this.$i18n.t(...e),this.$rt=(...e)=>this.$i18n.rt(...e),this.$tc=(...e)=>this.$i18n.tc(...e),this.$te=(e,t)=>this.$i18n.te(e,t),this.$d=(...e)=>this.$i18n.d(...e),this.$n=(...e)=>this.$i18n.n(...e),this.$tm=e=>this.$i18n.tm(e),r.__setInstance(o,this.$i18n)},mounted(){},unmounted(){const e=t.getCurrentInstance();if(!e)throw qO(KO.UNEXPECTED_ERROR);const n=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__disposer&&(n.__disposer(),delete n.__disposer,delete n.__extender),r.__deleteInstance(e),delete this.$i18n}}}(l,l.__composer,e));const c=o.unmount;o.unmount=()=>{i&&i(),e.dispose(),c()}},get global(){return l},dispose(){i.stop()},__instances:a,__getInstance:function(e){return a.get(e)||null},__setInstance:function(e,t){a.set(e,t)},__deleteInstance:function(e){a.delete(e)}};return e}}({legacy:!1,locale:$N.value.locale||"zh-CN",defaultLocale:"zh-CN",messages:{"en-US":UN(N_,HN("en_US")),"zh-CN":UN(__,HN("zh_CN"))}}),GN=(e,t)=>{const{options:n}=zN();let r=null;switch(e){case"toolbar":r={mode:n.value.toolbar.defaultMode,show:!0};break;case"document":const{id:e,title:t,content:o,enableMarkdown:a,enableSpellcheck:i}=n.value.document;r={id:e,title:t,content:o,markdown:a,spellcheck:i};break;case"recent":r={fonts:[],colors:[]};break;case"print":r={singleColumn:!0,showPageNumber:!0};break;case"locale":r=WN.global.locale.value;break;default:throw new Error("[useStorage]","Key is not valid")}return TN(`umo-editor:${t||n.value.editorKey}:${e}`,r)},KN=WN.global.t,qN=e=>{const t=WN.global.locale.value.replace("-","_");return"string"==typeof e?e:"object"==typeof e?e[t]:void 0},YN=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},XN={class:"keyboard-shortcuts"},ZN={class:"keyboard-shortcuts-title"},JN={class:"keyboard-shortcuts"},QN=["innerHTML"],eT={class:"keyboard-shortcut"},tT={key:0},nT=["textContent"],rT=YN({__name:"shortcuts",setup(e){const n=GN("document"),r=t.ref([{title:KN("shortcut.commonlyUsed"),items:[{label:KN("shortcut.copy"),keys:["Ctrl","C"]},{label:KN("shortcut.paste"),keys:["Ctrl","V"]},{label:KN("shortcut.pasteAsText"),keys:["Ctrl","Shift","V"]},{label:KN("base.undo"),keys:["Ctrl","Z"]},{label:KN("base.redo"),keys:["Ctrl","Y"]},{label:KN("base.redo"),keys:["Ctrl","A"]},{label:KN("search.text"),keys:["Ctrl","F"]},{label:KN("shortcut.paragraph"),keys:["Enter"]},{label:KN("shortcut.hardBreak"),keys:["Shift","Enter"]},{label:KN("save.text"),keys:["Ctrl","S"]},{label:KN("print.text"),keys:["Ctrl","P"]}]},{title:KN("shortcut.format"),items:[{icon:"bold",tag:"b",label:KN("base.bold"),keys:["Ctrl","B"]},{icon:"italic",tag:"i",label:KN("base.italic"),keys:["Ctrl","I"]},{icon:"underline",tag:"u",label:KN("base.underline"),keys:["Ctrl","U"]},{icon:"strike",tag:"s",label:KN("base.strike"),keys:["Ctrl","Shift","X"]},{icon:"indent",label:KN("base.indent"),keys:["Tab"]},{icon:"outdent",label:KN("base.outdent"),keys:["Shift","Tab"]}]},{title:KN("shortcut.page"),items:[{label:KN("page.break"),keys:["Ctrl","Enter"]},{label:KN("shortcut.pageZoomIn"),keys:["Ctrl","+"]},{label:KN("shortcut.pageZoomOut"),keys:["Ctrl","-"]},{label:KN("shortcut.pageZoomReset"),keys:["Ctrl","1"]},{label:KN("shortcut.pageAutoWidth"),keys:["Ctrl","0"]},{label:KN("preview.title"),keys:["F5"]},{label:KN("fullscreen.title"),keys:["F11"]}]}]);return n.value.markdown&&r.value.push({title:KN("shortcut.markdown"),items:[{html:"H<sub>1</sub>",tag:"b",className:"heading1",label:KN("base.heading.text",{level:1}),keys:["#","⎵"]},{html:"H<sub>2</sub>",tag:"b",className:"heading2",label:KN("base.heading.text",{level:2}),keys:["##","⎵"]},{html:"H<sub>3</sub>",tag:"b",className:"heading3",label:KN("base.heading.text",{level:3}),keys:["###","⎵"]},{html:"H<sub>4</sub>",tag:"b",className:"heading4",label:KN("base.heading.text",{level:4}),keys:["####","⎵"]},{html:"H<sub>5</sub>",tag:"b",className:"heading5",label:KN("base.heading.text",{level:5}),keys:["#####","⎵"]},{html:"H<sub>6</sub>",tag:"b",className:"heading6",label:KN("base.heading.text",{level:6}),keys:["######","⎵"]},{icon:"bold",tag:"b",label:KN("base.bold"),keys:["**","TEXT","**"]},{icon:"italic",tag:"i",label:KN("base.italic"),keys:["*","TEXT","*"]},{icon:"strike",tag:"s",label:KN("base.strike"),keys:["~~","TEXT","~~"]},{icon:"subscript",tag:"sub",label:KN("base.subscript"),keys:["~","TEXT","~"]},{icon:"superscript",tag:"sup",label:KN("base.superscript"),keys:["^","TEXT","^"]},{icon:"bullet-list",label:`· ${KN("list.bullet.text")}`,keys:["*","⎵"]},{icon:"ordered-list",label:`1. ${KN("list.ordered.text")}`,keys:["1.","⎵"]},{icon:"task-list",label:KN("list.task.text"),keys:["[ ]","⎵"]},{icon:"quote",tag:"blockquote",label:KN("base.quote"),keys:[">","⎵"]},{icon:"code",tag:"code",label:KN("base.code"),keys:["`","TEXT","`"]},{icon:"math",label:KN("insert.math"),keys:["$","TEXT","$"]},{icon:"highlight",tag:"mark",label:KN("base.highlight.text"),keys:["==","TEXT","=="]},{icon:"hr",label:KN("insert.hr.text"),keys:["---","Enter"]}]}),(e,n)=>{const o=dC;return t.openBlock(),t.createElementBlock("div",XN,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,((n,r)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:r},[t.createElementVNode("div",ZN,t.toDisplayString(n.title),1),t.createElementVNode("ul",JN,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.items,((n,r)=>(t.openBlock(),t.createElementBlock("li",{key:r},[t.createElementVNode("span",{class:t.normalizeClass(n.className?"keyboard-shortcut-"+n.className:"")},[n.icon?(t.openBlock(),t.createBlock(o,{key:0,name:n.icon},null,8,["name"])):n.html?(t.openBlock(),t.createElementBlock("span",{key:1,class:"icon",innerHTML:n.html},null,8,QN)):t.createCommentVNode("",!0),n.tag?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),{key:2},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(n.label),1)])),_:2},1024)):(t.openBlock(),t.createElementBlock("span",{key:3,class:t.normalizeClass(n.className||"")},t.toDisplayString(n.label),3))],2),t.createElementVNode("div",eT,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.keys,(n=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:n},["TEXT"!==n?(t.openBlock(),t.createElementBlock("kbd",tT,t.toDisplayString(t.unref(pC)(n)),1)):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(e.t("shortcut.text"))},null,8,nT))],64)))),128))])])))),128))])],64)))),128))])}}},[["__scopeId","data-v-4a810e84"]]),oT={__name:"tooltip",props:{content:{}},setup(e){const{container:n}=zN();return(r,o)=>{const a=Rv;return t.openBlock(),t.createBlock(a,{content:e.content,theme:"light",placement:"top",attach:t.unref(n),"show-arrow":!1,"destroy-on-close":""},{default:t.withCtx((()=>[t.renderSlot(r.$slots,"default")])),_:3},8,["content","attach"])}}},aT="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0;function iT(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),n)}function lT(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r):e.detachEvent&&e.detachEvent("on".concat(t),n)}function sT(e,t){const n=t.slice(0,t.length-1);for(let r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function cT(e){"string"!=typeof e&&(e="");const t=(e=e.replace(/\s/g,"")).split(",");let n=t.lastIndexOf("");for(;n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}const uT={backspace:8,"⌫":8,tab:9,clear:12,enter:13,"↩":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"⇪":20,",":188,".":190,"/":191,"`":192,"-":aT?173:189,"=":aT?61:187,";":aT?59:186,"'":222,"[":219,"]":221,"\\":220},dT={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,cmd:91,command:91},pT={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},fT={16:!1,18:!1,17:!1,91:!1},hT={};for(let os=1;os<20;os++)uT["f".concat(os)]=111+os;let mT=[],vT=null,gT="all";const bT=new Map,yT=e=>uT[e.toLowerCase()]||dT[e.toLowerCase()]||e.toUpperCase().charCodeAt(0);function wT(e){gT=e||"all"}function kT(){return gT||"all"}function xT(e){if(void 0===e)Object.keys(hT).forEach((e=>{Array.isArray(hT[e])&&hT[e].forEach((e=>ET(e))),delete hT[e]})),_T(null);else if(Array.isArray(e))e.forEach((e=>{e.key&&ET(e)}));else if("object"==typeof e)e.key&&ET(e);else if("string"==typeof e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let[o,a]=n;"function"==typeof o&&(a=o,o=""),ET({key:e,scope:o,method:a,splitKey:"+"})}}const ET=e=>{let{key:t,scope:n,method:r,splitKey:o="+"}=e;cT(t).forEach((e=>{const t=e.split(o),a=t.length,i=t[a-1],l="*"===i?"*":yT(i);if(!hT[l])return;n||(n=kT());const s=a>1?sT(dT,t):[],c=[];hT[l]=hT[l].filter((e=>{const t=(!r||e.method===r)&&e.scope===n&&function(e,t){const n=e.length>=t.length?e:t,r=e.length>=t.length?t:e;let o=!0;for(let a=0;a<n.length;a++)-1===r.indexOf(n[a])&&(o=!1);return o}(e.mods,s);return t&&c.push(e.element),!t})),c.forEach((e=>_T(e)))}))};function CT(e,t,n,r){if(t.element!==r)return;let o;if(t.scope===n||"all"===t.scope){o=t.mods.length>0;for(const e in fT)Object.prototype.hasOwnProperty.call(fT,e)&&(!fT[e]&&t.mods.indexOf(+e)>-1||fT[e]&&-1===t.mods.indexOf(+e))&&(o=!1);(0!==t.mods.length||fT[16]||fT[18]||fT[17]||fT[91])&&!o&&"*"!==t.shortcut||(t.keys=[],t.keys=t.keys.concat(mT),!1===t.method(e,t)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0)))}}function ST(e,t){const n=hT["*"];let r=e.keyCode||e.which||e.charCode;if(!OT.filter.call(this,e))return;if(93!==r&&224!==r||(r=91),-1===mT.indexOf(r)&&229!==r&&mT.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach((t=>{const n=pT[t];e[t]&&-1===mT.indexOf(n)?mT.push(n):!e[t]&&mT.indexOf(n)>-1?mT.splice(mT.indexOf(n),1):"metaKey"===t&&e[t]&&3===mT.length&&(e.ctrlKey||e.shiftKey||e.altKey||(mT=mT.slice(mT.indexOf(n))))})),r in fT){fT[r]=!0;for(const e in dT)dT[e]===r&&(OT[e]=!0);if(!n)return}for(const l in fT)Object.prototype.hasOwnProperty.call(fT,l)&&(fT[l]=e[pT[l]]);e.getModifierState&&(!e.altKey||e.ctrlKey)&&e.getModifierState("AltGraph")&&(-1===mT.indexOf(17)&&mT.push(17),-1===mT.indexOf(18)&&mT.push(18),fT[17]=!0,fT[18]=!0);const o=kT();if(n)for(let l=0;l<n.length;l++)n[l].scope===o&&("keydown"===e.type&&n[l].keydown||"keyup"===e.type&&n[l].keyup)&&CT(e,n[l],o,t);if(!(r in hT))return;const a=hT[r],i=a.length;for(let l=0;l<i;l++)if(("keydown"===e.type&&a[l].keydown||"keyup"===e.type&&a[l].keyup)&&a[l].key){const n=a[l],{splitKey:r}=n,i=n.key.split(r),s=[];for(let e=0;e<i.length;e++)s.push(yT(i[e]));s.sort().join("")===mT.sort().join("")&&CT(e,n,o,t)}}function OT(e,t,n){mT=[];const r=cT(e);let o=[],a="all",i=document,l=0,s=!1,c=!0,u="+",d=!1,p=!1;for(void 0===n&&"function"==typeof t&&(n=t),"[object Object]"===Object.prototype.toString.call(t)&&(t.scope&&(a=t.scope),t.element&&(i=t.element),t.keyup&&(s=t.keyup),void 0!==t.keydown&&(c=t.keydown),void 0!==t.capture&&(d=t.capture),"string"==typeof t.splitKey&&(u=t.splitKey),!0===t.single&&(p=!0)),"string"==typeof t&&(a=t),p&&xT(e,a);l<r.length;l++)o=[],(e=r[l].split(u)).length>1&&(o=sT(dT,e)),(e="*"===(e=e[e.length-1])?"*":yT(e))in hT||(hT[e]=[]),hT[e].push({keyup:s,keydown:c,scope:a,mods:o,shortcut:r[l],method:n,key:r[l],splitKey:u,element:i});if(void 0!==i&&window){if(!bT.has(i)){const e=function(){return ST(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event,i)},t=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.event;ST(e,i),function(e){let t=e.keyCode||e.which||e.charCode;const n=mT.indexOf(t);if(n>=0&&mT.splice(n,1),e.key&&"meta"===e.key.toLowerCase()&&mT.splice(0,mT.length),93!==t&&224!==t||(t=91),t in fT){fT[t]=!1;for(const e in dT)dT[e]===t&&(OT[e]=!1)}}(e)};bT.set(i,{keydownListener:e,keyupListenr:t,capture:d}),iT(i,"keydown",e,d),iT(i,"keyup",t,d)}if(!vT){const e=()=>{mT=[]};vT={listener:e,capture:d},iT(window,"focus",e,d)}}}function _T(e){const t=Object.values(hT).flat();if(t.findIndex((t=>{let{element:n}=t;return n===e}))<0){const{keydownListener:t,keyupListenr:n,capture:r}=bT.get(e)||{};t&&n&&(lT(e,"keyup",n,r),lT(e,"keydown",t,r),bT.delete(e))}if(t.length<=0||bT.size<=0){if(Object.keys(bT).forEach((e=>{const{keydownListener:t,keyupListenr:n,capture:r}=bT.get(e)||{};t&&n&&(lT(e,"keyup",n,r),lT(e,"keydown",t,r),bT.delete(e))})),bT.clear(),Object.keys(hT).forEach((e=>delete hT[e])),vT){const{listener:e,capture:t}=vT;lT(window,"focus",e,t),vT=null}}}const NT={getPressedKeyString:function(){return mT.map((e=>{return t=e,Object.keys(uT).find((e=>uT[e]===t))||(e=>Object.keys(dT).find((t=>dT[t]===e)))(e)||String.fromCharCode(e);var t}))},setScope:wT,getScope:kT,deleteScope:function(e,t){let n,r;e||(e=kT());for(const o in hT)if(Object.prototype.hasOwnProperty.call(hT,o))for(n=hT[o],r=0;r<n.length;)if(n[r].scope===e){n.splice(r,1).forEach((e=>{let{element:t}=e;return _T(t)}))}else r++;kT()===e&&wT(t||"all")},getPressedKeyCodes:function(){return mT.slice(0)},getAllKeyCodes:function(){const e=[];return Object.keys(hT).forEach((t=>{hT[t].forEach((t=>{let{key:n,scope:r,mods:o,shortcut:a}=t;e.push({scope:r,shortcut:a,mods:o,keys:n.split("+").map((e=>yT(e)))})}))})),e},isPressed:function(e){return"string"==typeof e&&(e=yT(e)),-1!==mT.indexOf(e)},filter:function(e){const t=e.target||e.srcElement,{tagName:n}=t;let r=!0;const o="INPUT"===n&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(o||"TEXTAREA"===n||"SELECT"===n)&&!t.readOnly)&&(r=!1),r},trigger:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";Object.keys(hT).forEach((n=>{hT[n].filter((n=>n.scope===t&&n.shortcut===e)).forEach((e=>{e&&e.method&&e.method()}))}))},unbind:xT,keyMap:uT,modifier:dT,modifierMap:pT};for(const os in NT)Object.prototype.hasOwnProperty.call(NT,os)&&(OT[os]=NT[os]);if("undefined"!=typeof window){const e=window.hotkeys;OT.noConflict=t=>(t&&window.hotkeys===OT&&(window.hotkeys=e),OT),window.hotkeys=OT}const TT=(e,t)=>{OT.filter=()=>!0,OT(e,(e=>(e.preventDefault(),t(),!1)))};function AT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MT(e,t){if(e){if("string"==typeof e)return AT(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AT(e,t):void 0}}function IT(e){return function(e){if(Array.isArray(e))return AT(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||MT(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function PT(e){return(PT="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function LT(e){var t=function(e,t){if("object"!=PT(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=PT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==PT(t)?t:t+""}function RT(e,t,n){return(t=LT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var BT="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var DT=function(e){var t=PT(e);return null!=e&&("object"==t||"function"==t)},VT="object"==PT(BT)&&BT&&BT.Object===Object&&BT,jT=VT,FT="object"==("undefined"==typeof self?"undefined":PT(self))&&self&&self.Object===Object&&self,zT=jT||FT||Function("return this")(),$T=zT.Symbol,HT=$T,UT=Object.prototype,WT=UT.hasOwnProperty,GT=UT.toString,KT=HT?HT.toStringTag:void 0;var qT=function(e){var t=WT.call(e,KT),n=e[KT];try{e[KT]=void 0;var r=!0}catch(a){}var o=GT.call(e);return r&&(t?e[KT]=n:delete e[KT]),o},YT=Object.prototype.toString;var XT=qT,ZT=function(e){return YT.call(e)},JT=$T?$T.toStringTag:void 0;var QT=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":JT&&JT in Object(e)?XT(e):ZT(e)},eA=QT,tA=DT;var nA=function(e){if(!tA(e))return!1;var t=eA(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},rA=zT["__core-js_shared__"],oA=function(){var e=/[^.]+$/.exec(rA&&rA.keys&&rA.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();var aA=function(e){return!!oA&&oA in e},iA=Function.prototype.toString;var lA=function(e){if(null!=e){try{return iA.call(e)}catch(t){}try{return e+""}catch(t){}}return""},sA=nA,cA=aA,uA=DT,dA=lA,pA=/^\[object .+?Constructor\]$/,fA=Function.prototype,hA=Object.prototype,mA=fA.toString,vA=hA.hasOwnProperty,gA=RegExp("^"+mA.call(vA).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var bA=function(e){return!(!uA(e)||cA(e))&&(sA(e)?gA:pA).test(dA(e))},yA=function(e,t){return null==e?void 0:e[t]};var wA=function(e,t){var n=yA(e,t);return bA(n)?n:void 0},kA=wA(zT,"Map"),xA=wA,EA=function(){try{var e=xA(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();var CA=function(e,t){return e===t||e!=e&&t!=t},SA=EA;var OA=function(e,t,n){"__proto__"==t&&SA?SA(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},_A=OA,NA=CA,TA=Object.prototype.hasOwnProperty;var AA=function(e,t,n){var r=e[t];TA.call(e,t)&&NA(r,n)&&(void 0!==n||t in e)||_A(e,t,n)};var MA=function(){this.__data__=[],this.size=0},IA=CA;var PA=function(e,t){for(var n=e.length;n--;)if(IA(e[n][0],t))return n;return-1},LA=PA,RA=Array.prototype.splice;var BA=PA;var DA=PA;var VA=PA;var jA=MA,FA=function(e){var t=this.__data__,n=LA(t,e);return!(n<0)&&(n==t.length-1?t.pop():RA.call(t,n,1),--this.size,!0)},zA=function(e){var t=this.__data__,n=BA(t,e);return n<0?void 0:t[n][1]},$A=function(e){return DA(this.__data__,e)>-1},HA=function(e,t){var n=this.__data__,r=VA(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function UA(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}UA.prototype.clear=jA,UA.prototype.delete=FA,UA.prototype.get=zA,UA.prototype.has=$A,UA.prototype.set=HA;var WA=UA,GA=wA(Object,"create"),KA=GA;var qA=function(){this.__data__=KA?KA(null):{},this.size=0};var YA=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},XA=GA,ZA=Object.prototype.hasOwnProperty;var JA=function(e){var t=this.__data__;if(XA){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return ZA.call(t,e)?t[e]:void 0},QA=GA,eM=Object.prototype.hasOwnProperty;var tM=GA;var nM=qA,rM=YA,oM=JA,aM=function(e){var t=this.__data__;return QA?void 0!==t[e]:eM.call(t,e)},iM=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=tM&&void 0===t?"__lodash_hash_undefined__":t,this};function lM(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}lM.prototype.clear=nM,lM.prototype.delete=rM,lM.prototype.get=oM,lM.prototype.has=aM,lM.prototype.set=iM;var sM=lM,cM=WA,uM=kA;var dM=function(e){var t=PT(e);return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var pM=function(e,t){var n=e.__data__;return dM(t)?n["string"==typeof t?"string":"hash"]:n.map},fM=pM;var hM=pM;var mM=pM;var vM=pM;var gM=function(){this.size=0,this.__data__={hash:new sM,map:new(uM||cM),string:new sM}},bM=function(e){var t=fM(this,e).delete(e);return this.size-=t?1:0,t},yM=function(e){return hM(this,e).get(e)},wM=function(e){return mM(this,e).has(e)},kM=function(e,t){var n=vM(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function xM(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xM.prototype.clear=gM,xM.prototype.delete=bM,xM.prototype.get=yM,xM.prototype.has=wM,xM.prototype.set=kM;var EM=xM;var CM=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},SM=nA,OM=CM;var _M=function(e){return null!=e&&OM(e.length)&&!SM(e)};var NM=function(e){return null!=e&&"object"==PT(e)};var TM=function(e){return function(t){return e(t)}},AM={exports:{}};var MM=function(){return!1};!function(e,t){var n=zT,r=MM,o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,i=a&&a.exports===o?n.Buffer:void 0,l=(i?i.isBuffer:void 0)||r;e.exports=l}(AM,AM.exports);var IM=QT,PM=CM,LM=NM,RM={};RM["[object Float32Array]"]=RM["[object Float64Array]"]=RM["[object Int8Array]"]=RM["[object Int16Array]"]=RM["[object Int32Array]"]=RM["[object Uint8Array]"]=RM["[object Uint8ClampedArray]"]=RM["[object Uint16Array]"]=RM["[object Uint32Array]"]=!0,RM["[object Arguments]"]=RM["[object Array]"]=RM["[object ArrayBuffer]"]=RM["[object Boolean]"]=RM["[object DataView]"]=RM["[object Date]"]=RM["[object Error]"]=RM["[object Function]"]=RM["[object Map]"]=RM["[object Number]"]=RM["[object Object]"]=RM["[object RegExp]"]=RM["[object Set]"]=RM["[object String]"]=RM["[object WeakMap]"]=!1;var BM=function(e){return LM(e)&&PM(e.length)&&!!RM[IM(e)]},DM={exports:{}};!function(e,t){var n=VT,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r&&n.process,i=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(t){}}();e.exports=i}(DM,DM.exports);var VM=BM,jM=TM,FM=DM.exports,zM=FM&&FM.isTypedArray,$M=zM?jM(zM):VM,HM=Object.prototype;var UM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||HM)};var WM=function(e,t){return function(n){return e(t(n))}},GM=QT,KM=NM;var qM=function(e){return KM(e)&&"[object Arguments]"==GM(e)},YM=NM,XM=Object.prototype,ZM=XM.hasOwnProperty,JM=XM.propertyIsEnumerable,QM=qM(function(){return arguments}())?qM:function(e){return YM(e)&&ZM.call(e,"callee")&&!JM.call(e,"callee")},eI=QM,tI=Array.isArray,nI=/^(?:0|[1-9]\d*)$/;var rI=function(e,t){var n=PT(e);return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&nI.test(e))&&e>-1&&e%1==0&&e<t};var oI=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},aI=eI,iI=tI,lI=AM.exports,sI=rI,cI=$M,uI=Object.prototype.hasOwnProperty;var dI=function(e,t){var n=iI(e),r=!n&&aI(e),o=!n&&!r&&lI(e),a=!n&&!r&&!o&&cI(e),i=n||r||o||a,l=i?oI(e.length,String):[],s=l.length;for(var c in e)!t&&!uI.call(e,c)||i&&("length"==c||o&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||sI(c,s))||l.push(c);return l},pI=WA;var fI=WA,hI=kA,mI=EM;var vI=WA,gI=function(){this.__data__=new pI,this.size=0},bI=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},yI=function(e){return this.__data__.get(e)},wI=function(e){return this.__data__.has(e)},kI=function(e,t){var n=this.__data__;if(n instanceof fI){var r=n.__data__;if(!hI||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mI(r)}return n.set(e,t),this.size=n.size,this};function xI(e){var t=this.__data__=new vI(e);this.size=t.size}xI.prototype.clear=gI,xI.prototype.delete=bI,xI.prototype.get=yI,xI.prototype.has=wI,xI.prototype.set=kI;var EI=xI,CI=zT.Uint8Array,SI={exports:{}};!function(e,t){var n=zT,r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,a=o&&o.exports===r?n.Buffer:void 0,i=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}}(SI,SI.exports);var OI=CI;var _I=function(e){var t=new e.constructor(e.byteLength);return new OI(t).set(new OI(e)),t},NI=_I;var TI=function(e,t){var n=t?NI(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var AI=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t},MI=DT,II=Object.create,PI=function(){function e(){}return function(t){if(!MI(t))return{};if(II)return II(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}(),LI=WM(Object.getPrototypeOf,Object),RI=PI,BI=LI,DI=UM;var VI=function(e){return"function"!=typeof e.constructor||DI(e)?{}:RI(BI(e))},jI=AA,FI=OA;var zI=function(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var l=t[a],s=r?r(n[l],e[l],l,n,e):void 0;void 0===s&&(s=e[l]),o?FI(n,l,s):jI(n,l,s)}return n};var $I=DT,HI=UM,UI=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},WI=Object.prototype.hasOwnProperty;var GI=dI,KI=function(e){if(!$I(e))return UI(e);var t=HI(e),n=[];for(var r in e)("constructor"!=r||!t&&WI.call(e,r))&&n.push(r);return n},qI=_M;var YI=function(e){return qI(e)?GI(e,!0):KI(e)};var XI=function(e){return e};var ZI=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},JI=Math.max;var QI=function(e,t,n){return t=JI(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=JI(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var l=Array(t+1);++o<t;)l[o]=r[o];return l[t]=n(i),ZI(e,this,l)}};var eP=function(e){return function(){return e}},tP=EA,nP=tP?function(e,t){return tP(e,"toString",{configurable:!0,enumerable:!1,value:eP(t),writable:!0})}:XI,rP=Date.now;var oP=function(e){var t=0,n=0;return function(){var r=rP(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}},aP=oP(nP),iP=_M,lP=NM;var sP=function(e){return lP(e)&&iP(e)},cP=XI,uP=QI,dP=aP;var pP=function(e,t){return dP(uP(e,t,cP),e+"")},fP=QT,hP=LI,mP=NM,vP=Function.prototype,gP=Object.prototype,bP=vP.toString,yP=gP.hasOwnProperty,wP=bP.call(Object);var kP=function(e){if(!mP(e)||"[object Object]"!=fP(e))return!1;var t=hP(e);if(null===t)return!0;var n=yP.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&bP.call(n)==wP},xP=CA,EP=_M,CP=rI,SP=DT;var OP=function(e,t,n){if(!SP(n))return!1;var r=PT(t);return!!("number"==r?EP(n)&&CP(t,n.length):"string"==r&&t in n)&&xP(n[t],e)};var _P=function(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),l=i.length;l--;){var s=i[e?l:++o];if(!1===n(a[s],s,a))break}return t}}(),NP=OA,TP=CA;var AP=function(e,t,n){(void 0!==n&&!TP(e[t],n)||void 0===n&&!(t in e))&&NP(e,t,n)};var MP=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]},IP=zI,PP=YI;var LP=AP,RP=SI.exports,BP=TI,DP=AI,VP=VI,jP=eI,FP=tI,zP=sP,$P=AM.exports,HP=nA,UP=DT,WP=kP,GP=$M,KP=MP,qP=function(e){return IP(e,PP(e))};var YP=EI,XP=AP,ZP=_P,JP=function(e,t,n,r,o,a,i){var l=KP(e,n),s=KP(t,n),c=i.get(s);if(c)LP(e,n,c);else{var u=a?a(l,s,n+"",e,t,i):void 0,d=void 0===u;if(d){var p=FP(s),f=!p&&$P(s),h=!p&&!f&&GP(s);u=s,p||f||h?FP(l)?u=l:zP(l)?u=DP(l):f?(d=!1,u=RP(s,!0)):h?(d=!1,u=BP(s,!0)):u=[]:WP(s)||jP(s)?(u=l,jP(l)?u=qP(l):UP(l)&&!HP(l)||(u=VP(s))):d=!1}d&&(i.set(s,u),o(u,s,r,a,i),i.delete(s)),LP(e,n,u)}},QP=DT,eL=YI,tL=MP;var nL=function e(t,n,r,o,a){t!==n&&ZP(n,(function(i,l){if(a||(a=new YP),QP(i))JP(t,n,l,r,e,o,a);else{var s=o?o(tL(t,l),i,l+"",t,n,a):void 0;void 0===s&&(s=i),XP(t,l,s)}}),eL)},rL=pP,oL=OP;var aL=function(e){return rL((function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(o--,a):void 0,i&&oL(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var l=n[r];l&&e(t,l,r,a)}return t}))},iL=nL,lL=aL((function(e,t,n){iL(e,t,n)})),sL=nL;aL((function(e,t,n,r){sL(e,t,n,r)}));var cL=function(e){return e.ripple="ripple",e.expand="expand",e.fade="fade",e}(cL||{}),uL=lL({classPrefix:"t",animation:{include:["ripple","expand","fade"],exclude:[]},calendar:{firstDayOfWeek:1,fillWithZero:!0,controllerConfig:void 0},icon:{},input:{autocomplete:""},dialog:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,confirmBtnTheme:{default:"primary",info:"primary",warning:"primary",danger:"primary",success:"primary"}},message:{},popconfirm:{confirmBtnTheme:{default:"primary",warning:"primary",danger:"primary"}},table:{expandIcon:void 0,sortIcon:void 0,filterIcon:void 0,treeExpandAndFoldIcon:void 0,hideSortTips:!1,size:"medium"},select:{clearIcon:void 0,filterable:!1},drawer:{closeOnEscKeydown:!0,closeOnOverlayClick:!0,size:"small"},tree:{folderIcon:void 0},datePicker:{firstDayOfWeek:1},steps:{checkIcon:void 0,errorIcon:void 0},tag:{closeIcon:void 0},form:{requiredMark:void 0}},{pagination:{itemsPerPage:"{size} 条/页",jumpTo:"跳至",page:"页",total:"共 {total} 条数据"},cascader:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},calendar:{yearSelection:"{year} 年",monthSelection:"{month} 月",yearRadio:"年",monthRadio:"月",hideWeekend:"隐藏周末",showWeekend:"显示周末",today:"今天",thisMonth:"本月",week:"一,二,三,四,五,六,日",cellMonth:"1 月,2 月,3 月,4 月,5 月,6 月,7 月,8 月,9 月,10 月,11 月,12 月"},transfer:{title:"{checked} / {total} 项",empty:"暂无数据",placeholder:"请输入关键词搜索"},timePicker:{dayjsLocale:"zh-cn",now:"此刻",confirm:"确定",anteMeridiem:"上午",postMeridiem:"下午",placeholder:"选择时间"},dialog:{confirm:"确认",cancel:"取消"},drawer:{confirm:"确认",cancel:"取消"},popconfirm:{confirm:{content:"确定"},cancel:{content:"取消"}},table:{empty:"暂无数据",loadingText:"正在加载中,请稍后",loadingMoreText:"点击加载更多",filterInputPlaceholder:"请输入内容(无默认值)",sortAscendingOperationText:"点击升序",sortCancelOperationText:"点击取消排序",sortDescendingOperationText:"点击降序",clearFilterResultButtonText:"清空筛选",columnConfigButtonText:"列配置",columnConfigTitleText:"表格列配置",columnConfigDescriptionText:"请选择需要在表格中显示的数据列",confirmText:"确认",cancelText:"取消",resetText:"重置",selectAllText:"全选",searchResultText:"搜索“{result}”,找到 {count} 条结果"},select:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},tree:{empty:"暂无数据"},treeSelect:{empty:"暂无数据",loadingText:"加载中",placeholder:"请选择"},datePicker:{dayjsLocale:"zh-cn",placeholder:{date:"请选择日期",month:"请选择月份",year:"请选择年份",quarter:"请选择季度",week:"请选择周"},weekdays:["一","二","三","四","五","六","日"],months:["1 月","2 月","3 月","4 月","5 月","6 月","7 月","8 月","9 月","10 月","11 月","12 月"],quarters:["一季度","二季度","三季度","四季度"],rangeSeparator:" - ",direction:"ltr",format:"YYYY-MM-DD",dayAriaLabel:"日",weekAbbreviation:"周",yearAriaLabel:"年",monthAriaLabel:"月",confirm:"确定",selectTime:"选择时间",selectDate:"选择日期",nextYear:"下一年",preYear:"上一年",nextMonth:"下个月",preMonth:"上个月",preDecade:"上个十年",nextDecade:"下个十年",now:"当前"},upload:{sizeLimitMessage:"文件大小不能超过 {sizeLimit}",cancelUploadText:"取消上传",triggerUploadText:{fileInput:"选择文件",image:"点击上传图片",normal:"点击上传",reupload:"重新选择",continueUpload:"继续选择",delete:"删除",uploading:"上传中"},dragger:{dragDropText:"释放鼠标",draggingText:"拖拽到此区域",clickAndDragText:"点击上方“选择文件”或将文件拖拽到此区域"},file:{fileNameText:"文件名",fileSizeText:"文件大小",fileStatusText:"状态",fileOperationText:"操作",fileOperationDateText:"上传日期"},progress:{uploadingText:"上传中",waitingText:"待上传",failText:"上传失败",successText:"上传成功"}},form:{errorMessage:{date:"请输入正确的${name}",url:"请输入正确的${name}",required:"${name}必填",max:"${name}字符长度不能超过 ${validate} 个字符,一个中文等于两个字符",min:"${name}字符长度不能少于 ${validate} 个字符,一个中文等于两个字符",len:"${name}字符长度必须是 ${validate}",enum:"${name}只能是${validate}等",idcard:"请输入正确的${name}",telnumber:"请输入正确的${name}",pattern:"请输入正确的${name}",validator:"${name}不符合要求",boolean:"${name}数据类型必须是布尔类型",number:"${name}必须是数字"}},input:{placeholder:"请输入"},list:{loadingText:"正在加载中,请稍等",loadingMoreText:"点击加载更多"},alert:{expandText:"展开更多",collapseText:"收起"},anchor:{copySuccessText:"链接复制成功",copyText:"复制链接"},colorPicker:{swatchColorTitle:"系统预设颜色",recentColorTitle:"最近使用颜色",clearConfirmText:"确定清空最近使用的颜色吗?"},guide:{finishButtonProps:{content:"完成",theme:"primary"},nextButtonProps:{content:"下一步",theme:"primary"},skipButtonProps:{content:"跳过",theme:"default"},prevButtonProps:{content:"上一步",theme:"default"}},image:{errorText:"图片无法显示",loadingText:"图片加载中"},imageViewer:{errorText:"图片加载失败,可尝试重新加载",mirrorTipText:"镜像",rotateTipText:"旋转",originalSizeTipText:"原始大小"},typography:{expandText:"展开",collapseText:"收起",copiedText:"复制成功"}}),dL=Symbol("configProvide"),pL=wA(zT,"Set"),fL=WM(Object.keys,Object),hL=UM,mL=fL,vL=Object.prototype.hasOwnProperty;var gL=function(e){if(!hL(e))return mL(e);var t=[];for(var n in Object(e))vL.call(e,n)&&"constructor"!=n&&t.push(n);return t},bL=wA(zT,"DataView"),yL=kA,wL=wA(zT,"Promise"),kL=pL,xL=wA(zT,"WeakMap"),EL=QT,CL=lA,SL="[object Map]",OL="[object Promise]",_L="[object Set]",NL="[object WeakMap]",TL="[object DataView]",AL=CL(bL),ML=CL(yL),IL=CL(wL),PL=CL(kL),LL=CL(xL),RL=EL;(bL&&RL(new bL(new ArrayBuffer(1)))!=TL||yL&&RL(new yL)!=SL||wL&&RL(wL.resolve())!=OL||kL&&RL(new kL)!=_L||xL&&RL(new xL)!=NL)&&(RL=function(e){var t=EL(e),n="[object Object]"==t?e.constructor:void 0,r=n?CL(n):"";if(r)switch(r){case AL:return TL;case ML:return SL;case IL:return OL;case PL:return _L;case LL:return NL}return t});var BL=RL;var DL=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e};var VL=dI,jL=gL,FL=_M;var zL=function(e){return FL(e)?VL(e):jL(e)},$L=DL,HL=tI;var UL=function(e,t,n){var r=t(e);return HL(e)?r:$L(r,n(e))};var WL=function(){return[]},GL=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a},KL=WL,qL=Object.prototype.propertyIsEnumerable,YL=Object.getOwnPropertySymbols,XL=YL?function(e){return null==e?[]:(e=Object(e),GL(YL(e),(function(t){return qL.call(e,t)})))}:KL,ZL=UL,JL=XL,QL=zL;var eR=function(e){return ZL(e,QL,JL)};var tR=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},nR=zI,rR=zL;var oR=function(e,t){return e&&nR(t,rR(t),e)},aR=zI,iR=YI;var lR=function(e,t){return e&&aR(t,iR(t),e)},sR=zI,cR=XL;var uR=function(e,t){return sR(e,cR(e),t)},dR=DL,pR=LI,fR=XL,hR=WL,mR=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)dR(t,fR(e)),e=pR(e);return t}:hR,vR=zI,gR=mR;var bR=function(e,t){return vR(e,gR(e),t)},yR=UL,wR=mR,kR=YI;var xR=function(e){return yR(e,kR,wR)},ER=Object.prototype.hasOwnProperty;var CR=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&ER.call(e,"index")&&(n.index=e.index,n.input=e.input),n},SR=_I;var OR=function(e,t){var n=t?SR(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},_R=/\w*$/;var NR=function(e){var t=new e.constructor(e.source,_R.exec(e));return t.lastIndex=e.lastIndex,t},TR=$T?$T.prototype:void 0,AR=TR?TR.valueOf:void 0;var MR=_I,IR=OR,PR=NR,LR=function(e){return AR?Object(AR.call(e)):{}},RR=TI;var BR=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return MR(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return IR(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return RR(e,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return PR(e);case"[object Symbol]":return LR(e)}},DR=BL,VR=NM;var jR=function(e){return VR(e)&&"[object Map]"==DR(e)},FR=TM,zR=DM.exports,$R=zR&&zR.isMap,HR=$R?FR($R):jR,UR=BL,WR=NM;var GR=function(e){return WR(e)&&"[object Set]"==UR(e)},KR=TM,qR=DM.exports,YR=qR&&qR.isSet,XR=YR?KR(YR):GR,ZR=EI,JR=tR,QR=AA,eB=oR,tB=lR,nB=SI.exports,rB=AI,oB=uR,aB=bR,iB=eR,lB=xR,sB=BL,cB=CR,uB=BR,dB=VI,pB=tI,fB=AM.exports,hB=HR,mB=DT,vB=XR,gB=zL,bB=YI,yB="[object Arguments]",wB="[object Function]",kB="[object Object]",xB={};xB[yB]=xB["[object Array]"]=xB["[object ArrayBuffer]"]=xB["[object DataView]"]=xB["[object Boolean]"]=xB["[object Date]"]=xB["[object Float32Array]"]=xB["[object Float64Array]"]=xB["[object Int8Array]"]=xB["[object Int16Array]"]=xB["[object Int32Array]"]=xB["[object Map]"]=xB["[object Number]"]=xB[kB]=xB["[object RegExp]"]=xB["[object Set]"]=xB["[object String]"]=xB["[object Symbol]"]=xB["[object Uint8Array]"]=xB["[object Uint8ClampedArray]"]=xB["[object Uint16Array]"]=xB["[object Uint32Array]"]=!0,xB["[object Error]"]=xB[wB]=xB["[object WeakMap]"]=!1;var EB=function e(t,n,r,o,a,i){var l,s=1&n,c=2&n,u=4&n;if(r&&(l=a?r(t,o,a,i):r(t)),void 0!==l)return l;if(!mB(t))return t;var d=pB(t);if(d){if(l=cB(t),!s)return rB(t,l)}else{var p=sB(t),f=p==wB||"[object GeneratorFunction]"==p;if(fB(t))return nB(t,s);if(p==kB||p==yB||f&&!a){if(l=c||f?{}:dB(t),!s)return c?aB(t,tB(l,t)):oB(t,eB(l,t))}else{if(!xB[p])return a?t:{};l=uB(t,p,s)}}i||(i=new ZR);var h=i.get(t);if(h)return h;i.set(t,l),vB(t)?t.forEach((function(o){l.add(e(o,n,r,o,t,i))})):hB(t)&&t.forEach((function(o,a){l.set(a,e(o,n,r,a,t,i))}));var m=d?void 0:(u?c?lB:iB:c?bB:gB)(t);return JR(m||t,(function(o,a){m&&(o=t[a=o]),QR(l,a,e(o,n,r,a,t,i))})),l};var CB=EM,SB=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},OB=function(e){return this.__data__.has(e)};function _B(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new CB;++t<n;)this.add(e[t])}_B.prototype.add=_B.prototype.push=SB,_B.prototype.has=OB;var NB=_B,TB=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},AB=function(e,t){return e.has(t)};var MB=function(e,t,n,r,o,a){var i=1&n,l=e.length,s=t.length;if(l!=s&&!(i&&s>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,p=!0,f=2&n?new NB:void 0;for(a.set(e,t),a.set(t,e);++d<l;){var h=e[d],m=t[d];if(r)var v=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(void 0!==v){if(v)continue;p=!1;break}if(f){if(!TB(t,(function(e,t){if(!AB(f,t)&&(h===e||o(h,e,n,r,a)))return f.push(t)}))){p=!1;break}}else if(h!==m&&!o(h,m,n,r,a)){p=!1;break}}return a.delete(e),a.delete(t),p};var IB=CI,PB=CA,LB=MB,RB=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},BB=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},DB=$T?$T.prototype:void 0,VB=DB?DB.valueOf:void 0;var jB=function(e,t,n,r,o,a,i){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!a(new IB(e),new IB(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return PB(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var l=RB;case"[object Set]":var s=1&r;if(l||(l=BB),e.size!=t.size&&!s)return!1;var c=i.get(e);if(c)return c==t;r|=2,i.set(e,t);var u=LB(l(e),l(t),r,o,a,i);return i.delete(e),u;case"[object Symbol]":if(VB)return VB.call(e)==VB.call(t)}return!1},FB=eR,zB=Object.prototype.hasOwnProperty;var $B=EI,HB=MB,UB=jB,WB=function(e,t,n,r,o,a){var i=1&n,l=FB(e),s=l.length;if(s!=FB(t).length&&!i)return!1;for(var c=s;c--;){var u=l[c];if(!(i?u in t:zB.call(t,u)))return!1}var d=a.get(e),p=a.get(t);if(d&&p)return d==t&&p==e;var f=!0;a.set(e,t),a.set(t,e);for(var h=i;++c<s;){var m=e[u=l[c]],v=t[u];if(r)var g=i?r(v,m,u,t,e,a):r(m,v,u,e,t,a);if(!(void 0===g?m===v||o(m,v,n,r,a):g)){f=!1;break}h||(h="constructor"==u)}if(f&&!h){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(f=!1)}return a.delete(e),a.delete(t),f},GB=BL,KB=tI,qB=AM.exports,YB=$M,XB="[object Arguments]",ZB="[object Array]",JB="[object Object]",QB=Object.prototype.hasOwnProperty;var eD=function(e,t,n,r,o,a){var i=KB(e),l=KB(t),s=i?ZB:GB(e),c=l?ZB:GB(t),u=(s=s==XB?JB:s)==JB,d=(c=c==XB?JB:c)==JB,p=s==c;if(p&&qB(e)){if(!qB(t))return!1;i=!0,u=!1}if(p&&!u)return a||(a=new $B),i||YB(e)?HB(e,t,n,r,o,a):UB(e,t,s,n,r,o,a);if(!(1&n)){var f=u&&QB.call(e,"__wrapped__"),h=d&&QB.call(t,"__wrapped__");if(f||h){var m=f?e.value():e,v=h?t.value():t;return a||(a=new $B),o(m,v,n,r,a)}}return!!p&&(a||(a=new $B),WB(e,t,n,r,o,a))},tD=NM;var nD=function e(t,n,r,o,a){return t===n||(null==t||null==n||!tD(t)&&!tD(n)?t!=t&&n!=n:eD(t,n,r,o,e,a))},rD=nD;var oD=function(e,t){return rD(e,t)},aD=QT,iD=NM;var lD=function(e){return"symbol"==PT(e)||iD(e)&&"[object Symbol]"==aD(e)};var sD=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o},cD=sD,uD=tI,dD=lD,pD=$T?$T.prototype:void 0,fD=pD?pD.toString:void 0;var hD=function e(t){if("string"==typeof t)return t;if(uD(t))return cD(t,e)+"";if(dD(t))return fD?fD.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n},mD=hD;var vD=function(e){return null==e?"":mD(e)},gD=tI,bD=lD,yD=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,wD=/^\w*$/;var kD=function(e,t){if(gD(e))return!1;var n=PT(e);return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!bD(e))||(wD.test(e)||!yD.test(e)||null!=t&&e in Object(t))},xD=EM;function ED(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function n(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(ED.Cache||xD),n}ED.Cache=xD;var CD=ED;var SD=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,OD=/\\(\\)?/g,_D=function(e){var t=CD(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(SD,(function(e,n,r,o){t.push(r?o.replace(OD,"$1"):n||e)})),t})),ND=tI,TD=kD,AD=_D,MD=vD;var ID=function(e,t){return ND(e)?e:TD(e,t)?[e]:AD(MD(e))},PD=lD;var LD=function(e){if("string"==typeof e||PD(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t},RD=ID,BD=LD;var DD=function(e,t){for(var n=0,r=(t=RD(t,e)).length;null!=e&&n<r;)e=e[BD(t[n++])];return n&&n==r?e:void 0},VD=DD;var jD=function(e,t,n){var r=null==e?void 0:VD(e,t);return void 0===r?n:r};var FD=ID,zD=eI,$D=tI,HD=rI,UD=CM,WD=LD;var GD=function(e,t){return null!=e&&t in Object(e)},KD=function(e,t,n){for(var r=-1,o=(t=FD(t,e)).length,a=!1;++r<o;){var i=WD(t[r]);if(!(a=null!=e&&n(e,i)))break;e=e[i]}return a||++r!=o?a:!!(o=null==e?0:e.length)&&UD(o)&&HD(i,o)&&($D(e)||zD(e))};var qD=function(e,t){return null!=e&&KD(e,t,GD)};var YD=function(e){return function(t){return null==t?void 0:t[e]}};function XD(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],s=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t);else for(;!(s=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);s=!0);}catch(u){c=!0,o=u}finally{try{if(!s&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return l}}(e,t)||MT(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ZD(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}var JD=QT,QD=tI,eV=NM;var tV=function(e){return"string"==typeof e||!QD(e)&&eV(e)&&"[object String]"==JD(e)};function nV(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rV(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nV(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nV(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function oV(e){var t,n,r,o={};if(e&&"undefined"!=typeof window){var a=null===(t=window)||void 0===t||null===(n=t.getComputedStyle)||void 0===n?void 0:n.call(t,e),i=a.color,l=a.fontSize,s=null===(r=window)||void 0===r||null===(r=r.navigator)||void 0===r?void 0:r.userAgent,c=/Safari/.test(s)&&!/Chrome/.test(s),u=/(?=.*iPhone)[?=.*MicroMessenger]/.test(s)&&!/Chrome/.test(s);if((c||u)&&(o={transformOrigin:"0px 0px",transform:"scale(".concat(parseInt(l,10)/12,")")}),i&&function(){if("undefined"==typeof navigator||!navigator)return Number.MAX_SAFE_INTEGER;var e=navigator.userAgent,t=e.indexOf("compatible")>-1&&e.indexOf("MSIE")>-1,n=e.indexOf("Trident")>-1&&e.indexOf("rv:11.0")>-1;if(t){var r=new RegExp("MSIE (\\d+\\.\\d+);"),o=e.match(r);if(!o)return-1;var a=parseFloat(o[1]);return a<7?6:a}return n?11:Number.MAX_SAFE_INTEGER}()>11){var d=i.match(/[\d.]+/g),p=d?"rgba(".concat(d[0],", ").concat(d[1],", ").concat(d[2],", 0)"):"";ZD(e,rV(rV({},o),{},{background:"conic-gradient(from 90deg at 50% 50%,".concat(p," 0deg, ").concat(i," 360deg)")}))}else ZD(e,rV(rV({},o),{},{background:""}))}}var aV=t.ref();function iV(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,n=arguments.length>1?arguments[1]:void 0,r=t.getCurrentInstance()?t.inject(dL,null):aV,o=t.computed((function(){return(null==r?void 0:r.value)||uL})),a=t.computed((function(){return Object.assign({},o.value[e],n)}));return{t:function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];var a=r[0];if(tV(e)){if(!a)return e;return e.replace(/\{\s*([\w-]+)\s*\}/g,(function(e,t){return a?String(a[t]):""}))}return nA(e)?r.length?e.apply(void 0,r):e(t.h):""},global:a,globalConfig:a,classPrefix:t.computed((function(){return o.value.classPrefix}))}}function lV(e){var n=iV("classPrefix").classPrefix;return t.computed((function(){return e?"".concat(n.value,"-").concat(e):n.value}))}function sV(){var e=iV("classPrefix").classPrefix;return{SIZE:t.computed((function(){return{small:"".concat(e.value,"-size-s"),medium:"".concat(e.value,"-size-m"),large:"".concat(e.value,"-size-l"),default:"",xs:"".concat(e.value,"-size-xs"),xl:"".concat(e.value,"-size-xl"),block:"".concat(e.value,"-size-full-width")}})),STATUS:t.computed((function(){return{loading:"".concat(e.value,"-is-loading"),loadMore:"".concat(e.value,"-is-load-more"),disabled:"".concat(e.value,"-is-disabled"),focused:"".concat(e.value,"-is-focused"),success:"".concat(e.value,"-is-success"),error:"".concat(e.value,"-is-error"),warning:"".concat(e.value,"-is-warning"),selected:"".concat(e.value,"-is-selected"),active:"".concat(e.value,"-is-active"),checked:"".concat(e.value,"-is-checked"),current:"".concat(e.value,"-is-current"),hidden:"".concat(e.value,"-is-hidden"),visible:"".concat(e.value,"-is-visible"),expanded:"".concat(e.value,"-is-expanded"),indeterminate:"".concat(e.value,"-is-indeterminate")}}))}}var cV=t.defineComponent({name:"TLoadingGradient",setup:function(){var e=lV();return t.onMounted((function(){var e=t.getCurrentInstance().refs.circle;t.nextTick((function(){oV(e)}))})),{classPrefix:e}},render:function(){var e=this.classPrefix,n="".concat(e,"-loading__gradient"),r=[n,"".concat(e,"-icon-loading")];return t.createVNode("svg",{class:r,viewBox:"0 0 12 12",version:"1.1",width:"1em",height:"1em",xmlns:"http://www.w3.org/2000/svg"},[t.createVNode("foreignObject",{x:"0",y:"0",width:"12",height:"12"},[t.createVNode("div",{class:"".concat(n,"-conic"),ref:"circle"},null)])])}}),uV={exports:{}},dV={exports:{}};(function(){var e,t,n,r,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?dV.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(dV.exports=function(){return(e()-o)/1e6},t=process.hrtime,r=(e=function(){var e;return 1e9*(e=t())[0]+e[1]})(),a=1e9*process.uptime(),o=r-a):Date.now?(dV.exports=function(){return Date.now()-n},n=Date.now()):(dV.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(BT);for(var pV=dV.exports,fV="undefined"==typeof window?BT:window,hV=["moz","webkit"],mV="AnimationFrame",vV=fV["request"+mV],gV=fV["cancel"+mV]||fV["cancelRequest"+mV],bV=0;!vV&&bV<hV.length;bV++)vV=fV[hV[bV]+"Request"+mV],gV=fV[hV[bV]+"Cancel"+mV]||fV[hV[bV]+"CancelRequest"+mV];if(!vV||!gV){var yV=0,wV=0,kV=[],xV=1e3/60;vV=function(e){if(0===kV.length){var t=pV(),n=Math.max(0,xV-(t-yV));yV=n+t,setTimeout((function(){var e=kV.slice(0);kV.length=0;for(var t=function(){if(!e[n].cancelled)try{e[n].callback(yV)}catch(t){setTimeout((function(){throw t}),0)}},n=0;n<e.length;n++)t()}),Math.round(n))}return kV.push({handle:++wV,callback:e,cancelled:!1}),wV},gV=function(e){for(var t=0;t<kV.length;t++)kV[t].handle===e&&(kV[t].cancelled=!0)}}uV.exports=function(e){return vV.call(fV,e)},uV.exports.cancel=function(){gV.apply(fV,arguments)},uV.exports.polyfill=function(e){e||(e=fV),e.requestAnimationFrame=vV,e.cancelAnimationFrame=gV};var EV=function(e){return(e||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function CV(e,t){if(!e||!t)return!1;if(-1!==t.indexOf(" "))throw new Error("className should not contain space.");return e.classList?e.classList.contains(t):" ".concat(e.className," ").indexOf(" ".concat(t," "))>-1}function SV(e,t){if(e){for(var n=e.className,r=(t||"").split(" "),o=0,a=r.length;o<a;o++){var i=r[o];i&&(e.classList?e.classList.add(i):CV(e,i)||(n+=" ".concat(i)))}e.classList||(e.className=n)}}function OV(e,t){if(e&&t){for(var n=t.split(" "),r=" ".concat(e.className," "),o=0,a=n.length;o<a;o++){var i=n[o];i&&(e.classList?e.classList.remove(i):CV(e,i)&&(r=r.replace(" ".concat(i," ")," ")))}e.classList||(e.className=EV(r))}}var _V=function(e,t){var n=nA(e)?e(t):e;return n?tV(n)?document.querySelector(n):n instanceof HTMLElement?n:document.body:document.body},NV=gL,TV=BL,AV=eI,MV=tI,IV=_M,PV=AM.exports,LV=UM,RV=$M,BV=Object.prototype.hasOwnProperty;var DV=function(e){if(null==e)return!0;if(IV(e)&&(MV(e)||"string"==typeof e||"function"==typeof e.splice||PV(e)||RV(e)||AV(e)))return!e.length;var t=TV(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(LV(e))return!NV(e).length;for(var n in e)if(BV.call(e,n))return!1;return!0};var VV=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a},jV=VV;var FV=function(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:jV(e,t,n)},zV=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var $V=function(e){return zV.test(e)};var HV=function(e){return e.split("")},UV="\\ud800-\\udfff",WV="["+UV+"]",GV="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",KV="\\ud83c[\\udffb-\\udfff]",qV="[^"+UV+"]",YV="(?:\\ud83c[\\udde6-\\uddff]){2}",XV="[\\ud800-\\udbff][\\udc00-\\udfff]",ZV="(?:"+GV+"|"+KV+")"+"?",JV="[\\ufe0e\\ufe0f]?",QV=JV+ZV+("(?:\\u200d(?:"+[qV,YV,XV].join("|")+")"+JV+ZV+")*"),ej="(?:"+[qV+GV+"?",GV,YV,XV,WV].join("|")+")",tj=RegExp(KV+"(?="+KV+")|"+ej+QV,"g");var nj=HV,rj=$V,oj=function(e){return e.match(tj)||[]};var aj=function(e){return rj(e)?oj(e):nj(e)};var ij=function(e,t,n,r){var o=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++o]);++o<a;)n=t(n,e[o],o,e);return n};var lj=function(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),sj=vD,cj=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,uj=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var dj=function(e){return(e=sj(e))&&e.replace(cj,lj).replace(uj,"")},pj=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var fj=function(e){return e.match(pj)||[]},hj=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var mj=function(e){return hj.test(e)},vj="\\ud800-\\udfff",gj="\\u2700-\\u27bf",bj="a-z\\xdf-\\xf6\\xf8-\\xff",yj="A-Z\\xc0-\\xd6\\xd8-\\xde",wj="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kj="["+wj+"]",xj="\\d+",Ej="["+gj+"]",Cj="["+bj+"]",Sj="[^"+vj+wj+xj+gj+bj+yj+"]",Oj="(?:\\ud83c[\\udde6-\\uddff]){2}",_j="[\\ud800-\\udbff][\\udc00-\\udfff]",Nj="["+yj+"]",Tj="(?:"+Cj+"|"+Sj+")",Aj="(?:"+Nj+"|"+Sj+")",Mj="(?:['’](?:d|ll|m|re|s|t|ve))?",Ij="(?:['’](?:D|LL|M|RE|S|T|VE))?",Pj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Lj="[\\ufe0e\\ufe0f]?",Rj=Lj+Pj+("(?:\\u200d(?:"+["[^"+vj+"]",Oj,_j].join("|")+")"+Lj+Pj+")*"),Bj="(?:"+[Ej,Oj,_j].join("|")+")"+Rj,Dj=RegExp([Nj+"?"+Cj+"+"+Mj+"(?="+[kj,Nj,"$"].join("|")+")",Aj+"+"+Ij+"(?="+[kj,Nj+Tj,"$"].join("|")+")",Nj+"?"+Tj+"+"+Mj,Nj+"+"+Ij,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xj,Bj].join("|"),"g");var Vj=fj,jj=mj,Fj=vD,zj=function(e){return e.match(Dj)||[]};var $j=ij,Hj=dj,Uj=function(e,t,n){return e=Fj(e),void 0===(t=n?void 0:t)?jj(e)?zj(e):Vj(e):e.match(t)||[]},Wj=RegExp("['’]","g");var Gj=function(e){return function(t){return $j(Uj(Hj(t).replace(Wj,"")),e,"")}},Kj=FV,qj=$V,Yj=aj,Xj=vD;var Zj=function(e){return function(t){t=Xj(t);var n=qj(t)?Yj(t):void 0,r=n?n[0]:t.charAt(0),o=n?Kj(n,1).join(""):t.slice(1);return r[e]()+o}}("toUpperCase"),Jj=vD,Qj=Zj;var eF=function(e){return Qj(Jj(e).toLowerCase())},tF=Gj((function(e,t,n){return t=t.toLowerCase(),e+(n?eF(t):t)})),nF=Gj((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}));function rF(e){var n;return DT(e)&&"defaultNode"in e?n=e.defaultNode:(t.isVNode(e)||tV(e))&&(n=e),n}function oF(e){return DT(e)&&"params"in e?e.params:{}}function aF(e,t,n){var r,o,a,i,l=null===(r=(o=e.$slots)[tF(n)])||void 0===r?void 0:r.call(o,t);return l||((l=null===(a=(i=e.$slots)[nF(n)])||void 0===a?void 0:a.call(i,t))||null)}var iF=function(e,n,r){var o,a=oF(r),i=rF(r);if(n in e&&(o=e[n]),!1!==o&&null!==o)return!0===o&&i?aF(e,a,n)||i:nA(o)?o(t.h,a):[void 0,a,""].includes(o)&&(e.$slots[tF(n)]||e.$slots[nF(n)])?aF(e,a,n):o},lF={attach:{type:[String,Function],default:""},content:{type:[String,Function]},default:{type:[String,Function]},delay:{type:Number,default:0},fullscreen:Boolean,indicator:{type:[Boolean,Function],default:!0},inheritColor:Boolean,loading:{type:Boolean,default:!0},preventScrollThrough:{type:Boolean,default:!0},showOverlay:{type:Boolean,default:!0},size:{type:String,default:"medium"},text:{type:[String,Function]},zIndex:{type:Number}},sF=function(e,n){var r=nA(e)?t.computed(e):t.ref(e),o=nA(n)?t.computed(n):t.ref(n),a=t.ref(),i=function(){a.value=_V(r.value,o.value)};return t.onMounted((function(){return i()})),t.watch([r,o],(function(){return i()})),a},cF=t.defineComponent({name:"TLoading",inheritAttrs:!1,props:lF,setup:function(e,n){var r=n.slots,o=t.ref(!1),a={name:lV("loading"),centerClass:lV("loading--center"),fullscreenClass:lV("loading__fullscreen"),lockClass:lV("loading--lock"),overlayClass:lV("loading__overlay"),relativeClass:lV("loading__parent"),fullClass:lV("loading--full"),inheritColorClass:lV("loading--inherit-color")},i=a.name,l=a.centerClass,s=a.fullscreenClass,c=a.lockClass,u=a.overlayClass,d=a.relativeClass,p=a.fullClass,f=a.inheritColorClass,h=lV(),m=sV().SIZE,v=function(){o.value=!1;var t=setTimeout((function(){o.value=!0,clearTimeout(t)}),e.delay)},g=sF((function(){return e.attach})),b=t.computed((function(){return Boolean(!e.delay||e.delay&&o.value)})),y=t.computed((function(){var t={};return void 0!==e.zIndex&&(t.zIndex=e.zIndex),["small","medium","large"].includes(e.size)||(t["font-size"]=e.size),t})),w=t.computed((function(){return Boolean(e.default||r.default||e.content||r.content)})),k=t.computed((function(){return e.preventScrollThrough&&e.fullscreen})),x=t.computed((function(){return Boolean(e.text||r.text)})),E=t.computed((function(){return w.value&&e.loading&&b.value})),C=t.computed((function(){return e.fullscreen&&e.loading&&b.value})),S=t.computed((function(){return e.attach&&e.loading&&b.value})),O=t.computed((function(){return e.attach&&e.loading&&b.value})),_=t.computed((function(){var t=[l.value,m.value[e.size],RT({},f.value,e.inheritColor)],n=[i.value,s.value,l.value,u.value];return{baseClasses:t,attachClasses:t.concat([i.value,p.value,RT({},u.value,e.showOverlay)]),withContentClasses:t.concat([i.value,p.value,RT({},u.value,e.showOverlay)]),fullScreenClasses:n,normalClasses:t.concat([i.value])}})),N=t.toRefs(e).loading;return t.watch([N],(function(e){XD(e,1)[0]?(v(),k.value&&SV(document.body,c.value)):k.value&&OV(document.body,c.value)})),t.onMounted((function(){e.delay&&v()})),{classPrefix:h,relativeClass:d,delayShowLoading:o,styles:y,showText:x,hasContent:w,classes:_,lockFullscreen:k,showWrapLoading:E,showNormalLoading:S,showFullScreenLoading:C,showAttachedLoading:O,teleportElement:g}},render:function(){var e,n,r,o,a,i,l,s,c,u,d=this,p=this.classes,f=p.fullScreenClasses,h=p.baseClasses,m=p.withContentClasses,v=p.attachClasses,g=p.normalClasses,b=t.createVNode(cV,{size:this.size},null),y=this.loading&&iF(this,"indicator",b),w=this.showText&&t.createVNode("div",{class:"".concat(this.classPrefix,"-loading__text")},[iF(this,"text")]);return this.fullscreen?this.showFullScreenLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:f,style:d.styles},d.$attrs),[t.createVNode("div",{class:h},[y,w])])]}}):null:this.hasContent?t.createVNode("div",t.mergeProps({class:this.relativeClass},this.$attrs),[(e=this,n="default",r="content",a=oF(o),i=rF(o),l=a?{params:a}:void 0,s=iF(e,n,l),c=iF(e,r,l),u=DV(s)?c:s,DV(u)?i:u),this.showWrapLoading&&t.createVNode("div",{class:m,style:this.styles},[y,w])]):this.attach?this.showAttachedLoading&&this.loading?t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode("div",t.mergeProps({class:v,style:d.styles},d.$attrs),[y,w])]}}):null:this.loading?t.createVNode("div",t.mergeProps({class:g,style:this.styles},this.$attrs),[y,w]):null}});function uF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var dF=null;function pF(e){var n=function(e){return lL({fullscreen:!1,attach:"body",loading:!0,preventScrollThrough:!0},e)}(e);if(n.fullscreen&&dF)return dF;var r=t.defineComponent({setup:function(){return{loadingOptions:t.reactive(n)}},render:function(){return t.h(cF,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uF(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uF(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this.loadingOptions))}}),o=_V(n.fullscreen?"body":n.attach),a=t.createApp(r),i=a.mount(document.createElement("div")),l=lV("loading__parent--relative").value,s=lV("loading--lock");return n.preventScrollThrough&&n.fullscreen&&SV(document.body,s.value),o?SV(o,l):console.error("attach is not exist"),{hide:function(){i.loading=!1,OV(o,l),OV(document.body,s.value),a.unmount()}}}function fF(e){return!0===e?dF=pF({fullscreen:!0,loading:!0,attach:"body",preventScrollThrough:!0}):!1===e?(null===(t=dF)||void 0===t||t.hide(),void(dF=null)):pF(e);var t}var hF=fF;hF.install=function(e){e.config.globalProperties.$loading=fF};var mF=_P,vF=zL;var gF=EI,bF=nD;var yF=DT;var wF=function(e){return e==e&&!yF(e)},kF=wF,xF=zL;var EF=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}},CF=function(e,t,n,r){var o=n.length,a=o,i=!r;if(null==e)return!a;for(e=Object(e);o--;){var l=n[o];if(i&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++o<a;){var s=(l=n[o])[0],c=e[s],u=l[1];if(i&&l[2]){if(void 0===c&&!(s in e))return!1}else{var d=new gF;if(r)var p=r(c,u,s,e,t,d);if(!(void 0===p?bF(u,c,3,r,d):p))return!1}}return!0},SF=function(e){for(var t=xF(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,kF(o)]}return t},OF=EF;var _F=nD,NF=jD,TF=qD,AF=kD,MF=wF,IF=EF,PF=LD;var LF=DD;var RF=YD,BF=function(e){return function(t){return LF(t,e)}},DF=kD,VF=LD;var jF=function(e){var t=SF(e);return 1==t.length&&t[0][2]?OF(t[0][0],t[0][1]):function(n){return n===e||CF(n,e,t)}},FF=function(e,t){return AF(e)&&MF(t)?IF(PF(e),t):function(n){var r=NF(n,e);return void 0===r&&r===t?TF(n,e):_F(t,r,3)}},zF=XI,$F=tI,HF=function(e){return DF(e)?RF(VF(e)):BF(e)};var UF=OA,WF=function(e,t){return e&&mF(e,t,vF)},GF=function(e){return"function"==typeof e?e:null==e?zF:"object"==PT(e)?$F(e)?FF(e[0],e[1]):jF(e):HF(e)};var KF=function(e,t){var n={};return t=GF(t),WF(e,(function(e,r,o){UF(n,t(e,r,o),e)})),n},qF=Symbol("TdLoading"),YF=function(e,t){var n=t.modifiers,r=n.fullscreen,o=n.inheritColor,a={attach:function(){return e},fullscreen:null!=r&&r,inheritColor:null!=o&&o,loading:t.value};DT(t.value)&&KF(t.value,(function(e,t){a[t]=e})),e[qF]={options:a,instance:hF(a)}},XF={mounted:function(e,t){t.value&&YF(e,t)},updated:function(e,t){var n,r=e[qF],o=t.value,a=t.oldValue;oD(o,a)||((null!==(n=null==o?void 0:o.loading)&&void 0!==n?n:o)?YF(e,t):null==r||r.instance.hide())},unmounted:function(e){var t;null===(t=e[qF])||void 0===t||t.instance.hide()}};function ZF(e,t,n){var r=e;return r.install=function(o,a){o.component(t||a||r.name,e),n&&o.directive(n.name,n.comp)},r}var JF=ZF(cF,cF.name,{name:"loading",comp:XF}),QF={block:Boolean,content:{type:[String,Function]},default:{type:[String,Function]},disabled:{type:Boolean,default:void 0},ghost:Boolean,href:{type:String,default:""},icon:{type:Function},loading:Boolean,loadingProps:{type:Object},shape:{type:String,default:"rectangle",validator:function(e){return!e||["rectangle","square","round","circle"].includes(e)}},size:{type:String,default:"medium",validator:function(e){return!e||["extra-small","small","medium","large"].includes(e)}},suffix:{type:Function},tag:{type:String,validator:function(e){return!e||["button","a","div"].includes(e)}},theme:{type:String,validator:function(e){return!e||["default","primary","danger","warning","success"].includes(e)}},type:{type:String,default:"button",validator:function(e){return!e||["submit","reset","button"].includes(e)}},variant:{type:String,default:"base",validator:function(e){return!e||["base","outline","dashed","text"].includes(e)}},onClick:Function},ez=cL.expand,tz=cL.ripple,nz=cL.fade;function rz(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function oz(e,n){var r,o,a=t.ref(null),i=lV(),l=(r=iV("animation").globalConfig,{keepExpand:(o=function(e){var t,n,o=r.value;return o&&!(null!==(t=o.exclude)&&void 0!==t&&t.includes(e))&&(null===(n=o.include)||void 0===n?void 0:n.includes(e))})(ez),keepRipple:o(tz),keepFade:o(nz)}).keepRipple,s=function(t){var n=e.value,r=function(e){var t;if(null!=e&&null!==(t=e.dataset)&&void 0!==t&&t.ripple)return e.dataset.ripple;var n=getComputedStyle(e).getPropertyValue("--ripple-color");return n||"rgba(0, 0, 0, 0.35)"}(n);if(0===t.button&&e&&l&&!(n.classList.contains("".concat(i.value,"-is-active"))||n.classList.contains("".concat(i.value,"-is-disabled"))||n.classList.contains("".concat(i.value,"-is-checked"))||n.classList.contains("".concat(i.value,"-is-loading")))){var o=getComputedStyle(n),s=parseInt(o.borderWidth,10),c=s>0?s:0,u=n.offsetWidth,d=n.offsetHeight;null===a.value.parentNode&&(rz(a.value,{position:"absolute",left:"".concat(0-c,"px"),top:"".concat(0-c,"px"),width:"".concat(u,"px"),height:"".concat(d,"px"),borderRadius:o.borderRadius,pointerEvents:"none",overflow:"hidden"}),n.appendChild(a.value));var p=document.createElement("div");rz(p,{marginTop:"0",marginLeft:"0",right:"".concat(u,"px"),width:"".concat(u+20,"px"),height:"100%",transition:"transform ".concat(200,"ms cubic-bezier(.38, 0, .24, 1), background ").concat(400,"ms linear"),transform:"skewX(-8deg)",pointerEvents:"none",position:"absolute",zIndex:0,backgroundColor:r,opacity:"0.9"});for(var f=new WeakMap,h=n.children.length,m=0;m<h;++m){var v=n.children[m];""===v.style.zIndex&&v!==a.value&&(v.style.zIndex="1",f.set(v,!0))}var g=n.style.position?n.style.position:getComputedStyle(n).position;""!==g&&"static"!==g||(n.style.position="relative"),a.value.insertBefore(p,a.value.firstChild),setTimeout((function(){p.style.transform="translateX(".concat(u,"px)")}),0);var b=function t(){p.style.backgroundColor="rgba(0, 0, 0, 0)",e.value&&(e.value.removeEventListener("pointerup",t,!1),e.value.removeEventListener("pointerleave",t,!1),setTimeout((function(){p.remove(),0===a.value.children.length&&a.value.remove()}),500))};e.value.addEventListener("pointerup",b,!1),e.value.addEventListener("pointerleave",b,!1)}};t.onMounted((function(){var t=null==e?void 0:e.value;t&&(a.value=document.createElement("div"),t.addEventListener("pointerdown",s,!1))})),t.onUnmounted((function(){var t;null==e||null===(t=e.value)||void 0===t||t.removeEventListener("pointerdown",s,!1)}))}function az(e,t,n){var r,o,a,i,l=null===(r=(o=e.slots)[tF(t)])||void 0===r?void 0:r.call(o,n);return l&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length||(l=null===(a=(i=e.slots)[nF(t)])||void 0===a?void 0:a.call(i,n))&&l.filter((function(e){return"Symbol(v-cmt)"!==e.type.toString()})).length?l:null}function iz(e){return!![void 0,null,""].includes(e)||!(e instanceof Array?e:[e]).filter((function(e){var t;return"Symbol(Comment)"!==(null==e||null===(t=e.type)||void 0===t?void 0:t.toString())})).length}var lz=function(){var e=t.getCurrentInstance();return function(n,r){var o,a=oF(r),i=rF(r),l=function(e){return DT(e)&&"slotFirst"in e?e.slotFirst:{}}(r);if(Object.keys(e.props).includes(n)&&(o=e.props[n]),!1!==o&&null!==o)return!0===o?az(e,n,a)||i:nA(o)?o(t.h,a):([void 0,a,""].includes(o)||l)&&(e.slots[tF(n)]||e.slots[nF(n)])?az(e,n,a):o}},sz=function(){var e=lz();return function(t,n,r){var o=oF(r),a=rF(r),i=o?{params:o}:void 0,l=e(t,i),s=e(n,i),c=iz(l)?s:l;return iz(c)?a:c}},cz=QT,uz=NM;var dz=function(e){return!0===e||!1===e||uz(e)&&"[object Boolean]"==cz(e)};function pz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pz(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var hz=ZF(t.defineComponent({name:"TButton",props:QF,setup:function(e,n){var r=n.attrs,o=n.slots,a=lz(),i=sz(),l=lV("button"),s=sV(),c=s.STATUS,u=s.SIZE,d=t.ref();oz(d);var p,f,h,m,v=(f=t.getCurrentInstance(),h=t.computed((function(){return f.props.disabled})),m=t.inject("formDisabled",Object.create(null)),t.computed((function(){var e;return dz(void 0)?p.beforeDisabled.value:dz(h.value)?h.value:dz(void 0)?p.afterDisabled.value:!!dz(null===(e=m.disabled)||void 0===e?void 0:e.value)&&m.disabled.value}))),g=t.computed((function(){var t=e.theme,n=e.variant;return t||("base"===n?"primary":"default")})),b=t.computed((function(){return["".concat(l.value),"".concat(l.value,"--variant-").concat(e.variant),"".concat(l.value,"--theme-").concat(g.value),RT(RT(RT(RT(RT(RT({},u.value[e.size],"medium"!==e.size),c.value.disabled,v.value),c.value.loading,e.loading),"".concat(l.value,"--shape-").concat(e.shape),"rectangle"!==e.shape),"".concat(l.value,"--ghost"),e.ghost),u.value.block,e.block)]}));return function(){var n=i("default","content"),s=e.loading?t.createVNode(JF,fz({inheritColor:!0},e.loadingProps),null):a("icon"),c=s&&!n,u=e.suffix||o.suffix?t.createVNode("span",{className:"".concat(l.value,"__suffix")},[a("suffix")]):null;n=n?t.createVNode("span",{class:"".concat(l.value,"__text")},[n]):"",s&&(n=[s,n]),u&&(n=[n].concat(u));var p={class:[].concat(IT(b.value),[RT({},"".concat(l.value,"--icon-only"),c)]),type:e.type,disabled:v.value||e.loading,href:e.href,tabindex:v.value?void 0:"0"};return t.h(!e.tag&&e.href?"a":e.tag||"button",fz(fz(fz({ref:d},r),p),{},{onClick:e.onClick}),[n])}}})),mz=["info","success","warning","error","question","loading"],vz="32px",gz={top:{top:vz,left:"50%",transform:"translateX(-50%)"},center:{left:"50%",top:"50%",transform:"translateX(-50%) translateY(-50%)"},left:{left:vz,top:"50%",transform:"translateY(-50%)"},bottom:{bottom:vz,left:"50%",transform:"translateX(-50%)"},right:{right:vz,top:"50%",transform:"translateY(-50%)",display:"flex",flexDirection:"column",alignItems:"flex-end"},"top-left":{left:vz,top:vz},"top-right":{right:vz,top:vz,display:"flex",flexDirection:"column",alignItems:"flex-end"},"bottom-right":{right:vz,bottom:vz,display:"flex",flexDirection:"column",alignItems:"flex-end"},"bottom-left":{left:vz,bottom:vz}},bz=Object.keys(gz),yz={closeBtn:{type:[String,Boolean,Function],default:void 0},content:{type:[String,Function]},duration:{type:Number,default:3e3},icon:{type:[Boolean,Function],default:!0},theme:{type:String,default:"info",validator:function(e){return!e||["info","success","warning","error","question","loading"].includes(e)}},onClose:Function,onCloseBtnClick:Function,onDurationEnd:Function};function wz(e){var t=iV("icon").globalConfig,n={};return Object.keys(e).forEach((function(r){var o;n[r]=(null===(o=t.value)||void 0===o?void 0:o[r])||e[r]})),n}var kz={duration:200,easing:"linear"};function xz(e,t){if(e){var n=function(e,t,n){if(!bz.includes(e))return null;if(["top-left","left","bottom-left"].includes(e))return[{opacity:0,marginLeft:"-".concat(t,"px")},{opacity:1,marginLeft:"0"}];if(["top-right","right","bottom-right"].includes(e))return[{opacity:0,marginRight:"-".concat(t,"px")},{opacity:1,marginRight:"0"}];if(["top","center"].includes(e))return[{opacity:0,marginTop:"-".concat(n,"px")},{opacity:1,marginTop:"0"}];if(["bottom"].includes(e))return[{opacity:0,transform:"translate3d(0, ".concat(n,"px, 0)")},{opacity:1,transform:"translate3d(0, 0, 0)"}]}(t,(null==e?void 0:e.offsetWidth)||0,(null==e?void 0:e.offsetHeight)||0);if(n)Cz(e,n[n.length-1]),e.animate&&e.animate(n,kz)}}function Ez(e,t,n){if(e){var r=function(e,t){if(!bz.includes(e))return null;if(["bottom-left","bottom","bottom-right"].includes(e)){return[{opacity:1,marginTop:"0px"},{opacity:0,marginTop:"".concat(t,"px")}]}var n="-".concat(t,"px");return[{opacity:1,marginTop:"0px"},{opacity:0,marginTop:n}]}(t,(null==e?void 0:e.offsetHeight)||0);if(!r)return n();var o=r[r.length-1];Cz(e,o);var a=e.animate&&e.animate(r,kz);a?a.onfinish=function(){e.style.display="none",n()}:(e.style.display="none",n())}}function Cz(e,t){for(var n=Object.keys(t),r=0;r<n.length;r+=1){var o=n[r];e.style[o]=t[o]}}function Sz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Sz(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Sz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var _z=t.defineComponent({name:"TMessage",props:Oz(Oz({},yz),{},{placement:String}),setup:function(e,n){var r=n.slots,o=n.expose,a=lV("message"),i=wz({InfoCircleFilledIcon:bf,CheckCircleFilledIcon:yp,ErrorCircleFilledIcon:tf,HelpCircleFilledIcon:af,CloseIcon:Hp}),l=i.InfoCircleFilledIcon,s=i.CheckCircleFilledIcon,c=i.ErrorCircleFilledIcon,u=i.HelpCircleFilledIcon,d=i.CloseIcon,p=lV(),f=lz(),h=sz(),m=t.ref(null),v=t.ref(null),g=t.computed((function(){var t={};return mz.forEach((function(n){return t["".concat(p.value,"-is-").concat(n)]=e.theme===n})),[a.value,t,RT({},"".concat(p.value,"-is-closable"),e.closeBtn||r.closeBtn)]})),b=function(t){var n,r;null===(n=e.onClose)||void 0===n||n.call(e,{trigger:"close-click",e:t}),null===(r=e.onCloseBtnClick)||void 0===r||r.call(e,{e:t})},y=function(){e.duration&&clearTimeout(v.value)},w=function(){e.duration&&(v.value=Number(setTimeout((function(){y(),Ez(m.value,e.placement,(function(){var t,n;null===(t=e.onClose)||void 0===t||t.call(e,{trigger:"duration-end"}),null===(n=e.onDurationEnd)||void 0===n||n.call(e)}))}),e.duration)))},k=function(){if(!1!==e.icon){if(nA(e.icon))return e.icon(t.h);if(r.icon)return r.icon(null);var n={info:l,success:s,warning:c,error:c,question:u,loading:JF}[e.theme];return t.createVNode(n,null,null)}};return t.onBeforeMount((function(){e.duration&&w()})),t.onMounted((function(){xz(m.value,e.placement)})),o({close:b}),function(){return t.createVNode("div",{ref:m,class:g.value,onMouseenter:y,onMouseleave:w},[k(),h("content","default"),(e=t.createVNode(d,null,null),t.createVNode("span",{class:"".concat(a.value,"__close"),onClick:b},[f("closeBtn",e)]))]);var e}}});function Nz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Nz(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Az=6e3,Mz=function(){var e=0;return function(){return e+=1}}(),Iz=t.defineComponent({name:"TMessageList",props:{zIndex:{type:Number,default:0},placement:{type:String,default:""}},setup:function(e,n){var r=n.expose,o=lV("message__list"),a=t.ref([]),i=t.ref([]),l=t.computed((function(){return Tz(Tz({},gz[e.placement]),{},{zIndex:e.zIndex!==Az?e.zIndex:Az})})),s=function(e){a.value.splice(e,1)},c=function(e){if(e)return isNaN(Number(e))?e:"".concat(e,"px")},u=function(e){return e.offset&&{position:"relative",left:c(e.offset[0]),top:c(e.offset[1])}},d=function(e){e&&i.value.push(e)};return r({add:function(e){var t=Tz(Tz({},e),{},{key:Mz()});return a.value.push(t),t.key},removeAll:function(){a.value=[]},list:a,messageList:i}),function(){if(a.value.length)return t.createVNode("div",{class:o.value,style:l.value},[a.value.map((function(e,n){return t.createVNode(_z,t.mergeProps({key:e.key,style:u(e),ref:d},function(e,t){return Tz(Tz({},t),{},{onCloseBtnClick:function(n){return t.onCloseBtnClick&&t.onCloseBtnClick(n),s(e)},onDurationEnd:function(){return t.onDurationEnd&&t.onDurationEnd(),s(e)}})}(n,e)),null)}))])}}});function Pz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Lz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Pz(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Pz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Rz=new Map;var Bz=function(e){var n=function(e){var t=Lz({duration:3e3,attach:"body",zIndex:Az,placement:"top"},e);return t.content=e.content,t}(e),r=n.attach,o=n.placement,a=_V(r);Rz.get(a)||Rz.set(a,{});var i,l=Rz.get(a)[o];if(l)i=l.add(n);else{var s=document.createElement("div"),c=t.createApp(Iz,{zIndex:n.zIndex,placement:n.placement}).mount(s);i=c.add(n),Rz.get(a)[o]=c,a.appendChild(s)}return new Promise((function(e){var n=Rz.get(a)[o];t.nextTick((function(){var t=n.messageList;e(null==t?void 0:t.find((function(e){var t;return(null===(t=e.$)||void 0===t||null===(t=t.vnode)||void 0===t?void 0:t.key)===i})))}))}))},Dz=function(e,t,n){var r={theme:e};return tV(t)?r.content=t:!DT(t)||t instanceof Array||(r=Lz(Lz({},r),t)),(n||0===n)&&(r.duration=n),Bz(r)},Vz={info:function(e,t){return Dz("info",e,t)},success:function(e,t){return Dz("success",e,t)},warning:function(e,t){return Dz("warning",e,t)},error:function(e,t){return Dz("error",e,t)},question:function(e,t){return Dz("question",e,t)},loading:function(e,t){return Dz("loading",e,t)},close:function(e){e.then((function(e){return null==e?void 0:e.close()}))},closeAll:function(){Rz instanceof Map&&Rz.forEach((function(e){Object.keys(e).forEach((function(t){e[t].list=[]}))}))}},jz=Dz;jz.install=function(e){e.config.globalProperties.$message=Dz,Object.keys(Vz).forEach((function(t){e.config.globalProperties.$message[t]=Vz[t]}))},Object.keys(Vz).forEach((function(e){jz[e]=Vz[e]}));var Fz=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0},zz=eI,$z=tI,Hz=$T?$T.isConcatSpreadable:void 0;var Uz=DL,Wz=function(e){return $z(e)||zz(e)||!!(Hz&&e&&e[Hz])};var Gz=function e(t,n,r,o,a){var i=-1,l=t.length;for(r||(r=Wz),a||(a=[]);++i<l;){var s=t[i];n>0&&r(s)?n>1?e(s,n-1,r,o,a):Uz(a,s):o||(a[a.length]=s)}return a},Kz=Gz;var qz=function(e){return(null==e?0:e.length)?Kz(e,1):[]},Yz=QI,Xz=aP;var Zz=DD,Jz=VV;var Qz=ID,e$=Fz,t$=function(e,t){return t.length<2?e:Zz(e,Jz(t,0,-1))},n$=LD;var r$=kP;var o$=sD,a$=EB,i$=function(e,t){return t=Qz(t,e),null==(e=t$(e,t))||delete e[n$(e$(t))]},l$=ID,s$=zI,c$=function(e){return r$(e)?void 0:e},u$=xR,d$=function(e){return Xz(Yz(e,void 0,qz),e+"")}((function(e,t){var n={};if(null==e)return n;var r=!1;t=o$(t,(function(t){return t=l$(t,e),r||(r=t.length>1),t})),s$(e,u$(e),n),r&&(n=a$(n,7,c$));for(var o=t.length;o--;)i$(n,t[o]);return n}));function p$(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}var f$=new(p$((function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),RT(this,"popupStack",{popup:new Set,dialog:new Set,message:new Set}),RT(this,"getNextZIndex",(function(e){return("message"===e?Array.from(t.popupStack.message).pop()||5e3:Array.from(t.popupStack.popup).pop()||1e3)+1})),RT(this,"add",(function(e){var n=t.getNextZIndex(e);return t.popupStack[e].add(n),"dialog"===e&&t.popupStack.popup.add(n),n})),RT(this,"delete",(function(e,n){t.popupStack[n].delete(e),"dialog"===n&&t.popupStack.popup.delete(e)})),RT(this,"isLastDialog",(function(e){return!(t.popupStack.dialog.size>1)||e===Array.from(t.popupStack.dialog).pop()}))})));var h$,m$={attach:{type:[String,Function]},body:{type:[String,Function]},cancelBtn:{type:[String,Object,Function]},closeBtn:{type:[String,Boolean,Function],default:!0},closeOnEscKeydown:{type:Boolean,default:void 0},closeOnOverlayClick:{type:Boolean,default:void 0},confirmBtn:{type:[String,Object,Function]},confirmLoading:{type:Boolean,default:void 0},confirmOnEnter:Boolean,default:{type:[String,Function]},destroyOnClose:Boolean,dialogClassName:{type:String,default:""},dialogStyle:{type:Object},draggable:Boolean,footer:{type:[Boolean,Function],default:!0},header:{type:[String,Boolean,Function],default:!0},mode:{type:String,default:"modal",validator:function(e){return!e||["modal","modeless","normal","full-screen"].includes(e)}},placement:{type:String,default:"top",validator:function(e){return!e||["top","center"].includes(e)}},preventScrollThrough:{type:Boolean,default:!0},showInAttachedElement:Boolean,showOverlay:{type:Boolean,default:!0},theme:{type:String,default:"default",validator:function(e){return!e||["default","info","warning","danger","success"].includes(e)}},top:{type:[String,Number]},visible:Boolean,width:{type:[String,Number]},zIndex:{type:Number},onCancel:Function,onClose:Function,onCloseBtnClick:Function,onClosed:Function,onConfirm:Function,onEscKeydown:Function,onOpened:Function,onOverlayClick:Function};function v$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v$(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function b$(e){var n=t.getCurrentInstance(),r=lz(),o=function(e,n){var r=n.defaultButtonProps,o=n.className,a=n.confirmLoading,i=r;return tV(e)?i.content=e:DT(e)&&(i=g$(g$({},i),e)),void 0!==a&&(i.loading=a),t.createVNode(hz,t.mergeProps({class:o},i),null)};return{getConfirmBtn:function(a){var i=a.confirmBtn,l=a.className,s=a.confirmLoading;if(null===i)return null;i&&n.slots.confirmBtn&&console.warn("Both $props.confirmBtn and $scopedSlots.confirmBtn exist, $props.confirmBtn is preferred.");var c=function(t){var n,r=t.globalConfirm,o=t.theme,a=t.globalConfirmBtnTheme,i={theme:(null===(n=d$(a,["info"]))||void 0===n?void 0:n[o])||"primary",size:t.size,onClick:function(t){e.confirmBtnAction(t)}};return tV(r)?i.content=r:DT(r)&&(i=g$(g$({},i),r)),i}(a);return i||n.slots.confirmBtn?i&&["string","object"].includes(PT(i))?o(i,{defaultButtonProps:c,className:l,confirmLoading:s}):r("confirmBtn"):t.createVNode(hz,t.mergeProps({class:l,loading:s},c),null)},getCancelBtn:function(a){var i=a.cancelBtn,l=a.className;if(null===i)return null;i&&n.slots.cancelBtn&&console.warn("Both $props.cancelBtn and $scopedSlots.cancelBtn exist, $props.cancelBtn is preferred.");var s=function(t){var n=t.globalCancel,r={theme:"default",size:t.size,onClick:function(t){e.cancelBtnAction(t)}};return tV(n)?r.content=n:DT(n)&&(r=g$(g$({},r),n)),r}(a);return i||n.slots.cancelBtn?i&&["string","object"].includes(PT(i))?o(i,{defaultButtonProps:s}):r("cancelBtn"):t.createVNode(hz,t.mergeProps({class:l},s),null)}}}function y$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y$(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k$(e){return Number.isNaN(Number(e))?e:"".concat(Number(e),"px")}"undefined"!=typeof window&&window.document&&window.document.documentElement&&document.documentElement.addEventListener("click",(function(e){h$={x:e.clientX,y:e.clientY},setTimeout((function(){h$=null}),100)}),!0);var x$=1,E$=t.defineComponent({name:"TDialog",directives:{draggable:function(e,t){var n,r,o;e&&t&&t.value&&(n=e,r=window.innerWidth||document.documentElement.clientWidth,o=window.innerHeight||document.documentElement.clientHeight,n.addEventListener("mousedown",(function(e){var t=e.clientX-n.offsetLeft,a=e.clientY-n.offsetTop,i=n.offsetWidth,l=n.offsetHeight;function s(e){var i=e.clientX-t,l=e.clientY-a;i<0&&(i=0),l<0&&(l=0),r-n.offsetWidth-i<0&&(i=r-n.offsetWidth),o-n.offsetHeight-l<0&&(l=o-n.offsetHeight),n.style.position="absolute",n.style.left="".concat(i,"px"),n.style.top="".concat(l,"px")}function c(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c)}i>r||l>o||(document.addEventListener("mousemove",s),document.addEventListener("mouseup",c),document.addEventListener("dragend",c))})))}},inheritAttrs:!1,props:m$,emits:["update:visible"],setup:function(e,n){var r,o=this,a=lV("dialog"),i=lV(),l=sz(),s=lz(),c=t.ref(null),u=iV("dialog").globalConfig,d=wz({CloseIcon:Hp,InfoCircleFilledIcon:bf,CheckCircleFilledIcon:yp,ErrorCircleFilledIcon:tf}),p=d.CloseIcon,f=d.InfoCircleFilledIcon,h=d.CheckCircleFilledIcon,m=d.ErrorCircleFilledIcon,v=b$({confirmBtnAction:function(t){var n;null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})},cancelBtnAction:function(t){var n;null===(n=e.onCancel)||void 0===n||n.call(e,{e:t}),K({e:t,trigger:"cancel"})}}),g=v.getConfirmBtn,b=v.getCancelBtn,y=sF((function(){return e.attach}));r=t.ref(0),t.provide("t-display-none-element-refresh",r),t.onUpdated((function(){r.value+=1}));var w=t.ref(),k=t.ref(),x=t.computed((function(){return"modal"===e.mode})),E=t.computed((function(){return"modeless"===e.mode})),C=t.computed((function(){return"normal"===e.mode})),S=t.computed((function(){return"full-screen"===e.mode})),O=t.computed((function(){return e.visible})),_=t.computed((function(){return["".concat(a.value,"__mask"),!e.showOverlay&&"".concat(i.value,"-is-hidden")]})),N=t.computed((function(){return C.value?[]:S.value?["".concat(a.value,"__position_fullscreen")]:["".concat(a.value,"__position"),!!e.top&&"".concat(a.value,"--top"),"".concat(e.placement&&!e.top?"".concat(a.value,"--").concat(e.placement):"")]})),T=t.computed((function(){return[!C.value&&"".concat(a.value,"__wrap")]})),A=t.computed((function(){if(S.value)return{};var t=e.top,n={};void 0!==t&&(n={paddingTop:k$(t)});return n})),M=t.computed((function(){var t=["".concat(a.value),"".concat(a.value,"__modal-").concat(e.theme),E.value&&e.draggable&&"".concat(a.value,"--draggable"),e.dialogClassName];return S.value?t.push("".concat(a.value,"__fullscreen")):t.push.apply(t,["".concat(a.value,"--default"),"".concat(a.value,"--").concat(e.placement)]),t})),I=t.computed((function(){return S.value?w$({},e.dialogStyle):w$({width:k$(e.width)},e.dialogStyle)})),P=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.visible,o=n.runOnMounted,a=t.ref(0),i=function(){a.value=f$.add(e)},l=function(){f$.delete(a.value,e)};return t.watch((function(){return null==r?void 0:r.value}),(function(e){e?i():l()}),{immediate:!0}),o&&(t.onMounted((function(){i()})),t.onBeforeUnmount((function(){l()}))),{zIndex:t.readonly(a),open:i,close:l,isLastDialog:function(){return f$.isLastDialog(a.value)}}}("dialog",{visible:O}),L=P.isLastDialog;function R(){var e,t;null===(e=k.value.parentNode)||void 0===e||null===(t=e.removeChild)||void 0===t||t.call(e,k.value)}t.watch((function(){return e.visible}),(function(n){var r;n?((x.value&&!e.showInAttachedElement||S.value)&&(e.preventScrollThrough&&document.body.appendChild(k.value),t.nextTick((function(){h$&&c.value&&(c.value.style.transformOrigin="".concat(h$.x-c.value.offsetLeft,"px ").concat(h$.y-c.value.offsetTop,"px"))}))),null===(r=document.activeElement)||void 0===r||r.blur()):(clearTimeout(w.value),w.value=setTimeout((function(){R()}),150));j(n)}));var B,D,V,j=function(t){t?(document.addEventListener("keydown",z),e.confirmOnEnter&&document.addEventListener("keydown",F)):(document.removeEventListener("keydown",z),e.confirmOnEnter&&document.removeEventListener("keydown",F))},F=function(t){if("input"!==t.target.tagName.toLowerCase()){var n,r=t.code;if(("Enter"===r||"NumpadEnter"===r)&&L())null===(n=e.onConfirm)||void 0===n||n.call(e,{e:t})}},z=function(t){var n,r;"Escape"===t.code&&L()&&(null===(n=e.onEscKeydown)||void 0===n||n.call(e,{e:t}),(null!==(r=e.closeOnEscKeydown)&&void 0!==r?r:u.value.closeOnEscKeydown)&&K({e:t,trigger:"esc"}))},$=(B=function(t){var n,r;e.showOverlay&&(null!==(n=e.closeOnOverlayClick)&&void 0!==n?n:u.value.closeOnOverlayClick)&&(null===(r=e.onOverlayClick)||void 0===r||r.call(e,{e:t}),K({e:t,trigger:"overlay"}))},D=!1,V=!1,{onClick:function(e){D&&V&&B(e),D=!1,V=!1},onMousedown:function(e){D=e.target===e.currentTarget},onMouseup:function(e){V=e.target===e.currentTarget}}),H=$.onClick,U=$.onMousedown,W=$.onMouseup,G=function(t){var n;null===(n=e.onCloseBtnClick)||void 0===n||n.call(e,{e:t}),K({trigger:"close-btn",e:t})},K=function(t){var r;null===(r=e.onClose)||void 0===r||r.call(e,t),n.emit("update:visible",!1)};return t.onMounted((function(){var e=document.documentElement.scrollHeight>document.documentElement.clientHeight?function(){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e);var t=e.offsetWidth-e.clientWidth;return document.body.removeChild(e),t}():0;k.value=document.createElement("style"),k.value.dataset.id="td_dialog_".concat(+new Date,"_").concat(x$+=1),k.value.innerHTML="\n html body {\n overflow-y: hidden;\n width: calc(100% - ".concat(e,"px);\n }\n ")})),t.onBeforeUnmount((function(){j(!1),R()})),{COMPONENT_NAME:a,isModal:x,isModeLess:E,isFullScreen:S,maskClass:_,dialogClass:M,dialogStyle:I,dialogEle:c,afterEnter:function(){var t;null===(t=e.onOpened)||void 0===t||t.call(e)},afterLeave:function(){var t;E.value&&e.draggable&&c.value&&(c.value.style.position="relative",c.value.style.left="unset",c.value.style.top="unset"),null===(t=e.onClosed)||void 0===t||t.call(e)},hasEventOn:function(e){var t,n=null===(t=o._events)||void 0===t?void 0:t[e];return!(null==n||!n.length)},renderDialog:function(){var n=t.createVNode("h5",{class:"title"},null),r=t.createVNode(p,null,null),o=l("default","body"),d=t.createVNode("div",null,[b({cancelBtn:e.cancelBtn,globalCancel:u.value.cancel,className:"".concat(a.value,"__cancel")}),g({theme:e.theme,confirmBtn:e.confirmBtn,globalConfirm:u.value.confirm,globalConfirmBtnTheme:u.value.confirmBtnTheme,className:"".concat(a.value,"__confirm"),confirmLoading:e.confirmLoading})]),v=S.value?["".concat(a.value,"__header"),"".concat(a.value,"__header--fullscreen")]:"".concat(a.value,"__header"),y=S.value?["".concat(a.value,"__close"),"".concat(a.value,"__close--fullscreen")]:"".concat(a.value,"__close"),w="default"===e.theme?["".concat(a.value,"__body")]:["".concat(a.value,"__body__icon")],k=s("footer",d);S.value&&k?w.push("".concat(a.value,"__body--fullscreen")):S.value&&w.push("".concat(a.value,"__body--fullscreen--without-footer"));var x=S.value?["".concat(a.value,"__footer"),"".concat(a.value,"__footer--fullscreen")]:"".concat(a.value,"__footer"),C=function(t){E.value&&e.draggable&&t.stopPropagation()};return t.createVNode("div",{class:T.value},[t.createVNode("div",{class:N.value,style:A.value,onClick:H,onMousedown:U,onMouseup:W},[t.withDirectives(t.createVNode("div",{key:"dialog",class:M.value,style:I.value,ref:c},[t.createVNode("div",{class:v,onMousedown:C},[t.createVNode("div",{class:"".concat(a.value,"__header-content")},[{info:t.createVNode(f,{class:"".concat(i.value,"-is-info")},null),warning:t.createVNode(m,{class:"".concat(i.value,"-is-warning")},null),danger:t.createVNode(m,{class:"".concat(i.value,"-is-error")},null),success:t.createVNode(h,{class:"".concat(i.value,"-is-success")},null)}[e.theme],s("header",n)]),e.closeBtn?t.createVNode("span",{class:y,onClick:G},[s("closeBtn",r)]):null]),t.createVNode("div",{class:w,onMousedown:C},[o]),k&&t.createVNode("div",{class:x,onMousedown:C},[k])]),[[t.resolveDirective("draggable"),E.value&&e.draggable]])])])},teleportElement:y}},render:function(){var e=this,n=this.COMPONENT_NAME,r=[(this.isModal||this.isFullScreen)&&t.createVNode("div",{key:"mask",class:this.maskClass},null),this.renderDialog()],o={zIndex:this.zIndex},a=["".concat(n,"__ctx"),RT(RT(RT({},"".concat(n,"__ctx--fixed"),this.isModal||this.isFullScreen),"".concat(n,"__ctx--absolute"),this.isModal&&this.showInAttachedElement),"".concat(n,"__ctx--modeless"),this.isModeLess)];return t.createVNode(t.Teleport,{disabled:!this.attach||!this.teleportElement,to:this.teleportElement},{default:function(){return[t.createVNode(t.Transition,{duration:300,name:"".concat(n,"-zoom__vue"),onAfterEnter:e.afterEnter,onAfterLeave:e.afterLeave},{default:function(){return[(!e.destroyOnClose||e.visible)&&t.withDirectives(t.createVNode("div",t.mergeProps({class:a,style:o},e.$attrs),[r]),[[t.vShow,e.visible]])]}})]}})}});function C$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function S$(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C$(Object(n),!0).forEach((function(t){RT(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C$(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var O$=function(e){var n=S$({},e),r=document.createElement("div"),o=t.ref(!1),a=n.className,i=n.style,l=a,s=function(e,t){if(e){var n;if(l&&l!==e)(n=r.firstElementChild.classList).remove.apply(n,IT(l.split(" ").map((function(e){return e.trim()}))));e.split(" ").forEach((function(e){r.firstElementChild.classList.add(e.trim())}))}t&&(r.firstElementChild.style.cssText+=t),l=e},c=t.defineComponent({setup:function(e,r){var l=r.expose,c=t.ref(n);t.onMounted((function(){o.value=!0,document.activeElement.blur(),t.nextTick((function(){s(a,i)}))}));return l({update:function(e){c.value=S$(S$({},n),e)}}),function(){var e=n.onClose||function(){o.value=!1};return delete n.className,delete n.style,t.h(E$,S$({onClose:e,visible:o.value},c.value))}}}),u=t.createApp(c),d=u.mount(r),p=_V(n.attach);return p?p.appendChild(r):console.error("attach is not exist"),{show:function(){o.value=!0},hide:function(){o.value=!1},update:function(e){d.update(d$(e,["className","style"])),s(e.className,e.style)},destroy:function(){o.value=!1,setTimeout((function(){u.unmount(),r.remove()}),300)},setConfirmLoading:function(e){d.update({confirmLoading:e})}}},_$={confirm:function(e){return O$(e)},alert:function(e){var t=S$({},e);return t.cancelBtn=null,O$(t)}},N$=O$;N$.install=function(e){e.config.globalProperties.$dialog=O$,Object.keys(_$).forEach((function(t){e.config.globalProperties.$dialog[t]=_$[t]}))},Object.keys(_$).forEach((function(e){N$[e]=_$[e]}));const{container:T$}=zN(),A$=e=>N$.alert({attach:T$,placement:"center",...e}),M$=e=>N$.confirm({attach:T$,placement:"center",preventScrollThrough:!1,cancelBtn:KN("dialog.cancel"),...e}),I$=(e,t)=>{const n="string"==typeof t?{content:t}:t;return jz[e]({attach:T$,...n})},P$=e=>(t.pushScopeId("data-v-34707db2"),e=e(),t.popScopeId(),e),L$={key:0,class:"status-bar"},R$={class:"bar-left"},B$=P$((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),D$=P$((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),V$={key:1,class:"simple-text word-count"},j$={class:"bar-right"},F$=P$((()=>t.createElementVNode("div",{class:"bar-split"},null,-1))),z$={class:"zoom-level-bar"},$$={key:1,class:"preview-bar"},H$={class:"shortcut-drawer-header"},U$=YN({__name:"index",setup(e){const{container:n,options:r,page:o,editor:a}=zN(),i=GN("document"),l=t.ref(!1),s=t.inject("reset"),c=t.computed((()=>{const{state:e}=a.value;if(e){const{selection:t}=e;return e.doc.textBetween(t.from,t.to,"").length}return 0}));let u=t.ref({});t.onMounted((()=>{u.value=PN(document.querySelector(n)),TT("f11, command+f11",u.value.toggle)}));const d=async()=>{o.value.showToc=!1,o.value.preview.enabled=!o.value.preview.enabled,o.value.preview.enabled&&(document.querySelector(`${n} .zoomable-container`).scrollTop=0)};t.onMounted((()=>TT("f5",d))),t.watch((()=>o.value.preview.enabled),(e=>{e?(u.value.enter(),m(!1,10)):(u.value.exit(),h())})),t.watch((()=>u.value.isFullscreen),(e=>{e||(o.value.preview.enabled=!1)}),{deep:!0});const p=()=>{o.value.zoomLevel<500&&(o.value.zoomLevel=o.value.zoomLevel+10,o.value.autoWidth=!1)},f=()=>{o.value.zoomLevel>20&&(o.value.zoomLevel=o.value.zoomLevel-10,o.value.autoWidth=!1)},h=()=>{o.value.zoomLevel=100,o.value.autoWidth=!1};TT("ctrl+-,command+-",f),TT("ctrl+=,command+=",p),TT("ctrl+1,command+1",h);const m=(e,t=50)=>{if(e&&o.value.autoWidth)h();else try{const e=document.querySelector(`${n} .zoomable-container`),r=e.querySelector(".page-content"),a=e.clientWidth,i=r.clientWidth;o.value.zoomLevel=parseInt((a-2*t)/i*100),o.value.autoWidth=!0}catch(r){o.value.autoWidth=!1,I$("error",KN("zoom.autoWidthError")),console.warn("Page auto width calculation error",r)}};TT("ctrl+0,command+0",m),t.watch((()=>o.value.showToc),(()=>{o.value.autoWidth&&m()}));const v=[{content:"🇨🇳 简体中文",value:"zh-CN"},{content:"🇱🇷 English",value:"en-US"}],g=t.inject("setLocale"),b=t.computed((()=>v.find((e=>e.value===WN.global.locale.value)).content)),y=({value:e})=>{if(WN.global.locale.value===e)return;const t=M$({theme:"warning",header:KN("changeLocale.title"),body:KN("changeLocale.message"),confirmBtn:{theme:"warning",content:KN("changeLocale.confirm")},onConfirm(){t.destroy(),setTimeout((()=>g(e)),300)}})};return(e,g)=>{const w=dC,k=Kd,x=oT,E=Dk,C=Qv,S=rT,O=iC;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(o).preview.enabled?(t.openBlock(),t.createElementBlock("div",$$,[t.createElementVNode("div",{class:t.normalizeClass(["item",{active:t.unref(o).preview.laserPointer}]),onClick:g[5]||(g[5]=e=>t.unref(o).preview.laserPointer=!t.unref(o).preview.laserPointer)},[t.createVNode(w,{name:"laser-pointer"}),t.createTextVNode(" "+t.toDisplayString(e.t("preview.laserPointer")),1)],2),t.createElementVNode("div",{class:"item",onClick:d},[t.createVNode(w,{name:"exit"}),t.createTextVNode(" "+t.toDisplayString(e.t("preview.exit")),1)])])):(t.openBlock(),t.createElementBlock("div",L$,[t.createElementVNode("div",R$,[t.createVNode(x,{content:t.unref(o).showToc?e.t("toc.hide"):e.t("toc.show")},{default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["bar-button",{active:t.unref(o).showToc}]),variant:"text",size:"small",onClick:g[0]||(g[0]=e=>t.unref(o).showToc=!t.unref(o).showToc)},{default:t.withCtx((()=>[t.createVNode(w,{name:"toc",color:"red"})])),_:1},8,["class"])])),_:1},8,["content"]),t.unref(r).document.enableSpellcheck?(t.openBlock(),t.createBlock(x,{key:0,content:t.unref(i).spellcheck?e.t("spellcheck.disable"):e.t("spellcheck.enable")},{default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["bar-button",{active:t.unref(i).spellcheck}]),variant:"text",size:"small",onClick:g[1]||(g[1]=e=>t.unref(i).spellcheck=!t.unref(i).spellcheck)},{default:t.withCtx((()=>[t.createVNode(w,{name:"spellcheck",color:"red"})])),_:1},8,["class"])])),_:1},8,["content"])):t.createCommentVNode("",!0),t.createVNode(x,{content:e.t("shortcut.title")},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",onClick:g[2]||(g[2]=e=>l.value=!0)},{default:t.withCtx((()=>[t.createVNode(w,{name:"shortcut"})])),_:1})])),_:1},8,["content"]),t.createVNode(x,{content:e.t("resetAll.title")},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",onClick:t.unref(s)},{default:t.withCtx((()=>[t.createVNode(w,{name:"clear-cache"})])),_:1},8,["onClick"])])),_:1},8,["content"]),B$,t.createVNode(x,{content:e.t("poweredBy")},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",href:"https://umodoc.com",target:"_blank"},{default:t.withCtx((()=>[t.createVNode(w,{name:"home-page"})])),_:1})])),_:1},8,["content"]),t.createVNode(x,{content:e.t("feedback")},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",href:"https://github.com/umodoc/editor/issues",target:"_blank"},{default:t.withCtx((()=>[t.createVNode(w,{name:"message"})])),_:1})])),_:1},8,["content"]),D$,t.unref(a)?(t.openBlock(),t.createElementBlock("div",V$,[t.createTextVNode(t.toDisplayString(e.t("wordCount.input",{count:t.unref(a).storage.characterCount.characters()}))+" ",1),t.unref(r).document.characterLimit>0?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(e.t("wordCount.limit",{count:t.unref(r).document.characterLimit})),1)],64)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(e.t("wordCount.selected",{count:c.value})),1)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",j$,[t.createVNode(x,{content:`${t.unref(o).preview.enabled?e.t("preview.disable"):e.t("preview.title")} (F5)`},{default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["bar-button",{active:t.unref(o).preview.enabled}]),variant:"text",size:"small",onClick:d},{default:t.withCtx((()=>[t.createVNode(w,{name:"preview"})])),_:1},8,["class"])])),_:1},8,["content"]),t.createVNode(x,{content:`${t.unref(u).isFullscreen?e.t("fullscreen.disable"):e.t("fullscreen.title")} (F11 / ⌘+F11)`},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",onClick:t.unref(u).toggle},{default:t.withCtx((()=>[t.createVNode(w,{name:t.unref(u).isFullscreen?"full-screen-exit":"full-screen"},null,8,["name"])])),_:1},8,["onClick"])])),_:1},8,["content"]),F$,t.createElementVNode("div",z$,[t.createVNode(x,{content:`${e.t("zoom.zoomOut")} (${t.unref(pC)("Ctrl-")})`},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",disabled:t.unref(o).zoomLevel<=20,onClick:f},{default:t.withCtx((()=>[t.createVNode(w,{name:"minus"})])),_:1},8,["disabled"])])),_:1},8,["content"]),t.createVNode(E,{modelValue:t.unref(o).zoomLevel,"onUpdate:modelValue":g[3]||(g[3]=e=>t.unref(o).zoomLevel=e),min:20,max:500,step:10,"tooltip-props":{showArrow:!1,theme:"light",popperOptions:{modifiers:[{name:"offset",options:{offset:[0,2]}}]}},label:e.t("zoom.level")+"${value}%%"},null,8,["modelValue","label"]),t.createVNode(x,{content:`${e.t("zoom.zoomIn")} (${t.unref(pC)("Ctrl+")})`},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button",variant:"text",size:"small",disabled:t.unref(o).zoomLevel>=500,onClick:p},{default:t.withCtx((()=>[t.createVNode(w,{name:"plus"})])),_:1},8,["disabled"])])),_:1},8,["content"]),t.createVNode(x,{content:`${e.t("zoom.autoWidth")} (${t.unref(pC)("Ctrl0")})`},{default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["bar-button",{active:t.unref(o).autoWidth}]),variant:"text",size:"small",onClick:g[4]||(g[4]=e=>m(!0))},{default:t.withCtx((()=>[t.createVNode(w,{name:"auto-width"})])),_:1},8,["class"])])),_:1},8,["content"]),t.createVNode(x,{content:`${e.t("zoom.reset")} (${t.unref(pC)("Ctrl1")})`},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button zoom-button",variant:"text",size:"small",onClick:h},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(t.unref(o).zoomLevel)+"% ",1)])),_:1})])),_:1},8,["content"])]),t.createVNode(C,{attach:t.unref(n),options:v,placement:"top-left",trigger:"click",onClick:y},{default:t.withCtx((()=>[t.createVNode(k,{class:"bar-button lang-button",variant:"text",size:"small",textContent:t.toDisplayString(b.value),onClick:h},null,8,["textContent"])])),_:1},8,["attach"])])])),t.createVNode(O,{visible:l.value,"onUpdate:visible":g[6]||(g[6]=e=>l.value=e),attach:t.unref(n),size:"320px",footer:!1,"close-btn":"","destroy-on-close":"","show-in-attached-element":""},{header:t.withCtx((()=>[t.createElementVNode("div",H$,[t.createVNode(w,{name:"shortcut"}),t.createTextVNode(" "+t.toDisplayString(e.t("shortcut.title")),1)])])),default:t.withCtx((()=>[t.createVNode(S)])),_:1},8,["visible","attach"])],64)}}},[["__scopeId","data-v-34707db2"]]);var W$=Object.defineProperty,G$=Object.getOwnPropertySymbols,K$=Object.prototype.hasOwnProperty,q$=Object.prototype.propertyIsEnumerable,Y$=(e,t,n)=>t in e?W$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,X$=(e,t)=>{for(var n in t||(t={}))K$.call(t,n)&&Y$(e,n,t[n]);if(G$)for(var n of G$(t))q$.call(t,n)&&Y$(e,n,t[n]);return e};function Z$(...e){return t=>e.reduceRight(((e,t)=>t(e)),t)}function J$(e){return function t(...n){return n.length>=e.length?e.apply(this,n):(...e)=>t.apply(this,[...n,...e])}}function Q$(e,t){return Object.keys(t).forEach((n=>{t[n]instanceof Object&&e[n]&&Object.assign(t[n],Q$(e[n],t[n]))})),X$(X$({},e),t)}function eH(e){return Object.prototype.toString.call(e).includes("Object")}function tH(e){return"function"==typeof e}const nH={type:"cancelation",msg:"operation is manually canceled"};function rH(e){let t=!1;const n=new Promise(((n,r)=>{e.then((e=>t?r(nH):n(e))),e.catch(r)}));return Object.assign(n,{cancel(){t=!0}}),n}const oH={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"An unknown error occurred",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n "};const aH=J$((function(e,t){throw new Error(e[t]||oH.default)}))(oH);const iH={config:function(e){return e||aH("configIsRequired"),eH(e)||aH("configType"),e.urls?(console.warn(oH.deprecation),{paths:{vs:e.urls.monacoBase}}):e},changes:function(e,t){return eH(t)||aH("changeType"),Object.keys(t).some((t=>{return n=e,r=t,!Object.prototype.hasOwnProperty.call(n,r);var n,r}))&&aH("changeField"),t},selector:function(e){tH(e)||aH("selectorType")},handler:function(e){tH(e)||eH(e)||aH("handlerType"),eH(e)&&Object.values(e).some((e=>!tH(e)))&&aH("handlersType")},initial:function(e){var t;e||aH("initialIsRequired"),eH(e)||aH("initialType"),t=e,0===Reflect.ownKeys(t).length&&aH("initialContent")}};var lH=Object.defineProperty,sH=Object.getOwnPropertySymbols,cH=Object.prototype.hasOwnProperty,uH=Object.prototype.propertyIsEnumerable,dH=(e,t,n)=>t in e?lH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pH=(e,t)=>{for(var n in t||(t={}))cH.call(t,n)&&dH(e,n,t[n]);if(sH)for(var n of sH(t))uH.call(t,n)&&dH(e,n,t[n]);return e};function fH(e,t){return tH(t)?t(e.current):t}function hH(e,t){return e.current=pH(pH({},e.current),t),t}function mH(e,t,n){return tH(t)?t(e.current):Object.keys(n).forEach((n=>{var r;return null==(r=t[n])?void 0:r.call(t,e.current[n])})),n}var vH=Object.getOwnPropertySymbols,gH=Object.prototype.hasOwnProperty,bH=Object.prototype.propertyIsEnumerable;const[yH,wH]=function(e,t={}){iH.initial(e),iH.handler(t);const n={current:e},r=J$(mH)(n,t),o=J$(hH)(n),a=J$(iH.changes)(e),i=J$(fH)(n);return[function(e=e=>e){return iH.selector(e),e(n.current)},function(e){Z$(r,o,a,i)(e)}]}({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}),kH=new Promise(((e,t)=>wH({resolve:e,reject:t})));function xH(e){return document.body.appendChild(e)}function EH(e){const t=yH((({config:e,reject:t})=>({config:e,reject:t}))),n=function(e){const t=document.createElement("script");return e&&(t.src=e),t}(`${t.config.paths.vs}/loader.js`);return n.onload=()=>e(),n.onerror=t.reject,n}function CH(){const e=yH((({config:e,resolve:t,reject:n})=>({config:e,resolve:t,reject:n}))),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],(t=>{SH(t),e.resolve(t)}),(t=>{e.reject(t)}))}function SH(e){yH().monaco||wH({monaco:e})}var OH={config:function(e){const t=iH.config(e),{monaco:n}=t,r=((e,t)=>{var n={};for(var r in e)gH.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&vH)for(var r of vH(e))t.indexOf(r)<0&&bH.call(e,r)&&(n[r]=e[r]);return n})(t,["monaco"]);wH((e=>({config:Q$(e.config,r),monaco:n})))},init:function(){const e=yH((({monaco:e,isInitialized:t,resolve:n})=>({monaco:e,isInitialized:t,resolve:n})));if(!e.isInitialized){if(wH({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),rH(kH);if(window.monaco&&window.monaco.editor)return SH(window.monaco),e.resolve(window.monaco),rH(kH);Z$(xH,EH)(CH)}return rH(kH)},getMonacoInstance:function(){return yH((({monaco:e})=>e))}};function _H(){}function NH(e){return/^\d+$/.test(e)?`${e}px`:e}function TH(e,t,n,r){return function(e,t){return e.editor.getModel(AH(e,t))}(e,r)||function(e,t,n,r){return e.editor.createModel(t,n,r?AH(e,r):void 0)}(e,t,n,r)}function AH(e,t){return e.Uri.parse(t)}function MH(e){return"function"==typeof e?e():e}function IH(e,n,r){const{monacoRef:o,unload:a,isLoadFailed:i}=function(){const e=t.shallowRef(OH.getMonacoInstance()),n=t.ref(!1);let r;return t.onMounted((async()=>{try{if(e.value)return;r=OH.init(),e.value=await r}catch(t){"cancelation"!==(null==t?void 0:t.type)?(n.value=!0,console.error("Monaco initialization error:",t)):n.value=!1}})),{monacoRef:e,unload:()=>null==r?void 0:r.cancel(),isLoadFailed:n}}(),l=t.shallowRef(null),s=t.shallowRef(null),c=t.computed((()=>!!o.value&&!!l.value)),{getWrapperStyle:u,getContainerStyle:d,getLoadingStyle:p}=function(e,n){return{getWrapperStyle:t.computed((()=>({display:"flex",position:"relative",textAlign:"initial",width:NH(e.width),height:NH(e.height)}))),getContainerStyle:t.computed((()=>{const e={width:"100%"};return n.value||(e.display="none"),e})),getLoadingStyle:t.computed((()=>({display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"})))}}({width:e.width,height:e.height},c);function f(e){return function(...t){c.value&&e.apply(this,t)}}t.watch((()=>e.theme),f((e=>{var t;return null==(t=o.value)?void 0:t.editor.setTheme(e)}))),t.watch((()=>e.options),(e=>{var t;return null==(t=l.value)?void 0:t.updateOptions(e)}),{deep:!0});return{render:()=>{var o,a,l;return t.h("section",{style:u.value},[!c.value&&t.h("div",{style:p.value},i.value?n.slots.failure?MH(null==(o=n.slots)?void 0:o.failure):"load failed":(null==(a=n.slots)?void 0:a.loading)?MH(null==(l=n.slots)?void 0:l.loading):"loading..."),t.h("div",{ref:s,key:r,style:d.value,class:e.className})])},monacoRef:o,containerRef:s,editorRef:l,unload:a,whenMonacoIsReady:f}}const PH={original:{type:String,default:""},modified:{type:String,default:""},language:{type:String},originalLanguage:{type:String},modifiedLanguage:{type:String},originalModelPath:{type:String},modifiedModelPath:{type:String},keepCurrentOriginalModel:{type:Boolean},keepCurrentModifiedModel:{type:Boolean,default:!1},theme:{type:String,default:"light"},options:{type:Object,default:()=>({})},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:{type:String}};var LH=Object.defineProperty,RH=Object.getOwnPropertySymbols,BH=Object.prototype.hasOwnProperty,DH=Object.prototype.propertyIsEnumerable,VH=(e,t,n)=>t in e?LH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;t.defineComponent({name:"MonacoDiffEditor",props:PH,slots:Object,setup(e,n){const{emit:r}=n,{render:o,monacoRef:a,containerRef:i,editorRef:l,unload:s,whenMonacoIsReady:c}=IH(e,n,"vue-monaco-diff-editor");t.watch((()=>e.originalModelPath),c((()=>{var t;const n=null==(t=l.value)?void 0:t.getOriginalEditor(),r=TH(a.value,e.original||"",e.originalLanguage||e.language||"text",e.originalModelPath||"");r!==(null==n?void 0:n.getModel())&&(null==n||n.setModel(r))}))),t.watch((()=>e.modifiedModelPath),c((()=>{const t=l.value.getModifiedEditor(),n=TH(a.value,e.modified||"",e.modifiedLanguage||e.language||"text",e.modifiedModelPath||"");n!==t.getModel()&&t.setModel(n)}))),t.watch((()=>e.modified),c((()=>{const t=l.value.getModifiedEditor();t.getOption(a.value.editor.EditorOption.readOnly)?t.setValue(e.modified||""):e.modified!==t.getValue()&&(t.executeEdits("",[{range:t.getModel().getFullModelRange(),text:e.modified||"",forceMoveMarkers:!0}]),t.pushUndoStop())}))),t.watch((()=>e.original),c((()=>{var t,n;null==(n=null==(t=l.value)?void 0:t.getModel())||n.original.setValue((null==e?void 0:e.original)||"")}))),t.watch((()=>[e.language,e.originalLanguage,e.modifiedLanguage]),c((()=>{const{original:t,modified:n}=l.value.getModel();a.value.editor.setModelLanguage(t,e.originalLanguage||e.language||"text"),a.value.editor.setModelLanguage(n,e.originalLanguage||e.language||"text")})));const u=()=>{var t;if(!i.value||!a.value||l.value)return;r("beforeMount",a.value),l.value=a.value.editor.createDiffEditor(i.value,((e,t)=>{for(var n in t||(t={}))BH.call(t,n)&&VH(e,n,t[n]);if(RH)for(var n of RH(t))DH.call(t,n)&&VH(e,n,t[n]);return e})({automaticLayout:!0,autoIndent:"brackets",theme:e.theme,formatOnPaste:!0,formatOnType:!0},e.options));const n=TH(a.value,e.original||"",e.originalLanguage||e.language||"text",e.originalModelPath||""),o=TH(a.value,e.modified||"",e.modifiedLanguage||e.language||"text",e.modifiedModelPath||"");null==(t=l.value)||t.setModel({original:n,modified:o}),r("mount",l.value,a.value)};return t.onMounted((()=>{const e=t.watch(a,(()=>{i.value&&a.value&&(t.nextTick((()=>e())),u())}),{immediate:!0})})),t.onUnmounted((()=>{l.value?function(){var t,n,r,o;const a=null==(t=l.value)?void 0:t.getModel();e.keepCurrentOriginalModel||null==(n=null==a?void 0:a.original)||n.dispose();e.keepCurrentModifiedModel||null==(r=null==a?void 0:a.modified)||r.dispose();null==(o=l.value)||o.dispose()}():s()})),o}});const jH={defaultValue:{type:String},defaultLanguage:{type:String},defaultPath:{type:String},value:{type:String,value:""},language:{type:String,default:"javascript"},path:{type:String,default:""},theme:{type:String,default:"light"},line:{type:Number},options:{type:Object,default:()=>({})},overrideServices:{type:Object},saveViewState:{type:Boolean,default:!0},keepCurrentModel:{type:Boolean,default:!1},width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"100%"},className:{type:String}};var FH=Object.defineProperty,zH=Object.getOwnPropertySymbols,$H=Object.prototype.hasOwnProperty,HH=Object.prototype.propertyIsEnumerable,UH=(e,t,n)=>t in e?FH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const WH=new Map;var GH=t.defineComponent({name:"MonacoEditor",props:jH,emits:["update:value","beforeMount","mount","change","validate"],slots:Object,setup(e,n){const{emit:r}=n,{render:o,containerRef:a,editorRef:i,monacoRef:l,unload:s,whenMonacoIsReady:c}=IH(e,n,"vue-monaco-editor"),{disposeValidator:u}=function(e,n,r){const o=t.ref(_H),a=t.watch((()=>[n,r]),(()=>{if(n.value&&r.value){t.nextTick((()=>a()));const i=n.value.editor.onDidChangeMarkers((t=>{var o,a;const i=null==(a=null==(o=r.value)?void 0:o.getModel())?void 0:a.uri;if(i&&t.find((e=>e.path===i.path))){const t=n.value.editor.getModelMarkers({resource:i});e("validate",t)}}));o.value=()=>null==i?void 0:i.dispose()}}));return{disposeValidator:o}}(r,l,i),d=t.ref(!1);t.watch((()=>e.path),c(((t,n)=>{var r,o,a;const s=TH(l.value,e.defaultValue||e.value||"",e.defaultLanguage||e.language||"",e.path||e.defaultPath||"");s!==(null==(r=i.value)?void 0:r.getModel())&&(e.saveViewState&&WH.set(n,i.value.saveViewState()),null==(o=i.value)||o.setModel(s),e.saveViewState&&(null==(a=i.value)||a.restoreViewState(WH.get(t))))}))),t.watch((()=>e.value),c((e=>{i.value&&void 0!==e&&(i.value.getOption(l.value.editor.EditorOption.readOnly)?i.value.setValue(e):e!==i.value.getValue()&&(d.value=!0,i.value.executeEdits("",[{range:i.value.getModel().getFullModelRange(),text:e,forceMoveMarkers:!0}]),i.value.pushUndoStop(),d.value=!1))}))),t.watch((()=>e.language),c((e=>{var t,n;const r=null==(t=i.value)?void 0:t.getModel();r&&e&&(null==(n=l.value)||n.editor.setModelLanguage(r,e))}))),t.watch((()=>e.line),c((e=>{var t;void 0!==e&&(null==(t=i.value)||t.revealLine(e))})));const p=()=>{var t,n,o;if(!a.value||!l.value||i.value)return;r("beforeMount",l.value);const s=e.path||e.defaultPath,c=TH(l.value,e.value||e.defaultValue||"",e.language||e.defaultLanguage||"",s||"");if(i.value=null==(t=l.value)?void 0:t.editor.create(a.value,((e,t)=>{for(var n in t||(t={}))$H.call(t,n)&&UH(e,n,t[n]);if(zH)for(var n of zH(t))HH.call(t,n)&&UH(e,n,t[n]);return e})({model:c,theme:e.theme,automaticLayout:!0,autoIndent:"brackets",formatOnPaste:!0,formatOnType:!0},e.options),e.overrideServices),null==(n=i.value)||n.onDidChangeModelContent((e=>{if(!d.value){const t=i.value.getValue();r("update:value",t),r("change",t,e)}})),e.saveViewState){const e=WH.get(s);e&&i.value.restoreViewState(e)}void 0!==e.line&&(null==(o=i.value)||o.revealLine(e.line)),r("mount",i.value,l.value)};return t.onMounted((()=>{const e=t.watch((()=>l.value),(n=>{a.value&&n&&(t.nextTick((()=>e())),p())}),{immediate:!0})})),t.onUnmounted((()=>{var t;null==(t=u.value)||t.call(u),i.value?function(){var t,n;e.keepCurrentModel&&(e.saveViewState?WH.set(e.path,i.value.saveViewState()):null==(t=i.value.getModel())||t.dispose());null==(n=i.value)||n.dispose()}():s()})),o}});const KH={class:"source-editor"},qH=["textContent"],YH=YN({__name:"source",setup(e){var n;const{options:r,editor:o}=zN(),a=GN("document");OH.config({paths:{vs:`${r.value.cdnUrl}/libs/monaco-editor/min/vs`},"vs/nls":{availableLanguages:{"*":"zh-cn"}}});const i={fontSize:14,formatOnType:!0,formatOnPaste:!0,lineNumbersMinChars:3,minimap:{enabled:!1},wordWrap:"on",scrollbar:{verticalScrollbarSize:5,horizontalScrollbarSize:5,scrollbarVisibility:"auto",horizontal:"hidden"}},l=t.ref((null==(n=o.value)?void 0:n.getHTML())||a.value.content),s=async e=>{setTimeout((()=>{e.getAction("editor.action.formatDocument").run()}),200)},c=()=>{a.value.content=l.value};return(e,n)=>(t.openBlock(),t.createElementBlock("div",KH,[t.createVNode(t.unref(GH),{value:l.value,"onUpdate:value":n[0]||(n[0]=e=>l.value=e),options:i,language:"html",onMount:s,onChange:c},{loading:t.withCtx((()=>[t.createElementVNode("span",{class:"loading",textContent:t.toDisplayString(e.t("source.loading"))},null,8,qH)])),_:1},8,["value"])]))}},[["__scopeId","data-v-0015b0a4"]]),XH={__name:"modal",props:{visible:{type:Boolean,default:!1}},setup(e){const{container:n}=zN();return(r,o)=>{const a=dC,i=FE;return t.openBlock(),t.createBlock(i,t.mergeProps({visible:e.visible,attach:t.unref(n),"prevent-scroll-through":!1,placement:"center",draggable:"","destroy-on-close":""},r.$attrs),{header:t.withCtx((()=>[r.$attrs.icon?(t.openBlock(),t.createBlock(a,{key:0,name:r.$attrs.icon},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("span",null,t.toDisplayString(r.$attrs.header),1)])),default:t.withCtx((()=>[t.renderSlot(r.$slots,"default")])),_:3},16,["visible","attach"])}}},ZH={class:"page-options-container"},JH=["textContent"],QH={class:"desc"},eU={class:"page-setting"},tU={class:"item"},nU={class:"item"},rU={class:"page-margin-inbuilt"},oU=["textContent"],aU=["textContent"],iU=["textContent"],lU=["textContent"],sU={class:"page-setting"},cU={class:"item"},uU={class:"item"},dU={class:"item"},pU={class:"item"},fU=YN({__name:"page-options",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(e,{emit:n}){const r=n,{container:o,options:a,page:i}=zN(),l=e=>{i.value.size=a.value.dicts.pageSizes[e]},s=(e,t)=>{!e||e<10?i.value.size[t]=10:i.value.size.label=KN("pageOptions.size.custom")},c=e=>{i.value.margin=e},u=(e,t)=>{!e||e<0?i.value.margin[t]=0:(i.value.margin.layout="custom",c(i.value.margin))};return(n,d)=>{const p=dC,f=kk,h=wk,m=tk,v=xw,g=kw,b=qg,y=ek,w=XH;return t.openBlock(),t.createBlock(w,{visible:e.visible,footer:!1,icon:"page-margin",header:n.t("pageOptions.title"),width:"460px",onClose:d[17]||(d[17]=e=>r("close"))},{default:t.withCtx((()=>[t.createElementVNode("div",ZH,[t.createVNode(y,{"label-align":"left"},{default:t.withCtx((()=>[t.createVNode(m,{label:n.t("page.orientation.text")},{default:t.withCtx((()=>[t.createVNode(h,{modelValue:t.unref(i).orientation,"onUpdate:modelValue":d[0]||(d[0]=e=>t.unref(i).orientation=e),variant:"default-filled"},{default:t.withCtx((()=>[t.createVNode(f,{value:"landscape"},{default:t.withCtx((()=>[t.createVNode(p,{name:"page"}),t.createTextVNode(" "+t.toDisplayString(n.t("page.orientation.landscape")),1)])),_:1}),t.createVNode(f,{value:"portrait"},{default:t.withCtx((()=>[t.createVNode(p,{class:"rotate",name:"page"}),t.createTextVNode(" "+t.toDisplayString(n.t("page.orientation.portrait")),1)])),_:1})])),_:1},8,["modelValue"])])),_:1},8,["label"]),t.createVNode(m,{label:n.t("page.size.text")},{default:t.withCtx((()=>[t.createVNode(g,{"popup-props":{overlayClassName:"page-size-select",destroyOnClose:!0,attach:t.unref(o)},placeholder:"",onChange:l},{valueDisplay:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(t.unref(i).size.label),1)])),default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a).dicts.pageSizes,((e,r)=>(t.openBlock(),t.createBlock(v,{key:r,value:r},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"label",textContent:t.toDisplayString(n.l(e.label))},null,8,JH),t.createElementVNode("div",QH,t.toDisplayString(e.width)+t.toDisplayString(n.t("page.size.cm"))+" × "+t.toDisplayString(e.height)+t.toDisplayString(n.t("page.size.cm")),1)])),_:2},1032,["value"])))),128))])),_:1},8,["popup-props"])])),_:1},8,["label"]),t.createVNode(m,{label:n.t("pageOptions.size.text")},{default:t.withCtx((()=>[t.createElementVNode("div",eU,[t.createElementVNode("div",tU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).size.width,"onUpdate:modelValue":d[1]||(d[1]=e=>t.unref(i).size.width=e),theme:"normal",align:"center",min:10,label:n.t("pageOptions.size.width"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[2]||(d[2]=e=>s(e,"width"))},null,8,["modelValue","label","suffix"])]),t.createElementVNode("div",nU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).size.height,"onUpdate:modelValue":d[3]||(d[3]=e=>t.unref(i).size.height=e),theme:"normal",align:"center",min:10,label:n.t("pageOptions.size.height"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[4]||(d[4]=e=>s(e,"height"))},null,8,["modelValue","label","suffix"])])])])),_:1},8,["label"]),t.createVNode(m,{label:n.t("pageOptions.margin.text"),name:"name"},{default:t.withCtx((()=>[t.createElementVNode("div",null,[t.createElementVNode("div",rU,[t.createElementVNode("div",{class:t.normalizeClass(["item",{active:!t.unref(i).margin.layout}]),textContent:t.toDisplayString(n.t("pageOptions.margin.default")),onClick:d[5]||(d[5]=e=>c(t.unref(a).page.defaultMargin))},null,10,oU),t.createElementVNode("div",{class:t.normalizeClass(["item narrow",{active:"narrow"===t.unref(i).margin.layout}]),textContent:t.toDisplayString(n.t("pageOptions.margin.narrow")),onClick:d[6]||(d[6]=e=>c({left:1.27,right:1.27,top:1.27,bottom:1.27,layout:"narrow"}))},null,10,aU),t.createElementVNode("div",{class:t.normalizeClass(["item moderate",{active:"moderate"===t.unref(i).margin.layout}]),textContent:t.toDisplayString(n.t("pageOptions.margin.moderate")),onClick:d[7]||(d[7]=e=>c({left:1.91,right:1.91,top:2.54,bottom:2.54,layout:"moderate"}))},null,10,iU),t.createElementVNode("div",{class:t.normalizeClass(["item wide",{active:"wide"===t.unref(i).margin.layout}]),textContent:t.toDisplayString(n.t("pageOptions.margin.wide")),onClick:d[8]||(d[8]=e=>c({top:2.54,bottom:2.54,left:5.08,right:5.08,layout:"wide"}))},null,10,lU)]),t.createElementVNode("div",sU,[t.createElementVNode("div",cU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.top,"onUpdate:modelValue":d[9]||(d[9]=e=>t.unref(i).margin.top=e),theme:"normal",align:"center",min:0,step:.1,label:n.t("pageOptions.margin.top"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[10]||(d[10]=e=>u(e,"top"))},null,8,["modelValue","label","suffix"])]),t.createElementVNode("div",uU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.bottom,"onUpdate:modelValue":d[11]||(d[11]=e=>t.unref(i).margin.bottom=e),theme:"normal",align:"center",min:0,step:.1,label:n.t("pageOptions.margin.bottom"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[12]||(d[12]=e=>u(e,"bottom"))},null,8,["modelValue","label","suffix"])]),t.createElementVNode("div",dU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.left,"onUpdate:modelValue":d[13]||(d[13]=e=>t.unref(i).margin.left=e),theme:"normal",align:"center",min:0,step:.1,label:n.t("pageOptions.margin.left"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[14]||(d[14]=e=>u(e,"left"))},null,8,["modelValue","label","suffix"])]),t.createElementVNode("div",pU,[t.createVNode(b,{class:"page-setting-number",modelValue:t.unref(i).margin.right,"onUpdate:modelValue":d[15]||(d[15]=e=>t.unref(i).margin.right=e),theme:"normal",align:"center",min:0,step:.1,label:n.t("pageOptions.margin.right"),suffix:n.t("page.size.cm"),placeholder:"","allow-input-overLimit":!1,onBlur:d[16]||(d[16]=e=>u(e,"right"))},null,8,["modelValue","label","suffix"])])])])])),_:1},8,["label"])])),_:1})])])),_:1},8,["visible","header"])}}},[["__scopeId","data-v-3a3d07f6"]]);var hU={exports:{}};!function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},o={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++n}),e.__id},clone:function e(t,n){var r,a;switch(n=n||{},o.util.type(t)){case"Object":if(a=o.util.objId(t),n[a])return n[a];for(var i in r={},n[a]=r,t)t.hasOwnProperty(i)&&(r[i]=e(t[i],n));return r;case"Array":return a=o.util.objId(t),n[a]?n[a]:(r=[],n[a]=r,t.forEach((function(t,o){r[o]=e(t,n)})),r);default:return t}},getLanguage:function(e){for(;e;){var n=t.exec(e.className);if(n)return n[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,n){e.className=e.className.replace(RegExp(t,"gi"),""),e.classList.add("language-"+n)},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var t=document.getElementsByTagName("script");for(var n in t)if(t[n].src==e)return t[n]}return null}},isActive:function(e,t,n){for(var r="no-"+t;e;){var o=e.classList;if(o.contains(t))return!0;if(o.contains(r))return!1;e=e.parentElement}return!!n}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var a=(r=r||o.languages)[e],i={};for(var l in a)if(a.hasOwnProperty(l)){if(l==t)for(var s in n)n.hasOwnProperty(s)&&(i[s]=n[s]);n.hasOwnProperty(l)||(i[l]=a[l])}var c=r[e];return r[e]=i,o.languages.DFS(o.languages,(function(t,n){n===c&&t!=e&&(this[t]=i)})),i},DFS:function e(t,n,r,a){a=a||{};var i=o.util.objId;for(var l in t)if(t.hasOwnProperty(l)){n.call(t,l,t[l],r||l);var s=t[l],c=o.util.type(s);"Object"!==c||a[i(s)]?"Array"!==c||a[i(s)]||(a[i(s)]=!0,e(s,n,l,a)):(a[i(s)]=!0,e(s,n,null,a))}}},plugins:{},highlightAll:function(e,t){o.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var r={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),o.hooks.run("before-all-elements-highlight",r);for(var a,i=0;a=r.elements[i++];)o.highlightElement(a,!0===t,r.callback)},highlightElement:function(t,n,r){var a=o.util.getLanguage(t),i=o.languages[a];o.util.setLanguage(t,a);var l=t.parentElement;l&&"pre"===l.nodeName.toLowerCase()&&o.util.setLanguage(l,a);var s={element:t,language:a,grammar:i,code:t.textContent};function c(e){s.highlightedCode=e,o.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,o.hooks.run("after-highlight",s),o.hooks.run("complete",s),r&&r.call(s.element)}if(o.hooks.run("before-sanity-check",s),(l=s.element.parentElement)&&"pre"===l.nodeName.toLowerCase()&&!l.hasAttribute("tabindex")&&l.setAttribute("tabindex","0"),!s.code)return o.hooks.run("complete",s),void(r&&r.call(s.element));if(o.hooks.run("before-highlight",s),s.grammar)if(n&&e.Worker){var u=new Worker(o.filename);u.onmessage=function(e){c(e.data)},u.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else c(o.highlight(s.code,s.grammar,s.language));else c(o.util.encode(s.code))},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};if(o.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=o.tokenize(r.code,r.grammar),o.hooks.run("after-tokenize",r),a.stringify(o.util.encode(r.tokens),r.language)},tokenize:function(e,t){var n=t.rest;if(n){for(var r in n)t[r]=n[r];delete t.rest}var o=new s;return c(o,o.head,e),l(e,o,t,o.head,0),function(e){var t=[],n=e.head.next;for(;n!==e.tail;)t.push(n.value),n=n.next;return t}(o)},hooks:{all:{},add:function(e,t){var n=o.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=o.hooks.all[e];if(n&&n.length)for(var r,a=0;r=n[a++];)r(t)}},Token:a};function a(e,t,n,r){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length}function i(e,t,n,r){e.lastIndex=t;var o=e.exec(n);if(o&&r&&o[1]){var a=o[1].length;o.index+=a,o[0]=o[0].slice(a)}return o}function l(e,t,n,r,s,d){for(var p in n)if(n.hasOwnProperty(p)&&n[p]){var f=n[p];f=Array.isArray(f)?f:[f];for(var h=0;h<f.length;++h){if(d&&d.cause==p+","+h)return;var m=f[h],v=m.inside,g=!!m.lookbehind,b=!!m.greedy,y=m.alias;if(b&&!m.pattern.global){var w=m.pattern.toString().match(/[imsuy]*$/)[0];m.pattern=RegExp(m.pattern.source,w+"g")}for(var k=m.pattern||m,x=r.next,E=s;x!==t.tail&&!(d&&E>=d.reach);E+=x.value.length,x=x.next){var C=x.value;if(t.length>e.length)return;if(!(C instanceof a)){var S,O=1;if(b){if(!(S=i(k,E,e,g))||S.index>=e.length)break;var _=S.index,N=S.index+S[0].length,T=E;for(T+=x.value.length;_>=T;)T+=(x=x.next).value.length;if(E=T-=x.value.length,x.value instanceof a)continue;for(var A=x;A!==t.tail&&(T<N||"string"==typeof A.value);A=A.next)O++,T+=A.value.length;O--,C=e.slice(E,T),S.index-=E}else if(!(S=i(k,0,C,g)))continue;_=S.index;var M=S[0],I=C.slice(0,_),P=C.slice(_+M.length),L=E+C.length;d&&L>d.reach&&(d.reach=L);var R=x.prev;if(I&&(R=c(t,R,I),E+=I.length),u(t,R,O),x=c(t,R,new a(p,v?o.tokenize(M,v):M,y,M)),P&&c(t,x,P),O>1){var B={cause:p+","+h,reach:L};l(e,t,n,x.prev,E,B),d&&B.reach>d.reach&&(d.reach=B.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,o={value:n,prev:t,next:r};return t.next=o,r.prev=o,e.length++,o}function u(e,t,n){for(var r=t.next,o=0;o<n&&r!==e.tail;o++)r=r.next;t.next=r,r.prev=t,e.length-=o}if(e.Prism=o,a.stringify=function e(t,n){if("string"==typeof t)return t;if(Array.isArray(t)){var r="";return t.forEach((function(t){r+=e(t,n)})),r}var a={type:t.type,content:e(t.content,n),tag:"span",classes:["token",t.type],attributes:{},language:n},i=t.alias;i&&(Array.isArray(i)?Array.prototype.push.apply(a.classes,i):a.classes.push(i)),o.hooks.run("wrap",a);var l="";for(var s in a.attributes)l+=" "+s+'="'+(a.attributes[s]||"").replace(/"/g,""")+'"';return"<"+a.tag+' class="'+a.classes.join(" ")+'"'+l+">"+a.content+"</"+a.tag+">"},!e.document)return e.addEventListener?(o.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,a=n.code,i=n.immediateClose;e.postMessage(o.highlight(a,o.languages[r],r)),i&&e.close()}),!1),o):o;var d=o.util.currentScript();function p(){o.manual||o.highlightAll()}if(d&&(o.filename=d.src,d.hasAttribute("data-manual")&&(o.manual=!0)),!o.manual){var f=document.readyState;"loading"===f||"interactive"===f&&d&&d.defer?document.addEventListener("DOMContentLoaded",p):window.requestAnimationFrame?window.requestAnimationFrame(p):window.setTimeout(p,16)}return o}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),void 0!==k&&(k.Prism=t),t.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},t.languages.markup.tag.inside["attr-value"].inside.entity=t.languages.markup.entity,t.languages.markup.doctype.inside["internal-subset"].inside=t.languages.markup,t.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(t.languages.markup.tag,"addInlined",{value:function(e,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:t.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};o["language-"+n]={pattern:/[\s\S]+/,inside:t.languages[n]};var a={};a[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:o},t.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(t.languages.markup.tag,"addAttribute",{value:function(e,n){t.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[n,"language-"+n],inside:t.languages[n]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),t.languages.html=t.languages.markup,t.languages.mathml=t.languages.markup,t.languages.svg=t.languages.markup,t.languages.xml=t.languages.extend("markup",{}),t.languages.ssml=t.languages.xml,t.languages.atom=t.languages.xml,t.languages.rss=t.languages.xml,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(t),t.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},t.languages.javascript=t.languages.extend("clike",{"class-name":[t.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),t.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,t.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:t.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:t.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:t.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:t.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),t.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:t.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),t.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),t.languages.markup&&(t.languages.markup.tag.addInlined("script","javascript"),t.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),t.languages.js=t.languages.javascript,function(){if(void 0!==t&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},n="data-src-status",r="loading",o="loaded",a="pre[data-src]:not(["+n+'="'+o+'"]):not(['+n+'="'+r+'"])';t.hooks.add("before-highlightall",(function(e){e.selector+=", "+a})),t.hooks.add("before-sanity-check",(function(i){var l=i.element;if(l.matches(a)){i.code="",l.setAttribute(n,r);var s=l.appendChild(document.createElement("CODE"));s.textContent="Loading…";var c=l.getAttribute("data-src"),u=i.language;if("none"===u){var d=(/\.(\w+)$/.exec(c)||[,"none"])[1];u=e[d]||d}t.util.setLanguage(s,u),t.util.setLanguage(l,u);var p=t.plugins.autoloader;p&&p.loadLanguages(u),function(e,t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?t(r.responseText):r.status>=400?n("✖ Error "+r.status+" while fetching file: "+r.statusText):n("✖ Error: File does not exist or is empty"))},r.send(null)}(c,(function(e){l.setAttribute(n,o);var r=function(e){var t=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(e||"");if(t){var n=Number(t[1]),r=t[2],o=t[3];return r?o?[n,Number(o)]:[n,void 0]:[n,n]}}(l.getAttribute("data-range"));if(r){var a=e.split(/\r\n?|\n/g),i=r[0],c=null==r[1]?a.length:r[1];i<0&&(i+=a.length),i=Math.max(0,Math.min(i-1,a.length)),c<0&&(c+=a.length),c=Math.max(0,Math.min(c,a.length)),e=a.slice(i,c).join("\n"),l.hasAttribute("data-start")||l.setAttribute("data-start",String(i+1))}s.textContent=e,t.highlightElement(s)}),(function(e){l.setAttribute(n,"failed"),s.textContent=e}))}})),t.plugins.fileHighlight={highlight:function(e){for(var n,r=(e||document).querySelectorAll(a),o=0;n=r[o++];)t.highlightElement(n)}};var i=!1;t.fileHighlight=function(){i||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),i=!0),t.plugins.fileHighlight.highlight.apply(this,arguments)}}}()}(hU);const mU=x(hU.exports);var vU,gU,bU,yU;!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i<o.length;i++)a[o[i]]=e.languages.bash[o[i]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism),function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),function(e){var t,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:t={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},o={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:o,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:o})}(Prism),Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},section:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/},function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism),Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:Prism.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,(function(){return e})),"i"),lookbehind:!0,greedy:!0,inside:r},Prism.languages.insertBefore("markup","cdata",o)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/},Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/},Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){e.languages.opencl=e.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),e.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var t={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};e.languages.insertBefore("c","keyword",t),e.languages.cpp&&(t["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},e.languages.insertBefore("cpp","keyword",t))}(Prism),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(Prism),vU=Prism,gU=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,bU=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,yU={pattern:RegExp(/(^|[^\w.])/.source+bU+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}},vU.languages.java=vU.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[yU,{pattern:RegExp(/(^|[^\w.])/.source+bU+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:yU.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+bU+/[A-Z]\w*\b/.source),lookbehind:!0,inside:yU.inside}],keyword:gU,function:[vU.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),vU.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),vU.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":yU,keyword:gU,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+bU+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:yU.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+bU+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:yU.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,(function(){return gU.source}))),lookbehind:!0,inside:{punctuation:/\./}}}),Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,function(e){e.languages.ruby=e.languages.extend("clike",{comment:{pattern:/#.*|^=begin\s[\s\S]*?^=end/m,greedy:!0},"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/,operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/,punctuation:/[(){}[\].,;]/}),e.languages.insertBefore("ruby","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var t={pattern:/((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/,lookbehind:!0,inside:{content:{pattern:/^(#\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:e.languages.ruby},delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"}}};delete e.languages.ruby.function;var n="(?:"+[/([^a-zA-Z0-9\s{(\[<=])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/\((?:[^()\\]|\\[\s\S]|\((?:[^()\\]|\\[\s\S])*\))*\)/.source,/\{(?:[^{}\\]|\\[\s\S]|\{(?:[^{}\\]|\\[\s\S])*\})*\}/.source,/\[(?:[^\[\]\\]|\\[\s\S]|\[(?:[^\[\]\\]|\\[\s\S])*\])*\]/.source,/<(?:[^<>\\]|\\[\s\S]|<(?:[^<>\\]|\\[\s\S])*>)*>/.source].join("|")+")",r=/(?:"(?:\\.|[^"\\\r\n])*"|(?:\b[a-zA-Z_]\w*|[^\s\0-\x7F]+)[?!]?|\$.)/.source;e.languages.insertBefore("ruby","keyword",{"regex-literal":[{pattern:RegExp(/%r/.source+n+/[egimnosux]{0,6}/.source),greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:t,regex:/[\s\S]+/}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:[{pattern:RegExp(/(^|[^:]):/.source+r),lookbehind:!0,greedy:!0},{pattern:RegExp(/([\r\n{(,][ \t]*)/.source+r+/(?=:(?!:))/.source),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}}}),e.languages.insertBefore("ruby","string",{"string-literal":[{pattern:RegExp(/%[qQiIwWs]?/.source+n),greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?/}},interpolation:t,string:/[\s\S]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\b\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[\s\S]+/}}],"command-literal":[{pattern:RegExp(/%x/.source+n),greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/,greedy:!0,inside:{interpolation:t,command:{pattern:/[\s\S]+/,alias:"string"}}}]}),delete e.languages.ruby.string,e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/}),e.languages.rb=e.languages.ruby}(Prism),Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,(function(){return t.source}));e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,(function(){return t.source}))),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,(function(){return n}))+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism),Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),Prism.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete Prism.languages.go["class-name"],Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],a=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function s(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function c(t){var n={};n["interpolation-punctuation"]=o;var a=e.tokenize(t,n);if(3===a.length){var i=[1,1];i.push.apply(i,s(a[1],e.languages.javascript,"javascript")),a.splice.apply(a,i)}return new e.Token("interpolation",a,r.alias,t)}function u(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(a),lookbehind:!0}}),i=0,u={},d=s(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(i++,r)););return u[n]=o,n})).join(""),n,r),p=Object.keys(u);return i=0,function e(t){for(var n=0;n<t.length;n++){if(i>=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[i],a="string"==typeof r?r:r.content,l=a.indexOf(o);if(-1!==l){++i;var s=a.substring(0,l),d=c(u[o]),f=a.substring(l+o.length),h=[];if(s&&h.push(s),h.push(d),f){var m=[f];e(m),h.push.apply(h,m)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(h)),n+=h.length-1):r.content=h}}else{var v=r.content;Array.isArray(v)?e(v):e([v])}}}(d),new e.Token(r,d,"language-"+r,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var d={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in d&&function t(n){for(var r=0,o=n.length;r<o;r++){var a=n[r];if("string"!=typeof a){var i=a.content;if(Array.isArray(i))if("template-string"===a.type){var l=i[1];if(3===i.length&&"string"!=typeof l&&"embedded-code"===l.type){var s=p(l),c=l.alias,d=Array.isArray(c)?c[0]:c,f=e.languages[d];if(!f)continue;i[1]=u(s,f,d)}}else t(i);else"string"!=typeof i&&t([i])}}}(t.tokens)}))}(Prism),function(e){var t=e.util.clone(e.languages.javascript),n=/(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source,r=/(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source,o=/(?:\{<S>*\.{3}(?:[^{}]|<BRACES>)*\})/.source;function a(e,t){return e=e.replace(/<S>/g,(function(){return n})).replace(/<BRACES>/g,(function(){return r})).replace(/<SPREAD>/g,(function(){return o})),RegExp(e,t)}o=a(o).source,e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=a(/<\/?(?:[\w.:-]+(?:<S>+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|<BRACES>))?|<SPREAD>))*<S>*\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:a(/<SPREAD>/.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:a(/=<BRACES>/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var i=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(i).join(""):""},l=function(t){for(var n=[],r=0;r<t.length;r++){var o=t[r],a=!1;if("string"!=typeof o&&("tag"===o.type&&o.content[0]&&"tag"===o.content[0].type?"</"===o.content[0].content[0].content?n.length>0&&n[n.length-1].tagName===i(o.content[0].content[1])&&n.pop():"/>"===o.content[o.content.length-1].content||n.push({tagName:i(o.content[0].content[1]),openedBraces:0}):n.length>0&&"punctuation"===o.type&&"{"===o.content?n[n.length-1].openedBraces++:n.length>0&&n[n.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?n[n.length-1].openedBraces--:a=!0),(a||"string"==typeof o)&&n.length>0&&0===n[n.length-1].openedBraces){var s=i(o);r<t.length-1&&("string"==typeof t[r+1]||"plain-text"===t[r+1].type)&&(s+=i(t[r+1]),t.splice(r+1,1)),r>0&&("string"==typeof t[r-1]||"plain-text"===t[r-1].type)&&(s=i(t[r-1])+s,t.splice(r-1,1),r--),t[r]=new e.Token("plain-text",s,null,s)}o.content&&"string"!=typeof o.content&&l(o.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||l(e.tokens)}))}(Prism),Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/},function(e){var t=/(?:\((?:[^()\\]|\\[\s\S])*\)|\{(?:[^{}\\]|\\[\s\S])*\}|\[(?:[^[\]\\]|\\[\s\S])*\]|<(?:[^<>\\]|\\[\s\S])*>)/.source;e.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(/\b(?:q|qq|qw|qx)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"),greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:RegExp(/\b(?:m|qr)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source,/([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,t].join("|")+")"+/[msixpodualngc]*/.source),greedy:!0},{pattern:RegExp(/(^|[^-])\b(?:s|tr|y)(?![a-zA-Z0-9])\s*/.source+"(?:"+[/([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2/.source,/([a-zA-Z0-9])(?:(?!\3)[^\\]|\\[\s\S])*\3(?:(?!\3)[^\\]|\\[\s\S])*\3/.source,t+/\s*/.source+t].join("|")+")"+/[msixpodualngcer]*/.source),lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ \t]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,(function(){return t}));t=t.replace(/<self>/g,(function(){return/[^\s\S]/.source})),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach((function(e){e.inside.interpolation.inside=Prism.languages.swift})),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},function(e){function t(e,t){return e.replace(/<<(\d+)>>/g,(function(e,n){return"(?:"+t[+n]+")"}))}function n(e,n,r){return RegExp(t(e,n),"")}function r(e,t){for(var n=0;n<t;n++)e=e.replace(/<<self>>/g,(function(){return"(?:"+e+")"}));return e.replace(/<<self>>/g,"[^\\s\\S]")}var o="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",a="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",l="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function s(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var c=s(a),u=RegExp(s(o+" "+a+" "+i+" "+l)),d=s(a+" "+i+" "+l),p=s(o+" "+a+" "+l),f=r(/<(?:[^<>;=+\-*/%&|^]|<<self>>)*>/.source,2),h=r(/\((?:[^()]|<<self>>)*\)/.source,2),m=/@?\b[A-Za-z_]\w*\b/.source,v=t(/<<0>>(?:\s*<<1>>)?/.source,[m,f]),g=t(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source,[d,v]),b=/\[\s*(?:,\s*)*\]/.source,y=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[g,b]),w=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,h,b]),k=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[w]),x=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[k,g,b]),E={keyword:u,punctuation:/[<>()?,.:[\]]/},C=/'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source,S=/"(?:\\.|[^\\"\r\n])*"/.source,O=/@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source;e.languages.csharp=e.languages.extend("clike",{string:[{pattern:n(/(^|[^$\\])<<0>>/.source,[O]),lookbehind:!0,greedy:!0},{pattern:n(/(^|[^@$\\])<<0>>/.source,[S]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source,[g]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source,[m,x]),lookbehind:!0,inside:E},{pattern:n(/(\busing\s+)<<0>>(?=\s*=)/.source,[m]),lookbehind:!0},{pattern:n(/(\b<<0>>\s+)<<1>>/.source,[c,v]),lookbehind:!0,inside:E},{pattern:n(/(\bcatch\s*\(\s*)<<0>>/.source,[g]),lookbehind:!0,inside:E},{pattern:n(/(\bwhere\s+)<<0>>/.source,[m]),lookbehind:!0},{pattern:n(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source,[y]),lookbehind:!0,inside:E},{pattern:n(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[x,p,m]),inside:E}],keyword:u,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),e.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),e.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:n(/([(,]\s*)<<0>>(?=\s*:)/.source,[m]),lookbehind:!0,alias:"punctuation"}}),e.languages.insertBefore("csharp","class-name",{namespace:{pattern:n(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source,[m]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:n(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source,[h]),lookbehind:!0,alias:"class-name",inside:E},"return-type":{pattern:n(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source,[x,g]),inside:E,alias:"class-name"},"constructor-invocation":{pattern:n(/(\bnew\s+)<<0>>(?=\s*[[({])/.source,[x]),lookbehind:!0,inside:E,alias:"class-name"},"generic-method":{pattern:n(/<<0>>\s*<<1>>(?=\s*\()/.source,[m,f]),inside:{function:n(/^<<0>>/.source,[m]),generic:{pattern:RegExp(f),alias:"class-name",inside:E}}},"type-list":{pattern:n(/\b((?:<<0>>\s+<<1>>|record\s+<<1>>\s*<<5>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>|<<1>>\s*<<5>>|<<6>>)(?:\s*,\s*(?:<<3>>|<<4>>|<<6>>))*(?=\s*(?:where|[{;]|=>|$))/.source,[c,v,m,x,u.source,h,/\bnew\s*\(\s*\)/.source]),lookbehind:!0,inside:{"record-arguments":{pattern:n(/(^(?!new\s*\()<<0>>\s*)<<1>>/.source,[v,h]),lookbehind:!0,greedy:!0,inside:e.languages.csharp},keyword:u,"class-name":{pattern:RegExp(x),greedy:!0,inside:E},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=S+"|"+C,N=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[_]),T=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),A=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,M=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[g,T]);e.languages.insertBefore("csharp","class-name",{attribute:{pattern:n(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[A,M]),lookbehind:!0,greedy:!0,inside:{target:{pattern:n(/^<<0>>(?=\s*:)/.source,[A]),alias:"keyword"},"attribute-arguments":{pattern:n(/\(<<0>>*\)/.source,[T]),inside:e.languages.csharp},"class-name":{pattern:RegExp(g),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var I=/:[^}\r\n]+/.source,P=r(t(/[^"'/()]|<<0>>|\(<<self>>*\)/.source,[N]),2),L=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[P,I]),R=r(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<<self>>*\)/.source,[_]),2),B=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[R,I]);function D(t,r){return{interpolation:{pattern:n(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[t]),lookbehind:!0,inside:{"format-string":{pattern:n(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[r,I]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:e.languages.csharp}}},string:/[\s\S]+/}}e.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:n(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source,[L]),lookbehind:!0,greedy:!0,inside:D(L,P)},{pattern:n(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[B]),lookbehind:!0,greedy:!0,inside:D(B,R)}],char:{pattern:RegExp(C),greedy:!0}}),e.languages.dotnet=e.languages.cs=e.languages.csharp}(Prism),Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",(function(e){if("graphql"===e.language)for(var t=e.tokens.filter((function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type})),n=0;n<t.length;){var r=t[n++];if("keyword"===r.type&&"mutation"===r.content){var o=[];if(d(["definition-mutation","punctuation"])&&"("===u(1).content){n+=2;var a=p(/^\($/,/^\)$/);if(-1===a)continue;for(;n<a;n++){var i=u(0);"variable"===i.type&&(f(i,"variable-input"),o.push(i.content))}n=a+1}if(d(["punctuation","property-query"])&&"{"===u(0).content&&(n++,f(u(0),"property-mutation"),o.length>0)){var l=p(/^\{$/,/^\}$/);if(-1===l)continue;for(var s=n;s<l;s++){var c=t[s];"variable"===c.type&&o.indexOf(c.content)>=0&&f(c,"variable-input")}}}}function u(e){return t[n+e]}function d(e,t){t=t||0;for(var n=0;n<e.length;n++){var r=u(n+t);if(!r||r.type!==e[n])return!1}return!0}function p(e,r){for(var o=1,a=n;a<t.length;a++){var i=t[a],l=i.content;if("punctuation"===i.type&&"string"==typeof l)if(e.test(l))o++;else if(r.test(l)&&0===--o)return a}return-1}function f(e,t){var n=e.alias;n?Array.isArray(n)||(e.alias=n=[n]):e.alias=n=[],n.push(t)}})),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json,Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss,function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"];var n=e.languages.tsx.tag;n.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+n.pattern.source+")",n.pattern.flags),n.lookbehind=!0}(Prism),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",o=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,(function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source})),a=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<value>>/g,(function(){return e}));return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,(function(){return r}))),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,(function(){return r})).replace(/<<key>>/g,(function(){return"(?:"+o+"|"+a+")"}))),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(a),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism),function(e){var t={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,r="(?:[^\\\\-]|"+n.source+")",o=RegExp(r+"-"+r),a={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};e.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:o,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":t,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":t,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":a}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[=!]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?))?/,alias:"punctuation",inside:{"group-name":a}},{pattern:/\)/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}}}(Prism);const wU={class:"preview-header"},kU={class:"title"},xU=["textContent"],EU={class:"actions"},CU={class:"preview-options"},SU={class:"preview-container"},OU=["srcdoc"],_U=YN({__name:"print",setup(e){const{container:r,options:o,page:a,printing:i}=zN(),l=GN("document"),s=GN("print");let c=t.ref(!1),u=t.ref(!1);t.watch((()=>i.value),(e=>{c.value=e})),t.watch((()=>u.value),(e=>{e||(p.value=m(),d.value.contentWindow.location.reload())})),t.watch((()=>s.value),(()=>{p.value=m(),d.value.contentWindow.location.reload()}),{deep:!0});let d=t.ref(null),p=t.ref(""),f=t.ref(!0);const h=()=>{setTimeout((()=>{f.value=!1}),1e3)},m=()=>{var e;if(!c.value)return"";let i=document.querySelector(`${r} .umo-editor`).cloneNode(!0);i.childNodes.forEach((e=>{const t=e.classList;t.contains("ProseMirror-selectednode")&&t.remove("ProseMirror-selectednode"),t.contains("image-node-view")&&e.querySelector(".es-drager img")&&(e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager img").outerHTML),t.contains("text-box-node-view")&&e.querySelector(".es-drager .content")&&(console.log(e.querySelector(".es-drager .content").outerHTML),e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager .content").outerHTML),t.contains("iframe-node-view")&&e.querySelector(".es-drager iframe")&&(e.querySelector(".es-drager").innerHTML=e.querySelector(".es-drager iframe").outerHTML),t.contains("code-block-node-view")&&(e.querySelector(".prism-code-editor").innerHTML=`<pre>${e.querySelector("textarea").value}</pre>`,mU.highlightElement(e.querySelector("pre"))),t.contains("page-break")&&(e.innerHTML='<div class="page-break"></div><div class="page-break"></div>')}));const u=i.querySelectorAll(".Tiptap-mathematics-editor");u&&u.forEach((e=>{const t=e.textContent;t.length>2&&(e.classList.remove("Tiptap-mathematics-editor--hidden"),e.setAttribute("style",""),e.innerHTML=n.renderToString(t.slice(1,-1),{output:"html"}))}));const d=i.querySelectorAll(".Tiptap-mathematics-render");d&&d.forEach((e=>e.parentNode.removeChild(e)));const p=document.querySelector(".umo-watermark").lastChild.cloneNode(!0);p.classList.add("page-watermark");const{orientation:f,size:h,margin:m,background:v}=a.value,g=t.computed((()=>o.value.dicts.lineHeights.find((e=>e.default)).value));return`\n <!DOCTYPE html>\n <html lang="zh-CN" theme-mode="${o.value.theme}">\n <head>\n <title>${l.value.title}</title>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <script src="${o.value.cdnUrl}/libs/paged.polyfill.min.js"><\/script>\n <link href="${o.value.cdnUrl}/libs/umo-editor/style.css" rel="stylesheet" />\n <link href="${o.value.cdnUrl}/libs/katex/katex.min.css" rel="stylesheet" />\n <style>\n body {\n background-color: var(--umo-container-background);\n padding: 25px;\n box-sizing: border-box;\n margin: 0;\n }\n body.printing {\n padding: 0;\n }\n\n /* 文档节点 */\n .umo-editor {\n position: relative;\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: 'liga' 0;\n }\n .umo-editor > .is-empty,\n .ProseMirror-selectednode,\n .Tiptap-invisible-character,\n .node-view .uploading,\n .select-outline.file .file-action,\n .node-view .code-block .show-toolbar,\n .node-view .uploading,\n .selectedCell::after,\n .prism-code-editor .guide-indents,\n .prism-code-editor .active-line::after,\n .katex-mathml,\n .block-menu-hander,\n .error-icon,\n [data-tippy-root] {\n display: none !important;\n }\n\n .hover-shadow {\n box-shadow: none !important;\n }\n .select-outline {\n outline: none !important;\n }\n .select-outline.code-block,\n .select-outline.iframe,\n .select-outline.toc,\n .select-outline.file,\n .select-outline.audio {\n outline: solid 1px var(--umo-content-node-border) !important;\n }\n\n .Tiptap-mathematics-editor {\n background: none !important;\n }\n\n .page-break {\n margin: 0 !important;\n height: 0 !important;\n overflow: hidden;\n }\n\n .prism-code-editor {\n padding: 0.8em;\n display: block;\n max-height: unset!important;\n }\n .prism-code-editor pre{\n white-space: pre-wrap;\n white-space: break-spaces;\n }\n .pagedjs_pages .pagedjs_area {\n line-height: ${g.value}\n }\n\n /* 打印样式 */\n .pagedjs_pages {\n display: flex;\n align-content: center;\n justify-content: center;\n flex-wrap: wrap;\n gap: 15px;\n }\n\n @page {\n size: ${"portrait"===f?h.width:h.height}cm ${"portrait"===f?h.height:h.width}cm; \n margin: ${m.top}cm ${m.right}cm ${m.bottom}cm ${m.left}cm; \n background: ${v};\n box-shadow:\n rgba(0, 0, 0, 0.06) 0px 0px 10px 0px,\n rgba(0, 0, 0, 0.04) 0px 0px 0px 1px;\n pointer-events: none;\n @bottom-center {\n content: '${KN("print.page")}';\n font-size: 12px;\n color: #999;\n }\n }\n\n body.printing .pagedjs_page {\n box-shadow: none !important;\n }\n body.printing:not(.show-page-number) .pagedjs_margin-content {\n display: none !important;\n }\n body.single-column .pagedjs_pages{\n flex-direction: column;\n }\n </style>\n <script>\n class Handler extends Paged.Handler {\n afterPreview() {\n const pages = document.querySelectorAll('.pagedjs_pagebox');\n const observer = new MutationObserver(mutations => {\n mutations.forEach(mutation => {\n if (mutation.removedNodes) {\n Array.from(mutation.removedNodes).forEach(node => {\n if (node?.classList?.contains('page-watermark')) {\n location.reload();\n }\n });\n }\n });\n });\n const config = { childList: true, subtree: true };\n pages.forEach(page => {\n page.insertAdjacentHTML('beforeend', '${p.outerHTML}')\n observer.observe(page, config);\n });\n }\n }\n Paged.registerHandlers(Handler);\n\n window.onbeforeprint = function () {\n document.querySelector('body').classList.add('printing');\n }\n window.onafterprint = function () {\n document.querySelector('body').classList.remove('printing');\n }\n <\/script>\n </head>\n <body class="umo-editor-container umo-scrollbar ${s.value.singleColumn?"single-column":""} ${s.value.showPageNumber?"show-page-number":""}">\n <div id="sprite-plyr" style="display: none;">\n ${(null==(e=document.querySelector("#sprite-plyr"))?void 0:e.innerHTML)||""}\n </div>\n <div class="editor-container">\n ${i.outerHTML}\n </div>\n </body>\n </html>`};t.watch((()=>c.value),(()=>{p.value=m()}));const v=()=>{d.value.contentWindow.print()};return(e,n)=>{const o=dC,a=Kd,l=Xy,m=rv,g=Td,b=FE,y=fU;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(b,{visible:t.unref(c),attach:t.unref(r),"prevent-scroll-through":!1,placement:"center",confirmBtn:e.t("print.title"),cancelBtn:e.t("print.closePreview"),mode:"full-screen",onConfirm:v,onClose:n[3]||(n[3]=e=>i.value=!1),onClosed:n[4]||(n[4]=e=>t.isRef(f)?f.value=!0:f=!0)},{header:t.withCtx((()=>[t.createElementVNode("div",wU,[t.createElementVNode("div",kU,[t.createVNode(o,{name:"print"}),t.createElementVNode("span",{textContent:t.toDisplayString(e.t("print.preview"))},null,8,xU)]),t.createElementVNode("div",EU,[t.createVNode(a,{size:"small",variant:"outline",theme:"default",textContent:t.toDisplayString(e.t("pageOptions.title")),onClick:n[0]||(n[0]=e=>t.isRef(u)?u.value=!0:u=!0)},null,8,["textContent"]),t.createVNode(m,{trigger:"click",placement:"bottom-right"},{content:t.withCtx((()=>[t.createElementVNode("div",CU,[t.createVNode(l,{modelValue:t.unref(s).singleColumn,"onUpdate:modelValue":n[1]||(n[1]=e=>t.unref(s).singleColumn=e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("print.singleColumn")),1)])),_:1},8,["modelValue"]),t.createVNode(l,{modelValue:t.unref(s).showPageNumber,"onUpdate:modelValue":n[2]||(n[2]=e=>t.unref(s).showPageNumber=e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("print.showPageNumber")),1)])),_:1},8,["modelValue"])])])),default:t.withCtx((()=>[t.createVNode(a,{size:"small",variant:"outline",theme:"default",textContent:t.toDisplayString(e.t("print.settings"))},null,8,["textContent"])])),_:1})])])])),default:t.withCtx((()=>[t.createElementVNode("div",SU,[t.createVNode(g,{loading:t.unref(f),text:e.t("print.loading"),size:"small"},{default:t.withCtx((()=>[t.createElementVNode("iframe",{ref_key:"iframeRef",ref:d,srcdoc:t.unref(p),onLoad:h},null,40,OU)])),_:1},8,["loading","text"])])])),_:1},8,["visible","attach","confirmBtn","cancelBtn"]),t.createVNode(y,{visible:t.unref(u),onClose:n[5]||(n[5]=e=>t.isRef(u)?u.value=!1:u=!1)},null,8,["visible"])],64)}}},[["__scopeId","data-v-9c3f34d5"]]),NU={class:"search-replace-container"},TU={class:"search-text"},AU={class:"replace-text"},MU={class:"advanced-options"},IU={class:"button-actions"},PU=YN({__name:"search-replace",setup(e){const{editor:n,searchReplace:r}=zN();let o=t.ref(""),a=t.ref(""),i=t.ref(!1);TT("ctrl+f, command+f",(()=>r.value=!0));const l=t.computed((()=>{var e,t,r;return(null==(r=null==(t=null==(e=n.value)?void 0:e.storage)?void 0:t.searchAndReplace)?void 0:r.results.length)||0})),s=()=>{o.value="",a.value="",n.value.commands.resetIndex()},c=(e=!1)=>{n.value&&(e&&n.value.commands.resetIndex(),n.value.commands.setSearchTerm(o.value),n.value.commands.setReplaceTerm(a.value),n.value.commands.setCaseSensitive(i.value))},u=()=>{if(!n.value)return;const{results:e,resultIndex:t}=n.value.storage.searchAndReplace,r=e[t];if(!r)return;n.value.commands.setTextSelection(r);const{node:o}=n.value.view.domAtPos(n.value.state.selection.anchor);o&&o.scrollIntoView({behavior:"smooth",block:"center"})};t.watch((()=>o.value.trim()),((e,t)=>{e||s(),e!==t&&c(!0)})),t.watch((()=>a.value.trim()),((e,t)=>e===t?null:c())),t.watch((()=>i.value),((e,t)=>e===t?null:c(!0)));const d=()=>{var e;null==(e=n.value)||e.commands.nextSearchResult(),u()},p=()=>{var e;null==(e=n.value)||e.commands.previousSearchResult(),u()},f=()=>{var e;null==(e=n.value)||e.commands.replace(),u()},h=()=>{var e;return null==(e=n.value)?void 0:e.commands.replaceAll()};return t.watch((()=>r.value),(()=>s())),(e,s)=>{const c=Eg,u=dC,m=Kd,v=Xy,g=XH;return t.openBlock(),t.createBlock(g,{visible:t.unref(r),icon:"search-replace",header:e.t("search.title"),footer:!1,class:"search-replace-dialog",width:"420px",mode:"modeless","z-index":200,onClose:s[3]||(s[3]=e=>r.value=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",NU,[t.createElementVNode("div",TU,[t.createVNode(c,{modelValue:t.unref(o),"onUpdate:modelValue":s[0]||(s[0]=e=>t.isRef(o)?o.value=e:o=e),placeholder:e.t("search.searchText"),clearable:"",autofocus:"",onEnter:d},{suffix:t.withCtx((()=>{var e,r,a;return[t.createTextVNode(t.toDisplayString(""!==t.unref(o)&&0!==t.unref(l)?(null==(a=null==(r=null==(e=t.unref(n))?void 0:e.storage)?void 0:r.searchAndReplace)?void 0:a.resultIndex)+1:0)+" / "+t.toDisplayString(t.unref(l)),1)]})),_:1},8,["modelValue","placeholder"]),t.createVNode(m,{disabled:0===t.unref(l),shape:"square",variant:"text",onClick:d},{default:t.withCtx((()=>[t.createVNode(u,{name:"arrow-down",class:"icon-next"})])),_:1},8,["disabled"]),t.createVNode(m,{disabled:0===t.unref(l),shape:"square",variant:"text",onClick:p},{default:t.withCtx((()=>[t.createVNode(u,{name:"arrow-down",class:"icon-prev"})])),_:1},8,["disabled"])]),t.createElementVNode("div",AU,[t.createVNode(c,{modelValue:t.unref(a),"onUpdate:modelValue":s[1]||(s[1]=e=>t.isRef(a)?a.value=e:a=e),placeholder:e.t("search.replaceText"),clearable:""},null,8,["modelValue","placeholder"])]),t.createElementVNode("div",MU,[t.createVNode(v,{modelValue:t.unref(i),"onUpdate:modelValue":s[2]||(s[2]=e=>t.isRef(i)?i.value=e:i=e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("search.caseSensitive")),1)])),_:1},8,["modelValue"])]),t.createElementVNode("div",IU,[t.createVNode(m,{disabled:0===t.unref(l),theme:"default",variant:"text",textContent:t.toDisplayString(e.t("search.replace")),onClick:f},null,8,["disabled","textContent"]),t.createVNode(m,{disabled:0===t.unref(l),theme:"default",variant:"text",textContent:t.toDisplayString(e.t("search.replaceAll")),onClick:h},null,8,["disabled","textContent"]),t.createVNode(m,{disabled:0===t.unref(l),theme:"primary",textContent:t.toDisplayString(e.t("search.search")),onClick:d},null,8,["disabled","textContent"])])])])),_:1},8,["visible","header"])}}},[["__scopeId","data-v-d5573b08"]]),LU={class:"button-content"},RU={class:"text"},BU={key:1,class:"kbd"},DU={class:"text"},VU={key:1,class:"kbd"},jU={class:"icon-arrow handle"},FU={class:"text"},zU={key:1,class:"kbd"},$U={key:2,class:"icon-arrow"},HU={key:0,class:"icon-arrow"},UU={class:"text"},WU={key:1,class:"kbd"},GU={class:"button-content"},KU={class:"text"},qU={key:1,class:"kbd"},YU={key:2,class:"icon-arrow"},XU={key:0,class:"icon-arrow"},ZU=YN({__name:"button",props:{value:{type:[String,Number],default:""},disabled:{type:Boolean,default:!1},ico:{type:String,default:""},text:{type:String,default:""},hideText:{type:Boolean,default:!1},tooltip:{type:[String,Boolean],default:void 0},shortcut:{type:String,default:void 0},shortcutText:{type:String,default:void 0},menuType:{type:String,default:"button"},huge:{type:Boolean,default:!1},menuActive:{type:Boolean,default:!1},selectOptions:{type:Array},popupVisible:{type:Boolean,default:!1},popupHandle:{type:String}},emits:["toggle-popup"],setup(e,{emit:n}){const r=e,o=n,a=t.useAttrs(),{container:i,editor:l}=zN(),s=GN("toolbar"),c=(...e)=>{a.onMenuClickThrough?a.onMenuClickThrough(...e):a.onMenuClick&&a.onMenuClick(...e)};let u=t.ref(!1),d=t.ref(!1);const p=e=>{d.value=e},f=()=>!1===r.tooltip?"":r.huge&&r.tooltip?`${r.tooltip}${r.shortcut?` (${pC(r.shortcut)})`:""}`:r.text?`${r.tooltip||r.text}${r.shortcut?` (${pC(r.shortcut)})`:""}`:"";t.watch((()=>r.popupVisible),(e=>{d.value=e}));const h=t.ref(null),m=t.ref(null),v=e=>{o("toggle-popup",e)};return gN(m,(()=>{o("toggle-popup",!1)}),{ignore:[h,".umo-popup"]}),(n,r)=>{const o=dC,g=Kd,b=Qv,y=kw,w=rv,k=Rv;return t.openBlock(),t.createBlock(k,{content:f,visible:t.unref(u)&&!t.unref(d),theme:"light",placement:"top",attach:t.unref(i),"show-arrow":!1,"destroy-on-close":""},{default:t.withCtx((()=>{var f,k,x,E,C;return[t.createElementVNode("div",{class:"menu-button-wrap",onClick:r[3]||(r[3]=e=>t.isRef(u)?u.value=!1:u=!1),onMouseover:r[4]||(r[4]=e=>t.isRef(u)?u.value=!0:u=!0),onMouseleave:r[5]||(r[5]=e=>t.isRef(u)?u.value=!1:u=!1)},["button"===e.menuType?(t.openBlock(),t.createBlock(g,t.mergeProps({key:0,class:["menu-button",{huge:e.huge&&"ribbon"===t.unref(s).mode,"show-text":!e.hideText,active:e.menuActive&&(null==(f=t.unref(l))?void 0:f.isEditable)}],shape:"square",variant:"text",size:"small",disabled:e.disabled||!(null==(k=t.unref(l))?void 0:k.isEditable),onClick:c},t.unref(a)),{default:t.withCtx((()=>[t.createElementVNode("div",LU,[t.renderSlot(n.$slots,"default",{},void 0,!0),e.ico?(t.openBlock(),t.createBlock(o,{key:0,class:"icon",name:e.ico},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",RU,t.toDisplayString(e.text),1),e.shortcutText?(t.openBlock(),t.createElementBlock("kbd",BU,t.toDisplayString(t.unref(pC)(e.shortcutText)),1)):t.createCommentVNode("",!0)])])),_:3},16,["class","disabled"])):"dropdown"===e.menuType?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},["arrow"===e.popupHandle?(t.openBlock(),t.createBlock(g,t.mergeProps({key:0,class:["menu-button has-arrow",{huge:e.huge&&"ribbon"===t.unref(s).mode,"show-text":!e.hideText,active:t.unref(d)}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(x=t.unref(l))?void 0:x.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"button-content",onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0),e.ico?(t.openBlock(),t.createBlock(o,{key:0,class:"icon",name:e.ico},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",DU,t.toDisplayString(e.text),1),e.shortcutText?(t.openBlock(),t.createElementBlock("kbd",VU,t.toDisplayString(t.unref(pC)(e.shortcutText)),1)):t.createCommentVNode("",!0)]),t.createVNode(b,t.mergeProps(t.unref(a),{trigger:"click",size:"small",options:e.selectOptions,"popup-props":{overlayClassName:t.unref(a)["overlay-class-name"],popperOptions:{modifiers:[{name:"offset",options:{offset:[-22,0]}}]},onVisibleChange:p,destroyOnClose:!0,attach:t.unref(i)},onClick:t.unref(a).onChange}),{default:t.withCtx((()=>[t.createElementVNode("span",jU,[t.createVNode(o,{name:"arrow-down"})]),e.selectOptions?t.createCommentVNode("",!0):t.renderSlot(n.$slots,"dropmenu",{key:0},void 0,!0)])),_:3},16,["options","popup-props","onClick"])])),_:3},16,["class","disabled"])):(t.openBlock(),t.createBlock(b,t.mergeProps({key:1},t.unref(a),{trigger:"click",size:"small",options:e.selectOptions,"popup-props":{overlayClassName:t.unref(a)["overlay-class-name"],onVisibleChange:p,destroyOnClose:!0,attach:t.unref(i)},onClick:t.unref(a).onChange}),{default:t.withCtx((()=>{var r;return[t.createVNode(g,t.mergeProps({class:["menu-button has-arrow",{huge:e.huge&&"ribbon"===t.unref(s).mode,"show-text":!e.hideText,active:t.unref(d)}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(r=t.unref(l))?void 0:r.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"button-content",onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0),e.ico?(t.openBlock(),t.createBlock(o,{key:0,class:"icon",name:e.ico},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",FU,t.toDisplayString(e.text),1),e.shortcutText?(t.openBlock(),t.createElementBlock("kbd",zU,t.toDisplayString(t.unref(pC)(e.shortcutText)),1)):t.createCommentVNode("",!0),"ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",$U,[t.createVNode(o,{name:"arrow-down"})])):t.createCommentVNode("",!0)]),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",HU,[t.createVNode(o,{name:"arrow-down"})])):t.createCommentVNode("",!0)])),_:3},16,["class","disabled"]),e.selectOptions?t.createCommentVNode("",!0):t.renderSlot(n.$slots,"dropmenu",{key:0},void 0,!0)]})),_:3},16,["options","popup-props","onClick"]))],64)):"select"===e.menuType?(t.openBlock(),t.createBlock(y,t.mergeProps({key:2,size:"small",placement:"bottom-left","on-popup-visible-change":p,value:e.value,"popup-props":{destroyOnClose:!0,attach:t.unref(i)}},t.unref(a),{options:e.selectOptions,disabled:e.disabled||!(null==(E=t.unref(l))?void 0:E.isEditable),onChange:c}),{default:t.withCtx((()=>[t.renderSlot(n.$slots,"default",{},void 0,!0)])),_:3},16,["value","popup-props","options","disabled"])):"popup"===e.menuType?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},["arrow"===e.popupHandle?(t.openBlock(),t.createBlock(g,t.mergeProps({key:0,class:["menu-button has-arrow",{"show-text":!e.hideText,active:e.popupVisible}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(C=t.unref(l))?void 0:C.isEditable)}),{default:t.withCtx((()=>[t.createElementVNode("div",{class:"button-content",onClick:c},[t.renderSlot(n.$slots,"default",{},void 0,!0),e.ico?(t.openBlock(),t.createBlock(o,{key:0,class:"icon",name:e.ico},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",UU,t.toDisplayString(e.text),1),e.shortcutText?(t.openBlock(),t.createElementBlock("kbd",WU,t.toDisplayString(t.unref(pC)(e.shortcutText)),1)):t.createCommentVNode("",!0)]),t.createVNode(w,t.mergeProps({attach:t.unref(i),trigger:"click",placement:"bottom-left"},t.unref(a),{visible:e.popupVisible,"popper-options":{modifiers:[{name:"offset",options:{offset:[-22,0]}}]}}),{content:t.withCtx((()=>[t.createElementVNode("div",{class:"umo-popup-content",ref_key:"popupContentRef",ref:m},[t.renderSlot(n.$slots,"content",{},void 0,!0)],512)])),default:t.withCtx((()=>["ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",{key:0,ref_key:"popupHandleRef",ref:h,class:"icon-arrow handle",onClick:r[0]||(r[0]=e=>v())},[t.createVNode(o,{name:"arrow-down"})],512)):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",{key:1,ref_key:"popupHandleRef",ref:h,class:"icon-arrow handle",onClick:r[1]||(r[1]=e=>v())},[t.createVNode(o,{name:"arrow-down"})],512)):t.createCommentVNode("",!0)])),_:3},16,["attach","visible"])])),_:3},16,["class","disabled"])):(t.openBlock(),t.createBlock(w,{key:1,attach:t.unref(i),trigger:"click",placement:"bottom-left",visible:e.popupVisible},{content:t.withCtx((()=>[t.createElementVNode("div",{class:"umo-popup-content",ref_key:"popupContentRef",ref:m},[t.renderSlot(n.$slots,"content",{},void 0,!0)],512)])),default:t.withCtx((()=>{var i;return[t.createVNode(g,t.mergeProps({ref_key:"popupHandleRef",ref:h,class:["menu-button has-arrow",{huge:e.huge&&"ribbon"===t.unref(s).mode,"show-text":!e.hideText,active:e.popupVisible}],variant:"text",size:"small"},t.unref(a),{disabled:e.disabled||!(null==(i=t.unref(l))?void 0:i.isEditable),onClick:r[2]||(r[2]=e=>v())}),{default:t.withCtx((()=>[t.createElementVNode("div",GU,[t.renderSlot(n.$slots,"default",{},void 0,!0),e.ico?(t.openBlock(),t.createBlock(o,{key:0,class:"icon",name:e.ico},null,8,["name"])):t.createCommentVNode("",!0),t.createElementVNode("p",KU,t.toDisplayString(e.text),1),e.shortcutText?(t.openBlock(),t.createElementBlock("kbd",qU,t.toDisplayString(t.unref(pC)(e.shortcutText)),1)):t.createCommentVNode("",!0),"ribbon"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",YU,[t.createVNode(o,{name:"arrow-down"})])):t.createCommentVNode("",!0)]),"classic"===t.unref(s).mode?(t.openBlock(),t.createElementBlock("span",XU,[t.createVNode(o,{name:"arrow-down"})])):t.createCommentVNode("",!0)])),_:3},16,["class","disabled"])]})),_:3},8,["attach","visible"]))],64)):t.renderSlot(n.$slots,"default",{key:4},void 0,!0)],32)]})),_:3},8,["visible","attach"])}}},[["__scopeId","data-v-a068d262"]]),JU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",QU=e=>{let t,n,r,o,a,i,l,s=0,c="";for(e=(e=>{e=e.replace(/\r\n/g,"\n");let t=0,n="";for(;t<e.length;t++){const r=e.charCodeAt(t);r<128?n+=String.fromCharCode(r):r>127&&r<2048?(n+=String.fromCharCode(r>>6|192),n+=String.fromCharCode(63&r|128)):(n+=String.fromCharCode(r>>12|224),n+=String.fromCharCode(r>>6&63|128),n+=String.fromCharCode(63&r|128))}return n})(e);s<e.length;)t=e.charCodeAt(s++),n=e.charCodeAt(s++),r=e.charCodeAt(s++),o=t>>2,a=(3&t)<<4|n>>4,i=(15&n)<<2|r>>6,l=63&r,isNaN(n)?i=l=64:isNaN(r)&&(l=64),c=c+JU.charAt(o)+JU.charAt(a)+JU.charAt(i)+JU.charAt(l);return c},eW=e=>"data:image/svg+xml;base64,"+QU(e),tW=e=>{switch((e=>"string"==typeof e?"string":"undefined"!=typeof SVGElement&&e instanceof SVGElement?"element":void 0)(e)){case"string":return eW(e);case"element":return(e=>eW((new XMLSerializer).serializeToString(e)))(e);default:return e}},nW={class:"mermaid-container"},rW={class:"mermaid-render"},oW=["textContent"],aW=["innerHTML"],iW=YN({__name:"mermaid",props:{content:{type:String}},setup(e){const n=e;let o=t.ref(!1);const{editor:a}=zN(),i=()=>{o.value=!0,r.initialize({darkMode:!1,startOnLoad:!1,fontSize:12,theme:"base"})};let l=t.ref(""),s=t.ref("");const c=t.ref();t.watch((()=>o.value),(e=>{e&&(l.value=n.content||"graph TB\na--\x3eb")}),{immediate:!0}),t.watch((()=>l.value),(async()=>{o.value&&(await t.nextTick(),(async()=>{try{const{svg:e}=await r.render("mermaid-svg",l.value);s.value=e}catch(e){s.value=""}})())}),{immediate:!0});const u=()=>{var e;if(""===l.value)return void I$("error",KN("tools.mermaid.notEmpty"));const t=c.value.querySelector("svg"),r=t.width.animVal.value,i=t.height.animVal.value,u=tW(s.value);(!n.content||n.content&&n.content!==l.value)&&(null==(e=a.value)||e.chain().focus().setImage({type:"mermaid",src:u,content:l.value,width:r,height:i},!!n.content).run()),o.value=!1};return(n,r)=>{const a=Uk,d=XH,p=ZU;return t.openBlock(),t.createBlock(p,{ico:e.content?"edit":"mermaid",text:e.content?n.t("tools.mermaid.edit"):n.t("tools.mermaid.text"),huge:"",onMenuClick:i},{default:t.withCtx((()=>[t.createVNode(d,{visible:t.unref(o),icon:"mermaid",header:e.content?n.t("tools.mermaid.edit"):n.t("tools.mermaid.text"),width:"960px",onConfirm:u,onClose:r[1]||(r[1]=e=>t.isRef(o)?o.value=n.flase:o=n.flase)},{default:t.withCtx((()=>[t.createElementVNode("div",nW,[t.createVNode(a,{class:"mermaid-code",modelValue:t.unref(l),"onUpdate:modelValue":r[0]||(r[0]=e=>t.isRef(l)?l.value=e:l=e),autofocus:"",placeholder:n.t("tools.mermaid.placeholder")},null,8,["modelValue","placeholder"]),t.createElementVNode("div",rW,[t.createElementVNode("div",{class:"mermaid-title",textContent:t.toDisplayString(n.t("tools.mermaid.preview"))},null,8,oW),t.createElementVNode("div",{class:"mermaid-svg narrow-scrollbar",ref_key:"mermaidRef",ref:c,innerHTML:t.unref(s)},null,8,aW)])])])),_:1},8,["visible","header"])])),_:1},8,["ico","text"])}}},[["__scopeId","data-v-caeb9c3a"]]),lW={"zh-CN":"zh","en-US":"en"};class sW{constructor({domain:e,params:t,container:n}){p(this,"domain","https://embed.diagrams.net"),p(this,"params",{ui:"atlas",proto:"json",libraries:1,configure:1,noSaveBtn:1}),p(this,"xml",null),p(this,"format","xmlsvg"),this.domain=e??this.domain,this.params=Object.assign(t||{},this.params),this.container=n,this.handleuseMessageEvent=e=>{if(void 0!==this.frame&&e.source===this.frame.contentWindow&&e.data.length>0)try{const t=JSON.parse(e.data);t&&this.handleuseMessage(t)}catch(t){console.error(t)}}}edit(e){let t=this.format;return"data:image/png;"===e.substring(0,15)?t="xmlpng":"data:image/svg+xml;"===e.substring(0,19)&&(t="xmlsvg"),this.startEditing(e,t),this}createFrame(){const e=Object.keys(this.params).map((e=>e+"="+this.params[e])).join("&"),t=lW[WN.global.locale.value],n=document.createElement("iframe");return n.setAttribute("class","diagrams-iframe"),n.setAttribute("src",`${this.domain}?${e}&lang=${t}`),n}postMessage(e){this.frame&&this.frame.contentWindow.postMessage(JSON.stringify(e),"*")}handleuseMessage(e){"configure"===e.event?this.configureEditor():"init"===e.event?this.initializeEditor():"save"===e.event&&(this.export(e.data),this.xml=e.xml,e.exit?e.event="exit":this.postMessage({action:"status",messageKey:"allChangesSaved",modified:!1})),"exit"===e.event&&("xml"!==this.format&&this.xml&&this.postMessage({action:"export",format:this.format,xml:this.xml,spinKey:"export"}),this.stopEditing(e))}startEditing(e,t){if(!this.frame){window.addEventListener("message",this.handleuseMessageEvent),this.format=t??this.format,this.data=e,this.frame=this.createFrame();document.querySelector(this.container).appendChild(this.frame)}}stopEditing(){window.removeEventListener("message",this.handleuseMessageEvent),this.frame=void 0}initializeEditor(){this.postMessage({action:"load",autosave:0,saveAndExit:"1",modified:"unsavedChanges",xml:this.data})}configureEditor(){this.postMessage({action:"configure",config:this.params.configure})}export(e){return e}}const cW={key:0,class:"diagrams-loading"},uW=t.createElementVNode("div",{class:"diagrams-container"},null,-1),dW={__name:"diagrams",props:{content:{type:String}},setup(e){const n=e,{container:r,options:o,editor:a}=zN();let i=t.ref(!1),l=t.ref(!1);const s=new sW({domain:o.value.diagrams.domain,params:o.value.diagrams.params,container:`${r} .diagrams-container`}),c=()=>{s.edit(n.content||"")};let u=t.ref({});const d=e=>{if("message"!==(null==e?void 0:e.type)&&(null==e?void 0:e.origin)!==o.value.diagrams.domain)return;const{event:t,bounds:r,data:a}=JSON.parse(e.data);if("load"===t&&(l.value=!1),"export"===t){const{width:e,height:t}=r;return(!n.content||n.content&&n.content!==a)&&(u.value={type:"diagrams",src:a,width:e,height:t,content:a}),void(i.value=!1)}"exit"===t&&(i.value=!1)};return t.watch((()=>i.value),(e=>{var t;if(!e)return window.removeEventListener("message",d),s.stopEditing(),void(u.value.type&&(null==(t=a.value)||t.chain().focus().setImage(u.value,!!n.content).run()));l.value=!0,window.addEventListener("message",d),u.value={}})),t.onBeforeMount((()=>{window.addEventListener("message",d)})),(n,r)=>{const o=Td,a=XH,s=ZU;return t.openBlock(),t.createBlock(s,{ico:e.content?"edit":"diagrams",text:e.content?n.t("tools.diagrams.edit"):n.t("tools.diagrams.text"),huge:"",onMenuClick:r[1]||(r[1]=e=>t.isRef(i)?i.value=!0:i=!0)},{default:t.withCtx((()=>[t.createVNode(a,{visible:t.unref(i),icon:"diagrams",header:e.content?n.t("tools.diagrams.edit"):n.t("tools.diagrams.text"),footer:!1,class:"diagrams-dialog",mode:"full-screen",onOpened:c,onClose:r[0]||(r[0]=e=>t.isRef(i)?i.value=!1:i=!1)},{default:t.withCtx((()=>[t.unref(l)?(t.openBlock(),t.createElementBlock("div",cW,[t.createVNode(o,{text:n.t("tools.diagrams.loading"),size:"small"},null,8,["text"])])):t.createCommentVNode("",!0),uW])),_:1},8,["visible","header"])])),_:1},8,["ico","text"])}}},pW=["textContent"],fW={class:"seal-uploader"},hW={key:0},mW=["src"],vW=YN({__name:"seal",setup(e){let n=t.ref(!1);const{options:r,editor:a}=zN();let i=t.ref(null),l=t.ref(null),s=t.ref(null);const c=async()=>{const{open:e,onChange:t}=MN({accept:"image/png,image/jpeg",multiple:!1,reset:!0});e(),t((async e=>{if(e&&(s.value=e[0],s.value))try{i.value=null,l.value=KN("tools.seal.converting1");const e=await o.removeBackground(s.value,{publicPath:`${r.value.cdnUrl}/libs/imgly/background-removal-data/`,progress:(e,t,n)=>{e.startsWith("fetch")?l.value=KN("tools.seal.converting2",{ppercentage:(t/n*100).toFixed(1)}):l.value=KN("tools.seal.converting3")}});i.value=URL.createObjectURL(e)}catch{I$("error",KN("tools.seal.convertError")),i.value=null}finally{l.value=null}}))},u=()=>{var e;i.value?(null==(e=a.value)||e.chain().focus().setImage({type:"seal",src:i.value,width:150,draggable:!0,rotatable:!0,file:s.value}).run(),n.value=!1,i.value=null,l.value=null):I$("error",KN("tools.seal.notEmpty"))};return(e,r)=>{const a=XH,s=ZU;return t.unref(o.removeBackground)?(t.openBlock(),t.createBlock(s,{key:0,ico:"seal",text:e.t("tools.seal.text"),huge:"",onMenuClick:r[1]||(r[1]=e=>t.isRef(n)?n.value=!0:n=!0)},{default:t.withCtx((()=>[t.createVNode(a,{visible:t.unref(n),icon:"seal",header:e.t("tools.seal.title"),width:"480px","confirm-btn":"t('tools.seal.insert')",onConfirm:u,onClose:r[0]||(r[0]=e=>t.isRef(n)?n.value=!1:n=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"seal-container",onClick:c},[t.createElementVNode("div",{class:"tip",textContent:t.toDisplayString(e.t("tools.seal.tip"))},null,8,pW),t.createElementVNode("div",fW,[t.unref(i)?(t.openBlock(),t.createElementBlock("img",{key:1,class:"seal-img",src:t.unref(i)},null,8,mW)):(t.openBlock(),t.createElementBlock("span",hW,t.toDisplayString(t.unref(l)?t.unref(l):e.t("tools.seal.insertTip")),1))])])])),_:1},8,["visible","header"])])),_:1},8,["text"])):t.createCommentVNode("",!0)}}},[["__scopeId","data-v-c82445ef"]]),gW={class:"color-picker-container"},bW={class:"color-picker-default-button"},yW={class:"color-picker-group"},wW=["onClick"],kW=["textContent"],xW={class:"color-picker-group"},EW=["onClick"],CW=["textContent"],SW={key:1,class:"color-picker-group"},OW=["onClick"],_W=(e=>(t.pushScopeId("data-v-8ba5af55"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("div",{class:"color-picker-divider"},null,-1))),NW={class:"color-picker-more-menu"},TW=["textContent"],AW={class:"color-picker-more-arrow"},MW=YN({__name:"color-picker",props:{defaultColor:{type:String,default:"#000"}},emits:["change"],setup(e,{emit:n}){const r=e,o=n,{editor:a,container:i,options:l}=zN(),s=GN("recent"),c=["#B12318","#EB3323","#F6C143","#FFFE55","#A0CD63","#4FAD5B","#4CAFEA","#2D70BA","#06215C","#68389B"],u=t.ref(r.defaultColor),d=t.ref(!1),p=(e,t)=>{t&&"palette-saturation-brightness"!==t.trigger||(s.value.colors.forEach(((t,n)=>{t===e&&s.value.colors.splice(n,1)})),s.value.colors.unshift(e),s.value.colors.length>10&&s.value.colors.splice(10,1),o("change",e))};t.watch((()=>d.value),(e=>{e&&a.value.commands.focus(void 0,{scrollIntoView:!1})}));const f=e=>{p(e),o("change",e)};return(e,n)=>{const r=Kd,o=dC,a=kE,h=rv;return t.openBlock(),t.createElementBlock("div",gW,[t.createElementVNode("div",bW,[t.createVNode(r,{theme:"default",variant:"outline",size:"small",block:"",textContent:t.toDisplayString(e.t("colorPicker.default")),onClick:n[0]||(n[0]=e=>f(u.value))},null,8,["textContent"])]),t.createElementVNode("div",yW,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(l).dicts.colors,((e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>f(e)},null,12,wW)))),128))]),t.createElementVNode("div",{class:"color-picker-group-title",textContent:t.toDisplayString(e.t("colorPicker.standard"))},null,8,kW),t.createElementVNode("div",xW,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(c,((e,n)=>t.createElementVNode("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>f(e)},null,12,EW))),64))]),t.unref(s).colors.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"color-picker-group-title",textContent:t.toDisplayString(e.t("colorPicker.recent"))},null,8,CW)):t.createCommentVNode("",!0),t.unref(s).colors.length>0?(t.openBlock(),t.createElementBlock("div",SW,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s).colors,((e,n)=>(t.openBlock(),t.createElementBlock("div",{class:"color-picker-item",key:n,style:t.normalizeStyle({backgroundColor:e}),onClick:t=>f(e)},null,12,OW)))),128))])):t.createCommentVNode("",!0),_W,t.createVNode(h,{attach:t.unref(i),trigger:"click",placement:"right-bottom",onVisibleChange:n[2]||(n[2]=e=>d.value=e)},{content:t.withCtx((()=>[t.createVNode(a,{modelValue:u.value,"onUpdate:modelValue":n[1]||(n[1]=e=>u.value=e),size:"small","color-modes":["monochrome"],"swatch-colors":[],"enable-alpha":"",onChange:p},null,8,["modelValue"])])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["color-picker-more",{active:d.value}])},[t.createElementVNode("div",NW,[t.createVNode(o,{style:t.normalizeStyle({color:u.value}),name:"palette-color"},null,8,["style"]),t.createElementVNode("span",{textContent:t.toDisplayString(e.t("colorPicker.more"))},null,8,TW)]),t.createElementVNode("div",AW,[t.createVNode(o,{name:"arrow-down"})])],2)])),_:1},8,["attach"])])}}},[["__scopeId","data-v-8ba5af55"]]);function IW(){const e=t.ref(!1);return{popupVisible:e,togglePopup:t=>{e.value=void 0!==t?t:!e.value}}}const PW=YN({__name:"color",props:{text:{type:String,default:KN("base.color")},modeless:{type:Boolean,default:!1},defaultColor:{type:String,default:"#000"}},emits:["change"],setup(e,{emit:n}){const r=e,o=n;let{popupVisible:a,togglePopup:i}=IW();const{editor:l}=zN();let s=t.ref();const c=e=>{var t,n;s.value=e,a.value=!1,r.modeless?o("change",s.value):""!==e?null==(t=l.value)||t.chain().focus().setColor(e).run():null==(n=l.value)||n.chain().focus().unsetColor().run()};return(n,r)=>{const o=MW,u=ZU;return t.openBlock(),t.createBlock(u,{ico:"color",text:e.text,"menu-type":"popup","popup-handle":"arrow","hide-text":"","popup-visible":t.unref(a),onTogglePopup:t.unref(i),onMenuClick:r[0]||(r[0]=e=>c(t.unref(s)))},{content:t.withCtx((()=>[t.createVNode(o,{"default-color":e.defaultColor,onChange:c},null,8,["default-color"])])),default:t.withCtx((()=>{var e,n;return[t.createElementVNode("div",{class:"current-color",style:t.normalizeStyle({background:(null==(n=null==(e=t.unref(l))?void 0:e.getAttributes("textStyle"))?void 0:n.color)||t.unref(s)})},null,4)]})),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-609fde89"]]);const LW=YN({props:{width:{type:Number,default:800},height:{type:Number,default:300},lineWidth:{type:Number,default:4},lineColor:{type:String,default:"#000000"},bgColor:{type:String,default:""},isCrop:{type:Boolean,default:!1},isClearBgColor:{type:Boolean,default:!0},format:{type:String,default:"image/png"},quality:{type:Number,default:1}},data:()=>({hasDrew:!1,resultImg:"",points:[],canvasTxt:null,startX:0,startY:0,isDrawing:!1,sratio:1}),computed:{ratio(){return this.height/this.width},stageInfo(){return this.$refs.canvas.getBoundingClientRect()},myBg(){return this.bgColor?this.bgColor:"rgba(255, 255, 255, 0)"}},watch:{myBg:function(e){this.$refs.canvas.style.background=e}},beforeMount(){window.addEventListener("resize",this.$_resizeHandler)},beforeDestroy(){window.removeEventListener("resize",this.$_resizeHandler)},mounted(){const e=this.$refs.canvas;e.height=this.height,e.width=this.width,e.style.background=this.myBg,this.$_resizeHandler(),document.onmouseup=()=>{this.isDrawing=!1}},methods:{$_resizeHandler(){const e=this.$refs.canvas;e.style.width=this.width+"px";const t=parseFloat(window.getComputedStyle(e).width);e.style.height=this.ratio*t+"px",this.canvasTxt=e.getContext("2d"),this.canvasTxt.scale(1*this.sratio,1*this.sratio),this.sratio=t/this.width,this.canvasTxt.scale(1/this.sratio,1/this.sratio)},mouseDown(e){(e=e||event).preventDefault(),this.isDrawing=!0,this.hasDrew=!0;let t={x:e.offsetX,y:e.offsetY};this.drawStart(t)},mouseMove(e){if((e=e||event).preventDefault(),this.isDrawing){let t={x:e.offsetX,y:e.offsetY};this.drawMove(t)}},mouseUp(e){(e=e||event).preventDefault();let t={x:e.offsetX,y:e.offsetY};this.drawEnd(t),this.isDrawing=!1},touchStart(e){if((e=e||event).preventDefault(),this.hasDrew=!0,1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawStart(t)}},touchMove(e){if((e=e||event).preventDefault(),1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawMove(t)}},touchEnd(e){if((e=e||event).preventDefault(),1===e.touches.length){let t={x:e.targetTouches[0].clientX-this.$refs.canvas.getBoundingClientRect().left,y:e.targetTouches[0].clientY-this.$refs.canvas.getBoundingClientRect().top};this.drawEnd(t)}},drawStart(e){this.startX=e.x,this.startY=e.y,this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.lineWidth=this.lineWidth*this.sratio,this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.points.push(e)},drawMove(e){this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.strokeStyle=this.lineColor,this.canvasTxt.lineWidth=this.lineWidth*this.sratio,this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.startY=e.y,this.startX=e.x,this.points.push(e)},drawEnd(e){this.canvasTxt.beginPath(),this.canvasTxt.moveTo(this.startX,this.startY),this.canvasTxt.lineTo(e.x,e.y),this.canvasTxt.lineCap="round",this.canvasTxt.lineJoin="round",this.canvasTxt.stroke(),this.canvasTxt.closePath(),this.points.push(e),this.points.push({x:-1,y:-1})},generate(e){let t=e&&e.format?e.format:this.format,n=e&&e.quality?e.quality:this.quality;return new Promise(((e,r)=>{if(this.hasDrew){var o=this.canvasTxt.getImageData(0,0,this.$refs.canvas.width,this.$refs.canvas.height);this.canvasTxt.globalCompositeOperation="destination-over",this.canvasTxt.fillStyle=this.myBg,this.canvasTxt.fillRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.resultImg=this.$refs.canvas.toDataURL(t,n);var a=this.resultImg;if(this.canvasTxt.clearRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.canvasTxt.putImageData(o,0,0),this.canvasTxt.globalCompositeOperation="source-over",this.isCrop){const e=this.getCropArea(o.data);var i=document.createElement("canvas");const r=i.getContext("2d");i.width=e[2]-e[0],i.height=e[3]-e[1];const l=this.canvasTxt.getImageData(...e);r.globalCompositeOperation="destination-over",r.putImageData(l,0,0),r.fillStyle=this.myBg,r.fillRect(0,0,i.width,i.height),a=i.toDataURL(t,n),i=null}e(a)}else r("Warning: Not Signned!")}))},reset(){this.canvasTxt.clearRect(0,0,this.$refs.canvas.width,this.$refs.canvas.height),this.isClearBgColor&&(this.$emit("update:bgColor",""),this.$refs.canvas.style.background="rgba(255, 255, 255, 0)"),this.points=[],this.hasDrew=!1,this.resultImg=""},getCropArea(e){for(var t=this.$refs.canvas.width,n=0,r=this.$refs.canvas.height,o=0,a=0;a<this.$refs.canvas.width;a++)for(var i=0;i<this.$refs.canvas.height;i++){var l=4*(a+this.$refs.canvas.width*i);(e[l]>0||e[l+1]>0||e[l+2]||e[l+3]>0)&&(o=Math.max(i,o),n=Math.max(a,n),r=Math.min(i,r),t=Math.min(a,t))}return[++t,++r,++n,++o]}}},[["render",function(e,n,r,o,a,i){return t.openBlock(),t.createElementBlock("canvas",{ref:"canvas",onMousedown:n[0]||(n[0]=(...e)=>i.mouseDown&&i.mouseDown(...e)),onMousemove:n[1]||(n[1]=(...e)=>i.mouseMove&&i.mouseMove(...e)),onMouseup:n[2]||(n[2]=(...e)=>i.mouseUp&&i.mouseUp(...e)),onTouchstart:n[3]||(n[3]=(...e)=>i.touchStart&&i.touchStart(...e)),onTouchmove:n[4]||(n[4]=(...e)=>i.touchMove&&i.touchMove(...e)),onTouchend:n[5]||(n[5]=(...e)=>i.touchEnd&&i.touchEnd(...e))},null,544)}],["__scopeId","data-v-5c7dd0c2"]]);LW.install=function(e){this.installed||(this.installed=!0,e.component("vueEsign",LW))};const RW={class:"signature-toolbar"},BW=["data-tip"],DW=YN({__name:"signature",setup(e){const{editor:n}=zN();let r=t.ref(!1),o=t.ref("#000"),a=t.ref(5);const i=t.ref([{content:"2",value:2},{content:"3",value:3},{content:"4",value:4},{content:"5",value:5},{content:"6",value:6},{content:"7",value:7},{content:"8",value:8}]),l=t.ref(null),s=()=>{l.value.reset()},c=e=>{o.value=e},u=({value:e})=>{a.value=e},d=async()=>{var e;try{const t=await l.value.generate();null==(e=n.value)||e.chain().focus().setImage({type:"signature",src:t,width:80,draggable:!0}).run(),r.value=!1}catch{I$("error",KN("tools.signature.notEmpty"))}};return t.watch((()=>r.value),(e=>{e||s()})),(e,n)=>{const p=dC,f=ZU,h=PW,m=XH;return t.openBlock(),t.createBlock(f,{ico:"signature",text:e.t("tools.signature.text"),huge:"",onMenuClick:n[2]||(n[2]=e=>t.isRef(r)?r.value=!0:r=!0)},{default:t.withCtx((()=>[t.createVNode(m,{visible:t.unref(r),"onUpdate:visible":n[0]||(n[0]=e=>t.isRef(r)?r.value=e:r=e),icon:"signature",header:e.t("tools.signature.title"),width:"642px",onConfirm:d,onClose:n[1]||(n[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",RW,[t.createVNode(f,{text:e.t("tools.signature.clear"),onMenuClick:s},{default:t.withCtx((()=>[t.createVNode(p,{name:"clear-format"})])),_:1},8,["text"]),t.createVNode(h,{modeless:"","default-color":"#000",onChange:c}),t.createVNode(f,{text:e.t("tools.signature.lineWidth"),"menu-type":"dropdown","select-options":i.value,onChange:u},{default:t.withCtx((()=>[t.createVNode(p,{name:"highlight"})])),_:1},8,["text","select-options"])]),t.createElementVNode("div",{class:"signature-container","data-tip":e.t("tools.signature.tip")},[t.createVNode(t.unref(LW),{ref_key:"signatureRef",ref:l,"line-color":t.unref(o),"line-width":t.unref(a),width:600,height:200,"is-crop":"",format:"image/png"},null,8,["line-color","line-width"])],8,BW)])),_:1},8,["visible","header"])])),_:1},8,["text"])}}},[["__scopeId","data-v-192db08d"]]),VW={__name:"align-right",setup(e){const{editor:n}=zN(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("right").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("right").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("flex-end").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("flex-end").run())};return(e,o)=>{var a,i,l,s;const c=ZU;return t.openBlock(),t.createBlock(c,{ico:"align-right",text:e.t("base.align.right"),shortcut:"Ctrl+Shift+R","hide-text":"","menu-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"right"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"flex-end"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("right").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("flex-end").run()),onMenuClick:r},null,8,["text","menu-active","disabled"])}}},jW={__name:"align-center",setup(e){const{editor:n}=zN(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("center").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("center").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("center").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("center").run())};return(e,o)=>{var a,i,l,s;const c=ZU;return t.openBlock(),t.createBlock(c,{text:e.t("base.align.center"),ico:"align-center",shortcut:"Ctrl+Shift+E","hide-text":"","menu-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"center"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"center"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("center").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("center").run()),onMenuClick:r},null,8,["text","menu-active","disabled"])}}},FW={__name:"align-left",setup(e){const{editor:n}=zN(),r=()=>{var e,t,r,o;(null==(e=n.value)?void 0:e.can().chain().focus().setTextAlign("left").run())&&(null==(t=n.value)||t.chain().focus().setTextAlign("left").run()),(null==(r=n.value)?void 0:r.can().chain().focus().setNodeAlign("flex-start").run())&&(null==(o=n.value)||o.chain().focus().setNodeAlign("flex-start").run())};return(e,o)=>{var a,i,l,s;const c=ZU;return t.openBlock(),t.createBlock(c,{ico:"align-left",text:e.t("base.align.left"),shortcut:"Ctrl+Shift+L","hide-text":"","menu-active":(null==(a=t.unref(n))?void 0:a.isActive({textAlign:"left"}))||(null==(i=t.unref(n))?void 0:i.isActive({nodeAlign:"flex-start"})),disabled:!(null==(l=t.unref(n))?void 0:l.can().chain().focus().setTextAlign("left").run())&&!(null==(s=t.unref(n))?void 0:s.can().chain().focus().setNodeAlign("left").run()),onMenuClick:r},null,8,["text","menu-active","disabled"])}}},zW={__name:"italic",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{text:e.t("base.italic"),ico:"italic",shortcut:"Ctrl+I","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("italic"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleItalic().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleItalic().run()})},null,8,["text","menu-active","disabled"])}}},$W={__name:"bold",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"bold",text:e.t("base.bold"),shortcut:"Ctrl+B","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("bold"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleBold().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleBold().run()})},null,8,["text","menu-active","disabled"])}}},HW=YN({__name:"background-color",props:{text:{type:String,default:KN("base.bgColor")},modeless:{type:Boolean,default:!1},defaultColor:{type:String,default:""}},emits:["change"],setup(e,{emit:n}){const r=e,o=n;let{popupVisible:a,togglePopup:i}=IW();const{editor:l}=zN();let s=t.ref();const c=e=>{var t,n;s.value=e,a.value=!1,r.modeless?o("change",s.value):""!==e?null==(t=l.value)||t.chain().focus().setHighlight({color:e}).run():null==(n=l.value)||n.chain().focus().unsetHighlight().run()};return(n,r)=>{const o=dC,u=MW,d=ZU;return t.openBlock(),t.createBlock(d,{text:e.text,"menu-type":"popup","popup-handle":"arrow","hide-text":"","popup-visible":t.unref(a),onTogglePopup:t.unref(i)},{content:t.withCtx((()=>[t.createVNode(u,{"default-color":e.defaultColor,onChange:c},null,8,["default-color"])])),default:t.withCtx((()=>{var e,n;return[t.createVNode(o,{name:"background-color",class:"icon-background-color",style:t.normalizeStyle({background:(null==(n=null==(e=t.unref(l))?void 0:e.getAttributes("highlight"))?void 0:n.color)||t.unref(s)})},null,8,["style"])]})),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-d7f91dab"]]),UW={class:"barcode-container"},WW={class:"barcode-toolbar"},GW={class:"barcode-toolbar-more"},KW={class:"barcode-code"},qW=["textContent"],YW={class:"barcode-render"},XW=["textContent"],ZW={class:"barcode-svg narrow-scrollbar"},JW=["textContent"],QW=YN({__name:"barcode",props:{content:{type:String}},setup(e){let{popupVisible:n,togglePopup:r}=IW(),o=t.ref(!1);const{container:i,options:l,editor:s}=zN(),c=[{label:"CODE128",value:"CODE128"},{label:"CODE128 A",value:"CODE128A"},{label:"CODE128 B",value:"CODE128B"},{label:"CODE128 C",value:"CODE128C"},{label:"EAN13",value:"EAN13"},{label:"UPC",value:"UPC"},{label:"CODE39",value:"CODE39"},{label:"ITF14",value:"ITF14"},{label:"ITF",value:"ITF"},{label:"MSI",value:"MSI"},{label:"MSI10",value:"MSI10"},{label:"MSI11",value:"MSI11"},{label:"MSI1010",value:"MSI1010"},{label:"MSI1110",value:"MSI1110"},{label:"Pharmacode",value:"Pharmacode"}],u=l.value.dicts.fonts.map((e=>({label:qN(e.label),value:e.value}))),d=[{label:KN("tools.barcode.bottom"),value:"bottom"},{label:KN("tools.barcode.top"),value:"top"}],p={content:"",width:2,height:100,font:null,format:"CODE128",lineColor:"#000",background:"",fontOptions:"",displayValue:!0,textAlign:"center",textPosition:"bottom",fontSize:20,textMargin:2,margin:10,text:void 0};let f=t.ref({...p}),h=t.ref(!1);const m=e=>{let t=f.value.fontOptions.split(" ");t.includes(e)?t=t.filter((t=>t!==e)):t.push(e),f.value.fontOptions=t.join(" ").trim()};let v=t.ref(!1);const g=t.ref(null);t.watch((()=>o.value),(t=>{t&&(f.value=e.content?JSON.parse(e.content):{...p},setTimeout((()=>h.value=!1),200))}),{immediate:!0}),t.watch((()=>f.value),(()=>{o.value&&(h.value=!0,(async()=>{try{await t.nextTick(),a(`${i} #barcode`,f.value.content,f.value),v.value=!1}catch{v.value=!0}})())}),{immediate:!0,deep:!0});const b=()=>{var t;if(v.value)return void I$("error",KN("tools.barcode.renderError"));if(""===f.value.content)return void I$("error",KN("tools.barcode.notEmpty"));const n=g.value.width.animVal.value,r=g.value.height.animVal.value;h.value&&(null==(t=s.value)||t.chain().focus().setImage({type:"barcode",src:tW(g.value.outerHTML),content:JSON.stringify(f.value),width:n,height:r},!!e.content).run()),o.value=!1};return(a,l)=>{const s=ZU,p=$f,h=PW,y=HW,w=$W,k=zW,x=FW,E=jW,C=VW,S=dC,O=Dk,_=tk,N=Xy,T=Uk,A=kw,M=ek,I=Eg,P=XH;return t.openBlock(),t.createBlock(s,{ico:e.content?"edit":"barcode",text:e.content?a.t("tools.barcode.edit"):a.t("tools.barcode.text"),huge:"",onMenuClick:l[19]||(l[19]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createVNode(P,{visible:t.unref(o),icon:"barcode",header:a.t("tools.barcode.title"),width:"720px",onConfirm:b,onClose:l[18]||(l[18]=e=>t.isRef(o)?o.value=!1:o=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",UW,[t.createElementVNode("div",WW,[t.createVNode(s,{style:{width:"126px"},text:a.t("tools.barcode.format"),"select-options":c,"menu-type":"select",value:t.unref(f).format,onMenuClick:l[0]||(l[0]=e=>t.unref(f).format=e)},null,8,["text","value"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(s,{style:{width:"114px"},text:a.t("tools.barcode.font"),"select-options":t.unref(u),"menu-type":"select",value:t.unref(f).font,onMenuClick:l[1]||(l[1]=e=>t.unref(f).font=e)},null,8,["text","select-options","value"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(h,{text:a.t("tools.barcode.lineColor"),"default-color":t.unref(f).lineColor,modeless:"",onChange:l[2]||(l[2]=e=>t.unref(f).lineColor=e)},null,8,["text","default-color"]),t.createVNode(y,{text:a.t("tools.barcode.bgColor"),"default-color":t.unref(f).background,modeless:"",onChange:l[3]||(l[3]=e=>t.unref(f).background=e)},null,8,["text","default-color"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(w,{"menu-active":t.unref(f).fontOptions.includes("bold"),onMenuClickThrough:l[4]||(l[4]=e=>m("bold"))},null,8,["menu-active"]),t.createVNode(k,{"menu-active":t.unref(f).fontOptions.includes("italic"),onMenuClickThrough:l[5]||(l[5]=e=>m("italic"))},null,8,["menu-active"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(x,{"menu-active":"left"===t.unref(f).textAlign,onMenuClickThrough:l[6]||(l[6]=e=>t.unref(f).textAlign="left")},null,8,["menu-active"]),t.createVNode(E,{"menu-active":"center"===t.unref(f).textAlign,onMenuClickThrough:l[7]||(l[7]=e=>t.unref(f).textAlign="center")},null,8,["menu-active"]),t.createVNode(C,{"menu-active":"right"===t.unref(f).textAlign,onMenuClickThrough:l[8]||(l[8]=e=>t.unref(f).textAlign="right")},null,8,["menu-active"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(s,{text:a.t("tools.barcode.more"),"menu-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",GW,[t.createVNode(M,{size:"small","label-align":"left"},{default:t.withCtx((()=>[t.createVNode(_,{label:a.t("tools.barcode.width")},{default:t.withCtx((()=>[t.createVNode(O,{modelValue:t.unref(f).width,"onUpdate:modelValue":l[9]||(l[9]=e=>t.unref(f).width=e),min:1,max:4,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1},8,["label"]),t.createVNode(_,{label:a.t("tools.barcode.height")},{default:t.withCtx((()=>[t.createVNode(O,{modelValue:t.unref(f).height,"onUpdate:modelValue":l[10]||(l[10]=e=>t.unref(f).height=e),min:10,max:200,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1},8,["label"]),t.createVNode(_,{label:a.t("tools.barcode.margin")},{default:t.withCtx((()=>[t.createVNode(O,{modelValue:t.unref(f).margin,"onUpdate:modelValue":l[11]||(l[11]=e=>t.unref(f).margin=e),min:0,max:25,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1},8,["label"]),t.createVNode(p),t.createVNode(_,{label:a.t("tools.barcode.displayValue")},{default:t.withCtx((()=>[t.createVNode(N,{modelValue:t.unref(f).displayValue,"onUpdate:modelValue":l[12]||(l[12]=e=>t.unref(f).displayValue=e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(a.t("tools.barcode.displayValueText")),1)])),_:1},8,["modelValue"])])),_:1},8,["label"]),t.createVNode(_,{label:a.t("tools.barcode.textContent"),help:a.t("tools.barcode.textContentTip")},{default:t.withCtx((()=>[t.createVNode(T,{modelValue:t.unref(f).text,"onUpdate:modelValue":l[13]||(l[13]=e=>t.unref(f).text=e),autosize:"",maxlength:"100"},null,8,["modelValue"])])),_:1},8,["label","help"]),t.createVNode(_,{label:a.t("tools.barcode.textPosition")},{default:t.withCtx((()=>[t.createVNode(A,{modelValue:t.unref(f).textPosition,"onUpdate:modelValue":l[14]||(l[14]=e=>t.unref(f).textPosition=e),options:d,"popup-props":{destroyOnClose:!0,attach:t.unref(i)}},null,8,["modelValue","popup-props"])])),_:1},8,["label"]),t.createVNode(_,{label:a.t("tools.barcode.textMargin")},{default:t.withCtx((()=>[t.createVNode(O,{modelValue:t.unref(f).textMargin,"onUpdate:modelValue":l[15]||(l[15]=e=>t.unref(f).textMargin=e),min:-15,max:40,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1},8,["label"]),t.createVNode(_,{label:a.t("tools.barcode.fontSize")},{default:t.withCtx((()=>[t.createVNode(O,{modelValue:t.unref(f).fontSize,"onUpdate:modelValue":l[16]||(l[16]=e=>t.unref(f).fontSize=e),min:8,max:36,step:1,"tooltip-props":{showArrow:!1,theme:"light"}},null,8,["modelValue"])])),_:1},8,["label"])])),_:1})])])),default:t.withCtx((()=>[t.createVNode(S,{name:"setting"})])),_:1},8,["text","popup-visible","onTogglePopup"])]),t.createElementVNode("div",KW,[t.createVNode(I,{modelValue:t.unref(f).content,"onUpdate:modelValue":l[17]||(l[17]=e=>t.unref(f).content=e),maxlength:"44","show-limit-number":"",autofocus:"",clearable:"",placeholder:a.t("tools.barcode.placeholder"),status:t.unref(v)&&""!==t.unref(f).content?"error":""},{prefixIcon:t.withCtx((()=>[t.createVNode(S,{name:"barcode"})])),_:1},8,["modelValue","placeholder","status"]),t.unref(v)&&t.unref(f).content?(t.openBlock(),t.createElementBlock("div",{key:0,class:"t-input__tips t-tips t-is-error",textContent:t.toDisplayString(a.t("tools.barcode.error"))},null,8,qW)):t.createCommentVNode("",!0)]),t.createElementVNode("div",YW,[t.createElementVNode("div",{class:"barcode-title",textContent:t.toDisplayString(a.t("tools.barcode.preview"))},null,8,XW),t.createElementVNode("div",ZW,[t.unref(v)?(t.openBlock(),t.createElementBlock("div",{key:0,class:"barcode-empty",textContent:t.toDisplayString(a.t("tools.barcode.renderError"))},null,8,JW)):t.createCommentVNode("",!0),t.withDirectives((t.openBlock(),t.createElementBlock("svg",{ref_key:"barcodeSvgRef",ref:g,id:"barcode"},null,512)),[[t.vShow,!t.unref(v)]])])])])])),_:1},8,["visible","header"])])),_:1},8,["ico","text"])}}},[["__scopeId","data-v-4f32786b"]]),eG={class:"qrcode-container"},tG={class:"qrcode-toolbar"},nG=["textContent"],rG=["textContent"],oG={class:"qrcode-code"},aG=["textContent"],iG={class:"qrcode-render"},lG=["textContent"],sG={class:"qrcode-svg narrow-scrollbar"},cG=["textContent"],uG=["innerHTML"],dG=YN({__name:"qrcode",props:{content:{type:String}},setup(e){let n=t.ref(!1);const{editor:r}=zN(),o=async()=>{p(),n.value=!0},a=[{label:KN("tools.qrcode.levelL"),value:"L"},{label:KN("tools.qrcode.levelM"),value:"M"},{label:KN("tools.qrcode.levelQ"),value:"Q"},{label:KN("tools.qrcode.levelH"),value:"H"}],l={ecl:"M",padding:1,width:256,height:256,color:"#000000",background:"#ffffff",content:"",xmlDeclaration:!1,join:!0,pretty:!1,container:"svg-viewbox"};let s=t.ref({...l}),c=t.ref(!1),u=t.ref(null),d=t.ref(!1);const p=()=>{try{u.value=null,s.value.height=s.value.width;const e=new i(s.value);u.value=e.svg(),d.value=!1}catch{u.value=null,d.value=!0}};t.watch((()=>n.value),(t=>{t&&(s.value=e.content?JSON.parse(e.content):{...l},setTimeout((()=>c.value=!1),200))}),{immediate:!0}),t.watch((()=>s.value),(()=>{n.value&&(c.value=!0,p())}),{immediate:!0,deep:!0});const f=()=>{var t;if(d.value||!u.value)return void I$("error",KN("tools.qrcode.renderError"));if(""===s.value.content)return void I$("error",KN("tools.qrcode.notEmpty"));const{width:o,height:a}=s.value,i=tW(u.value);c.value&&(null==(t=r.value)||t.chain().focus().setImage({type:"qrcode",src:i,content:JSON.stringify(s.value),width:o,height:a},!!e.content).run()),n.value=!1};return(r,i)=>{const l=ZU,c=qg,p=$f,h=PW,m=HW,v=Uk,g=XH;return t.openBlock(),t.createBlock(l,{ico:e.content?"edit":"qrcode",text:e.content?r.t("tools.qrcode.edit"):r.t("tools.qrcode.text"),huge:"",onMenuClick:o},{default:t.withCtx((()=>[t.createVNode(g,{visible:t.unref(n),icon:"qrcode",header:e.content?r.t("tools.qrcode.edit"):r.t("tools.qrcode.text"),width:"695px",onConfirm:f,onClose:i[6]||(i[6]=e=>t.isRef(n)?n.value=!1:n=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",eG,[t.createElementVNode("div",tG,[t.createVNode(l,{style:{width:"126px"},text:r.t("tools.qrcode.level"),"select-options":a,"menu-type":"select",value:t.unref(s).ecl,onMenuClick:i[0]||(i[0]=e=>t.unref(s).ecl=e)},null,8,["text","value"]),t.createVNode(l,{"menu-type":"input",tooltip:r.t("tools.qrcode.paddingTip")},{default:t.withCtx((()=>[t.createVNode(c,{modelValue:t.unref(s).padding,"onUpdate:modelValue":i[1]||(i[1]=e=>t.unref(s).padding=e),size:"small",theme:"normal",max:10,min:0,"allow-input-over-limit":!1,placeholder:""},{label:t.withCtx((()=>[t.createElementVNode("span",{textContent:t.toDisplayString(r.t("tools.qrcode.padding"))},null,8,nG)])),_:1},8,["modelValue"])])),_:1},8,["tooltip"]),t.createVNode(l,{"menu-type":"input",tooltip:r.t("tools.qrcode.widthTip")},{default:t.withCtx((()=>[t.createVNode(c,{modelValue:t.unref(s).width,"onUpdate:modelValue":i[2]||(i[2]=e=>t.unref(s).width=e),size:"small",theme:"normal",max:1024,min:64,"allow-input-over-limit":!1,placeholder:""},{label:t.withCtx((()=>[t.createElementVNode("span",{textContent:t.toDisplayString(r.t("tools.qrcode.width"))},null,8,rG)])),_:1},8,["modelValue"])])),_:1},8,["tooltip"]),t.createVNode(p,{layout:"vertical"}),t.createVNode(h,{text:r.t("tools.qrcode.color"),"default-color":t.unref(s).color,modeless:"",onChange:i[3]||(i[3]=e=>t.unref(s).color=e)},null,8,["text","default-color"]),t.createVNode(m,{text:r.t("tools.qrcode.bgColor"),"default-color":t.unref(s).background,modeless:"",onChange:i[4]||(i[4]=e=>t.unref(s).background=e)},null,8,["text","default-color"])]),t.createElementVNode("div",oG,[t.createVNode(v,{modelValue:t.unref(s).content,"onUpdate:modelValue":i[5]||(i[5]=e=>t.unref(s).content=e),maxlength:"200","show-limit-number":"",autofocus:"",autosize:"",placeholder:r.t("tools.qrcode.placeholder")},null,8,["modelValue","placeholder"]),t.unref(d)&&""!==t.unref(s).content?(t.openBlock(),t.createElementBlock("div",{key:0,class:"t-input__tips t-tips t-is-error",textContent:t.toDisplayString(r.t("tools.qrcode.renderError"))},null,8,aG)):t.createCommentVNode("",!0)]),t.createElementVNode("div",iG,[t.createElementVNode("div",{class:"qrcode-title",textContent:t.toDisplayString(r.t("tools.qrcode.preview"))},null,8,lG),t.createElementVNode("div",sG,[t.unref(u)?(t.openBlock(),t.createElementBlock("div",{key:1,class:"svg",innerHTML:t.unref(u)},null,8,uG)):(t.openBlock(),t.createElementBlock("div",{key:0,class:"qrcode-empty",textContent:t.toDisplayString(r.t("tools.qrcode.notEmpty"))},null,8,cG))])])])])),_:1},8,["visible","header"])])),_:1},8,["ico","text"])}}},[["__scopeId","data-v-b9032fd8"]]),pG={class:"web-page-container"},fG=["textContent"],hG=YN({__name:"web-page",setup(e){const{editor:n}=zN();let r=t.ref(!1),o=t.ref(""),a=t.ref(!1);const i=()=>{var e;n.value&&(""!==o.value&&(o.value.startsWith("http://")||o.value.startsWith("https://"))?(null==(e=n.value)||e.chain().focus().setParagraph().setIframe({src:o.value}).run(),a.value=!1,r.value=!1):a.value=!0)};return t.watch((()=>r.value),(e=>{e||(o.value="",a.value=!1)})),(e,n)=>{const l=Eg,s=XH,c=ZU;return t.openBlock(),t.createBlock(c,{ico:"web-page",text:e.t("insert.web.text"),huge:"",onMenuClick:n[2]||(n[2]=e=>t.isRef(r)?r.value=!0:r=!0)},{default:t.withCtx((()=>[t.createVNode(s,{visible:t.unref(r),icon:"web-page",header:e.t("insert.web.title"),width:"480px",confirmBtn:e.t("insert.web.insert"),onConfirm:i,onClose:n[1]||(n[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",pG,[t.createElementVNode("div",{class:"web-page-tip",textContent:t.toDisplayString(e.t("insert.web.tip"))},null,8,fG),t.createVNode(l,{modelValue:t.unref(o),"onUpdate:modelValue":n[0]||(n[0]=e=>t.isRef(o)?o.value=e:o=e),modelModifiers:{trim:!0},status:t.unref(a)?"error":"default",type:"url",clearable:"",placeholder:e.t("insert.web.placeholder")},null,8,["modelValue","status","placeholder"])])])),_:1},8,["visible","header","confirmBtn"])])),_:1},8,["text"])}}},[["__scopeId","data-v-0e7d7e0a"]]),mG={__name:"text-box",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"text-box",text:e.t("insert.textBox"),huge:"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextBox().run()})},null,8,["text"])}}},vG={__name:"toc",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"toc",text:e.t("insert.toc"),huge:"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addTableOfContents().run()})},null,8,["text"])}}},gG={__name:"code-block",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"code-block",text:e.t("insert.codeBlock"),shortcut:"Ctrl+Alt+C",huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().setCodeBlock().run())},null,8,["text"])}}},bG={__name:"file",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"file",text:e.t("insert.file"),huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("file").run())},null,8,["text"])}}},yG={__name:"audio",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"audio",text:e.t("insert.audio"),huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("audio").run())},null,8,["text"])}}},wG={__name:"video",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"video",text:e.t("insert.video"),huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("video").run())},null,8,["text"])}}},kG={__name:"image",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"image",text:e.t("insert.image"),huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().selectFiles("image").run())},null,8,["text"])}}},xG={class:"dropdown-item-label"},EG={class:"heading"},CG={class:"icon"},SG={__name:"index",setup(e){const{container:n,options:r,editor:o}=zN();let a=t.ref(!1),i=t.ref(0);const l=()=>{const e=document.querySelector(`${n} .node-focused`);if(null===e)return;let t=e.offsetTop;t="DIV"===e.tagName?t-8:t-5,o.value.isActive("pageBreak")&&(t-=3),o.value.isActive("hr")&&(t+=3),o.value.isActive("table")&&(t+=7),i.value=t};t.watch(o,(e=>{e&&o.value.on("selectionUpdate",l)}),{immediate:!0});const s=t.ref([1,2,3,4,5,6]),c=e=>r.value.toolbar.disableMenuItems.includes(e),u=(e,t={})=>{var n,r,a,i,l,s,c;switch(null==(n=o.value)||n.chain().focus().run(),e){case"paragraph":null==(r=o.value)||r.commands.setParagraph();break;case"heading":null==(a=o.value)||a.commands.setHeading(t);break;case"orderedList":null==(i=o.value)||i.commands.toggleOrderedList();break;case"bulletList":null==(l=o.value)||l.commands.toggleBulletList();break;case"taskList":null==(s=o.value)||s.commands.toggleTaskList();break;case"blockquote":null==(c=o.value)||c.commands.toggleBlockquote()}},d=()=>{var e,t,n;(null==(e=o.value)?void 0:e.isActive("table"))?null==(t=o.value)||t.chain().focus().deleteTable().run():null==(n=o.value)||n.chain().focus().selectParentNode().deleteSelection().run()};return(e,l)=>{const p=ZU,f=eg,h=kG,m=wG,v=yG,g=bG,b=gG,y=vG,w=mG,k=hG,x=dG,E=QW,C=DW,S=vW,O=dW,_=iW,N=tg,T=Qv;return t.openBlock(),t.createBlock(T,{attach:`${t.unref(n)} .page-container`,placement:"bottom-right","overlay-class-name":"block-menu-dropdown",trigger:"click","max-height":500,"destroy-on-close":!1,"popup-props":{onVisibleChange(e){t.isRef(a)?a.value=e:a=e}}},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"block-menu-hander",style:t.normalizeStyle(`transform: translate(-38px, ${t.unref(i)}px);`)},[t.createVNode(p,{class:"block-menu-button","menu-active":t.unref(a),ico:"block-menu","hide-text":""},null,8,["menu-active"])],4),t.createVNode(N,null,{default:t.withCtx((()=>{var n,a;return[t.createVNode(f,{class:"block-menu-group-name",disabled:""},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("blockMenu.insert")),1)])),_:1}),t.createVNode(f,{divider:0===(null==(n=t.unref(r).templates)?void 0:n.length)},{default:t.withCtx((()=>[t.createVNode(p,{ico:"node-add",text:e.t("blockMenu.select"),tooltip:!1},null,8,["text"]),t.createVNode(N,{"overlay-class-name":"block-menu-dropdown"},{default:t.withCtx((()=>[t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(p,{ico:"table",text:e.t("table.insert.text"),tooltip:!1,onMenuClick:l[0]||(l[0]=e=>{var n;return null==(n=t.unref(o))?void 0:n.chain().focus().insertTable().run()})},null,8,["text"])])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(h,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("video")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(m,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("audio")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(v,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("file")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(g,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("code-block")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(b,{key:0,huge:!1,shortcutText:"Ctrl+Alt+C",tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(p,{ico:"hr",text:e.t("insert.hr.text"),tooltip:!1,onMenuClick:l[1]||(l[1]=e=>t.unref(o).chain().focus().setHr({type:"signle"}).run())},null,8,["text"])])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(y,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(w,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(k,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(x,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(E,{huge:!1,tooltip:!1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("signature")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(C,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("seal")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(S,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("diagrams")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(O,{key:0,huge:!1,tooltip:!1}))])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[c("mermaid")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(_,{key:0,huge:!1,tooltip:!1}))])),_:1})])),_:1})])),_:1},8,["divider"]),t.unref(r).templates.length>0?(t.openBlock(),t.createBlock(f,{key:0,divider:""},{default:t.withCtx((()=>[t.createVNode(p,{ico:"template",text:e.t("blockMenu.template"),tooltip:!1},null,8,["text"]),t.createVNode(N,{"overlay-class-name":"block-menu-dropdown"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(r).templates,(e=>(t.openBlock(),t.createBlock(f,{key:e.value,value:e.value,divider:e.divider,onClick:t=>(({content:e})=>{e&&o.value&&o.value.commands.insertContent(e)})(e)},{default:t.withCtx((()=>[t.createElementVNode("div",xG,t.toDisplayString(e.title),1)])),_:2},1032,["value","divider","onClick"])))),128))])),_:1})])),_:1})):t.createCommentVNode("",!0),t.createVNode(f,{class:"block-menu-group-name",disabled:""},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("blockMenu.toogleNode")),1)])),_:1}),t.createVNode(f,{disabled:null==(a=t.unref(o))?void 0:a.isActive("paragraph")},{default:t.withCtx((()=>[t.createVNode(p,{ico:"paragraph",text:e.t("base.heading.paragraph"),tooltip:!1,"shortcut-text":"ctrl+alt+0",onMenuClick:l[2]||(l[2]=e=>u("paragraph"))},null,8,["text"])])),_:1},8,["disabled"]),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(p,{ico:"heading",text:e.t("base.heading.text"),tooltip:!1},null,8,["text"]),t.createVNode(N,{"overlay-class-name":"block-menu-dropdown"},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(n=>{var r;return t.openBlock(),t.createBlock(f,{key:n.level,disabled:null==(r=t.unref(o))?void 0:r.isActive("heading",{level:n})},{default:t.withCtx((()=>[t.createVNode(p,{tooltip:!1,"shortcut-text":`ctrl+alt+${n}`,onMenuClick:e=>u("heading",{level:n})},{default:t.withCtx((()=>[t.createElementVNode("span",EG,[t.createElementVNode("span",CG,"H"+t.toDisplayString(n),1),t.createTextVNode(" "+t.toDisplayString(e.t("base.heading.text",{level:n})),1)])])),_:2},1032,["shortcut-text","onMenuClick"])])),_:2},1032,["disabled"])})),128))])),_:1})])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>{var n;return[t.createVNode(p,{ico:"ordered-list-2",text:e.t("list.ordered.text"),tooltip:!1,"shortcut-text":"Ctrl+Shift+7","menu-active":null==(n=t.unref(o))?void 0:n.isActive("orderedList"),onMenuClick:l[3]||(l[3]=e=>u("orderedList"))},null,8,["text","menu-active"])]})),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>{var n;return[t.createVNode(p,{ico:"bullet-list-2",text:e.t("list.bullet.text"),tooltip:!1,"shortcut-text":"Ctrl+Shift+8","menu-active":null==(n=t.unref(o))?void 0:n.isActive("bulletList"),onMenuClick:l[4]||(l[4]=e=>u("bulletList"))},null,8,["text","menu-active"])]})),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>{var n;return[t.createVNode(p,{ico:"task-list-2",text:e.t("list.task.text"),tooltip:!1,"shortcut-text":"Ctrl+Shift+9","menu-active":null==(n=t.unref(o))?void 0:n.isActive("taskList"),onMenuClick:l[5]||(l[5]=e=>u("taskList"))},null,8,["text","menu-active"])]})),_:1}),t.createVNode(f,{divider:""},{default:t.withCtx((()=>{var n;return[t.createVNode(p,{ico:"quote",text:e.t("base.quote"),tooltip:!1,"shortcut-text":"Ctrl+Shift+B","menu-active":null==(n=t.unref(o))?void 0:n.isActive("blockquote"),onMenuClick:l[6]||(l[6]=e=>u("blockquote"))},null,8,["text","menu-active"])]})),_:1}),t.createVNode(f,{class:"block-menu-group-name",disabled:""},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("blockMenu.other")),1)])),_:1}),t.createVNode(f,null,{default:t.withCtx((()=>[t.createVNode(p,{ico:"node-delete-2",text:e.t("blockMenu.delete"),tooltip:!1,onMenuClick:d},null,8,["text"])])),_:1})]})),_:1})])),_:1},8,["attach","popup-props"])}}},OG=["textContent"],_G=YN({__name:"highlight",setup(e){const{editor:n}=zN(),r=[{label:KN("base.highlight.yellowBg"),value:1,bgcolor:"#ffff8a"},{label:KN("base.highlight.greenBg"),value:2,bgcolor:"#a7ffa7"},{label:KN("base.highlight.purpleBg"),value:3,bgcolor:"#e6afff"},{label:KN("base.highlight.blueBg"),value:4,bgcolor:"#83d3ff",divider:!0},{label:KN("base.highlight.red"),value:5,color:"#e71313"},{label:KN("base.highlight.green"),value:6,color:"#128a00",divider:!0}];let o=t.ref({});const a=e=>{var t,r;e.bgcolor&&(null==(t=n.value)||t.chain().focus().setHighlight({color:e.bgcolor}).run()),e.color&&(null==(r=n.value)||r.chain().focus().setColor(e.color).run()),o.value=e};return(e,i)=>{const l=dC,s=eg,c=tg,u=ZU;return t.openBlock(),t.createBlock(u,{text:e.t("base.highlight.text"),shortcut:"Ctrl+Shift+H","menu-type":"dropdown","popup-handle":"arrow","hide-text":"","overlay-class-name":"highlight-dropdown",onMenuClick:i[1]||(i[1]=e=>a(t.unref(o)))},{dropmenu:t.withCtx((()=>[t.createVNode(c,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,(e=>t.createVNode(s,{class:"text-highlight-menu",key:e.value,value:e.value,style:t.normalizeStyle({backgroundColor:e.bgcolor,color:e.color}),divider:e.divider,onClick:t=>a(e)},{default:t.withCtx((()=>[t.createVNode(l,{name:"highlight"}),t.createElementVNode("span",null,t.toDisplayString(e.label),1)])),_:2},1032,["value","style","divider","onClick"]))),64)),t.createVNode(s,{class:"text-highlight-menu clear-format-menu",onClick:i[0]||(i[0]=e=>{return null==(t=n.value)||t.chain().focus().unsetHighlight().run(),null==(r=n.value)||r.chain().focus().unsetColor().run(),void(o.value={});var t,r})},{default:t.withCtx((()=>[t.createVNode(l,{name:"clear-format"}),t.createElementVNode("span",{textContent:t.toDisplayString(e.t("base.highlight.clear"))},null,8,OG)])),_:1})])),_:1})])),default:t.withCtx((()=>[t.createVNode(l,{name:"highlight",class:"icon-highlight",style:t.normalizeStyle({backgroundColor:t.unref(o).bgcolor,color:t.unref(o).color})},null,8,["style"])])),_:1},8,["text"])}}},[["__scopeId","data-v-9672f947"]]),NG={__name:"align-distributed",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"align-distributed",text:e.t("base.align.distributed"),shortcut:"Ctrl+Shift+D","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive({textAlign:"distributed"}),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().setTextAlign("distributed").run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextAlign("distributed").run()})},null,8,["text","menu-active","disabled"])}}},TG={__name:"align-justify",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"align-justify",text:e.t("base.align.justify"),shortcut:"Ctrl+Shift+J","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive({textAlign:"justify"}),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().setTextAlign("justify").run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setTextAlign("justify").run()})},null,8,["text","menu-active","disabled"])}}},AG={class:"text-align-group"},MG=YN({__name:"align-dropdown",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{editor:o}=zN(),a=t.computed((()=>o.value?o.value.isActive({textAlign:"justify"})?"left":o.value.isActive({textAlign:"center"})?"center":o.value.isActive({textAlign:"right"})?"right":o.value.isActive({textAlign:"justify"})?"justify":"left":"left"));return(e,i)=>{var l;const s=FW,c=jW,u=VW,d=TG,p=NG,f=ZU;return t.openBlock(),t.createBlock(f,{ico:`align-${t.unref(a)}`,text:e.t("base.align.title"),"menu-type":"popup","hide-text":"",disabled:!(null==(l=t.unref(o))?void 0:l.can().chain().focus().setTextAlign("center").run()),"popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",AG,[t.createVNode(s),t.createVNode(c),t.createVNode(u),t.createVNode(d),t.createVNode(p)])])),_:1},8,["ico","text","disabled","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-1cc7e7b1"]]),IG={__name:"strike",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"strike",text:e.t("base.strike"),shortcut:"Ctrl+Shift+X","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("strike"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleStrike().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleStrike().run()})},null,8,["text","menu-active","disabled"])}}},PG={__name:"underline",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"underline",text:e.t("base.underline"),shortcut:"Ctrl+U","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("underline"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleUnderline().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleUnderline().run()})},null,8,["text","menu-active","disabled"])}}},LG={__name:"font-size",props:{select:{type:Boolean,default:!0}},setup(e){const{editor:n}=zN();GN("toolbar");const r=[{label:KN("base.fontSize.default"),value:"14px",order:4},{label:KN("base.fontSize.42pt"),value:"42pt",order:20},{label:KN("base.fontSize.36pt"),value:"36pt",order:19},{label:KN("base.fontSize.26pt"),value:"26pt",order:16},{label:KN("base.fontSize.24pt"),value:"24pt",order:15},{label:KN("base.fontSize.22pt"),value:"22pt",order:14},{label:KN("base.fontSize.18pt"),value:"18pt",order:11},{label:KN("base.fontSize.16pt"),value:"16pt",order:10},{label:KN("base.fontSize.15pt"),value:"15pt",order:9},{label:KN("base.fontSize.14pt"),value:"14pt",order:7},{label:KN("base.fontSize.12pt"),value:"12pt",order:4},{label:KN("base.fontSize.10_5pt"),value:"10.5pt",order:1},{label:KN("base.fontSize.9pt"),value:"9pt",order:3},{label:KN("base.fontSize.7_5pt"),value:"7.5pt",order:1},{label:KN("base.fontSize.6_5pt"),value:"6.5pt",order:0},{label:"10",value:"10px",order:1},{label:"11",value:"11px",order:2},{label:"12",value:"12px",order:3},{label:"16",value:"16px",order:5},{label:"18",value:"18px",order:6},{label:"20",value:"20px",order:8},{label:"22",value:"22px",order:10},{label:"24",value:"24px",order:11},{label:"26",value:"26px",order:12},{label:"28",value:"28px",order:13},{label:"32",value:"32px",order:15},{label:"36",value:"36px",order:17},{label:"42",value:"42px",order:18},{label:"48",value:"48px",order:19},{label:"72",value:"72px",order:21},{label:"96",value:"96px",order:22}],o=e=>{n.value.chain().focus().setFontSize(e).run()},a=()=>{const{fontSize:e}=n.value.getAttributes("textStyle");if(e){const t=r.find((({value:t})=>t===e));if(!t)return;const n=r.find((({order:e})=>e===t.order+1));n&&o(n.value)}else o("16px")},i=()=>{const{fontSize:e}=n.value.getAttributes("textStyle");if(e){const t=r.find((({value:t})=>t===e));if(!t)return;const n=r.find((({order:e})=>e===t.order-1));n&&o(n.value)}else o("14px")};return(l,s)=>{var c;const u=ZU;return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.select?(t.openBlock(),t.createBlock(u,t.mergeProps({key:0,text:l.t("base.fontSize.text"),"menu-type":"select","hide-text":"",style:{width:"80px"},"select-options":r,value:(null==(c=t.unref(n))?void 0:c.getAttributes("textStyle").fontSize)||"14px"},l.$attrs,{placeholder:l.t("base.fontSize.text"),filterable:"",onMenuClick:o}),null,16,["text","value","placeholder"])):t.createCommentVNode("",!0),t.createVNode(u,{ico:"font-size-increase",text:l.t("base.fontSize.increase"),"hide-text":"",onMenuClick:a},null,8,["text"]),t.createVNode(u,{ico:"font-size-decrease",text:l.t("base.fontSize.increase"),"hide-text":"",onMenuClick:i},null,8,["text"])],64)}}},RG={__name:"copy",setup(e){const{editor:n}=zN(),r=()=>{const e=n.value.commands.getSelectionNode(),{copy:r}=xN({source:t.ref(e.props.node.attrs.code)});r(),I$("success",KN("bubbleMenu.code.copy.success"))};return(e,n)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"copy",text:e.t("bubbleMenu.code.copy.text"),onMenuClick:r},null,8,["text"])}}},BG={__name:"word-wrap",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{wordWrap:r}=null==(e=n.value)?void 0:e.getAttributes("codeBlock");t.props.updateAttributes({wordWrap:!r})};return(e,o)=>{var a,i;const l=ZU;return t.openBlock(),t.createBlock(l,{text:e.t("bubbleMenu.code.wordWrap"),ico:"code-word-wrap","menu-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("codeBlock"))?void 0:i.wordWrap,onMenuClick:r},null,8,["text","menu-active"])}}},DG={__name:"line-numbers",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{lineNumbers:r}=null==(e=n.value)?void 0:e.getAttributes("codeBlock");t.props.updateAttributes({lineNumbers:!r})};return(e,o)=>{var a,i;const l=ZU;return t.openBlock(),t.createBlock(l,{text:e.t("bubbleMenu.code.lineNumbers"),ico:"code-line-number","menu-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("codeBlock"))?void 0:i.lineNumbers,onMenuClick:r},null,8,["text","menu-active"])}}},VG={__name:"themes",setup(e){const{editor:n}=zN(),r=[{label:KN("bubbleMenu.code.themes.dark"),value:"dark"},{label:KN("bubbleMenu.code.themes.light"),value:"light"}],o=e=>{n.value.commands.getSelectionNode().props.updateAttributes({theme:e})};return(e,a)=>{var i,l;const s=ZU;return t.openBlock(),t.createBlock(s,{text:e.t("bubbleMenu.code.themes.text"),"menu-type":"select",style:{width:"100px"},"select-options":r,value:null==(l=null==(i=t.unref(n))?void 0:i.getAttributes("codeBlock"))?void 0:l.theme,onMenuClick:o},null,8,["text","value"])}}};var jG={},FG=Symbol(),zG=Symbol(),$G=e=>"string"==typeof e?HG[e]:e,HG={plain:jG,plaintext:jG,text:jG,txt:jG},UG=(e,t)=>(t[zG]||WG)(e,t),WG=(e,t)=>{for(var n,r=[e],o=[],a=0;n=$G(t[FG]);)delete t[FG],Object.assign(t,n);for(ZG(e,t,r,0);o[a++]=r[0],r=r[1];);return o},GG="</span>",KG="",qG="",YG=e=>{for(var t="",n=e.length,r=0;r<n;)t+=XG(e[r++]);return t},XG=e=>{if(e instanceof JG){var{type:t,alias:n,content:r}=e,o=KG,a=qG,i=`<span class="token ${t+(n?" "+n:"")+("keyword"==t&&"string"==typeof r?" keyword-"+r:"")}">`;qG+=GG,KG+=i;var l=XG(r);return KG=o,qG=a,i+l+GG}return"string"!=typeof e?YG(e):(e=e.replace(/&/g,"&").replace(/</g,"<"),qG&&e.includes("\n")?e.replace(/\n/g,qG+"\n"+KG):e)},ZG=(e,t,n,r,o)=>{for(var a in t)if(t[a])for(var i=0,l=t[a],s=Array.isArray(l)?l:[l];i<s.length;++i){if(o&&o[0]==a&&o[1]==i)return;for(var c=s[i],u=c.pattern||c,d=$G(c.inside),p=c.lookbehind,f=c.greedy&&u.global,h=c.alias,m=n,v=r;m&&(!o||v<o[2]);v+=m[0].length,m=m[1]){var g,b,y=m[0],w=0;if(!(y instanceof JG)){if(u.lastIndex=f?v:0,(g=u.exec(f?e:y))&&p&&g[1]&&(b=g[1].length,g.index+=b,g[0]=g[0].slice(b)),f){if(!g)break;if(g[0]){for(var k,x=(S=g.index)+g[0].length;S>=v+(k=m[0].length);m=m[1],v+=k);if(m[0]instanceof JG)continue;var E=m;for(l=v;(l+=E[0].length)<x;E=E[1],w++);y=e.slice(v,l),g.index-=v}}if(g&&g[0]){for(var C,S=g.index,O=g[0],_=y.slice(S+O.length),N=v+y.length,T=new JG(a,d?UG(O,d):O,O,h),A=m,M=0;A=A[1],M++<w;);_&&(!A||A[0]instanceof JG?A=[_,A]:A[0]=_+A[0]),v+=S,m[0]=S?y.slice(0,S):T,S?m=m[1]=[T,A]:m[1]=A,w&&(ZG(e,t,m,v,C=[a,i,N]),N=C[2]),o&&N>o[2]&&(o[2]=N)}}}}};function JG(e,t,n,r){this.type=e,this.content=t,this.alias=r,this.length=n.length}const QG={__name:"languages",setup(e){const{editor:n}=zN(),r=Object.keys(HG).map((e=>({label:e,value:e}))),o=e=>{n.value.commands.getSelectionNode().props.updateAttributes({language:e})};return(e,a)=>{var i,l;const s=ZU;return t.openBlock(),t.createBlock(s,{text:e.t("bubbleMenu.code.languages"),"menu-type":"select",style:{width:"120px"},"select-options":t.unref(r),value:null==(l=null==(i=t.unref(n))?void 0:i.getAttributes("codeBlock"))?void 0:l.language,filterable:"",onMenuClick:o},null,8,["text","select-options","value"])}}},eK={__name:"split-cell",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-split-cell",text:e.t("table.splitCell"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().splitCell()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().splitCell().run()})},null,8,["text","hide-text","disabled"])}}},tK={__name:"merge-cells",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-merge-cell",text:e.t("table.mergeCells"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().mergeCells()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().mergeCells().run()})},null,8,["text","hide-text","disabled"])}}},nK={__name:"delete-column",setup(e){const{editor:n}=zN(),r=GN("toolbar"),o=()=>{const e=M$({theme:"danger",header:KN("table.deleteColumn.title"),body:KN("table.deleteColumn.message"),confirmBtn:{theme:"danger",content:KN("table.deleteColumn.delete")},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteColumn().run(),I$("success",KN("table.deleteColumn.success")),e.destroy()}})};return(e,a)=>{var i;const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"table-delete-column",text:e.t("table.deleteColumn.text"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(i=t.unref(n))?void 0:i.can().deleteColumn()),onMenuClick:o},null,8,["text","hide-text","disabled"])}}},rK={__name:"delete-row",setup(e){const{editor:n}=zN(),r=GN("toolbar"),o=()=>{const e=M$({theme:"danger",header:KN("table.deleteRow.title"),body:KN("table.deleteRow.message"),confirmBtn:{theme:"danger",content:KN("table.deleteRow.delete")},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteRow().run(),I$("success",KN("table.deleteRow.success")),e.destroy()}})};return(e,a)=>{var i;const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"table-delete-row",text:e.t("table.deleteRow.text"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(i=t.unref(n))?void 0:i.can().deleteRow()),onMenuClick:o},null,8,["text","hide-text","disabled"])}}},oK={__name:"add-column-after",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-add-column-after",text:e.t("table.addColumnAfter"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().addColumnAfter()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addColumnAfter().run()})},null,8,["text","hide-text","disabled"])}}},aK={__name:"add-column-before",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-add-column-before",text:e.t("table.addColumnBefore"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().addColumnBefore()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addColumnBefore().run()})},null,8,["text","hide-text","disabled"])}}},iK={__name:"add-row-after",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-add-row-after",text:e.t("table.addRowAfter"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().addRowAfter()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addRowAfter().run()})},null,8,["text","hide-text","disabled"])}}},lK={__name:"add-row-before",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-add-row-after",text:e.t("table.addRowBefore"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().addRowBefore()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().addRowBefore().run()})},null,8,["text","hide-text","disabled"])}}},sK={__name:"cells-background",emits:["change"],setup(e,{emit:n}){let{popupVisible:r,togglePopup:o}=IW();const{editor:a}=zN(),i=e=>{var t;r.value=!1;const n=""===e?null:e;null==(t=a.value)||t.chain().focus().setCellAttribute("backgroundColor",n).run()};return(e,n)=>{var l;const s=MW,c=ZU;return t.openBlock(),t.createBlock(c,{ico:"table-cells-background",text:e.t("table.cellBgColor.text"),tooltip:e.t("table.cellBgColor.tip"),"menu-type":"popup",huge:"",disabled:!(null==(l=t.unref(a))?void 0:l.can().setCellAttribute("backgroundColor")),"popup-visible":t.unref(r),onTogglePopup:t.unref(o)},{content:t.withCtx((()=>[t.createVNode(s,{"default-color":"",onChange:i})])),_:1},8,["text","tooltip","disabled","popup-visible","onTogglePopup"])}}},cK={__name:"cells-align",setup(e){const{editor:n}=zN(),r=[{content:KN("table.cellAlign.lt"),value:"left-top"},{content:KN("table.cellAlign.ct"),value:"center-top"},{content:KN("table.cellAlign.rt"),value:"right-top"},{content:KN("table.cellAlign.jt"),value:"justify-top",divider:!0},{content:KN("table.cellAlign.lm"),value:"left-middle"},{content:KN("table.cellAlign.cm"),value:"center-middle"},{content:KN("table.cellAlign.rm"),value:"right-middle"},{content:KN("table.cellAlign.jm"),value:"justify-middle",divider:!0},{content:KN("table.cellAlign.lb"),value:"left-bottom"},{content:KN("table.cellAlign.cb"),value:"center-bottom"},{content:KN("table.cellAlign.rb"),value:"right-bottom"},{content:KN("table.cellAlign.jb"),value:"justify-bottom"}],o=({value:e})=>{var t;null==(t=n.value)||t.chain().focus().setCellAttribute("align",e).run()};return(e,a)=>{var i;const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"table-cells-align",text:e.t("table.cellAlign.text"),tooltip:e.t("table.cellAlign.tip"),"menu-type":"dropdown",huge:"","select-options":r,disabled:!(null==(i=t.unref(n))?void 0:i.can().setCellAttribute("align")),onChange:o},null,8,["text","tooltip","disabled"])}}},uK={__name:"download",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=document.createElement("a");t.href=null==(e=n.value)?void 0:e.getAttributes("file").url,t.target="_blank",t.click()};return(e,n)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"download",text:e.t("bubbleMenu.file.download"),onMenuClick:r},null,8,["text"])}}},dK={__name:"node-delete",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"node-delete",text:e.t("bubbleMenu.delete"),shortcut:"Backspace",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().deleteSelectionNode().run()})},null,8,["text"])}}},pK={__name:"edit",setup(e){const{editor:n}=zN(),r=t.computed((()=>{var e,t;return null==(t=null==(e=n.value)?void 0:e.getAttributes("image"))?void 0:t.type})),o=t.computed((()=>{var e,t;return null==(t=null==(e=n.value)?void 0:e.getAttributes("image"))?void 0:t.content}));return(e,n)=>{const a=dG,i=QW,l=dW,s=iW;return t.openBlock(),t.createElementBlock(t.Fragment,null,["qrcode"===t.unref(r)?(t.openBlock(),t.createBlock(a,{key:0,content:t.unref(o)},null,8,["content"])):t.createCommentVNode("",!0),"barcode"===t.unref(r)?(t.openBlock(),t.createBlock(i,{key:1,content:t.unref(o)},null,8,["content"])):t.createCommentVNode("",!0),"diagrams"===t.unref(r)?(t.openBlock(),t.createBlock(l,{key:2,content:t.unref(o)},null,8,["content"])):t.createCommentVNode("",!0),"mermaid"===t.unref(r)?(t.openBlock(),t.createBlock(s,{key:3,content:t.unref(o)},null,8,["content"])):t.createCommentVNode("",!0)],64)}}},fK={__name:"download",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=document.createElement("a");t.href=null==(e=n.value)?void 0:e.getAttributes("image").src,t.target="_blank",t.click()};return(e,n)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"image-download",text:e.t("bubbleMenu.image.download"),onMenuClick:r},null,8,["text"])}}},hK={__name:"preview",setup(e){const{editor:n}=zN(),r=t.ref(!1);return(e,o)=>{var a;const i=ZU,l=YE;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(i,{ico:"image-preview",text:e.t("bubbleMenu.image.preview"),onMenuClick:o[0]||(o[0]=e=>r.value=!r.value)},null,8,["text"]),t.createVNode(l,{visible:r.value,"onUpdate:visible":o[1]||(o[1]=e=>r.value=e),images:[null==(a=t.unref(n))?void 0:a.getAttributes("image").src]},null,8,["visible","images"])],64)}}},mK=YN({__name:"remove-background",setup(e){const{options:n,editor:r}=zN();let a=t.ref(!1);const i=async()=>{var e;const t=r.value.commands.getSelectionNode(),{src:i}=null==(e=r.value)?void 0:e.getAttributes("image");a.value=!0;const l=await o.removeBackground(i,{publicPath:`${n.value.cdnUrl}/libs/imgly/background-removal-data/`}),s=new File([l],`${$_(10)}.png`,{type:"image/png"});t.props.updateAttributes({src:URL.createObjectURL(l),uploaded:!1,file:s}),a.value=!1};return(e,n)=>{const r=dC,o=ZU;return t.openBlock(),t.createBlock(o,{text:t.unref(a)?e.t("bubbleMenu.image.removingBg"):e.t("bubbleMenu.image.removeBg"),disabled:t.unref(a),onMenuClick:i},{default:t.withCtx((()=>[t.unref(a)?(t.openBlock(),t.createBlock(r,{key:1,class:"loading",name:"loading"})):(t.openBlock(),t.createBlock(r,{key:0,name:"image-remove-background"}))])),_:1},8,["text","disabled"])}}},[["__scopeId","data-v-6fcf9db6"]]),vK={__name:"reset",setup(e){const{editor:n}=zN(),r=()=>{n.value.commands.getSelectionNode().props.updateAttributes({top:0,left:0,angle:0,flipX:!1,flipy:!1})};return(e,n)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"image-reset",text:e.t("bubbleMenu.image.reset"),onMenuClick:r},null,8,["text"])}}},gK={__name:"draggable",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{draggable:r}=null==(e=n.value)?void 0:e.getAttributes("image");t.props.updateAttributes({draggable:!r})};return(e,o)=>{var a,i;const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"image-draggable",text:e.t("bubbleMenu.image.draggable"),"menu-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.draggable,onMenuClick:r},null,8,["text","menu-active"])}}},bK={__name:"proportion",setup(e){const{editor:n}=zN(),r=()=>{var e;const t=n.value.commands.getSelectionNode(),{equalProportion:r}=null==(e=n.value)?void 0:e.getAttributes("image");t.props.updateAttributes({equalProportion:!r})};return(e,o)=>{var a,i;const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"equal-proportion",text:e.t("bubbleMenu.image.proportion"),"menu-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.equalProportion,onMenuClick:r},null,8,["text","menu-active"])}}},yK={__name:"flip",setup(e){const{editor:n}=zN(),r=e=>{var t;const r=n.value.commands.getSelectionNode(),{flipX:o,flipY:a}=null==(t=n.value)?void 0:t.getAttributes("image");"flipX"===e&&r.props.updateAttributes({flipX:!o}),"flipY"===e&&r.props.updateAttributes({flipY:!a})};return(e,o)=>{var a,i,l,s;const c=ZU,u=dC;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(c,{ico:"image-flip",text:e.t("bubbleMenu.image.flipX"),"menu-active":null==(i=null==(a=t.unref(n))?void 0:a.getAttributes("image"))?void 0:i.flipY,onMenuClick:o[0]||(o[0]=e=>r("flipY"))},null,8,["text","menu-active"]),t.createVNode(c,{text:e.t("bubbleMenu.image.flipY"),"menu-active":null==(s=null==(l=t.unref(n))?void 0:l.getAttributes("image"))?void 0:s.flipX,onMenuClick:o[1]||(o[1]=e=>r("flipX"))},{default:t.withCtx((()=>[t.createVNode(u,{name:"image-flip",style:{transform:"rotate(90deg)"}})])),_:1},8,["text","menu-active"])],64)}}},wK=e=>(t.pushScopeId("data-v-3a30f07c"),e=e(),t.popScopeId(),e),kK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),xK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),EK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),CK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),SK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),OK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),_K=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),NK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),TK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),AK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),MK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),IK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),PK=wK((()=>t.createElementVNode("div",{class:"divider"},null,-1))),LK=YN({__name:"index",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a,i,l,s,c,u,d,p,f,h,m,v,g,b,y,w,k,x,E,C;const S=FW,O=jW,_=VW,N=yK,T=bK,A=gK,M=vK,I=mK,P=hK,L=fK,R=pK,B=dK,D=uK,V=cK,j=sK,F=lK,z=iK,$=aK,H=oK,U=rK,W=nK,G=tK,K=eK,q=QG,Y=VG,X=DG,Z=BG,J=RG,Q=LG,ee=$W,te=zW,ne=PG,re=IG,oe=MG,ae=PW,ie=HW,le=_G;return(null==(o=t.unref(n))?void 0:o.isActive("toc"))||(null==(a=t.unref(n))?void 0:a.isActive("pageBreak"))||(null==(i=t.unref(n))?void 0:i.isActive("horizontalRule"))||(null==(l=t.unref(n))?void 0:l.getAttributes("image").error)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[],64)):(null==(s=t.unref(n))?void 0:s.isActive("image"))&&!(null==(c=t.unref(n))?void 0:c.getAttributes("image").error)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(S),t.createVNode(O),t.createVNode(_),kK,t.createVNode(N),t.createVNode(T),t.createVNode(A),t.createVNode(M),xK,"image"===(null==(d=null==(u=t.unref(n))?void 0:u.getAttributes("image"))?void 0:d.type)||["image/png","image/jpeg"].includes(null==(f=null==(p=t.unref(n))?void 0:p.getAttributes("image"))?void 0:f.type)?(t.openBlock(),t.createBlock(I,{key:0})):t.createCommentVNode("",!0),"image"===(null==(m=null==(h=t.unref(n))?void 0:h.getAttributes("image"))?void 0:m.type)?(t.openBlock(),t.createBlock(P,{key:1})):t.createCommentVNode("",!0),t.createVNode(L),EK,t.createVNode(R),t.createVNode(B)],64)):(null==(v=t.unref(n))?void 0:v.isActive("video"))||(null==(g=t.unref(n))?void 0:g.isActive("audio"))||(null==(b=t.unref(n))?void 0:b.isActive("file"))||(null==(y=t.unref(n))?void 0:y.isActive("iframe"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(S),t.createVNode(O),t.createVNode(_),CK,(null==(w=t.unref(n))?void 0:w.isActive("file"))||(null==(k=t.unref(n))?void 0:k.isActive("video"))||(null==(x=t.unref(n))?void 0:x.isActive("audio"))?(t.openBlock(),t.createBlock(D,{key:0})):t.createCommentVNode("",!0),t.createVNode(B)],64)):(null==(E=t.unref(n))?void 0:E.isActive("table"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createVNode(V),t.createVNode(j),SK,t.createVNode(F),t.createVNode(z),t.createVNode($),t.createVNode(H),OK,t.createVNode(U),t.createVNode(W),_K,t.createVNode(G),t.createVNode(K),NK,t.createVNode(B)],64)):(null==(C=t.unref(n))?void 0:C.isActive("codeBlock"))?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(q),t.createVNode(Y),TK,t.createVNode(X),t.createVNode(Z),AK,t.createVNode(J),t.createVNode(B)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createVNode(Q,{select:!1}),MK,t.createVNode(ee),t.createVNode(te),t.createVNode(ne),t.createVNode(re),IK,t.createVNode(oe),PK,t.createVNode(ae),t.createVNode(ie),t.createVNode(le)],64))}}},[["__scopeId","data-v-3a30f07c"]]);function RK(e){this.content=e}function BK(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),a=t.child(r);if(o!=a){if(!o.sameMarkup(a))return n;if(o.isText&&o.text!=a.text){for(let e=0;o.text[e]==a.text[e];e++)n++;return n}if(o.content.size||a.content.size){let e=BK(o.content,a.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function DK(e,t,n,r){for(let o=e.childCount,a=t.childCount;;){if(0==o||0==a)return o==a?null:{a:n,b:r};let i=e.child(--o),l=t.child(--a),s=i.nodeSize;if(i!=l){if(!i.sameMarkup(l))return{a:n,b:r};if(i.isText&&i.text!=l.text){let e=0,t=Math.min(i.text.length,l.text.length);for(;e<t&&i.text[i.text.length-e-1]==l.text[l.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(i.content.size||l.content.size){let e=DK(i.content,l.content,n-1,r-1);if(e)return e}n-=s,r-=s}else n-=s,r-=s}}RK.prototype={constructor:RK,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),a=r.content.slice();return-1==o?a.push(n||e,t):(a[o+1]=t,n&&(a[o]=n)),new RK(a)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new RK(n)},addToStart:function(e,t){return new RK([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new RK(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),a=r.find(e);return o.splice(-1==a?o.length:a,0,t,n),new RK(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=RK.from(e)).size?new RK(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=RK.from(e)).size?new RK(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=RK.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach((function(t,n){e[t]=n})),e},get size(){return this.content.length>>1}},RK.from=function(e){if(e instanceof RK)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new RK(t)};class VK{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let n=0;n<e.length;n++)this.size+=e[n].nodeSize}nodesBetween(e,t,n,r=0,o){for(let a=0,i=0;i<t;a++){let l=this.content[a],s=i+l.nodeSize;if(s>e&&!1!==n(l,r+i,o||null,a)&&l.content.size){let o=i+1;l.nodesBetween(Math.max(0,e-o),Math.min(l.content.size,t-o),n,r+o)}i=s}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",a=!0;return this.nodesBetween(e,t,((i,l)=>{let s=i.isText?i.text.slice(Math.max(e,l)-l,t-l):i.isLeaf?r?"function"==typeof r?r(i):r:i.type.spec.leafText?i.type.spec.leafText(i):"":"";i.isBlock&&(i.isLeaf&&s||i.isTextblock)&&n&&(a?a=!1:o+=n),o+=s}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new VK(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,a=0;a<t;o++){let i=this.content[o],l=a+i.nodeSize;l>e&&((a<e||l>t)&&(i=i.isText?i.cut(Math.max(0,e-a),Math.min(i.text.length,t-a)):i.cut(Math.max(0,e-a-1),Math.min(i.content.size,t-a-1))),n.push(i),r+=i.nodeSize),a=l}return new VK(n,r)}cutByIndex(e,t){return e==t?VK.empty:0==e&&t==this.content.length?this:new VK(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new VK(r,o)}addToStart(e){return new VK([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new VK(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return BK(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return DK(this,e,t,n)}findIndex(e,t=-1){if(0==e)return FK(0,e);if(e==this.size)return FK(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?FK(n+1,o):FK(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return VK.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new VK(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return VK.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new VK(t||e,n)}static from(e){if(!e)return VK.empty;if(e instanceof VK)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new VK([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}VK.empty=new VK([],0);const jK={index:0,offset:0};function FK(e,t){return jK.index=e,jK.offset=t,jK}function zK(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!zK(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!zK(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}let $K=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&zK(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);let r=n.create(t.attrs);return n.checkAttrs(r.attrs),r}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&0==t.length)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort(((e,t)=>e.type.rank-t.type.rank)),n}};$K.none=[];class HK extends Error{}class UK{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=GK(this.content,e+this.openStart,t);return n&&new UK(n,this.openStart,this.openEnd)}removeBetween(e,t){return new UK(WK(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return UK.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new UK(VK.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let o=e.firstChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.firstChild)n++;for(let o=e.lastChild;o&&!o.isLeaf&&(t||!o.type.spec.isolating);o=o.lastChild)r++;return new UK(e,n,r)}}function WK(e,t,n){let{index:r,offset:o}=e.findIndex(t),a=e.maybeChild(r),{index:i,offset:l}=e.findIndex(n);if(o==t||a.isText){if(l!=n&&!e.child(i).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=i)throw new RangeError("Removing non-flat range");return e.replaceChild(r,a.copy(WK(a.content,t-o-1,n-o-1)))}function GK(e,t,n,r){let{index:o,offset:a}=e.findIndex(t),i=e.maybeChild(o);if(a==t||i.isText)return e.cut(0,t).append(n).append(e.cut(t));let l=GK(i.content,t-a-1,n);return l&&e.replaceChild(o,i.copy(l))}function KK(e,t,n){if(n.openStart>e.depth)throw new HK("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new HK("Inconsistent open depths");return qK(e,t,n,0)}function qK(e,t,n,r){let o=e.index(r),a=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let i=qK(e,t,n,r+1);return a.copy(a.content.replaceChild(o,i))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:i}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let o=n-1;o>=0;o--)r=t.node(o).copy(VK.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return QK(a,eq(e,o,i,t,r))}{let r=e.parent,o=r.content;return QK(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return QK(a,tq(e,t,r))}function YK(e,t){if(!t.type.compatibleContent(e.type))throw new HK("Cannot join "+t.type.name+" onto "+e.type.name)}function XK(e,t,n){let r=e.node(n);return YK(r,t.node(n)),r}function ZK(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function JK(e,t,n,r){let o=(t||e).node(n),a=0,i=t?t.index(n):o.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(ZK(e.nodeAfter,r),a++));for(let l=a;l<i;l++)ZK(o.child(l),r);t&&t.depth==n&&t.textOffset&&ZK(t.nodeBefore,r)}function QK(e,t){return e.type.checkContent(t),e.copy(t)}function eq(e,t,n,r,o){let a=e.depth>o&&XK(e,t,o+1),i=r.depth>o&&XK(n,r,o+1),l=[];return JK(null,e,o,l),a&&i&&t.index(o)==n.index(o)?(YK(a,i),ZK(QK(a,eq(e,t,n,r,o+1)),l)):(a&&ZK(QK(a,tq(e,t,o+1)),l),JK(t,n,o,l),i&&ZK(QK(i,tq(n,r,o+1)),l)),JK(r,null,o,l),new VK(l)}function tq(e,t,n){let r=[];if(JK(null,e,n,r),e.depth>n){ZK(QK(XK(e,t,n+1),tq(e,t,n+1)),r)}return JK(t,null,n,r),new VK(r)}UK.empty=new UK(VK.empty,0,0);class nq{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let o=0;o<e;o++)r+=n.child(o).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return $K.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var a=0;a<o.length;a++)!1!==o[a].type.spec.inclusive||r&&o[a].isInSet(r.marks)||(o=o[a--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new iq(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let a=e;;){let{index:e,offset:t}=a.content.findIndex(o),i=o-t;if(n.push(a,e,r+t),!i)break;if(a=a.child(e),a.isText)break;o=i-1,r+=t+1}return new nq(t,n,o)}static resolveCached(e,t){let n=aq.get(e);if(n)for(let o=0;o<n.elts.length;o++){let e=n.elts[o];if(e.pos==t)return e}else aq.set(e,n=new rq);let r=n.elts[n.i]=nq.resolve(e,t);return n.i=(n.i+1)%oq,r}}class rq{constructor(){this.elts=[],this.i=0}}const oq=12,aq=new WeakMap;class iq{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const lq=Object.create(null);let sq=class e{constructor(e,t,n,r=$K.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||VK.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&zK(this.attrs,t||e.defaultAttrs||lq)&&$K.sameSet(this.marks,n||$K.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return UK.empty;let r=this.resolve(e),o=this.resolve(t),a=n?0:r.sharedDepth(t),i=r.start(a),l=r.node(a).content.cut(r.pos-i,o.pos-i);return new UK(l,r.depth-a,o.depth-a)}replace(e,t,n){return KK(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return nq.resolveCached(this,e)}resolveNoCache(e){return nq.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),uq(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=VK.empty,r=0,o=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,o),i=a&&a.matchFragment(this.content,t);if(!i||!i.validEnd)return!1;for(let l=r;l<o;l++)if(!this.type.allowsMarks(n.child(l).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),a=o&&o.matchFragment(this.content,t);return!!a&&a.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=$K.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];n.type.checkAttrs(n.attrs),e=n.addToSet(e)}if(!$K.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=VK.fromJSON(e,t.content),o=e.nodeType(t.type).create(t.attrs,r,n);return o.type.checkAttrs(o.attrs),o}};sq.prototype.text=void 0;class cq extends sq{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):uq(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new cq(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new cq(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function uq(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class dq{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new pq(e,t);if(null==n.next)return dq.empty;let r=fq(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(yq(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);yq(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let a=t[r.join(",")]=new dq(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(bq);a.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return a}}(function(e){let t=[[]];return o(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function a(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(a(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let i=n();return r(t,i),o(a(e.expr,i),i),[r(i)]}if("plus"==e.type){let i=n();return o(a(e.expr,t),i),o(a(e.expr,i),i),[r(i)]}if("opt"==e.type)return[r(t)].concat(a(e.expr,t));if("range"==e.type){let i=t;for(let t=0;t<e.min;t++){let t=n();o(a(e.expr,i),t),i=t}if(-1==e.max)o(a(e.expr,i),i);else for(let t=e.min;t<e.max;t++){let t=n();r(i,t),o(a(e.expr,i),t),i=t}return[r(i)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let i=a(e.exprs[r],t);if(r==e.exprs.length-1)return i;o(i,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:i}=e.next[t];a.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(i)&&r.push(i)}o&&t.err("Only non-generatable nodes ("+a.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return 0!=this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(a,i){let l=a.matchFragment(e,n);if(l&&(!t||l.validEnd))return VK.from(i.map((e=>e.createAndFill())));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,i.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let n=0;n<this.wrapCache.length;n+=2)if(this.wrapCache[n]==e)return this.wrapCache[n+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:a,next:i}=o.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!i.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let o=0;o<t.next.length;o++)r+=(o?", ":"")+t.next[o].type.name+"->"+e.indexOf(t.next[o].next);return r})).join("\n")}}dq.empty=new dq(!0);class pq{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function fq(e){let t=[];do{t.push(hq(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function hq(e){let t=[];do{t.push(mq(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function mq(e){let t=function(e){if(e.eat("(")){let t=fq(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let a in n){let e=n[a];e.groups.indexOf(t)>-1&&o.push(e)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=gq(e,t)}return t}function vq(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function gq(e,t){let n=vq(e),r=n;return e.eat(",")&&(r="}"!=e.next?vq(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function bq(e,t){return t-e}function yq(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:a}=o[e];r||-1!=n.indexOf(a)||t(a)}}(t),n.sort(bq)}function wq(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function kq(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function xq(e,t,n,r){for(let o in t)if(!(o in e))throw new RangeError(`Unsupported attribute ${o} for ${n} of type ${o}`);for(let o in e){let n=e[o];n.validate&&n.validate(t[o])}}function Eq(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Sq(e,r,t[r]);return n}let Cq=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Eq(e,n.attrs),this.defaultAttrs=wq(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==dq.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:kq(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new sq(this,this.computeAttrs(e),VK.from(t),$K.setFrom(n))}createChecked(e=null,t,n){return t=VK.from(t),this.checkContent(t),new sq(this,this.computeAttrs(e),t,$K.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=VK.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(VK.empty,!0);return o?new sq(this,e,t.append(o),$K.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let n=0;n<e.childCount;n++)if(!this.allowsMarks(e.child(n).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){xq(this.attrs,e,"node",this.name)}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:$K.none:e}static compile(t,n){let r=Object.create(null);t.forEach(((t,o)=>r[t]=new e(t,n,o)));let o=n.spec.topNode||"doc";if(!r[o])throw new RangeError("Schema is missing its top node type ('"+o+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let e in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Sq{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,"default"),this.default=n.default,this.validate="string"==typeof n.validate?function(e,t,n){let r=n.split("|");return n=>{let o=null===n?"null":typeof n;if(r.indexOf(o)<0)throw new RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${o}`)}}(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}}class Oq{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Eq(e,r.attrs),this.excluded=null;let o=wq(this.attrs);this.instance=o?new $K(this,o):null}create(e=null){return!e&&this.instance?this.instance:new $K(this,kq(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new Oq(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}checkAttrs(e){xq(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class _q{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=RK.from(e.nodes),t.marks=RK.from(e.marks||{}),this.nodes=Cq.compile(this.spec.nodes,this),this.marks=Oq.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let e=this.nodes[r],t=e.spec.content||"",o=e.spec.marks;if(e.contentMatch=n[t]||(n[t]=dq.parse(t,this.nodes)),e.inlineContent=e.contentMatch.inlineContent,e.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!e.isInline||!e.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=e}e.markSet="_"==o?null:o?Nq(this,o.split(" ")):""!=o&&e.inlineContent?null:[]}for(let r in this.marks){let e=this.marks[r],t=e.spec.excludes;e.excluded=null==t?[e]:""==t?[]:Nq(this,t.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Cq))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new cq(n,n.defaultAttrs,e,$K.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return sq.fromJSON(this,e)}markFromJSON(e){return $K.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Nq(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],a=e.marks[o],i=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(i=r)}if(!i)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Tq{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach((e=>{if(function(e){return null!=e.tag}(e))this.tags.push(e);else if(function(e){return null!=e.style}(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new Rq(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Rq(this,t,!0);return n.addAll(e,t.from,t.to),UK.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(Bq(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(0!=a.indexOf(e)||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(61!=a.charCodeAt(e.length)||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let r in e.marks){let t=e.marks[r].spec.parseDOM;t&&t.forEach((e=>{n(e=Dq(e)),e.mark||e.ignore||e.clearMark||(e.mark=r)}))}for(let r in e.nodes){let t=e.nodes[r].spec.parseDOM;t&&t.forEach((e=>{n(e=Dq(e)),e.node||e.ignore||e.mark||(e.node=r)}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Tq(e,Tq.schemaRules(e)))}}const Aq={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Mq={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Iq={ol:!0,ul:!0};function Pq(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class Lq{constructor(e,t,n,r,o,a,i){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=i,this.content=[],this.activeMarks=$K.none,this.stashMarks=[],this.match=a||(4&i?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(VK.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=VK.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(VK.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):Vq(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Aq.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Rq{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,a=Pq(null,t.preserveWhitespace,0)|(n?4:0);r=o?new Lq(o.type,o.attrs,$K.none,$K.none,!0,t.topMatch||o.type.contentMatch,a):new Lq(n?null:e.schema.topNodeType,null,$K.none,$K.none,!0,null,a),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){3==e.nodeType?this.addTextNode(e):1==e.nodeType&&this.addElement(e)}withStyleRules(e,t){let n=e.style;if(!n||!n.length)return t();let r=this.readStyles(e.style);if(!r)return;let[o,a]=r,i=this.top;for(let l=0;l<a.length;l++)this.removePendingMark(a[l],i);for(let l=0;l<o.length;l++)this.addPendingMark(o[l]);t();for(let l=0;l<o.length;l++)this.removePendingMark(o[l],i);for(let l=0;l<a.length;l++)this.addPendingMark(a[l])}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();Iq.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&Iq.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Mq.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,a=this.needsBlock;if(Aq.hasOwnProperty(r))n.content.length&&n.content[0].isInline&&this.open&&(this.open--,n=this.top),t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);o&&o.skip?this.addAll(e):this.withStyleRules(e,(()=>this.addAll(e))),t&&this.sync(n),this.needsBlock=a}else this.withStyleRules(e,(()=>{this.addElementByRule(e,o,!1===o.consuming?n:void 0)}))}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=$K.none,n=$K.none;if(e.length)for(let r=0;r<this.parser.matchedStyles.length;r++){let o=this.parser.matchedStyles[r],a=e.getPropertyValue(o);if(a)for(let e;;){let r=this.parser.matchStyle(o,a,this,e);if(!r)break;if(r.ignore)return null;if(r.clearMark?this.top.pendingMarks.concat(this.top.activeMarks).forEach((e=>{r.clearMark(e)&&(n=e.addToSet(n))})):t=this.parser.schema.marks[r.mark].create(r.attrs).addToSet(t),!1!==r.consuming)break;e=r}}return[t,n]}addElementByRule(e,t,n){let r,o,a;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{a=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(a)}let i=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(i)&&this.open--,a&&this.removePendingMark(a,i)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,a=null==n?null:e.childNodes[n];o!=a;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],a=o.findWrapping(e);if(a&&(!t||t.length>a.length)&&(t=a,n=o,!a.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let r=0;r<t.length;r++)this.enterInner(t[r],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let a=Pq(e,r,o.options);4&o.options&&0==o.content.length&&(a|=4),this.nodes.push(new Lq(e,t,o.activeMarks,o.pendingMarks,n,null,a)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),a=(e,i)=>{for(;e>=0;e--){let l=t[e];if(""==l){if(e==t.length-1||0==e)continue;for(;i>=o;i--)if(a(e-1,i))return!0;return!1}{let e=i>0||0==i&&r?this.nodes[i].type:n&&i>=o?n.node(i-o).type:null;if(!e||e.name!=l&&-1==e.groups.indexOf(l))return!1;i--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let t in this.parser.schema.nodes){let e=this.parser.schema.nodes[t];if(e.isTextblock&&e.defaultAttrs)return e}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function Bq(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Dq(e){let t={};for(let n in e)t[n]=e[n];return t}function Vq(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let a=[],i=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(a.indexOf(o)<0&&i(o))return!0}};if(i(o.contentMatch))return!0}}class jq{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=zq(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,a=0;for(;n<o.length&&a<e.marks.length;){let t=e.marks[a];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,a++}else a++}for(;n<o.length;)r=o.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],i=this.serializeMark(n,e.isInline,t);i&&(o.push([n,r]),r.appendChild(i.dom),r=i.contentDOM||i.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Uq(zq(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Uq(zq(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return Uq(e,t,n,r)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new jq(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Fq(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Fq(e.marks)}}function Fq(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function zq(e){return e.document||window.document}const $q=new WeakMap;function Hq(e){let t=$q.get(e);return void 0===t&&$q.set(e,t=function(e){let t=null;function n(e){if(e&&"object"==typeof e)if(Array.isArray(e))if("string"==typeof e[0])t||(t=[]),t.push(e);else for(let t=0;t<e.length;t++)n(e[t]);else for(let t in e)n(e[t])}return n(e),t}(e)),t}function Uq(e,t,n,r){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let o,a=t[0];if("string"!=typeof a)throw new RangeError("Invalid array passed to renderSpec");if(r&&(o=Hq(r))&&o.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let i,l=a.indexOf(" ");l>0&&(n=a.slice(0,l),a=a.slice(l+1));let s=n?e.createElementNS(n,a):e.createElement(a),c=t[1],u=1;if(c&&"object"==typeof c&&null==c.nodeType&&!Array.isArray(c)){u=2;for(let e in c)if(null!=c[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),c[e]):s.setAttribute(e,c[e])}}for(let d=u;d<t.length;d++){let o=t[d];if(0===o){if(d<t.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:a}=Uq(e,o,n,r);if(s.appendChild(t),a){if(i)throw new RangeError("Multiple content holes");i=a}}}return{dom:s,contentDOM:i}}const Wq=Math.pow(2,16);function Gq(e){return 65535&e}class Kq{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class qq{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&qq.empty)return qq.empty}recover(e){let t=0,n=Gq(e);if(!this.inverted)for(let r=0;r<n;r++)t+=this.ranges[3*r+2]-this.ranges[3*r+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/Wq}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let l=this.ranges[i]-(this.inverted?r:0);if(l>e)break;let s=this.ranges[i+o],c=this.ranges[i+a],u=l+s;if(e<=u){let o=l+r+((s?e==l?-1:e==u?1:t:t)<0?0:c);if(n)return o;let a=e==(t<0?l:u)?null:i/3+(e-l)*Wq,d=e==l?2:e==u?1:4;return(t<0?e!=l:e!=u)&&(d|=8),new Kq(o,d,a)}r+=c-s}return n?e+r:new Kq(e+r,0,null)}touches(e,t){let n=0,r=Gq(t),o=this.inverted?2:1,a=this.inverted?1:2;for(let i=0;i<this.ranges.length;i+=3){let t=this.ranges[i]-(this.inverted?n:0);if(t>e)break;let l=this.ranges[i+o];if(e<=t+l&&i==3*r)return!0;n+=this.ranges[i+a]-l}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let a=this.ranges[r],i=a-(this.inverted?o:0),l=a+(this.inverted?0:o),s=this.ranges[r+t],c=this.ranges[r+n];e(i,i+s,l,l+c),o+=c-s}}invert(){return new qq(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?qq.empty:new qq(e<0?[0,-e,0]:[0,0,e])}}qq.empty=new qq([]);class Yq{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new Yq(this.maps,this.mirror,e,t)}copy(){return new Yq(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new Yq;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let o=this.from;o<this.to;o++){let n=this.maps[o].mapResult(e,t);if(null!=n.recover){let t=this.getMirror(o);if(null!=t&&t>o&&t<this.to){o=t,e=this.maps[t].recover(n.recover);continue}}r|=n.delInfo,e=n.pos}return n?e:new Kq(e,r,null)}}const Xq=Object.create(null);class Zq{getMap(){return qq.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Xq[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Xq)throw new RangeError("Duplicate use of step JSON ID "+e);return Xq[e]=t,t.prototype.jsonID=e,t}}class Jq{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Jq(e,null)}static fail(e){return new Jq(null,e)}static fromReplace(e,t,n,r){try{return Jq.ok(e.replace(t,n,r))}catch(o){if(o instanceof HK)return Jq.fail(o.message);throw o}}}function Qq(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let a=e.child(o);a.content.size&&(a=a.copy(Qq(a.content,t,a))),a.isInline&&(a=t(a,n,o)),r.push(a)}return VK.fromArray(r)}class eY extends Zq{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new UK(Qq(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return Jq.fromReplace(e,this.from,this.to,o)}invert(){return new tY(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new eY(t.pos,n.pos,this.mark)}merge(e){return e instanceof eY&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new eY(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new eY(t.from,t.to,e.markFromJSON(t.mark))}}Zq.jsonID("addMark",eY);class tY extends Zq{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new UK(Qq(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return Jq.fromReplace(e,this.from,this.to,n)}invert(){return new eY(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new tY(t.pos,n.pos,this.mark)}merge(e){return e instanceof tY&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new tY(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new tY(t.from,t.to,e.markFromJSON(t.mark))}}Zq.jsonID("removeMark",tY);class nY extends Zq{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Jq.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return Jq.fromReplace(e,this.pos,this.pos+1,new UK(VK.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);if(t){let e=this.mark.addToSet(t.marks);if(e.length==t.marks.length){for(let n=0;n<t.marks.length;n++)if(!t.marks[n].isInSet(e))return new nY(this.pos,t.marks[n]);return new nY(this.pos,this.mark)}}return new rY(this.pos,this.mark)}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new nY(t.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new nY(t.pos,e.markFromJSON(t.mark))}}Zq.jsonID("addNodeMark",nY);class rY extends Zq{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return Jq.fail("No node at mark step's position");let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return Jq.fromReplace(e,this.pos,this.pos+1,new UK(VK.from(n),0,t.isLeaf?0:1))}invert(e){let t=e.nodeAt(this.pos);return t&&this.mark.isInSet(t.marks)?new nY(this.pos,this.mark):this}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new rY(t.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new rY(t.pos,e.markFromJSON(t.mark))}}Zq.jsonID("removeNodeMark",rY);class oY extends Zq{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&iY(e,this.from,this.to)?Jq.fail("Structure replace would overwrite content"):Jq.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new qq([this.from,this.to-this.from,this.slice.size])}invert(e){return new oY(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new oY(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof oY)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?UK.empty:new UK(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new oY(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?UK.empty:new UK(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new oY(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new oY(t.from,t.to,UK.fromJSON(e,t.slice),!!t.structure)}}Zq.jsonID("replace",oY);class aY extends Zq{constructor(e,t,n,r,o,a,i=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=a,this.structure=i}apply(e){if(this.structure&&(iY(e,this.from,this.gapFrom)||iY(e,this.gapTo,this.to)))return Jq.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Jq.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?Jq.fromReplace(e,this.from,this.to,n):Jq.fail("Content does not fit in gap")}getMap(){return new qq([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new aY(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=this.from==this.gapFrom?t.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?n.pos:e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new aY(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new aY(t.from,t.to,t.gapFrom,t.gapTo,UK.fromJSON(e,t.slice),t.insert,!!t.structure)}}function iY(e,t,n){let r=e.resolve(t),o=n-t,a=r.depth;for(;o>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,o--;if(o>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function lY(e,t,n,r=n.contentMatch,o=!0){let a=e.doc.nodeAt(t),i=[],l=t+1;for(let s=0;s<a.childCount;s++){let t=a.child(s),c=l+t.nodeSize,u=r.matchType(t.type);if(u){r=u;for(let r=0;r<t.marks.length;r++)n.allowsMarkType(t.marks[r].type)||e.step(new tY(l,c,t.marks[r]));if(o&&t.isText&&"pre"!=n.whitespace){let e,r,o=/\r?\n|\r/g;for(;e=o.exec(t.text);)r||(r=new UK(VK.from(n.schema.text(" ",n.allowedMarks(t.marks))),0,0)),i.push(new oY(l+e.index,l+e.index+e[0].length,r))}}else i.push(new oY(l,c,UK.empty));l=c}if(!r.validEnd){let t=r.fillBefore(VK.empty,!0);e.replace(l,l,new UK(t,0,0))}for(let s=i.length-1;s>=0;s--)e.step(i[s])}function sY(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function cY(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),a=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,a,t))return n;if(0==n||r.type.spec.isolating||!sY(r,o,a))break}return null}function uY(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let i=a.length?a[0]:t;return n.canReplaceWith(r,o,i)?a:null}(e,t),a=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,a=n.child(r),i=t.contentMatch.findWrapping(a.type);if(!i)return null;let l=(i.length?i[i.length-1]:t).contentMatch;for(let s=r;l&&s<o;s++)l=l.matchType(n.child(s).type);return l&&l.validEnd?i:null}(r,t);return a?o.map(dY).concat({type:t,attrs:n}).concat(a.map(dY)):null}function dY(e){return{type:e,attrs:null}}function pY(e,t,n=1,r){let o=e.resolve(t),a=o.depth-n,i=r&&r[r.length-1]||o.parent;if(a<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!i.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let c=o.depth-1,u=n-2;c>a;c--,u--){let e=o.node(c),t=o.index(c);if(e.type.spec.isolating)return!1;let n=e.content.cutByIndex(t,e.childCount),a=r&&r[u+1];a&&(n=n.replaceChild(0,a.type.create(a.attrs)));let i=r&&r[u]||e;if(!e.canReplace(t+1,e.childCount)||!i.type.validContent(n))return!1}let l=o.indexAfter(a),s=r&&r[0];return o.node(a).canReplaceWith(l,l,s?s.type:o.node(a+1).type)}function fY(e,t){let n=e.resolve(t),r=n.index();return hY(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function hY(e,t){return!(!e||!t||e.isLeaf||!e.canAppend(t))}function mY(e,t,n=-1){let r=e.resolve(t);for(let o=r.depth;;o--){let e,a,i=r.index(o);if(o==r.depth?(e=r.nodeBefore,a=r.nodeAfter):n>0?(e=r.node(o+1),i++,a=r.node(o).maybeChild(i)):(e=r.node(o).maybeChild(i-1),a=r.node(o+1)),e&&!e.isTextblock&&hY(e,a)&&r.node(o).canReplace(i,i+1))return t;if(0==o)break;t=n<0?r.before(o):r.after(o)}}function vY(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let a=0;a<n.openStart;a++)o=o.firstChild.content;for(let a=1;a<=(0==n.openStart&&n.size?2:1);a++)for(let e=r.depth;e>=0;e--){let t=e==r.depth?0:r.pos<=(r.start(e+1)+r.end(e+1))/2?-1:1,n=r.index(e)+(t>0?1:0),i=r.node(e),l=!1;if(1==a)l=i.canReplace(n,n,o);else{let e=i.contentMatchAt(n).findWrapping(o.firstChild.type);l=e&&i.canReplaceWith(n,n,e[0])}if(l)return 0==t?r.pos:t<0?r.before(e+1):r.after(e+1)}return null}function gY(e,t,n=t,r=UK.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),a=e.resolve(n);return bY(o,a,r)?new oY(t,n,r):new yY(o,a,r).fit()}function bY(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Zq.jsonID("replaceAround",aY);class yY{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=VK.empty;for(let r=0;r<=e.depth;r++){let t=e.node(r);this.frontier.push({type:t.type,match:t.contentMatchAt(e.indexAfter(r))})}for(let r=e.depth;r>0;r--)this.placed=VK.from(e.node(r).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,a=n.depth,i=r.depth;for(;a&&i&&1==o.childCount;)o=o.firstChild.content,a--,i--;let l=new UK(o,a,i);return e>-1?new aY(n.pos,e,this.$to.pos,this.$to.end(),l,t):l.size||n.pos!=this.$to.pos?new oY(n.pos,r.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let o=t.firstChild;if(t.childCount>1&&(r=0),o.type.spec.isolating&&r<=n){e=n;break}t=o.content}for(let t=1;t<=2;t++)for(let n=1==t?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=xY(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let o=e.firstChild;for(let a=this.depth;a>=0;a--){let e,{type:i,match:l}=this.frontier[a],s=null;if(1==t&&(o?l.matchType(o.type)||(s=l.fillBefore(VK.from(o),!1)):r&&i.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:a,parent:r,inject:s};if(2==t&&o&&(e=l.findWrapping(o.type)))return{sliceDepth:n,frontierDepth:a,parent:r,wrap:e};if(r&&l.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=xY(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new UK(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=xY(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new UK(wY(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new UK(wY(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let h=0;h<o.length;h++)this.openFrontierNode(o[h]);let a=this.unplaced,i=n?n.content:a.content,l=a.openStart-e,s=0,c=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let p=i.size+e-(a.content.size-a.openEnd);for(;s<i.childCount;){let e=i.child(s),t=u.matchType(e.type);if(!t)break;s++,(s>1||0==l||e.content.size)&&(u=t,c.push(EY(e.mark(d.allowedMarks(e.marks)),1==s?l:0,s==i.childCount?p:-1)))}let f=s==i.childCount;f||(p=-1),this.placed=kY(this.placed,t,VK.from(c)),this.frontier[t].match=u,f&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let h=0,m=i;h<p;h++){let e=m.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),m=e.content}this.unplaced=f?0==e?UK.empty:new UK(wY(a.content,e-1,1),e-1,p<0?a.openEnd:e-1):new UK(wY(a.content,e,s),a.openStart,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!CY(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=CY(e,t,r,n,o);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=CY(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:a,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=kY(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=kY(this.placed,this.depth,VK.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(VK.empty,!0);e.childCount&&(this.placed=kY(this.placed,this.frontier.length,e))}}function wY(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(wY(e.firstChild.content,t-1,n)))}function kY(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(kY(e.lastChild.content,t-1,n)))}function xY(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function EY(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,EY(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(VK.empty,!0)))),e.copy(r)}function CY(e,t,n,r,o){let a=e.node(t),i=o?e.indexAfter(t):e.index(t);if(i==a.childCount&&!n.compatibleContent(a.type))return null;let l=r.fillBefore(a.content,!0,i);return l&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,a.content,i)?l:null}function SY(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(SY(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(VK.empty,!0))}return e}function OY(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}class _Y extends Zq{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return Jq.fail("No node at attribute step's position");let n=Object.create(null);for(let o in t.attrs)n[o]=t.attrs[o];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return Jq.fromReplace(e,this.pos,this.pos+1,new UK(VK.from(r),0,t.isLeaf?0:1))}getMap(){return qq.empty}invert(e){return new _Y(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let t=e.mapResult(this.pos,1);return t.deletedAfter?null:new _Y(t.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,t){if("number"!=typeof t.pos||"string"!=typeof t.attr)throw new RangeError("Invalid input for AttrStep.fromJSON");return new _Y(t.pos,t.attr,t.value)}}Zq.jsonID("attr",_Y);class NY extends Zq{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let r in e.attrs)t[r]=e.attrs[r];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return Jq.ok(n)}getMap(){return qq.empty}invert(e){return new NY(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,t){if("string"!=typeof t.attr)throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new NY(t.attr,t.value)}}Zq.jsonID("docAttr",NY);let TY=class extends Error{};TY=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(TY.prototype=Object.create(Error.prototype)).constructor=TY,TY.prototype.name="TransformError";class AY{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Yq}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new TY(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=UK.empty){let r=gY(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new UK(VK.from(n),0,0))}delete(e,t){return this.replace(e,t,UK.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),a=e.doc.resolve(n);if(bY(o,a,r))return e.step(new oY(t,n,r));let i=OY(o,e.doc.resolve(n));0==i[i.length-1]&&i.pop();let l=-(o.depth+1);i.unshift(l);for(let f=o.depth,h=o.pos-1;f>0;f--,h--){let e=o.node(f).type.spec;if(e.defining||e.definingAsContext||e.isolating)break;i.indexOf(f)>-1?l=f:o.before(f)==h&&i.splice(1,0,-f)}let s=i.indexOf(l),c=[],u=r.openStart;for(let f=r.content,h=0;;h++){let e=f.firstChild;if(c.push(e),h==r.openStart)break;f=e.content}for(let f=u-1;f>=0;f--){let e=c[f],t=(d=e.type).spec.defining||d.spec.definingForContent;if(t&&!e.sameMarkup(o.node(Math.abs(l)-1)))u=f;else if(t||!e.type.isTextblock)break}var d;for(let f=r.openStart;f>=0;f--){let t=(f+u+1)%(r.openStart+1),l=c[t];if(l)for(let c=0;c<i.length;c++){let u=i[(c+s)%i.length],d=!0;u<0&&(d=!1,u=-u);let p=o.node(u-1),f=o.index(u-1);if(p.canReplaceWith(f,f,l.type,l.marks))return e.replace(o.before(u),d?a.after(u):n,new UK(SY(r.content,0,r.openStart,t),t,r.openEnd))}}let p=e.steps.length;for(let f=i.length-1;f>=0&&(e.replace(t,n,r),!(e.steps.length>p));f--){let e=i[f];e<0||(t=o.before(e),n=a.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let o=r.depth-1;o>=0;o--){let e=r.index(o);if(r.node(o).canReplaceWith(e,e,n))return r.before(o+1);if(e>0)return null}if(r.parentOffset==r.parent.content.size)for(let o=r.depth-1;o>=0;o--){let e=r.indexAfter(o);if(r.node(o).canReplaceWith(e,e,n))return r.after(o+1);if(e<r.node(o).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new UK(VK.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),a=OY(r,o);for(let i=0;i<a.length;i++){let t=a[i],n=i==a.length-1;if(n&&0==t||r.node(t).type.contentMatch.validEnd)return e.delete(r.start(t),o.end(t));if(t>0&&(n||r.node(t-1).canReplace(r.index(t-1),o.indexAfter(t-1))))return e.delete(r.before(t),o.after(t))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:a}=t,i=r.before(a+1),l=o.after(a+1),s=i,c=l,u=VK.empty,d=0;for(let h=a,m=!1;h>n;h--)m||r.index(h)>0?(m=!0,u=VK.from(r.node(h).copy(u)),d++):s--;let p=VK.empty,f=0;for(let h=a,m=!1;h>n;h--)m||o.after(h+1)<o.end(h)?(m=!0,p=VK.from(o.node(h).copy(p)),f++):c++;e.step(new aY(s,c,i,l,new UK(u.append(p),d,f),u.size-d,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new oY(t-n,t+n,UK.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=VK.empty;for(let i=n.length-1;i>=0;i--){if(r.size){let e=n[i].type.contentMatch.matchFragment(r);if(!e||!e.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=VK.from(n[i].type.create(n[i].attrs,r))}let o=t.start,a=t.end;e.step(new aY(o,a,o,a,new UK(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let a=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e="pre"==r.whitespace,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}!1===i&&function(e,t,n,r){t.forEach(((o,a)=>{if(o.type==o.type.schema.linebreakReplacement){let o=e.mapping.slice(r).map(n+1+a);e.replaceWith(o,o+1,t.type.schema.text("\n"))}}))}(e,t,n,a),lY(e,e.mapping.slice(a).map(n,1),r,void 0,null===i);let l=e.mapping.slice(a),s=l.map(n,1),c=l.map(n+t.nodeSize,1);return e.step(new aY(s,c,s+1,c-1,new UK(VK.from(r.create(o,null,t.marks)),0,0),1,!0)),!0===i&&function(e,t,n,r){t.forEach(((o,a)=>{if(o.isText){let i,l=/\r?\n|\r/g;for(;i=l.exec(o.text);){let o=e.mapping.slice(r).map(n+1+a+i.index);e.replaceWith(o,o+1,t.type.schema.linebreakReplacement.create())}}}))}(e,t,n,a),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return function(e,t,n,r,o){let a=e.doc.nodeAt(t);if(!a)throw new RangeError("No node at given position");n||(n=a.type);let i=n.create(r,null,o||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,i);if(!n.validContent(a.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new aY(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new UK(VK.from(i),0,0),1,!0))}(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new _Y(e,t,n)),this}setDocAttribute(e,t){return this.step(new NY(e,t)),this}addNodeMark(e,t){return this.step(new nY(e,t)),this}removeNodeMark(e,t){if(!(t instanceof $K)){let n=this.doc.nodeAt(e);if(!n)throw new RangeError("No node at position "+e);if(!(t=t.isInSet(n.marks)))return this}return this.step(new rY(e,t)),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),a=VK.empty,i=VK.empty;for(let l=o.depth,s=o.depth-n,c=n-1;l>s;l--,c--){a=VK.from(o.node(l).copy(a));let e=r&&r[c];i=VK.from(e?e.type.create(e.attrs,i):o.node(l).copy(i))}e.step(new oY(t,t,new UK(a.append(i),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,a,i=[],l=[];e.doc.nodesBetween(t,n,((e,s,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(s,t),d=Math.min(s+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:i.push(o=new tY(c,d,u[e])));a&&a.to==c?a.to=d:l.push(a=new eY(c,d,r))}})),i.forEach((t=>e.step(t))),l.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],a=0;e.doc.nodesBetween(t,n,((e,i)=>{if(!e.isInline)return;a++;let l=null;if(r instanceof Oq){let t,n=e.marks;for(;t=r.isInSet(n);)(l||(l=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(l=[r]):l=e.marks;if(l&&l.length){let r=Math.min(i+e.nodeSize,n);for(let e=0;e<l.length;e++){let n,s=l[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==a-1&&s.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=a):o.push({style:s,from:Math.max(i,t),to:r,step:a})}}})),o.forEach((t=>e.step(new tY(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return lY(this,e,t,n),this}}const MY=Object.create(null);let IY=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new PY(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=UK.empty){let n=t.content.lastChild,r=null;for(let i=0;i<t.openEnd;i++)r=n,n=n.lastChild;let o=e.steps.length,a=this.ranges;for(let i=0;i<a.length;i++){let{$from:l,$to:s}=a[i],c=e.mapping.slice(o);e.replaceRange(c.map(l.pos),c.map(s.pos),i?UK.empty:t),0==i&&HY(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:a,$to:i}=r[o],l=e.mapping.slice(n),s=l.map(a.pos),c=l.map(i.pos);o?e.deleteRange(s,c):(e.replaceRangeWith(s,c,t),HY(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new BY(e):$Y(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let o=e.depth-1;o>=0;o--){let r=t<0?$Y(e.node(0),e.node(o),e.before(o+1),e.index(o),t,n):$Y(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,t,n);if(r)return r}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new FY(e.node(0))}static atStart(e){return $Y(e,e,0,0,1)||new FY(e)}static atEnd(e){return $Y(e,e,e.content.size,e.childCount,-1)||new FY(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=MY[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in MY)throw new RangeError("Duplicate use of selection JSON ID "+e);return MY[e]=t,t.prototype.jsonID=e,t}getBookmark(){return BY.between(this.$anchor,this.$head).getBookmark()}};IY.prototype.visible=!0;class PY{constructor(e,t){this.$from=e,this.$to=t}}let LY=!1;function RY(e){LY||e.parent.inlineContent||(LY=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class BY extends IY{constructor(e,t=e){RY(e),RY(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return IY.near(n);let r=e.resolve(t.map(this.anchor));return new BY(r.parent.inlineContent?r:n,n)}replace(e,t=UK.empty){if(super.replace(e,t),t==UK.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof BY&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new DY(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new BY(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=IY.findFrom(t,n,!0)||IY.findFrom(t,-n,!0);if(!e)return IY.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(IY.findFrom(e,-n,!0)||IY.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new BY(e,t)}}IY.jsonID("text",BY);class DY{constructor(e,t){this.anchor=e,this.head=t}map(e){return new DY(e.map(this.anchor),e.map(this.head))}resolve(e){return BY.between(e.resolve(this.anchor),e.resolve(this.head))}}class VY extends IY{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?IY.near(o):new VY(o)}content(){return new UK(VK.from(this.node),0,0)}eq(e){return e instanceof VY&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new jY(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new VY(e.resolve(t.anchor))}static create(e,t){return new VY(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}VY.prototype.visible=!1,IY.jsonID("node",VY);class jY{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new DY(n,n):new jY(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&VY.isSelectable(n)?new VY(t):IY.near(t)}}class FY extends IY{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=UK.empty){if(t==UK.empty){e.delete(0,e.doc.content.size);let t=IY.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new FY(e)}map(e){return new FY(e)}eq(e){return e instanceof FY}getBookmark(){return zY}}IY.jsonID("all",FY);const zY={map(){return this},resolve:e=>new FY(e)};function $Y(e,t,n,r,o,a=!1){if(t.inlineContent)return BY.create(e,n);for(let i=r-(o>0?0:1);o>0?i<t.childCount:i>=0;i+=o){let r=t.child(i);if(r.isAtom){if(!a&&VY.isSelectable(r))return VY.create(e,n-(o<0?r.nodeSize:0))}else{let t=$Y(e,r,n+o,o<0?r.childCount:0,o,a);if(t)return t}n+=r.nodeSize*o}return null}function HY(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,a=e.steps[r];(a instanceof oY||a instanceof aY)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(IY.near(e.doc.resolve(o),n)))}class UY extends AY{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=-3&this.updated|1,this.storedMarks=null,this}get selectionSet(){return(1&this.updated)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=2,this}ensureMarks(e){return $K.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(2&this.updated)>0}addStep(e,t){super.addStep(e,t),this.updated=-3&this.updated,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||$K.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(null==t)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(null==n&&(n=t),n=null==n?t:n,!e)return this.deleteRange(t,n);let o=this.storedMarks;if(!o){let e=this.doc.resolve(t);o=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,o)),this.selection.empty||this.setSelection(IY.near(this.selection.$to)),this}}setMeta(e,t){return this.meta["string"==typeof e?e:e.key]=t,this}getMeta(e){return this.meta["string"==typeof e?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=4,this}get scrolledIntoView(){return(4&this.updated)>0}}function WY(e,t){return t&&e?e.bind(t):e}class GY{constructor(e,t,n){this.name=e,this.init=WY(t.init,n),this.apply=WY(t.apply,n)}}const KY=[new GY("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new GY("selection",{init:(e,t)=>e.selection||IY.atStart(t.doc),apply:e=>e.selection}),new GY("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new GY("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class qY{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=KY.slice(),t&&t.forEach((e=>{if(this.pluginsByKey[e.key])throw new RangeError("Adding different instances of a keyed plugin ("+e.key+")");this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new GY(e.key,e.spec.state,e))}))}}class YY{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let o=!1;for(let a=0;a<this.config.plugins.length;a++){let i=this.config.plugins[a];if(i.spec.appendTransaction){let l=r?r[a].n:0,s=r?r[a].state:this,c=l<t.length&&i.spec.appendTransaction.call(i,l?t.slice(l):t,s,n);if(c&&n.filterTransaction(c,a)){if(c.setMeta("appendedTransaction",e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(c),n=n.applyInner(c),o=!0}r&&(r[a]={state:n,n:t.length})}}if(!o)return{state:n,transactions:t}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let t=new YY(this.config),n=this.config.fields;for(let r=0;r<n.length;r++){let o=n[r];t[o.name]=o.apply(e,this[o.name],this,t)}return t}get tr(){return new UY(this)}static create(e){let t=new qY(e.doc?e.doc.type.schema:e.schema,e.plugins),n=new YY(t);for(let r=0;r<t.fields.length;r++)n[t.fields[r].name]=t.fields[r].init(e,n);return n}reconfigure(e){let t=new qY(this.schema,e.plugins),n=t.fields,r=new YY(t);for(let o=0;o<n.length;o++){let t=n[o].name;r[t]=this.hasOwnProperty(t)?this[t]:n[o].init(e,r)}return r}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map((e=>e.toJSON()))),e&&"object"==typeof e)for(let n in e){if("doc"==n||"selection"==n)throw new RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],o=r.spec.state;o&&o.toJSON&&(t[n]=o.toJSON.call(r,this[r.key]))}return t}static fromJSON(e,t,n){if(!t)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let r=new qY(e.schema,e.plugins),o=new YY(r);return r.fields.forEach((r=>{if("doc"==r.name)o.doc=sq.fromJSON(e.schema,t.doc);else if("selection"==r.name)o.selection=IY.fromJSON(o.doc,t.selection);else if("storedMarks"==r.name)t.storedMarks&&(o.storedMarks=t.storedMarks.map(e.schema.markFromJSON));else{if(n)for(let a in n){let i=n[a],l=i.spec.state;if(i.key==r.name&&l&&l.fromJSON&&Object.prototype.hasOwnProperty.call(t,a))return void(o[r.name]=l.fromJSON.call(i,e,t[a],o))}o[r.name]=r.init(e,o)}})),o}}function XY(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=XY(o,t,{})),n[r]=o}return n}class ZY{constructor(e){this.spec=e,this.props={},e.props&&XY(e.props,this,this.props),this.key=e.key?e.key.key:QY("plugin")}getState(e){return e[this.key]}}const JY=Object.create(null);function QY(e){return e in JY?e+"$"+ ++JY[e]:(JY[e]=0,e+"$")}class eX{constructor(e="key"){this.key=QY(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const tX=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},nX=function(e){let t=e.assignedSlot||e.parentNode;return t&&11==t.nodeType?t.host:t};let rX=null;const oX=function(e,t,n){let r=rX||(rX=document.createRange());return r.setEnd(e,null==n?e.nodeValue.length:n),r.setStart(e,t||0),r},aX=function(e,t,n,r){return n&&(lX(e,t,n,r,-1)||lX(e,t,n,r,1))},iX=/^(img|br|input|textarea|hr)$/i;function lX(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:sX(e))){let n=e.parentNode;if(!n||1!=n.nodeType||cX(e)||iX.test(e.nodeName)||"false"==e.contentEditable)return!1;t=tX(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?sX(e):0}}}function sX(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function cX(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const uX=function(e){return e.focusNode&&aX(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function dX(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const pX="undefined"!=typeof navigator?navigator:null,fX="undefined"!=typeof document?document:null,hX=pX&&pX.userAgent||"",mX=/Edge\/(\d+)/.exec(hX),vX=/MSIE \d/.exec(hX),gX=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(hX),bX=!!(vX||gX||mX),yX=vX?document.documentMode:gX?+gX[1]:mX?+mX[1]:0,wX=!bX&&/gecko\/(\d+)/i.test(hX);wX&&(/Firefox\/(\d+)/.exec(hX)||[0,0])[1];const kX=!bX&&/Chrome\/(\d+)/.exec(hX),xX=!!kX,EX=kX?+kX[1]:0,CX=!bX&&!!pX&&/Apple Computer/.test(pX.vendor),SX=CX&&(/Mobile\/\w+/.test(hX)||!!pX&&pX.maxTouchPoints>2),OX=SX||!!pX&&/Mac/.test(pX.platform),_X=!!pX&&/Win/.test(pX.platform),NX=/Android \d/.test(hX),TX=!!fX&&"webkitFontSmoothing"in fX.documentElement.style,AX=TX?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function MX(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function IX(e,t){return"number"==typeof e?e:e[t]}function PX(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function LX(e,t,n){let r=e.someProp("scrollThreshold")||0,o=e.someProp("scrollMargin")||5,a=e.dom.ownerDocument;for(let i=n||e.dom;i;i=nX(i)){if(1!=i.nodeType)continue;let e=i,n=e==a.body,l=n?MX(a):PX(e),s=0,c=0;if(t.top<l.top+IX(r,"top")?c=-(l.top-t.top+IX(o,"top")):t.bottom>l.bottom-IX(r,"bottom")&&(c=t.bottom-t.top>l.bottom-l.top?t.top+IX(o,"top")-l.top:t.bottom-l.bottom+IX(o,"bottom")),t.left<l.left+IX(r,"left")?s=-(l.left-t.left+IX(o,"left")):t.right>l.right-IX(r,"right")&&(s=t.right-l.right+IX(o,"right")),s||c)if(n)a.defaultView.scrollBy(s,c);else{let n=e.scrollLeft,r=e.scrollTop;c&&(e.scrollTop+=c),s&&(e.scrollLeft+=s);let o=e.scrollLeft-n,a=e.scrollTop-r;t={left:t.left-o,top:t.top-a,right:t.right-o,bottom:t.bottom-a}}if(n||/^(fixed|sticky)$/.test(getComputedStyle(i).position))break}}function RX(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=nX(r));return t}function BX(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:o,left:a}=e[n];r.scrollTop!=o+t&&(r.scrollTop=o+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}let DX=null;function VX(e,t){let n,r,o,a,i=2e8,l=0,s=t.top,c=t.top;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(1==u.nodeType)e=u.getClientRects();else{if(3!=u.nodeType)continue;e=oX(u).getClientRects()}for(let p=0;p<e.length;p++){let f=e[p];if(f.top<=s&&f.bottom>=c){s=Math.max(f.bottom,s),c=Math.min(f.top,c);let e=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(e<i){n=u,i=e,r=e&&3==n.nodeType?{left:f.right<t.left?f.right:f.left,top:t.top}:t,1==u.nodeType&&e&&(l=d+(t.left>=(f.left+f.right)/2?1:0));continue}}else f.top>t.top&&!o&&f.left<=t.left&&f.right>=t.left&&(o=u,a={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(l=d+1)}}return!n&&o&&(n=o,r=a,i=0),n&&3==n.nodeType?function(e,t){let n=e.nodeValue.length,r=document.createRange();for(let o=0;o<n;o++){r.setEnd(e,o+1),r.setStart(e,o);let n=HX(r,1);if(n.top!=n.bottom&&jX(t,n))return{node:e,offset:o+(t.left>=(n.left+n.right)/2?1:0)}}return{node:e,offset:0}}(n,r):!n||i&&1==n.nodeType?{node:e,offset:l}:VX(n,r)}function jX(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function FX(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let o=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=o;;){let n=e.childNodes[a];if(1==n.nodeType){let e=n.getClientRects();for(let r=0;r<e.length;r++){let o=e[r];if(jX(t,o))return FX(n,t,o)}}if((a=(a+1)%r)==o)break}return e}function zX(e,t){let n,r=e.dom.ownerDocument,o=0,a=function(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:r.offset}}catch(r){}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:r.startOffset}}}(r,t.left,t.top);a&&({node:n,offset:o}=a);let i,l=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!l||!e.dom.contains(1!=l.nodeType?l.parentNode:l)){let n=e.dom.getBoundingClientRect();if(!jX(t,n))return null;if(l=FX(e.dom,t,n),!l)return null}if(CX)for(let c=l;n&&c;c=nX(c))c.draggable&&(n=void 0);if(l=function(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}(l,t),n){if(wX&&1==n.nodeType&&(o=Math.min(o,n.childNodes.length),o<n.childNodes.length)){let e,r=n.childNodes[o];"IMG"==r.nodeName&&(e=r.getBoundingClientRect()).right<=t.left&&e.bottom>t.top&&o++}let r;TX&&o&&1==n.nodeType&&1==(r=n.childNodes[o-1]).nodeType&&"false"==r.contentEditable&&r.getBoundingClientRect().top>=t.top&&o--,n==e.dom&&o==n.childNodes.length-1&&1==n.lastChild.nodeType&&t.top>n.lastChild.getBoundingClientRect().bottom?i=e.state.doc.content.size:0!=o&&1==n.nodeType&&"BR"==n.childNodes[o-1].nodeName||(i=function(e,t,n,r){let o=-1;for(let a=t,i=!1;a!=e.dom;){let t=e.docView.nearestDesc(a,!0);if(!t)return null;if(1==t.dom.nodeType&&(t.node.isBlock&&t.parent||!t.contentDOM)){let e=t.dom.getBoundingClientRect();if(t.node.isBlock&&t.parent&&(!i&&e.left>r.left||e.top>r.top?o=t.posBefore:(!i&&e.right<r.left||e.bottom<r.top)&&(o=t.posAfter),i=!0),!t.contentDOM&&o<0&&!t.node.isText)return(t.node.isBlock?r.top<(e.top+e.bottom)/2:r.left<(e.left+e.right)/2)?t.posBefore:t.posAfter}a=t.dom.parentNode}return o>-1?o:e.docView.posFromDOM(t,n,-1)}(e,n,o,t))}null==i&&(i=function(e,t,n){let{node:r,offset:o}=VX(t,n),a=-1;if(1==r.nodeType&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,o,a)}(e,l,t));let s=e.docView.nearestDesc(l,!0);return{pos:i,inside:s?s.posAtStart-s.border:-1}}function $X(e){return e.top<e.bottom||e.left<e.right}function HX(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if($X(e))return e}return Array.prototype.find.call(n,$X)||e.getBoundingClientRect()}const UX=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function WX(e,t,n){let{node:r,offset:o,atom:a}=e.docView.domFromPos(t,n<0?-1:1),i=TX||wX;if(3==r.nodeType){if(!i||!UX.test(r.nodeValue)&&(n<0?o:o!=r.nodeValue.length)){let e=o,t=o,a=n<0?1:-1;return n<0&&!o?(t++,a=-1):n>=0&&o==r.nodeValue.length?(e--,a=1):n<0?e--:t++,GX(HX(oX(r,e,t),a),a<0)}{let e=HX(oX(r,o,o),n);if(wX&&o&&/\s/.test(r.nodeValue[o-1])&&o<r.nodeValue.length){let t=HX(oX(r,o-1,o-1),-1);if(t.top==e.top){let n=HX(oX(r,o,o+1),-1);if(n.top!=e.top)return GX(n,n.left<t.left)}}return e}}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(null==a&&o&&(n<0||o==sX(r))){let e=r.childNodes[o-1];if(1==e.nodeType)return KX(e.getBoundingClientRect(),!1)}if(null==a&&o<sX(r)){let e=r.childNodes[o];if(1==e.nodeType)return KX(e.getBoundingClientRect(),!0)}return KX(r.getBoundingClientRect(),n>=0)}if(null==a&&o&&(n<0||o==sX(r))){let e=r.childNodes[o-1],t=3==e.nodeType?oX(e,sX(e)-(i?0:1)):1!=e.nodeType||"BR"==e.nodeName&&e.nextSibling?null:e;if(t)return GX(HX(t,1),!1)}if(null==a&&o<sX(r)){let e=r.childNodes[o];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?3==e.nodeType?oX(e,0,i?0:1):1==e.nodeType?e:null:null;if(t)return GX(HX(t,-1),!0)}return GX(HX(3==r.nodeType?oX(r):r,-n),n>=0)}function GX(e,t){if(0==e.width)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function KX(e,t){if(0==e.height)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function qX(e,t,n){let r=e.state,o=e.root.activeElement;r!=t&&e.updateState(t),o!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),o!=e.dom&&o&&o.focus()}}const YX=/[\u0590-\u08ac]/;let XX=null,ZX=null,JX=!1;function QX(e,t,n){return XX==t&&ZX==n?JX:(XX=t,ZX=n,JX="up"==n||"down"==n?function(e,t,n){let r=t.selection,o="up"==n?r.$from:r.$to;return qX(e,t,(()=>{let{node:t}=e.docView.domFromPos(o.pos,"up"==n?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=WX(e,o.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(1==e.nodeType)t=e.getClientRects();else{if(3!=e.nodeType)continue;t=oX(e,0,e.nodeValue.length).getClientRects()}for(let e=0;e<t.length;e++){let o=t[e];if(o.bottom>o.top+1&&("up"==n?r.top-o.top>2*(o.bottom-r.top):o.bottom-r.bottom>2*(r.bottom-o.top)))return!1}}return!0}))}(e,t,n):function(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let o=r.parentOffset,a=!o,i=o==r.parent.content.size,l=e.domSelection();return YX.test(r.parent.textContent)&&l.modify?qX(e,t,(()=>{let{focusNode:t,focusOffset:o,anchorNode:a,anchorOffset:i}=e.domSelectionRange(),s=l.caretBidiLevel;l.modify("move",n,"character");let c=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),p=u&&!c.contains(1==u.nodeType?u:u.parentNode)||t==u&&o==d;try{l.collapse(a,i),t&&(t!=a||o!=i)&&l.extend&&l.extend(t,o)}catch(f){}return null!=s&&(l.caretBidiLevel=s),p})):"left"==n||"backward"==n?a:i}(e,t,n))}class eZ{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=0,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&this.contentDOM.contains(1==e.nodeType?e:e.parentNode)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&(!(r=n.pmViewDesc)||r.parent!=this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>tX(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))r=2&e.compareDocumentPosition(this.contentDOM);else if(this.dom.firstChild){if(0==t)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(null==r&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return(null==r?n>0:r)?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let o,a=this.getDesc(r);if(a&&(!t||a.node)){if(!n||!(o=a.nodeDOM)||(1==o.nodeType?o.contains(1==e.nodeType?e:e.parentNode):o==e))return a;n=!1}}}getDesc(e){let t=e.pmViewDesc;for(let n=t;n;n=n.parent)if(n==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let o=this.getDesc(r);if(o)return o.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],o=n+r.size;if(n==e&&o!=n){for(;!r.border&&r.children.length;)r=r.children[0];return r}if(e<o)return r.descAt(e-n-r.border);n=o}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let o=0;n<this.children.length;n++){let t=this.children[n],a=o+t.size;if(a>e||t instanceof lZ){r=e-o;break}o=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(let o;n&&!(o=this.children[n-1]).size&&o instanceof tZ&&o.side>=0;n--);if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?tX(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?tX(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(0==this.children.length)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,o=-1;for(let a=n,i=0;;i++){let n=this.children[i],l=a+n.size;if(-1==r&&e<=l){let o=a+n.border;if(e>=o&&t<=l-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,o);e=a;for(let t=i;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=tX(n.dom)+1;break}e-=n.size}-1==r&&(r=0)}if(r>-1&&(l>t||i==this.children.length-1)){t=l;for(let e=i+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){o=tX(n.dom);break}t+=n.size}-1==o&&(o=this.contentDOM.childNodes.length);break}a=l}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return 0==t.size||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(1!=t.nodeType||n==t.childNodes.length)throw new RangeError("No node after pos "+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let o=Math.min(e,t),a=Math.max(e,t);for(let p=0,f=0;p<this.children.length;p++){let i=this.children[p],l=f+i.size;if(o>f&&a<l)return i.setSelection(e-f-i.border,t-f-i.border,n,r);f=l}let i=this.domFromPos(e,e?-1:1),l=t==e?i:this.domFromPos(t,t?-1:1),s=n.getSelection(),c=!1;if((wX||CX)&&e==t){let{node:e,offset:t}=i;if(3==e.nodeType){if(c=!(!t||"\n"!=e.nodeValue[t-1]),c&&t==e.nodeValue.length)for(let n,r=e;r;r=r.parentNode){if(n=r.nextSibling){"BR"==n.nodeName&&(i=l={node:n.parentNode,offset:tX(n)+1});break}let e=r.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];c=n&&("BR"==n.nodeName||"false"==n.contentEditable)}}if(wX&&s.focusNode&&s.focusNode!=l.node&&1==s.focusNode.nodeType){let e=s.focusNode.childNodes[s.focusOffset];e&&"false"==e.contentEditable&&(r=!0)}if(!(r||c&&CX)&&aX(i.node,i.offset,s.anchorNode,s.anchorOffset)&&aX(l.node,l.offset,s.focusNode,s.focusOffset))return;let u=!1;if((s.extend||e==t)&&!c){s.collapse(i.node,i.offset);try{e!=t&&s.extend(l.node,l.offset),u=!0}catch(d){}}if(!u){if(e>t){let e=i;i=l,l=e}let n=document.createRange();n.setEnd(l.node,l.offset),n.setStart(i.node,i.offset),s.removeAllRanges(),s.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&"selection"!=e.type}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let o=this.children[r],a=n+o.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+o.border,i=a-o.border;if(e>=r&&t<=i)return this.dirty=e==n||t==a?2:1,void(e!=r||t!=i||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(e-r,t-r):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}n=a}this.dirty=2}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=1==e?2:1;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class tZ extends eZ{constructor(e,t,n,r){let o,a=t.type.toDOM;if("function"==typeof a&&(a=a(n,(()=>o?o.parent?o.parent.posBeforeChild(o):void 0:r))),!t.type.spec.raw){if(1!=a.nodeType){let e=document.createElement("span");e.appendChild(a),a=e}a.contentEditable="false",a.classList.add("ProseMirror-widget")}super(e,[],a,null),this.widget=t,this.widget=t,o=this}matchesWidget(e){return 0==this.dirty&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return!!t&&t(e)}ignoreMutation(e){return"selection"!=e.type||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class nZ extends eZ{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e!=this.textDOM?this.posAtStart+(t?this.size:0):this.posAtStart+t}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return"characterData"===e.type&&e.target.nodeValue==e.oldValue}}class rZ extends eZ{constructor(e,t,n,r){super(e,[],n,r),this.mark=t}static create(e,t,n,r){let o=r.nodeViews[t.type.name],a=o&&o(t,r,n);return a&&a.dom||(a=jq.renderSpec(document,t.type.spec.toDOM(t,n),null,t.attrs)),new rZ(e,t,a.dom,a.contentDOM||a.dom)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return 3!=this.dirty&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),0!=this.dirty){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=0}}slice(e,t,n){let r=rZ.create(this.parent,this.mark,!0,n),o=this.children,a=this.size;t<a&&(o=wZ(o,t,a,n)),e>0&&(o=wZ(o,0,e,n));for(let i=0;i<o.length;i++)o[i].parent=r;return r.children=o,r}}class oZ extends eZ{constructor(e,t,n,r,o,a,i,l,s){super(e,[],o,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=i}static create(e,t,n,r,o,a){let i,l=o.nodeViews[t.type.name],s=l&&l(t,o,(()=>i?i.parent?i.parent.posBeforeChild(i):void 0:a),n,r),c=s&&s.dom,u=s&&s.contentDOM;if(t.isText)if(c){if(3!=c.nodeType)throw new RangeError("Text must be rendered as a DOM text node")}else c=document.createTextNode(t.text);else if(!c){let e=jq.renderSpec(document,t.type.spec.toDOM(t),null,t.attrs);({dom:c,contentDOM:u}=e)}u||t.isText||"BR"==c.nodeName||(c.hasAttribute("contenteditable")||(c.contentEditable="false"),t.type.spec.draggable&&(c.draggable=!0));let d=c;return c=mZ(c,n,t),s?i=new sZ(e,t,n,r,c,u||null,d,s,o,a+1):t.isText?new iZ(e,t,n,r,c,d,o):new oZ(e,t,n,r,c,u||null,d,o,a+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if("pre"==this.node.type.whitespace&&(e.preserveWhitespace="full"),this.contentDOM)if(this.contentLost){for(let t=this.children.length-1;t>=0;t--){let n=this.children[t];if(this.dom.contains(n.dom.parentNode)){e.contentElement=n.dom.parentNode;break}}e.contentElement||(e.getContent=()=>VK.empty)}else e.contentElement=this.contentDOM;else e.getContent=()=>this.node.content;return e}matchesNode(e,t,n){return 0==this.dirty&&e.eq(this.node)&&vZ(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,t){let n=this.node.inlineContent,r=t,o=e.composing?this.localCompositionInfo(e,t):null,a=o&&o.pos>-1?o:null,i=o&&o.pos<0,l=new bZ(this,a&&a.node,e);!function(e,t,n,r){let o=t.locals(e),a=0;if(0==o.length){for(let n=0;n<e.childCount;n++){let i=e.child(n);r(i,o,t.forChild(a,i),n),a+=i.nodeSize}return}let i=0,l=[],s=null;for(let c=0;;){let u,d,p,f;for(;i<o.length&&o[i].to==a;){let e=o[i++];e.widget&&(u?(d||(d=[u])).push(e):u=e)}if(u)if(d){d.sort(yZ);for(let e=0;e<d.length;e++)n(d[e],c,!!s)}else n(u,c,!!s);if(s)f=-1,p=s,s=null;else{if(!(c<e.childCount))break;f=c,p=e.child(c++)}for(let e=0;e<l.length;e++)l[e].to<=a&&l.splice(e--,1);for(;i<o.length&&o[i].from<=a&&o[i].to>a;)l.push(o[i++]);let h=a+p.nodeSize;if(p.isText){let e=h;i<o.length&&o[i].from<e&&(e=o[i].from);for(let t=0;t<l.length;t++)l[t].to<e&&(e=l[t].to);e<h&&(s=p.cut(e-a),p=p.cut(0,e-a),h=e,f=-1)}else for(;i<o.length&&o[i].to<h;)i++;r(p,p.isInline&&!p.isLeaf?l.filter((e=>!e.inline)):l.slice(),t.forChild(a,p),f),a=h}}(this.node,this.innerDeco,((t,o,a)=>{t.spec.marks?l.syncToMarks(t.spec.marks,n,e):t.type.side>=0&&!a&&l.syncToMarks(o==this.node.childCount?$K.none:this.node.child(o).marks,n,e),l.placeWidget(t,e,r)}),((t,a,s,c)=>{let u;l.syncToMarks(t.marks,n,e),l.findNodeMatch(t,a,s,c)||i&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(u=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(t,a,s,u,e)||l.updateNextNode(t,a,s,e,c,r)||l.addNode(t,a,s,e,r),r+=t.nodeSize})),l.syncToMarks([],n,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||2==this.dirty)&&(a&&this.protectLocalComposition(e,a),cZ(this.contentDOM,this.children,e),SX&&function(e){if("UL"==e.nodeName||"OL"==e.nodeName){let t=e.style.cssText;e.style.cssText=t+"; list-style: square !important",window.getComputedStyle(e).listStyle,e.style.cssText=t}}(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof BY)||n<t||r>t+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let e=o.nodeValue,a=function(e,t,n,r){for(let o=0,a=0;o<e.childCount&&a<=r;){let i=e.child(o++),l=a;if(a+=i.nodeSize,!i.isText)continue;let s=i.text;for(;o<e.childCount;){let t=e.child(o++);if(a+=t.nodeSize,!t.isText)break;s+=t.text}if(a>=n){if(a>=r&&s.slice(r-t.length-l,r-l)==t)return r-t.length;let e=l<r?s.lastIndexOf(t,r-l-1):-1;if(e>=0&&e+t.length+l>=n)return l+e;if(n==r&&s.length>=r+t.length-l&&s.slice(r-l,r-l+t.length)==t)return r}}return-1}(this.node.content,e,n-t,r-t);return a<0?null:{node:o,pos:a,text:e}}return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let o=t;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let a=new nZ(this,o,t,r);e.input.compositionNodes.push(a),this.children=wZ(this.children,n,n+r.length,e,a)}update(e,t,n,r){return!(3==this.dirty||!e.sameMarkup(this.node))&&(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=0}updateOuterDeco(e){if(vZ(e,this.outerDeco))return;let t=1!=this.nodeDOM.nodeType,n=this.dom;this.dom=fZ(this.dom,this.nodeDOM,pZ(this.outerDeco,this.node,t),pZ(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){1==this.nodeDOM.nodeType&&this.nodeDOM.classList.add("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||(this.dom.draggable=!0)}deselectNode(){1==this.nodeDOM.nodeType&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function aZ(e,t,n,r,o){mZ(r,t,e);let a=new oZ(void 0,e,t,n,r,r,r,o,0);return a.contentDOM&&a.updateChildren(o,0),a}class iZ extends oZ{constructor(e,t,n,r,o,a,i){super(e,t,n,r,o,null,a,i,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return!(3==this.dirty||0!=this.dirty&&!this.inParent()||!e.sameMarkup(this.node))&&(this.updateOuterDeco(t),0==this.dirty&&e.text==this.node.text||e.text==this.nodeDOM.nodeValue||(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=0,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return"characterData"!=e.type&&"selection"!=e.type}slice(e,t,n){let r=this.node.cut(e,t),o=document.createTextNode(r.text);return new iZ(this.parent,r,this.outerDeco,this.innerDeco,o,o,n)}markDirty(e,t){super.markDirty(e,t),this.dom==this.nodeDOM||0!=e&&t!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(e){return this.node.text==e}}class lZ extends eZ{parseRule(){return{ignore:!0}}matchesHack(e){return 0==this.dirty&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return"IMG"==this.dom.nodeName}}class sZ extends oZ{constructor(e,t,n,r,o,a,i,l,s,c){super(e,t,n,r,o,a,i,s,c),this.spec=l}update(e,t,n,r){if(3==this.dirty)return!1;if(this.spec.update){let o=this.spec.update(e,t,n);return o&&this.updateInner(e,t,n,r),o}return!(!this.contentDOM&&!e.isLeaf)&&super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return!!this.spec.stopEvent&&this.spec.stopEvent(e)}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function cZ(e,t,n){let r=e.firstChild,o=!1;for(let a=0;a<t.length;a++){let i=t[a],l=i.dom;if(l.parentNode==e){for(;l!=r;)r=gZ(r),o=!0;r=r.nextSibling}else o=!0,e.insertBefore(l,r);if(i instanceof rZ){let t=r?r.previousSibling:e.lastChild;cZ(i.contentDOM,i.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=gZ(r),o=!0;o&&n.trackWrites==e&&(n.trackWrites=null)}const uZ=function(e){e&&(this.nodeName=e)};uZ.prototype=Object.create(null);const dZ=[new uZ];function pZ(e,t,n){if(0==e.length)return dZ;let r=n?dZ[0]:new uZ,o=[r];for(let a=0;a<e.length;a++){let i=e[a].type.attrs;if(i){i.nodeName&&o.push(r=new uZ(i.nodeName));for(let e in i){let a=i[e];null!=a&&(n&&1==o.length&&o.push(r=new uZ(t.isInline?"span":"div")),"class"==e?r.class=(r.class?r.class+" ":"")+a:"style"==e?r.style=(r.style?r.style+";":"")+a:"nodeName"!=e&&(r[e]=a))}}}return o}function fZ(e,t,n,r){if(n==dZ&&r==dZ)return t;let o=t;for(let a=0;a<r.length;a++){let t=r[a],i=n[a];if(a){let n;i&&i.nodeName==t.nodeName&&o!=e&&(n=o.parentNode)&&n.nodeName.toLowerCase()==t.nodeName||(n=document.createElement(t.nodeName),n.pmIsDeco=!0,n.appendChild(o),i=dZ[0]),o=n}hZ(o,i||dZ[0],t)}return o}function hZ(e,t,n){for(let r in t)"class"==r||"style"==r||"nodeName"==r||r in n||e.removeAttribute(r);for(let r in n)"class"!=r&&"style"!=r&&"nodeName"!=r&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],o=n.class?n.class.split(" ").filter(Boolean):[];for(let t=0;t<r.length;t++)-1==o.indexOf(r[t])&&e.classList.remove(r[t]);for(let t=0;t<o.length;t++)-1==r.indexOf(o[t])&&e.classList.add(o[t]);0==e.classList.length&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let n,r=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;n=r.exec(t.style);)e.style.removeProperty(n[1])}n.style&&(e.style.cssText+=n.style)}}function mZ(e,t,n){return fZ(e,e,dZ,pZ(t,n,1!=e.nodeType))}function vZ(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function gZ(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class bZ{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=function(e,t){let n=t,r=n.children.length,o=e.childCount,a=new Map,i=[];e:for(;o>0;){let l;for(;;)if(r){let e=n.children[r-1];if(!(e instanceof rZ)){l=e,r--;break}n=e,r=e.children.length}else{if(n==t)break e;r=n.parent.children.indexOf(n),n=n.parent}let s=l.node;if(s){if(s!=e.child(o-1))break;--o,a.set(l,o),i.push(l)}}return{index:o,matched:a,matches:i.reverse()}}(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n){let r=0,o=this.stack.length>>1,a=Math.min(o,e.length);for(;r<a&&(r==o-1?this.top:this.stack[r+1<<1]).matchesMark(e[r])&&!1!==e[r].type.spec.spanning;)r++;for(;r<o;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let r=-1;for(let t=this.index;t<Math.min(this.index+3,this.top.children.length);t++){let n=this.top.children[t];if(n.matchesMark(e[o])&&!this.isLocked(n.dom)){r=t;break}}if(r>-1)r>this.index&&(this.changed=!0,this.destroyBetween(this.index,r)),this.top=this.top.children[this.index];else{let r=rZ.create(this.top,e[o],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,o++}}findNodeMatch(e,t,n,r){let o,a=-1;if(r>=this.preMatch.index&&(o=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&o.matchesNode(e,t,n))a=this.top.children.indexOf(o,this.index);else for(let i=this.index,l=Math.min(this.top.children.length,i+5);i<l;i++){let r=this.top.children[i];if(r.matchesNode(e,t,n)&&!this.preMatch.matched.has(r)){a=i;break}}return!(a<0)&&(this.destroyBetween(this.index,a),this.index++,!0)}updateNodeAt(e,t,n,r,o){let a=this.top.children[r];return 3==a.dirty&&a.dom==a.contentDOM&&(a.dirty=2),!!a.update(e,t,n,o)&&(this.destroyBetween(this.index,r),this.index++,!0)}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t)for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e;return-1}e=t}}updateNextNode(e,t,n,r,o,a){for(let i=this.index;i<this.top.children.length;i++){let l=this.top.children[i];if(l instanceof oZ){let s=this.preMatch.matched.get(l);if(null!=s&&s!=o)return!1;let c,u=l.dom,d=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&3!=l.dirty&&vZ(t,l.outerDeco));if(!d&&l.update(e,t,n,r))return this.destroyBetween(this.index,i),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!d&&(c=this.recreateWrapper(l,e,t,n,r,a)))return this.top.children[this.index]=c,c.contentDOM&&(c.dirty=2,c.updateChildren(r,a+1),c.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,o,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content))return null;let i=oZ.create(this.top,t,n,r,o,a);if(i.contentDOM){i.children=e.children,e.children=[];for(let e of i.children)e.parent=i}return e.destroy(),i}addNode(e,t,n,r,o){let a=oZ.create(this.top,e,t,n,r,o);a.contentDOM&&a.updateChildren(r,o+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(!r||!r.matchesWidget(e)||e!=r.widget&&r.widget.type.toDOM.parentNode){let r=new tZ(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}else this.index++}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof rZ;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof iZ)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((CX||xX)&&e&&"false"==e.dom.contentEditable&&this.addHackNode("IMG",t),this.addHackNode("BR",this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);"IMG"==e&&(n.className="ProseMirror-separator",n.alt=""),"BR"==e&&(n.className="ProseMirror-trailingBreak");let r=new lZ(this.top,[],n,null);t!=this.top?t.children.push(r):t.children.splice(this.index++,0,r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||1==e.nodeType&&e.contains(this.lock.parentNode))}}function yZ(e,t){return e.type.side-t.type.side}function wZ(e,t,n,r,o){let a=[];for(let i=0,l=0;i<e.length;i++){let s=e[i],c=l,u=l+=s.size;c>=n||u<=t?a.push(s):(c<t&&a.push(s.slice(0,t-c,r)),o&&(a.push(o),o=void 0),u>n&&a.push(s.slice(n-c,s.size,r)))}return a}function kZ(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),a=o&&0==o.size,i=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(i<0)return null;let l,s,c=r.resolve(i);if(uX(n)){for(l=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&VY.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==sX(e);r||o;){if(e==n)return!0;let t=tX(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==sX(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;s=new VY(i==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;l=r.resolve(t)}if(!s){s=AZ(e,l,c,"pointer"==t||e.state.selection.head<c.pos&&!a?1:-1)}return s}function xZ(e){return e.editable?e.hasFocus():IZ(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function EZ(e,t=!1){let n=e.state.selection;if(NZ(e,n),xZ(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&xX){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&aX(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,tX(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&bX&&yX<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:a,head:i}=n;!CZ||n instanceof BY||(n.$from.parent.inlineContent||(r=SZ(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=SZ(e,n.to))),e.docView.setSelection(a,i,e.root,t),CZ&&(r&&_Z(r),o&&_Z(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{xZ(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const CZ=CX||xX&&EX<63;function SZ(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(CX&&o&&"false"==o.contentEditable)return OZ(o);if(!(o&&"false"!=o.contentEditable||a&&"false"!=a.contentEditable)){if(o)return OZ(o);if(a)return OZ(a)}}function OZ(e){return e.contentEditable="true",CX&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function _Z(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function NZ(e,t){if(t instanceof VY){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(TZ(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else TZ(e)}function TZ(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function AZ(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||BY.between(t,n,r)}function MZ(e){return!(e.editable&&!e.hasFocus())&&IZ(e)}function IZ(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function PZ(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),a=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return a&&IY.findFrom(a,t)}function LZ(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function RZ(e,t,n){let r=e.state.selection;if(!(r instanceof BY)){if(r instanceof VY&&r.node.isInline)return LZ(e,new BY(t>0?r.$to:r.$from));{let n=PZ(e.state,t);return!!n&&LZ(e,n)}}if(n.indexOf("s")>-1){let{$head:n}=r,o=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+o.nodeSize*(t<0?-1:1));return LZ(e,new BY(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let n=PZ(e.state,t);return!!(n&&n instanceof VY)&&LZ(e,n)}if(!(OX&&n.indexOf("m")>-1)){let n,o=r.$head,a=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!a||a.isText)return!1;let i=t<0?o.pos-a.nodeSize:o.pos;return!!(a.isAtom||(n=e.docView.descAt(i))&&!n.contentDOM)&&(VY.isSelectable(a)?LZ(e,new VY(t<0?e.state.doc.resolve(o.pos-a.nodeSize):o)):!!TX&&LZ(e,new BY(e.state.doc.resolve(t<0?i:i+a.nodeSize))))}}function BZ(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function DZ(e,t){let n=e.pmViewDesc;return n&&0==n.size&&(t<0||e.nextSibling||"BR"!=e.nodeName)}function VZ(e,t){return t<0?function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=!1;wX&&1==n.nodeType&&r<BZ(n)&&DZ(n.childNodes[r],-1)&&(i=!0);for(;;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(DZ(e,-1))o=n,a=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(jZ(n))break;{let t=n.previousSibling;for(;t&&DZ(t,-1);)o=n.parentNode,a=tX(t),t=t.previousSibling;if(t)n=t,r=BZ(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}i?FZ(e,n,r):o&&FZ(e,o,a)}(e):function(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,a,i=BZ(n);for(;;)if(r<i){if(1!=n.nodeType)break;if(!DZ(n.childNodes[r],1))break;o=n,a=++r}else{if(jZ(n))break;{let t=n.nextSibling;for(;t&&DZ(t,1);)o=t.parentNode,a=tX(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=BZ(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}}o&&FZ(e,o,a)}(e)}function jZ(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function FZ(e,t,n){if(3!=t.nodeType){let e,r;(r=function(e,t){for(;e&&t==e.childNodes.length&&!cX(e);)t=tX(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;e=n,t=0}}(t,n))?(t=r,n=0):(e=function(e,t){for(;e&&!t&&!cX(e);)t=tX(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(3==n.nodeType)return n;if(1==n.nodeType&&"false"==n.contentEditable)break;t=(e=n).childNodes.length}}(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection();if(uX(r)){let e=document.createRange();e.setEnd(t,n),e.setStart(t,n),r.removeAllRanges(),r.addRange(e)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&EZ(e)}),50)}function zZ(e,t){let n=e.state.doc.resolve(t);if(!xX&&!_X&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?"ltr":"rtl"}if(t<n.end()){let n=e.coordsAtPos(t+1),o=(n.top+n.bottom)/2;if(o>r.top&&o<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?"ltr":"rtl"}}return"rtl"==getComputedStyle(e.dom).direction?"rtl":"ltr"}function $Z(e,t,n){let r=e.state.selection;if(r instanceof BY&&!r.empty||n.indexOf("s")>-1)return!1;if(OX&&n.indexOf("m")>-1)return!1;let{$from:o,$to:a}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=PZ(e.state,t);if(n&&n instanceof VY)return LZ(e,n)}if(!o.parent.inlineContent){let n=t<0?o:a,i=r instanceof FY?IY.near(n,t):IY.findFrom(n,t);return!!i&&LZ(e,i)}return!1}function HZ(e,t){if(!(e.state.selection instanceof BY))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function UZ(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function WZ(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);if(8==n||OX&&72==n&&"c"==r)return HZ(e,-1)||VZ(e,-1);if(46==n&&!t.shiftKey||OX&&68==n&&"c"==r)return HZ(e,1)||VZ(e,1);if(13==n||27==n)return!0;if(37==n||OX&&66==n&&"c"==r){let t=37==n?"ltr"==zZ(e,e.state.selection.from)?-1:1:-1;return RZ(e,t,r)||VZ(e,t)}if(39==n||OX&&70==n&&"c"==r){let t=39==n?"ltr"==zZ(e,e.state.selection.from)?1:-1:1;return RZ(e,t,r)||VZ(e,t)}return 38==n||OX&&80==n&&"c"==r?$Z(e,-1,r)||VZ(e,-1):40==n||OX&&78==n&&"c"==r?function(e){if(!CX||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;UZ(e,n,"true"),setTimeout((()=>UZ(e,n,"false")),20)}return!1}(e)||$Z(e,1,r)||VZ(e,1):r==(OX?"m":"c")&&(66==n||73==n||89==n||90==n)}function GZ(e,t){e.someProp("transformCopied",(n=>{t=n(t,e)}));let n=[],{content:r,openStart:o,openEnd:a}=t;for(;o>1&&a>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let i=e.someProp("clipboardSerializer")||jq.fromSchema(e.state.schema),l=nJ(),s=l.createElement("div");s.appendChild(i.serializeFragment(r,{document:l}));let c,u=s.firstChild,d=0;for(;u&&1==u.nodeType&&(c=eJ[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=l.createElement(c[e]);for(;s.firstChild;)t.appendChild(s.firstChild);s.appendChild(t),d++}u=s.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${a}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:s,text:e.someProp("clipboardTextSerializer",(n=>n(t,e)))||t.content.textBetween(0,t.content.size,"\n\n"),slice:t}}function KZ(e,t,n,r,o){let a,i,l=o.parent.type.spec.code;if(!n&&!t)return null;let s=t&&(r||l||!n);if(s){if(e.someProp("transformPastedText",(n=>{t=n(t,l||r,e)})),l)return t?new UK(VK.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):UK.empty;let n=e.someProp("clipboardTextParser",(n=>n(t,o,r,e)));if(n)i=n;else{let n=o.marks(),{schema:r}=e.state,i=jq.fromSchema(r);a=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=a.appendChild(document.createElement("p"));e&&t.appendChild(i.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(t=>{n=t(n,e)})),a=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=nJ().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&eJ[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let a=0;a<n.length;a++)r=r.querySelector(n[a])||r;return r}(n),TX&&function(e){let t=e.querySelectorAll(xX?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(a);let c=a&&a.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let e=a.firstChild;for(;e&&1!=e.nodeType;)e=e.nextSibling;if(!e)break;a=e}if(!i){let t=e.someProp("clipboardParser")||e.someProp("domParser")||Tq.fromSchema(e.state.schema);i=t.parseSlice(a,{preserveWhitespace:!(!s&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||qZ.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)i=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(l){return e}let{content:o,openStart:a,openEnd:i}=e;for(let s=n.length-2;s>=0;s-=2){let e=r.nodes[n[s]];if(!e||e.hasRequiredAttrs())break;o=VK.from(e.create(n[s+1],o)),a++,i++}return new UK(o,a,i)}(QZ(i,+u[1],+u[2]),u[4]);else if(i=UK.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),a=[];if(e.forEach((e=>{if(!a)return;let t,n=o.findWrapping(e.type);if(!n)return a=null;if(t=a.length&&r.length&&XZ(n,r,e,a[a.length-1],0))a[a.length-1]=t;else{a.length&&(a[a.length-1]=ZZ(a[a.length-1],r.length));let t=YZ(e,n);a.push(t),o=o.matchType(t.type),r=n}})),a)return VK.from(a)}return e}(i.content,o),!0),i.openStart||i.openEnd){let e=0,t=0;for(let n=i.content.firstChild;e<i.openStart&&!n.type.spec.isolating;e++,n=n.firstChild);for(let n=i.content.lastChild;t<i.openEnd&&!n.type.spec.isolating;t++,n=n.lastChild);i=QZ(i,e,t)}return e.someProp("transformPasted",(t=>{i=t(i,e)})),i}const qZ=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function YZ(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,VK.from(e));return e}function XZ(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let a=XZ(e,t,n,r.lastChild,o+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(VK.from(YZ(n,e,o+1))))}}function ZZ(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,ZZ(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(VK.empty,!0);return e.copy(n.append(r))}function JZ(e,t,n,r,o,a){let i=t<0?e.firstChild:e.lastChild,l=i.content;return e.childCount>1&&(a=0),o<r-1&&(l=JZ(l,t,n,r,o+1,a)),o>=n&&(l=t<0?i.contentMatchAt(0).fillBefore(l,a<=o).append(l):l.append(i.contentMatchAt(i.childCount).fillBefore(VK.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,i.copy(l))}function QZ(e,t,n){return t<e.openStart&&(e=new UK(JZ(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new UK(JZ(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const eJ={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let tJ=null;function nJ(){return tJ||(tJ=document.implementation.createHTMLDocument("title"))}const rJ={},oJ={},aJ={touchstart:!0,touchmove:!0};class iJ{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function lJ(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function sJ(e){e.someProp("handleDOMEvents",(t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>cJ(e,t))}))}function cJ(e,t){return e.someProp("handleDOMEvents",(n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)}))}function uJ(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||11==n.nodeType||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function dJ(e){return{left:e.clientX,top:e.clientY}}function pJ(e,t,n,r,o){if(-1==r)return!1;let a=e.state.doc.resolve(r);for(let i=a.depth+1;i>0;i--)if(e.someProp(t,(t=>i>a.depth?t(e,n,a.nodeAfter,a.before(i),o,!0):t(e,n,a.node(i),a.before(i),o,!1))))return!0;return!1}function fJ(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function hJ(e,t,n,r,o){return pJ(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof VY&&(n=o.node);let a=e.state.doc.resolve(t);for(let i=a.depth+1;i>0;i--){let e=i>a.depth?a.nodeAfter:a.node(i);if(VY.isSelectable(e)){r=n&&o.$from.depth>0&&i>=o.$from.depth&&a.before(o.$from.depth+1)==o.$from.pos?a.before(o.$from.depth):a.before(i);break}}return null!=r&&(fJ(e,VY.create(e.state.doc,r)),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&VY.isSelectable(r))&&(fJ(e,new VY(n)),!0)}(e,n))}function mJ(e,t,n,r){return pJ(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function vJ(e,t,n,r){return pJ(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(fJ(e,BY.create(r,0,r.content.size)),!0);let o=r.resolve(t);for(let a=o.depth+1;a>0;a--){let t=a>o.depth?o.nodeAfter:o.node(a),n=o.before(a);if(t.inlineContent)fJ(e,BY.create(r,n+1,n+1+t.content.size));else{if(!VY.isSelectable(t))continue;fJ(e,VY.create(r,n))}return!0}}(e,n,r)}function gJ(e){return SJ(e)}oJ.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!wJ(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!NX||!xX||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!SX||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||WZ(e,n)?n.preventDefault():lJ(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,dX(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},oJ.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},oJ.keypress=(e,t)=>{let n=t;if(wJ(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||OX&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof BY&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);/[\r\n]/.test(t)||e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const bJ=OX?"metaKey":"ctrlKey";rJ.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=gJ(e),o=Date.now(),a="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[bJ]&&("singleClick"==e.input.lastClick.type?a="doubleClick":"doubleClick"==e.input.lastClick.type&&(a="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:a};let i=e.posAtCoords(dJ(n));i&&("singleClick"==a?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new yJ(e,i,n,!!r)):("doubleClick"==a?mJ:vJ)(e,i.pos,i.inside,n)?n.preventDefault():lJ(e,"pointer"))};class yJ{constructor(e,t,n,r){let o,a;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[bJ],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,a=n.depth?n.before():0}const i=r?null:n.target,l=i?e.docView.nearestDesc(i,!0):null;this.target=l&&1==l.dom.nodeType?l.dom:null;let{selection:s}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||s instanceof VY&&s.from<=a&&s.to>a)&&(this.mightDrag={node:o,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!wX||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),lJ(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>EZ(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(dJ(e))),this.updateAllowDefault(e),this.allowDefault||!t?lJ(this.view,"pointer"):hJ(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||CX&&this.mightDrag&&!this.mightDrag.node.isAtom||xX&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(fJ(this.view,IY.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):lJ(this.view,"pointer")}move(e){this.updateAllowDefault(e),lJ(this.view,"pointer"),0==e.buttons&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}function wJ(e,t){return!!e.composing||!!(CX&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}rJ.touchstart=e=>{e.input.lastTouch=Date.now(),gJ(e),lJ(e,"pointer")},rJ.touchmove=e=>{e.input.lastTouch=Date.now(),lJ(e,"pointer")},rJ.contextmenu=e=>gJ(e);const kJ=NX?5e3:-1;function xJ(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>SJ(e)),t))}function EJ(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function CJ(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(e,t){for(;;){if(3==e.nodeType&&t)return e;if(1==e.nodeType&&t>0){if("false"==e.contentEditable)return null;t=sX(e=e.childNodes[t-1])}else{if(!e.parentNode||cX(e))return null;t=tX(e),e=e.parentNode}}}(t.focusNode,t.focusOffset),r=function(e,t){for(;;){if(3==e.nodeType&&t<e.nodeValue.length)return e;if(1==e.nodeType&&t<e.childNodes.length){if("false"==e.contentEditable)return null;e=e.childNodes[t],t=0}else{if(!e.parentNode||cX(e))return null;t=tX(e)+1,e=e.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function SJ(e,t=!1){if(!(NX&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),EJ(e),t||e.docView&&e.docView.dirty){let t=kZ(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}oJ.compositionstart=oJ.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),SJ(e,!0),e.markCursor=null;else if(SJ(e),wX&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&1==n.nodeType&&0!=r;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(3==t.nodeType){e.domSelection().collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}xJ(e,kJ)},oJ.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.compositionPendingChanges&&Promise.resolve().then((()=>e.domObserver.flush())),e.input.compositionID++,xJ(e,20))};const OJ=bX&&yX<15||SX&&AX<604;function _J(e,t,n,r,o){let a=KZ(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,o,a||UK.empty))))return!0;if(!a)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(a),l=i?e.state.tr.replaceSelectionWith(i,r):e.state.tr.replaceSelection(a);return e.dispatch(l.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function NJ(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}rJ.copy=oJ.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let a=OJ?null:n.clipboardData,i=r.content(),{dom:l,text:s}=GZ(e,i);a?(n.preventDefault(),a.clearData(),a.setData("text/html",l.innerHTML),a.setData("text/plain",s)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,l),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},oJ.paste=(e,t)=>{let n=t;if(e.composing&&!NX)return;let r=OJ?null:n.clipboardData,o=e.input.shiftKey&&45!=e.input.lastKeyCode;r&&_J(e,NJ(r),r.getData("text/html"),o,n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus();let o=e.input.shiftKey&&45!=e.input.lastKeyCode;setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?_J(e,r.value,null,o,t):_J(e,r.textContent,r.innerHTML,o,t)}),50)}(e,n)};class TJ{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}}const AJ=OX?"altKey":"ctrlKey";rJ.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o,a=e.state.selection,i=a.empty?null:e.posAtCoords(dJ(n));if(i&&i.pos>=a.from&&i.pos<=(a instanceof VY?a.to-1:a.to));else if(r&&r.mightDrag)o=VY.create(e.state.doc,r.mightDrag.pos);else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=VY.create(e.state.doc,t.posBefore))}let l=(o||e.state.selection).content(),{dom:s,text:c,slice:u}=GZ(e,l);(!n.dataTransfer.files.length||!xX||EX>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(OJ?"Text":"text/html",s.innerHTML),n.dataTransfer.effectAllowed="copyMove",OJ||n.dataTransfer.setData("text/plain",c),e.dragging=new TJ(u,!n[AJ],o)},rJ.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},oJ.dragover=oJ.dragenter=(e,t)=>t.preventDefault(),oJ.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(dJ(n));if(!o)return;let a=e.state.doc.resolve(o.pos),i=r&&r.slice;i?e.someProp("transformPasted",(t=>{i=t(i,e)})):i=KZ(e,NJ(n.dataTransfer),OJ?null:n.dataTransfer.getData("text/html"),!1,a);let l=!(!r||n[AJ]);if(e.someProp("handleDrop",(t=>t(e,n,i||UK.empty,l))))return void n.preventDefault();if(!i)return;n.preventDefault();let s=i?vY(e.state.doc,a.pos,i):a.pos;null==s&&(s=a.pos);let c=e.state.tr;if(l){let{node:e}=r;e?e.replace(c):c.deleteSelection()}let u=c.mapping.map(s),d=0==i.openStart&&0==i.openEnd&&1==i.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,i.content.firstChild):c.replaceRange(u,u,i),c.doc.eq(p))return;let f=c.doc.resolve(u);if(d&&VY.isSelectable(i.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(i.content.firstChild))c.setSelection(new VY(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(AZ(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},rJ.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&EZ(e)}),20))},rJ.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},rJ.beforeinput=(e,t)=>{if(xX&&NX&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,dX(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let os in oJ)rJ[os]=oJ[os];function MJ(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class IJ{constructor(e,t){this.toDOM=e,this.spec=t||DJ,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new RJ(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof IJ&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&MJ(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class PJ{constructor(e,t){this.attrs=e,this.spec=t||DJ}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=a?null:new RJ(o,a,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof PJ&&MJ(this.attrs,e.attrs)&&MJ(this.spec,e.spec)}static is(e){return e.type instanceof PJ}destroy(){}}class LJ{constructor(e,t){this.attrs=e,this.spec=t||DJ}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=o.pos?null:new RJ(o.pos-n,a.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof LJ&&MJ(this.attrs,e.attrs)&&MJ(this.spec,e.spec)}destroy(){}}class RJ{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new RJ(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new RJ(e,e,new IJ(t,n))}static inline(e,t,n,r){return new RJ(e,t,new PJ(n,r))}static node(e,t,n,r){return new RJ(e,t,new LJ(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof PJ}get widget(){return this.type instanceof IJ}}const BJ=[],DJ={};class VJ{constructor(e,t){this.local=e.length?e:BJ,this.children=t.length?t:BJ}static create(e,t){return t.length?UJ(t,e,0,DJ):jJ}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let a=0;a<this.local.length;a++){let i=this.local[a];i.from<=t&&i.to>=e&&(!o||o(i.spec))&&n.push(i.copy(i.from+r,i.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let i=this.children[a]+1;this.children[a+2].findInner(e-i,t-i,n,r+i,o)}}map(e,t,n){return this==jJ||0==e.maps.length?this:this.mapInner(e,t,0,0,n||DJ)}mapInner(e,t,n,r,o){let a;for(let i=0;i<this.local.length;i++){let l=this.local[i].map(e,n,r);l&&l.type.valid(t,l)?(a||(a=[])).push(l):o.onRemove&&o.onRemove(this.local[i].spec)}return this.children.length?function(e,t,n,r,o,a,i){let l=e.slice();for(let c=0,u=a;c<n.maps.length;c++){let e=0;n.maps[c].forEach(((t,n,r,o)=>{let a=o-r-(n-t);for(let i=0;i<l.length;i+=3){let r=l[i+1];if(r<0||t>r+u-e)continue;let o=l[i]+u-e;n>=o?l[i+1]=t<=o?-2:-1:t>=u&&a&&(l[i]+=a,l[i+1]+=a)}e+=a})),u=n.maps[c].map(u,-1)}let s=!1;for(let c=0;c<l.length;c+=3)if(l[c+1]<0){if(-2==l[c+1]){s=!0,l[c+1]=-1;continue}let t=n.map(e[c]+a),u=t-o;if(u<0||u>=r.content.size){s=!0;continue}let d=n.map(e[c+1]+a,-1)-o,{index:p,offset:f}=r.content.findIndex(u),h=r.maybeChild(p);if(h&&f==u&&f+h.nodeSize==d){let r=l[c+2].mapInner(n,h,t+1,e[c]+a+1,i);r!=jJ?(l[c]=u,l[c+1]=d,l[c+2]=r):(l[c+1]=-2,s=!0)}else s=!0}if(s){let s=function(e,t,n,r,o,a,i){function l(e,t){for(let a=0;a<e.local.length;a++){let l=e.local[a].map(r,o,t);l?n.push(l):i.onRemove&&i.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)l(e.children[n+2],e.children[n]+t+1)}for(let s=0;s<e.length;s+=3)-1==e[s+1]&&l(e[s+2],t[s]+a+1);return n}(l,e,t,n,o,a,i),c=UJ(s,r,0,i);t=c.local;for(let e=0;e<l.length;e+=3)l[e+1]<0&&(l.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<l.length&&l[t]<n;)t+=3;l.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new VJ(t.sort(WJ),l)}(this.children,a||[],e,t,n,r,o):a?new VJ(a.sort(WJ),BJ):jJ}add(e,t){return t.length?this==jJ?VJ.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,a)=>{let i,l=a+n;if(i=$J(t,e,l)){for(r||(r=this.children.slice());o<r.length&&r[o]<a;)o+=3;r[o]==a?r[o+2]=r[o+2].addInner(e,i,l+1):r.splice(o,0,a,a+e.nodeSize,UJ(i,e,l+1,DJ)),o+=3}}));let a=zJ(o?HJ(t):t,-n);for(let i=0;i<a.length;i++)a[i].type.valid(e,a[i])||a.splice(i--,1);return new VJ(a.length?this.local.concat(a).sort(WJ):this.local,r||this.children)}remove(e){return 0==e.length||this==jJ?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let o=0;o<n.length;o+=3){let r,a=n[o]+t,i=n[o+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>a&&t.to<i&&(e[n]=null,(r||(r=[])).push(t));if(!r)continue;n==this.children&&(n=this.children.slice());let l=n[o+2].removeInner(r,a+1);l!=jJ?n[o+2]=l:(n.splice(o,3),o-=3)}if(r.length)for(let o,a=0;a<e.length;a++)if(o=e[a])for(let e=0;e<r.length;e++)r[e].eq(o,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new VJ(r,n):jJ}forChild(e,t){if(this==jJ)return this;if(t.isLeaf)return VJ.empty;let n,r;for(let i=0;i<this.children.length;i+=3)if(this.children[i]>=e){this.children[i]==e&&(n=this.children[i+2]);break}let o=e+1,a=o+t.content.size;for(let i=0;i<this.local.length;i++){let e=this.local[i];if(e.from<a&&e.to>o&&e.type instanceof PJ){let t=Math.max(o,e.from)-o,n=Math.min(a,e.to)-o;t<n&&(r||(r=[])).push(e.copy(t,n))}}if(r){let e=new VJ(r.sort(WJ),BJ);return n?new FJ([e,n]):e}return n||jJ}eq(e){if(this==e)return!0;if(!(e instanceof VJ)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return GJ(this.localsInner(e))}localsInner(e){if(this==jJ)return BJ;if(e.inlineContent||!this.local.some(PJ.is))return this.local;let t=[];for(let n=0;n<this.local.length;n++)this.local[n].type instanceof PJ||t.push(this.local[n]);return t}}VJ.empty=new VJ([],[]),VJ.removeOverlap=GJ;const jJ=VJ.empty;class FJ{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,DJ)));return FJ.from(n)}forChild(e,t){if(t.isLeaf)return VJ.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=jJ&&(o instanceof FJ?n=n.concat(o.members):n.push(o))}return FJ.from(n)}eq(e){if(!(e instanceof FJ)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?GJ(n?t:t.sort(WJ)):BJ}static from(e){switch(e.length){case 0:return jJ;case 1:return e[0];default:return new FJ(e.every((e=>e instanceof VJ))?e:e.reduce(((e,t)=>e.concat(t instanceof VJ?t:t.members)),[]))}}}function zJ(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new RJ(o.from+t,o.to+t,o.type))}return n}function $J(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let a,i=0;i<e.length;i++)(a=e[i])&&a.from>n&&a.to<r&&((o||(o=[])).push(a),e[i]=null);return o}function HJ(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function UJ(e,t,n,r){let o=[],a=!1;t.forEach(((t,i)=>{let l=$J(e,t,i+n);if(l){a=!0;let e=UJ(l,t,n+i+1,r);e!=jJ&&o.push(i,i+t.nodeSize,e)}}));let i=zJ(a?HJ(e):e,-n).sort(WJ);for(let l=0;l<i.length;l++)i[l].type.valid(t,i[l])||(r.onRemove&&r.onRemove(i[l].spec),i.splice(l--,1));return i.length||o.length?new VJ(i,o):jJ}function WJ(e,t){return e.from-t.from||e.to-t.to}function GJ(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let a=t[o];if(a.from!=r.from){a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),KJ(t,o,r.copy(a.from,r.to)));break}a.to!=r.to&&(t==e&&(t=e.slice()),t[o]=a.copy(a.from,r.to),KJ(t,o+1,a.copy(r.to,a.to)))}}return t}function KJ(e,t,n){for(;t<e.length&&WJ(n,e[t])>0;)t++;e.splice(t,0,n)}function qJ(e){let t=[];return e.someProp("decorations",(n=>{let r=n(e.state);r&&r!=jJ&&t.push(r)})),e.cursorWrapper&&t.push(VJ.create(e.state.doc,[e.cursorWrapper.deco])),FJ.from(t)}const YJ={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},XJ=bX&&yX<=11;class ZJ{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class JJ{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ZJ,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver((e=>{for(let t=0;t<e.length;t++)this.queue.push(e[t]);bX&&yX<=11&&e.some((e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length))?this.flushSoon():this.flush()})),XJ&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout((()=>{this.flushingSoon=-1,this.flush()}),20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,YJ)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout((()=>this.flush()),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout((()=>this.suppressingSelectionUpdates=!1),50)}onSelectionChange(){if(MZ(this.view)){if(this.suppressingSelectionUpdates)return EZ(this.view);if(bX&&yX<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&aX(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t,n=new Set;for(let o=e.focusNode;o;o=nX(o))n.add(o);for(let o=e.anchorNode;o;o=nX(o))if(n.has(o)){t=o;break}let r=t&&this.view.docView.nearestDesc(t);return r&&r.ignoreMutation({type:"selection",target:3==t.nodeType?t.parentNode:t})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n=e.domSelectionRange(),r=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(n)&&MZ(e)&&!this.ignoreSelectionChange(n),o=-1,a=-1,i=!1,l=[];if(e.editable)for(let c=0;c<t.length;c++){let e=this.registerMutation(t[c],l);e&&(o=o<0?e.from:Math.min(e.from,o),a=a<0?e.to:Math.max(e.to,a),e.typeOver&&(i=!0))}if(wX&&l.length){let t=l.filter((e=>"BR"==e.nodeName));if(2==t.length){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;!t||"LI"!=t.nodeName||n&&nQ(e,n)==t||r.remove()}}}let s=null;o<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&uX(n)&&(s=kZ(e))&&s.eq(IY.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,EZ(e),this.currentSelection.set(n),e.scrollToSelection()):(o>-1||r)&&(o>-1&&(e.docView.markDirty(o,a),function(e){if(QJ.has(e))return;if(QJ.set(e,null),-1!==["normal","nowrap","pre-line"].indexOf(getComputedStyle(e.dom).whiteSpace)){if(e.requiresGeckoHackNode=wX,eQ)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),eQ=!0}}(e)),this.handleDOMChange(o,a,i,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(n)||EZ(e),this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if("attributes"==e.type&&(n==this.view.docView||"contenteditable"==e.attributeName||"style"==e.attributeName&&!e.oldValue&&!e.target.getAttribute("style")))return null;if(!n||n.ignoreMutation(e))return null;if("childList"==e.type){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),3==r.nodeType&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,o=e.nextSibling;if(bX&&yX<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(o=a)}let a=r&&r.parentNode==e.target?tX(r)+1:0,i=n.localPosFromDOM(e.target,a,-1),l=o&&o.parentNode==e.target?tX(o):e.target.childNodes.length;return{from:i,to:n.localPosFromDOM(e.target,l,1)}}return"attributes"==e.type?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let QJ=new WeakMap,eQ=!1;function tQ(e,t){let n=t.startContainer,r=t.startOffset,o=t.endContainer,a=t.endOffset,i=e.domAtPos(e.state.selection.anchor);return aX(i.node,i.offset,o,a)&&([n,r,o,a]=[o,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:o,focusOffset:a}}function nQ(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function rQ(e){let t=e.pmViewDesc;if(t)return t.parseRule();if("BR"==e.nodeName&&e.parentNode){if(CX&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let e=document.createElement("div");return e.appendChild(document.createElement("li")),{skip:e}}if(e.parentNode.lastChild==e||CX&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if("IMG"==e.nodeName&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const oQ=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function aQ(e,t,n,r,o){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=kZ(e,t);if(n&&!e.state.selection.eq(n)){if(xX&&NX&&13===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",(t=>t(e,dX(13,"Enter")))))return;let r=e.state.tr.setSelection(n);"pointer"==t?r.setMeta("pointer",!0):"key"==t&&r.scrollIntoView(),a&&r.setMeta("composition",a),e.dispatch(r)}return}let i=e.state.doc.resolve(t),l=i.sharedDepth(n);t=i.before(l+1),n=e.state.doc.resolve(n).after(l+1);let s,c,u=e.state.selection,d=function(e,t,n){let r,{node:o,fromOffset:a,toOffset:i,from:l,to:s}=e.docView.parseRange(t,n),c=e.domSelectionRange(),u=c.anchorNode;if(u&&e.dom.contains(1==u.nodeType?u:u.parentNode)&&(r=[{node:u,offset:c.anchorOffset}],uX(c)||r.push({node:c.focusNode,offset:c.focusOffset})),xX&&8===e.input.lastKeyCode)for(let v=i;v>a;v--){let e=o.childNodes[v-1],t=e.pmViewDesc;if("BR"==e.nodeName&&!t){i=v;break}if(!t||t.size)break}let d=e.state.doc,p=e.someProp("domParser")||Tq.fromSchema(e.state.schema),f=d.resolve(l),h=null,m=p.parse(o,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:a,to:i,preserveWhitespace:"pre"!=f.parent.type.whitespace||"full",findPositions:r,ruleFromNode:rQ,context:f});if(r&&null!=r[0].pos){let e=r[0].pos,t=r[1]&&r[1].pos;null==t&&(t=e),h={anchor:e+l,head:t+l}}return{doc:m,sel:h,from:l,to:s}}(e,t,n),p=e.state.doc,f=p.slice(d.from,d.to);8===e.input.lastKeyCode&&Date.now()-100<e.input.lastKeyCodeTime?(s=e.state.selection.to,c="end"):(s=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let h=function(e,t,n,r,o){let a=e.findDiffStart(t,n);if(null==a)return null;let{a:i,b:l}=e.findDiffEnd(t,n+e.size,n+t.size);if("end"==o){r-=i+Math.max(0,a-Math.min(i,l))-a}if(i<a&&e.size<t.size){let e=r<=a&&r>=i?a-r:0;a-=e,a&&a<t.size&&sQ(t.textBetween(a-1,a+1))&&(a+=e?1:-1),l=a+(l-i),i=a}else if(l<a){let t=r<=a&&r>=l?a-r:0;a-=t,a&&a<e.size&&sQ(e.textBetween(a-1,a+1))&&(a+=t?1:-1),i=a+(i-l),l=a}return{start:a,endA:i,endB:l}}(f.content,d.doc.content,d.from,s,c);if((SX&&e.input.lastIOSEnter>Date.now()-225||NX)&&o.some((e=>1==e.nodeType&&!oQ.test(e.nodeName)))&&(!h||h.endA>=h.endB)&&e.someProp("handleKeyDown",(t=>t(e,dX(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(!h){if(!(r&&u instanceof BY&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||d.sel&&d.sel.anchor!=d.sel.head){if(d.sel){let t=iQ(e,e.state.doc,d.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta("composition",a),e.dispatch(n)}}return}h={start:u.from,endA:u.to,endB:u.to}}e.input.domChangeCount++,e.state.selection.from<e.state.selection.to&&h.start==h.endB&&e.state.selection instanceof BY&&(h.start>e.state.selection.from&&h.start<=e.state.selection.from+2&&e.state.selection.from>=d.from?h.start=e.state.selection.from:h.endA<e.state.selection.to&&h.endA>=e.state.selection.to-2&&e.state.selection.to<=d.to&&(h.endB+=e.state.selection.to-h.endA,h.endA=e.state.selection.to)),bX&&yX<=11&&h.endB==h.start+1&&h.endA==h.start&&h.start>d.from&&" "==d.doc.textBetween(h.start-d.from-1,h.start-d.from+1)&&(h.start--,h.endA--,h.endB--);let m,v=d.doc.resolveNoCache(h.start-d.from),g=d.doc.resolveNoCache(h.endB-d.from),b=p.resolve(h.start),y=v.sameParent(g)&&v.parent.inlineContent&&b.end()>=h.endA;if((SX&&e.input.lastIOSEnter>Date.now()-225&&(!y||o.some((e=>"DIV"==e.nodeName||"P"==e.nodeName)))||!y&&v.pos<d.doc.content.size&&!v.sameParent(g)&&(m=IY.findFrom(d.doc.resolve(v.pos+1),1,!0))&&m.head==g.pos)&&e.someProp("handleKeyDown",(t=>t(e,dX(13,"Enter")))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>h.start&&function(e,t,n,r,o){if(n-t<=o.pos-r.pos||lQ(r,!0,!1)<o.pos)return!1;let a=e.resolve(t);if(!r.parent.isTextblock){let e=a.nodeAfter;return null!=e&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let i=e.resolve(lQ(a,!0,!0));return!(!i.parent.isTextblock||i.pos>n||lQ(i,!0,!1)<n)&&r.parent.content.cut(r.parentOffset).eq(i.parent.content)}(p,h.start,h.endA,v,g)&&e.someProp("handleKeyDown",(t=>t(e,dX(8,"Backspace")))))return void(NX&&xX&&e.domObserver.suppressSelectionUpdates());xX&&NX&&h.endB==h.start&&(e.input.lastAndroidDelete=Date.now()),NX&&!y&&v.start()!=g.start()&&0==g.parentOffset&&v.depth==g.depth&&d.sel&&d.sel.anchor==d.sel.head&&d.sel.head==h.endA&&(h.endB-=2,g=d.doc.resolveNoCache(h.endB-d.from),setTimeout((()=>{e.someProp("handleKeyDown",(function(t){return t(e,dX(13,"Enter"))}))}),20));let w,k,x,E=h.start,C=h.endA;if(y)if(v.pos==g.pos)bX&&yX<=11&&0==v.parentOffset&&(e.domObserver.suppressSelectionUpdates(),setTimeout((()=>EZ(e)),20)),w=e.state.tr.delete(E,C),k=p.resolve(h.start).marksAcross(p.resolve(h.endA));else if(h.endA==h.endB&&(x=function(e,t){let n,r,o,a=e.firstChild.marks,i=t.firstChild.marks,l=a,s=i;for(let u=0;u<i.length;u++)l=i[u].removeFromSet(l);for(let u=0;u<a.length;u++)s=a[u].removeFromSet(s);if(1==l.length&&0==s.length)r=l[0],n="add",o=e=>e.mark(r.addToSet(e.marks));else{if(0!=l.length||1!=s.length)return null;r=s[0],n="remove",o=e=>e.mark(r.removeFromSet(e.marks))}let c=[];for(let u=0;u<t.childCount;u++)c.push(o(t.child(u)));if(VK.from(c).eq(e))return{mark:r,type:n}}(v.parent.content.cut(v.parentOffset,g.parentOffset),b.parent.content.cut(b.parentOffset,h.endA-b.start()))))w=e.state.tr,"add"==x.type?w.addMark(E,C,x.mark):w.removeMark(E,C,x.mark);else if(v.parent.child(v.index()).isText&&v.index()==g.index()-(g.textOffset?0:1)){let t=v.parent.textBetween(v.parentOffset,g.parentOffset);if(e.someProp("handleTextInput",(n=>n(e,E,C,t))))return;w=e.state.tr.insertText(t,E,C)}if(w||(w=e.state.tr.replace(E,C,d.doc.slice(h.start-d.from,h.endB-d.from))),d.sel){let t=iQ(e,w.doc,d.sel);t&&!(xX&&NX&&e.composing&&t.empty&&(h.start!=h.endB||e.input.lastAndroidDelete<Date.now()-100)&&(t.head==E||t.head==w.mapping.map(C)-1)||bX&&t.empty&&t.head==E)&&w.setSelection(t)}k&&w.ensureMarks(k),a&&w.setMeta("composition",a),e.dispatch(w.scrollIntoView())}function iQ(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:AZ(e,t.resolve(n.anchor),t.resolve(n.head))}function lQ(e,t,n){let r=e.depth,o=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,o++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,o++}return o}function sQ(e){if(2!=e.length)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class cQ{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new iJ,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(hQ),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):"function"==typeof e?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=pQ(this),dQ(this),this.nodeViews=fQ(this),this.docView=aZ(this.state.doc,uQ(this),qJ(this),this.dom,this),this.domObserver=new JJ(this,((e,t,n,r)=>aQ(this,e,t,n,r))),this.domObserver.start(),function(e){for(let t in rJ){let n=rJ[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{!uJ(e,t)||cJ(e,t)||!e.editable&&t.type in oJ||n(e,t)},aJ[t]?{passive:!0}:void 0)}CX&&e.dom.addEventListener("input",(()=>null)),sJ(e)}(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&sJ(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(hQ),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let n in this._props)t[n]=this._props[n];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){var n;let r=this.state,o=!1,a=!1;e.storedMarks&&this.composing&&(EJ(this),a=!0),this.state=e;let i=r.plugins!=e.plugins||this._props.plugins!=t.plugins;if(i||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=fQ(this);(function(e,t){let n=0,r=0;for(let o in e){if(e[o]!=t[o])return!0;n++}for(let o in t)r++;return n!=r})(e,this.nodeViews)&&(this.nodeViews=e,o=!0)}(i||t.handleDOMEvents!=this._props.handleDOMEvents)&&sJ(this),this.editable=pQ(this),dQ(this);let l=qJ(this),s=uQ(this),c=r.plugins==e.plugins||r.doc.eq(e.doc)?e.scrollToSelection>r.scrollToSelection?"to selection":"preserve":"reset",u=o||!this.docView.matchesNode(e.doc,s,l);!u&&e.selection.eq(r.selection)||(a=!0);let d="preserve"==c&&a&&null==this.dom.style.overflowAnchor&&function(e){let t,n,r=e.dom.getBoundingClientRect(),o=Math.max(0,r.top);for(let a=(r.left+r.right)/2,i=o+1;i<Math.min(innerHeight,r.bottom);i+=5){let r=e.root.elementFromPoint(a,i);if(!r||r==e.dom||!e.dom.contains(r))continue;let l=r.getBoundingClientRect();if(l.top>=o-20){t=r,n=l.top;break}}return{refDOM:t,refTop:n,stack:RX(e.dom)}}(this);if(a){this.domObserver.stop();let t=u&&(bX||xX)&&!this.composing&&!r.selection.empty&&!e.selection.empty&&function(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}(r.selection,e.selection);if(u){let n=xX?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=CJ(this)),!o&&this.docView.update(e.doc,s,l,this)||(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=aZ(e.doc,s,l,this.dom,this)),n&&!this.trackWrites&&(t=!0)}t||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return aX(t.node,t.offset,n.anchorNode,n.anchorOffset)}(this))?EZ(this,t):(NZ(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(r),(null===(n=this.dragging)||void 0===n?void 0:n.node)&&!r.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,r),"reset"==c?this.dom.scrollTop=0:"to selection"==c?this.scrollToSelection():d&&function({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;BX(n,0==r?0:r-t)}(d)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(this.someProp("handleScrollToSelection",(e=>e(this))));else if(this.state.selection instanceof VY){let t=this.docView.domAfterPos(this.state.selection.from);1==t.nodeType&&LX(this,t.getBoundingClientRect(),e)}else LX(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(e&&e.plugins==this.state.plugins&&this.directPlugins==this.prevDirectPlugins)for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}}updateDraggedNode(e,t){let n=e.node,r=-1;if(this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new TJ(e.slice,e.move,r<0?void 0:VY.create(this.state.doc,r))}someProp(e,t){let n,r=this._props&&this._props[e];if(null!=r&&(n=t?t(r):r))return n;for(let a=0;a<this.directPlugins.length;a++){let r=this.directPlugins[a].props[e];if(null!=r&&(n=t?t(r):r))return n}let o=this.state.plugins;if(o)for(let a=0;a<o.length;a++){let r=o[a].props[e];if(null!=r&&(n=t?t(r):r))return n}}hasFocus(){if(bX){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if("false"==e.contentEditable)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&function(e){if(e.setActive)return e.setActive();if(DX)return e.focus(DX);let t=RX(e);e.focus(null==DX?{get preventScroll(){return DX={preventScroll:!0},!0}}:void 0),DX||(DX=!1,BX(t,0))}(this.dom),EZ(this),this.domObserver.start()}get root(){let e=this._root;if(null==e)for(let t=this.dom.parentNode;t;t=t.parentNode)if(9==t.nodeType||11==t.nodeType&&t.host)return t.getSelection||(Object.getPrototypeOf(t).getSelection=()=>t.ownerDocument.getSelection()),this._root=t;return e||document}updateRoot(){this._root=null}posAtCoords(e){return zX(this,e)}coordsAtPos(e,t=1){return WX(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(null==r)throw new RangeError("DOM position not inside the editor");return r}endOfTextblock(e,t){return QX(this,t||this.state,e)}pasteHTML(e,t){return _J(this,"",e,!1,t||new ClipboardEvent("paste"))}pasteText(e,t){return _J(this,e,null,!0,t||new ClipboardEvent("paste"))}destroy(){this.docView&&(!function(e){e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],qJ(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,rX=null)}get isDestroyed(){return null==this.docView}dispatchEvent(e){return function(e,t){cJ(e,t)||!rJ[t.type]||!e.editable&&t.type in oJ||rJ[t.type](e,t)}(this,e)}dispatch(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return CX&&11===this.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return tQ(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener("beforeinput",r,!0),document.execCommand("indent"),e.dom.removeEventListener("beforeinput",r,!0),n?tQ(e,n):null}(this,e)||e}domSelection(){return this.root.getSelection()}}function uQ(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",(n=>{if("function"==typeof n&&(n=n(e.state)),n)for(let e in n)"class"==e?t.class+=" "+n[e]:"style"==e?t.style=(t.style?t.style+";":"")+n[e]:t[e]||"contenteditable"==e||"nodeName"==e||(t[e]=String(n[e]))})),t.translate||(t.translate="no"),[RJ.node(0,e.state.doc.content.size,t)]}function dQ(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:RJ.widget(e.state.selection.head,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function pQ(e){return!e.someProp("editable",(t=>!1===t(e.state)))}function fQ(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function hQ(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}for(var mQ={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},vQ={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},gQ="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),bQ="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),yQ=0;yQ<10;yQ++)mQ[48+yQ]=mQ[96+yQ]=String(yQ);for(yQ=1;yQ<=24;yQ++)mQ[yQ+111]="F"+yQ;for(yQ=65;yQ<=90;yQ++)mQ[yQ]=String.fromCharCode(yQ+32),vQ[yQ]=String.fromCharCode(yQ);for(var wQ in mQ)vQ.hasOwnProperty(wQ)||(vQ[wQ]=mQ[wQ]);const kQ="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function xQ(e){let t,n,r,o,a=e.split(/-(?!$)/),i=a[a.length-1];"Space"==i&&(i=" ");for(let l=0;l<a.length-1;l++){let e=a[l];if(/^(cmd|meta|m)$/i.test(e))o=!0;else if(/^a(lt)?$/i.test(e))t=!0;else if(/^(c|ctrl|control)$/i.test(e))n=!0;else if(/^s(hift)?$/i.test(e))r=!0;else{if(!/^mod$/i.test(e))throw new Error("Unrecognized modifier name: "+e);kQ?o=!0:n=!0}}return t&&(i="Alt-"+i),n&&(i="Ctrl-"+i),o&&(i="Meta-"+i),r&&(i="Shift-"+i),i}function EQ(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function CQ(e){let t=function(e){let t=Object.create(null);for(let n in e)t[xQ(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(gQ&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||bQ&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?vQ:mQ)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),a=t[EQ(o,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(1==o.length&&" "!=o){if(n.shiftKey){let r=t[EQ(o,n,!1)];if(r&&r(e.state,e.dispatch,e))return!0}if((n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=mQ[n.keyCode])&&r!=o){let o=t[EQ(r,n)];if(o&&o(e.state,e.dispatch,e))return!0}}return!1}}function SQ(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("backward",e):n.parentOffset>0)?null:n}function OQ(e,t,n){let r=t.nodeBefore,o=t.pos-1;for(;!r.isTextblock;o--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,i=t.pos+1;for(;!a.isTextblock;i++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let l=gY(e.doc,o,i,UK.empty);if(!l||l.from!=o||l instanceof oY&&l.slice.size>=i-o)return!1;if(n){let t=e.tr.step(l);t.setSelection(BY.create(t.doc,o)),n(t.scrollIntoView())}return!0}function _Q(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function NQ(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function TQ(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock("forward",e):n.parentOffset<n.parent.content.size)?null:n}function AQ(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function MQ(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function IQ(e,t,n){let r,o,a=t.nodeBefore,i=t.nodeAfter;if(a.type.spec.isolating||i.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,a=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(a,a+1)||!o.isTextblock&&!fY(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let l=t.parent.canReplace(t.index(),t.index()+1);if(l&&(r=(o=a.contentMatchAt(a.childCount)).findWrapping(i.type))&&o.matchType(r[0]||i.type).validEnd){if(n){let o=t.pos+i.nodeSize,l=VK.empty;for(let e=r.length-1;e>=0;e--)l=VK.from(r[e].create(null,l));l=VK.from(a.copy(l));let s=e.tr.step(new aY(t.pos-1,o,t.pos,o,new UK(l,1,0),r.length,!0)),c=o+2*r.length;fY(s.doc,c)&&s.join(c),n(s.scrollIntoView())}return!0}let s=IY.findFrom(t,1),c=s&&s.$from.blockRange(s.$to),u=c&&cY(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(l&&_Q(i,"start",!0)&&_Q(a,"end")){let r=a,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let l=i,s=1;for(;!l.isTextblock;l=l.firstChild)s++;if(r.canReplace(r.childCount,r.childCount,l.content)){if(n){let r=VK.empty;for(let e=o.length-1;e>=0;e--)r=VK.from(o[e].copy(r));n(e.tr.step(new aY(t.pos-o.length,t.pos+i.nodeSize,t.pos+s,t.pos+i.nodeSize-s,new UK(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function PQ(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,a=o.depth;for(;o.node(a).isInline;){if(!a)return!1;a--}return!!o.node(a).isTextblock&&(n&&n(t.tr.setSelection(BY.create(t.doc,e<0?o.start(a):o.end(a)))),!0)}}const LQ=PQ(-1),RQ=PQ(1);function BQ(e,t=null){return function(n,r){let o=!1;for(let a=0;a<n.selection.ranges.length&&!o;a++){let{$from:{pos:r},$to:{pos:i}}=n.selection.ranges[a];n.doc.nodesBetween(r,i,((r,a)=>{if(o)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)o=!0;else{let t=n.doc.resolve(a),r=t.index();o=t.parent.canReplaceWith(r,r+1,e)}}))}if(!o)return!1;if(r){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:i}}=n.selection.ranges[r];o.setBlockType(a,i,e,t)}r(o.scrollIntoView())}return!0}}function DQ(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),l=!1,s=i;if(!i)return!1;if(i.depth>=2&&o.node(i.depth-1).type.compatibleContent(e)&&0==i.startIndex){if(0==o.index(i.depth-1))return!1;let e=n.doc.resolve(i.start-2);s=new iq(e,e,i.depth),i.endIndex<i.parent.childCount&&(i=new iq(o,n.doc.resolve(a.end(i.depth)),i.depth)),l=!0}let c=uY(s,e,t,i);return!!c&&(r&&r(function(e,t,n,r,o){let a=VK.empty;for(let u=n.length-1;u>=0;u--)a=VK.from(n[u].type.create(n[u].attrs,a));e.step(new aY(t.start-(r?2:0),t.end,t.start,t.end,new UK(a,0,0),n.length,!0));let i=0;for(let u=0;u<n.length;u++)n[u].type==o&&(i=u+1);let l=n.length-i,s=t.start+n.length-(r?2:0),c=t.parent;for(let u=t.startIndex,d=t.endIndex,p=!0;u<d;u++,p=!1)!p&&pY(e.doc,s,l)&&(e.split(s,l),s+=2*l),s+=c.child(u).nodeSize;return e}(n.tr,i,c,l,e).scrollIntoView()),!0)}}function VQ(e){return function(t,n){let{$from:r,$to:o}=t.selection,a=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!a&&(!n||(r.node(a.depth-1).type==e?function(e,t,n,r){let o=e.tr,a=r.end,i=r.$to.end(r.depth);a<i&&(o.step(new aY(a-1,i,a,i,new UK(VK.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new iq(o.doc.resolve(r.$from.pos),o.doc.resolve(i),r.depth));const l=cY(r);if(null==l)return!1;o.lift(r,l);let s=o.mapping.map(a,-1)-1;fY(o.doc,s)&&o.join(s);return t(o.scrollIntoView()),!0}(t,n,e,a):function(e,t,n){let r=e.tr,o=n.parent;for(let f=n.end,h=n.endIndex-1,m=n.startIndex;h>m;h--)f-=o.child(h).nodeSize,r.delete(f-1,f+1);let a=r.doc.resolve(n.start),i=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let l=0==n.startIndex,s=n.endIndex==o.childCount,c=a.node(-1),u=a.index(-1);if(!c.canReplace(u+(l?0:1),u+1,i.content.append(s?VK.empty:VK.from(o))))return!1;let d=a.pos,p=d+i.nodeSize;return r.step(new aY(d-(l?1:0),p+(s?1:0),d+1,p-1,new UK((l?VK.empty:VK.from(o.copy(VK.empty))).append(s?VK.empty:VK.from(o.copy(VK.empty))),l?0:1,s?0:1),l?0:1)),t(r.scrollIntoView()),!0}(t,n,a)))}}function jQ(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,a=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class FQ{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,a=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(a);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i=[],l=!!e,s=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(s,t),o=n(...e)(r);return i.push(o),c}]))),run:()=>(l||!t||s.getMeta("preventDispatch")||this.hasCustomState||a.dispatch(s),i.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=!1,o=e||n.tr,a=this.buildProps(o,r);return{...Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...a,dispatch:void 0})]))),chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:a}=r,i={tr:e,editor:r,view:a,state:jQ({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(i)])))}};return i}}class zQ{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){const n=this.callbacks[e];return n&&n.forEach((e=>e.apply(this,t))),this}off(e,t){const n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter((e=>e!==t)):delete this.callbacks[e]),this}removeAllListeners(){this.callbacks={}}}function $Q(e,t,n){if(void 0===e.config[t]&&e.parent)return $Q(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?$Q(e.parent,t,n):null})}return e.config[t]}function HQ(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function UQ(e){const t=[],{nodeExtensions:n,markExtensions:r}=HQ(e),o=[...n,...r],a={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=$Q(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage,extensions:o});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=$Q(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...a,...r};"function"==typeof(null==o?void 0:o.default)&&(o.default=o.default()),(null==o?void 0:o.isRequired)&&void 0===(null==o?void 0:o.default)&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),t}function WQ(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function GQ(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{if(n[e])if("class"===e){const r=t?t.split(" "):[],o=n[e]?n[e].split(" "):[],a=r.filter((e=>!o.includes(e)));n[e]=[...o,...a].join(" ")}else n[e]="style"===e?[n[e],t].join("; "):t;else n[e]=t})),n}),{})}function KQ(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>GQ(e,t)),{})}function qQ(e){return"function"==typeof e}function YQ(e,t=void 0,...n){return qQ(e)?t?e.bind(t)(...n):e(...n):e}function XQ(e,t){return"style"in e?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...o}}}}function ZQ(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function JQ(e,t){return t.nodes[e]||t.marks[e]||null}function QQ(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}const e0=(e,t=500)=>{let n="";const r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,((e,t,o,a)=>{var i,l;const s=(null===(l=(i=e.type.spec).toText)||void 0===l?void 0:l.call(i,{node:e,pos:t,parent:o,index:a}))||e.textContent||"%leaf%";n+=s.slice(0,Math.max(0,r-t))})),n};function t0(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class n0{constructor(e){this.find=e.find,this.handler=e.handler}}const r0=(e,t)=>{if(t0(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r};function o0(e){var t;const{editor:n,from:r,to:o,text:a,rules:i,plugin:l}=e,{view:s}=n;if(s.composing)return!1;const c=s.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=e0(c)+a;return i.forEach((e=>{if(u)return;const t=r0(d,e.find);if(!t)return;const i=s.state.tr,c=jQ({state:s.state,transaction:i}),p={from:r-(t[0].length-a.length),to:o},{commands:f,chain:h,can:m}=new FQ({editor:n,state:c});null!==e.handler({state:c,range:p,match:t,commands:f,chain:h,can:m})&&i.steps.length&&(i.setMeta(l,{transform:i,from:r,to:o,text:a}),s.dispatch(i),u=!0)})),u}function a0(e){const{editor:t,rules:n}=e,r=new ZY({state:{init:()=>null,apply(e,o){const a=e.getMeta(r);if(a)return a;const i=e.getMeta("applyInputRules");return!!i&&setTimeout((()=>{const{from:e,text:o}=i,a=e+o.length;o0({editor:t,from:e,to:a,text:o,rules:n,plugin:r})})),e.selectionSet||e.docChanged?null:o}},props:{handleTextInput:(e,o,a,i)=>o0({editor:t,from:o,to:a,text:i,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:o}=e.state.selection;o&&o0({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;const{$cursor:a}=e.state.selection;return!!a&&o0({editor:t,from:a.pos,to:a.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class i0{constructor(e){this.find=e.find,this.handler=e.handler}}const l0=(e,t,n)=>{if(t0(t))return[...e.matchAll(t)];const r=t(e,n);return r?r.map((t=>{const n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]};function s0(e){const{editor:t,rules:n}=e;let r=null,o=!1,a=!1,i="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,l="undefined"!=typeof DragEvent?new DragEvent("drop"):null;const s=({state:e,from:n,to:r,rule:o,pasteEvt:a})=>{const s=e.tr,c=jQ({state:e,transaction:s}),u=function(e){const{editor:t,state:n,from:r,to:o,rule:a,pasteEvent:i,dropEvent:l}=e,{commands:s,chain:c,can:u}=new FQ({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,o,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const p=Math.max(r,t),f=Math.min(o,t+e.content.size),h=e.textBetween(p-t,f-t,void 0,"");l0(h,a.find,i).forEach((e=>{if(void 0===e.index)return;const t=p+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:o,match:e,commands:s,chain:c,can:u,pasteEvent:i,dropEvent:l});d.push(f)}))})),d.every((e=>null!==e))}({editor:t,state:c,from:Math.max(n-1,0),to:r.b-1,rule:o,pasteEvent:a,dropEvent:l});if(u&&s.steps.length)return l="undefined"!=typeof DragEvent?new DragEvent("drop"):null,i="undefined"!=typeof ClipboardEvent?new ClipboardEvent("paste"):null,s};return n.map((e=>new ZY({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:(e,t)=>(a=r===e.dom.parentElement,l=t,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return i=t,o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(t,n,r)=>{const l=t[0],c="paste"===l.getMeta("uiEvent")&&!o,u="drop"===l.getMeta("uiEvent")&&!a,d=l.getMeta("applyPasteRules"),p=!!d;if(!c&&!u&&!p)return;if(p){const{from:t,text:n}=d,o=t+n.length,a=(e=>{var t;const n=new ClipboardEvent("paste",{clipboardData:new DataTransfer});return null===(t=n.clipboardData)||void 0===t||t.setData("text/html",e),n})(n);return s({rule:e,state:r,from:t,to:{b:o},pasteEvt:a})}const f=n.doc.content.findDiffStart(r.doc.content),h=n.doc.content.findDiffEnd(r.doc.content);return"number"==typeof f&&h&&f!==h.b?s({rule:e,state:r,from:f,to:h,pasteEvt:i}):void 0}})))}class c0{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=c0.resolve(e),this.schema=function(e,t){var n;const r=UQ(e),{nodeExtensions:o,markExtensions:a}=HQ(e),i=null===(n=o.find((e=>$Q(e,"topNode"))))||void 0===n?void 0:n.name,l=Object.fromEntries(o.map((n=>{const o=r.filter((e=>e.type===n.name)),a={name:n.name,options:n.options,storage:n.storage,editor:t},i=ZQ({...e.reduce(((e,t)=>{const r=$Q(t,"extendNodeSchema",a);return{...e,...r?r(n):{}}}),{}),content:YQ($Q(n,"content",a)),marks:YQ($Q(n,"marks",a)),group:YQ($Q(n,"group",a)),inline:YQ($Q(n,"inline",a)),atom:YQ($Q(n,"atom",a)),selectable:YQ($Q(n,"selectable",a)),draggable:YQ($Q(n,"draggable",a)),code:YQ($Q(n,"code",a)),whitespace:YQ($Q(n,"whitespace",a)),defining:YQ($Q(n,"defining",a)),isolating:YQ($Q(n,"isolating",a)),attrs:Object.fromEntries(o.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),l=YQ($Q(n,"parseHTML",a));l&&(i.parseDOM=l.map((e=>XQ(e,o))));const s=$Q(n,"renderHTML",a);s&&(i.toDOM=e=>s({node:e,HTMLAttributes:KQ(e,o)}));const c=$Q(n,"renderText",a);return c&&(i.toText=c),[n.name,i]}))),s=Object.fromEntries(a.map((n=>{const o=r.filter((e=>e.type===n.name)),a={name:n.name,options:n.options,storage:n.storage,editor:t},i=ZQ({...e.reduce(((e,t)=>{const r=$Q(t,"extendMarkSchema",a);return{...e,...r?r(n):{}}}),{}),inclusive:YQ($Q(n,"inclusive",a)),excludes:YQ($Q(n,"excludes",a)),group:YQ($Q(n,"group",a)),spanning:YQ($Q(n,"spanning",a)),code:YQ($Q(n,"code",a)),attrs:Object.fromEntries(o.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),l=YQ($Q(n,"parseHTML",a));l&&(i.parseDOM=l.map((e=>XQ(e,o))));const s=$Q(n,"renderHTML",a);return s&&(i.toDOM=e=>s({mark:e,HTMLAttributes:KQ(e,o)})),[n.name,i]})));return new _q({topNode:i,nodes:l,marks:s})}(this.extensions,t),this.setupExtensions()}static resolve(e){const t=c0.sort(c0.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=$Q(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){return e.sort(((e,t)=>{const n=$Q(e,"priority")||100,r=$Q(t,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=$Q(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:JQ(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=c0.sort([...this.extensions].reverse()),n=[],r=[],o=t.map((t=>{const o={name:t.name,options:t.options,storage:t.storage,editor:e,type:JQ(t.name,this.schema)},a=[],i=$Q(t,"addKeyboardShortcuts",o);let l={};if("mark"===t.type&&$Q(t,"exitable",o)&&(l.ArrowRight=()=>l1.handleExit({editor:e,mark:t})),i){const t=Object.fromEntries(Object.entries(i()).map((([t,n])=>[t,()=>n({editor:e})])));l={...l,...t}}const s=new ZY({props:{handleKeyDown:CQ(l)}});a.push(s);const c=$Q(t,"addInputRules",o);QQ(t,e.options.enableInputRules)&&c&&n.push(...c());const u=$Q(t,"addPasteRules",o);QQ(t,e.options.enablePasteRules)&&u&&r.push(...u());const d=$Q(t,"addProseMirrorPlugins",o);if(d){const e=d();a.push(...e)}return a})).flat();return[a0({editor:e,rules:n}),...s0({editor:e,rules:r}),...o]}get attributes(){return UQ(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=HQ(this.extensions);return Object.fromEntries(t.filter((e=>!!$Q(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:WQ(t.name,this.schema)},o=$Q(t,"addNodeView",r);if(!o)return[];return[t.name,(r,a,i,l)=>{const s=KQ(r,n);return o()({editor:e,node:r,getPos:i,decorations:l,HTMLAttributes:s,extension:t})}]})))}setupExtensions(){this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:JQ(e.name,this.schema)};if("mark"===e.type){(null===(t=YQ($Q(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=$Q(e,"onBeforeCreate",n),o=$Q(e,"onCreate",n),a=$Q(e,"onUpdate",n),i=$Q(e,"onSelectionUpdate",n),l=$Q(e,"onTransaction",n),s=$Q(e,"onFocus",n),c=$Q(e,"onBlur",n),u=$Q(e,"onDestroy",n);r&&this.editor.on("beforeCreate",r),o&&this.editor.on("create",o),a&&this.editor.on("update",a),i&&this.editor.on("selectionUpdate",i),l&&this.editor.on("transaction",l),s&&this.editor.on("focus",s),c&&this.editor.on("blur",c),u&&this.editor.on("destroy",u)}))}}function u0(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function d0(e,t){const n={...e};return u0(e)&&u0(t)&&Object.keys(t).forEach((r=>{u0(t[r])&&u0(e[r])?n[r]=d0(e[r],t[r]):n[r]=t[r]})),n}class p0{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=YQ($Q(this,"addOptions",{name:this.name}))),this.storage=YQ($Q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new p0(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>d0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new p0({...this.config,...e});return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=YQ($Q(t,"addOptions",{name:t.name})),t.storage=YQ($Q(t,"addStorage",{name:t.name,options:t.options})),t}}function f0(e,t,n){const{from:r,to:o}=t,{blockSeparator:a="\n\n",textSerializers:i={}}=n||{};let l="";return e.nodesBetween(r,o,((e,n,s,c)=>{var u;e.isBlock&&n>r&&(l+=a);const d=null==i?void 0:i[e.type.name];if(d)return s&&(l+=d({node:e,pos:n,parent:s,index:c,range:t})),!1;e.isText&&(l+=null===(u=null==e?void 0:e.text)||void 0===u?void 0:u.slice(Math.max(r,n)-n,o-n))})),l}function h0(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}const m0=p0.create({name:"clipboardTextSerializer",addOptions:()=>({blockSeparator:void 0}),addProseMirrorPlugins(){return[new ZY({key:new eX("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:a}=o,i=Math.min(...a.map((e=>e.$from.pos))),l=Math.max(...a.map((e=>e.$to.pos))),s=h0(n);return f0(r,{from:i,to:l},{...void 0!==this.options.blockSeparator?{blockSeparator:this.options.blockSeparator}:{},textSerializers:s})}}})]}});function v0(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:t0(t[r])?t[r].test(e[r]):t[r]===e[r]))}function g0(e,t,n={}){return e.find((e=>e.type===t&&v0(e.attrs,n)))}function b0(e,t,n={}){return!!g0(e,t,n)}function y0(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=g0([...r.node.marks],t,n);if(!o)return;let a=r.index,i=e.start()+r.offset,l=a+1,s=i+r.node.nodeSize;for(g0([...r.node.marks],t,n);a>0&&o.isInSet(e.parent.child(a-1).marks);)a-=1,i-=e.parent.child(a).nodeSize;for(;l<e.parent.childCount&&b0([...e.parent.child(l).marks],t,n);)s+=e.parent.child(l).nodeSize,l+=1;return{from:i,to:s}}function w0(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function k0(e){return e instanceof BY}function x0(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function E0(e,t=null){if(!t)return null;const n=IY.atStart(e),r=IY.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const o=n.from,a=r.to;return"all"===t?BY.create(e,x0(0,o,a),x0(e.content.size,o,a)):BY.create(e,x0(t,o,a),x0(t,o,a))}function C0(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}const S0=e=>{const t=e.childNodes;for(let n=t.length-1;n>=0;n-=1){const r=t[n];3===r.nodeType&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):1===r.nodeType&&S0(r)}return e};function O0(e){const t=`<body>${e}</body>`,n=(new window.DOMParser).parseFromString(t,"text/html").body;return S0(n)}function _0(e,t,n){n={slice:!0,parseOptions:{},...n};const r="string"==typeof e;if("object"==typeof e&&null!==e)try{return Array.isArray(e)&&e.length>0?VK.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(o){if(n.errorOnInvalidContent)throw new Error("[tiptap error]: Invalid JSON content",{cause:o});return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",o),_0("",t,n)}if(r){let r=t,o=!1,a="";n.errorOnInvalidContent&&(r=new _q({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:"inline*",group:"block",parseDOM:[{tag:"*",getAttrs:e=>(o=!0,a="string"==typeof e?e:e.outerHTML,null)}]}})}));const i=Tq.fromSchema(r),l=n.slice?i.parseSlice(O0(e),n.parseOptions).content:i.parse(O0(e),n.parseOptions);if(n.errorOnInvalidContent&&o)throw new Error("[tiptap error]: Invalid HTML content",{cause:new Error(`Invalid element found: ${a}`)});return l}return _0("",t,n)}function N0(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function T0(e,t,n={}){const{from:r,to:o,empty:a}=e.selection,i=t?WQ(t,e.schema):null,l=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),a=Math.min(o,t+e.nodeSize);l.push({node:e,from:n,to:a})}));const s=o-r,c=l.filter((e=>!i||i.name===e.node.type.name)).filter((e=>v0(e.node.attrs,n,{strict:!1})));if(a)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=s}function A0(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function M0(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function I0(e,t,n={},r={}){return _0(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}function P0(e,t){const n=w0(t,e.schema),{from:r,to:o,empty:a}=e.selection,i=[];a?(e.storedMarks&&i.push(...e.storedMarks),i.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{i.push(...e.marks)}));const l=i.find((e=>e.type.name===n.name));return l?{...l.attrs}:{}}function L0(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function R0(e){return t=>L0(t.$from,e)}function B0(e,t){const n=A0("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=WQ(t,e.schema),{from:r,to:o}=e.selection,a=[];e.doc.nodesBetween(r,o,(e=>{a.push(e)}));const i=a.reverse().find((e=>e.type.name===n.name));return i?{...i.attrs}:{}}(e,t):"mark"===n?P0(e,t):{}}function D0(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>!t.filter(((e,t)=>t!==n)).some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))))}function V0(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=y0(n.resolve(e-1),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{e&&void 0!==(null==e?void 0:e.nodeSize)&&r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function j0(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function F0(e,t,n={}){const{empty:r,ranges:o}=e.selection,a=t?w0(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!a||a.name===e.type.name)).find((e=>v0(e.attrs,n,{strict:!1})));let i=0;const l=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),a=Math.min(o,t+e.nodeSize);i+=a-n,l.push(...e.marks.map((e=>({mark:e,from:n,to:a}))))}))})),0===i)return!1;const s=l.filter((e=>!a||a.name===e.mark.type.name)).filter((e=>v0(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=l.filter((e=>!a||e.mark.type!==a&&e.mark.type.excludes(a))).reduce(((e,t)=>e+t.to-t.from),0);return(s>0?s+c:s)>=i}function z0(e,t){const{nodeExtensions:n}=HQ(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=YQ($Q(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}function $0(e){const t=e.type.createAndFill();return!!t&&e.eq(t)}function H0(e){return e instanceof VY}function U0(e,t,n){const r=e.state.doc.content.size,o=x0(t,0,r),a=x0(n,0,r),i=e.coordsAtPos(o),l=e.coordsAtPos(a,-1),s=Math.min(i.top,l.top),c=Math.max(i.bottom,l.bottom),u=Math.min(i.left,l.left),d=Math.max(i.right,l.right),p={top:s,bottom:c,left:u,right:d,width:d-u,height:c-s,x:u,y:s};return{...p,toJSON:()=>p}}function W0(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}const G0=(e,t)=>{const n=R0((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!fY(e.doc,n.pos)||(e.join(n.pos),!0)},K0=(e,t)=>{const n=R0((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!fY(e.doc,r)||(e.join(r),!0)};var q0=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,a=r.resolve(o.map(n)),i=r.resolve(o.map(n+e.nodeSize)),l=a.blockRange(i);if(!l)return;const s=cY(l);if(e.type.isTextblock){const{defaultType:e}=a.parent.contentMatchAt(a.index());t.setNodeMarkup(l.start,e)}(s||0===s)&&t.lift(l,s)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof FY||r.parent.inlineContent||o.parent.inlineContent)return!1;let a=MQ(o.parent.contentMatchAt(o.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,i=e.tr.insert(n,a.createAndFill());i.setSelection(BY.create(i.doc,n+1)),t(i.scrollIntoView())}return!0})(e,t),cut:(e,t)=>({editor:n,tr:r})=>{const{state:o}=n,a=o.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);const i=r.mapping.map(t);return r.insert(i,a.content),r.setSelection(new BY(r.doc.resolve(i-1))),!0},deleteCurrentNode:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;const o=e.selection.$anchor;for(let a=o.depth;a>0;a-=1){if(o.node(a).type===r.type){if(t){const t=o.before(a),n=o.after(a);e.delete(t,n).scrollIntoView()}return!0}}return!1},deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const o=WQ(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;e-=1){if(a.node(e).type===o){if(r){const n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),a=n.indexAfter(-1),i=MQ(o.contentMatchAt(a));if(!i||!o.canReplaceWith(a,a,i))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,i.createAndFill());o.setSelection(IY.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const a=w0(e,r.schema),{doc:i,selection:l}=n,{$from:s,from:c,to:u}=l;if(o){const e=y0(s,a,t);if(e&&e.from<=c&&e.to>=u){const t=BY.create(i,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:a})=>{t={scrollIntoView:!0,...t};const i=()=>{C0()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(a&&null===e&&!k0(n.state.selection))return i(),!0;const l=E0(o.doc,e)||n.state.selection,s=n.state.selection.eq(l);return a&&(s||o.setSelection(l),s&&o.storedMarks&&o.setStoredMarks(o.storedMarks),i()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:o,editor:a})=>{var i;if(o){let o;n={parseOptions:{},updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};try{o=_0(t,a.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions},errorOnInvalidContent:null!==(i=n.errorOnInvalidContent)&&void 0!==i?i:a.options.enableContentCheck})}catch(l){return!1}let{from:s,to:c}="number"==typeof e?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0;if(("type"in o?[o]:o).forEach((e=>{e.check(),u=!!u&&(e.isText&&0===e.marks.length),d=!!d&&e.isBlock})),s===c&&d){const{parent:e}=r.doc.resolve(s);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(s-=1,c+=1)}let p;u?(p=Array.isArray(t)?t.map((e=>e.text||"")).join(""):"object"==typeof t&&t&&t.text?t.text:t,r.insertText(p,s,c)):(p=o,r.replaceWith(s,c,p)),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof oY||o instanceof aY))return;const a=e.mapping.maps[r];let i=0;a.forEach(((e,t,n,r)=>{0===i&&(i=r)})),e.setSelection(IY.near(e.doc.resolve(i),n))}(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta("applyInputRules",{from:s,text:p}),n.applyPasteRules&&r.setMeta("applyPasteRules",{from:s,text:p})}return!0},joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=SQ(e,n);if(!r)return!1;let o=NQ(r);if(!o){let n=r.blockRange(),o=n&&cY(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let a=o.nodeBefore;if(!a.type.spec.isolating&&IQ(e,o,t))return!0;if(0==r.parent.content.size&&(_Q(a,"end")||VY.isSelectable(a))){let n=gY(e.doc,r.before(),r.after(),UK.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(_Q(a,"end")?IY.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):VY.create(r.doc,o.pos-a.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-a.nodeSize,o.pos).scrollIntoView()),0))})(e,t),joinDown:()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection;if(r instanceof VY){if(r.node.isTextblock||!fY(e.doc,r.to))return!1;n=r.to}else if(n=mY(e.doc,r.to,1),null==n)return!1;return t&&t(e.tr.join(n).scrollIntoView()),!0})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=TQ(e,n);if(!r)return!1;let o=AQ(r);if(!o)return!1;let a=o.nodeAfter;if(IQ(e,o,t))return!0;if(0==r.parent.content.size&&(_Q(a,"start")||VY.isSelectable(a))){let n=gY(e.doc,r.before(),r.after(),UK.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(_Q(a,"start")?IY.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):VY.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!a.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+a.nodeSize).scrollIntoView()),0))})(e,t),joinItemBackward:()=>({state:e,dispatch:t,tr:n})=>{try{const r=mY(e.doc,e.selection.$from.pos,-1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch(r){return!1}},joinItemForward:()=>({state:e,dispatch:t,tr:n})=>{try{const r=mY(e.doc,e.selection.$from.pos,1);return null!=r&&(n.join(r,2),t&&t(n),!0)}catch(r){return!1}},joinTextblockBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=SQ(e,n);if(!r)return!1;let o=NQ(r);return!!o&&OQ(e,o,t)})(e,t),joinTextblockForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let r=TQ(e,n);if(!r)return!1;let o=AQ(r);return!!o&&OQ(e,o,t)})(e,t),joinUp:()=>({state:e,dispatch:t})=>((e,t)=>{let n,r=e.selection,o=r instanceof VY;if(o){if(r.node.isTextblock||!fY(e.doc,r.from))return!1;n=r.from}else if(n=mY(e.doc,r.from,-1),null==n)return!1;if(t){let r=e.tr.join(n);o&&r.setSelection(VY.create(r.doc,n-e.doc.resolve(n).nodeBefore.nodeSize)),t(r.scrollIntoView())}return!0})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:o})=>{const a=function(e){const t=e.split(/-(?!$)/);let n,r,o,a,i=t[t.length-1];"Space"===i&&(i=" ");for(let l=0;l<t.length-1;l+=1){const e=t[l];if(/^(cmd|meta|m)$/i.test(e))a=!0;else if(/^a(lt)?$/i.test(e))n=!0;else if(/^(c|ctrl|control)$/i.test(e))r=!0;else if(/^s(hift)?$/i.test(e))o=!0;else{if(!/^mod$/i.test(e))throw new Error(`Unrecognized modifier name: ${e}`);C0()||N0()?a=!0:r=!0}}return n&&(i=`Alt-${i}`),r&&(i=`Ctrl-${i}`),a&&(i=`Meta-${i}`),o&&(i=`Shift-${i}`),i}(e).split(/-(?!$)/),i=a.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),l=new KeyboardEvent("keydown",{key:"Space"===i?" ":i,altKey:a.includes("Alt"),ctrlKey:a.includes("Ctrl"),metaKey:a.includes("Meta"),shiftKey:a.includes("Shift"),bubbles:!0,cancelable:!0}),s=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,l)))}));return null==s||s.steps.forEach((e=>{const t=e.map(r.mapping);t&&o&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!T0(n,WQ(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),a=o&&cY(o);return null!=a&&(t&&t(e.tr.lift(o,a).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(pY(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&cY(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>VQ(WQ(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null;const l=A0("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(a=WQ(e,r.schema)),"mark"===l&&(i=w0(e,r.schema)),o&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{a&&a===e.type&&n.setNodeMarkup(r,void 0,M0(e.attrs,t)),i&&e.marks.length&&e.marks.forEach((o=>{i===o.type&&n.addMark(r,r+e.nodeSize,i.create(M0(o.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;a=NQ(r)}let i=a&&a.nodeBefore;return!(!i||!VY.isSelectable(i)||(t&&t(e.tr.setSelection(VY.create(e.doc,a.pos-i.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,a=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;a=AQ(r)}let i=a&&a.nodeAfter;return!(!i||!VY.isSelectable(i)||(t&&t(e.tr.setSelection(VY.create(e.doc,a.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:o}=e.selection,a=r.sharedDepth(o);return 0!=a&&(n=r.before(a),t&&t(e.tr.setSelection(VY.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>RQ(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>LQ(e,t),setContent:(e,t=!1,n={},r={})=>({editor:o,tr:a,dispatch:i,commands:l})=>{var s,c;const{doc:u}=a;if("full"!==n.preserveWhitespace){const l=I0(e,o.schema,n,{errorOnInvalidContent:null!==(s=r.errorOnInvalidContent)&&void 0!==s?s:o.options.enableContentCheck});return i&&a.replaceWith(0,u.content.size,l).setMeta("preventUpdate",!t),!0}return i&&a.setMeta("preventUpdate",!t),l.insertContentAt({from:0,to:u.content.size},e,{parseOptions:n,errorOnInvalidContent:null!==(c=r.errorOnInvalidContent)&&void 0!==c?c:o.options.enableContentCheck})},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:a}=n,{empty:i,ranges:l}=a,s=w0(e,r.schema);if(o)if(i){const e=P0(r,s);n.addStoredMark(s.create({...e,...t}))}else l.forEach((e=>{const o=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(o,a,((e,r)=>{const i=Math.max(r,o),l=Math.min(r+e.nodeSize,a);e.marks.find((e=>e.type===s))?e.marks.forEach((e=>{s===e.type&&n.addMark(i,l,s.create({...e.attrs,...t}))})):n.addMark(i,l,s.create(t))}))}));return function(e,t,n){var r;const{selection:o}=t;let a=null;if(k0(o)&&(a=o.$cursor),a){const t=null!==(r=e.storedMarks)&&void 0!==r?r:a.marks();return!!n.isInSet(t)||!t.some((e=>e.type.excludes(n)))}const{ranges:i}=o;return i.some((({$from:t,$to:r})=>{let o=0===t.depth&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,((e,t,r)=>{if(o)return!1;if(e.isInline){const t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some((e=>e.type.excludes(n)));o=t&&a}return!o})),o}))}(r,n,s)},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{const a=WQ(e,n.schema);return a.isTextblock?o().command((({commands:e})=>!!BQ(a,t)(n)||e.clearNodes())).command((({state:e})=>BQ(a,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=x0(e,0,n.content.size),o=VY.create(n,r);t.setSelection(o)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,a=BY.atStart(n).from,i=BY.atEnd(n).to,l=x0(r,a,i),s=x0(o,a,i),c=BY.create(n,l,s);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=WQ(e,t.schema);return(o=r,function(e,t){let{$from:n,$to:r}=e.selection,a=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!a)return!1;let i=a.startIndex;if(0==i)return!1;let l=a.parent,s=l.child(i-1);if(s.type!=o)return!1;if(t){let n=s.lastChild&&s.lastChild.type==l.type,r=VK.from(n?o.create():null),i=new UK(VK.from(o.create(null,VK.from(l.type.create(null,r)))),n?3:1,0),c=a.start,u=a.end;t(e.tr.step(new aY(c-(n?3:1),u,c,u,i,1,!0)).scrollIntoView())}return!0})(t,n);var o},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:a,doc:i}=t,{$from:l,$to:s}=a,c=j0(o.extensionManager.attributes,l.node().type.name,l.node().attrs);if(a instanceof VY&&a.node.isBlock)return!(!l.parentOffset||!pY(i,l.pos))&&(r&&(e&&W0(n,o.extensionManager.splittableMarks),t.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const r=s.parentOffset===s.parent.content.size;a instanceof BY&&t.deleteSelection();const i=0===l.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(l.node(-1).contentMatchAt(l.indexAfter(-1)));let u=r&&i?[{type:i,attrs:c}]:void 0,d=pY(t.doc,t.mapping.map(l.pos),1,u);if(u||d||!pY(t.doc,t.mapping.map(l.pos),1,i?[{type:i}]:void 0)||(d=!0,u=i?[{type:i,attrs:c}]:void 0),d&&(t.split(t.mapping.map(l.pos),1,u),i&&!r&&!l.parentOffset&&l.parent.type!==i)){const e=t.mapping.map(l.before()),n=t.doc.resolve(e);l.node(-1).canReplaceWith(n.index(),n.index()+1,i)&&t.setNodeMarkup(t.mapping.map(l.before()),i)}e&&W0(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:o})=>{var a;const i=WQ(e,n.schema),{$from:l,$to:s}=n.selection,c=n.selection.node;if(c&&c.isBlock||l.depth<2||!l.sameParent(s))return!1;const u=l.node(-1);if(u.type!==i)return!1;const d=o.extensionManager.attributes;if(0===l.parent.content.size&&l.node(-1).childCount===l.indexAfter(-1)){if(2===l.depth||l.node(-3).type!==i||l.index(-2)!==l.node(-2).childCount-1)return!1;if(r){let e=VK.empty;const n=l.index(-1)?1:l.index(-2)?2:3;for(let t=l.depth-n;t>=l.depth-3;t-=1)e=VK.from(l.node(t).copy(e));const r=l.indexAfter(-1)<l.node(-2).childCount?1:l.indexAfter(-2)<l.node(-3).childCount?2:3,o=j0(d,l.node().type.name,l.node().attrs),s=(null===(a=i.contentMatch.defaultType)||void 0===a?void 0:a.createAndFill(o))||void 0;e=e.append(VK.from(i.createAndFill(null,s)||void 0));const c=l.before(l.depth-(n-1));t.replace(c,l.after(-r),new UK(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(BY.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const p=s.pos===l.end()?u.contentMatchAt(0).defaultType:null,f=j0(d,u.type.name,u.attrs),h=j0(d,l.node().type.name,l.node().attrs);t.delete(l.pos,s.pos);const m=p?[{type:i,attrs:f},{type:p,attrs:h}]:[{type:i,attrs:f}];if(!pY(t.doc,l.pos,2))return!1;if(r){const{selection:e,storedMarks:a}=n,{splittableMarks:i}=o.extensionManager,s=a||e.$to.parentOffset&&e.$from.marks();if(t.split(l.pos,2,m).scrollIntoView(),!s||!r)return!0;const c=s.filter((e=>i.includes(e.type.name)));t.ensureMarks(c)}return!0},toggleList:(e,t,n,r={})=>({editor:o,tr:a,state:i,dispatch:l,chain:s,commands:c,can:u})=>{const{extensions:d,splittableMarks:p}=o.extensionManager,f=WQ(e,i.schema),h=WQ(t,i.schema),{selection:m,storedMarks:v}=i,{$from:g,$to:b}=m,y=g.blockRange(b),w=v||m.$to.parentOffset&&m.$from.marks();if(!y)return!1;const k=R0((e=>z0(e.type.name,d)))(m);if(y.depth>=1&&k&&y.depth-k.depth<=1){if(k.node.type===f)return c.liftListItem(h);if(z0(k.node.type.name,d)&&f.validContent(k.node.content)&&l)return s().command((()=>(a.setNodeMarkup(k.pos,f),!0))).command((()=>G0(a,f))).command((()=>K0(a,f))).run()}return n&&w&&l?s().command((()=>{const e=u().wrapInList(f,r),t=w.filter((e=>p.includes(e.type.name)));return a.ensureMarks(t),!!e||c.clearNodes()})).wrapInList(f,r).command((()=>G0(a,f))).command((()=>K0(a,f))).run():s().command((()=>!!u().wrapInList(f,r)||c.clearNodes())).wrapInList(f,r).command((()=>G0(a,f))).command((()=>K0(a,f))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:a=!1}=n,i=w0(e,r.schema);return F0(r,i,t)?o.unsetMark(i,{extendEmptyMarkRange:a}):o.setMark(i,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{const a=WQ(e,r.schema),i=WQ(t,r.schema);return T0(r,a,n)?o.setNode(i):o.setNode(a,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const o=WQ(e,n.schema);return T0(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let a;if(o.spec.isInputRules&&(a=o.getState(e))){if(t){const t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(a.text){const n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var a;const{extendEmptyMarkRange:i=!1}=t,{selection:l}=n,s=w0(e,r.schema),{$from:c,empty:u,ranges:d}=l;if(!o)return!0;if(u&&i){let{from:e,to:t}=l;const r=null===(a=c.marks().find((e=>e.type===s)))||void 0===a?void 0:a.attrs,o=y0(c,s,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,s)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,s)}));return n.removeStoredMark(s),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let a=null,i=null;const l=A0("string"==typeof e?e:e.name,r.schema);return!!l&&("node"===l&&(a=WQ(e,r.schema)),"mark"===l&&(i=w0(e,r.schema)),o&&n.selection.ranges.forEach((e=>{const o=e.$from.pos,l=e.$to.pos;r.doc.nodesBetween(o,l,((e,r)=>{a&&a===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),i&&e.marks.length&&e.marks.forEach((a=>{if(i===a.type){const s=Math.max(r,o),c=Math.min(r+e.nodeSize,l);n.addMark(s,c,i.create({...a.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:a}=n.selection,i=o.blockRange(a),l=i&&uY(i,e,t);return!!l&&(r&&r(n.tr.wrap(i,l).scrollIntoView()),!0)}}(WQ(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>DQ(WQ(e,n.schema),t)(n,r)});const Y0=p0.create({name:"commands",addCommands:()=>({...q0})}),X0=p0.create({name:"editable",addProseMirrorPlugins(){return[new ZY({key:new eX("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Z0=p0.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new ZY({key:new eX("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),J0=p0.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:o,$anchor:a}=n,{pos:i,parent:l}=a,s=a.parent.isTextblock&&i>0?t.doc.resolve(i-1):a,c=s.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=c&&1===s.parent.childCount?u===a.pos:IY.atStart(r).from===i;return!(!o||!l.type.isTextblock||l.textContent.length||!d||d&&"paragraph"===a.parent.type.name)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return C0()||N0()?o:r},addProseMirrorPlugins(){return[new ZY({key:new eX("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:o,to:a}=t.selection,i=IY.atStart(t.doc).from,l=IY.atEnd(t.doc).to;if(r||!(o===i&&a===l))return;if(!(0===n.doc.textBetween(0,n.doc.content.size," "," ").length))return;const s=n.tr,c=jQ({state:n,transaction:s}),{commands:u}=new FQ({editor:this.editor,state:c});return u.clearNodes(),s.steps.length?s:void 0}})]}}),Q0=p0.create({name:"tabindex",addProseMirrorPlugins(){return[new ZY({key:new eX("tabindex"),props:{attributes:()=>this.editor.isEditable?{tabindex:"0"}:{}}})]}});class e1{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){var e;return null!==(e=this.actualDepth)&&void 0!==e?e:this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(0===this.content.size)return void console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+(this.node.isText?0:1)}get parent(){if(0===this.depth)return null;const e=this.resolvedPos.start(this.resolvedPos.depth-1),t=this.resolvedPos.doc.resolve(e);return new e1(t,this.editor)}get before(){let e=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.from-3)),new e1(e,this.editor)}get after(){let e=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return e.depth!==this.depth&&(e=this.resolvedPos.doc.resolve(this.to+3)),new e1(e,this.editor)}get children(){const e=[];return this.node.content.forEach(((t,n)=>{const r=t.isBlock&&!t.isTextblock,o=this.pos+n+1,a=this.resolvedPos.doc.resolve(o);if(!r&&a.depth<=this.depth)return;const i=new e1(a,this.editor,r,r?t:null);r&&(i.actualDepth=this.depth+1),e.push(new e1(a,this.editor,r,r?t:null))})),e}get firstChild(){return this.children[0]||null}get lastChild(){const e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e)if(Object.keys(t).length>0){const e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];if(e[o]!==t[o])break}}else n=r;r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||0===this.children.length)return r;const o=Object.keys(t);return this.children.forEach((a=>{if(!(n&&r.length>0)){if(a.node.type.name===e){o.every((e=>t[e]===a.node.attrs[e]))&&r.push(a)}n&&r.length>0||(r=r.concat(a.querySelectorAll(e,t,n)))}})),r}setAttribute(e){const t=this.editor.state.selection;this.editor.chain().setTextSelection(this.from).updateAttributes(this.node.type.name,e).setTextSelection(t.from).run()}}let t1=class extends zQ{constructor(e={}){super(),this.isFocused=!1,this.extensionStorage={},this.options={element:document.createElement("div"),content:"",injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,onBeforeCreate:()=>null,onCreate:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e}},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on("beforeCreate",this.options.onBeforeCreate),this.emit("beforeCreate",{editor:this}),this.on("contentError",this.options.onContentError),this.createView(),this.injectCSS(),this.on("create",this.options.onCreate),this.on("update",this.options.onUpdate),this.on("selectionUpdate",this.options.onSelectionUpdate),this.on("transaction",this.options.onTransaction),this.on("focus",this.options.onFocus),this.on("blur",this.options.onBlur),this.on("destroy",this.options.onDestroy),window.setTimeout((()=>{this.isDestroyed||(this.commands.focus(this.options.autofocus),this.emit("create",{editor:this}))}),0)}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager.chain()}can(){return this.commandManager.can()}injectCSS(){this.options.injectCSS&&document&&(this.css=function(e,t){const n=document.querySelector("style[data-tiptap-style]");if(null!==n)return n;const r=document.createElement("style");return t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-style",""),r.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(r),r}('.ProseMirror {\n position: relative;\n}\n\n.ProseMirror {\n word-wrap: break-word;\n white-space: pre-wrap;\n white-space: break-spaces;\n -webkit-font-variant-ligatures: none;\n font-variant-ligatures: none;\n font-feature-settings: "liga" 0; /* the above doesn\'t seem to work in Edge */\n}\n\n.ProseMirror [contenteditable="false"] {\n white-space: normal;\n}\n\n.ProseMirror [contenteditable="false"] [contenteditable="true"] {\n white-space: pre-wrap;\n}\n\n.ProseMirror pre {\n white-space: pre-wrap;\n}\n\nimg.ProseMirror-separator {\n display: inline !important;\n border: none !important;\n margin: 0 !important;\n width: 1px !important;\n height: 1px !important;\n}\n\n.ProseMirror-gapcursor {\n display: none;\n pointer-events: none;\n position: absolute;\n margin: 0;\n}\n\n.ProseMirror-gapcursor:after {\n content: "";\n display: block;\n position: absolute;\n top: -2px;\n width: 20px;\n border-top: 1px solid black;\n animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;\n}\n\n@keyframes ProseMirror-cursor-blink {\n to {\n visibility: hidden;\n }\n}\n\n.ProseMirror-hideselection *::selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection *::-moz-selection {\n background: transparent;\n}\n\n.ProseMirror-hideselection * {\n caret-color: transparent;\n}\n\n.ProseMirror-focused .ProseMirror-gapcursor {\n display: block;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0\n}',this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.view&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps(this.options.editorProps),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit("update",{editor:this,transaction:this.state.tr})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get state(){return this.view.state}registerPlugin(e,t){const n=qQ(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});this.view.updateState(r)}unregisterPlugin(e){if(this.isDestroyed)return;const t="string"==typeof e?`${e}$`:e.key,n=this.state.reconfigure({plugins:this.state.plugins.filter((e=>!e.key.startsWith(t)))});this.view.updateState(n)}createExtensionManager(){var e,t;const n=[...this.options.enableCoreExtensions?[X0,m0.configure({blockSeparator:null===(t=null===(e=this.options.coreExtensionOptions)||void 0===e?void 0:e.clipboardTextSerializer)||void 0===t?void 0:t.blockSeparator}),Y0,Z0,J0,Q0]:[],...this.options.extensions].filter((e=>["extension","node","mark"].includes(null==e?void 0:e.type)));this.extensionManager=new c0(n,this)}createCommandManager(){this.commandManager=new FQ({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createView(){let e;try{e=I0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(r){if(!(r instanceof Error&&["[tiptap error]: Invalid JSON content","[tiptap error]: Invalid HTML content"].includes(r.message)))throw r;this.emit("contentError",{editor:this,error:r,disableCollaboration:()=>{this.options.extensions=this.options.extensions.filter((e=>"collaboration"!==e.name)),this.createExtensionManager()}}),e=I0(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1})}const t=E0(e,this.options.autofocus);this.view=new cQ(this.options.element,{...this.options.editorProps,dispatchTransaction:this.dispatchTransaction.bind(this),state:YY.create({doc:e,selection:t||void 0})});const n=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(n),this.createNodeViews(),this.prependClass();this.view.dom.editor=this}createNodeViews(){this.view.setProps({nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`tiptap ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;const t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction)return this.capturedTransaction?void e.steps.forEach((e=>{var t;return null===(t=this.capturedTransaction)||void 0===t?void 0:t.step(e)})):void(this.capturedTransaction=e);const t=this.state.apply(e),n=!this.state.selection.eq(t.selection);this.view.updateState(t),this.emit("transaction",{editor:this,transaction:e}),n&&this.emit("selectionUpdate",{editor:this,transaction:e});const r=e.getMeta("focus"),o=e.getMeta("blur");r&&this.emit("focus",{editor:this,event:r.event,transaction:e}),o&&this.emit("blur",{editor:this,event:o.event,transaction:e}),e.docChanged&&!e.getMeta("preventUpdate")&&this.emit("update",{editor:this,transaction:e})}getAttributes(e){return B0(this.state,e)}isActive(e,t){const n="string"==typeof e?e:null,r="string"==typeof e?t:e;return function(e,t,n={}){if(!t)return T0(e,null,n)||F0(e,null,n);const r=A0(t,e.schema);return"node"===r?T0(e,t,n):"mark"===r&&F0(e,t,n)}(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return function(e,t){const n=jq.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement("div");return r.appendChild(n),r.innerHTML}(this.state.doc.content,this.schema)}getText(e){const{blockSeparator:t="\n\n",textSerializers:n={}}=e||{};return function(e,t){return f0(e,{from:0,to:e.content.size},t)}(this.state.doc,{blockSeparator:t,textSerializers:{...h0(this.schema),...n}})}get isEmpty(){return $0(this.state.doc)}getCharacterCount(){return console.warn('[tiptap warn]: "editor.getCharacterCount()" is deprecated. Please use "editor.storage.characterCount.characters()" instead.'),this.state.doc.content.size-2}destroy(){this.emit("destroy"),this.view&&this.view.destroy(),this.removeAllListeners()}get isDestroyed(){var e;return!(null===(e=this.view)||void 0===e?void 0:e.docView)}$node(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelector(e,t))||null}$nodes(e,t){var n;return(null===(n=this.$doc)||void 0===n?void 0:n.querySelectorAll(e,t))||null}$pos(e){const t=this.state.doc.resolve(e);return new e1(t,this)}get $doc(){return this.$pos(0)}};function n1(e){return new n0({find:e.find,handler:({state:t,range:n,match:r})=>{const o=YQ(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:a}=t,i=r[r.length-1],l=r[0];if(i){const r=l.search(/\S/),s=n.from+l.indexOf(i),c=s+i.length;if(V0(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>s)).length)return null;c<n.to&&a.delete(c,n.to),s>n.from&&a.delete(n.from+r,s);const u=n.from+r+i.length;a.addMark(n.from+r,u,e.type.create(o||{})),a.removeStoredMark(e.type)}}})}function r1(e){return new n0({find:e.find,handler:({state:t,range:n,match:r})=>{const o=YQ(e.getAttributes,void 0,r)||{},{tr:a}=t,i=n.from;let l=n.to;const s=e.type.create(o);if(r[1]){let e=i+r[0].lastIndexOf(r[1]);e>l?e=l:l=e+r[1].length;const t=r[0][r[0].length-1];a.insertText(t,i+r[0].length-1),a.replaceWith(e,l,s)}else if(r[0]){const t=e.type.isInline?i:i-1;a.insert(t,e.type.create(o)).delete(a.mapping.map(i),a.mapping.map(l))}a.scrollIntoView()}})}function o1(e){return new n0({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),a=YQ(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)}})}function a1(e){return new n0({find:e.find,handler:({state:t,range:n,match:r})=>{let o=e.replace,a=n.from;const i=n.to;if(r[1]){const e=r[0].lastIndexOf(r[1]);o+=r[0].slice(e+r[1].length),a+=e;const t=a-i;t>0&&(o=r[0].slice(e-t,e)+o,a=i)}t.tr.insertText(o,a,i)}})}function i1(e){return new n0({find:e.find,handler:({state:t,range:n,match:r,chain:o})=>{const a=YQ(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),l=i.doc.resolve(n.from).blockRange(),s=l&&uY(l,e.type,a);if(!s)return null;if(i.wrap(l,s),e.keepMarks&&e.editor){const{selection:n,storedMarks:r}=t,{splittableMarks:o}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){const e=a.filter((e=>o.includes(e.type.name)));i.ensureMarks(e)}}if(e.keepAttributes){const t="bulletList"===e.type.name||"orderedList"===e.type.name?"listItem":"taskList";o().updateAttributes(t,a).run()}const c=i.doc.resolve(n.from-1).nodeBefore;c&&c.type===e.type&&fY(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,c))&&i.join(n.from-1)}})}class l1{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=YQ($Q(this,"addOptions",{name:this.name}))),this.storage=YQ($Q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new l1(e)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>d0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(e={}){const t=new l1(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=YQ($Q(t,"addOptions",{name:t.name})),t.storage=YQ($Q(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const a=o.find((e=>(null==e?void 0:e.type.name)===t.name));return a&&n.removeStoredMark(a),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}let s1=class e{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&Object.keys(e.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=YQ($Q(this,"addOptions",{name:this.name}))),this.storage=YQ($Q(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(t={}){return new e(t)}configure(e={}){const t=this.extend({...this.config,addOptions:()=>d0(this.options,e)});return t.name=this.name,t.parent=this.parent,t}extend(t={}){const n=new e(t);return n.parent=this,this.child=n,n.name=t.name?t.name:n.parent.name,t.defaultOptions&&Object.keys(t.defaultOptions).length>0&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${n.name}".`),n.options=YQ($Q(n,"addOptions",{name:n.name})),n.storage=YQ($Q(n,"addStorage",{name:n.name,options:n.options})),n}};class c1{constructor(e,t,n){this.isDragging=!1,this.component=e,this.editor=t.editor,this.options={stopEvent:null,ignoreMutation:null,...n},this.extension=t.extension,this.node=t.node,this.decorations=t.decorations,this.getPos=t.getPos,this.mount()}mount(){}get dom(){return this.editor.view.dom}get contentDOM(){return null}onDragStart(e){var t,n,r,o,a,i,l;const{view:s}=this.editor,c=e.target,u=3===c.nodeType?null===(t=c.parentElement)||void 0===t?void 0:t.closest("[data-drag-handle]"):c.closest("[data-drag-handle]");if(!this.dom||(null===(n=this.contentDOM)||void 0===n?void 0:n.contains(c))||!u)return;let d=0,p=0;if(this.dom!==u){const t=this.dom.getBoundingClientRect(),n=u.getBoundingClientRect(),l=null!==(r=e.offsetX)&&void 0!==r?r:null===(o=e.nativeEvent)||void 0===o?void 0:o.offsetX,s=null!==(a=e.offsetY)&&void 0!==a?a:null===(i=e.nativeEvent)||void 0===i?void 0:i.offsetY;d=n.x-t.x+l,p=n.y-t.y+s}null===(l=e.dataTransfer)||void 0===l||l.setDragImage(this.dom,d,p);const f=VY.create(s.state.doc,this.getPos()),h=s.state.tr.setSelection(f);s.dispatch(h)}stopEvent(e){var t;if(!this.dom)return!1;if("function"==typeof this.options.stopEvent)return this.options.stopEvent({event:e});const n=e.target;if(!(this.dom.contains(n)&&!(null===(t=this.contentDOM)||void 0===t?void 0:t.contains(n))))return!1;const r=e.type.startsWith("drag"),o="drop"===e.type;if((["INPUT","BUTTON","SELECT","TEXTAREA"].includes(n.tagName)||n.isContentEditable)&&!o&&!r)return!0;const{isEditable:a}=this.editor,{isDragging:i}=this,l=!!this.node.type.spec.draggable,s=VY.isSelectable(this.node),c="copy"===e.type,u="paste"===e.type,d="cut"===e.type,p="mousedown"===e.type;if(!l&&s&&r&&e.preventDefault(),l&&r&&!i)return e.preventDefault(),!1;if(l&&a&&!i&&p){const e=n.closest("[data-drag-handle]");e&&(this.dom===e||this.dom.contains(e))&&(this.isDragging=!0,document.addEventListener("dragend",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("drop",(()=>{this.isDragging=!1}),{once:!0}),document.addEventListener("mouseup",(()=>{this.isDragging=!1}),{once:!0}))}return!(i||o||c||u||d||p&&s)}ignoreMutation(e){if(!this.dom||!this.contentDOM)return!0;if("function"==typeof this.options.ignoreMutation)return this.options.ignoreMutation({mutation:e});if(this.node.isLeaf||this.node.isAtom)return!0;if("selection"===e.type)return!1;if(this.dom.contains(e.target)&&"childList"===e.type&&(C0()||"Android"===navigator.platform||/android/i.test(navigator.userAgent))&&this.editor.isFocused){if([...Array.from(e.addedNodes),...Array.from(e.removedNodes)].every((e=>e.isContentEditable)))return!1}return this.contentDOM===e.target&&"attributes"===e.type||!this.contentDOM.contains(e.target)}updateAttributes(e){this.editor.commands.command((({tr:t})=>{const n=this.getPos();return t.setNodeMarkup(n,void 0,{...this.node.attrs,...e}),!0}))}deleteNode(){const e=this.getPos(),t=e+this.node.nodeSize;this.editor.commands.deleteRange({from:e,to:t})}}function u1(e){return new i0({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:o})=>{const a=YQ(e.getAttributes,void 0,r,o);if(!1===a||null===a)return null;const{tr:i}=t,l=r[r.length-1],s=r[0];let c=n.to;if(l){const r=s.search(/\S/),o=n.from+s.indexOf(l),u=o+l.length;if(V0(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>o)).length)return null;u<n.to&&i.delete(u,n.to),o>n.from&&i.delete(n.from+r,o),c=n.from+r+l.length,i.addMark(n.from+r,c,e.type.create(a||{})),i.removeStoredMark(e.type)}}})}var d1="tippy-content",p1="tippy-backdrop",f1="tippy-arrow",h1="tippy-svg-arrow",m1={passive:!0,capture:!0},v1=function(){return document.body};function g1(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function b1(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function y1(e,t){return"function"==typeof e?e.apply(void 0,t):e}function w1(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function k1(e){return[].concat(e)}function x1(e,t){-1===e.indexOf(t)&&e.push(t)}function E1(e){return[].slice.call(e)}function C1(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function S1(){return document.createElement("div")}function O1(e){return["Element","Fragment"].some((function(t){return b1(e,t)}))}function _1(e){return O1(e)?[e]:function(e){return b1(e,"NodeList")}(e)?E1(e):Array.isArray(e)?e:E1(document.querySelectorAll(e))}function N1(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function T1(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function A1(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function M1(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var I1={isTouch:!1},P1=0;function L1(){I1.isTouch||(I1.isTouch=!0,window.performance&&document.addEventListener("mousemove",R1))}function R1(){var e=performance.now();e-P1<20&&(I1.isTouch=!1,document.removeEventListener("mousemove",R1)),P1=e}function B1(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var D1=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto,V1=Object.assign({appendTo:v1,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},{animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),j1=Object.keys(V1);function F1(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,a=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=V1[o])?r:a);return t}),{});return Object.assign({},e,t)}function z1(e,t){var n=Object.assign({},t,{content:y1(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(F1(Object.assign({},V1,{plugins:t}))):j1).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(o){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},V1.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}var $1=function(){return"innerHTML"};function H1(e,t){e[$1()]=t}function U1(e){var t=S1();return!0===e?t.className=f1:(t.className=h1,O1(e)?t.appendChild(e):H1(t,e)),t}function W1(e,t){O1(t.content)?(H1(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?H1(e,t.content):e.textContent=t.content)}function G1(e){var t=e.firstElementChild,n=E1(t.children);return{box:t,content:n.find((function(e){return e.classList.contains(d1)})),arrow:n.find((function(e){return e.classList.contains(f1)||e.classList.contains(h1)})),backdrop:n.find((function(e){return e.classList.contains(p1)}))}}function K1(e){var t=S1(),n=S1();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=S1();function o(n,r){var o=G1(t),a=o.box,i=o.content,l=o.arrow;r.theme?a.setAttribute("data-theme",r.theme):a.removeAttribute("data-theme"),"string"==typeof r.animation?a.setAttribute("data-animation",r.animation):a.removeAttribute("data-animation"),r.inertia?a.setAttribute("data-inertia",""):a.removeAttribute("data-inertia"),a.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?a.setAttribute("role",r.role):a.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||W1(i,e.props),r.arrow?l?n.arrow!==r.arrow&&(a.removeChild(l),a.appendChild(U1(r.arrow))):a.appendChild(U1(r.arrow)):l&&a.removeChild(l)}return r.className=d1,r.setAttribute("data-state","hidden"),W1(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}K1.$$tippy=!0;var q1=1,Y1=[],X1=[];function Z1(e,t){var n,r,o,a,i,l,s,c,u=z1(e,Object.assign({},V1,F1(C1(t)))),d=!1,p=!1,f=!1,h=!1,m=[],v=w1(K,u.interactiveDebounce),g=q1++,b=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),y={id:g,reference:e,popper:S1(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:b,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){if(y.state.isDestroyed)return;P("onBeforeUpdate",[y,t]),W();var n=y.props,r=z1(e,Object.assign({},n,C1(t),{ignoreAttributes:!0}));y.props=r,U(),n.interactiveDebounce!==r.interactiveDebounce&&(B(),v=w1(K,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?k1(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");R(),I(),x&&x(n,r);y.popperInstance&&(Z(),Q().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));P("onAfterUpdate",[y,t])},setContent:function(e){y.setProps({content:e})},show:function(){var e=y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=I1.isTouch&&!y.props.touch,o=g1(y.props.duration,0,V1.duration);if(e||t||n||r)return;if(N().hasAttribute("disabled"))return;if(P("onShow",[y],!1),!1===y.props.onShow(y))return;y.state.isVisible=!0,_()&&(k.style.visibility="visible");I(),F(),y.state.isMounted||(k.style.transition="none");if(_()){var a=A();N1([a.box,a.content],0)}l=function(){var e;if(y.state.isVisible&&!h){if(h=!0,k.offsetHeight,k.style.transition=y.props.moveTransition,_()&&y.props.animation){var t=A(),n=t.box,r=t.content;N1([n,r],o),T1([n,r],"visible")}L(),R(),x1(X1,y),null==(e=y.popperInstance)||e.forceUpdate(),P("onMount",[y]),y.props.animation&&_()&&function(e,t){$(e,t)}(o,(function(){y.state.isShown=!0,P("onShown",[y])}))}},function(){var e,t=y.props.appendTo,n=N();e=y.props.interactive&&t===v1||"parent"===t?n.parentNode:y1(t,[n]);e.contains(k)||e.appendChild(k);y.state.isMounted=!0,Z()}()},hide:function(){var e=!y.state.isVisible,t=y.state.isDestroyed,n=!y.state.isEnabled,r=g1(y.props.duration,1,V1.duration);if(e||t||n)return;if(P("onHide",[y],!1),!1===y.props.onHide(y))return;y.state.isVisible=!1,y.state.isShown=!1,h=!1,d=!1,_()&&(k.style.visibility="hidden");if(B(),z(),I(!0),_()){var o=A(),a=o.box,i=o.content;y.props.animation&&(N1([a,i],r),T1([a,i],"hidden"))}L(),R(),y.props.animation?_()&&function(e,t){$(e,(function(){!y.state.isVisible&&k.parentNode&&k.parentNode.contains(k)&&t()}))}(r,y.unmount):y.unmount()},hideWithInteractivity:function(e){T().addEventListener("mousemove",v),x1(Y1,v),v(e)},enable:function(){y.state.isEnabled=!0},disable:function(){y.hide(),y.state.isEnabled=!1},unmount:function(){y.state.isVisible&&y.hide();if(!y.state.isMounted)return;J(),Q().forEach((function(e){e._tippy.unmount()})),k.parentNode&&k.parentNode.removeChild(k);X1=X1.filter((function(e){return e!==y})),y.state.isMounted=!1,P("onHidden",[y])},destroy:function(){if(y.state.isDestroyed)return;y.clearDelayTimeouts(),y.unmount(),W(),delete e._tippy,y.state.isDestroyed=!0,P("onDestroy",[y])}};if(!u.render)return y;var w=u.render(y),k=w.popper,x=w.onUpdate;k.setAttribute("data-tippy-root",""),k.id="tippy-"+y.id,y.popper=k,e._tippy=y,k._tippy=y;var E=b.map((function(e){return e.fn(y)})),C=e.hasAttribute("aria-expanded");return U(),R(),I(),P("onCreate",[y]),u.showOnCreate&&ee(),k.addEventListener("mouseenter",(function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()})),k.addEventListener("mouseleave",(function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&T().addEventListener("mousemove",v)})),y;function S(){var e=y.props.touch;return Array.isArray(e)?e:[e,0]}function O(){return"hold"===S()[0]}function _(){var e;return!(null==(e=y.props.render)||!e.$$tippy)}function N(){return s||e}function T(){var e,t,n=N().parentNode;return n?null!=(t=k1(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function A(){return G1(k)}function M(e){return y.state.isMounted&&!y.state.isVisible||I1.isTouch||a&&"focus"===a.type?0:g1(y.props.delay,e?0:1,V1.delay)}function I(e){void 0===e&&(e=!1),k.style.pointerEvents=y.props.interactive&&!e?"":"none",k.style.zIndex=""+y.props.zIndex}function P(e,t,n){var r;(void 0===n&&(n=!0),E.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=y.props)[e].apply(r,t)}function L(){var t=y.props.aria;if(t.content){var n="aria-"+t.content,r=k.id;k1(y.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(y.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function R(){!C&&y.props.aria.expanded&&k1(y.props.triggerTarget||e).forEach((function(e){y.props.interactive?e.setAttribute("aria-expanded",y.state.isVisible&&e===N()?"true":"false"):e.removeAttribute("aria-expanded")}))}function B(){T().removeEventListener("mousemove",v),Y1=Y1.filter((function(e){return e!==v}))}function D(t){if(!I1.isTouch||!f&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!y.props.interactive||!M1(k,n)){if(k1(y.props.triggerTarget||e).some((function(e){return M1(e,n)}))){if(I1.isTouch)return;if(y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else P("onClickOutside",[y,t]);!0===y.props.hideOnClick&&(y.clearDelayTimeouts(),y.hide(),p=!0,setTimeout((function(){p=!1})),y.state.isMounted||z())}}}function V(){f=!0}function j(){f=!1}function F(){var e=T();e.addEventListener("mousedown",D,!0),e.addEventListener("touchend",D,m1),e.addEventListener("touchstart",j,m1),e.addEventListener("touchmove",V,m1)}function z(){var e=T();e.removeEventListener("mousedown",D,!0),e.removeEventListener("touchend",D,m1),e.removeEventListener("touchstart",j,m1),e.removeEventListener("touchmove",V,m1)}function $(e,t){var n=A().box;function r(e){e.target===n&&(A1(n,"remove",r),t())}if(0===e)return t();A1(n,"remove",i),A1(n,"add",r),i=r}function H(t,n,r){void 0===r&&(r=!1),k1(y.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function U(){var e;O()&&(H("touchstart",G,{passive:!0}),H("touchend",q,{passive:!0})),(e=y.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(H(e,G),e){case"mouseenter":H("mouseleave",q);break;case"focus":H(D1?"focusout":"blur",Y);break;case"focusin":H("focusout",Y)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),m=[]}function G(e){var t,n=!1;if(y.state.isEnabled&&!X(e)&&!p){var r="focus"===(null==(t=a)?void 0:t.type);a=e,s=e.currentTarget,R(),!y.state.isVisible&&b1(e,"MouseEvent")&&Y1.forEach((function(t){return t(e)})),"click"===e.type&&(y.props.trigger.indexOf("mouseenter")<0||d)&&!1!==y.props.hideOnClick&&y.state.isVisible?n=!0:ee(e),"click"===e.type&&(d=!n),n&&!r&&te(e)}}function K(e){var t=e.target,n=N().contains(t)||k.contains(t);"mousemove"===e.type&&n||function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,a=e.props.interactiveBorder,i=o.placement.split("-")[0],l=o.modifiersData.offset;if(!l)return!0;var s="bottom"===i?l.top.y:0,c="top"===i?l.bottom.y:0,u="right"===i?l.left.x:0,d="left"===i?l.right.x:0,p=t.top-r+s>a,f=r-t.bottom-c>a,h=t.left-n+u>a,m=n-t.right-d>a;return p||f||h||m}))}(Q().concat(k).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean),e)&&(B(),te(e))}function q(e){X(e)||y.props.trigger.indexOf("click")>=0&&d||(y.props.interactive?y.hideWithInteractivity(e):te(e))}function Y(e){y.props.trigger.indexOf("focusin")<0&&e.target!==N()||y.props.interactive&&e.relatedTarget&&k.contains(e.relatedTarget)||te(e)}function X(e){return!!I1.isTouch&&O()!==e.type.indexOf("touch")>=0}function Z(){J();var t=y.props,n=t.popperOptions,r=t.placement,o=t.offset,a=t.getReferenceClientRect,i=t.moveTransition,s=_()?G1(k).arrow:null,c=a?{getBoundingClientRect:a,contextElement:a.contextElement||N()}:e,u=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!i}},{name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(_()){var n=A().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}}];_()&&s&&u.push({name:"arrow",options:{element:s,padding:3}}),u.push.apply(u,(null==n?void 0:n.modifiers)||[]),y.popperInstance=bm(c,k,Object.assign({},n,{placement:r,onFirstUpdate:l,modifiers:u}))}function J(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Q(){return E1(k.querySelectorAll("[data-tippy-root]"))}function ee(e){y.clearDelayTimeouts(),e&&P("onTrigger",[y,e]),F();var t=M(!0),r=S(),o=r[0],a=r[1];I1.isTouch&&"hold"===o&&a&&(t=a),t?n=setTimeout((function(){y.show()}),t):y.show()}function te(e){if(y.clearDelayTimeouts(),P("onUntrigger",[y,e]),y.state.isVisible){if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&d)){var t=M(!1);t?r=setTimeout((function(){y.state.isVisible&&y.hide()}),t):o=requestAnimationFrame((function(){y.hide()}))}}else z()}}function J1(e,t){void 0===t&&(t={});var n=V1.plugins.concat(t.plugins||[]);document.addEventListener("touchstart",L1,m1),window.addEventListener("blur",B1);var r=Object.assign({},t,{plugins:n}),o=_1(e).reduce((function(e,t){var n=t&&Z1(t,r);return n&&e.push(n),e}),[]);return O1(e)?o[0]:o}J1.defaultProps=V1,J1.setDefaultProps=function(e){Object.keys(e).forEach((function(t){V1[t]=e[t]}))},J1.currentInput=I1,Object.assign({},_h,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),J1.setDefaultProps({render:K1});class Q1{constructor({editor:e,element:t,view:n,tippyOptions:r={},updateDelay:o=250,shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{const{doc:o,selection:a}=t,{empty:i}=a,l=!o.textBetween(n,r).length&&k0(t.selection),s=this.element.contains(document.activeElement);return!(!e.hasFocus()&&!s||i||l||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.handleDebouncedUpdate=(e,t)=>{const n=!(null==t?void 0:t.selection.eq(e.state.selection)),r=!(null==t?void 0:t.doc.eq(e.state.doc));(n||r)&&(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout((()=>{this.updateHandler(e,n,r,t)}),this.updateDelay))},this.updateHandler=(e,t,n,r)=>{var o,a,i;const{state:l,composing:s}=e,{selection:c}=l;if(s||!t&&!n)return;this.createTooltip();const{ranges:u}=c,d=Math.min(...u.map((e=>e.$from.pos))),p=Math.max(...u.map((e=>e.$to.pos)));(null===(o=this.shouldShow)||void 0===o?void 0:o.call(this,{editor:this.editor,view:e,state:l,oldState:r,from:d,to:p}))?(null===(a=this.tippy)||void 0===a||a.setProps({getReferenceClientRect:(null===(i=this.tippyOptions)||void 0===i?void 0:i.getReferenceClientRect)||(()=>{if(H0(l.selection)){let t=e.nodeDOM(d);const n=t.dataset.nodeViewWrapper?t:t.querySelector("[data-node-view-wrapper]");if(n&&(t=n.firstChild),t)return t.getBoundingClientRect()}return U0(e,d,p)})}),this.show()):this.hide()},this.editor=e,this.element=t,this.view=n,this.updateDelay=o,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=J1(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){const{state:n}=e,r=n.selection.from!==n.selection.to;if(this.updateDelay>0&&r)return void this.handleDebouncedUpdate(e,t);const o=!(null==t?void 0:t.selection.eq(e.state.selection)),a=!(null==t?void 0:t.doc.eq(e.state.doc));this.updateHandler(e,o,a,t)}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const e2=e=>new ZY({key:"string"==typeof e.pluginKey?new eX(e.pluginKey):e.pluginKey,view:t=>new Q1({view:t,...e})});p0.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[e2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class t2{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t})=>{const{selection:n}=t,{$anchor:r,empty:o}=n,a=1===r.depth,i=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(e.hasFocus()&&o&&a&&i&&this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.tippyBlurHandler=e=>{this.blurHandler({event:e})},this.editor=e,this.element=t,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=J1(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,t){var n,r,o;const{state:a}=e,{doc:i,selection:l}=a,{from:s,to:c}=l;if(t&&t.doc.eq(i)&&t.selection.eq(l))return;this.createTooltip();(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:a,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>U0(e,s,c))}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e,t;(null===(e=this.tippy)||void 0===e?void 0:e.popper.firstChild)&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),null===(t=this.tippy)||void 0===t||t.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const n2=e=>new ZY({key:"string"==typeof e.pluginKey?new eX(e.pluginKey):e.pluginKey,view:t=>new t2({view:t,...e})});p0.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[n2({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const r2=t.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{updateDelay:t,editor:n,pluginKey:o,shouldShow:a,tippyOptions:i}=e;n.registerPlugin(e2({updateDelay:t,editor:n,element:r.value,pluginKey:o,shouldShow:a,tippyOptions:i}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}});function o2(e){return t.customRef(((t,n)=>({get:()=>(t(),e),set(t){e=t,requestAnimationFrame((()=>{requestAnimationFrame((()=>{n()}))}))}})))}class a2 extends t1{constructor(e={}){return super(e),this.vueRenderers=t.reactive(new Map),this.contentComponent=null,this.reactiveState=o2(this.view.state),this.reactiveExtensionStorage=o2(this.extensionStorage),this.on("transaction",(()=>{this.reactiveState.value=this.view.state,this.reactiveExtensionStorage.value=this.extensionStorage})),t.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,t){super.registerPlugin(e,t),this.reactiveState.value=this.view.state}unregisterPlugin(e){super.unregisterPlugin(e),this.reactiveState.value=this.view.state}}const i2=t.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(e){const n=t.ref(),r=t.getCurrentInstance();return t.watchEffect((()=>{const o=e.editor;o&&o.options.element&&n.value&&t.nextTick((()=>{if(!n.value||!o.options.element.firstChild)return;const e=t.unref(n.value);n.value.append(...o.options.element.childNodes),o.contentComponent=r.ctx._,o.setOptions({element:e}),o.createNodeViews()}))})),t.onBeforeUnmount((()=>{const t=e.editor;if(!t)return;if(t.isDestroyed||t.view.setProps({nodeViews:{}}),t.contentComponent=null,!t.options.element.firstChild)return;const n=document.createElement("div");n.append(...t.options.element.childNodes),t.setOptions({element:n})})),{rootEl:n}},render(){const e=[];return this.editor&&this.editor.vueRenderers.forEach((n=>{const r=t.h(t.Teleport,{to:n.teleportElement,key:n.id},t.h(n.component,{ref:n.id,...n.props}));e.push(r)})),t.h("div",{ref:e=>{this.rootEl=e}},...e)}});t.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(e,{slots:n}){const r=t.ref(null);return t.onMounted((()=>{const{pluginKey:t,editor:n,tippyOptions:o,shouldShow:a}=e;n.registerPlugin(n2({pluginKey:t,editor:n,element:r.value,tippyOptions:o,shouldShow:a}))})),t.onBeforeUnmount((()=>{const{pluginKey:t,editor:n}=e;n.unregisterPlugin(t)})),()=>{var e;return t.h("div",{ref:r},null===(e=n.default)||void 0===e?void 0:e.call(n))}}});const l2=t.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return t.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),s2=t.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var e,n;return t.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e))}});class c2{constructor(e,{props:n={},editor:r}){if(this.id=Math.floor(4294967295*Math.random()).toString(),this.editor=r,this.component=t.markRaw(e),this.teleportElement=document.createElement("div"),this.element=this.teleportElement,this.props=t.reactive(n),this.editor.vueRenderers.set(this.id,this),this.editor.contentComponent){if(this.editor.contentComponent.update(),1!==this.teleportElement.children.length)throw Error("VueRenderer doesn’t support multiple child elements.");this.element=this.teleportElement.firstElementChild}}get ref(){var e;return null===(e=this.editor.contentComponent)||void 0===e?void 0:e.refs[this.id]}updateProps(e={}){Object.entries(e).forEach((([e,t])=>{this.props[e]=t}))}destroy(){this.editor.vueRenderers.delete(this.id)}}const u2={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0}};class d2 extends c1{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,selected:!1,extension:this.extension,getPos:()=>this.getPos(),updateAttributes:(e={})=>this.updateAttributes(e),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=t.ref(this.getDecorationClasses());const r=t.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:e=>{var r,o;return t.provide("onDragStart",n),t.provide("decorationClasses",this.decorationClasses),null===(o=(r=this.component).setup)||void 0===o?void 0:o.call(r,e,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.renderer=new c2(r,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){if(this.node.isLeaf)return null;return this.dom.querySelector("[data-node-view-content]")||this.dom}update(e,t){const n=e=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(e)};if("function"==typeof this.options.update){const r=this.node,o=this.decorations;return this.node=e,this.decorations=t,this.options.update({oldNode:r,oldDecorations:o,newNode:e,newDecorations:t,updateProps:()=>n({node:e,decorations:t})})}return e.type===this.node.type&&(e===this.node&&this.decorations===t||(this.node=e,this.decorations=t,n({node:e,decorations:t})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map((e=>e.type.attrs.class)).flat().join(" ")}destroy(){this.renderer.destroy()}}function p2(e,t){return n=>n.editor.contentComponent?new d2(e,n,t):{}}const f2=/^\s*>\s$/,h2=s1.create({name:"blockquote",addOptions:()=>({HTMLAttributes:{}}),content:"block+",group:"block",defining:!0,parseHTML:()=>[{tag:"blockquote"}],renderHTML({HTMLAttributes:e}){return["blockquote",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[i1({find:f2,type:this.type})]}}),m2=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,v2=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,g2=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,b2=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,y2=l1.create({name:"bold",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"strong"},{tag:"b",getAttrs:e=>"normal"!==e.style.fontWeight&&null},{style:"font-weight",getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}],renderHTML({HTMLAttributes:e}){return["strong",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[n1({find:m2,type:this.type}),n1({find:g2,type:this.type})]},addPasteRules(){return[u1({find:v2,type:this.type}),u1({find:b2,type:this.type})]}}),w2=s1.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",GQ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),k2=l1.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=P0(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),x2=/^\s*([-+*])\s$/,E2=s1.create({name:"bulletList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML:()=>[{tag:"ul"}],renderHTML({HTMLAttributes:e}){return["ul",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(w2.name,this.editor.getAttributes(k2.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=i1({find:x2,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=i1({find:x2,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(k2.name),editor:this.editor})),[e]}}),C2=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))$/,S2=/(?:^|\s)(`(?!\s+`)((?:[^`]+))`(?!\s+`))/g,O2=l1.create({name:"code",addOptions:()=>({HTMLAttributes:{}}),excludes:"_",code:!0,exitable:!0,parseHTML:()=>[{tag:"code"}],renderHTML({HTMLAttributes:e}){return["code",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[n1({find:C2,type:this.type})]},addPasteRules(){return[u1({find:S2,type:this.type})]}}),_2=/^```([a-z]+)?[\s\n]$/,N2=/^~~~([a-z]+)?[\s\n]$/,T2=s1.create({name:"codeBlock",addOptions:()=>({languageClassPrefix:"language-",exitOnTripleEnter:!0,exitOnArrowDown:!0,HTMLAttributes:{}}),content:"text*",marks:"",group:"block",code:!0,defining:!0,addAttributes(){return{language:{default:null,parseHTML:e=>{var t;const{languageClassPrefix:n}=this.options,r=[...(null===(t=e.firstElementChild)||void 0===t?void 0:t.classList)||[]].filter((e=>e.startsWith(n))).map((e=>e.replace(n,""))),o=r[0];return o||null},rendered:!1}}},parseHTML:()=>[{tag:"pre",preserveWhitespace:"full"}],renderHTML({node:e,HTMLAttributes:t}){return["pre",GQ(this.options.HTMLAttributes,t),["code",{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{const{empty:e,$anchor:t}=this.editor.state.selection,n=1===t.pos;return!(!e||t.parent.type.name!==this.name)&&(!(!n&&t.parent.textContent.length)&&this.editor.commands.clearNodes())},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;const{state:t}=e,{selection:n}=t,{$from:r,empty:o}=n;if(!o||r.parent.type!==this.type)return!1;const a=r.parentOffset===r.parent.nodeSize-2,i=r.parent.textContent.endsWith("\n\n");return!(!a||!i)&&e.chain().command((({tr:e})=>(e.delete(r.pos-2,r.pos),!0))).exitCode().run()},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;const{state:t}=e,{selection:n,doc:r}=t,{$from:o,empty:a}=n;if(!a||o.parent.type!==this.type)return!1;if(!(o.parentOffset===o.parent.nodeSize-2))return!1;const i=o.after();if(void 0===i)return!1;return!r.nodeAt(i)&&e.commands.exitCode()}}},addInputRules(){return[o1({find:_2,type:this.type,getAttributes:e=>({language:e[1]})}),o1({find:N2,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new ZY({key:new eX("codeBlockVSCodeHandler"),props:{handlePaste:(e,t)=>{if(!t.clipboardData)return!1;if(this.editor.isActive(this.type.name))return!1;const n=t.clipboardData.getData("text/plain"),r=t.clipboardData.getData("vscode-editor-data"),o=r?JSON.parse(r):void 0,a=null==o?void 0:o.mode;if(!n||!a)return!1;const{tr:i,schema:l}=e.state,s=l.text(n.replace(/\r\n?/g,"\n"));return i.replaceSelectionWith(this.type.create({language:a},s)),i.selection.$from.parent.type!==this.type&&i.setSelection(BY.near(i.doc.resolve(Math.max(0,i.selection.from-2)))),i.setMeta("paste",!0),e.dispatch(i),!0}}})]}}),A2=s1.create({name:"doc",topNode:!0,content:"block+"});function M2(e={}){return new ZY({view:t=>new I2(t,e)})}class I2{constructor(e,t){var n;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=null!==(n=t.width)&&void 0!==n?n:1,this.color=!1===t.color?void 0:t.color||"black",this.class=t.class,this.handlers=["dragover","dragend","drop","dragleave"].map((t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}}))}destroy(){this.handlers.forEach((({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t)))}update(e,t){null!=this.cursorPos&&t.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,null==e?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e,t=this.editorView.state.doc.resolve(this.cursorPos),n=!t.parent.inlineContent;if(n){let n=t.nodeBefore,r=t.nodeAfter;if(n||r){let t=this.editorView.nodeDOM(this.cursorPos-(n?n.nodeSize:0));if(t){let o=t.getBoundingClientRect(),a=n?o.bottom:o.top;n&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),e={left:o.left,right:o.right,top:a-this.width/2,bottom:a+this.width/2}}}}if(!e){let t=this.editorView.coordsAtPos(this.cursorPos);e={left:t.left-this.width/2,right:t.left+this.width/2,top:t.top,bottom:t.bottom}}let r,o,a=this.editorView.dom.offsetParent;if(this.element||(this.element=a.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n),!a||a==document.body&&"static"==getComputedStyle(a).position)r=-pageXOffset,o=-pageYOffset;else{let e=a.getBoundingClientRect();r=e.left-a.scrollLeft,o=e.top-a.scrollTop}this.element.style.left=e.left-r+"px",this.element.style.top=e.top-o+"px",this.element.style.width=e.right-e.left+"px",this.element.style.height=e.bottom-e.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout((()=>this.setCursor(null)),e)}dragover(e){if(!this.editorView.editable)return;let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,o="function"==typeof r?r(this.editorView,t,e):r;if(t&&!o){let e=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let t=vY(this.editorView.state.doc,e,this.editorView.dragging.slice);null!=t&&(e=t)}this.setCursor(e),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){e.target!=this.editorView.dom&&this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}}const P2=p0.create({name:"dropCursor",addOptions:()=>({color:"currentColor",width:1,class:void 0}),addProseMirrorPlugins(){return[M2(this.options)]}});class L2 extends IY{constructor(e){super(e,e)}map(e,t){let n=e.resolve(t.map(this.head));return L2.valid(n)?new L2(n):IY.near(n)}content(){return UK.empty}eq(e){return e instanceof L2&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,t){if("number"!=typeof t.pos)throw new RangeError("Invalid input for GapCursor.fromJSON");return new L2(e.resolve(t.pos))}getBookmark(){return new R2(this.anchor)}static valid(e){let t=e.parent;if(t.isTextblock||!function(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(0!=n)for(let e=r.child(n-1);;e=e.lastChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e)||!function(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n!=r.childCount)for(let e=r.child(n);;e=e.firstChild){if(0==e.childCount&&!e.inlineContent||e.isAtom||e.type.spec.isolating)return!0;if(e.inlineContent)return!1}else if(r.type.spec.isolating)return!0}return!0}(e))return!1;let n=t.type.spec.allowGapCursor;if(null!=n)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(e,t,n=!1){e:for(;;){if(!n&&L2.valid(e))return e;let r=e.pos,o=null;for(let n=e.depth;;n--){let a=e.node(n);if(t>0?e.indexAfter(n)<a.childCount:e.index(n)>0){o=a.child(t>0?e.indexAfter(n):e.index(n)-1);break}if(0==n)return null;r+=t;let i=e.doc.resolve(r);if(L2.valid(i))return i}for(;;){let a=t>0?o.firstChild:o.lastChild;if(!a){if(o.isAtom&&!o.isText&&!VY.isSelectable(o)){e=e.doc.resolve(r+o.nodeSize*t),n=!1;continue e}break}o=a,r+=t;let i=e.doc.resolve(r);if(L2.valid(i))return i}return null}}}L2.prototype.visible=!1,L2.findFrom=L2.findGapCursorFrom,IY.jsonID("gapcursor",L2);class R2{constructor(e){this.pos=e}map(e){return new R2(e.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return L2.valid(t)?new L2(t):IY.near(t)}}const B2=CQ({ArrowLeft:D2("horiz",-1),ArrowRight:D2("horiz",1),ArrowUp:D2("vert",-1),ArrowDown:D2("vert",1)});function D2(e,t){const n="vert"==e?t>0?"down":"up":t>0?"right":"left";return function(e,r,o){let a=e.selection,i=t>0?a.$to:a.$from,l=a.empty;if(a instanceof BY){if(!o.endOfTextblock(n)||0==i.depth)return!1;l=!1,i=e.doc.resolve(t>0?i.after():i.before())}let s=L2.findGapCursorFrom(i,t,l);return!!s&&(r&&r(e.tr.setSelection(new L2(s))),!0)}}function V2(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!L2.valid(r))return!1;let o=e.posAtCoords({left:n.clientX,top:n.clientY});return!(o&&o.inside>-1&&VY.isSelectable(e.state.doc.nodeAt(o.inside)))&&(e.dispatch(e.state.tr.setSelection(new L2(r))),!0)}function j2(e,t){if("insertCompositionText"!=t.inputType||!(e.state.selection instanceof L2))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let o=VK.empty;for(let i=r.length-1;i>=0;i--)o=VK.from(r[i].createAndFill(null,o));let a=e.state.tr.replace(n.pos,n.pos,new UK(o,0,0));return a.setSelection(BY.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function F2(e){if(!(e.selection instanceof L2))return null;let t=document.createElement("div");return t.className="ProseMirror-gapcursor",VJ.create(e.doc,[RJ.widget(e.selection.head,t,{key:"gapcursor"})])}const z2=p0.create({name:"gapCursor",addProseMirrorPlugins:()=>[new ZY({props:{decorations:F2,createSelectionBetween:(e,t,n)=>t.pos==n.pos&&L2.valid(n)?new L2(n):null,handleClick:V2,handleKeyDown:B2,handleDOMEvents:{beforeinput:j2}}})],extendNodeSchema(e){var t;return{allowGapCursor:null!==(t=YQ($Q(e,"allowGapCursor",{name:e.name,options:e.options,storage:e.storage})))&&void 0!==t?t:null}}}),$2=s1.create({name:"hardBreak",addOptions:()=>({keepMarks:!0,HTMLAttributes:{}}),inline:!0,group:"inline",selectable:!1,parseHTML:()=>[{tag:"br"}],renderHTML({HTMLAttributes:e}){return["br",GQ(this.options.HTMLAttributes,e)]},renderText:()=>"\n",addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command((()=>{const{selection:e,storedMarks:o}=n;if(e.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:i}=r.extensionManager,l=o||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command((({tr:e,dispatch:t})=>{if(t&&l&&a){const t=l.filter((e=>i.includes(e.type.name)));e.ensureMarks(t)}return!0})).run()}))])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),H2=s1.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,GQ(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>o1({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});var U2=200,W2=function(){};W2.prototype.append=function(e){return e.length?(e=W2.from(e),!this.length&&e||e.length<U2&&this.leafAppend(e)||this.length<U2&&e.leafPrepend(this)||this.appendInner(e)):this},W2.prototype.prepend=function(e){return e.length?W2.from(e).append(this):this},W2.prototype.appendInner=function(e){return new K2(this,e)},W2.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?W2.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},W2.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},W2.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},W2.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},W2.from=function(e){return e instanceof W2?e:e&&e.length?new G2(e):W2.empty};var G2=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=U2)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=U2)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(W2);W2.empty=new G2([]);var K2=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(W2);class q2{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let a,i,l=e.tr,s=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new Y2(e.map));let t,o=e.step.map(n.slice(r));o&&l.maybeStep(o).doc&&(t=l.mapping.maps[l.mapping.maps.length-1],s.push(new Y2(t,void 0,void 0,s.length+c.length))),r--,t&&n.appendMap(t,r)}else l.maybeStep(e.step);return e.selection?(a=n?e.selection.map(n.slice(r)):e.selection,i=new q2(this.items.slice(0,o).append(c.reverse().concat(s)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:i,transform:l,selection:a}}addTransform(e,t,n,r){let o=[],a=this.eventCount,i=this.items,l=!r&&i.length?i.get(i.length-1):null;for(let c=0;c<e.steps.length;c++){let n,s=e.steps[c].invert(e.docs[c]),u=new Y2(e.mapping.maps[c],s,t);(n=l&&l.merge(u))&&(u=n,c?o.pop():i=i.slice(0,i.length-1)),o.push(u),t&&(a++,t=void 0),r||(l=u)}let s=a-n.depth;return s>Z2&&(i=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(i,s),a-=s),new q2(i.append(o),a)}remapping(e,t){let n=new Yq;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new q2(this.items.append(e.map((e=>new Y2(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,a=e.steps.length,i=this.eventCount;this.items.forEach((e=>{e.selection&&i--}),r);let l=t;this.items.forEach((t=>{let r=o.getMirror(--l);if(null==r)return;a=Math.min(a,r);let s=o.maps[r];if(t.step){let a=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(l+1,r));c&&i++,n.push(new Y2(s,a,c))}else n.push(new Y2(s))}),r);let s=[];for(let d=t;d<a;d++)s.push(new Y2(o.maps[d]));let c=this.items.slice(0,r).append(s).append(n),u=new q2(c,i);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((a,i)=>{if(i>=e)r.push(a),a.selection&&o++;else if(a.step){let e=a.step.map(t.slice(n)),i=e&&e.getMap();if(n--,i&&t.appendMap(i,n),e){let l=a.selection&&a.selection.map(t.slice(n));l&&o++;let s,c=new Y2(i.invert(),e,l),u=r.length-1;(s=r.length&&r[u].merge(c))?r[u]=s:r.push(c)}}else a.map&&n--}),this.items.length,0),new q2(W2.from(r.reverse()),o)}}q2.empty=new q2(W2.empty,0);class Y2{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new Y2(t.getMap().invert(),t,this.selection)}}}class X2{constructor(e,t,n,r,o){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=o}}const Z2=20;function J2(e){let t=[];for(let n=e.length-1;n>=0&&0==t.length;n--)e[n].forEach(((e,n,r,o)=>t.push(r,o)));return t}function Q2(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),a=t.map(e[r+1],-1);o<=a&&n.push(o,a)}return n}let e4=!1,t4=null;function n4(e){let t=e.plugins;if(t4!=t){e4=!1,t4=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){e4=!0;break}}return e4}const r4=new eX("history"),o4=new eX("closeHistory");function a4(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new ZY({key:r4,state:{init:()=>new X2(q2.empty,q2.empty,null,0,-1),apply:(t,n,r)=>function(e,t,n,r){let o,a=n.getMeta(r4);if(a)return a.historyState;n.getMeta(o4)&&(e=new X2(e.done,e.undone,null,0,-1));let i=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(i&&i.getMeta(r4))return i.getMeta(r4).redo?new X2(e.done.addTransform(n,void 0,r,n4(t)),e.undone,J2(n.mapping.maps),e.prevTime,e.prevComposition):new X2(e.done,e.undone.addTransform(n,void 0,r,n4(t)),null,e.prevTime,e.prevComposition);if(!1===n.getMeta("addToHistory")||i&&!1===i.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new X2(e.done.rebased(n,o),e.undone.rebased(n,o),Q2(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new X2(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Q2(e.prevRanges,n.mapping),e.prevTime,e.prevComposition);{let o=n.getMeta("composition"),a=0==e.prevTime||!i&&e.prevComposition!=o&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),l=i?Q2(e.prevRanges,n.mapping):J2(n.mapping.maps);return new X2(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,n4(t)),q2.empty,l,n.time,null==o?e.prevComposition:o)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?l4:"historyRedo"==n?s4:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}function i4(e,t){return(n,r)=>{let o=r4.getState(n);if(!o||0==(e?o.undone:o.done).eventCount)return!1;if(r){let a=function(e,t,n){let r=n4(t),o=r4.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let i=a.selection.resolve(a.transform.doc),l=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),o,r),s=new X2(n?l:a.remaining,n?a.remaining:l,null,0,-1);return a.transform.setSelection(i).setMeta(r4,{redo:n,historyState:s})}(o,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}const l4=i4(!1,!0),s4=i4(!0,!0),c4=p0.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>l4(e,t),redo:()=>({state:e,dispatch:t})=>s4(e,t)}),addProseMirrorPlugins(){return[a4(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),u4=s1.create({name:"horizontalRule",addOptions:()=>({HTMLAttributes:{}}),group:"block",parseHTML:()=>[{tag:"hr"}],renderHTML({HTMLAttributes:e}){return["hr",GQ(this.options.HTMLAttributes,e)]},addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{const{selection:n}=t,{$from:r,$to:o}=n,a=e();return 0===r.parentOffset?a.insertContentAt({from:Math.max(r.pos-1,0),to:o.pos},{type:this.name}):H0(n)?a.insertContentAt(o.pos,{type:this.name}):a.insertContent({type:this.name}),a.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(BY.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(VY.create(e.doc,t.pos)):e.setSelection(BY.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(BY.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[r1({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),d4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,p4=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,f4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,h4=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,m4=l1.create({name:"italic",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"em"},{tag:"i",getAttrs:e=>"normal"!==e.style.fontStyle&&null},{style:"font-style=italic"}],renderHTML({HTMLAttributes:e}){return["em",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[n1({find:d4,type:this.type}),n1({find:f4,type:this.type})]},addPasteRules(){return[u1({find:p4,type:this.type}),u1({find:h4,type:this.type})]}}),v4=s1.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",GQ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),g4=s1.create({name:"listItem",addOptions:()=>({HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",GQ(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),b4=l1.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=P0(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),y4=/^(\d+)\.\s$/,w4=s1.create({name:"orderedList",addOptions:()=>({itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}),group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes:()=>({start:{default:1,parseHTML:e=>e.hasAttribute("start")?parseInt(e.getAttribute("start")||"",10):1}}),parseHTML:()=>[{tag:"ol"}],renderHTML({HTMLAttributes:e}){const{start:t,...n}=e;return 1===t?["ol",GQ(this.options.HTMLAttributes,n),0]:["ol",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(g4.name,this.editor.getAttributes(b4.name)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let e=i1({find:y4,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(e=i1({find:y4,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(b4.name)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[e]}}),k4=s1.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),x4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,E4=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,C4=l1.create({name:"strike",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"s"},{tag:"del"},{tag:"strike"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("line-through")&&{}}],renderHTML({HTMLAttributes:e}){return["s",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[n1({find:x4,type:this.type})]},addPasteRules(){return[u1({find:E4,type:this.type})]}}),S4=s1.create({name:"text",group:"inline"}),O4=p0.create({name:"starterKit",addExtensions(){var e,t,n,r,o,a,i,l,s,c,u,d,p,f,h,m,v,g;const b=[];return!1!==this.options.bold&&b.push(y2.configure(null===(e=this.options)||void 0===e?void 0:e.bold)),!1!==this.options.blockquote&&b.push(h2.configure(null===(t=this.options)||void 0===t?void 0:t.blockquote)),!1!==this.options.bulletList&&b.push(E2.configure(null===(n=this.options)||void 0===n?void 0:n.bulletList)),!1!==this.options.code&&b.push(O2.configure(null===(r=this.options)||void 0===r?void 0:r.code)),!1!==this.options.codeBlock&&b.push(T2.configure(null===(o=this.options)||void 0===o?void 0:o.codeBlock)),!1!==this.options.document&&b.push(A2.configure(null===(a=this.options)||void 0===a?void 0:a.document)),!1!==this.options.dropcursor&&b.push(P2.configure(null===(i=this.options)||void 0===i?void 0:i.dropcursor)),!1!==this.options.gapcursor&&b.push(z2.configure(null===(l=this.options)||void 0===l?void 0:l.gapcursor)),!1!==this.options.hardBreak&&b.push($2.configure(null===(s=this.options)||void 0===s?void 0:s.hardBreak)),!1!==this.options.heading&&b.push(H2.configure(null===(c=this.options)||void 0===c?void 0:c.heading)),!1!==this.options.history&&b.push(c4.configure(null===(u=this.options)||void 0===u?void 0:u.history)),!1!==this.options.horizontalRule&&b.push(u4.configure(null===(d=this.options)||void 0===d?void 0:d.horizontalRule)),!1!==this.options.italic&&b.push(m4.configure(null===(p=this.options)||void 0===p?void 0:p.italic)),!1!==this.options.listItem&&b.push(v4.configure(null===(f=this.options)||void 0===f?void 0:f.listItem)),!1!==this.options.orderedList&&b.push(w4.configure(null===(h=this.options)||void 0===h?void 0:h.orderedList)),!1!==this.options.paragraph&&b.push(k4.configure(null===(m=this.options)||void 0===m?void 0:m.paragraph)),!1!==this.options.strike&&b.push(C4.configure(null===(v=this.options)||void 0===v?void 0:v.strike)),!1!==this.options.text&&b.push(S4.configure(null===(g=this.options)||void 0===g?void 0:g.text)),b}}),_4=p0.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new ZY({key:new eX("placeholder"),props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];if(!n)return null;const a=this.editor.isEmpty;return e.descendants(((e,t)=>{const n=r>=t&&r<=t+e.nodeSize,i=!e.isLeaf&&$0(e);if((n||!this.options.showOnlyCurrent)&&i){const r=[this.options.emptyNodeClass];a&&r.push(this.options.emptyEditorClass);const i=RJ.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(i)}return this.options.includeChildren})),VJ.create(e,o)}}})]}}),N4=p0.create({name:"focus",addOptions:()=>({className:"has-focus",mode:"all"}),addProseMirrorPlugins(){return[new ZY({key:new eX("focus"),props:{decorations:({doc:e,selection:t})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:o}=t,a=[];if(!n||!r)return VJ.create(e,[]);let i=0;"deepest"===this.options.mode&&e.descendants(((e,t)=>{if(e.isText)return;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;i+=1}));let l=0;return e.descendants(((e,t)=>{if(e.isText)return!1;if(!(o>=t&&o<=t+e.nodeSize-1))return!1;l+=1;if("deepest"===this.options.mode&&i-l>0||"shallowest"===this.options.mode&&l>1)return"deepest"===this.options.mode;a.push(RJ.node(t,t+e.nodeSize,{class:this.options.className}))})),VJ.create(e,a)}}})]}}),T4=l1.create({name:"textStyle",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"span",getAttrs:e=>!!e.hasAttribute("style")&&{}}],renderHTML({HTMLAttributes:e}){return["span",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{removeEmptyTextStyle:()=>({state:e,commands:t})=>{const n=P0(e,this.type);return!!Object.entries(n).some((([,e])=>!!e))||t.unsetMark(this.name)}}}}),A4=p0.create({name:"fontFamily",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:e=>{var t;return null===(t=e.style.fontFamily)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.fontFamily?{style:`font-family: ${e.fontFamily}`}:{}}}}]},addCommands:()=>({setFontFamily:e=>({chain:t})=>t().setMark("textStyle",{fontFamily:e}).run(),unsetFontFamily:()=>({chain:e})=>e().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()})}),M4=p0.create({name:"fontSize",addOptions:()=>({types:["textStyle"],defaultFontSize:"14px"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{fontSize:{default:this.options.defaultFontSize,parseHTML:e=>e.style.fontSize||this.options.defaultFontSize,renderHTML:e=>e.fontSize===this.options.defaultFontSize?{}:{style:`font-size: ${e.fontSize}`}}}}]},addCommands:()=>({setFontSize:e=>({chain:t})=>t().setMark("textStyle",{fontSize:e}).run(),unsetFontSize:()=>({chain:e})=>e().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()})}),I4=l1.create({name:"underline",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>!!e.includes("underline")&&{}}],renderHTML({HTMLAttributes:e}){return["u",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),P4=l1.create({name:"subscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sub"},{style:"vertical-align",getAttrs:e=>"sub"===e&&null}],renderHTML({HTMLAttributes:e}){return["sub",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setSubscript:()=>({commands:e})=>e.setMark(this.name),toggleSubscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSubscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),L4=l1.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),R4=p0.create({name:"color",addOptions:()=>({types:["textStyle"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return null===(t=e.style.color)||void 0===t?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands:()=>({setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()})}),B4=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,D4=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,V4=l1.create({name:"highlight",addOptions:()=>({multicolor:!1,HTMLAttributes:{}}),addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:e=>e.getAttribute("data-color")||e.style.backgroundColor,renderHTML:e=>e.color?{"data-color":e.color,style:`background-color: ${e.color}; color: inherit`}:{}}}:{}},parseHTML:()=>[{tag:"mark"}],renderHTML({HTMLAttributes:e}){return["mark",GQ(this.options.HTMLAttributes,e),0]},addCommands(){return{setHighlight:e=>({commands:t})=>t.setMark(this.name,e),toggleHighlight:e=>({commands:t})=>t.toggleMark(this.name,e),unsetHighlight:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[n1({find:B4,type:this.type})]},addPasteRules(){return[u1({find:D4,type:this.type})]}}),j4=E2.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),listStyleType:{default:"disc",parseHTML:e=>({listStyleType:e.style["list-style-type"]||"disc"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(null==e?void 0:e.listStyleType)||e}`})}}}}),F4=w4.extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),listStyleType:{default:"decimal",parseHTML:e=>({listStyleType:e.style["list-style-type"]||"decimal"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(null==e?void 0:e.listStyleType)||e}`})}}}}),z4="indent-",$4=p0.create({name:"indent",addOptions:()=>({types:["heading","listItem","taskItem","paragraph"],minLevel:0,maxLevel:5}),addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:null,renderHTML:e=>e.indent&&e.indent>this.options.minLevel?{class:`${z4}${e.indent}`}:{},parseHTML:e=>{let t="";if(e.classList.forEach((e=>{0===e.indexOf(z4)&&(t=e)})),t){const e=parseInt(t.slice(7),7);return e&&e>this.options.minLevel?e:null}return null}}}}]},addCommands(){const e=(e,t,n)=>{var r;const o=(null==(r=null==e?void 0:e.doc)?void 0:r.nodeAt(t))||null;if(o){const r=(o.attrs.indent||0)+n,{minLevel:a,maxLevel:i}=this.options;let l=r;if(r<a?l=a:r>i&&(l=i),l!==o.attrs.indent){const{indent:n,...r}=o.attrs,i=l>a?{...r,indent:l}:r;return e.setNodeMarkup(t,o.type,i,o.marks)}}return e},t=(t,n)=>{const{doc:r,selection:o}=t;if(r&&o&&(o instanceof BY||o instanceof FY)){const{from:a,to:i}=o;r.nodesBetween(a,i,((r,o)=>!this.options.types.includes(r.type.name)||(t=e(t,o,n),!1)))}return t},n=e=>()=>({tr:n,state:r,dispatch:o})=>{const{selection:a}=r;return n=n.setSelection(a),!!(n=t(n,e)).docChanged&&(null==o||o(n),!0)};return{indent:n(1),outdent:n(-1)}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}}),H4=p0.create({name:"textAlign",addOptions:()=>({types:[],alignments:["left","center","right","justify"],defaultAlignment:"left"}),addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>{const t=e.style.textAlign||this.options.defaultAlignment;return this.options.alignments.includes(t)?t:this.options.defaultAlignment},renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:{style:`text-align: ${e.textAlign}`}}}}]},addCommands(){return{setTextAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.map((n=>t.updateAttributes(n,{textAlign:e}))).every((e=>e)),unsetTextAlign:()=>({commands:e})=>this.options.types.map((t=>e.resetAttributes(t,"textAlign"))).every((e=>e))}},addKeyboardShortcuts(){return{"Mod-Shift-l":()=>this.editor.commands.setTextAlign("left"),"Mod-Shift-e":()=>this.editor.commands.setTextAlign("center"),"Mod-Shift-r":()=>this.editor.commands.setTextAlign("right"),"Mod-Shift-j":()=>this.editor.commands.setTextAlign("justify")}}}).extend({addOptions(){var e;return{...null==(e=this.parent)?void 0:e.call(this),types:["heading","paragraph"],alignments:["left","center","right","justify","distributed"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.textAlignLast?"distributed":e.style.textAlign||this.options.defaultAlignment,renderHTML:e=>e.textAlign===this.options.defaultAlignment?{}:"distributed"===e.textAlign?{style:"text-align-last: justify"}:{style:`text-align: ${e.textAlign}`}}}}]},addKeyboardShortcuts(){var e;return{...null==(e=this.parent)?void 0:e.call(this),"Mod-Shift-d":()=>this.editor.commands.setTextAlign("distributed")}}}),U4=p0.create({name:"nodeAlign",addOptions:()=>({defaultAlignment:"center",alignments:["flex-start","center","flex-end"],types:["image","video","audio","iframe","file"]}),addGlobalAttributes(){return[{types:this.options.types,attributes:{nodeAlign:{default:this.options.defaultAlignment,parseHTML:e=>e.style.justifyContent||this.options.defaultAlignment,renderHTML:e=>e.nodeAlign===this.options.defaultAlignment?{}:{style:`justify-content: ${e.nodeAlign}`}}}}]},addCommands(){return{setNodeAlign:e=>({commands:t})=>!!this.options.alignments.includes(e)&&this.options.types.every((n=>t.updateAttributes(n,{nodeAlign:e}))),unsetNodeAlign:()=>({commands:e})=>this.options.types.every((t=>e.resetAttributes(t,"nodeAlign")))}}}),W4=/^\s*(\[([( |x])?\])\s$/,G4=s1.create({name:"taskItem",addOptions:()=>({nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}),content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes:()=>({checked:{default:!1,keepOnSplit:!1,parseHTML:e=>"true"===e.getAttribute("data-checked"),renderHTML:e=>({"data-checked":e.checked})}}),parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:e,HTMLAttributes:t}){return["li",GQ(this.options.HTMLAttributes,t,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:e.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{const o=document.createElement("li"),a=document.createElement("label"),i=document.createElement("span"),l=document.createElement("input"),s=document.createElement("div");return a.contentEditable="false",l.type="checkbox",l.addEventListener("change",(t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked)return void(l.checked=!l.checked);const{checked:o}=t.target;r.isEditable&&"function"==typeof n&&r.chain().focus(void 0,{scrollIntoView:!1}).command((({tr:e})=>{const t=n(),r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...null==r?void 0:r.attrs,checked:o}),!0})).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,o)||(l.checked=!l.checked))})),Object.entries(this.options.HTMLAttributes).forEach((([e,t])=>{o.setAttribute(e,t)})),o.dataset.checked=e.attrs.checked,e.attrs.checked&&l.setAttribute("checked","checked"),a.append(l,i),o.append(a,s),Object.entries(t).forEach((([e,t])=>{o.setAttribute(e,t)})),{dom:o,contentDOM:s,update:e=>e.type===this.type&&(o.dataset.checked=e.attrs.checked,e.attrs.checked?l.setAttribute("checked","checked"):l.removeAttribute("checked"),!0)}}},addInputRules(){return[i1({find:W4,type:this.type,getAttributes:e=>({checked:"x"===e[e.length-1]})})]}}),K4=s1.create({name:"taskList",addOptions:()=>({itemTypeName:"taskItem",HTMLAttributes:{}}),group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return["ul",GQ(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),q4=p0.create({name:"lineHeight",addOptions:()=>({types:[],defaultLineHeight:1.5}),addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:this.options.defaultLineHeight,parseHTML:e=>e.style.lineHeight||this.options.defaultLineHeight,renderHTML:e=>e.lineHeight===this.options.defaultLineHeight?{}:{style:`line-height: ${e.lineHeight}`}}}}]},addCommands(){return{setLineHeight:e=>({commands:t})=>this.options.types.every((n=>t.updateAttributes(n,{lineHeight:e}))),unsetLineHeight:()=>({commands:e})=>this.options.types.every((t=>e.resetAttributes(t,"lineHeight")))}}});const Y4=(e,t,n,r)=>{const o=t+1;if(!r[o])return null;const{from:a,to:i}=r[t],l=i-a-e.length+n,{from:s,to:c}=r[o];return r[o]={to:c-l,from:s-l},[l,r]},X4=new eX("searchAndReplacePlugin"),Z4=p0.create({name:"searchAndReplace",addOptions:()=>({searchResultClass:"search-result",disableRegex:!0}),addStorage:()=>({searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}),addCommands:()=>({setSearchTerm:e=>({editor:t})=>(t.storage.searchAndReplace.searchTerm=e,!1),setReplaceTerm:e=>({editor:t})=>(t.storage.searchAndReplace.replaceTerm=e,!1),setCaseSensitive:e=>({editor:t})=>(t.storage.searchAndReplace.caseSensitive=e,!1),resetIndex:()=>({editor:e})=>(e.storage.searchAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n+1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:e})=>{const{results:t,resultIndex:n}=e.storage.searchAndReplace,r=n-1;return t[r]?e.storage.searchAndReplace.resultIndex=r:e.storage.searchAndReplace.resultIndex=t.length-1,!1},replace:()=>({editor:e,state:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return((e,t,{state:n,dispatch:r})=>{if(!t[0])return;const{from:o,to:a}=t[0];r&&r(n.tr.insertText(e,o,a))})(r,o,{state:t,dispatch:n}),!1},replaceAll:()=>({editor:e,tr:t,dispatch:n})=>{const{replaceTerm:r,results:o}=e.storage.searchAndReplace;return((e,t,{tr:n,dispatch:r})=>{let o=0,a=t.slice();if(a.length){for(let t=0;t<a.length;t+=1){const{from:r,to:i}=a[t];n.insertText(e,r,i);const l=Y4(e,t,o,a);l&&(o=l[0],a=l[1])}r(n)}})(r,o,{tr:t,dispatch:n}),!1}}),addProseMirrorPlugins(){const e=this.editor,{searchResultClass:t,disableRegex:n}=this.options;return[new ZY({key:X4,state:{init:()=>VJ.empty,apply({doc:r,docChanged:o},a){const{searchTerm:i,lastSearchTerm:l,caseSensitive:s,lastCaseSensitive:c,resultIndex:u,lastResultIndex:d}=e.storage.searchAndReplace;if(!o&&l===i&&c===s&&d===u)return a;var p;if(p=i,e.storage.searchAndReplace.lastSearchTerm=p,(t=>{e.storage.searchAndReplace.lastCaseSensitive=t})(s),(t=>{e.storage.searchAndReplace.lastResultIndex=t})(u),!i)return e.storage.searchAndReplace.results=[],VJ.empty;const{decorationsToReturn:f,results:h}=function(e,t,n,r){const o=[],a=[];let i=[],l=0;if(!t)return{decorationsToReturn:VJ.empty,results:[]};null==e||e.descendants(((e,t)=>{e.isText?i[l]?i[l]={text:i[l].text+e.text,pos:i[l].pos}:i[l]={text:`${e.text}`,pos:t}:l+=1})),i=i.filter(Boolean);for(const s of i){const{text:e,pos:n}=s,r=Array.from(e.matchAll(t)).filter((([e])=>e.trim()));for(const t of r){if(""===t[0])break;void 0!==t.index&&a.push({from:n+t.index,to:n+t.index+t[0].length})}}for(let s=0;s<a.length;s+=1){const e=a[s],t=s===r?`${n} ${n}-current`:n,i=RJ.inline(e.from,e.to,{class:t});o.push(i)}return{decorationsToReturn:VJ.create(e,o),results:a}}(r,((e,t,n)=>RegExp(t?e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):e,n?"gu":"gui"))(i,n,s),t,u);return e.storage.searchAndReplace.results=h,f}},props:{decorations(e){return this.getState(e)}}})]}}),J4="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",Q4="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",e3=(e,t)=>{for(const n in t)e[n]=t[n];return e},t3="numeric",n3="ascii",r3="alpha",o3="asciinumeric",a3="alphanumeric",i3="domain",l3="emoji",s3="scheme",c3="slashscheme",u3="whitespace";function d3(e,t){return e in t||(t[e]=[]),t[e]}function p3(e,t,n){t[t3]&&(t[o3]=!0,t[a3]=!0),t[n3]&&(t[o3]=!0,t[r3]=!0),t[o3]&&(t[a3]=!0),t[r3]&&(t[a3]=!0),t[a3]&&(t[i3]=!0),t[l3]&&(t[i3]=!0);for(const r in t){const t=d3(r,n);t.indexOf(e)<0&&t.push(e)}}function f3(e){void 0===e&&(e=null),this.j={},this.jr=[],this.jd=null,this.t=e}f3.groups={},f3.prototype={accepts(){return!!this.t},go(e){const t=this,n=t.j[e];if(n)return n;for(let r=0;r<t.jr.length;r++){const n=t.jr[r][0],o=t.jr[r][1];if(o&&n.test(e))return o}return t.jd},has(e,t){return void 0===t&&(t=!1),t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let o=0;o<e.length;o++)this.tt(e[o],t,n,r)},tr(e,t,n,r){let o;return r=r||f3.groups,t&&t.j?o=t:(o=new f3(t),n&&r&&p3(t,n,r)),this.jr.push([e,o]),o},ts(e,t,n,r){let o=this;const a=e.length;if(!a)return o;for(let i=0;i<a-1;i++)o=o.tt(e[i]);return o.tt(e[a-1],t,n,r)},tt(e,t,n,r){r=r||f3.groups;const o=this;if(t&&t.j)return o.j[e]=t,t;const a=t;let i,l=o.go(e);if(l?(i=new f3,e3(i.j,l.j),i.jr.push.apply(i.jr,l.jr),i.jd=l.jd,i.t=l.t):i=new f3,a){if(r)if(i.t&&"string"==typeof i.t){const e=e3(function(e,t){const n={};for(const r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}(i.t,r),n);p3(a,e,r)}else n&&p3(a,n,r);i.t=a}return o.j[e]=i,i}};const h3=(e,t,n,r,o)=>e.ta(t,n,r,o),m3=(e,t,n,r,o)=>e.tr(t,n,r,o),v3=(e,t,n,r,o)=>e.ts(t,n,r,o),g3=(e,t,n,r,o)=>e.tt(t,n,r,o),b3="WORD",y3="UWORD",w3="LOCALHOST",k3="TLD",x3="UTLD",E3="SCHEME",C3="SLASH_SCHEME",S3="NUM",O3="WS",_3="NL",N3="OPENBRACE",T3="CLOSEBRACE",A3="OPENBRACKET",M3="CLOSEBRACKET",I3="OPENPAREN",P3="CLOSEPAREN",L3="OPENANGLEBRACKET",R3="CLOSEANGLEBRACKET",B3="FULLWIDTHLEFTPAREN",D3="FULLWIDTHRIGHTPAREN",V3="LEFTCORNERBRACKET",j3="RIGHTCORNERBRACKET",F3="LEFTWHITECORNERBRACKET",z3="RIGHTWHITECORNERBRACKET",$3="FULLWIDTHLESSTHAN",H3="FULLWIDTHGREATERTHAN",U3="AMPERSAND",W3="APOSTROPHE",G3="ASTERISK",K3="AT",q3="BACKSLASH",Y3="BACKTICK",X3="CARET",Z3="COLON",J3="COMMA",Q3="DOLLAR",e5="DOT",t5="EQUALS",n5="EXCLAMATION",r5="HYPHEN",o5="PERCENT",a5="PIPE",i5="PLUS",l5="POUND",s5="QUERY",c5="QUOTE",u5="SEMI",d5="SLASH",p5="TILDE",f5="UNDERSCORE",h5="EMOJI",m5="SYM";var v5=Object.freeze({__proto__:null,WORD:b3,UWORD:y3,LOCALHOST:w3,TLD:k3,UTLD:x3,SCHEME:E3,SLASH_SCHEME:C3,NUM:S3,WS:O3,NL:_3,OPENBRACE:N3,CLOSEBRACE:T3,OPENBRACKET:A3,CLOSEBRACKET:M3,OPENPAREN:I3,CLOSEPAREN:P3,OPENANGLEBRACKET:L3,CLOSEANGLEBRACKET:R3,FULLWIDTHLEFTPAREN:B3,FULLWIDTHRIGHTPAREN:D3,LEFTCORNERBRACKET:V3,RIGHTCORNERBRACKET:j3,LEFTWHITECORNERBRACKET:F3,RIGHTWHITECORNERBRACKET:z3,FULLWIDTHLESSTHAN:$3,FULLWIDTHGREATERTHAN:H3,AMPERSAND:U3,APOSTROPHE:W3,ASTERISK:G3,AT:K3,BACKSLASH:q3,BACKTICK:Y3,CARET:X3,COLON:Z3,COMMA:J3,DOLLAR:Q3,DOT:e5,EQUALS:t5,EXCLAMATION:n5,HYPHEN:r5,PERCENT:o5,PIPE:a5,PLUS:i5,POUND:l5,QUERY:s5,QUOTE:c5,SEMI:u5,SLASH:d5,TILDE:p5,UNDERSCORE:f5,EMOJI:h5,SYM:m5});const g5=/[a-z]/,b5=new RegExp("\\p{L}","u"),y5=new RegExp("\\p{Emoji}","u"),w5=/\d/,k5=/\s/,x5="\n",E5="️",C5="";let S5=null,O5=null;function _5(e,t,n,r,o){let a;const i=t.length;for(let l=0;l<i-1;l++){const n=t[l];e.j[n]?a=e.j[n]:(a=new f3(r),a.jr=o.slice(),e.j[n]=a),e=a}return a=new f3(n),a.jr=o.slice(),e.j[t[i-1]]=a,a}function N5(e){const t=[],n=[];let r=0;for(;r<e.length;){let o=0;for(;"0123456789".indexOf(e[r+o])>=0;)o++;if(o>0){t.push(n.join(""));for(let t=parseInt(e.substring(r,r+o),10);t>0;t--)n.pop();r+=o}else n.push(e[r]),r++}return t}const T5={defaultProtocol:"http",events:null,format:M5,formatHref:M5,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function A5(e,t){void 0===t&&(t=null);let n=e3({},T5);e&&(n=e3(n,e instanceof A5?e.o:e));const r=n.ignoreTags,o=[];for(let a=0;a<r.length;a++)o.push(r[a].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=o}function M5(e){return e}function I5(e,t){this.t="token",this.v=e,this.tk=t}function P5(e,t){class n extends I5{constructor(t,n){super(t,n),this.t=e}}for(const r in t)n.prototype[r]=t[r];return n.t=e,n}A5.prototype={o:T5,ignoreTags:[],defaultRender:e=>e,check(e){return this.get("validate",e.toString(),e)},get(e,t,n){const r=null!=t;let o=this.o[e];return o?("object"==typeof o?(o=n.t in o?o[n.t]:T5[e],"function"==typeof o&&r&&(o=o(t,n))):"function"==typeof o&&r&&(o=o(t,n.t,n)),o):o},getObj(e,t,n){let r=this.o[e];return"function"==typeof r&&null!=t&&(r=r(t,n.t,n)),r},render(e){const t=e.render(this);return(this.get("render",null,e)||this.defaultRender)(t,e.t,e)}},I5.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){const t=this.toString(),n=e.get("truncate",t,this),r=e.get("format",t,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(e){return e.get("formatHref",this.toHref(e.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e){return void 0===e&&(e=T5.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get("validate",this.toString(),this)},render(e){const t=this,n=this.toHref(e.get("defaultProtocol")),r=e.get("formatHref",n,this),o=e.get("tagName",n,t),a=this.toFormattedString(e),i={},l=e.get("className",n,t),s=e.get("target",n,t),c=e.get("rel",n,t),u=e.getObj("attributes",n,t),d=e.getObj("events",n,t);return i.href=r,l&&(i.class=l),s&&(i.target=s),c&&(i.rel=c),u&&e3(i,u),{tagName:o,attributes:i,content:a,eventListeners:d}}};const L5=P5("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),R5=P5("text"),B5=P5("nl"),D5=P5("url",{isLink:!0,toHref(e){return void 0===e&&(e=T5.defaultProtocol),this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){const e=this.tk;return e.length>=2&&e[0].t!==w3&&e[1].t===Z3}}),V5=e=>new f3(e);function j5(e,t,n){const r=n[0].s,o=n[n.length-1].e;return new e(t.slice(r,o),n)}const F5="undefined"!=typeof console&&console&&console.warn||(()=>{}),z5={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function $5(e,t){if(void 0===t&&(t=!1),z5.initialized&&F5(`linkifyjs: already initialized - will not register custom scheme "${e}" until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw new Error('linkifyjs: incorrect scheme format.\n1. Must only contain digits, lowercase ASCII letters or "-"\n2. Cannot start or end with "-"\n3. "-" cannot repeat');z5.customSchemes.push([e,t])}function H5(){z5.scanner=function(e){void 0===e&&(e=[]);const t={};f3.groups=t;const n=new f3;null==S5&&(S5=N5(J4)),null==O5&&(O5=N5(Q4)),g3(n,"'",W3),g3(n,"{",N3),g3(n,"}",T3),g3(n,"[",A3),g3(n,"]",M3),g3(n,"(",I3),g3(n,")",P3),g3(n,"<",L3),g3(n,">",R3),g3(n,"(",B3),g3(n,")",D3),g3(n,"「",V3),g3(n,"」",j3),g3(n,"『",F3),g3(n,"』",z3),g3(n,"<",$3),g3(n,">",H3),g3(n,"&",U3),g3(n,"*",G3),g3(n,"@",K3),g3(n,"`",Y3),g3(n,"^",X3),g3(n,":",Z3),g3(n,",",J3),g3(n,"$",Q3),g3(n,".",e5),g3(n,"=",t5),g3(n,"!",n5),g3(n,"-",r5),g3(n,"%",o5),g3(n,"|",a5),g3(n,"+",i5),g3(n,"#",l5),g3(n,"?",s5),g3(n,'"',c5),g3(n,"/",d5),g3(n,";",u5),g3(n,"~",p5),g3(n,"_",f5),g3(n,"\\",q3);const r=m3(n,w5,S3,{[t3]:!0});m3(r,w5,r);const o=m3(n,g5,b3,{[n3]:!0});m3(o,g5,o);const a=m3(n,b5,y3,{[r3]:!0});m3(a,g5),m3(a,b5,a);const i=m3(n,k5,O3,{[u3]:!0});g3(n,x5,_3,{[u3]:!0}),g3(i,x5),m3(i,k5,i);const l=m3(n,y5,h5,{[l3]:!0});m3(l,y5,l),g3(l,E5,l);const s=g3(l,C5);m3(s,y5,l);const c=[[g5,o]],u=[[g5,null],[b5,a]];for(let d=0;d<S5.length;d++)_5(n,S5[d],k3,b3,c);for(let d=0;d<O5.length;d++)_5(n,O5[d],x3,y3,u);p3(k3,{tld:!0,ascii:!0},t),p3(x3,{utld:!0,alpha:!0},t),_5(n,"file",E3,b3,c),_5(n,"mailto",E3,b3,c),_5(n,"http",C3,b3,c),_5(n,"https",C3,b3,c),_5(n,"ftp",C3,b3,c),_5(n,"ftps",C3,b3,c),p3(E3,{scheme:!0,ascii:!0},t),p3(C3,{slashscheme:!0,ascii:!0},t),e=e.sort(((e,t)=>e[0]>t[0]?1:-1));for(let d=0;d<e.length;d++){const t=e[d][0],r=e[d][1]?{[s3]:!0}:{[c3]:!0};t.indexOf("-")>=0?r[i3]=!0:g5.test(t)?w5.test(t)?r[o3]=!0:r[n3]=!0:r[t3]=!0,v3(n,t,t,r)}return v3(n,"localhost",w3,{ascii:!0}),n.jd=new f3(m5),{start:n,tokens:e3({groups:t},v5)}}(z5.customSchemes);for(let e=0;e<z5.tokenQueue.length;e++)z5.tokenQueue[e][1]({scanner:z5.scanner});z5.parser=function(e){let{groups:t}=e;const n=t.domain.concat([U3,G3,K3,q3,Y3,X3,Q3,t5,r5,S3,o5,a5,i5,l5,d5,m5,p5,f5]),r=[W3,Z3,J3,e5,n5,s5,c5,u5,L3,R3,N3,T3,M3,A3,I3,P3,B3,D3,V3,j3,F3,z3,$3,H3],o=[U3,W3,G3,q3,Y3,X3,Q3,t5,r5,N3,T3,o5,a5,i5,l5,s5,d5,m5,p5,f5],a=V5(),i=g3(a,p5);h3(i,o,i),h3(i,t.domain,i);const l=V5(),s=V5(),c=V5();h3(a,t.domain,l),h3(a,t.scheme,s),h3(a,t.slashscheme,c),h3(l,o,i),h3(l,t.domain,l);const u=g3(l,K3);g3(i,K3,u),g3(s,K3,u),g3(c,K3,u);const d=g3(i,e5);h3(d,o,i),h3(d,t.domain,i);const p=V5();h3(u,t.domain,p),h3(p,t.domain,p);const f=g3(p,e5);h3(f,t.domain,p);const h=V5(L5);h3(f,t.tld,h),h3(f,t.utld,h),g3(u,w3,h);const m=g3(p,r5);h3(m,t.domain,p),h3(h,t.domain,p),g3(h,e5,f),g3(h,r5,m);const v=g3(h,Z3);h3(v,t.numeric,L5);const g=g3(l,r5),b=g3(l,e5);h3(g,t.domain,l),h3(b,o,i),h3(b,t.domain,l);const y=V5(D5);h3(b,t.tld,y),h3(b,t.utld,y),h3(y,t.domain,l),h3(y,o,i),g3(y,e5,b),g3(y,r5,g),g3(y,K3,u);const w=g3(y,Z3),k=V5(D5);h3(w,t.numeric,k);const x=V5(D5),E=V5();h3(x,n,x),h3(x,r,E),h3(E,n,x),h3(E,r,E),g3(y,d5,x),g3(k,d5,x);const C=g3(s,Z3),S=g3(c,Z3),O=g3(S,d5),_=g3(O,d5);h3(s,t.domain,l),g3(s,e5,b),g3(s,r5,g),h3(c,t.domain,l),g3(c,e5,b),g3(c,r5,g),h3(C,t.domain,x),g3(C,d5,x),h3(_,t.domain,x),h3(_,n,x),g3(_,d5,x);const N=[[N3,T3],[A3,M3],[I3,P3],[L3,R3],[B3,D3],[V3,j3],[F3,z3],[$3,H3]];for(let T=0;T<N.length;T++){const[e,t]=N[T],o=g3(x,e);g3(E,e,o),g3(o,t,x);const a=V5(D5);h3(o,n,a);const i=V5();h3(o,r),h3(a,n,a),h3(a,r,i),h3(i,n,a),h3(i,r,i),g3(a,t,x),g3(i,t,x)}return g3(a,w3,y),g3(a,_3,B5),{start:a,tokens:v5}}(z5.scanner.tokens);for(let e=0;e<z5.pluginQueue.length;e++)z5.pluginQueue[e][1]({scanner:z5.scanner,parser:z5.parser});z5.initialized=!0}function U5(e){return z5.initialized||H5(),function(e,t,n){let r=n.length,o=0,a=[],i=[];for(;o<r;){let l=e,s=null,c=null,u=0,d=null,p=-1;for(;o<r&&!(s=l.go(n[o].t));)i.push(n[o++]);for(;o<r&&(c=s||l.go(n[o].t));)s=null,l=c,l.accepts()?(p=0,d=l):p>=0&&p++,o++,u++;if(p<0)o-=u,o<r&&(i.push(n[o]),o++);else{i.length>0&&(a.push(j5(R5,t,i)),i=[]),o-=p,u-=p;const e=d.t,r=n.slice(o-u,o);a.push(j5(e,t,r))}}return i.length>0&&a.push(j5(R5,t,i)),a}(z5.parser.start,e,function(e,t){const n=function(e){const t=[],n=e.length;let r=0;for(;r<n;){let o,a=e.charCodeAt(r),i=a<55296||a>56319||r+1===n||(o=e.charCodeAt(r+1))<56320||o>57343?e[r]:e.slice(r,r+2);t.push(i),r+=i.length}return t}(t.replace(/[A-Z]/g,(e=>e.toLowerCase()))),r=n.length,o=[];let a=0,i=0;for(;i<r;){let l=e,s=null,c=0,u=null,d=-1,p=-1;for(;i<r&&(s=l.go(n[i]));)l=s,l.accepts()?(d=0,p=0,u=l):d>=0&&(d+=n[i].length,p++),c+=n[i].length,a+=n[i].length,i++;a-=d,i-=p,c-=d,o.push({t:u.t,v:t.slice(a-c,a),s:a-c,e:a})}return o}(z5.scanner.start,e))}function W5(e,t,n){if(void 0===t&&(t=null),void 0===n&&(n=null),t&&"object"==typeof t){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}const r=new A5(n),o=U5(e),a=[];for(let i=0;i<o.length;i++){const e=o[i];!e.isLink||t&&e.t!==t||!r.check(e)||a.push(e.toFormattedObject(r))}return a}function G5(e){return new ZY({key:new eX("autolink"),appendTransaction:(t,n,r)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),a=t.some((e=>e.getMeta("preventAutolink")));if(!o||a)return;const{tr:i}=r,l=function(e,t){const n=new AY(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),s=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const a=[];if(e.ranges.length)e.forEach(((e,t)=>{a.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;a.push({from:e,to:t})}a.forEach((({from:e,to:n})=>{const a=t.slice(o).map(e,-1),i=t.slice(o).map(n),l=t.invert().map(a,-1),s=t.invert().map(i);r.push({oldRange:{from:l,to:s},newRange:{from:a,to:i}})}))})),D0(r)}(l);return s.forEach((({newRange:t})=>{const n=function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,t,(e=>e.isTextblock));let o,a;if(n.length>1?(o=n[0],a=r.doc.textBetween(o.pos,o.pos+o.node.nodeSize,void 0," ")):n.length&&r.doc.textBetween(t.from,t.to," "," ").endsWith(" ")&&(o=n[0],a=r.doc.textBetween(o.pos,t.to,void 0," ")),o&&a){const t=a.split(" ").filter((e=>""!==e));if(t.length<=0)return!1;const n=t[t.length-1],s=o.pos+a.lastIndexOf(n);if(!n)return!1;const c=U5(n).map((t=>t.toObject(e.defaultProtocol)));if(!(1===(l=c).length?l[0].isLink:3===l.length&&l[1].isLink&&["()","[]"].includes(l[0].value+l[2].value)))return!1;c.filter((e=>e.isLink)).map((e=>({...e,from:s+e.start+1,to:s+e.end+1}))).filter((e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code))).filter((t=>e.validate(t.value))).forEach((t=>{V0(t.from,t.to,r.doc).some((t=>t.mark.type===e.type))||i.addMark(t.from,t.to,e.type.create({href:t.href}))}))}var l})),i.steps.length?i:void 0}})}const K5=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g,q5=/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;function Y5(e){return!e||e.replace(K5,"").match(q5)}const X5=l1.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.protocols.forEach((e=>{"string"!=typeof e?$5(e.scheme,e.optionalSlashes):$5(e)}))},onDestroy(){f3.groups={},z5.scanner=null,z5.parser=null,z5.tokenQueue=[],z5.pluginQueue=[],z5.customSchemes=[],z5.initialized=!1},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:e=>!!e}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:"a[href]",getAttrs:e=>{const t=e.getAttribute("href");return!(!t||!Y5(t))&&{href:t}}}],renderHTML({HTMLAttributes:e}){return Y5(e.href)?["a",GQ(this.options.HTMLAttributes,e),0]:["a",GQ(this.options.HTMLAttributes,{...e,href:""}),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[u1({find:e=>{const t=[];if(e){const{validate:n}=this.options,r=W5(e).filter((e=>e.isLink&&n(e.value)));r.length&&r.forEach((e=>t.push({text:e.value,data:{href:e.href},index:e.start})))}return t},type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(G5({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:this.options.validate})),!0===this.options.openOnClick&&e.push((t={type:this.type},new ZY({key:new eX("handleClickLink"),props:{handleClick:(e,n,r)=>{var o,a;if(0!==r.button)return!1;let i=r.target;const l=[];for(;"DIV"!==i.nodeName;)l.push(i),i=i.parentNode;if(!l.find((e=>"A"===e.nodeName)))return!1;const s=B0(e.state,t.type.name),c=r.target,u=null!==(o=null==c?void 0:c.href)&&void 0!==o?o:s.href,d=null!==(a=null==c?void 0:c.target)&&void 0!==a?a:s.target;return!(!c||!u||(window.open(u,d),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new ZY({key:new eX("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:o}=t,{selection:a}=o,{empty:i}=a;if(i)return!1;let l="";r.content.forEach((e=>{l+=e.textContent}));const s=W5(l,{defaultProtocol:e.defaultProtocol}).find((e=>e.isLink&&e.value===l));return!(!l||!s||(e.editor.commands.setMark(e.type,{href:s.href}),0))}}})}({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),e}}),Z5=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,J5=s1.create({name:"image",addOptions:()=>({inline:!1,allowBase64:!1,HTMLAttributes:{}}),inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes:()=>({src:{default:null},alt:{default:null},title:{default:null}}),parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:e}){return["img",GQ(this.options.HTMLAttributes,e)]},addCommands(){return{setImage:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addInputRules(){return[r1({find:Z5,type:this.type,getAttributes:e=>{const[,,t,n,r]=e;return{src:n,alt:t,title:r}}})]}}),Q5={tag:{type:[String,Object],default:"div"},resizable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!1},boundary:{type:Boolean},disabled:Boolean,width:{type:Number,default:0},height:{type:Number,default:0},left:{type:Number,default:0},top:{type:Number,default:0},zIndex:{type:Number,default:0},angle:{type:Number,default:0},color:{type:String,default:"#3a7afe"},minWidth:{type:Number,default:-1/0},minHeight:{type:Number,default:-1/0},maxWidth:{type:Number,default:0},maxHeight:{type:Number,default:0},aspectRatio:{type:Number},selected:Boolean,snapToGrid:Boolean,gridX:{type:Number,default:50},gridY:{type:Number,default:50},scaleRatio:{type:Number,default:1},disabledKeyEvent:Boolean,border:{type:Boolean,default:!0},resizeList:{type:Array},equalProportion:{type:Boolean},checkCollision:{type:Boolean},snap:Boolean,snapThreshold:{type:Number,default:10},markline:[Boolean,Function]};function e8(e,t){const n=r=>{t&&t(r),document.removeEventListener("mousemove",e),document.removeEventListener("mouseup",n),document.removeEventListener("mouseleave",n),document.removeEventListener("touchmove",e),document.removeEventListener("touchend",n)};document.addEventListener("mousemove",e),document.addEventListener("mouseup",n),document.addEventListener("mouseleave",n),document.addEventListener("touchmove",e),document.addEventListener("touchend",n)}function t8(e){let t=0,n=0;if(function(e){const t=Object.prototype.toString.call(e);return"TouchEvent"===t.substring(8,t.length-1)}(e)){const r=e.targetTouches[0];t=r.pageX,n=r.pageY}else t=e.clientX,n=e.clientY;return{clientX:t,clientY:n}}const n8=(e=0)=>parseInt(e+"")+"px",r8={n:"top",s:"bottom",e:"right",w:"left",ne:"top-right",nw:"top-left",se:"bottom-right",sw:"bottom-left"},o8=["n","ne","e","se","s","sw","w","nw"],a8={n:0,ne:1,e:2,se:3,s:4,sw:5,w:6,nw:7},i8={0:0,1:1,2:2,3:2,4:3,5:4,6:4,7:5,8:6,9:6,10:7,11:8},l8=(e,t)=>{const n=i8[Math.floor(e/30)];return o8[(a8[t]+n)%8]},s8=(e=0,t)=>{let n=[];for(let r=0;r<o8.length;r++){const o=o8[r],[a,i]=r8[o].split("-"),l=l8(e,o),s={[a]:"0%",cursor:l+"-resize",side:r8[o]};if(i)s[i]="0%";else{s[["top","bottom"].includes(a)?"left":"top"]="50%"}t?t.includes(r8[o])&&n.push(s):n.push(s)}return n},c8=e=>e*Math.PI/180,u8=e=>Math.cos(c8(e)),d8=e=>Math.sin(c8(e)),p8=(e,t,n)=>{const r=e+t;return r>n?e=r:(t=n-e,e=n),{height:e,deltaH:t}},f8=(e,t,n)=>{const r=e+t;return r>n?e=r:(t=n-e,e=n),{width:e,deltaW:t}},h8=(e,t,n)=>{const{width:r,height:o}=e;return{width:Math.abs(r),height:Math.abs(o),left:t-Math.abs(r)/2,top:n-Math.abs(o)/2}};function m8(e,t){const n=e>0?t:-t;let r=0;return r=Math.abs(e)%t>t/2?n*Math.ceil(Math.abs(e)/t):n*Math.floor(Math.abs(e)/t),r}function v8(e,t,n){if(!e||!t)return!1;const r=g8(e,n),o=g8(t,n);return r.left<o.left+o.width&&r.left+r.width>o.left&&r.top<o.top+o.height&&r.top+r.height>o.top}const g8=(e,t)=>{var n=e.getBoundingClientRect();return{...n,left:n.left/t,top:n.top/t,right:n.right/t,bottom:n.bottom/t,width:n.width/t,height:n.height/t}},b8=e=>"function"==typeof e;function y8(e,n){let r=null,o=null;const a=t.computed((()=>e.value.offsetParent||document.body)),i=t.computed((()=>g8(a.value,n.scaleRatio))),l=t.ref({x:[],y:[]}),s=(e={})=>{if(n.markline){if(b8(n.markline))return n.markline(e);null===e.left?r.style.display="none":(r.style.left=e.left+"px",r.style.backgroundColor=n.color,r.style.display="block"),null===e.top?o.style.display="none":(o.style.top=e.top+"px",o.style.backgroundColor=n.color,o.style.display="block")}};return t.onMounted((()=>{n.markline&&!b8(n.markline)&&(r||(r=document.querySelector(".es-drager-markline-x")||w8("x",a.value,n.color)),o||(o=document.querySelector(".es-drager-markline-y")||w8("y",a.value,n.color)))})),{marklineEmit:t=>{if(n.snap||n.markline)switch(t){case"drag-start":(()=>{const t=g8(e.value,n.scaleRatio),r=document.querySelectorAll(".es-drager"),o=[];for(let a=0;a<r.length;a++){const t=r[a];t!==e.value&&o.push(g8(t,n.scaleRatio))}l.value=function(e,t){const n={x:[],y:[]},{width:r=0,height:o=0}=t;return e.forEach((e=>{const{top:t,left:a,width:i,height:l}=e;n.y.push({showTop:t,top:t}),n.y.push({showTop:t,top:t-o}),n.y.push({showTop:t+l/2,top:t+l/2-o/2}),n.y.push({showTop:t+l,top:t+l}),n.y.push({showTop:t+l,top:t+l-o}),n.x.push({showLeft:a,left:a}),n.x.push({showLeft:a+i,left:a+i}),n.x.push({showLeft:a+i/2,left:a+i/2-r/2}),n.x.push({showLeft:a+i,left:a+i-r}),n.x.push({showLeft:a,left:a-r})})),n}(o,t)})();break;case"drag":return(()=>{const t={top:null,left:null,diffX:0,diffY:0},r=g8(e.value,n.scaleRatio);for(let e=0;e<l.value.y.length;e++){const{top:o,showTop:a}=l.value.y[e];if(Math.abs(o-r.top)<n.snapThreshold){t.diffY=o-r.top,t.top=a-i.value.top;break}}for(let e=0;e<l.value.x.length;e++){const{left:o,showLeft:a}=l.value.x[e];if(Math.abs(o-r.left)<n.snapThreshold){t.diffX=o-r.left,t.left=a-i.value.left;break}}return s(t),t})();case"drag-end":s({left:null,top:null})}}}}function w8(e="x",t,n=""){const r=document.createElement("div");return r.classList.add(`es-drager-markline-${e}`),r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="9999",r.style.backgroundColor=n,r.style.display="none","x"===e?(r.style.height="100%",r.style.width="1px"):(r.style.height="1px",r.style.width="100%"),t.appendChild(r),r}const k8=t.createElementVNode("div",{class:"es-drager-rotate-handle"},[t.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[t.createElementVNode("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88z"})])],-1),x8=t.defineComponent({__name:"rotate",props:{modelValue:{type:Number,default:0},element:{type:Object}},emits:["update:modelValue","rotate","rotate-start","rotate-end"],setup(e,{emit:n}){const r=e,o=n,a=t.ref(null),i=t.computed({get:()=>r.modelValue,set:e=>{o("update:modelValue",e)}});function l(e){if(!r.element)return console.warn("[es-drager] rotate component need drag element property");e.stopPropagation();const{width:t,height:n,left:a,top:l}=r.element.getBoundingClientRect(),s=a+t/2,c=l+n/2;o("rotate-start",i.value),e8((e=>{const{clientX:t,clientY:n}=t8(e),r=s-t,a=c-n,l=180*Math.atan2(a,r)/Math.PI-90;i.value=(l+360)%360,o("rotate",i.value)}),(()=>{o("rotate-end",i.value)}))}return(e,n)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"rotateRef",ref:a,class:"es-drager-rotate",onMousedown:l,onTouchstartPassive:l},[t.renderSlot(e.$slots,"default",{},(()=>[k8]))],544))}}),E8=["data-side","onMousedown","onTouchstartPassive"],C8=t.createElementVNode("div",{class:"es-drager-dot-handle"},null,-1),S8=t.defineComponent({__name:"drager",props:Q5,emits:["change","drag","drag-start","drag-end","resize","resize-start","resize-end","rotate","rotate-start","rotate-end","focus","blur"],setup(e,{emit:n}){const r=e,o=n,a=(e,...t)=>{o(e,...t)},i=t.ref(null),{selected:l,dragData:s,isMousedown:c,getBoundary:u,checkDragerCollision:d}=function(e,n,r){const o=t.ref(!1),a=t.ref(!1),i=t.ref({width:n.width,height:n.height,left:n.left,top:n.top,angle:n.angle}),{marklineEmit:l}=y8(e,n),s=new Set;function c(e){if(s.add(e.button),n.disabled)return;o.value=!0,a.value=!0;let{clientX:c,clientY:f}=t8(e);const{left:h,top:m}=i.value;let v=0,g=0,b=0,y=0;n.boundary&&([v,g,b,y]=u()),l("drag-start"),r&&r("drag-start",i.value),e8((e=>{if(s.size>1)return;const{clientX:o,clientY:a}=t8(e);let u=(o-c)/n.scaleRatio+h,p=(a-f)/n.scaleRatio+m;if(n.snapToGrid){let{left:e,top:t}=i.value;const r=p-t;u=e+m8(u-e,n.gridX),p=t+m8(r,n.gridY)}n.boundary&&([u,p]=d(u,p,v,g,b,y)),i.value.left=u,i.value.top=p,r&&r("drag",i.value),t.nextTick((()=>{const e=l("drag");n.snap&&(e.diffX&&(i.value.left+=e.diffX),e.diffY&&(i.value.top+=e.diffY))}))}),(e=>{n.checkCollision&&p()&&(i.value.top=m,i.value.left=h),s.clear(),o.value=!1,l("drag-end"),r&&r("drag-end",i.value)}))}const u=()=>{let t=0,r=0;const{left:o,top:a,height:l,width:s,angle:c}=i.value,u=e.value.offsetParent||document.body,d=g8(u,n.scaleRatio);if(c){const i=g8(e.value,n.scaleRatio);t=i.left-Math.floor(o-(i.width-s)+d.left),r=i.top-Math.floor(a-(i.height-l)+d.top)}return[t,d.width-s-t,r,d.height-l-r,d.width,d.height]},d=(e,t,n,r,o,a)=>[e=(e=e<n?n:e)>r?r:e,t=(t=t<o?o:t)>a?a:t],p=()=>{const t=e.value.offsetParent||document.body,r=Array.from(t.children).filter((t=>t!==e.value&&t.classList.contains("es-drager")));for(let o=0;o<r.length;o++){const t=r[o];if(v8(e.value,t,n.scaleRatio))return!0}},f=()=>{a.value=!1},{onKeydown:h,onKeyup:m}=function(e,t,n,{getBoundary:r,fixBoundary:o,checkDragerCollision:a,emit:i}){let l=0,s=0;return{onKeydown:n=>{let{left:a,top:i}=t.value;if(l||(l=a),s||(s=i),["ArrowRight","ArrowLeft"].includes(n.key)){const t="ArrowRight"===n.key;let r=t?1:-1;e.snapToGrid&&(r=t?e.gridX:-e.gridX),a+=r}else if(["ArrowUp","ArrowDown"].includes(n.key)){const t="ArrowDown"===n.key;let r=t?1:-1;e.snapToGrid&&(r=t?e.gridY:-e.gridY),i+=r}if(e.boundary){const[e,t,n,l]=r();[a,i]=o(a,i,e,t,n,l)}t.value.left=a,t.value.top=i},onKeyup:n=>{["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(n.key)&&e.checkCollision&&a()&&(t.value.left=l,t.value.top=s),l=0,s=0}}}(n,i,0,{getBoundary:u,fixBoundary:d,checkDragerCollision:p,emit:r});return t.watch(a,(e=>{e?(r("focus",e),document.addEventListener("click",f,{once:!0})):r("blur",e),!n.disabledKeyEvent&&(e?(document.addEventListener("keydown",h),document.addEventListener("keyup",m)):(document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)))})),t.onMounted((()=>{if(e.value){if(!i.value.width&&!i.value.height){const{width:t,height:r}=g8(e.value,n.scaleRatio);i.value={...i.value,width:t||100,height:r||100}}e.value.addEventListener("mousedown",c),e.value.addEventListener("touchstart",c,{passive:!0})}})),t.onBeforeUnmount((()=>{document.removeEventListener("click",f),document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)})),{isMousedown:o,selected:a,dragData:i,getBoundary:u,checkDragerCollision:p}}(i,r,a),p=t.ref(s8(0,r.resizeList)),f=t.computed((()=>r.resizable&&!r.disabled)),h=t.computed((()=>r.rotatable&&!r.disabled&&l.value)),m=t.computed((()=>{const{width:e,height:t,left:n,top:o,angle:a}=s.value,i={};return e&&(i.width=n8(e)),t&&(i.height=n8(t)),{...i,left:n8(n),top:n8(o),zIndex:r.zIndex,transform:`rotate(${a}deg)`,"--es-drager-color":r.color}}));function v(e){i.value||(i.value=e.$el||e)}function g(e){p.value=s8(e,r.resizeList),a("rotate-end",s.value)}function b(e,t){if(r.disabled)return;t.stopPropagation();const{clientX:n,clientY:o}=t8(t),i=n,l=o,{width:c,height:p,left:f,top:h}=s.value,m={width:c,height:p,centerX:f+c/2,centerY:h+p/2,rotateAngle:s.value.angle},v=e.side,{minWidth:g,minHeight:b,aspectRatio:y,equalProportion:w}=r;a("resize-start",s.value);let k=[];r.boundary&&(k=u()),e8((e=>{const{clientX:t,clientY:n}=t8(e);let o=(t-i)/r.scaleRatio,c=(n-l)/r.scaleRatio;r.snapToGrid&&(o=m8(o,r.gridX),c=m8(c,r.gridY));const u=Math.atan2(c,o),d=((e,t)=>Math.sqrt(e*e+t*t))(o,c),p=e.shiftKey,f=u-c8(m.rotateAngle),h=d*Math.cos(f),x=d*Math.sin(f),E=!w&&!p||y?y:m.width/m.height,{position:{centerX:C,centerY:S},size:{width:O,height:_}}=((e,t,n,r,o,a,i)=>{let{width:l,height:s,centerX:c,centerY:u,rotateAngle:d}=t;const p=l<0?-1:1,f=s<0?-1:1;switch(l=Math.abs(l),s=Math.abs(s),e){case"right":{const e=f8(l,n,a);l=e.width,n=e.deltaW,o?(r=n/o,s=l/o,c+=n/2*u8(d)-r/2*d8(d),u+=n/2*d8(d)+r/2*u8(d)):(c+=n/2*u8(d),u+=n/2*d8(d));break}case"top-right":{r=-r;const e=f8(l,n,a);l=e.width,n=e.deltaW;const t=p8(s,r,i);s=t.height,r=t.deltaH,o&&(n=r*o,l=s*o),c+=n/2*u8(d)+r/2*d8(d),u+=n/2*d8(d)-r/2*u8(d);break}case"bottom-right":{const e=f8(l,n,a);l=e.width,n=e.deltaW;const t=p8(s,r,i);s=t.height,r=t.deltaH,o&&(n=r*o,l=s*o),c+=n/2*u8(d)-r/2*d8(d),u+=n/2*d8(d)+r/2*u8(d);break}case"bottom":{const e=p8(s,r,i);s=e.height,r=e.deltaH,o?(l=s*o,c+=(n=r*o)/2*u8(d)-r/2*d8(d),u+=n/2*d8(d)+r/2*u8(d)):(c-=r/2*d8(d),u+=r/2*u8(d));break}case"bottom-left":{const e=f8(l,n=-n,a);l=e.width,n=e.deltaW;const t=p8(s,r,i);s=t.height,r=t.deltaH,o&&(s=l/o,r=n/o),c-=n/2*u8(d)+r/2*d8(d),u-=n/2*d8(d)-r/2*u8(d);break}case"left":{const e=f8(l,n=-n,a);l=e.width,n=e.deltaW,o?(s=l/o,r=n/o,c-=n/2*u8(d)+r/2*d8(d),u-=n/2*d8(d)-r/2*u8(d)):(c-=n/2*u8(d),u-=n/2*d8(d));break}case"top-left":{r=-r;const e=f8(l,n=-n,a);l=e.width,n=e.deltaW;const t=p8(s,r,i);s=t.height,r=t.deltaH,o&&(l=s*o,n=r*o),c-=n/2*u8(d)-r/2*d8(d),u-=n/2*d8(d)+r/2*u8(d);break}case"top":{const e=p8(s,r=-r,i);s=e.height,r=e.deltaH,o?(l=s*o,c+=(n=r*o)/2*u8(d)+r/2*d8(d),u+=n/2*d8(d)-r/2*u8(d)):(c+=r/2*d8(d),u-=r/2*u8(d));break}}return{position:{centerX:c,centerY:u},size:{width:l*p,height:s*f}}})(v,{...m,rotateAngle:m.rotateAngle},h,x,E,g,b),N=(({centerX:e,centerY:t,width:n,height:r,angle:o})=>({top:t-r/2,left:e-n/2,width:n,height:r,angle:o}))({centerX:C,centerY:S,width:O,height:_,angle:s.value.angle});let T={...s.value,...h8(N,C,S)};r.maxWidth>0&&(T.width=Math.min(T.width,r.maxWidth)),r.maxHeight>0&&(T.height=Math.min(T.height,r.maxHeight)),r.boundary&&(T=function(e,t,n){const[r,o,a,i,l,c]=t,u=e.left<r,d=e.left+e.width>l,p=e.top<a,f=e.top+e.height>c;return u&&(e.left=r,e.width=s.value.width),p&&(e.top=a,e.height=s.value.height),(d||f)&&(d&&(e.left=s.value.left),f&&(e.top=s.value.top),f||(e.width=l-e.left),d||(e.height=c-e.top)),(f||p)&&n&&(e.width=s.value.width,e.left=s.value.left),(d||u)&&n&&(e.height=s.value.height,e.top=s.value.top),e}(T,k,E)),s.value=T,a("resize",s.value)}),(()=>{r.checkCollision&&d()&&(s.value={...s.value,width:c,height:p,left:f,top:h}),a("resize-end",s.value)}))}return t.watch((()=>[r.width,r.height,r.left,r.top,r.angle]),(([e,t,n,r,o],[a,i,l,c,u])=>{e!==a&&(s.value.width=e),t!==i&&(s.value.height=t),n!==l&&(s.value.left=n),r!==c&&(s.value.top=r),o!==u&&(s.value.angle=o)})),t.watch((()=>s.value),(e=>{o("change",{...e})}),{deep:!0}),t.watch((()=>r.selected),(e=>{l.value=e}),{immediate:!0}),(e,n)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),{ref:v,class:t.normalizeClass(["es-drager",{disabled:e.disabled,dragging:t.unref(c),selected:t.unref(l),border:e.border}]),style:t.normalizeStyle(m.value),onClick:n[3]||(n[3]=t.withModifiers((()=>{}),["stop"]))},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default"),f.value?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(p.value,((n,r)=>(t.openBlock(),t.createElementBlock("div",{key:r,class:"es-drager-dot","data-side":n.side,style:t.normalizeStyle({...n}),onMousedown:e=>b(n,e),onTouchstartPassive:e=>b(n,e)},[t.renderSlot(e.$slots,"resize",t.normalizeProps(t.guardReactiveProps({side:n.side})),(()=>[C8]))],44,E8)))),128)):t.createCommentVNode("",!0),h.value?(t.openBlock(),t.createBlock(x8,{key:1,modelValue:t.unref(s).angle,"onUpdate:modelValue":n[0]||(n[0]=e=>t.unref(s).angle=e),element:i.value,onRotate:n[1]||(n[1]=e=>a("rotate",t.unref(s))),onRotateStart:n[2]||(n[2]=e=>a("rotate-start",t.unref(s))),onRotateEnd:g},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"rotate")])),_:3},8,["modelValue","element"])):t.createCommentVNode("",!0)])),_:3},8,["class","style"]))}});S8.install=e=>{e.component("es-drager",S8)};var O8={},_8={},N8=k&&k.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},T8=k&&k.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};Object.defineProperty(_8,"__esModule",{value:!0}),_8.base64ToBlob=void 0,_8.base64ToBlob=function(e){return N8(this,void 0,void 0,(function(){var t,n;return T8(this,(function(r){switch(r.label){case 0:return[4,fetch(e)];case 1:return[4,r.sent().blob()];case 2:return t=r.sent(),n=function(e){var t;return null===(t=e.match(A8))||void 0===t?void 0:t.slice(1,2).pop()}(e),n&&(t=t.slice(0,t.size,n)),[2,t]}}))}))};var A8=/^data:(.+);base64,/;var M8={},I8=k&&k.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},P8=k&&k.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};Object.defineProperty(M8,"__esModule",{value:!0}),M8.base64ToFile=void 0,M8.base64ToFile=function(e,t,n){return I8(this,void 0,void 0,(function(){var r;return P8(this,(function(o){switch(o.label){case 0:return[4,fetch(e)];case 1:return[4,o.sent().blob()];case 2:return r=o.sent(),[2,new File([r],t,n)]}}))}))};var L8,R8,B8={},D8=k&&k.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,l)}s((r=r.apply(e,t||[])).next())}))},V8=k&&k.__generator||function(e,t){var n,r,o,a,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return a={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function l(l){return function(s){return function(l){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,l[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&l[0]?r.return:l[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,l[1])).done)return o;switch(r=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,r=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==l[0]&&2!==l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(s){l=[6,s],r=0}finally{n=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}([l,s])}}};function j8(e){return D8(this,void 0,void 0,(function(){return V8(this,(function(t){return[2,new Promise((function(t,n){try{var r=new FileReader,o=function(){t(r.result),r.removeEventListener(L8.loadend,o)};r.addEventListener(L8.loadend,o);var a=function(){n(r.error),r.removeEventListener(L8.error,a)};r.addEventListener(L8.error,a),r.readAsDataURL(e)}catch(i){n(i)}}))]}))}))}Object.defineProperty(B8,"__esModule",{value:!0}),B8.blobToBase64=void 0,B8.blobToBase64=function(e){return D8(this,void 0,void 0,(function(){return V8(this,(function(t){return[2,"function"==typeof FileReader?j8(e):z8(e)]}))}))},(R8=L8||(L8={})).error="error",R8.loadend="loadend";var F8="application/octet-stream";function z8(e){return D8(this,void 0,void 0,(function(){var t,n,r,o;return V8(this,(function(a){switch(a.label){case 0:return r=(n=Buffer).from,[4,e.text()];case 1:return t=r.apply(n,[a.sent()]),o=e.type||F8,[2,"data:".concat(o,";base64,").concat(t.toString("base64"))]}}))}))}var $8={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fileToBase64=void 0;var t=B8;Object.defineProperty(e,"fileToBase64",{enumerable:!0,get:function(){return t.blobToBase64}})}($8),function(e){var t=k&&k.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=k&&k.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(_8,e),n(M8,e),n(B8,e),n($8,e)}(O8);const H8={class:"node-container hover-shadow select-outline image"},U8={key:0,class:"loading"},W8={key:1,class:"error"},G8=["src"],K8={key:0,class:"uploading"},q8=[t.createElementVNode("span",null,null,-1)],Y8={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),{imagePreview:r}=zN(),{isLoading:o,error:a}=LN({src:e.node.attrs.src}),i=t.ref(null),l=t.ref(null);let s=t.ref(!1),c=t.ref(0);t.onMounted((async()=>{const t=i.value.$el.clientWidth;c.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t})}));const u=()=>{var t;const n=null==(t=l.value)?void 0:t.offsetHeight;i.value&&n&&e.updateAttributes({height:n})},d=({angle:t})=>{e.updateAttributes({angle:t})},p=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})},f=({left:t,top:n})=>{e.updateAttributes({left:t,top:n})};return gN(i,(()=>s.value=!1)),t.watch((()=>e.node.attrs.equalProportion),(async()=>{await t.nextTick();const n=l.value.offsetWidth,r=l.value.offsetHeight;e.updateAttributes({width:n,height:r})})),t.watch((()=>e.node.attrs.src),(async r=>{if(!1===e.node.attrs.uploaded&&!a.value){if(r.startsWith("data:image")){const t=r.split(";")[0].split(":")[1];let n=t.split("/")[1];"jpeg"===n&&(n="jpg"),"svg+xml"===n&&(n="svg");const o=$_(10),a=await O8.base64ToFile(r,`${o}.${n}`,{type:t});e.updateAttributes({file:a})}await t.nextTick(),(async()=>{if(!e.node.attrs.uploaded&&e.node.attrs.file)try{const{id:t,url:r}=await n.value.onFileUpload(e.node.attrs.file);i.value&&e.updateAttributes({id:t,src:r,file:null,uploaded:!0})}catch(t){I$("error",t.message)}})()}}),{immediate:!0}),t.watch((()=>a.value),(({type:t})=>{e.updateAttributes({error:"error"===t})})),(e,h)=>{const m=dC;return t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:i,class:"node-view image-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign}),onDblclick:h[1]||(h[1]=t=>r.value=e.node.attrs.src)},{default:t.withCtx((()=>[t.createElementVNode("div",H8,[e.node.attrs.src&&t.unref(o)?(t.openBlock(),t.createElementBlock("div",U8,[t.createVNode(m,{name:"loading",class:"loading-icon"}),t.createTextVNode(" "+t.toDisplayString(e.t("node.image.loading")),1)])):e.node.attrs.src&&t.unref(a)?(t.openBlock(),t.createElementBlock("div",W8,[t.createVNode(m,{name:"image-failed",class:"error-icon"}),t.createTextVNode(" "+t.toDisplayString(e.t("node.image.error")),1)])):(t.openBlock(),t.createBlock(t.unref(S8),{key:2,selected:t.unref(s),rotatable:!0,boundary:!1,draggable:Boolean(e.node.attrs.draggable)&&!t.unref(n).document.readOnly,angle:e.node.attrs.angle,width:Number(e.node.attrs.width),height:Number(e.node.attrs.height),left:Number(e.node.attrs.left),top:Number(e.node.attrs.top),"min-width":14,"min-height":14,"max-width":t.unref(c),"z-index":10,"equal-proportion":e.node.attrs.equalProportion,onRotate:d,onResize:p,onDrag:f,onClick:h[0]||(h[0]=e=>t.isRef(s)?s.value=!0:s=!0)},{default:t.withCtx((()=>[t.createElementVNode("img",{ref_key:"imageRef",ref:l,src:e.node.attrs.src,style:t.normalizeStyle({height:e.node.attrs.equalProportion?"auto":"100%",transform:e.node.attrs.flipX||e.node.attrs.flipX?`rotateX(${e.node.attrs.flipX?"180":"0"}deg) rotateY(${e.node.attrs.flipY?"180":"0"}deg)`:"none"}),onLoad:u},null,44,G8),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",K8,q8))])),_:1},8,["selected","draggable","angle","width","height","left","top","max-width","equal-proportion"]))])])),_:1},8,["style"])}}},X8=J5.extend({atom:!0,addAttributes:()=>({id:{default:null},type:{default:"image"},file:{default:null},src:{default:null},content:{default:null},width:{default:null},height:{default:null},left:{default:0},top:{default:0},angle:{default:null},draggable:{default:!1},rotatable:{default:!1},equalProportion:{default:!0},flipX:{default:!1},flipY:{default:!1},uploaded:{default:!1},error:{default:!1}}),parseHTML:()=>[{tag:"img"}],addNodeView:()=>p2(Y8),addCommands(){return{setImage:(e,t)=>({commands:n,editor:r})=>t?n.insertContent({type:this.name,attrs:e}):n.insertContentAt(r.state.selection.anchor,{type:this.name,attrs:e})}}}),Z8={"zh-CN":{restart:"重新播放",rewind:"倒退 {seektime} 秒",play:"播放",pause:"暂停",fastForward:"快进 {seektime} 秒",seek:"搜索",seekLabel:"{currentTime} / {duration}",played:"已播放",buffered:"已缓冲",currentTime:"当前时间",duration:"持续时间",volume:"音量",mute:"静音",unmute:"取消静音",enableCaptions:"启用字幕",disableCaptions:"禁用字幕",download:"下载",enterFullscreen:"进入全屏",exitFullscreen:"退出全屏",captions:"字幕",settings:"设置",pip:"画中画",menuBack:"返回",seek:"播放位置",speed:"速度",normal:"正常",quality:"质量",loop:"循环",start:"开始",end:"结束",all:"全部",reset:"重置",disabled:"已禁用",enabled:"已启用"},"en-US":{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled"}},J8=e=>new l(e,{i18n:Z8[WN.global.locale.value],settings:[],tooltips:{controls:!0},storage:{key:"umo-editor:player"},disableContextMenu:!1}),Q8={class:"node-container hover-shadow video"},e6=["src"],t6={key:0,class:"uploading"},n6={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),r=t.ref(null);let o=t.ref(!1);const a=t.ref(null);let i=t.ref(null),l=t.ref(0);t.onMounted((async()=>{const t=r.value.$el.clientWidth;if(l.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t}),i.value=J8(a.value),!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{url:t}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({src:t,file:null,uploaded:!0})}catch(o){I$("error",o.message)}}));const s=()=>{var t;const n=null==(t=a.value)?void 0:t.offsetHeight;r.value&&n&&e.updateAttributes({height:n})},c=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})};return t.onBeforeUnmount((()=>{var e;i.value&&(null==(e=i.value)||e.destroy())})),gN(r,(()=>o.value=!1)),(e,n)=>(t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:r,class:"node-view video-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",Q8,[t.createVNode(t.unref(S8),{selected:t.unref(o),rotatable:!1,boundary:!1,width:e.node.attrs.width,height:e.node.attrs.height,"min-width":200,"min-height":200,"max-width":t.unref(l),"equal-proportion":"",onResize:c,onClick:n[0]||(n[0]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createElementVNode("video",{ref_key:"videoRef",ref:a,src:e.node.attrs.src,controls:"",crossorigin:"",onCanplay:s},null,40,e6),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",t6))])),_:1},8,["selected","width","height","max-width"])])])),_:1},8,["style"]))}},r6=s1.create({name:"video",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},src:{default:null},width:{default:null},height:{default:null},draggable:{default:!1},uploaded:{default:!1}}),parseHTML:()=>[{tag:"video"}],renderHTML:({HTMLAttributes:e})=>["video",GQ(e)],addNodeView:()=>p2(n6),addCommands(){return{setVideo:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),o6={class:"node-container hover-shadow select-outline audio"},a6=["src"],i6={key:0,class:"uploading"},l6={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),r=t.ref(null),o=t.ref(null);let a=t.ref(null),i=t.ref(!1);return t.onMounted((async()=>{if(a.value=J8(o.value),!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{url:t}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({src:t,file:null,uploaded:!0})}catch(t){I$("error",t.message)}})),t.onBeforeUnmount((()=>{var e;a.value&&(null==(e=a.value)||e.destroy())})),gN(r,(()=>i.value=!1)),(e,n)=>(t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:r,class:"node-view audio-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",o6,[t.createElementVNode("audio",{ref_key:"audiorRef",ref:o,src:e.node.attrs.src,controls:"",crossorigin:""},null,8,a6),e.node.attrs.uploaded||null===e.node.attrs.file?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",i6))])])),_:1},8,["style"]))}},s6=s1.create({name:"audio",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},src:{default:null},uploaded:{default:!1}}),parseHTML:()=>[{tag:"audio"}],renderHTML:({HTMLAttributes:e})=>["audio",GQ(e)],addNodeView:()=>p2(l6),addCommands(){return{setAudio:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e})}}}),c6={ai:["ai","eps"],app:["app"],axure:["rp"],book:["mobi","oeb","lit","xeb","ebx","rb","pdb","epub","azw3","hlp","chm","wdl","ceb","abm","pdg","caj"],css:["css","less","sass"],dmg:["dmg"],excel:["csv","fods","ods","ots","xls","xlsm","xlsx","xlt","xltm","xltx","et","ett"],exe:["exe"],html:["htm","html","mht"],img:["png","bmp","jpg","jpeg","gif","webp","tga","exif","fpx","svg","hdri","raw","ico","jfif","dib","pbm","pgm","ppm","rgb"],java:["jar","java"],js:["js","jsx","ts","tsx"],json:["json"],keynote:["key"],md:["md","markdown"],music:["au","aif","aiff","aifc","rmi","mp3","mid","cda","wav","wma","ra","ram","snd","mida","ogg","ape","flac","aac"],numbers:["numbers"],pages:["pages"],pdf:["pdf"],php:["php"],pkg:["pkg"],ppt:["fodp","odp","otp","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx","dps","dpt","wpp"],psd:["psd"],python:["python"],sh:["sh"],sketch:["sketch"],sql:["sql"],text:["text","txt"],video:["mp4","avi","mov","rmvb","rm","flv","mpeg","wmv","mkv"],vue:["vue"],word:["doc","docm","docx","dot","dotm","dotx","epub","fodt","odt","ott","rtf","wps","wpt"],xmind:["xmind"],zip:["zip","rar","tar","gz","gzip","uue","bz2","iso","7z","z","ace","lzh","arj","cab"],font:["eot","otf","fon","font","ttf","ttc","woff","woff2"]},u6=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],d6=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],p6=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],f6=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],h6=(e,t,n)=>{let r=e;return"string"==typeof t||Array.isArray(t)?r=e.toLocaleString(t,n):!0!==t&&void 0===n||(r=e.toLocaleString(void 0,n)),r};function m6(e,t){if(!Number.isFinite(e))throw new TypeError(`Expected a finite number, got ${typeof e}: ${e}`);const n=(t={bits:!1,binary:!1,space:!0,...t}).bits?t.binary?f6:p6:t.binary?d6:u6,r=t.space?" ":"";if(t.signed&&0===e)return` 0${r}${n[0]}`;const o=e<0,a=o?"-":t.signed?"+":"";let i;if(o&&(e=-e),void 0!==t.minimumFractionDigits&&(i={minimumFractionDigits:t.minimumFractionDigits}),void 0!==t.maximumFractionDigits&&(i={maximumFractionDigits:t.maximumFractionDigits,...i}),e<1){return a+h6(e,t.locale,i)+r+n[0]}const l=Math.min(Math.floor(t.binary?Math.log(e)/Math.log(1024):Math.log10(e)/3),n.length-1);e/=(t.binary?1024:1e3)**l,i||(e=e.toPrecision(3));return a+h6(Number(e),t.locale,i)+r+n[l]}const v6={class:"node-container hover-shadow select-outline file"},g6={class:"file-icon"},b6=["src"],y6={class:"file-info"},w6=["title"],k6={class:"file-meta"},x6={class:"file-action"},E6=["title"],C6=["href","download","title"],S6={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),r=t.ref(null);let o=t.ref();return t.onMounted((async()=>{let t=(e=>{const t=(e=>{const t=e.split(".");return t[t.length-1]})(e);for(const n of Object.keys(c6))if(c6[n].includes(t))return n;return"common"})(e.node.attrs.name);if(o.value=`${n.value.cdnUrl}/icons/file/${t}.svg`,!1===e.node.attrs.uploaded&&e.node.attrs.file)try{const{id:t,url:o}=await n.value.onFileUpload(e.node.attrs.file);r.value&&e.updateAttributes({id:t,url:o,file:null,uploaded:!0})}catch(a){I$("error",a.message)}})),(e,n)=>{const a=dC;return t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:r,class:"node-view file-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",v6,[t.createElementVNode("div",g6,[t.createElementVNode("img",{src:t.unref(o),class:"icon"},null,8,b6)]),t.createElementVNode("div",y6,[t.createElementVNode("div",{class:"file-name",title:e.node.attrs.name},t.toDisplayString(e.node.attrs.name),9,w6),t.createElementVNode("div",k6,t.toDisplayString(t.unref(m6)(e.node.attrs.size)),1)]),t.createElementVNode("div",x6,[e.node.attrs.uploaded||null===e.node.attrs.file?(t.openBlock(),t.createElementBlock("a",{key:1,href:e.node.attrs.url,download:e.node.attrs.name,target:"_blank",class:"action-item",title:e.t("file.download")},[t.createVNode(a,{name:"download"})],8,C6)):(t.openBlock(),t.createElementBlock("div",{key:0,class:"action-item",title:e.t("file.uploading")},[t.createVNode(a,{class:"loading",name:"loading"})],8,E6))])])])),_:1},8,["style"])}}},{options:O6}=zN(),_6={image:["image/jpeg","image/png","image/gif","image/webp","image/svg+xml","image/apng"],video:["video/mp4","video/webm","video/ogg"],audio:["audio/mp3","audio/wav","audio/ogg","audio/aac","audio/flac"]},N6=s1.create({name:"file",group:"block",atom:!0,addAttributes:()=>({id:{default:null},file:{default:null},url:{default:null},name:{default:null},type:{default:null},size:{default:null},uploaded:{default:!1}}),parseHTML:()=>[{tag:"file"}],renderHTML({HTMLAttributes:e}){return["file",GQ(this.options.HTMLAttributes,e)]},addNodeView:()=>p2(S6),addCommands(){return{setFile:e=>({commands:t,editor:n})=>t.insertContentAt(n.state.selection.anchor,{type:this.name,attrs:e}),insertFile:({file:e,pos:t})=>({editor:n,commands:r})=>{const{type:o,name:a,size:i}=e,{maxSize:l}=O6.value.file;if(0!==l&&i>l)return void I$("error",KN("file.limit",{filename:e.name,size:l/1024/1024}));const s=t||n.state.selection.anchor;let c="file";o.startsWith("image/")&&_6.image.includes(o)&&(c="image"),o.startsWith("video/")&&_6.video.includes(o)&&(c="video"),o.startsWith("audio/")&&_6.audio.includes(o)&&(c="audio"),r.insertContentAt(s,{type:c,attrs:{["file"===c?"url":"src"]:URL.createObjectURL(e),name:a,type:o,size:i,file:e}})},selectFiles:e=>({editor:t})=>{const n=(e=>{const t=O6.value.file.allowedMimeTypes;if("file"===e&&0===t.length)return"";if(!e||!["image","video","audio"].includes(e))return t.toString();let n=[...t];return n=n.includes(`${e}/*`)||0===t.length?_6[e]:n.filter((t=>t.startsWith(e))).length>0?t.filter((t=>_6[e].includes(t))):["notAllow"],0===n.length?"":n.toString()})(e);if(!n&&""!==n||"notAllow"===n){const e=A$({theme:"danger",header:KN("file.notAllow.title"),body:KN("file.notAllow.message"),placement:"center",onConfirm(){e.destroy()}});return}const{open:r,onChange:o}=MN({accept:n,reset:!0});r(),o((e=>{const n=Array.from(e);n&&n.forEach((e=>{t.chain().focus().insertFile({file:e}).run()}))}))}}}}),T6=document.createElement("div"),A6=e=>{T6.innerHTML=e;const t=T6.firstChild;return()=>t.cloneNode(!0)},M6=(e,t,n,r)=>e.textarea.addEventListener(t,n,r),I6=e=>"string"==typeof e?document.querySelector(e):e,P6=navigator.userAgent,L6=/Mac|iPhone|iPod|iPad/i.test(navigator.platform),R6=/Chrome\//.test(P6),B6=!R6&&/AppleWebKit\//.test(P6),D6=(e,t=0,n=1/0)=>{let r=1;for(;(t=e.indexOf("\n",t)+1)&&t<=n;r++);return r},V6={},j6=A6("<div><div class=pce-wrapper><div class=pce-overlays><textarea spellcheck=false autocapitalize=off autocomplete=off>"),F6=e=>{e.preventDefault(),e.stopImmediatePropagation()};let z6;document.addEventListener("selectionchange",(()=>null==z6?void 0:z6()));const $6=(e,t,n)=>t.indexOf(e[0])+1||n&&t.indexOf(e[n])+1,H6=(e,t)=>t?e.lastIndexOf("\n",t-1)+1:0,U6=(e,t)=>(t=e.indexOf("\n",t))+1?t:e.length;let W6;const G6=e=>e.replace(/[$+?|.^*()[\]{}\\]/g,"\\$&"),K6=(e,t)=>e.slice(H6(e,t),t),q6=(e,t,n=t)=>[e.slice(t=H6(e,t),n=U6(e,n)).split("\n"),t,n],Y6=(e,t,n=0,r=n,o=e.getSelection()[0])=>{var a;const i=e.value,l=e.wrapper.children[D6(i,0,o)],s=document.createTreeWalker(l,5);let c=s.lastChild(),u=U6(i,o)+1-o-c.length;for(;-u<=r&&(c=s.previousNode());)if(!c.lastChild&&(u-=c.length||0,u<=n))for(;c!=l;c=c.parentNode)if(null==(a=c.matches)?void 0:a.call(c,t))return c},X6=(e,t)=>{var n;return(null==(n=Y6(e,'[class*="language-"]',0,0,t))?void 0:n.className.match(/language-(\S*)/)[1])||e.options.language},Z6=(e,t,n,r,o,a)=>{if(e.options.readOnly)return;W6=e.getSelection(),r??(r=n);let i,l=e.textarea,s=e.value,c=R6&&!s[r??W6[1]]&&/\n$/.test(t)&&/^$|\n$/.test(s);e.focused||l.focus(),null!=n&&l.setSelectionRange(n,r),null!=o&&(i=((e,t,n)=>(e.addListener(t,n),()=>e.removeListener(t,n)))(e,"update",(()=>{l.setSelectionRange(o,a??o,W6[2]),i()}))),B6||l.dispatchEvent(new InputEvent("beforeinput",{data:t})),R6||B6?(c&&(l.selectionEnd--,t=t.slice(0,-1)),B6&&(t+="\n"),document.execCommand(t?"insertHTML":"delete",!1,t.replace(/&/g,"&").replace(/</g,"<")),c&&l.selectionStart++):document.execCommand(t?"insertText":"delete",!1,t),W6=0},J6=e=>e.altKey+2*e.ctrlKey+4*e.metaKey+8*e.shiftKey,Q6="xml,rss,atom,jsx,tsx,xquery,actionscript".split(","),e9=/^(?:area|base|w?br|col|embed|hr|img|input|link|meta|source|track)$/i,t9=()=>e=>{var t;let n,r;const{tags:o,pairs:a}=(t=e.extensions).matchTags||(t.matchTags=(e=>{let t,n,r,o=[],a=[],i=[],l=(e,i,l)=>{t=l,a.length=o.length=n=r=0,s(e,i,0)},s=(e,l,c)=>{let u=Q6.includes(l),d=0,p=e.length;for(;d<p;){const p=e[d++],f=p.content,h=p.length;if(Array.isArray(f))if("tag"==p.type&&"<"==t[c]){const e=f[0].length,d=f[2]?t.substr(c+e,f[1].length):"",m=f[f.length-1].length<2&&(u||!e9.test(d));if(f[2]&&u&&s(f,l,c),m)if(e>1)for(let t=r;t;)d==i[--t][1]&&(o[o[n]=i[r=t][0]]=n,t=0);else i[r++]=[n,d];a[n++]=[p,c,c+h,d,e>1,m]}else{let e=p.alias||p.type;s(f,"language-"==e.slice(0,9)?e.slice(9):l,c)}c+=h}};return e.addListener("tokenize",l),l(e.tokens,e.options.language,e.value),{tags:a,pairs:o}})(e)),i=e=>[n,r].forEach((t=>{t&&t.classList.toggle("active-tagname",!e)}));e.addListener("selectionChange",(([t,l])=>{let s,c,u;t==l&&e.focused&&(u=((e,t)=>{for(let n=0,r=t.length;n<r;n++)if(t[n][1]<=e&&t[n][2]>=e)return n})(t,o),u+1&&(u=a[u],u+1&&(s=Y6(e,".tag>.tag"))&&(c=Y6(e,".tag>.tag",2,0,o[u][1])))),n!=s&&(i(!0),n=s,r=c,i())}))},n9=A6("<div class=guide-indents style=left:var(--padding-left);bottom:auto;right:auto> "),r9=A6("<div style=width:1px;position:absolute;background:var(--bg-guide-indent)>"),o9=()=>{let e,t,n,r=0,o=-1;const a=[],i=[],l=n9(),s=[],c=e=>{t=[];const n=d(e.split("\n")),o=n.length;for(let r=0,l=[],s=n[0];s;r++){const e=(a[r]||(a[r]=r9())).style,[o,c,u]=s,d=i[r];s=n[r+1],o!=(null==d?void 0:d[0])&&(e.top=o+"00%"),c!=(null==d?void 0:d[1])&&(e.height=c+"00%"),u!=(null==d?void 0:d[2])&&(e.left=100*u+"%");for(let n=-(l[0]!=o&&(null==s?void 0:s[0])!=o),a=c+(l[0]+l[1]!=o+c&&(null==s?void 0:s[0])+(null==s?void 0:s[1])!=o+c);n<a;n++)t[n+o]=r;l=i[r]=n[r]}for(let t=r;t>o;)a[--t].remove();l.append(...a.slice(r,r=o))},u=()=>{const e=t[n.activeLineNumber-1]??-1;e!=o&&(o>-1&&(a[o].className=""),e>-1&&(a[e].className="active")),o=e},d=t=>{const n=t.length,r=[],o=[];for(let a=0,i=-1,l=0,c=0;;l++){const u=l==n,d=u?0:s[l]=p(t[l]);if(d<0)i<0&&(i=l);else{for(let e=d;e<a;e++)r[e][1]=(i<0||e==d&&!u?l:i)-r[e][0];for(let t=a;t<d;)o[c++]=r[t]=[i<0||t>a?l:i,0,t++*e];i=-1,a=d}if(u)break}return s.length=n,o},p=t=>{let n=t.search(/\S/),r=0;if(n<0)return n;for(let o=0;o<n;)r+="\t"==t[o++]?e-r%e:1;return Math.ceil(r/e)};return{lines:l.children,indentLevels:s,update(t,r){n||(n=t,t.extensions.indentGuides=this,t.overlays.append(l),t.addListener("update",c),t.addListener("selectionChange",u)),l.style.display=r.wordWrap?"none":"",e!=(e=r.tabSize||2)&&(c(t.value),u())}}},a9=A6("<div style=position:absolute;top:0;opacity:0;padding:inherit> <span><span></span> "),i9=()=>{let e,t=" ",n=" ";const r=a9(),[o,a]=r.childNodes,[i,l]=a.childNodes,s=a=>{let{value:i,activeLine:s}=e,c=a[a[2]<"f"?0:1],u=K6(i,c),d=i.slice(c,U6(i,c));u||d||(d=" "),t!=u&&(o.data=t=u),n!=d&&(l.data=n=d),r.parentNode!=s&&s.prepend(r)},c=()=>((e,t,n=0)=>{const r=e.scrollContainer.style,o=document.documentElement.style;r.scrollPaddingBlock=o.scrollPaddingBlock=`${n}px ${R6&&!t.textContent?t.offsetHeight:0}px`,t.scrollIntoView({block:"nearest"}),r.scrollPaddingBlock=o.scrollPaddingBlock=""})(e,i),u=t=>{t.addListener("selectionChange",s),e=t,t.extensions.cursor=u,M6(t,"input",(e=>{/history/.test(e.inputType)&&c()})),t.activeLine&&s(t.getSelection())};return u.getPosition=()=>{const t=i.getBoundingClientRect(),n=e.overlays.getBoundingClientRect();return{top:t.y-n.y,bottom:n.bottom-t.bottom,left:t.x-n.x,right:n.right-t.x,height:t.height}},u.scrollIntoView=c,u.element=i,u};let l9=!1;const s9=navigator.clipboard,c9=L6?4:2,u9=e=>e.search(/\S|$/),d9=(e=['""',"''","``","()","[]","{}"],t=/([^$\w'"`]["'`]|.[[({])[.,:;\])}>\s]|.[[({]`/s)=>(n,r)=>{let o;const{keyCommandMap:a,inputCommandMap:i,getSelection:l}=n,s=({insertSpaces:e=!0,tabSize:t}=r)=>[e?" ":"\t",e?t||2:1],c=()=>{var e;return!r.readOnly&&!(null==(e=n.extensions.cursor)?void 0:e.scrollIntoView())},u=([e,r],[o,a],i,l)=>(e<r||!l&&t.test((i[r-1]||" ")+o+(i[r]||" ")))&&!Z6(n,o+i.slice(e,r)+a,null,null,e+1,r+1),d=([e,t],r,o)=>e==t&&o[t]==r&&!n.setSelection(e+1),p=(e,t,r,o,a,i)=>{let l=t.join("\n");if(l!=e.join("\n")){const s=e.length-1,c=t[s],u=e[s],d=u.length-c.length,p=t[0].length-e[0].length,f=r+u9((p<0?t:e)[0]),h=o-u.length+u9(d>0?c:u),m=r-o+l.length+d,v=f>a?a:Math.max(f,a+p),g=i+r-o+l.length;Z6(n,l,r,o,v,i<h?g+d:Math.max(h+m,g))}},f=(e,t,n,r,o,a,i,l)=>{p(t,t.map(e?e=>e.slice(u9(e)?l-u9(e)%l:0):e=>e&&i.repeat(l-u9(e)%l)+e),n,r,o,a)};i["<"]=(e,t,n)=>u(t,"<>",n,!0),e.forEach((([e,t])=>{const n=e==t;i[e]=(r,o,a)=>(n&&d(o,t,a)||u(o,e+t,a))&&c(),n||(i[t]=(e,n,r)=>d(n,t,r)&&c())})),i[">"]=(e,t,r)=>{var o,a;const i=null==(a=null==(o=V6[X6(n)])?void 0:o.autoCloseTags)?void 0:a.call(o,t,r,n);i&&(Z6(n,">"+i,null,null,t[0]+1),F6(e))},a.Tab=(e,[t,o],a)=>{if(l9||r.readOnly||6&J6(e))return;const[i,l]=s(r),u=e.shiftKey,[d,p,h]=q6(a,t,o);return t<o||u?f(u,d,p,h,t,o,i,l):Z6(n,i.repeat(l-(t-p)%l)),c()},a.Enter=(e,t,r)=>{var o,a,i;const l=7&J6(e);if(!l||l==c9){l&&(t[0]=t[1]=q6(r,t[1])[2]);const[e,u]=s(),[d,p]=t,f=null==(o=V6[X6(n)])?void 0:o.autoIndent,h=Math.floor(u9(K6(r,d))/u)*u,m=(null==(a=null==f?void 0:f[0])?void 0:a.call(f,t,r,n))?u:0,v=null==(i=null==f?void 0:f[1])?void 0:i.call(f,t,r,n),g="\n"+e.repeat(h+m)+(v?"\n"+e.repeat(h):"");if(g[1]||r[p])return Z6(n,g,d,p,d+h+m+1),c()}},a.Backspace=(t,[o,a],i)=>{if(o==a){const t=K6(i,o),a=r.tabSize||2,l=e.includes(i.slice(o-1,o+1)),s=/[^ ]/.test(t)?0:(t.length-1)%a+1;if(l||s>1)return Z6(n,"",o-(l?1:s),o+l),c()}};for(let e=0;e<2;e++)a[e?"ArrowDown":"ArrowUp"]=(t,[r,o],a)=>{const i=J6(t);if(1==(7&i)){if(1==i){const t=e?r:H6(a,r)-1,i=e?a.indexOf("\n",o)+1:o;if(t>-1&&i>0){const[l,s,c]=q6(a,t,i),u=l[e?"pop":"shift"](),d=(u.length+1)*(e?1:-1);l[e?"unshift":"push"](u),Z6(n,l.join("\n"),s,c,r+d,o+d)}}else{const[t,i,l]=q6(a,r,o),s=t.join("\n"),c=e?s.length+1:0;Z6(n,s+"\n"+s,i,l,r+c,o+c)}return c()}};M6(n,"keydown",(e=>{var t;const r=J6(e),o=e.keyCode,[a,i,u]=l();if(r==c9&&(221==o||219==o))return f(219==o,...q6(n.value,a,i),a,i,...s()),c();if(r==(L6?10:2)&&77==o)l9=!l9,F6(e);else if(191==o&&r==c9||65==o&&9==r){const e=n.value,o=9==r,l=o?a:H6(e,a),s=V6[X6(n,l)]||{},{line:u,block:d}=(null==(t=s.getComments)?void 0:t.call(s,n,l,e))||s.comments||{},[f,h,m]=q6(e,a,i),v=f.length-1;if(o){if(d){const[t,r]=d,o=e.slice(a,i),l=e.slice(0,a).search(G6(t)+" ?$"),s=RegExp("^ ?"+G6(r)).test(e.slice(i));l+1&&s?Z6(n,o,l,i+ +(" "==e[i])+r.length,l,l+i-a):Z6(n,`${t} ${o} ${r}`,a,i,a+t.length+1,i+t.length+1),c()}}else if(u){const t=G6(u),n=RegExp(`^\\s*(${t} ?|$)`),r=RegExp(t+" ?"),o=!/\S/.test(e.slice(h,m)),l=f.map(f.every((e=>n.test(e)))&&!o?e=>e.replace(r,""):e=>o||/\S/.test(e)?e.replace(/^\s*/,`$&${u} `):e);p(f,l,h,m,a,i),c()}else if(d){const[e,t]=d,r=u9(f[0]),o=f[0].startsWith(e,r)&&f[v].endsWith(t),l=f.slice();l[0]=f[0].replace(o?RegExp(G6(e)+" ?"):/(?=\S)|$/,o?"":e+" ");let s=l[0].length-f[0].length;l[v]=o?l[v].replace(RegExp(`( ?${G6(t)})?$`),""):l[v]+" "+t;let u=l.join("\n"),p=r+h,g=p>a?a:Math.max(a+s,p),b=p>i-(a!=i)?i:Math.min(Math.max(p,i+s),h+u.length);Z6(n,u,h,m,g,Math.max(g,b)),c()}}else if(r==8+c9&&75==o){const e=n.value,[t,r,o]=q6(e,a,i),l="forward"==u?i-o+t.pop().length:a-r,s=q6(e,o+1)[0][0].length;return Z6(n,"",r-!!r,o+!r,r+Math.min(l,s)),c()}})),["copy","cut","paste"].forEach((e=>M6(n,e,(t=>{const[r,a]=l();if(r==a&&s9){const[[i],l,s]=q6(n.value,r,a);"paste"==e?t.clipboardData.getData("text/plain")==o&&(Z6(n,o+"\n",l,l,r+o.length+1),c(),F6(t)):(s9.writeText(o=i),"cut"==e&&(Z6(n,"",l,s+1),c()),F6(t))}}))))};var p9="\\b(?:BASH(?:OPTS|_ALIASES|_ARG[CV]|_CMDS|_COMPLETION_COMPAT_DIR|_LINENO|_REMATCH|_SOURCE|_VERSINFO|_VERSION)?|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|E?UID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_(?:ADDRESS|ALL|IDENTIFICATION|MEASUREMENT|MONETARY|NAME|NUMERIC|PAPER|TELEPHONE|TIME)|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS[1-4]|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_(?:CONFIG_DIRS|CURRENT_DESKTOP|DATA_DIRS|GREETER_DATA_DIR|MENU_PREFIX|RUNTIME_DIR|SEAT|SEAT_PATH|SESSION_DESKTOP|SESSION_ID|SESSION_PATH|SESSION_TYPE|VTNR)|XMODIFIERS)\\b",f9={pattern:/(^(["']?)\w+\2)[ ]+\S.*/,lookbehind:!0,alias:"punctuation"},h9={variable:/^\$\(|^`|\)$|`$/},m9={bash:f9,environment:{pattern:RegExp("\\$"+p9),alias:"constant"},variable:[{pattern:/\$?\(\([^]*?\)\)/g,greedy:!0,inside:{variable:[{pattern:/(^\$[^]+)../,lookbehind:!0},/^\$\(\(/],number:/\b0x[a-fA-F\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|&&|\|\||(?:\*\*|<<|>>|[%&|^!=<>/*+-])=?|[?:~]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:[^()]|\([^)]*\))*\)|`[^`]+`/g,greedy:!0,inside:h9},{pattern:/\$\{[^}]*\}/g,greedy:!0,inside:{operator:/:[?=+-]?|[!/]|##?|%%?|\^\^?|,,?/,punctuation:/[[\]]/,environment:{pattern:RegExp("(\\{)"+p9),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[a-fA-F\d]{8}|u[a-fA-F\d]{4}|x[a-fA-F\d]{1,2})/},v9=f9.inside=HG.sh=HG.shell=HG.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,lookbehind:!0,alias:"variable"},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,lookbehind:!0,alias:"variable",inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+p9),lookbehind:!0,alias:"constant"}}},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?![^\s=])/,lookbehind:!0,alias:"variable"},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[^]*?\n\2/g,lookbehind:!0,greedy:!0,inside:m9},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[^]*?\n\3/g,lookbehind:!0,greedy:!0,inside:{bash:f9}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[^]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^\\"`$])*"/g,lookbehind:!0,greedy:!0,inside:m9},{pattern:/(^|[^$\\])'[^']*'/g,lookbehind:!0,greedy:!0},{pattern:/\$'(?:\\[^]|[^\\'])*'/g,greedy:!0,inside:{entity:m9.entity}}],environment:{pattern:RegExp("\\$?"+p9),alias:"constant"},variable:m9.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|c?fdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cron|crontab|c?split|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff3?|dig|dircolors|dirname|dirs?|dmesg|docker|docker-compose|du|[ef]?grep|eject|env|ethtool|expand|expect|expr|fdformat|fg|file|find|fmt|fold|format|free|fsck|fuser|g?awk|git|g?parted|groupadd|groupdel|groupmod|groups|grub-mkconfig|halt|head|hg|history|host|hostname|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|killall|less|link|ln|logname|logrotate|look|lpc|lprint[dq]?|lprm?|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mm?v|more|most|mtools|m?tr|mutt|nano|nc|netstat|nice|nl|node|nohup|notify-send|nslookup|op|open|passwd|paste|pathchk|ping|p?kill|p?npm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ra[mr]|reboot|remsync|rename|renice|rev|rmdir|rp?m|r?sync|[sr]?cp|screen|sdiff|se[dq]|sendmail|service|s?ftp|shellcheck|shuf|shutdown|sleep|s?locate|[sz]?sh|stat|strace|sudo|sum?|suspend|swapon|sysctl|tac|tail|tar|tee|time|timeout|h?top|touch|traceroute|t?sort|tty|u?mount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vim?|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|g?zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|[ls]et|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[[\]{};\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"].forEach((e=>h9[e]=v9[e]));var g9=/(?:"(?:\\[^]|[^\\\n"])*"|'(?:\\[^]|[^\\\n'])*')/g,b9=g9.source,y9={rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^)]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}};y9[FG]=HG.css={comment:/\/\*[^]*?\*\//,atrule:{pattern:RegExp(`@[\\w-](?:[^;{\\s"']|\\s+(?!\\s)|${b9})*?(?:;|(?=\\s*\\{))`),inside:y9},url:{pattern:RegExp(`\\burl\\((?:${b9}|(?:[^\\\\\n"')=]|\\\\[^])*)\\)`,"gi"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+b9+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|${b9})*(?=\\s*\\{)`),lookbehind:!0},string:{pattern:g9,greedy:!0},property:{pattern:/(^|[^-\w\xa0-\uffff])(?!\d)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z\d])[-a-z\d]+(?=\()/i,lookbehind:!0},punctuation:/[(){},:;]/};var w9=(e,t)=>{if(t.has(e))return t.get(e);var n=e,r=C9.call(e).slice(8,-1);if("Object"==r){for(var o in t.set(e,n={}),e)n[o]=w9(e[o],t);e[FG]&&(n[FG]=w9(e[FG],t)),e[zG]&&(n[zG]=e[zG])}else if("Array"==r){t.set(e,n=[]);for(var a=0,i=e.length;a<i;a++)n[a]=w9(e[a],t)}return n},k9=e=>w9(e,new Map),x9=(e,t)=>Object.assign(k9(HG[e]),t),E9=(e,t,n)=>{var r={};for(var o in e)r[o]=e[o],delete e[o];for(var o in r)o==t&&Object.assign(e,n),n.hasOwnProperty(o)||(e[o]=r[o])},C9={}.toString,S9=HG.css,O9={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},_9={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};S9.selector.inside=S9.atrule.inside["selector-function-argument"].inside={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:/\[(?:[^[\]"']|(["'])(?:\\[^]|(?!\1)[^\\\n])*\1)*\]/g,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xa0-\uffff])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xa0-\uffff])+/,lookbehind:!0},"attr-value":{pattern:/(=\s*)(?:(?!\s)[-\w\xa0-\uffff])+(?=\s*$)|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2/,lookbehind:!0},operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/},E9(S9,"property",{variable:{pattern:/(^|[^-\w\xa0-\uffff])--(?!\d)(?:(?!\s)[-\w\xa0-\uffff])*/i,lookbehind:!0}}),E9(S9,"function",{operator:{pattern:/(\s)[/*+-](?!\S)/,lookbehind:!0},hexcode:{pattern:/\B#[a-f\d]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:(?:alice|cadet|cornflower|deepsky|dodger|midnight|powder|royal|sky|steel)blue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blueviolet|brown|burlywood|chartreuse|chocolate|coral|cornsilk|crimson|(?:dark)?(?:blue|cyan|goldenrod|gr[ae]y|green|khaki|magenta|olivegreen|orange|orchid|red|salmon|seagreen|slateblue|slategr[ae]y|turquoise|violet)|deeppink|dimgr[ae]y|firebrick|floralwhite|(?:forest|lawn|lime|pale|spring)green|fuchsia|gainsboro|ghostwhite|gold|greenyellow|honeydew|hotpink|indianred|indigo|ivory|lavender|lavenderblush|lemonchiffon|light(?:blue|coral|cyan|goldenrodyellow|gr[ae]y|green|pink|salmon|seagreen|skyblue|slategr[ae]y|steelblue|yellow)|lime|linen|maroon|medium(?:aquamarine|blue|orchid|purple|seagreen|slateblue|springgreen|turquoise|violetred)|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orangered|palegoldenrod|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|purple|rebeccapurple|rosybrown|saddlebrown|sandybrown|seashell|sienna|silver|snow|tan|teal|thistle|tomato|transparent|wheat|white|whitesmoke|yellow|yellowgreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{function:/^[^(]+/,unit:O9,number:_9,punctuation:/[(),]/}}],entity:/\\[a-f\d]{1,8}/i,unit:O9,number:_9}),HG.ini={comment:{pattern:/(^[ \f \v]*)[#;].*/m,lookbehind:!0},section:{pattern:/(^[ \f \v]*)\[[^\n\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f \v]*)[^ \f \v\]]+(?:[ \f \v]+[^ \f \v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/[[\]]/}},key:{pattern:/(^[ \f \v]*)[^ \f\n \v=]+(?:[ \f \v]+[^ \f\n \v=]+)*(?=[ \f \v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f \v]*)[^ \f\n \v]+(?:[ \f \v]+[^ \f\n \v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^(["']).+(?=\1$)/,lookbehind:!0}}},punctuation:/=/};var N9=/\b0x[a-f\d]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,T9=/[()[\]{}.,:;]/,A9=/\b(?:false|true)\b/,M9={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[^]+/}};M9.expression.inside=HG.kts=HG.kt=HG.kotlin={"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:M9},string:/[^]+/}},{pattern:/"(?:\\.|[^\\\n"$]|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:M9},string:/[^]+/}}],char:{pattern:/'(?:[^\\\n']|\\(?:.|u[a-fA-F\d]{0,4}))'/g,greedy:!0},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"},keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},boolean:A9,label:{pattern:/\b\w+@|@\w+/,alias:"symbol"},function:{pattern:/(?:`[^\n`]+`|\b\w+)(?=\s*\()|(\.)(?:`[^\n`]+`|\w+)(?=\s*\{)/g,lookbehind:!0,greedy:!0},number:/\b(?:0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/--|\+\+|&&|\|\||->|[!=]==|!!|[%!=<>/*+-]=?|[?:]:?|\.\.|\b(?:and|inv|shl|u?shr|x?or)\b/,punctuation:T9};var I9=[{pattern:/&[a-z\d]{1,8};/i,alias:"named-entity"},/&#x?[a-f\d]{1,8};/i],P9={pattern:/<\/?(?!\d)[^\s/=>$<%]+(?:\s(?:\s*[^\s/=>]+(?:\s*=\s*(?!\s)(?:"[^"]*"|'[^']*'|[^\s"'=>]+(?=[\s>]))?|(?=[\s/>])))+)?\s*\/?>/g,greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^\S+/,inside:{namespace:/^[^:]+:/}},"attr-value":[{pattern:/(=\s*)(?:"[^"]*"|'[^']*'|[^\s"'=>]+)/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^["']|["']$/,entity:I9}}],"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}};HG.rss=HG.atom=HG.ssml=HG.xml={comment:{pattern:/<!--(?:(?!<!--)[^])*?-->/g,greedy:!0},prolog:{pattern:/<\?[^]+?\?>/g,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/gi,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[^]+(?=\]\s*>$)/,lookbehind:!0,inside:"xml"},string:/"[^"]*"|'[^']*'/,punctuation:/^<!|[>[\]]/,"doctype-tag":/^DOCTYPE/i,name:/\S+/}},cdata:{pattern:/<!\[CDATA\[[^]*?\]\]>/gi,greedy:!0},tag:P9,entity:I9,"markup-bracket":{pattern:/[()[\]{}]/,alias:"punctuation"}};var L9=(e,t)=>(e["language-"+t]={pattern:/[^]+/,inside:t},e),R9=(e,t)=>({pattern:RegExp(`(<${e}[^>]*>)(?!</${e}>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])+?(?=</${e}>)`,"gi"),lookbehind:!0,greedy:!0,inside:L9({"included-cdata":{pattern:/<!\[CDATA\[[^]*?\]\]>/i,inside:L9({cdata:/^<!\[CDATA\[|\]\]>$/i},t)}},t)}),B9=(e,t)=>({pattern:RegExp(`((?:^|["'\\s])(?:${e})\\s*=\\s*)(?:"[^"]*"|'[^']*'|[^\\s"'=>]+)`,"gi"),lookbehind:!0,greedy:!0,inside:L9({punctuation:/^["']|["']$/},t)}),D9=HG.svg=HG.mathml=HG.html=HG.markup=k9(HG.xml);D9.tag.inside["attr-value"].unshift(B9("style","css"),B9("on[a-z]+","javascript")),E9(D9,"cdata",{style:R9("style","css"),script:R9("script","javascript")}),HG.r={comment:/#.*/,string:{pattern:/(["'])(?:\\.|(?!\1)[^\\\n])*\1/g,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[a-fA-F\d]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->>?|<=|<<?-|[!=<>]=?|::?|&&?|\|\|?|[~^$@/*+-]/,punctuation:/[()[\]{},;]/},HG.basic={comment:{pattern:/(?:!|rem\b).+/i,inside:{keyword:/^rem/i}},string:{pattern:/"(?:""|[#$%&'().,:;\w ?^!=<>/*+-])*"/g,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,keyword:/\b(?:as|beep|bload|bsave|call absolute|call|case|chain|chdir|clear|close|cls|com|common|const|data|declare|def(?: fn| seg|dbl|int|[ls]ng|str)|dim|do|double|else|elseif|environ|erase|error|exit|field|files|for|function|get|gosub|goto|if|input|integer|ioctl|key|kill|line input|locate|lock|long|loop|[lr]set|mkdir|name|next|off|on(?: com| error| key| timer)?|open|option base|[op]ut|poke|read|redim|rem|restore|resume|return|rmdir|run|select case|shared|shell|single|sleep|static|step|stop|string|sub|swap|system|then|timer|to|troff|tron|type|unlock|until|using|view print|wait|w?end|while|write)(?:\$|\b)/i,function:/\b(?:abs|access|a?cos|angle|area|arithmetic|array|a?sin|ask|atn?|base|begin|break|cause|ceil|chr|clip|collate|color|co[nst]|cosh|csc|date|datum|debug|decimal|de[fgt]|degrees|delete|device|display|dot|elapsed|eps|erasable|exline|exp|external|extype|filetype|fixed|fp|go|graph|handler|idn|image|int?|internal|ip|is|keyed|[lu]bound|[lu]case|left|le[nt]|length|lines?|log2?|log10|[lr]trim|margin|ma[tx]|maxnum|mi[dn]|missing|mod|native|nul|numeric|of|option|ord|organization|outin|output|pi|pointer|points?|pos|print|program|prompt|rad|radians|randomize|record|recsize|rectype|relative|remainder|repeat|rest|retry|rewrite|right|rnd|round|same|se[ct]|select|sequential|setter|sgn|sinh|size|skip|s[qt]r|standard|status|stream|style|tab|tanh?|template|text|there|time|timeout|trace|transform|truncate|use|val|variable|viewport|when|window|with|zer|zonewidth)(?:\$|\b)/i,operator:/<=|<>|>=|[&^=<>/*+-]|\b(?:and|eqv|imp|not|x?or)\b/i,punctuation:/[(),:;]/},HG.vbnet=x9("basic",{comment:{pattern:/(?:!|'|rem\b).*/i,inside:{keyword:/^rem/i}},string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/g,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:addhandler|addressof|alias|and|andalso|as|beep|bload|boolean|bsave|byref|byval|call absolute|call|case|catch|cbool|c?byte|cc?har|c?date|cdbl|cdec|chain|chdir|cu?int|class|clear|close|cls|cobj|com|common|const|continue|c?sbyte|c?u?short|c?sng|cstr|c?type|cu?lng|data|decimal|declare|def(?: fn| seg|dbl|int|lng|sng|str)|default|delegate|dim|directcast|do|double|else|elseif|enum|environ|erase|error|event|exit|false|true|field|files|finally|for each|for|friend|function|[gls]et|gettype|getxmlnamespace|global|gosub|goto|handles|i[fns]|implements|imports|inherits|input|interface|ioctl|isnot|key|kill|lib|like|line input|locate|lock|loop|[lr]set|me|mkdir|mod|module|mustinherit|mustoverride|mybase|myclass|name|namespace|narrowing|new|next|not|nothing|notinheritable|notoverridable|object|off?|on (?:com|error|key|timer)|on|open|operator|option base|option|optional|orelse|out|overloads|overridable|overrides|paramarray|partial|poke|private|property|protected|public|put|raiseevent|read|readonly|redim|removehandler|restore|resume|return|rmdir|run|select case|select|shadows|shared|shell|single|sleep|static|step|stop|string|structure|sub|swap|synclock|system|[tw]hen|throw|timer|to|troff|tron|try|trycast|typeof|u?integer|u?long|unlock|until|using|view print|wait|w?end|while|widening|with|withevents|write|writeonly|x?or)|\B#(?:const|else|elseif|end|if))(?:\$|\b)/i,punctuation:/[(){},:;]/});var V9={pattern:/'(?:\\[^]|[^\\\n']){0,32}'/g,greedy:!0},j9={pattern:/\/\/(?:[^\\\n]|\\\n?)*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},F9={pattern:/"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},z9={pattern:/\S[^]*/};z9.inside=HG.c={comment:j9,char:V9,macro:{pattern:/(^[ ]*)#\s*[a-z](?:[^\\\n/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\[^])*/gim,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},F9],char:V9,comment:j9,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=\n)/,expression:z9}},string:F9,"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([^]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/->|([&|:+-])\1|[?:~]|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:T9},E9(HG.opencl=x9("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[a-f\d]+(?:\.[a-f\d]*)?|\.[a-f\d]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:A9,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN2|LN10|LOG2E?|LOG10E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),"class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|u?intptr_t)\b/,alias:"keyword"}});var $9={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:[2348]|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|RA?|READ_(?:ONLY|WRITE)_CACHE|RG|RGB[Ax]?|RG?x|RUNNING|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_5[56]5|VERSION_(?:1_[012]|2_[01])|s?BGRA|sRGB[Ax]?)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image[23]D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E9(HG.c,"keyword",$9),HG.cpp&&($9["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image(?:[123]D|[12]DArray|1DBuffer|[23]DGL|Format|GL)?|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTrait(?:Atomic|Coarse|Fine|ReadOnly|ReadWrite|WriteOnly)|Sampler|UserEvent)\b/,alias:"keyword"},E9(HG.cpp,"keyword",$9));var H9=HG.diff={coord:/^(?:\*{3}|-{3}|\+{3}|\d).*$|^@@.*@@$/m},U9={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};for(var W9 in U9){var G9=W9.split("-")[0];H9[W9]={pattern:RegExp("^(?:["+U9[W9]+"].*$\n?)+","m"),alias:G9!=W9?G9:"diff"==W9?"bold":void 0,inside:{prefix:{pattern:RegExp("^["+U9[W9]+"]","mg"),greedy:!0,alias:G9}}}}var K9=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|opens?|package|permits|private|protected|provides|public|record(?!\s*[()[\]{}%~.,:;?%&|^=<>/*+-])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throws?|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,q9="(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",Y9={pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},X9={namespace:Y9,punctuation:/\./},Z9={pattern:RegExp(`(^|[^\\w.])${q9}[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b`),lookbehind:!0,inside:X9};HG.java={"doc-comment":{pattern:/\/\*\*(?!\/)[^]*?(?:\*\/|$)/g,greedy:!0,alias:"comment",inside:"javadoc"},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},"triple-quoted-string":{pattern:/"""[ ]*\n(?:\\.|[^\\])*?"""/g,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^\\\n']){1,6}'/g,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\\n"])*"/g,lookbehind:!0,greedy:!0},annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":Z9,keyword:K9,punctuation:/[().,:<>]/,operator:/[?&|]/}},import:[{pattern:RegExp(`(\\bimport\\s+)${q9}(?:[A-Z]\\w*|\\*)(?=\\s*;)`),lookbehind:!0,inside:{namespace:Y9,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(`(\\bimport\\s+static\\s+)${q9}(?:\\w+|\\*)(?=\\s*;)`),lookbehind:!0,alias:"static",inside:{namespace:Y9,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(`(\\b(?:exports|import(?:\\s+static)?|module|opens?|package|provides|requires|to|transitive|uses|with)\\s+)(?!${K9.source})[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?`),lookbehind:!0,inside:{punctuation:/\./}},"class-name":[Z9,{pattern:RegExp(`(^|[^\\w.])${q9}[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)`),lookbehind:!0,inside:X9},{pattern:RegExp(`(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)${q9}[A-Z]\\w*\\b`),lookbehind:!0,inside:X9}],keyword:K9,boolean:A9,function:{pattern:/\b\w+(?=\()|(::\s*)[a-z_]\w*/,lookbehind:!0},number:/\b0b[01][01_]*l?\b|\b0x(?:\.[a-f\d_p+-]+|[a-f\d_]+(?:\.[a-f\d_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,constant:/\b[A-Z][A-Z_\d]+\b/,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[%&|^!=<>/*+-]=?)/m,lookbehind:!0},punctuation:T9},E9(HG.less=x9("css",{comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},atrule:{pattern:/@[\w-](?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{punctuation:/[():]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@\s]|\s+(?!\s))*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/,operator:/[/*+-]/}),"property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-].*?(?=[(;])/,lookbehind:!0,alias:"function"}}),HG.objc=HG.objectivec=x9("c",{string:{pattern:/@?"(?:\\[^]|[^\\\n"])*"/g,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int?|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|==?|>>?=?|<<?=?|&&?|\|\|?|[~^@%?/*]/}),delete HG.objc["class-name"];var J9={pattern:/^(..)[^]+(?=.)/,lookbehind:!0},Q9="(?:([^a-zA-Z\\d\\s{(\\[<=])(?:\\\\[\\s\\S]|(?!\\1)[^\\\\])*\\1|\\((?:\\\\[\\s\\S]|[^\\\\()]|\\((?:\\\\[\\s\\S]|[^\\\\()])*\\))*\\)|\\{(?:\\\\[\\s\\S]|[^\\\\{}]|\\{(?:\\\\[\\s\\S]|[^\\\\{}])*\\})*\\}|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]]|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]])*\\])*\\]|<(?:\\\\[\\s\\S]|[^\\\\<>]|<(?:\\\\[\\s\\S]|[^\\\\<>])*>)*>)",e7='(?:"(?:\\\\.|[^\\\\\n"])*"|(?:\\b(?!\\d)\\w+|[^\\s\0-\\x7f]+)[?!]?|\\$.)',t7={pattern:/((?:^|[^\\])(?:\\\\)*)#\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{content:J9,delimiter:{pattern:/.+/,alias:"punctuation"}}};J9.inside=HG.rb=HG.ruby={comment:{pattern:/#.*|^=begin\s[^]*?^=end/gm,greedy:!0},"string-literal":[{pattern:RegExp("%[qQiIwWs]?"+Q9,"g"),greedy:!0,inside:{interpolation:t7,string:/[^]+/}},{pattern:/(["'])(?:#\{[^}]+\}|#(?!\{)|\\[^]|(?!\1)[^\\#\n])*\1/g,greedy:!0,inside:{interpolation:t7,string:/[^]+/}},{pattern:/<<[-~]?([a-z_]\w*)\n(?:.*\n)*?[ ]*\1/gi,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i,inside:{symbol:/\w+/,punctuation:/^<<[-~]?/}},interpolation:t7,string:/[^]+/}},{pattern:/<<[-~]?'([a-z_]\w*)'\n(?:.*\n)*?[ ]*\1/gi,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i,inside:{symbol:/\w+/,punctuation:/^<<[-~]?'|'$/}},string:/[^]+/}}],"command-literal":[{pattern:RegExp("%x"+Q9,"g"),greedy:!0,inside:{interpolation:t7,command:{pattern:/[^]+/,alias:"string"}}},{pattern:/`(?:#\{[^}]+\}|#(?!\{)|\\[^]|[^\\`#\n])*`/g,greedy:!0,inside:{interpolation:t7,command:{pattern:/[^]+/,alias:"string"}}}],"class-name":{pattern:/(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/,lookbehind:!0,inside:{punctuation:/[.\\]/}},"regex-literal":[{pattern:RegExp(`%r${Q9}[egimnosux]{0,6}`,"g"),greedy:!0,inside:{interpolation:t7,regex:/[^]+/}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\]]+\]|\\.|[^\\\n/[])+\/[egimnosux]{0,6}(?=\s*(?:$|[\n,.;})#]))/g,lookbehind:!0,greedy:!0,inside:{interpolation:t7,regex:/[^]+/}}],variable:/[@$]+(?!\d)\w+(?:[?!]|\b)/,symbol:[{pattern:RegExp("(^|[^:]):"+e7,"g"),lookbehind:!0,greedy:!0},{pattern:RegExp("([\n{(,][ \t]*)"+e7+"(?=:(?!:))","g"),lookbehind:!0,greedy:!0}],"method-definition":{pattern:/(\bdef\s+)\w+(?:\s*\.\s*\w+)?/,lookbehind:!0,inside:{function:/\b\w+$/,keyword:/^self\b/,"class-name":/^\w+/,punctuation:/\./}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|f?or|if|in|include|module|new|next|nil|not|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|[tw]hen|throw|undef|unless|until|while|yield)\b/,boolean:A9,builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z][A-Z\d_]*(?:[?!]|\b)/,number:N9,"double-colon":{pattern:/::/,alias:"punctuation"},operator:/\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[%&|^!=<>/*+-])=?|[?:]/,punctuation:/[()[\]{}.,;]/},HG.sql={comment:/\/\*[^]*?\*\/|(?:--|\/\/|#).*/,variable:[{pattern:/@(["'`])(?:\\[^]|(?!\1)[^\\])+\1/g,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])(["'])(?:\\[^]|(?!\2)[^\\]|\2\2)*\2/g,lookbehind:!0,greedy:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[^]|[^\\`]|``)*`/g,lookbehind:!0,greedy:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:avg|count|first|format|last|[lu]case|len|max|mi[dn]|mod|now|round|sum)(?=\s*\()/i,keyword:/\b(?:action|add|after|algorithm|alter|analyze|any|apply|asc?|authorization|auto_increment|backup|bdb|begin|berkeleydb|bigint|binary|bit|blob|bool|boolean|break|browse|[br]tree|bulk|by|c?all|cascaded?|case|chain|character|charset|check(?:point)?|close|clustered|coalesce|collate|columns?|comment|commit(?:ted)?|compute|connect|consistent|constraint|contains(?:table)?|continue|convert|create|cross|current(?:_date|_time|_timestamp|_user)?|cursor|cycle|data(?:bases?)?|date(?:time)?|day|dbcc|deallocate|dec|decimal|declare|default|definer|delayed|delete|delimiters?|deny|desc|describe|deterministic|disable|discard|disk|distinct|distinctrow|distributed|do|double|drop|dummy|dump(?:file)?|duplicate|else(?:if)?|enable|enclosed|end|engine|enum|errlvl|errors|escaped?|except|exec(?:ute)?|exists|exit|explain|extended|fetch|fields|file|fillfactor|first|fixed|float|following|for each row|for|force|foreign|freetexttable|freetext|from|full|function|geometry(?:collection)?|global|goto|grant|group|handler|hash|having|holdlock|hour|identity(?:col|_insert)?|if|ignore|import|index|infile|inner|innodb|inout|insert|integer|intersect|interval|into?|invoker|isolation|iterate|join|keys?|kill|language|last|leave|left|level|limit|lineno|lines|linestring|load|local|lock|long(?:blob|text)|loop|matched|match|(?:medium|tiny)(?:blob|int|text)|merge|middleint|minute|mode|modifies|modify|month|multi(?:linestring|point|polygon)|national|natural|n?char|next|no|nonclustered|nullif|numeric|off?|offsets?|on|open(?:datasource|query|rowset)?|optimize|option(?:ally)?|order|out(?:er|file)?|over|partial|partition|percent|pivot|plan|point|polygon|preceding|precision|prepare|prev|primary|print|privileges|proc(?:edure)?|public|purge|quick|raiserror|reads?|real|reconfigure|references|release|rename|repeat(?:able)?|replace|replication|require|resignal|restore|restrict|returning|returns?|revoke|right|rollback|routine|row(?:count|guidcol|s)?|rule|savepoint|save|schema|second|select|serializable|serial|session_user|session|setuser|set|share|show|shutdown|simple|smallint|snapshot|some|soname|sql|start(?:ing)?|statistics|status|striped|system_user|tables?|tablespace|temp(?:orary|table)?|terminated|textsize|text|[tw]hen|timestamp|time|top?|transactions?|tran|trigger|truncate|tsequal|types?|unbounded|uncommitted|undefined|union|unique|unlock|unpivot|unsigned|updatetext|update|usage|user?|using|values?|var(?:binary|char|character|ying)|view|waitfor|warnings|where|while|with(?: rollup|in)?|work|writetext|write|year)\b/i,boolean:/\b(?:false|true|null)\b/i,number:/\b0x[a-f\d]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[=%~^/*+-]|&&?|\|\|?|!=?|<<|<=?>?|>[>=]?|\b(?:and|between|div|[ir]?like|in|is|not|x?or|regexp|sounds like)\b/i,punctuation:/[()[\].,;`]/},HG.wasm={comment:/\(;[^]*?;\)|;;.*/,string:{pattern:/"(?:\\[^]|[^\\"])*"/g,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:[fi]32|[fi]64)(?:\.(?:abs|a[dn]d|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|x?or))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*./:<=>?@\\^`|~+-]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[a-fA-F\d](?:_?[a-fA-F\d])*(?:\.[a-fA-F\d](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[a-fA-F\d](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/};var n7=(e,t)=>{for(var n=0;n<t;n++)e=e.replace(/<self>/g,`(?:${e})`);return e.replace(/<self>/g,"[]")},r7=(e,t)=>e.replace(/<(\d+)>/g,((e,n)=>`(?:${t[+n]})`)),o7=(e,t,n)=>RegExp(r7(e,t),n),a7=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,i7=HG.cpp=x9("c",{"class-name":[{pattern:RegExp(`(\\b(?:class|concept|enum|struct|typename)\\s+)(?!${a7.source})\\w+`),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[a-z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:a7,number:{pattern:/(?:\b0b[01']+|\b0x(?:[a-f\d']+(?:\.[a-f\d']*)?|\.[a-f\d']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/gi,greedy:!0},operator:/->|--|\+\+|&&|\|\||[?:~]|<=>|>>=?|<<=?|[%&|^!=<>/*+-]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|x?or|x?or_eq)\b/,boolean:A9});E9(i7,"string",{module:{pattern:o7('(\\b(?:import|module)\\s+)(?:"(?:\\\\[\\s\\S]|[^\\\\\n"])*"|<[^<>\n]*>|<0>(?:\\s*:\\s*<0>)?|:\\s*<0>)',[`\\b(?!${a7.source})\\w+(?:\\s*\\.\\s*\\w+)*\\b`],"g"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][^]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([^]*?\)\1"/g,greedy:!0,alias:"string"}}),E9(i7,"keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[^]+/,alias:"class-name",inside:i7}}}}),E9(i7,"operator",{"double-colon":{pattern:/::/,alias:"punctuation"}});var l7=Object.assign({},i7);E9(i7,"class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/g,lookbehind:!0,greedy:!0,inside:l7}}),E9(l7,"double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i}),HG.go={comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},char:{pattern:/'(?:\\.|[^\\\n']){0,10}'/g,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\\n"])*"|`[^`]*`/g,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|true|iota|nil)\b/,function:/\b\w+(?=\()/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/--|\+\+|&&|\|\||&\^=?|<-|<<=?|>>=?|[%&|^!=<>/*+-]=?|:=|\.{3}/,punctuation:T9,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/};var s7={};HG.js=HG.javascript=Object.assign(s7,{"doc-comment":{pattern:/\/\*\*(?!\/)[^]*?(?:\*\/|$)/g,greedy:!0,alias:"comment",inside:"jsdoc"},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},hashbang:{pattern:/^#!.*/g,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[^]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}|(?!\$\{)[^\\`])*`/g,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\\\)*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},[FG]:s7}},string:/[^]+/}},"string-property":{pattern:/((?:^|[,{])[ ]*)(["'])(?:\\[^]|(?!\2)[^\\\n])*\2(?=\s*:)/gm,lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},regex:{pattern:/((?:^|[^$\w\xa0-\uffff"'`.)\]\s]|\b(?:return|yield))\s*)\/(?:(?:\[(?:\\.|[^\\\n\]])*\]|\\.|[^\\\n/[])+\/[dgimyus]{0,7}|(?:\[(?:\\.|[^\\\n[\]]|\[(?:\\.|[^\\\n[\]]|\[(?:\\.|[^\\\n[\]])*\])*\])*\]|\\.|[^\\\n/[])+\/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?!\/\*|[^()[\]{}.,:;?`\n%&|^!=<>/*+-]))/g,lookbehind:!0,greedy:!0,inside:{"regex-flags":/\w+$/,"regex-delimiter":/^\/|\/$/,"regex-source":{pattern:/.+/,alias:"language-regex",inside:"regex"}}},"class-name":[{pattern:/(\b(?:class|extends|implements|instanceof|interface|new)\s+)(?!\d)(?:(?!\s)[$\w.\xa0-\uffff])+/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(^|[^$\w\xa0-\uffff]|\s)(?![a-z\d])(?:(?!\s)[$\w\xa0-\uffff])+(?=\.(?:constructor|prototype)\b)/,lookbehind:!0}],"function-variable":{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^)]*\))*\)|(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+)\s*=>))/,alias:"function",inside:{"maybe-class-name":/^[A-Z].*/}},parameter:[/(function(?:\s+(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,/(^|[^$\w\xa0-\uffff]|\s)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*=>)/,/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while|yield|class|const|debugger|delete|enum|extends|function|[gs]et|export|from|import|implements|in|instanceof|interface|let|new|null|of|package|private|protected|public|static|super|this|typeof|undefined|var|void|with)(?![$\w\xa0-\uffff]))(?:(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/].map((e=>({pattern:e,lookbehind:!0,inside:s7}))),constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/,keyword:[{pattern:/(^|[^.]|\.{3}\s*)\b(?:as|assert(?=\s*\{)|export|from(?!\s*[^\s"'])|import)\b/,alias:"module",lookbehind:!0},{pattern:/(^|[^.]|\.{3}\s*)\b(?:await|break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow",lookbehind:!0},{pattern:/(^|[^.]|\.{3}\s*)\b(?:async(?!\s*[^\s($\w\xa0-\uffff])|class|const|debugger|delete|enum|extends|function|[gs]et(?!\s*[^\s#[$\w\xa0-\uffff])|implements|in|instanceof|interface|let|new|null|of|package|private|protected|public|static|super|this|typeof|undefined|var|void|with)\b/,lookbehind:!0}],boolean:A9,function:{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,inside:{"maybe-class-name":/^[A-Z].*/}},number:{pattern:/(^|[^$\w])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][a-fA-F\d]+(?:_[a-fA-F\d]+)*n?|\d+(?:_\d+)*n|(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?)(?![$\w])/,lookbehind:!0},"literal-property":{pattern:/([\n,{][ ]*)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?=\s*:)/,lookbehind:!0,alias:"property"},operator:[{pattern:/=>/,alias:"arrow"},/--|\+\+|(?:\*\*|&&|\|\||[!=]=|>>>?|<<|[%&|^!=<>/*+-]|\?\?)=?|\.{3}|\?(?!\.)|~|:/],"property-access":{pattern:/(\.\s*)#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+/,lookbehind:!0,inside:{"maybe-class-name":/^[A-Z].*/}},"maybe-class-name":{pattern:/(^|[^$\w\xa0-\uffff])[A-Z][$\w\xa0-\uffff]+/,lookbehind:!0},punctuation:/\?\.|[()[\]{}.,:;]/});var c7=HG.js,u7=c7["template-string"],d7=u7.pattern.source,p7=u7.inside.interpolation.pattern,f7=(e,t)=>{return{pattern:RegExp("((?:"+t+")\\s*)"+d7,"g"),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},["language-"+e]:{pattern:/[^]+/,inside:{interpolation:{pattern:p7,lookbehind:!0,alias:"language-javascript",inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},[FG]:"js"}},[zG]:(n=e,(e,t)=>{for(var r=$G(n),o="",a=[],i=0,l=WG(e,t),s=0,c=l.length,u=0;s<c;){var d=l[s++],p=d.length,f=d.type;f&&"ignore"!=f.slice(0,6)?(a[i++]=[u,d],o+=" ".repeat(p)):o+=e.slice(u,u+p),u+=p}var h=0,m=(u=0,e=>{for(var t=0;h<i&&t<e.length;t++){var n=e[t],r=n.content;if(Array.isArray(r))m(r);else{for(var l,s,c=n.length,d=[],p=0,f=u;[l,s]=a[h],l>=u&&l<u+c&&(f<l&&(d[p++]=o.slice(f,l)),f=l+s.length,d[p++]=s,++h!=i););u+=c,p&&(f<u&&(d[p++]=o.slice(f,u)),r?n.content=d:(e.splice(t,1,...d),t+=p-1))}}}),v=r?UG(o,r):[o];return m(v),v})}}}};var n};c7["template-string"]=[f7("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),f7("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),f7("svg","\\bsvg"),f7("markdown","\\b(?:markdown|md)"),f7("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),f7("sql","\\bsql"),u7];var h7="\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))*\\*/",m7="\\{(?:[^{}]|\\{(?:[^{}]|\\{[^}]*\\})*\\})*\\}",v7=r7("\\{<0>*\\.{3}(?:[^{}]|<1>)*\\}",[h7,m7]),g7=e=>e&&(!e.type||"plain-text"==e.type),b7=(e,t)=>{E9(HG[t]=e=k9(e),"regex",{tag:{pattern:o7("</?(?:(?!\\d)[^\\s/=><%]+(?:<0>(?:<0>*(?:[^\\s<>/={*]+(?:<0>*=<0>*(?!\\s)(?:\"[^\"]*\"|'[^']*'|<1>)?|(?=[\\s/>]))|<2>))+)?<0>*/?)?>",[h7,m7,v7],"g"),greedy:!0,inside:{punctuation:/^<\/?|\/?>$/,tag:{pattern:/^[^\s/]+/,inside:{namespace:/^[^:]+:/,"class-name":/^[A-Z]\w*(?:\.[A-Z]\w*)*$/}},script:{pattern:o7("(=<0>*)<1>",[h7,m7]),lookbehind:!0,alias:t="language-"+t,inside:e},spread:{pattern:RegExp(v7),alias:t,inside:e},"attr-value":{pattern:o7("(=<0>*)(?:\"[^\"]*\"|'[^']*')",[h7]),lookbehind:!0,inside:{punctuation:/^["']|["']$/}},comment:e.comment,"attr-equals":/=/,"attr-name":{pattern:/\S+/,inside:{namespace:/^[^:]+:/}}}}}),e[zG]=(e,t)=>((e,t,n)=>{for(var r=0,o=[],a=0;r<e.length;r++){var i,l,s,c,u,d=e[r],p=d.length,f=d.type,h=!f;f&&(u=d.content,"tag"==f?(s=u[0].length,l=u[2]?t.substr(n+s,u[1].length):"",s>1?a&&o[a-1][0]==l&&a--:u[u.length-1].length<2&&(o[a++]=[l,0])):a&&"punctuation"==f?(i=o[a-1],"{"==u?i[1]++:i[1]&&"}"==u?i[1]--:h=!"}()[]".includes(u)):h=!0),h&&a&&!o[a-1][1]&&(s=n,g7(e[r+1])&&(p+=e[r+1].length,e.splice(r+1,1)),g7(e[r-1])&&(s-=e[--r].length,e.splice(r,1)),c=t.slice(s,n+p),e[r]=new JG("plain-text",c,c)),n+=p}return e})(WG(e,t),e,0)};b7(HG.js,"jsx"),HG.lua={comment:/^#!.+|--(?:\[(=*)\[[^]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\n]|\\z\s|\\[^z])*\1|\[(=*)\[[^]*?\]\2\]/g,greedy:!0},number:/\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|true|f?or|function|goto|if|in|local|nil|not|repeat|return|then|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:{pattern:/[%&|^#*+-]|\/\/?|<[<=]?|>[>=]?|[=~]=?|(^|[^.])\.\.(?!\.)/,lookbehind:!0},punctuation:/[()[\]{},;]|\.+|:+/};var y7="(?:\\((?:\\\\[\\s\\S]|[^\\\\()])*\\)|\\{(?:\\\\[\\s\\S]|[^\\\\{}])*\\}|\\[(?:\\\\[\\s\\S]|[^\\\\[\\]])*\\]|<(?:\\\\[\\s\\S]|[^\\\\<>])*>)",w7="(?![a-zA-Zd])\\s*(?:([^a-zA-Zd\\s{([<])(?:\\\\[^]|(?!\\1)[^\\\\])*\\1|([a-zA-Zd])(?:\\\\[^]|(?!\\2)[^\\\\])*\\2";HG.perl={comment:[{pattern:/(^\s*)=\w[^]*?=cut.*/gm,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/g,lookbehind:!0,greedy:!0}],string:{pattern:RegExp(`\\bq[qwx]?${w7}|${y7})|("|\`)(?:\\\\[^]|(?!\\3)[^\\\\])*\\3|'(?:\\\\.|[^\\\\\n'])*'`,"g"),greedy:!0},regex:[{pattern:RegExp(`\\b(?:m|qr)${w7}|${y7})[msixpodualngc]*`,"g"),greedy:!0},{pattern:RegExp(`(^|[^-])\\b(?:s|tr|y)(?![a-zA-Zd])\\s*(?:([^a-zA-Zd\\s{([<])(?:\\\\[^]|(?!\\2)[^\\\\])*\\2(?:\\\\[^]|(?!\\2)[^\\\\])*\\2|([a-zA-Zd])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3(?:\\\\[^]|(?!\\3)[^\\\\])*\\3|${y7}\\s*${y7})[msixpodualngcer]*`,"g"),lookbehind:!0,greedy:!0},{pattern:/\/(?:\\.|[^\\\n/])*\/[msixpodualngc]*(?=\s*(?:$|[\n,.;})&|*~<>!?^+-]|(?:and|cmp|eq|[gl][et]|ne|not|x|x?or)\b))/g,greedy:!0}],variable:/[&*$@%](?:\{\^[A-Z]+\}|\^[A-Z_]|#?(?=\{)|#?(?:(?:::)*'?(?!\d)[$\w]+(?![$\w]))+(?:::)*|\d+)|(?!%=)[$@%][!"#$%&'*,./:;<=>?@()[\]{}||^_`|~+-]/,filehandle:{pattern:/<(?![<=])\S*?>|\b_\b/,alias:"symbol"},"v-string":{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/(\bsub[ ]+)\w+/,lookbehind:!0},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[a-fA-F\d](?:_?[a-fA-F\d])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|->|=>|=~|~~|<=>?|!~|--|\+\+|(?:\*\*|\/\/|&&|\|\||<<|>>|[~%&|^!=<>/*+-])=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|[gl][et]|ne|not|x?or)\b/,punctuation:/[()[\]{},:;]/};var k7={"format-spec":{pattern:/(:)[^(){}:]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern://,alias:"punctuation"}};k7[FG]=HG.py=HG.python={comment:{pattern:/#.*/g,greedy:!0},"string-interpolation":{pattern:/(?:fr?|rf)(?:("""|''')[^]*?\1|(["'])(?:\\[^]|(?!\2)[^\\\n])*\2)/gi,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})*\}/,lookbehind:!0,inside:k7},string:/[^]+/}},"triple-quoted-string":{pattern:/(?:br?|rb?|u)?("""|''')[^]*?\1/gi,greedy:!0,alias:"string"},string:{pattern:/(?:br?|rb?|u)?(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/gi,greedy:!0},function:{pattern:/((?:^|\s)def[ ]+)(?!\d)\w+(?=\s*\()/,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[ ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:"annotation punctuation",inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|de[fl]|elif|else|except|exec|finally|f?or|from|global|i[fns]|import|lambda|match|nonlocal|not|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|ma[px]|memoryview|min|next|object|oct|open|ord|pow|property|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|x?range|zip)\b/,boolean:/\b(?:False|True|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f\d])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/!=|:=|\*\*=?|\/\/=?|<>|>>|<<|[%=<>/*+-]=?|[&|^~]/,punctuation:T9};var x7=n7("/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/",2),E7={pattern:/b?"(?:\\[^]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/g,greedy:!0},C7={"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"}};C7[FG]=HG.rust={comment:{pattern:RegExp("//.*|"+x7,"g"),greedy:!0},string:E7,char:{pattern:/b?'(?:\\(?:x[0-7][a-fA-F\d]|u\{(?:[a-fA-F\d]_*){1,6}\}|.)|[^\\\n '])'/g,greedy:!0},attribute:{pattern:/#!?\[(?:[^[\]"]|"(?:\\[^]|[^\\"])*")*\]/g,greedy:!0,alias:"attr-name",inside:{string:E7}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/g,lookbehind:!0,greedy:!0,inside:C7},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield|bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/,function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[a-fA-F\d](?:_?[a-fA-F\d])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:A9,punctuation:/->|\.\.=|\.{1,3}|::|[()[\]{},:;]/,operator:/&&|\|\||=>|>>=?|<<=?|[%&|^!=<>/*+-]=?|[@?]/};var S7=HG.swift={comment:{pattern:/\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\//g,greedy:!0},"string-literal":[{pattern:/(^|[^"#])(?:"(?:\\(?:\((?:[^()]|\([^)]*\))*\)|[^(])|[^\\\n"])*"|"""(?:\\(?:\((?:[^()]|\([^)]*\))*\)|[^(])|[^\\"]|"(?!""))*""")(?!["#])/g,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))+(?=\))/,lookbehind:!0},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=\n)/,string:/[^]+/}},{pattern:/(^|[^"#])(#+)(?:"(?:\\(?:#+\((?:[^()]|\([^)]*\))*\)|[^#])|[^\\\n])*?"|"""(?:\\(?:#+\((?:[^()]|\([^)]*\))*\)|[^#])|[^\\])*?""")\2/g,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))+(?=\))/,lookbehind:!0},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[^]+/}}],directive:{pattern:/#(?:(?:elseif|if)\b(?:[ ]*(?:![ ]*)?(?:\b\w+\b(?:[ ]*\((?:[^()]|\([^)]*\))*\))?|\((?:[^()]|\([^)]*\))*\))(?:[ ]*(?:&&|\|\|))?)+|(?:else|endif)\b)/,alias:"property",inside:{"directive-name":/^#\w+/,boolean:A9,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b(?!\d)\w+(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|[Pp]rotocol|[Ss]elf|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|[gs]et|guard|higherThan|i[fns]|import|indirect|infix|init|inout|internal|isolated|lazy|lef?t|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|public|repeat|required|rethrows|return|right|safe|some|static|struct|subscript|super|switch|throws?|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:A9,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f\d_]+(?:\.[a-f\dp_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[~?%&|^!=<>/*+-]+|\.[.~?%&|^!=<>/*+-]+/,punctuation:/[()[\]{}.,:;\\]/};S7["string-literal"].forEach((e=>{e.inside.interpolation.inside=S7})),HG.clike={comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:A9,function:/\b\w+(?=\()/,number:N9,operator:/[!=]==|[!=<>]=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:T9};var O7=e=>`\\b(?:${e})\\b`,_7="bool|char|decimal|double|dynamic|float|object|s?byte|string|u?int|u?long|u?short|var|void",N7="class|enum|interface|record|struct",T7="add|alias|and|ascending|async|await|by|descending|from(?!\\s*[^\\s\\w])|[gls]et|global|group|into|init(?=\\s*;)|join|nameof|not|notnull|on|or|orderby|partial|remove|select|unmanaged|value|when|where|with(?=\\s*{)",A7="abstract|as|[bc]ase|break|catch|checked|const|continue|default|delegate|do|else|event|explicit|extern|finally|fixed|for|foreach|goto|i[fns]|implicit|internal|lock|namespace|new|null|operator|out|override|params|private|protected|public|readonly|ref|return|sealed|sizeof|stackalloc|static|switch|this|throw|try|typeof|unchecked|unsafe|using|virtual|volatile|while|yield",M7=O7(N7),I7=RegExp(O7(_7+"|"+N7+"|"+T7+"|"+A7)),P7=O7(N7+"|"+T7+"|"+A7),L7=O7(_7+"|"+N7+"|"+A7),R7=n7("<(?:[^<>;=*/%&|^+-]|<self>)*>",2),B7=n7("\\((?:[^()]|<self>)*\\)",2),D7="@?\\b(?!\\d)\\w+\\b",V7=r7("<0>(?:\\s*<1>)?",[D7,R7]),j7=r7("(?!<0>)<1>(?:\\s*\\.\\s*<1>)*",[P7,V7]),F7="\\[\\s*(?:,\\s*)*\\]",z7=r7("<0>(?:\\s*(?:\\?\\s*)?<1>)*(?:\\s*\\?)?",[j7,F7]),$7=r7("[^()[\\],;%&|^=<>/*+-]|<0>|<1>|<2>",[R7,B7,F7]),H7=r7("\\(<0>+(?:,<0>+)+\\)",[$7]),U7=r7("(?:<0>|<1>)(?:\\s*(?:\\?\\s*)?<2>)*(?:\\s*\\?)?",[H7,j7,F7]),W7={keyword:I7,punctuation:/[()[\].,:<>?]/},G7="'(?:\\\\.|[^\n'\\\\]|\\\\[Uux][a-fA-F\\d]{1,8})'",K7='"(?:\\\\.|[^\\\\\n"])*"',q7=HG.dotnet=HG.cs=HG.csharp=x9("clike",{string:[{pattern:o7("(^|[^$\\\\])<0>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")'],"g"),lookbehind:!0,greedy:!0},{pattern:o7("(^|[^@$\\\\])<0>",[K7],"g"),lookbehind:!0,greedy:!0}],"class-name":[{pattern:o7("(\\busing\\s+static\\s+)<0>(?=\\s*;)",[j7]),lookbehind:!0,inside:W7},{pattern:o7("(\\busing\\s+<0>\\s*=\\s*)<1>(?=\\s*;)",[D7,U7]),lookbehind:!0,inside:W7},{pattern:o7("(\\busing\\s+)<0>(?=\\s*=)",[D7]),lookbehind:!0},{pattern:o7("(\\b<0>\\s+)<1>",[M7,V7]),lookbehind:!0,inside:W7},{pattern:o7("(\\bcatch\\s*\\(\\s*)<0>",[j7]),lookbehind:!0,inside:W7},{pattern:o7("(\\bwhere\\s+)<0>",[D7]),lookbehind:!0},{pattern:o7("(\\b(?:is(?:\\s+not)?|as)\\s+)<0>",[z7]),lookbehind:!0,inside:W7},{pattern:o7("\\b<0>(?=\\s+(?!<1>|with\\s*\\{)<2>(?:\\s*[=,:;{)\\]]|\\s+(?:in|when)\\b))",[U7,L7,D7]),inside:W7}],keyword:I7,number:/(?:\b0(?:x[a-f\d_]*[a-f\d]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[+-]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/[=-]>|([&|+-])\1|~|\?\?=?|>>=?|<<=?|[%&|^!=<>/*+-]=?/,punctuation:/\?\.?|::|[()[\]{}.,:;]/});E9(q7,"number",{range:{pattern:/\.\./,alias:"operator"}}),E9(q7,"punctuation",{"named-parameter":{pattern:o7("([(,]\\s*)<0>(?=\\s*:)",[D7]),lookbehind:!0,alias:"punctuation"}}),E9(q7,"class-name",{namespace:{pattern:o7("(\\b(?:namespace|using)\\s+)<0>(?:\\s*\\.\\s*<0>)*(?=\\s*[;{])",[D7]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:o7("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<0>)+(?=\\s*\\))",[B7]),lookbehind:!0,alias:"class-name",inside:W7},"return-type":{pattern:o7("<0>(?=\\s+(?:<1>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[U7,j7]),alias:"class-name",inside:W7},"constructor-invocation":{pattern:o7("(\\bnew\\s+)<0>(?=\\s*[[({])",[U7]),lookbehind:!0,alias:"class-name",inside:W7},"generic-method":{pattern:o7("<0>\\s*<1>(?=\\s*\\()",[D7,R7]),inside:{function:o7("^<0>",[D7]),generic:{pattern:RegExp(R7),alias:"class-name",inside:W7}}},"type-list":{pattern:o7("\\b((?:<0>\\s+<1>|record\\s+<1>\\s*<5>|where\\s+<2>)\\s*:\\s*)(?:<3>|<4>|<1>\\s*<5>|<6>)(?:\\s*,\\s*(?:<3>|<4>|<6>))*(?=\\s*(?:where|[{;]|=>|$))",[M7,V7,D7,U7,I7.source,B7,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:o7("(^(?!new\\s*\\()<0>\\s*)<1>",[V7,B7],"g"),lookbehind:!0,greedy:!0,inside:q7},keyword:I7,"class-name":{pattern:RegExp(U7,"g"),greedy:!0,inside:W7},punctuation:/[(),]/}},preprocessor:{pattern:/(^[ ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var Y7=K7+"|"+G7,X7=r7("/(?![*/])|//[^\n]*\n|/\\*(?:[^*]|\\*(?!/))*\\*/|<0>",[Y7]),Z7=n7(r7("[^()\"'/]|<0>|\\(<self>*\\)",[X7]),2),J7="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",Q7=r7("<0>(?:\\s*\\(<1>*\\))?",[j7,Z7]),eee=":[^\n}]+",tee=n7(r7("[^()\"'/]|<0>|\\(<self>*\\)",[X7]),2),nee=r7("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}",[tee,eee]),ree=n7(r7("[^()\"'/]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<0>|\\(<self>*\\)",[Y7]),2),oee=r7("\\{(?!\\{)(?:(?![}:])<0>)*<1>?\\}",[ree,eee]),aee=(e,t)=>({interpolation:{pattern:o7("((?:^|[^{])(?:\\{\\{)*)<0>",[e]),lookbehind:!0,inside:{"format-string":{pattern:o7("(^\\{(?:(?![}:])<0>)*)<1>(?=\\}$)",[t,eee]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[^]+/,alias:"language-csharp",inside:q7}}},string:/[^]+/});E9(q7,"class-name",{attribute:{pattern:o7("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<0>\\s*:\\s*)?<1>(?:\\s*,\\s*<1>)*(?=\\s*\\])",[J7,Q7],"g"),lookbehind:!0,greedy:!0,inside:{target:{pattern:o7("^<0>(?=\\s*:)",[J7]),alias:"keyword"},"attribute-arguments":{pattern:o7("\\(<0>*\\)",[Z7]),inside:q7},"class-name":{pattern:RegExp(j7),inside:{punctuation:/\./}},punctuation:/[,:]/}}}),E9(q7,"string",{"interpolation-string":[{pattern:o7('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<0>|[^\\\\{"])*"',[nee],"g"),lookbehind:!0,greedy:!0,inside:aee(nee,tee)},{pattern:o7('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<0>|[^\\\\"{])*"',[oee],"g"),lookbehind:!0,greedy:!0,inside:aee(oee,ree)}],char:{pattern:RegExp(G7,"g"),greedy:!0}}),HG.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|"(?!""))*"""|"(?:\\.|[^\\\n"])*")(?=\s*[a-z_])/gi,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/("(?!")|""")[^]+(?=\1)/,lookbehind:!0,inside:"md"}}},string:{pattern:/"""[^]*?"""|"(?:\\.|[^\\\n"])*"/g,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:A9,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\\n"])*")*\))?:)/gi,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))(?!\d)\w+/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)(?!\d)\w+/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)(?!\d)\w+/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[&|!=]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[()[\]{},:!=]/,property:/\w+/,[zG](e,t){for(var n=WG(e,t),r=n.filter((({type:e})=>e&&"comment"!=e&&"scalar"!=e)),o=r.length,a=0,i=e=>{for(var t=0;t<e.length;t++)if(a+t==o||r[a+t].type!=e[t])return!0},l=(e,t)=>{for(var n=1,i=a;i<o;i++){var l=r[i],s=l.content;if("punctuation"==l.type)if(e==s)n++;else if(t==s&&! --n)return i}};a<o;){var s=r[a++];if("keyword"==s.type&&"mutation"==s.content){var c=[];if(!i(["definition-mutation","punctuation"])&&"("==r[a+1].content){a+=2;var u=l("(",")");if(!u)continue;for(;a<u;a++){var d=r[a];"variable"==d.type&&(d.alias="variable-input",c.push(d.content))}a=u+1}if(!i(["punctuation","property-query"])&&"{"==r[a].content&&(r[++a].alias="property-mutation",c[0])){var p=l("{","}");if(p)for(var f=a;f<p;f++){var h=r[f];"variable"==h.type&&c.indexOf(h.content)>=0&&(h.alias="variable-input")}}}}return n}},HG.webmanifest=HG.json={property:{pattern:/"(?:\\.|[^\\\n"])*"(?=\s*:)/g,greedy:!0},string:{pattern:/"(?:\\.|[^\\\n"])*"/g,greedy:!0},comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/:/,punctuation:/[[\]{},]/,boolean:A9,null:{pattern:/\bnull\b/,alias:"keyword"}},HG.makefile={comment:/#(?:\\[^]|[^\\\n])*/,string:{pattern:/(["'])(?:\\[^]|(?!\1)[^\\\n])*\1/g,greedy:!0},"builtin-target":{pattern:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,alias:"builtin"},target:{pattern:/^(?:[^:=\s]|[ ]+(?![\s:]))+(?=\s*:(?!=))/m,alias:"symbol",inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|override|private|s?include|undefine|unexport|vpath)\b/,function:{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ ])/,lookbehind:!0},operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/};var iee=HG.scss=x9("css",{comment:{pattern:/\/\/.*|\/\*[^]*?(?:\*\/|$)/g,greedy:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/,[FG]:"scss"}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?!\s)[^@;(){}]?(?:[^@;(){}\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}});E9(iee,"atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),E9(iee,"important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),E9(iee,"function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:A9,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[%/*+-]|[!=]=|[<>]=?|and|not|or)(?!\S)/,lookbehind:!0}});var lee={pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/g,lookbehind:!0,greedy:!0},see=HG.ts=HG.typescript=x9("js",{"class-name":lee});E9(see,"operator",{builtin:/\b(?:Array|Function|Promise|any|boolean|never|number|string|symbol|unknown)\b/}),see.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b|\b(?:asserts|infer|interface|module|namespace|type)\b(?!\s*[^\s{_$a-zA-Z\xa0-\uffff])|\btype(?=\s*\*)/),delete see.parameter,delete see["literal-property"];var cee=lee.inside=Object.assign({},see);delete cee["class-name"],delete cee["maybe-class-name"],E9(see,"function",{decorator:{pattern:/@[$\w\xa0-\uffff]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/.+/}},"generic-function":{pattern:/#?(?!\d)(?:(?!\s)[$\w\xa0-\uffff])+\s*<(?:[^<>=]|=[^<]|=?<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/g,greedy:!0,inside:{generic:{pattern:/<[^]+/,alias:"class-name",inside:cee},function:/\S+/}}}),b7(HG.ts,"tsx");var uee=HG.tsx.tag,dee="(?:^|(";try{RegExp("(?<=)"),dee+="?<="}catch{uee.lookbehind=!0}uee.pattern=RegExp(dee+`[^\\w$])|(?=</))${uee.pattern.source}`,"g");var pee=/[*&][^\s[\]{},]+/,fee=/!(?:<[\w%#;/?:@&=$,.!~*'()[\]+-]+>|(?:[a-zA-Z\d-]*!)?[\w%#;/?:@&=$.~*'()+-]+)?/,hee=`(?:${fee.source}(?:[ \t]+${pee.source})?|${pee.source}(?:[ \t]+${fee.source})?)`,mee=r7("(?:[^\\s\0-\\x08\\x0e-\\x1f!\"#%&'*,:>?@[\\]{}`|\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff-]|[?:-]<0>)(?:[ \t]*(?:(?![#:])<0>|:<0>))*",["[^\\s\0-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"]),vee="\"(?:\\\\.|[^\\\\\n\"])*\"|'(?:\\\\.|[^\\\\\n'])*'",gee=(e,t)=>o7("([:,[{-]\\s*(?:\\s<0>[ \t]+)?)<1>(?=[ \t]*(?:$|,|\\]|\\}|(?:\n\\s*)?#))",[hee,e],t);HG.yml=HG.yaml={scalar:{pattern:o7("([:-]\\s*(?:\\s<0>[ \t]+)?[|>])[ \t]*(?:(\n[ \t]+)\\S.*(?:\\2.+)*)",[hee]),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:o7("((?:^|[:,[{\n?-])[ \t]*(?:<0>[ \t]+)?)<1>(?=\\s*:\\s)",[hee,"(?:"+mee+"|"+vee+")"],"g"),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ ]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:gee("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d\\d:\\d\\d(?:\\.\\d*)?(?:[ \t]*(?:Z|[+-]\\d\\d?(?::\\d\\d)?))?|\\d{4}-\\d\\d-\\d\\d|\\d\\d?:\\d\\d(?::\\d\\d(?:\\.\\d*)?)?","m"),lookbehind:!0,alias:"number"},boolean:{pattern:gee("false|true","im"),lookbehind:!0,alias:"important"},null:{pattern:gee("null|~","im"),lookbehind:!0,alias:"important"},string:{pattern:gee(vee,"mg"),lookbehind:!0,greedy:!0},number:{pattern:gee("[+-]?(?:0x[a-f\\d]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","im"),lookbehind:!0},tag:fee,important:pee,punctuation:/---|[:[\]{},|>?-]|\.{3}/};var bee={pattern:/\\[\\()[\]{}^$+*?|.]/,alias:"escape"},yee=/\\(?:x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|u\{[a-fA-F\d]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,wee="(?:[^\\\\-]|"+yee.source+")",kee=RegExp(wee+"-"+wee),xee={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};HG.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:\\[^]|[^\\\]])*\]/,lookbehind:!0,inside:{"char-class-punctuation":{pattern:/^.|.$/g,greedy:!0,alias:"punctuation"},"char-class-negation":{pattern:/^\^/,alias:"operator"},range:{pattern:kee,inside:{escape:yee,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":bee,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:yee}},"special-escape":bee,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":xee}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:yee,group:[{pattern:/(\()\?(?:<[^<>']+>|'[^<>']+'|[>:]|<?[!=]|[idmnsuxU]+(?:-[idmnsuxU]+)?:?)/,lookbehind:!0,inside:{"group-name":xee}},{pattern:/[()]/,alias:"punctuation"}],quantifier:{pattern:/(?:[+*?]|\{\d+(?:,\d*)?\})[?+]?/,alias:"number"},alternation:{pattern:/\|/,alias:"keyword"}};const Eee=["textContent"],Cee={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),r=t.ref(null),o=t.ref(e.node.attrs.code);let a=t.ref(null);return t.onMounted((()=>{a.value=((e,t,...n)=>{var r;let o,a,i,l,s,c=[],u="",d=!1,p=!1,f=!0,h=[],m=0;const v=j6(),g=v.firstChild,b=g.children,y=b[0],w=y.firstChild,k={language:"text",value:u},x=new Set(n),E={},C=e=>{if(Object.assign(k,e),u=e.value??u,o=k.language,!HG[o])throw Error(`Language '${o}' has no grammar.`);s=!!k.readOnly,v.style.tabSize=k.tabSize||2,w.inputMode=s?"none":"",w.setAttribute("aria-readonly",s),_(),O(),a==(a=HG[o])&&u==w.value||(M(),w.value=u,w.selectionEnd=0,S())},S=()=>{h=UG(u=w.value,a),I("tokenize",h,o,u);let e=YG(h).split("\n"),t=0,n=m,r=m=e.length;for(;e[t]==c[t]&&t<r;)++t;for(;r&&e[--r]==c[--n];);if(t==r&&t==n)b[t+1].innerHTML=e[t]+"\n";else{let o=n<t?n:t-1,a=o,i="";for(;a<r;)i+=`<div class=pce-line aria-hidden=true>${e[++a]}\n</div>`;for(a=r<t?r:t-1;a<n;a++)b[t+1].remove();for(i&&b[o+1].insertAdjacentHTML("afterend",i),a=o+1;a<m;)b[++a].setAttribute("data-line",a);v.style.setProperty("--number-width",Math.ceil(Math.log10(m+1))+".001ch")}I("update",u),P(!0),f&&setTimeout(setTimeout,0,(()=>f=!0)),c=e,f=!1},O=e=>{(e||x).forEach((t=>{"object"==typeof t?(t.update(L,k),e&&x.add(t)):(t(L,k),e||x.delete(t))}))},_=([e,t]=N())=>{v.className=`prism-code-editor language-${o}${0==k.lineNumbers?"":" show-line-numbers"} pce-${k.wordWrap?"":"no"}wrap${k.rtl?" pce-rtl":""} pce-${e<t?"has":"no"}-selection${p?" pce-focus":""}${s?" pce-readonly":""}`},N=()=>[w.selectionStart,w.selectionEnd,w.selectionDirection],T={Escape(){w.blur()}},A={},M=()=>B6&&!p&&M6(L,"focus",(e=>{let t=e.relatedTarget;t?t.focus():w.blur()}),{once:!0}),I=(e,...t)=>{var n,r;null==(n=E[e])||n.forEach((e=>e.apply(L,t))),null==(r=k["on"+e[0].toUpperCase()+e.slice(1)])||r.apply(L,t)},P=e=>{if(e||f){const e=N(),t=b[l=D6(u,0,e[e[2]<"f"?0:1])];t!=i&&(null==i||i.classList.remove("active-line"),t.classList.add("active-line"),i=t),_(e),I("selectionChange",e,u)}},L={scrollContainer:v,wrapper:g,overlays:y,textarea:w,get activeLine(){return i},get activeLineNumber(){return l},get value(){return u},options:k,get focused(){return p},get removed(){return d},get tokens(){return h},inputCommandMap:A,keyCommandMap:T,extensions:{},setOptions:C,update:S,getSelection:N,setSelection(e,t=e,n){M(),w.setSelectionRange(e,t,n),P(!0)},addExtensions(...e){O(e)},addListener(e,t){(E[e]||(E[e]=new Set)).add(t)},removeListener(e,t){var n;null==(n=E[e])||n.delete(t)},remove(){v.remove(),d=!0}};return M6(L,"keydown",(e=>{var t;(null==(t=T[e.key])?void 0:t.call(T,e,N(),u))&&F6(e)})),M6(L,"beforeinput",(e=>{var t;(s||"insertText"==e.inputType&&(null==(t=A[e.data])?void 0:t.call(A,e,N(),u)))&&F6(e)})),M6(L,"input",S),M6(L,"blur",(()=>{z6=null,p=!1,_()})),M6(L,"focus",(()=>{z6=P,p=!0,_()})),M6(L,"selectionchange",(e=>{P(),F6(e)})),null==(r=I6(e))||r.append(v),t&&C(t),L})(r.value,{readOnly:n.value.document.readOnly,language:e.node.attrs.language,tabSize:2,lineNumbers:e.node.attrs.lineNumbers,wordWrap:e.node.attrs.wordWrap,value:o.value,onUpdate(t){e.updateAttributes({code:t})}}),a.value.addExtensions(((e=!0,t="([{",n=")]}")=>{let r,o;const a=[],i=t=>{t.extensions.matchBrackets=i,t.addListener("tokenize",c),e&&t.tokens[0]?t.update():c(t.tokens)},l=i.brackets=[],s=i.pairs=[],c=t=>{if(s.length=l.length=o=r=0,u(t,0),e)for(let e,n=0;e=l[n];){let t=e[0].alias;e[0].alias=(t?t+" ":"")+"bracket-"+(n++in s?"level-"+e[2]%12:"error")}},u=(e,i)=>{let c,d=0;for(;c=e[d++];){let e=c.length;if("string"!=typeof c){let d=c.content;if(Array.isArray(d))u(d,i);else if("punctuation"==(c.alias||c.type)){let u=$6(d,t,e-1),p=u||$6(d,n,e-1);if(p){if(l[r]=[c,i,0,d,!!u,i+e],u)a[o++]=[r,u];else for(let e=o;e;){let[t,n]=a[--e];p==n&&(s[s[r]=t]=r,l[r][2]=l[t][2]=o=e,e=0)}r++}}}i+=e}};return i})(),t9(),o9(),(e=>{let t,n,r,o=-1,a=[],i=()=>{n||(n=e.extensions.matchBrackets);let[i,c]=e.getSelection(),u=i==c&&e.focused&&n&&l(c)||-1;if(u!=o){if(s(),u+1){let n=t[r[u]],o=t[u];a=[n,o].map((t=>Y6(e,".punctuation",0,-1,t[1]))),a[0]!=a[1]&&n[1]+n[3].length==o[1]&&(a[0].textContent+=a[1].textContent,a[1].textContent="",a[1]=a[0]),s(!0)}else a=[];o=u}},l=e=>{var o;({brackets:t,pairs:r}=n);for(let n,a=0;n=t[++a];)if(!n[4]&&n[5]>=e&&(null==(o=t[r[a]])?void 0:o[1])<=e)return a},s=e=>a.forEach((t=>t.classList.toggle("active-bracket",!!e)));M6(e,"focus",i),M6(e,"blur",i),e.addListener("selectionChange",i),e.addListener("update",(()=>{s(),o=-1}))}),i9(),d9(),((e=999)=>{let t,n,r,o,a,i,l,s=0,c=!1;const u=[],d=n=>{n>=e&&(n--,u.shift()),u.splice(s=n,e,[t.value,l(),l()])},p=e=>{var r;u[e]&&(i.value=u[e][0],i.setSelectionRange(...u[e][e<s?2:1]),t.update(),null==(r=t.extensions.cursor)||r.scrollIntoView(),s=e,n=!1)},f=(e,h)=>{e.extensions.history=f,t=e,l=e.getSelection,i||d(0),i=e.textarea,e.addListener("selectionChange",(()=>{n=c,c=!1})),M6(e,"beforeinput",(e=>{let t=e.data,i=e.inputType;/history/.test(i)?(p(s+("U"==i[7]?-1:1)),F6(e)):(a=n&&r==i&&e.isTrusted&&!(null==t?void 0:t.includes("\n"))&&(" "!=t||o==t))||(u[s][2]=W6||l()),c=!0,o=t,r=i})),M6(e,"input",(()=>d(s+!a))),M6(e,"keydown",(e=>{if(!h.readOnly){const t=J6(e),n=e.keyCode,r=t==c9+8&&90==n||!L6&&t==c9&&89==n;t==c9&&90==n?(p(s-1),F6(e)):r&&(p(s+1),F6(e))}}))};return f.clear=()=>{d(0),n=!1},f.has=e=>s+e in u,f.go=e=>p(s+e),f})())})),t.onBeforeUnmount((()=>{a.value.remove()})),t.watch((()=>n.value.document.readOnly),(e=>{a.value.setOptions({readOnly:e})})),t.watch((()=>[e.node.attrs.language,e.node.attrs.lineNumbers,e.node.attrs.wordWrap]),(()=>{a.value.setOptions(e.node.attrs)})),(e,o)=>(t.openBlock(),t.createBlock(t.unref(s2),{class:"node-view code-block-node-view"},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["node-container hover-shadow select-outline code-block",e.node.attrs.theme]),ref_key:"containerRef",ref:r},[t.unref(n).document.readOnly?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"show-toolbar",textContent:t.toDisplayString(e.t("node.codeBlock.menu"))},null,8,Eee))],2)])),_:1}))}},See=s1.create({name:"codeBlock",group:"block",atom:!0,addAttributes:()=>({code:{default:""},language:{default:"plaintext"},theme:{default:"light"},lineNumbers:{default:!0},wordWrap:{default:!1}}),parseHTML:()=>[{tag:"pre"}],renderHTML({HTMLAttributes:e}){return["pre",GQ(this.options.HTMLAttributes,e)]},addNodeView:()=>p2(Cee),addCommands(){return{setCodeBlock:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.setCodeBlock()}}}),Oee={class:"node-container text-box"},_ee={__name:"node-view",props:u2,setup(e){const{options:n}=zN(),r=t.ref(null);let o=t.ref(!1);const a=t.ref(!1),i=({angle:t})=>{e.updateAttributes({angle:t})},l=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})},s=({left:t,top:n})=>{e.updateAttributes({left:t,top:n})};return gN(r,(()=>o.value=!1)),(e,c)=>(t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:r,class:"node-view text-box-node-view",onDblclickCapture:c[2]||(c[2]=e=>a.value=!0)},{default:t.withCtx((()=>[t.createElementVNode("div",Oee,[t.createVNode(t.unref(S8),{selected:t.unref(o),disabled:a.value,draggable:!t.unref(n).document.readOnly,rotatable:!0,boundary:!1,angle:e.node.attrs.angle,width:e.node.attrs.width,height:e.node.attrs.height,left:e.node.attrs.left,top:e.node.attrs.top,"min-width":14,"min-height":14,title:e.t("node.textBox.tip"),onRotate:i,onResize:l,onDrag:s,onBlur:c[0]||(c[0]=e=>a.value=!1),onClick:c[1]||(c[1]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createVNode(t.unref(l2),{class:"content"})])),_:1},8,["selected","disabled","draggable","angle","width","height","left","top","title"])])])),_:1},512))}},Nee=s1.create({name:"textBox",group:"block",content:"inline*",addAttributes:()=>({width:{default:200},height:{default:40},angle:{default:null},left:{default:0},top:{default:0},draggable:{default:!0},rotatable:{default:!0}}),parseHTML:()=>[{tag:"text-box"}],renderHTML:({HTMLAttributes:e})=>["text-box",GQ(e),0],addNodeView:()=>p2(_ee),addCommands(){return{setTextBox:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),Tee=u4.extend({addOptions:()=>({HTMLAttributes:{class:"page-divider","data-line-number":!1}}),parseHTML:()=>[{tag:"hr",getAttrs:e=>{e.getAttribute("data-type"),e.style.color}}],addAttributes:()=>({"data-type":{parseHTML:e=>e.getAttribute("data-type")||"signle"},color:{parseHTML:e=>e.getAttribute("data-color"),renderHTML:e=>({"data-color":e.color,style:`color: ${e.color||"inherit"}`})}}),addCommands(){return{setHr:({type:e,color:t})=>({chain:n,state:r})=>{const{$to:o}=r.selection,a=n();return 0===o.parentOffset?a.insertContentAt(Math.max(o.pos-2,0),{type:this.name,attrs:{"data-type":e,color:t}}):a.insertContent({type:this.name,attrs:{"data-type":e,color:t}}),a.command((({tr:e,dispatch:t})=>{var n;if(t){const{$to:t}=e.selection,r=t.end();if(t.nodeAfter)t.nodeAfter.isTextblock?e.setSelection(BY.create(e.doc,t.pos+1)):t.nodeAfter.isBlock?e.setSelection(VY.create(e.doc,t.pos)):e.setSelection(BY.create(e.doc,t.pos));else{const o=null===(n=t.parent.type.contentMatch.defaultType)||void 0===n?void 0:n.create();o&&(e.insert(r,o),e.setSelection(BY.create(e.doc,r+1)))}e.scrollIntoView()}return!0})).run()}}},addInputRules(){return[r1({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),Aee={class:"node-container hover-shadow select-outline iframe"},Mee=["src"],Iee={__name:"node-view",props:u2,setup(e){const n=t.ref(null);let r=t.ref(!1),o=t.ref(0);t.onMounted((()=>{const t=n.value.$el.offsetWidth;o.value=t,null===e.node.attrs.width&&e.updateAttributes({width:t})}));const a=({width:t,height:n})=>{e.updateAttributes({width:t,height:n})};return gN(n,(()=>r.value=!1)),(e,i)=>(t.openBlock(),t.createBlock(t.unref(s2),{ref_key:"containerRef",ref:n,class:"node-view iframe-node-view",style:t.normalizeStyle({"justify-content":e.node.attrs.nodeAlign})},{default:t.withCtx((()=>[t.createElementVNode("div",Aee,[t.createVNode(t.unref(S8),{selected:t.unref(r),rotatable:!1,width:e.node.attrs.width,height:e.node.attrs.height,"min-width":400,"min-height":100,"max-width":t.unref(o),onResize:a,onClick:i[0]||(i[0]=e=>t.isRef(r)?r.value=!0:r=!0)},{default:t.withCtx((()=>[t.createElementVNode("iframe",{src:e.node.attrs.src},null,8,Mee)])),_:1},8,["selected","width","height","max-width"])])])),_:1},8,["style"]))}},Pee=s1.create({name:"iframe",inline:!1,group:"block",atom:!0,addAttributes:()=>({src:{default:null},width:{default:null},height:{default:300}}),parseHTML:()=>[{tag:"iframe"}],renderHTML({HTMLAttributes:e}){return["iframe",GQ(this.options.HTMLAttributes,e)]},addNodeView:()=>p2(Iee),addCommands(){return{setIframe:e=>({commands:t})=>t.insertContent({type:this.name,attrs:e})}}}),Lee=e=>{const{regex:t,katexOptions:r={},editor:o,shouldRender:a}=e;return new ZY({key:new eX("mathematics"),state:{init:()=>VJ.empty,apply(e,i,l,s){const{selection:c}=s,u=[];return s.doc.descendants(((e,i)=>{const l=a(s,i,e);if(e.isText&&e.text&&l){let a;for(;a=t.exec(e.text);){const e=i+a.index,t=e+a[0].length,l=a[1];if(l){const a=c.$from.pos-c.$to.pos,i=c.$anchor.pos>=e&&c.$anchor.pos<=t,s=c.$from.pos>=e&&c.$to.pos<=t,d=0===a&&i||s;d&&o.isEditable||u.push(RJ.widget(e,(()=>{const e=document.createElement("span");e.classList.add("Tiptap-mathematics-render"),o.isEditable&&e.classList.add("Tiptap-mathematics-render--editable");try{n.render(l,e,r)}catch(t){e.innerHTML=l}return e}))),u.push(RJ.inline(e,t,{class:d&&o.isEditable?"Tiptap-mathematics-editor":"Tiptap-mathematics-editor Tiptap-mathematics-editor--hidden",style:d&&o.isEditable?void 0:"display: inline-block; height: 0; opacity: 0; overflow: hidden; position: absolute; width: 0;"}))}}}})),u.length>0?VJ.create(s.doc,u):VJ.empty}},props:{decorations(e){return this.getState(e)}}})},Ree=(e,t)=>!("codeBlock"===e.doc.resolve(t).parent.type.name),Bee=p0.create({name:"Mathematics",addOptions:()=>({regex:/\$([^\$]*)\$/gi,katexOptions:void 0,shouldRender:Ree}),addProseMirrorPlugins(){return[Lee({...this.options,editor:this.editor})]}});var Dee,Vee;if("undefined"!=typeof WeakMap){let e=new WeakMap;Dee=t=>e.get(t),Vee=(t,n)=>(e.set(t,n),n)}else{const e=[],t=10;let n=0;Dee=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},Vee=(r,o)=>(n==t&&(n=0),e[n++]=r,e[n++]=o)}var jee=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){const n=this.map[t];if(n!=e)continue;const r=t%this.width,o=t/this.width|0;let a=r+1,i=o+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;i<this.height&&this.map[t+this.width*e]==n;e++)i++;return{left:r,top:o,right:a,bottom:i}}throw new RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw new RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){const{left:r,right:o,top:a,bottom:i}=this.findCell(e);return"horiz"==t?(n<0?0==r:o==this.width)?null:this.map[a*this.width+(n<0?r-1:o)]:(n<0?0==a:i==this.height)?null:this.map[r+this.width*(n<0?a-1:i)]}rectBetween(e,t){const{left:n,right:r,top:o,bottom:a}=this.findCell(e),{left:i,right:l,top:s,bottom:c}=this.findCell(t);return{left:Math.min(n,i),top:Math.min(o,s),right:Math.max(r,l),bottom:Math.max(a,c)}}cellsInRect(e){const t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let o=e.left;o<e.right;o++){const a=r*this.width+o,i=this.map[a];n[i]||(n[i]=!0,o==e.left&&o&&this.map[a-1]==i||r==e.top&&r&&this.map[a-this.width]==i||t.push(i))}return t}positionAt(e,t,n){for(let r=0,o=0;;r++){const a=o+n.child(r).nodeSize;if(r==e){let n=t+e*this.width;const r=(e+1)*this.width;for(;n<r&&this.map[n]<o;)n++;return n==r?a-1:this.map[n]}o=a}}static get(e){return Dee(e)||Vee(e,function(e){if("table"!=e.type.spec.tableRole)throw new RangeError("Not a table node: "+e.type.name);const t=function(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){const o=e.child(r);let a=0;if(n)for(let t=0;t<r;t++){const n=e.child(t);for(let e=0;e<n.childCount;e++){const o=n.child(e);t+o.attrs.rowspan>r&&(a+=o.attrs.colspan)}}for(let e=0;e<o.childCount;e++){const t=o.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}-1==t?t=a:t!=a&&(t=Math.max(t,a))}return t}(e),n=e.childCount,r=[];let o=0,a=null;const i=[];for(let c=0,u=t*n;c<u;c++)r[c]=0;for(let c=0,u=0;c<n;c++){const l=e.child(c);u++;for(let e=0;;e++){for(;o<r.length&&0!=r[o];)o++;if(e==l.childCount)break;const s=l.child(e),{colspan:d,rowspan:p,colwidth:f}=s.attrs;for(let e=0;e<p;e++){if(e+c>=n){(a||(a=[])).push({type:"overlong_rowspan",pos:u,n:p-e});break}const l=o+e*t;for(let e=0;e<d;e++){0==r[l+e]?r[l+e]=u:(a||(a=[])).push({type:"collision",row:c,pos:u,n:d-e});const n=f&&f[e];if(n){const r=(l+e)%t*2,o=i[r];null==o||o!=n&&1==i[r+1]?(i[r]=n,i[r+1]=1):o==n&&i[r+1]++}}}o+=d,u+=s.nodeSize}const s=(c+1)*t;let d=0;for(;o<s;)0==r[o++]&&d++;d&&(a||(a=[])).push({type:"missing",row:c,n:d}),u++}const l=new jee(t,n,r,a);let s=!1;for(let c=0;!s&&c<i.length;c+=2)null!=i[c]&&i[c+1]<n&&(s=!0);s&&function(e,t,n){e.problems||(e.problems=[]);const r={};for(let o=0;o<e.map.length;o++){const a=e.map[o];if(r[a])continue;r[a]=!0;const i=n.nodeAt(a);if(!i)throw new RangeError(`No cell with offset ${a} found`);let l=null;const s=i.attrs;for(let n=0;n<s.colspan;n++){const r=t[2*((o+n)%e.width)];null==r||s.colwidth&&s.colwidth[n]==r||((l||(l=Fee(s)))[n]=r)}l&&e.problems.unshift({type:"colwidth mismatch",pos:a,colwidth:l})}}(l,i,e);return l}(e))}};function Fee(e){if(e.colwidth)return e.colwidth.slice();const t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function zee(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(const n in e.nodes){const r=e.nodes[n],o=r.spec.tableRole;o&&(t[o]=r)}}return t}var $ee=new eX("selectingCells");function Hee(e){for(let t=e.depth-1;t>0;t--)if("row"==e.node(t).type.spec.tableRole)return e.node(0).resolve(e.before(t+1));return null}function Uee(e){const t=e.selection.$head;for(let n=t.depth;n>0;n--)if("row"==t.node(n).type.spec.tableRole)return!0;return!1}function Wee(e){const t=e.selection;if("$anchorCell"in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if("node"in t&&t.node&&"cell"==t.node.type.spec.tableRole)return t.$anchor;const n=Hee(t.$head)||function(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){const r=t.type.spec.tableRole;if("cell"==r||"header_cell"==r)return e.doc.resolve(n-t.nodeSize)}}(t.$head);if(n)return n;throw new RangeError(`No cell found around position ${t.head}`)}function Gee(e){return"row"==e.parent.type.spec.tableRole&&!!e.nodeAfter}function Kee(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function qee(e,t,n){const r=e.node(-1),o=jee.get(r),a=e.start(-1),i=o.nextCell(e.pos-a,t,n);return null==i?null:e.node(0).resolve(a+i)}function Yee(e,t,n=1){const r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some((e=>e>0))||(r.colwidth=null)),r}function Xee(e,t,n=1){const r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}var Zee=class e extends IY{constructor(e,t=e){const n=e.node(-1),r=jee.get(n),o=e.start(-1),a=r.rectBetween(e.pos-o,t.pos-o),i=e.node(0),l=r.cellsInRect(a).filter((e=>e!=t.pos-o));l.unshift(t.pos-o);const s=l.map((e=>{const t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);const r=o+e+1;return new PY(i.resolve(r),i.resolve(r+t.content.size))}));super(s[0].$from,s[0].$to,s),this.$anchorCell=e,this.$headCell=t}map(t,n){const r=t.resolve(n.map(this.$anchorCell.pos)),o=t.resolve(n.map(this.$headCell.pos));if(Gee(r)&&Gee(o)&&Kee(r,o)){const t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,o):t&&this.isColSelection()?e.colSelection(r,o):new e(r,o)}return BY.between(r,o)}content(){const e=this.$anchorCell.node(-1),t=jee.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),o={},a=[];for(let l=r.top;l<r.bottom;l++){const n=[];for(let a=l*t.width+r.left,i=r.left;i<r.right;i++,a++){const i=t.map[a];if(o[i])continue;o[i]=!0;const l=t.findCell(i);let s=e.nodeAt(i);if(!s)throw RangeError(`No cell with offset ${i} found`);const c=r.left-l.left,u=l.right-r.right;if(c>0||u>0){let e=s.attrs;if(c>0&&(e=Yee(e,0,c)),u>0&&(e=Yee(e,e.colspan-u,u)),l.left<r.left){if(s=s.type.createAndFill(e),!s)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else s=s.type.create(e,s.content)}if(l.top<r.top||l.bottom>r.bottom){const e={...s.attrs,rowspan:Math.min(l.bottom,r.bottom)-Math.max(l.top,r.top)};s=l.top<r.top?s.type.createAndFill(e):s.type.create(e,s.content)}n.push(s)}a.push(e.child(l).copy(VK.from(n)))}const i=this.isColSelection()&&this.isRowSelection()?e:a;return new UK(VK.from(i),1,1)}replace(e,t=UK.empty){const n=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){const{$from:o,$to:i}=r[a],l=e.mapping.slice(n);e.replace(l.map(o.pos),l.map(i.pos),a?UK.empty:t)}const o=IY.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,t){this.replace(e,new UK(VK.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),n=jee.get(t),r=this.$anchorCell.start(-1),o=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let a=0;a<o.length;a++)e(t.nodeAt(o[a]),r+o[a])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){const r=t.node(-1),o=jee.get(r),a=t.start(-1),i=o.findCell(t.pos-a),l=o.findCell(n.pos-a),s=t.node(0);return i.top<=l.top?(i.top>0&&(t=s.resolve(a+o.map[i.left])),l.bottom<o.height&&(n=s.resolve(a+o.map[o.width*(o.height-1)+l.right-1]))):(l.top>0&&(n=s.resolve(a+o.map[l.left])),i.bottom<o.height&&(t=s.resolve(a+o.map[o.width*(o.height-1)+i.right-1]))),new e(t,n)}isRowSelection(){const e=this.$anchorCell.node(-1),t=jee.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),o=t.colCount(this.$headCell.pos-n);if(Math.min(r,o)>0)return!1;const a=r+this.$anchorCell.nodeAfter.attrs.colspan,i=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,i)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){const r=t.node(-1),o=jee.get(r),a=t.start(-1),i=o.findCell(t.pos-a),l=o.findCell(n.pos-a),s=t.node(0);return i.left<=l.left?(i.left>0&&(t=s.resolve(a+o.map[i.top*o.width])),l.right<o.width&&(n=s.resolve(a+o.map[o.width*(l.top+1)-1]))):(l.left>0&&(n=s.resolve(a+o.map[l.top*o.width])),i.right<o.width&&(t=s.resolve(a+o.map[o.width*(i.top+1)-1]))),new e(t,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new Jee(this.$anchorCell.pos,this.$headCell.pos)}};Zee.prototype.visible=!1,IY.jsonID("cell",Zee);var Jee=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){const t=e.resolve(this.anchor),n=e.resolve(this.head);return"row"==t.parent.type.spec.tableRole&&"row"==n.parent.type.spec.tableRole&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&Kee(t,n)?new Zee(t,n):IY.near(n,1)}};function Qee(e){if(!(e.selection instanceof Zee))return null;const t=[];return e.selection.forEachCell(((e,n)=>{t.push(RJ.node(n,n+e.nodeSize,{class:"selectedCell"}))})),VJ.create(e.doc,t)}var ete=new eX("fix-tables");function tte(e,t,n,r){const o=e.childCount,a=t.childCount;e:for(let i=0,l=0;i<a;i++){const a=t.child(i);for(let t=l,r=Math.min(o,i+3);t<r;t++)if(e.child(t)==a){l=t+1,n+=a.nodeSize;continue e}r(a,n),l<o&&e.child(l).sameMarkup(a)?tte(e.child(l),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function nte(e,t){let n;const r=(t,r)=>{"table"==t.type.spec.tableRole&&(n=function(e,t,n,r){const o=jee.get(t);if(!o.problems)return r;r||(r=e.tr);const a=[];for(let s=0;s<o.height;s++)a.push(0);for(let s=0;s<o.problems.length;s++){const e=o.problems[s];if("collision"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;const i=o.attrs;for(let t=0;t<i.rowspan;t++)a[e.row+t]+=e.n;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,Yee(i,i.colspan-e.n,e.n))}else if("missing"==e.type)a[e.row]+=e.n;else if("overlong_rowspan"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,rowspan:o.attrs.rowspan-e.n})}else if("colwidth mismatch"==e.type){const o=t.nodeAt(e.pos);if(!o)continue;r.setNodeMarkup(r.mapping.map(n+1+e.pos),null,{...o.attrs,colwidth:e.colwidth})}}let i,l;for(let s=0;s<a.length;s++)a[s]&&(null==i&&(i=s),l=s);for(let s=0,c=n+1;s<o.height;s++){const n=t.child(s),o=c+n.nodeSize,u=a[s];if(u>0){let t="cell";n.firstChild&&(t=n.firstChild.type.spec.tableRole);const a=[];for(let n=0;n<u;n++){const n=zee(e.schema)[t].createAndFill();n&&a.push(n)}const d=0!=s&&i!=s-1||l!=s?o-1:c+1;r.insert(r.mapping.map(d),a)}c=o}return r.setMeta(ete,{fixTables:!0})}(e,t,r,n))};return t?t.doc!=e.doc&&tte(t.doc,e.doc,0,r):e.doc.descendants(r),n}function rte(e){if(!e.size)return null;let{content:t,openStart:n,openEnd:r}=e;for(;1==t.childCount&&(n>0&&r>0||"table"==t.child(0).type.spec.tableRole);)n--,r--,t=t.child(0).content;const o=t.child(0),a=o.type.spec.tableRole,i=o.type.schema,l=[];if("row"==a)for(let s=0;s<t.childCount;s++){let e=t.child(s).content;const o=s?0:Math.max(0,n-1),a=s<t.childCount-1?0:Math.max(0,r-1);(o||a)&&(e=ote(zee(i).row,new UK(e,o,a)).content),l.push(e)}else{if("cell"!=a&&"header_cell"!=a)return null;l.push(n||r?ote(zee(i).row,new UK(t,n,r)).content:t)}return function(e,t){const n=[];for(let o=0;o<t.length;o++){const e=t[o];for(let t=e.childCount-1;t>=0;t--){const{rowspan:r,colspan:a}=e.child(t).attrs;for(let e=o;e<o+r;e++)n[e]=(n[e]||0)+a}}let r=0;for(let o=0;o<n.length;o++)r=Math.max(r,n[o]);for(let o=0;o<n.length;o++)if(o>=t.length&&t.push(VK.empty),n[o]<r){const a=zee(e).cell.createAndFill(),i=[];for(let e=n[o];e<r;e++)i.push(a);t[o]=t[o].append(VK.from(i))}return{height:t.length,width:r,rows:t}}(i,l)}function ote(e,t){const n=e.createAndFill();return new AY(n).replace(0,n.content.size,t).doc}function ate(e,t,n,r,o,a,i,l){if(0==i||i==t.height)return!1;let s=!1;for(let c=o;c<a;c++){const o=i*t.width+c,a=t.map[o];if(t.map[o-t.width]==a){s=!0;const o=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(l).map(a+r),null,{...o.attrs,rowspan:i-u}),e.insert(e.mapping.slice(l).map(t.positionAt(i,d,n)),o.type.createAndFill({...o.attrs,rowspan:u+o.attrs.rowspan-i})),c+=o.attrs.colspan-1}}return s}function ite(e,t,n,r,o,a,i,l){if(0==i||i==t.width)return!1;let s=!1;for(let c=o;c<a;c++){const o=c*t.width+i,a=t.map[o];if(t.map[o-1]==a){s=!0;const o=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(l).map(a+r);e.setNodeMarkup(d,null,Yee(o.attrs,i-u,o.attrs.colspan-(i-u))),e.insert(d+o.nodeSize,o.type.createAndFill(Yee(o.attrs,0,i-u))),c+=o.attrs.rowspan-1}}return s}function lte(e,t,n,r,o){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw new Error("No table found");let i=jee.get(a);const{top:l,left:s}=r,c=s+o.width,u=l+o.height,d=e.tr;let p=0;function f(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw new Error("No table found");i=jee.get(a),p=d.mapping.maps.length}(function(e,t,n,r,o,a,i){const l=zee(e.doc.type.schema);let s,c;if(o>t.width)for(let u=0,d=0;u<t.height;u++){const a=n.child(u);d+=a.nodeSize;const p=[];let f;f=null==a.lastChild||a.lastChild.type==l.cell?s||(s=l.cell.createAndFill()):c||(c=l.header_cell.createAndFill());for(let e=t.width;e<o;e++)p.push(f);e.insert(e.mapping.slice(i).map(d-1+r),p)}if(a>t.height){const u=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,o);e++){const o=!(e>=t.width)&&n.nodeAt(t.map[r+e]).type==l.header_cell;u.push(o?c||(c=l.header_cell.createAndFill()):s||(s=l.cell.createAndFill()))}const d=l.row.create(null,VK.from(u)),p=[];for(let e=t.height;e<a;e++)p.push(d);e.insert(e.mapping.slice(i).map(r+n.nodeSize-2),p)}return!(!s&&!c)})(d,i,a,n,c,u,p)&&f(),ate(d,i,a,n,s,c,l,p)&&f(),ate(d,i,a,n,s,c,u,p)&&f(),ite(d,i,a,n,l,u,s,p)&&f(),ite(d,i,a,n,l,u,c,p)&&f();for(let h=l;h<u;h++){const e=i.positionAt(h,s,a),t=i.positionAt(h,c,a);d.replace(d.mapping.slice(p).map(e+n),d.mapping.slice(p).map(t+n),new UK(o.rows[h-l],0,0))}f(),d.setSelection(new Zee(d.doc.resolve(n+i.positionAt(l,s,a)),d.doc.resolve(n+i.positionAt(u-1,c-1,a)))),t(d)}var ste=CQ({ArrowLeft:ute("horiz",-1),ArrowRight:ute("horiz",1),ArrowUp:ute("vert",-1),ArrowDown:ute("vert",1),"Shift-ArrowLeft":dte("horiz",-1),"Shift-ArrowRight":dte("horiz",1),"Shift-ArrowUp":dte("vert",-1),"Shift-ArrowDown":dte("vert",1),Backspace:pte,"Mod-Backspace":pte,Delete:pte,"Mod-Delete":pte});function cte(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function ute(e,t){return(n,r,o)=>{if(!o)return!1;const a=n.selection;if(a instanceof Zee)return cte(n,r,IY.near(a.$headCell,t));if("horiz"!=e&&!a.empty)return!1;const i=vte(o,e,t);if(null==i)return!1;if("horiz"==e)return cte(n,r,IY.near(n.doc.resolve(a.head+t),t));{const o=n.doc.resolve(i),a=qee(o,e,t);let l;return l=a?IY.near(a,1):t<0?IY.near(n.doc.resolve(o.before(-1)),-1):IY.near(n.doc.resolve(o.after(-1)),1),cte(n,r,l)}}}function dte(e,t){return(n,r,o)=>{if(!o)return!1;const a=n.selection;let i;if(a instanceof Zee)i=a;else{const r=vte(o,e,t);if(null==r)return!1;i=new Zee(n.doc.resolve(r))}const l=qee(i.$headCell,e,t);return!!l&&cte(n,r,new Zee(i.$anchorCell,l))}}function pte(e,t){const n=e.selection;if(!(n instanceof Zee))return!1;if(t){const r=e.tr,o=zee(e.schema).cell.createAndFill().content;n.forEachCell(((e,t)=>{e.content.eq(o)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new UK(o,0,0))})),r.docChanged&&t(r)}return!0}function fte(e,t){const n=Hee(e.state.doc.resolve(t));return!!n&&(e.dispatch(e.state.tr.setSelection(new Zee(n))),!0)}function hte(e,t,n){if(!Uee(e.state))return!1;let r=rte(n);const o=e.state.selection;if(o instanceof Zee){r||(r={width:1,height:1,rows:[VK.from(ote(zee(e.state.schema).cell,n))]});const t=o.$anchorCell.node(-1),a=o.$anchorCell.start(-1),i=jee.get(t).rectBetween(o.$anchorCell.pos-a,o.$headCell.pos-a);return r=function({width:e,height:t,rows:n},r,o){if(e!=r){const t=[],o=[];for(let e=0;e<n.length;e++){const a=n[e],i=[];for(let n=t[e]||0,o=0;n<r;o++){let l=a.child(o%a.childCount);n+l.attrs.colspan>r&&(l=l.type.createChecked(Yee(l.attrs,l.attrs.colspan,n+l.attrs.colspan-r),l.content)),i.push(l),n+=l.attrs.colspan;for(let n=1;n<l.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+l.attrs.colspan}o.push(VK.from(i))}n=o,e=r}if(t!=o){const e=[];for(let r=0,a=0;r<o;r++,a++){const i=[],l=n[a%t];for(let e=0;e<l.childCount;e++){let t=l.child(e);r+t.attrs.rowspan>o&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,o-t.attrs.rowspan)},t.content)),i.push(t)}e.push(VK.from(i))}n=e,t=o}return{width:e,height:t,rows:n}}(r,i.right-i.left,i.bottom-i.top),lte(e.state,e.dispatch,a,i,r),!0}if(r){const t=Wee(e.state),n=t.start(-1);return lte(e.state,e.dispatch,n,jee.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function mte(e,t){var n;if(t.ctrlKey||t.metaKey)return;const r=gte(e,t.target);let o;if(t.shiftKey&&e.state.selection instanceof Zee)a(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&r&&null!=(o=Hee(e.state.selection.$anchor))&&(null==(n=bte(e,t))?void 0:n.pos)!=o.pos)a(o,t),t.preventDefault();else if(!r)return;function a(t,n){let r=bte(e,n);const o=null==$ee.getState(e.state);if(!r||!Kee(t,r)){if(!o)return;r=t}const a=new Zee(t,r);if(o||!e.state.selection.eq(a)){const n=e.state.tr.setSelection(a);o&&n.setMeta($ee,t.pos),e.dispatch(n)}}function i(){e.root.removeEventListener("mouseup",i),e.root.removeEventListener("dragstart",i),e.root.removeEventListener("mousemove",l),null!=$ee.getState(e.state)&&e.dispatch(e.state.tr.setMeta($ee,-1))}function l(n){const o=n,l=$ee.getState(e.state);let s;if(null!=l)s=e.state.doc.resolve(l);else if(gte(e,o.target)!=r&&(s=bte(e,t),!s))return i();s&&a(s,o)}e.root.addEventListener("mouseup",i),e.root.addEventListener("dragstart",i),e.root.addEventListener("mousemove",l)}function vte(e,t,n){if(!(e.state.selection instanceof BY))return null;const{$head:r}=e.state.selection;for(let o=r.depth-1;o>=0;o--){const a=r.node(o);if((n<0?r.index(o):r.indexAfter(o))!=(n<0?0:a.childCount))return null;if("cell"==a.type.spec.tableRole||"header_cell"==a.type.spec.tableRole){const a=r.before(o),i="vert"==t?n>0?"down":"up":n>0?"right":"left";return e.endOfTextblock(i)?a:null}}return null}function gte(e,t){for(;t&&t!=e.dom;t=t.parentNode)if("TD"==t.nodeName||"TH"==t.nodeName)return t;return null}function bte(e,t){const n=e.posAtCoords({left:t.clientX,top:t.clientY});return n&&n?Hee(e.state.doc.resolve(n.pos)):null}var yte=class{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),wte(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type==this.node.type&&(this.node=e,wte(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"==e.type&&(e.target==this.table||this.colgroup.contains(e.target))}};function wte(e,t,n,r,o,a){var i;let l=0,s=!0,c=t.firstChild;const u=e.firstChild;if(u){for(let e=0,n=0;e<u.childCount;e++){const{colspan:i,colwidth:d}=u.child(e).attrs;for(let e=0;e<i;e++,n++){const i=o==n?a:d&&d[e],u=i?i+"px":"";l+=i||r,i||(s=!1),c?(c.style.width!=u&&(c.style.width=u),c=c.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;c;){const e=c.nextSibling;null==(i=c.parentNode)||i.removeChild(c),c=e}s?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var kte=new eX("tableColumnResizing");function xte({handleWidth:e=5,cellMinWidth:t=25,View:n=yte,lastColumnResizable:r=!0}={}){const o=new ZY({key:kte,state:{init:(e,r)=>(o.spec.props.nodeViews[zee(r.schema).table.name]=(e,r)=>new n(e,t,r),new Ete(-1,!1)),apply:(e,t)=>t.apply(e)},props:{attributes:e=>{const t=kte.getState(e);return t&&t.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(t,n)=>{!function(e,t,n,r,o){const a=kte.getState(e.state);if(!a)return;if(!a.dragging){const r=function(e){for(;e&&"TD"!=e.nodeName&&"TH"!=e.nodeName;)e=e.classList&&e.classList.contains("ProseMirror")?null:e.parentNode;return e}(t.target);let i=-1;if(r){const{left:o,right:a}=r.getBoundingClientRect();t.clientX-o<=n?i=Cte(e,t,"left",n):a-t.clientX<=n&&(i=Cte(e,t,"right",n))}if(i!=a.activeHandle){if(!o&&-1!==i){const t=e.state.doc.resolve(i),n=t.node(-1),r=jee.get(n),o=t.start(-1);if(r.colCount(t.pos-o)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Ote(e,i)}}}(t,n,e,0,r)},mouseleave:e=>{!function(e){const t=kte.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Ote(e,-1)}(e)},mousedown:(e,n)=>{!function(e,t,n){var r;const o=null!=(r=e.dom.ownerDocument.defaultView)?r:window,a=kte.getState(e.state);if(!a||-1==a.activeHandle||a.dragging)return!1;const i=e.state.doc.nodeAt(a.activeHandle),l=function(e,t,{colspan:n,colwidth:r}){const o=r&&r[r.length-1];if(o)return o;const a=e.domAtPos(t);let i=a.node.childNodes[a.offset].offsetWidth,l=n;if(r)for(let s=0;s<n;s++)r[s]&&(i-=r[s],l--);return i/l}(e,a.activeHandle,i.attrs);function s(t){o.removeEventListener("mouseup",s),o.removeEventListener("mousemove",c);const r=kte.getState(e.state);(null==r?void 0:r.dragging)&&(!function(e,t,n){const r=e.state.doc.resolve(t),o=r.node(-1),a=jee.get(o),i=r.start(-1),l=a.colCount(r.pos-i)+r.nodeAfter.attrs.colspan-1,s=e.state.tr;for(let c=0;c<a.height;c++){const e=c*a.width+l;if(c&&a.map[e]==a.map[e-a.width])continue;const t=a.map[e],r=o.nodeAt(t).attrs,u=1==r.colspan?0:l-a.colCount(t);if(r.colwidth&&r.colwidth[u]==n)continue;const d=r.colwidth?r.colwidth.slice():_te(r.colspan);d[u]=n,s.setNodeMarkup(i+t,null,{...r,colwidth:d})}s.docChanged&&e.dispatch(s)}(e,r.activeHandle,Ste(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(kte,{setDragging:null})))}function c(t){if(!t.which)return s(t);const r=kte.getState(e.state);if(r&&r.dragging){const o=Ste(r.dragging,t,n);!function(e,t,n,r){const o=e.state.doc.resolve(t),a=o.node(-1),i=o.start(-1),l=jee.get(a).colCount(o.pos-i)+o.nodeAfter.attrs.colspan-1;let s=e.domAtPos(o.start(-1)).node;for(;s&&"TABLE"!=s.nodeName;)s=s.parentNode;if(!s)return;wte(a,s.firstChild,s,r,l,n)}(e,r.activeHandle,o,n)}}e.dispatch(e.state.tr.setMeta(kte,{setDragging:{startX:t.clientX,startWidth:l}})),o.addEventListener("mouseup",s),o.addEventListener("mousemove",c),t.preventDefault()}(e,n,t)}},decorations:e=>{const t=kte.getState(e);if(t&&t.activeHandle>-1)return function(e,t){const n=[],r=e.doc.resolve(t),o=r.node(-1);if(!o)return VJ.empty;const a=jee.get(o),i=r.start(-1),l=a.colCount(r.pos-i)+r.nodeAfter.attrs.colspan;for(let s=0;s<a.height;s++){const e=l+s*a.width-1;if(!(l!=a.width&&a.map[e]==a.map[e+1]||0!=s&&a.map[e]==a.map[e-a.width])){const t=a.map[e],r=i+t+o.nodeAt(t).nodeSize-1,l=document.createElement("div");l.className="column-resize-handle",n.push(RJ.widget(r,l))}}return VJ.create(e.doc,n)}(e,t.activeHandle)},nodeViews:{}}});return o}var Ete=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){const n=this,r=t.getMeta(kte);if(r&&null!=r.setHandle)return new e(r.setHandle,!1);if(r&&void 0!==r.setDragging)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return Gee(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function Cte(e,t,n,r){const o="right"==n?-r:r,a=e.posAtCoords({left:t.clientX+o,top:t.clientY});if(!a)return-1;const{pos:i}=a,l=Hee(e.state.doc.resolve(i));if(!l)return-1;if("right"==n)return l.pos;const s=jee.get(l.node(-1)),c=l.start(-1),u=s.map.indexOf(l.pos-c);return u%s.width==0?-1:c+s.map[u-1]}function Ste(e,t,n){const r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Ote(e,t){e.dispatch(e.state.tr.setMeta(kte,{setHandle:t}))}function _te(e){return Array(e).fill(0)}function Nte(e){const t=e.selection,n=Wee(e),r=n.node(-1),o=n.start(-1),a=jee.get(r);return{...t instanceof Zee?a.rectBetween(t.$anchorCell.pos-o,t.$headCell.pos-o):a.findCell(n.pos-o),tableStart:o,map:a,table:r}}function Tte(e,{map:t,tableStart:n,table:r},o){let a=o>0?-1:0;(function(e,t,n){const r=zee(t.type.schema).header_cell;for(let o=0;o<e.height;o++)if(t.nodeAt(e.map[n+o*e.width]).type!=r)return!1;return!0})(t,r,o+a)&&(a=0==o||o==t.width?null:0);for(let i=0;i<t.height;i++){const l=i*t.width+o;if(o>0&&o<t.width&&t.map[l-1]==t.map[l]){const a=t.map[l],s=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,Xee(s.attrs,o-t.colCount(a))),i+=s.attrs.rowspan-1}else{const s=null==a?zee(r.type.schema).cell:r.nodeAt(t.map[l+a]).type,c=t.positionAt(i,o,r);e.insert(e.mapping.map(n+c),s.createAndFill())}}return e}function Ate(e,{map:t,table:n,tableStart:r},o){const a=e.mapping.maps.length;for(let i=0;i<t.height;){const l=i*t.width+o,s=t.map[l],c=n.nodeAt(s),u=c.attrs;if(o>0&&t.map[l-1]==s||o<t.width-1&&t.map[l+1]==s)e.setNodeMarkup(e.mapping.slice(a).map(r+s),null,Yee(u,o-t.colCount(s)));else{const t=e.mapping.slice(a).map(r+s);e.delete(t,t+c.nodeSize)}i+=u.rowspan}}function Mte(e,{map:t,tableStart:n,table:r},o){var a;let i=n;for(let c=0;c<o;c++)i+=r.child(c).nodeSize;const l=[];let s=o>0?-1:0;(function(e,t,n){var r;const o=zee(t.type.schema).header_cell;for(let a=0;a<e.width;a++)if((null==(r=t.nodeAt(e.map[a+n*e.width]))?void 0:r.type)!=o)return!1;return!0})(t,r,o+s)&&(s=0==o||o==t.height?null:0);for(let c=0,u=t.width*o;c<t.width;c++,u++)if(o>0&&o<t.height&&t.map[u]==t.map[u-t.width]){const o=t.map[u],a=r.nodeAt(o).attrs;e.setNodeMarkup(n+o,null,{...a,rowspan:a.rowspan+1}),c+=a.colspan-1}else{const e=null==s?zee(r.type.schema).cell:null==(a=r.nodeAt(t.map[u+s*t.width]))?void 0:a.type,n=null==e?void 0:e.createAndFill();n&&l.push(n)}return e.insert(i,zee(r.type.schema).row.create(null,l)),e}function Ite(e,{map:t,table:n,tableStart:r},o){let a=0;for(let c=0;c<o;c++)a+=n.child(c).nodeSize;const i=a+n.child(o).nodeSize,l=e.mapping.maps.length;e.delete(a+r,i+r);const s=new Set;for(let c=0,u=o*t.width;c<t.width;c++,u++){const a=t.map[u];if(!s.has(a))if(s.add(a),o>0&&a==t.map[u-t.width]){const t=n.nodeAt(a).attrs;e.setNodeMarkup(e.mapping.slice(l).map(a+r),null,{...t,rowspan:t.rowspan-1}),c+=t.colspan-1}else if(o<t.height&&a==t.map[u+t.width]){const i=n.nodeAt(a),s=i.attrs,u=i.type.create({...s,rowspan:i.attrs.rowspan-1},i.content),d=t.positionAt(o+1,c,n);e.insert(e.mapping.slice(l).map(r+d),u),c+=s.colspan-1}}}function Pte(e){const t=e.content;return 1==t.childCount&&t.child(0).isTextblock&&0==t.child(0).childCount}function Lte(e,t){const n=e.selection;if(!(n instanceof Zee)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=Nte(e),{map:o}=r;if(function({width:e,height:t,map:n},r){let o=r.top*e+r.left,a=o,i=(r.bottom-1)*e+r.left,l=o+(r.right-r.left-1);for(let s=r.top;s<r.bottom;s++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[l]==n[l+1])return!0;a+=e,l+=e}for(let s=r.left;s<r.right;s++){if(r.top>0&&n[o]==n[o-e]||r.bottom<t&&n[i]==n[i+e])return!0;o++,i++}return!1}(o,r))return!1;if(t){const n=e.tr,a={};let i,l,s=VK.empty;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){const c=o.map[e*o.width+t],u=r.table.nodeAt(c);if(!a[c]&&u)if(a[c]=!0,null==i)i=c,l=u;else{Pte(u)||(s=s.append(u.content));const e=n.mapping.map(c+r.tableStart);n.delete(e,e+u.nodeSize)}}if(null==i||null==l)return!0;if(n.setNodeMarkup(i+r.tableStart,null,{...Xee(l.attrs,l.attrs.colspan,r.right-r.left-l.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const e=i+1+l.content.size,t=Pte(l)?i+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,s)}n.setSelection(new Zee(n.doc.resolve(i+r.tableStart))),t(n)}return!0}function Rte(e,t){const n=zee(e.schema);return(r=({node:e})=>n[e.type.spec.tableRole],(e,t)=>{var n;const o=e.selection;let a,i;if(o instanceof Zee){if(o.$anchorCell.pos!=o.$headCell.pos)return!1;a=o.$anchorCell.nodeAfter,i=o.$anchorCell.pos}else{if(a=function(e){for(let t=e.depth;t>0;t--){const n=e.node(t).type.spec.tableRole;if("cell"===n||"header_cell"===n)return e.node(t)}return null}(o.$from),!a)return!1;i=null==(n=Hee(o.$from))?void 0:n.pos}if(null==a||null==i)return!1;if(1==a.attrs.colspan&&1==a.attrs.rowspan)return!1;if(t){let n=a.attrs;const l=[],s=n.colwidth;n.rowspan>1&&(n={...n,rowspan:1}),n.colspan>1&&(n={...n,colspan:1});const c=Nte(e),u=e.tr;for(let e=0;e<c.right-c.left;e++)l.push(s?{...n,colwidth:s&&s[e]?[s[e]]:null}:n);let d;for(let e=c.top;e<c.bottom;e++){let t=c.map.positionAt(e,c.left,c.table);e==c.top&&(t+=a.nodeSize);for(let n=c.left,o=0;n<c.right;n++,o++)n==c.left&&e==c.top||u.insert(d=u.mapping.map(t+c.tableStart,1),r({node:a,row:e,col:n}).createAndFill(l[o]))}u.setNodeMarkup(i,r({node:a,row:c.top,col:c.left}),l[0]),o instanceof Zee&&u.setSelection(new Zee(u.doc.resolve(o.$anchorCell.pos),d?u.doc.resolve(d):void 0)),t(u)}return!0})(e,t);var r}function Bte(e,t,n){const r=t.map.cellsInRect({left:0,top:0,right:"row"==e?t.map.width:1,bottom:"column"==e?t.map.height:1});for(let o=0;o<r.length;o++){const e=t.table.nodeAt(r[o]);if(e&&e.type!==n.header_cell)return!1}return!0}function Dte(e,t){return(t=t||{useDeprecatedLogic:!1}).useDeprecatedLogic?function(e){return function(t,n){if(!Uee(t))return!1;if(n){const r=zee(t.schema),o=Nte(t),a=t.tr,i=o.map.cellsInRect("column"==e?{left:o.left,top:0,right:o.right,bottom:o.map.height}:"row"==e?{left:0,top:o.top,right:o.map.width,bottom:o.bottom}:o),l=i.map((e=>o.table.nodeAt(e)));for(let e=0;e<i.length;e++)l[e].type==r.header_cell&&a.setNodeMarkup(o.tableStart+i[e],r.cell,l[e].attrs);if(0==a.steps.length)for(let e=0;e<i.length;e++)a.setNodeMarkup(o.tableStart+i[e],r.header_cell,l[e].attrs);n(a)}return!0}}(e):function(t,n){if(!Uee(t))return!1;if(n){const r=zee(t.schema),o=Nte(t),a=t.tr,i=Bte("row",o,r),l=Bte("column",o,r),s=("column"===e?i:"row"===e&&l)?1:0,c="column"==e?{left:0,top:s,right:1,bottom:o.map.height}:"row"==e?{left:s,top:0,right:o.map.width,bottom:1}:o,u="column"==e?l?r.cell:r.header_cell:"row"==e?i?r.cell:r.header_cell:r.cell;o.map.cellsInRect(c).forEach((e=>{const t=e+o.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)})),n(a)}return!0}}Dte("row",{useDeprecatedLogic:!0}),Dte("column",{useDeprecatedLogic:!0});var Vte=Dte("cell",{useDeprecatedLogic:!0});function jte(e){return function(t,n){if(!Uee(t))return!1;const r=function(e,t){if(t<0){const t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let n=e.index(-1)-1,r=e.before();n>=0;n--){const t=e.node(-1).child(n),o=t.lastChild;if(o)return r-1-o.nodeSize;r-=t.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;const t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){const e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}(Wee(t),e);if(null==r)return!1;if(n){const e=t.doc.resolve(r);n(t.tr.setSelection(BY.between(e,(o=e,o.node(0).resolve(o.pos+o.nodeAfter.nodeSize)))).scrollIntoView())}var o;return!0}}function Fte({allowTableNodeSelection:e=!1}={}){return new ZY({key:$ee,state:{init:()=>null,apply(e,t){const n=e.getMeta($ee);if(null!=n)return-1==n?null:n;if(null==t||!e.docChanged)return t;const{deleted:r,pos:o}=e.mapping.mapResult(t);return r?null:o}},props:{decorations:Qee,handleDOMEvents:{mousedown:mte},createSelectionBetween:e=>null!=$ee.getState(e.state)?e.state.selection:null,handleTripleClick:fte,handleKeyDown:ste,handlePaste:hte},appendTransaction:(t,n,r)=>function(e,t,n){const r=(t||e).selection,o=(t||e).doc;let a,i;if(r instanceof VY&&(i=r.node.type.spec.tableRole)){if("cell"==i||"header_cell"==i)a=Zee.create(o,r.from);else if("row"==i){const e=o.resolve(r.from+1);a=Zee.rowSelection(e,e)}else if(!n){const e=jee.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=Zee.create(o,t+1,n)}}else r instanceof BY&&function({$from:e,$to:t}){if(e.pos==t.pos||e.pos<e.pos-6)return!1;let n=e.pos,r=t.pos,o=e.depth;for(;o>=0&&!(e.after(o+1)<e.end(o));o--,n++);for(let a=t.depth;a>=0&&!(t.before(a+1)>t.start(a));a--,r--);return n==r&&/row|table/.test(e.node(o).type.spec.tableRole)}(r)?a=BY.create(o,r.from):r instanceof BY&&function({$from:e,$to:t}){let n,r;for(let o=e.depth;o>0;o--){const t=e.node(o);if("cell"===t.type.spec.tableRole||"header_cell"===t.type.spec.tableRole){n=t;break}}for(let o=t.depth;o>0;o--){const e=t.node(o);if("cell"===e.type.spec.tableRole||"header_cell"===e.type.spec.tableRole){r=e;break}}return n!==r&&0===t.parentOffset}(r)&&(a=BY.create(o,r.$from.start(),r.$from.end()));return a&&(t||(t=e.tr)).setSelection(a),t}(r,nte(r,n),e)})}function zte(e,t,n,r,o,a){let i=0,l=!0,s=t.firstChild;const c=e.firstChild;for(let u=0,d=0;u<c.childCount;u+=1){const{colspan:e,colwidth:n}=c.child(u).attrs;for(let c=0;c<e;c+=1,d+=1){const e=o===d?a:n&&n[c],u=e?`${e}px`:"";i+=e||r,e||(l=!1),s?(s.style.width!==u&&(s.style.width=u),s=s.nextSibling):t.appendChild(document.createElement("col")).style.width=u}}for(;s;){const e=s.nextSibling;s.parentNode.removeChild(s),s=e}l?(n.style.width=`${i}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${i}px`)}class $te{constructor(e,t){this.node=e,this.cellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),zte(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type===this.node.type&&(this.node=e,zte(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return"attributes"===e.type&&(e.target===this.table||this.colgroup.contains(e.target))}}function Hte(e,t){return e.createAndFill()}function Ute(e,t,n,r,o){const a=function(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;const t={};return Object.keys(e.nodes).forEach((n=>{const r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)})),e.cached.tableNodeTypes=t,t}(e),i=[],l=[];for(let c=0;c<n;c+=1){const e=Hte(a.cell);if(e&&l.push(e),r){const e=Hte(a.header_cell);e&&i.push(e)}}const s=[];for(let c=0;c<t;c+=1)s.push(a.row.createChecked(null,r&&0===c?i:l));return a.table.createChecked(null,s)}const Wte=({editor:e})=>{const{selection:t}=e.state;if(!(t instanceof Zee))return!1;let n=0;const r=L0(t.ranges[0].$from,(e=>"table"===e.type.name));null==r||r.node.descendants((e=>{if("table"===e.type.name)return!1;["tableCell","tableHeader"].includes(e.type.name)&&(n+=1)}));return n===t.ranges.length&&(e.commands.deleteTable(),!0)},Gte=s1.create({name:"table",addOptions:()=>({HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:$te,lastColumnResizable:!0,allowTableNodeSelection:!1}),content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML:()=>[{tag:"table"}],renderHTML({node:e,HTMLAttributes:t}){const{colgroup:n,tableWidth:r,tableMinWidth:o}=function(e,t,n,r){let o=0,a=!0;const i=[],l=e.firstChild;if(!l)return{};for(let u=0,d=0;u<l.childCount;u+=1){const{colspan:e,colwidth:s}=l.child(u).attrs;for(let l=0;l<e;l+=1,d+=1){const e=n===d?r:s&&s[l],c=e?`${e}px`:"";o+=e||t,e||(a=!1),i.push(["col",c?{style:`width: ${c}`}:{}])}}const s=a?`${o}px`:"",c=a?"":`${o}px`;return{colgroup:["colgroup",{},...i],tableWidth:s,tableMinWidth:c}}(e,this.options.cellMinWidth);return["table",GQ(this.options.HTMLAttributes,t,{style:r?`width: ${r}`:`minWidth: ${o}`}),n,["tbody",0]]},addCommands:()=>({insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:o,editor:a})=>{const i=Ute(a.schema,e,t,n);if(o){const e=r.selection.from+1;r.replaceSelectionWith(i).scrollIntoView().setSelection(BY.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e);t(Tte(e.tr,n,n.left))}return!0}(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e);t(Tte(e.tr,n,n.right))}return!0}(e,t),deleteColumn:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e),r=e.tr;if(0==n.left&&n.right==n.map.width)return!1;for(let e=n.right-1;Ate(r,n,e),e!=n.left;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=jee.get(e)}t(r)}return!0}(e,t),addRowBefore:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e);t(Mte(e.tr,n,n.top))}return!0}(e,t),addRowAfter:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e);t(Mte(e.tr,n,n.bottom))}return!0}(e,t),deleteRow:()=>({state:e,dispatch:t})=>function(e,t){if(!Uee(e))return!1;if(t){const n=Nte(e),r=e.tr;if(0==n.top&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;Ite(r,n,e),e!=n.top;e--){const e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError("No table found");n.table=e,n.map=jee.get(n.table)}t(r)}return!0}(e,t),deleteTable:()=>({state:e,dispatch:t})=>function(e,t){const n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if("table"==n.node(r).type.spec.tableRole)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}(e,t),mergeCells:()=>({state:e,dispatch:t})=>Lte(e,t),splitCell:()=>({state:e,dispatch:t})=>Rte(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>Dte("column")(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>Dte("row")(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>Vte(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>!!Lte(e,t)||Rte(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>function(e,t){return function(n,r){if(!Uee(n))return!1;const o=Wee(n);if(o.nodeAfter.attrs[e]===t)return!1;if(r){const a=n.tr;n.selection instanceof Zee?n.selection.forEachCell(((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})})):a.setNodeMarkup(o.pos,null,{...o.nodeAfter.attrs,[e]:t}),r(a)}return!0}}(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>jte(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>jte(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&nte(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){const n=Zee.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}),addKeyboardShortcuts(){return{Tab:()=>!!this.editor.commands.goToNextCell()||!!this.editor.can().addRowAfter()&&this.editor.chain().addRowAfter().goToNextCell().run(),"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:Wte,"Mod-Backspace":Wte,Delete:Wte,"Mod-Delete":Wte}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[xte({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],Fte({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema:e=>({tableRole:YQ($Q(e,"tableRole",{name:e.name,options:e.options,storage:e.storage}))})}),Kte=s1.create({name:"tableCell",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"cell",isolating:!0,parseHTML:()=>[{tag:"td"}],renderHTML({HTMLAttributes:e}){return["td",GQ(this.options.HTMLAttributes,e),0]}}).extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),align:{default:null,parseHTML:e=>e.getAttribute("data-align"),renderHTML:({align:e})=>({"data-align":e})},backgroundColor:{default:null,parseHTML:e=>e.getAttribute("data-bg-color"),renderHTML:({backgroundColor:e})=>{const t={"data-bg-color":e};return e&&(t.style=`background-color: ${e}`),t}}}}}),qte=s1.create({name:"tableHeader",addOptions:()=>({HTMLAttributes:{}}),content:"block+",addAttributes:()=>({colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:e=>{const t=e.getAttribute("colwidth");return t?[parseInt(t,10)]:null}}}),tableRole:"header_cell",isolating:!0,parseHTML:()=>[{tag:"th"}],renderHTML({HTMLAttributes:e}){return["th",GQ(this.options.HTMLAttributes,e),0]}}).extend({addAttributes(){var e;return{...null==(e=this.parent)?void 0:e.call(this),align:{default:null,parseHTML:e=>e.getAttribute("data-align"),renderHTML:({align:e})=>({"data-align":e})},backgroundColor:{default:null,parseHTML:e=>e.getAttribute("data-bg-color"),renderHTML:({backgroundColor:e})=>{const t={"data-bg-color":e};return e&&(t.style=`background-color: ${e}`),t}}}}}),Yte=s1.create({name:"tableRow",addOptions:()=>({HTMLAttributes:{}}),content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML:()=>[{tag:"tr"}],renderHTML({HTMLAttributes:e}){return["tr",GQ(this.options.HTMLAttributes,e),0]}}),Xte=s1.create({name:"pageBreak",group:"block",addOptions:()=>({HTMLAttributes:{class:"page-break","data-line-number":!1,"data-content":KN("page.break")}}),parseHTML:()=>[{tag:'div[class*="page-break"]'}],renderHTML({HTMLAttributes:e}){return["div",GQ(this.options.HTMLAttributes,e)]},addCommands(){return{setPageBreak:()=>({commands:e})=>e.insertContent({type:this.name})}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setPageBreak()}}}),Zte={class:"node-container hover-shadow select-outline toc"},Jte=["textContent"],Qte={key:0,class:"toc-body"},ene=["onClick"],tne=["textContent"],nne={__name:"node-view",props:u2,setup(e){const{editor:n,tableOfContents:r}=zN();return(e,o)=>(t.openBlock(),t.createBlock(t.unref(s2),{class:"node-view toc-node-view"},{default:t.withCtx((()=>[t.createElementVNode("div",Zte,[t.createElementVNode("p",{class:"toc-head",textContent:t.toDisplayString(e.t("toc.title"))},null,8,Jte),t.unref(r)&&t.unref(r).length>0?(t.openBlock(),t.createElementBlock("ul",Qte,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(r),(e=>(t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass(["toc-item",`level-${e.level}`]),key:e.id},[t.createElementVNode("a",{onClick:t=>(e=>{const t=n.value.view.dom.querySelector(`[data-toc-id="${e}"`);t.scrollIntoView();const r=n.value.view.posAtDOM(t,0),o=n.value.view.state.tr;o.setSelection(new BY(o.doc.resolve(r))),n.value.view.dispatch(o),n.value.view.focus()})(e.id)},t.toDisplayString(e.textContent),9,ene)],2)))),128))])):(t.openBlock(),t.createElementBlock("div",{key:1,class:"toc-empty",textContent:t.toDisplayString(e.t("toc.empty"))},null,8,tne))])])),_:1}))}},rne=s1.create({name:"toc",group:"block",atom:!0,parseHTML:()=>[{tag:"toc"}],renderHTML({HTMLAttributes:e}){return["toc",GQ(this.options.HTMLAttributes,e)]},addNodeView:()=>p2(nne),addGlobalAttributes:()=>[{types:["heading"],attributes:{}}],addCommands(){return{addTableOfContents:()=>({editor:e})=>{e.chain().focus().insertContent({type:this.name}).run()}}}}),one=new eX("invisibleCharacters"),ane=(e,t)=>{const n=one,r=VJ.create(e.doc,[]),o=(e,n,r,o)=>t.builders.sort(((e,t)=>e.priority>t.priority?1:-1)).reduce(((t,o)=>o.createDecoration(e,n,r.doc,t)),o);return new ZY({key:n,state:{init:()=>{const{$from:n,$to:r}=new FY(e.doc);return t.injectCSS&&document&&((e,t)=>{const n=document.querySelector("style[data-tiptap-extension-invisible-characters-style]");if(null!==n)return n;const r=document.createElement("style");t&&r.setAttribute("nonce",t),r.setAttribute("data-tiptap-extension-invisible-characters-style",""),r.innerHTML=".Tiptap-invisible-character {\n height: 0;\n padding: 0;\n pointer-events: none;\n user-select: none;\n width: 0;\n}\n\n.Tiptap-invisible-character::before {\n caret-color: inherit;\n color: #aaa;\n display: inline-block;\n font-style: normal;\n font-weight: 400;\n line-height: 1em;\n width: 0;\n}\n\n.Tiptap-invisible-character--space::before {\n content: '·'\n}\n\n.Tiptap-invisible-character--break::before {\n content: '¬'\n}\n\n.Tiptap-invisible-character--paragraph::before {\n content: '¶'\n}\n\n.Tiptap-invisible-character + img.ProseMirror-separator {\n height: 0 !important;\n pointer-events: none;\n user-select: none;\n width: 0 !important;\n}\n\n.is-empty[data-placeholder].has-focus > .Tiptap-invisible-character {\n display: none;\n}\n",document.getElementsByTagName("head")[0].appendChild(r)})(0,t.injectNonce),{visible:t.visible,decorations:o(n.pos,r.pos,e,VJ.empty)}},apply:(e,t,n,r)=>{const a=(l=t,void 0===(s=e.getMeta("setInvisibleCharactersVisible"))?l:{...l,visible:s}),i=(({mapping:e})=>{const t=[];return e.maps.forEach(((n,r)=>{n.forEach(((n,o,a,i)=>{t.push([e.slice(r+1).map(a),e.slice(r+1).map(i)])}))})),t})(e).reduce(((e,[t,n])=>o(t,n,r,e)),a.decorations.map(e.mapping,e.doc));var l,s;return{...a,decorations:i}}},props:{decorations(e){const t=this.getState(e),n=null==t?void 0:t.visible,o=null==t?void 0:t.decorations;return n?o:r}}})},ine=(e,t,n)=>RJ.widget(e,(()=>{const e=document.createElement("span");return e.classList.add("Tiptap-invisible-character"),e.classList.add(`Tiptap-invisible-character--${t}`),n&&(e.textContent=n),e}),{key:t,marks:[],side:1e3}),lne=(e,t)=>t+e.nodeSize-1;let sne=class{constructor(e){this.predicate=e.predicate,this.type=e.type,this.position=e.position||lne,this.content=e.content,this.priority=e.priority||100}createDecoration(e,t,n,r){let o=r;return n.nodesBetween(e,t,((e,t)=>{if(this.test(e)){const r=this.position(e,t),a=o.find(r,r,(e=>e.key===this.type));o=o.remove(a).add(n,[ine(r,this.type,this.content)])}})),o}test(e){return this.predicate(e)}},cne=class extends sne{constructor(){super({type:"break",predicate:e=>e.type===e.type.schema.nodes.hardBreak})}};class une extends sne{constructor(){super({type:"paragraph",predicate:e=>e.type===e.type.schema.nodes.paragraph})}}class dne{constructor(e){this.predicate=e.predicate,this.type=e.type,this.content=e.content,this.priority=e.priority||100}createDecoration(e,t,n,r){return((e,t,n)=>{const r=[];return n.nodesBetween(e,t,((n,o)=>{var a;if(n.isText){const i=Math.max(e,o)-o;r.push({pos:o+i,text:(null===(a=n.text)||void 0===a?void 0:a.slice(i,t-o))||""})}})),r})(e,t,n).reduce(((e,t)=>t.text.split("").reduce(((e,r,o)=>this.test(r)?e.add(n,[ine(t.pos+o,this.type,this.content)]):e),e)),r)}test(e){return this.predicate(e)}}class pne extends dne{constructor(){super({type:"space",predicate:e=>" "===e})}}const fne=p0.create({name:"invisibleCharacters",addOptions:()=>({visible:!0,builders:[new pne,new une,new cne],injectCSS:!0,injectNonce:void 0}),addProseMirrorPlugins(){return[ane(this.editor.state,this.options)]},addStorage(){return{visibility:()=>this.options.visible}},onBeforeCreate(){this.storage.visibility=()=>{var e;return null===(e=one.getState(this.editor.state))||void 0===e?void 0:e.visible}},addCommands:()=>({showInvisibleCharacters:(e=!0)=>({dispatch:t,tr:n})=>(t&&n.setMeta("setInvisibleCharactersVisible",e),!0),hideInvisibleCharacters:()=>({dispatch:e,tr:t})=>(e&&t.setMeta("setInvisibleCharactersVisible",!1),!0),toggleInvisibleCharacters:()=>({dispatch:e,tr:t,state:n})=>{var r;const o=!(null===(r=one.getState(n))||void 0===r?void 0:r.visible);return e&&t.setMeta("setInvisibleCharactersVisible",o),!0}})});class hne extends sne{constructor(){super({type:"paragraph",predicate:e=>["heading"].includes(e.type.name)})}}const mne=p0.create({name:"selection",addCommands:()=>({getSelectionText:()=>({editor:e})=>{const{from:t,to:n,empty:r}=e.state.selection;return r?"":e.state.doc.textBetween(t,n,"")},getSelectionNode:()=>({editor:e})=>{for(const t of Array.from(e.vueRenderers))if(t[1].props.selected)return t[1]},deleteSelectionNode:()=>({editor:e,chain:t})=>{if(e.isActive("image")||e.isActive("video")||e.isActive("audio")||e.isActive("file")){const t=e.commands.getSelectionNode();if(!t)return;const{options:n}=zN(),{id:r,src:o}=t.props.node.attrs;n.value.onFileDelete(r,o)}return t().deleteSelection().run()}}),addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.deleteSelectionNode(),Delete:()=>this.editor.commands.deleteSelectionNode()}}});for(var vne,gne=[],bne=0;bne<256;++bne)gne.push((bne+256).toString(16).slice(1));var yne=new Uint8Array(16);function wne(){if(!vne&&!(vne="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vne(yne)}const kne={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function xne(e,t,n){if(kne.randomUUID&&!t&&!e)return kne.randomUUID();var r=(e=e||{}).random||(e.rng||wne)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return(gne[e[t+0]]+gne[e[t+1]]+gne[e[t+2]]+gne[e[t+3]]+"-"+gne[e[t+4]]+gne[e[t+5]]+"-"+gne[e[t+6]]+gne[e[t+7]]+"-"+gne[e[t+8]]+gne[e[t+9]]+"-"+gne[e[t+10]]+gne[e[t+11]]+gne[e[t+12]]+gne[e[t+13]]+gne[e[t+14]]+gne[e[t+15]]).toLowerCase()}(r)}const Ene=({getId:e,anchorTypes:t=["heading"]})=>new ZY({key:new eX("tableOfContent"),appendTransaction(n,r,o){const a=o.tr;let i=!1;if(n.some((e=>e.docChanged))){const n=[];o.doc.descendants(((r,o)=>{const l=r.attrs["data-toc-id"];if(t.includes(r.type.name)&&0!==r.textContent.length){if(null==l||n.includes(l)){let t="";t=e?e(r.textContent):xne(),a.setNodeMarkup(o,void 0,{...r.attrs,"data-toc-id":t,id:t}),i=!0}n.push(l)}}))}return i?a:null}}),Cne=(e,t)=>{let n=1;const r=t.at(-1),o=[...t].reverse().find((t=>t.originalLevel<=e.node.attrs.level)),a=(null==o?void 0:o.level)||1;return n=e.node.attrs.level>((null==r?void 0:r.originalLevel)||1)?((null==r?void 0:r.level)||1)+1:e.node.attrs.level<((null==r?void 0:r.originalLevel)||1)?a:(null==r?void 0:r.level)||1,n},Sne=(e,t)=>{const n=t.at(-1);return n?((null==n?void 0:n.itemIndex)||1)+1:1},One=(e,t,n)=>{var r,o;const a=n||e.node.attrs.level||1;let i=1;const l=t.filter((e=>e.level<=a));return i=(null===(r=l.at(-1))||void 0===r?void 0:r.level)===a?((null===(o=l.at(-1))||void 0===o?void 0:o.itemIndex)||1)+1:1,i},_ne=(e,t)=>{const{editor:n}=t,r=[],o=[];let a=null;if(n.state.doc.descendants(((e,n)=>{var o;(null===(o=t.anchorTypes)||void 0===o?void 0:o.includes(e.type.name))&&r.push({node:e,pos:n})})),r.forEach((e=>{const r=n.view.domAtPos(e.pos+1).node;t.storage.scrollPosition>=r.offsetTop&&(a=e.node.attrs["data-toc-id"],o.push(e.node.attrs["data-toc-id"]))})),e=e.map((e=>({...e,isActive:e.id===a,isScrolledOver:o.includes(e.id)}))),t.onUpdate){const n=0===t.storage.content.length;t.onUpdate(e,n)}return e},Nne=e=>{const{editor:t,onUpdate:n}=e,r=[];let o=[];const a=[];if(t.state.doc.descendants(((t,n)=>{var o;(null===(o=e.anchorTypes)||void 0===o?void 0:o.includes(t.type.name))&&r.push({node:t,pos:n})})),r.forEach(((n,i)=>{if(0===n.node.textContent.length)return;const l=t.view.domAtPos(n.pos+1).node,s=e.storage.scrollPosition>=l.offsetTop;a.push(l);const c=n.node.attrs.level,u=r[i-1],d=e.getLevelFn(n,o),p=e.getIndexFn(n,o,d);o=u?[...o,{itemIndex:p,id:n.node.attrs["data-toc-id"],originalLevel:c,level:d,textContent:n.node.textContent,pos:n.pos,editor:t,isActive:!1,isScrolledOver:!1,node:n.node,dom:l}]:[...o,{itemIndex:p,id:n.node.attrs["data-toc-id"],originalLevel:c,level:d,textContent:n.node.textContent,pos:n.pos,editor:t,isActive:!1,isScrolledOver:s,node:n.node,dom:l}]})),o=_ne(o,e),n){const t=0===e.storage.content.length;n(o,t)}e.storage.anchors=a,e.storage.content=o,t.state.tr.setMeta("toc",o),t.view.dispatch(t.state.tr)},Tne=p0.create({name:"tableOfContents",addStorage:()=>({content:[],anchors:[],scrollHandler:()=>null,scrollPosition:0}),addGlobalAttributes(){return[{types:this.options.anchorTypes||["headline"],attributes:{id:{default:null,renderHTML:e=>({id:e.id}),parseHTML:e=>e.id||null},"data-toc-id":{default:null,renderHTML:e=>({"data-toc-id":e["data-toc-id"]}),parseHTML:e=>e.dataset.tocId||null}}}]},addOptions:()=>({onUpdate:()=>{},getId:e=>xne(),scrollParent:"undefined"!=typeof window?()=>window:void 0,anchorTypes:["heading"]}),onUpdate(){var e;Nne({editor:this.editor,storage:this.storage,onUpdate:null===(e=this.options.onUpdate)||void 0===e?void 0:e.bind(this),getIndexFn:this.options.getIndex||Sne,getLevelFn:this.options.getLevel||Cne,anchorTypes:this.options.anchorTypes})},onCreate(){var e;const{tr:t}=this.editor.state,n=[];if(this.options.scrollParent&&"function"!=typeof this.options.scrollParent&&console.warn("[Tiptap Table of Contents Deprecation Notice]: The 'scrollParent' option must now be provided as a callback function that returns the 'scrollParent' element. The ability to pass this option directly will be deprecated in future releases."),this.editor.state.doc.descendants(((e,r)=>{var o;const a=e.attrs["data-toc-id"];if((null===(o=this.options.anchorTypes)||void 0===o?void 0:o.includes(e.type.name))&&0!==e.textContent.length){if(null==a||n.includes(a)){let n="";n=this.options.getId?this.options.getId(e.textContent):xne(),t.setNodeMarkup(r,void 0,{...e.attrs,"data-toc-id":n,id:n})}n.push(a)}})),this.editor.view.dispatch(t),Nne({editor:this.editor,storage:this.storage,onUpdate:null===(e=this.options.onUpdate)||void 0===e?void 0:e.bind(this),getIndexFn:this.options.getIndex||Sne,getLevelFn:this.options.getLevel||Cne,anchorTypes:this.options.anchorTypes}),this.storage.scrollHandler=()=>{var e;if(!this.options.scrollParent)return;const t="function"==typeof this.options.scrollParent?this.options.scrollParent():this.options.scrollParent,n=t instanceof HTMLElement?t.scrollTop:t.scrollY;this.storage.scrollPosition=n||0;const r=_ne(this.storage.content,{editor:this.editor,anchorTypes:this.options.anchorTypes,storage:this.storage,onUpdate:null===(e=this.options.onUpdate)||void 0===e?void 0:e.bind(this)});this.storage.content=r},!this.options.scrollParent)return;const r="function"==typeof this.options.scrollParent?this.options.scrollParent():this.options.scrollParent;r&&r.addEventListener("scroll",this.storage.scrollHandler)},onDestroy(){if(!this.options.scrollParent)return;const e="function"==typeof this.options.scrollParent?this.options.scrollParent():this.options.scrollParent;e&&e.removeEventListener("scroll",this.storage.scrollHandler)},addProseMirrorPlugins(){return[Ene({getId:this.options.getId,anchorTypes:this.options.anchorTypes})]}}),Ane=p0.create({name:"typography",addOptions:()=>({closeDoubleQuote:"”",closeSingleQuote:"’",copyright:"©",ellipsis:"…",emDash:"—",laquo:"«",leftArrow:"←",multiplication:"×",notEqual:"≠",oneHalf:"½",oneQuarter:"¼",openDoubleQuote:"“",openSingleQuote:"‘",plusMinus:"±",raquo:"»",registeredTrademark:"®",rightArrow:"→",servicemark:"℠",superscriptThree:"³",superscriptTwo:"²",threeQuarters:"¾",trademark:"™"}),addInputRules(){const e=[];var t;return!1!==this.options.emDash&&e.push(a1({find:/--$/,replace:null!=(t=this.options.emDash)?t:"—"})),!1!==this.options.ellipsis&&e.push((e=>a1({find:/\.\.\.$/,replace:null!=e?e:"…"}))(this.options.ellipsis)),!1!==this.options.openDoubleQuote&&e.push((e=>a1({find:/(?:^|[\s{[(<'"\u2018\u201C])(")$/,replace:null!=e?e:"“"}))(this.options.openDoubleQuote)),!1!==this.options.closeDoubleQuote&&e.push((e=>a1({find:/"$/,replace:null!=e?e:"”"}))(this.options.closeDoubleQuote)),!1!==this.options.openSingleQuote&&e.push((e=>a1({find:/(?:^|[\s{[(<'"\u2018\u201C])(')$/,replace:null!=e?e:"‘"}))(this.options.openSingleQuote)),!1!==this.options.closeSingleQuote&&e.push((e=>a1({find:/'$/,replace:null!=e?e:"’"}))(this.options.closeSingleQuote)),!1!==this.options.leftArrow&&e.push((e=>a1({find:/<-$/,replace:null!=e?e:"←"}))(this.options.leftArrow)),!1!==this.options.rightArrow&&e.push((e=>a1({find:/->$/,replace:null!=e?e:"→"}))(this.options.rightArrow)),!1!==this.options.copyright&&e.push((e=>a1({find:/\(c\)$/,replace:null!=e?e:"©"}))(this.options.copyright)),!1!==this.options.trademark&&e.push((e=>a1({find:/\(tm\)$/,replace:null!=e?e:"™"}))(this.options.trademark)),!1!==this.options.servicemark&&e.push((e=>a1({find:/\(sm\)$/,replace:null!=e?e:"℠"}))(this.options.servicemark)),!1!==this.options.registeredTrademark&&e.push((e=>a1({find:/\(r\)$/,replace:null!=e?e:"®"}))(this.options.registeredTrademark)),!1!==this.options.oneHalf&&e.push((e=>a1({find:/(?:^|\s)(1\/2)\s$/,replace:null!=e?e:"½"}))(this.options.oneHalf)),!1!==this.options.plusMinus&&e.push((e=>a1({find:/\+\/-$/,replace:null!=e?e:"±"}))(this.options.plusMinus)),!1!==this.options.notEqual&&e.push((e=>a1({find:/!=$/,replace:null!=e?e:"≠"}))(this.options.notEqual)),!1!==this.options.laquo&&e.push((e=>a1({find:/<<$/,replace:null!=e?e:"«"}))(this.options.laquo)),!1!==this.options.raquo&&e.push((e=>a1({find:/>>$/,replace:null!=e?e:"»"}))(this.options.raquo)),!1!==this.options.multiplication&&e.push((e=>a1({find:/\d+\s?([*x])\s?\d+$/,replace:null!=e?e:"×"}))(this.options.multiplication)),!1!==this.options.superscriptTwo&&e.push((e=>a1({find:/\^2$/,replace:null!=e?e:"²"}))(this.options.superscriptTwo)),!1!==this.options.superscriptThree&&e.push((e=>a1({find:/\^3$/,replace:null!=e?e:"³"}))(this.options.superscriptThree)),!1!==this.options.oneQuarter&&e.push((e=>a1({find:/(?:^|\s)(1\/4)\s$/,replace:null!=e?e:"¼"}))(this.options.oneQuarter)),!1!==this.options.threeQuarters&&e.push((e=>a1({find:/(?:^|\s)(3\/4)\s$/,replace:null!=e?e:"¾"}))(this.options.threeQuarters)),e}}),Mne=p0.create({name:"characterCount",addOptions:()=>({limit:null,mode:"textSize"}),addStorage:()=>({characters:()=>0,words:()=>0}),onBeforeCreate(){this.storage.characters=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;if("textSize"===((null==e?void 0:e.mode)||this.options.mode)){return t.textBetween(0,t.content.size,void 0," ").length}return t.nodeSize},this.storage.words=e=>{const t=(null==e?void 0:e.node)||this.editor.state.doc;return t.textBetween(0,t.content.size," "," ").split(" ").filter((e=>""!==e)).length}},addProseMirrorPlugins(){return[new ZY({key:new eX("characterCount"),filterTransaction:(e,t)=>{const n=this.options.limit;if(!e.docChanged||0===n||null==n)return!0;const r=this.storage.characters({node:t.doc}),o=this.storage.characters({node:e.doc});if(o<=n)return!0;if(r>n&&o>n&&o<=r)return!0;if(r>n&&o>n&&o>r)return!1;if(!e.getMeta("paste"))return!1;const a=e.selection.$head.pos,i=a-(o-n),l=a;e.deleteRange(i,l);return!(this.storage.characters({node:e.doc})>n)}})]}}),Ine=({key:e,editor:t,onPaste:n,onDrop:r,allowedMimeTypes:o})=>new ZY({key:e||new eX("fileHandler"),props:{handleDrop(e,n){var a;const{dataTransfer:i}=n;if(!r)return;if(!(null==(a=null==i?void 0:i.files)?void 0:a.length))return;const l=e.posAtCoords({left:n.clientX,top:n.clientY});let s=Array.from(i.files);o.length>0&&(s=s.filter((e=>!!o.includes(e.type)||!!o.includes(`${e.type.split("/")[0]}/*`)))),0!==s.length&&r(t,s,(null===l?void 0:l.pos)||0),n.preventDefault(),n.stopPropagation()},handlePaste(e,r){var a;const{clipboardData:i}=r;if(!n)return;if(!(null==(a=null==i?void 0:i.files)?void 0:a.length))return;let l=Array.from(i.files);const s=i.getData("text/html");o.length>0&&(l=l.filter((e=>!!o.includes(e.type)||!!o.includes(`${e.type.split("/")[0]}/*`)))),0!==l.length&&n(t,l,s),r.preventDefault(),r.stopPropagation()}}}),Pne=p0.create({name:"fileHandler",addOptions:()=>({onPaste:void 0,onDrop:void 0,allowedMimeTypes:[]}),addProseMirrorPlugins(){return[Ine({key:new eX(this.name),editor:this.editor,allowedMimeTypes:this.options.allowedMimeTypes,onDrop:this.options.onDrop,onPaste:this.options.onPaste})]}}),Lne={__name:"index",setup(e){const{options:n,page:r,editor:o,tableOfContents:a,setEditor:i,editorDestroyed:l}=zN(),s=GN("document");let c=!0;n.value.document.enableMarkdown&&s.value.markdown||(c=[X8,Bee,Ane]);const u=t.computed((()=>n.value.dicts.lineHeights.find((e=>e.default)).value)),d=new a2({editable:!n.value.document.readOnly,autofocus:n.value.document.autofocus,content:n.value.document.content,enableInputRules:c,enablePasteRules:c,editorProps:{attributes:{class:"umo-editor"},...n.value.document.editorProps},parseOptions:n.value.document.parseOptions,extensions:[O4.configure({bold:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1,gapcursor:!0,dropcursor:!1}),_4.configure({considerAnyAsEmpty:!0,placeholder:qN(n.value.document.placeholder)}),N4.configure({className:"node-focused"}),A4,M4,y2.extend({renderHTML:({HTMLAttributes:e})=>["b",e,0]}),I4,P4,L4,R4,T4,V4.configure({multicolor:!0}),j4,F4,$4,H4,U4,G4.configure({nested:!0}),K4.configure({HTMLAttributes:{class:"task-list"}}),q4.configure({types:["heading","paragraph"],defaultLineHeight:u.value}),Z4,X5,X8,r6,s6,N6,Nee,See,Tee,Pee,Bee,Gte.configure({resizable:!0,allowTableNodeSelection:!0}),Yte,qte,Kte,rne,Xte,fne.configure({visible:r.value.showBreakMarks,builders:[new cne,new une,new hne]}),mne,Tne.configure({getIndex:One,onUpdate:e=>{a.value=e},getId:()=>$_(6)}),Ane.configure(n.value.document.typographyRules),Mne.configure({limit:0!==n.value.document.characterLimit?n.value.document.characterLimit:void 0}),Pne.configure({allowedMimeTypes:n.value.file.allowedMimeTypes,onPaste(e,t,n){t.forEach((t=>e.chain().focus().insertFile({file:t}).run()))},onDrop:(e,t,n)=>{t.forEach((t=>e.chain().focus().insertFile({file:t,pos:n}).run()))}}),P2.configure({color:"var(--umo-primary-color)"}),...n.value.extensions],onUpdate({editor:e}){s.value.content=e.getHTML()}});return i(d),t.onBeforeUnmount((()=>d.destroy())),(e,a)=>{const i=LK,c=SG;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(i2),{spellcheck:t.unref(n).document.enableSpellcheck&&t.unref(s).spellcheck,class:t.normalizeClass(["editor-container",{"show-line-number":t.unref(r).showLineNumber}]),style:t.normalizeStyle({lineHeight:u.value}),editor:t.unref(o)},null,8,["spellcheck","class","style","editor"]),t.unref(n).document.enableBubbleMenu&&t.unref(o)&&!t.unref(l)?(t.openBlock(),t.createBlock(t.unref(r2),{key:0,class:"umo-editor-bubble-menu",editor:t.unref(o),"tippy-options":{appendTo:"parent",maxWidth:480,zIndex:99}},{default:t.withCtx((()=>[t.createVNode(i)])),_:1},8,["editor"])):t.createCommentVNode("",!0),t.unref(n).document.enableBlockMenu&&t.unref(o)&&!t.unref(l)?(t.openBlock(),t.createBlock(c,{key:1})):t.createCommentVNode("",!0)],64)}}},Rne={class:"toc-container"},Bne={class:"toc-title"},Dne={class:"toc-content umo-scrollbar"},Vne=["textContent"],jne=["data-heading","onClick"],Fne={class:"toc-text"},zne=YN({__name:"toc",setup(e){const{container:n,editor:r,tableOfContents:o}=zN();return(e,n)=>{const a=dC;return t.openBlock(),t.createElementBlock("div",Rne,[t.createElementVNode("div",Bne,[t.createVNode(a,{class:"icon-toc",name:"toc"}),t.createTextVNode(" "+t.toDisplayString(e.t("toc.title"))+" ",1),t.createElementVNode("div",{class:"umo-dialog__close",onClick:n[0]||(n[0]=t=>e.$emit("close"))},[t.createVNode(a,{name:"close"})])]),t.createElementVNode("div",Dne,[0===t.unref(o).length?(t.openBlock(),t.createElementBlock("div",{key:0,class:"toc-empty",textContent:t.toDisplayString(e.t("toc.empty"))},null,8,Vne)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(t.unref(o),((e,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["toc-item",{active:e.isActive,["level-"+e.level]:!0}]),key:e.id,"data-heading":"H"+e.originalLevel,onClick:t=>(e=>{if(!r.value)return;const t=o.value.find((e=>!0===e.isActive));t&&(t.isActive=!1),e.isActive=!0;const n=r.value.view.dom.querySelector(`[data-toc-id="${e.id}"`);n.scrollIntoView();const a=r.value.view.posAtDOM(n,0),i=r.value.view.state.tr;i.setSelection(new BY(i.doc.resolve(a))),r.value.view.dispatch(i),r.value.view.focus()})(e)},[t.createElementVNode("div",Fne,t.toDisplayString(e.textContent),1)],10,jne)))),128))])])}}},[["__scopeId","data-v-5bba56c9"]]),$ne={class:"page-container"},Hne={class:"zoomable-container umo-scrollbar"},Une=YN({__name:"page",setup(e){const n=zN(),{container:r,page:o,imagePreview:a}=zN(),i=t.computed((()=>{const{width:e,height:t}=o.value.size;return{width:"portrait"===o.value.orientation?e:t,height:"portrait"===o.value.orientation?t:e}})),l=t.computed((()=>`calc(${i.value.width+"cm"} * ${o.value.zoomLevel/100})`)),s=t.computed((()=>`calc(${i.value.height+"cm"} * ${o.value.zoomLevel/100})`));let c=t.ref();const u=()=>{const e=document.querySelector(`${r} .page-content`);e?c.value=e.clientHeight*o.value.zoomLevel/100+"px":console.warn("The element <.page-content> does not exist.")};t.watch((()=>[o.value.zoomLevel,o.value.size,o.value.orientation]),(async()=>{await t.nextTick(),setTimeout((()=>u()),100)}),{immediate:!0,deep:!0}),t.watch((()=>{var e;return null==(e=n.editor.value)?void 0:e.getHTML()}),(()=>u()));const d=t.ref({x:0,height:0});t.watch((()=>o.value.watermark),(({type:e})=>{"compact"===e?(d.value.width=320,d.value.y=240):(d.value.width=480,d.value.y=360)}),{deep:!0,immediate:!0});let p=t.ref([]),f=t.ref(0),h=t.ref(!1);return t.watch((()=>a.value),(e=>{e?(document.querySelectorAll(`${r} .page-content img:not(.icon)`).forEach((e=>{const t=e.getAttribute("src");t&&p.value.push(t)})),f.value=images.findIndex((t=>t===e)),h.value=!0):(p.value=[],f.value=0,h.value=!1)})),(e,n)=>{const u=zne,m=Lne,v=tC,g=YE,b=Sw,y=PU,w=_U;return t.openBlock(),t.createElementBlock("div",$ne,[t.unref(o).showToc?(t.openBlock(),t.createBlock(u,{key:0,onClose:n[0]||(n[0]=e=>t.unref(o).showToc=!1)})):t.createCommentVNode("",!0),t.createElementVNode("div",Hne,[t.createElementVNode("div",{class:"zoomable-content",style:t.normalizeStyle({width:l.value,height:t.unref(c),minHeight:s.value})},[t.createVNode(v,t.mergeProps({class:"page-content",alpha:t.unref(o).watermark.alpha},d.value,{"watermark-content":t.unref(o).watermark,style:{width:i.value.width+"cm",minHeight:i.value.height+"cm",transform:`scale(${t.unref(o).zoomLevel/100})`,padding:`${t.unref(o).margin.top+"cm"} ${t.unref(o).margin.right+"cm"} ${t.unref(o).margin.bottom+"cm"} ${t.unref(o).margin.left+"cm"}`,background:t.unref(o).background}}),{default:t.withCtx((()=>[t.createVNode(m)])),_:1},16,["alpha","watermark-content","style"])],4)]),t.createVNode(g,{modelValue:t.unref(h),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(h)?h.value=e:h=e),images:t.unref(p),index:t.unref(f),onClose:n[2]||(n[2]=e=>a.value=!1)},null,8,["modelValue","images","index"]),t.createVNode(b,{container:`${t.unref(r)} .zoomable-container`,"visible-height":800,size:"small",offset:["25px","30px"]},null,8,["container"]),t.createVNode(y),t.createVNode(w)])}}},[["__scopeId","data-v-8ae72073"]]),Wne={class:"source-container"},Gne={class:"title"};const Kne=YN({},[["render",function(e,n){const r=dC;return t.openBlock(),t.createElementBlock("div",Wne,[t.createElementVNode("h3",Gne,[t.createVNode(r,{name:"code",class:"icon"}),t.createTextVNode(" "+t.toDisplayString(e.t("toolbar.source")),1)])])}],["__scopeId","data-v-191e4b8e"]]),qne=YN({__name:"scrollable",setup(e,{expose:n}){const r=t.ref(null),o=t.ref(null);let a=t.ref(!0),i=t.ref(!0);const l=()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:n}=o.value;a.value=0===e,i.value=e+n+1>=t},s=()=>o.value.scrollLeft-=100,c=()=>o.value.scrollLeft+=100;!function(e,n,r={}){const{window:o=pN,...a}=r;let i;const l=bN((()=>o&&"ResizeObserver"in o)),s=()=>{i&&(i.disconnect(),i=void 0)},c=t.computed((()=>Array.isArray(e)?e.map((e=>dN(e))):[dN(e)])),u=t.watch(c,(e=>{if(s(),l.value&&o){i=new ResizeObserver(n);for(const t of e)t&&i.observe(t,a)}}),{immediate:!0,flush:"post"}),d=()=>{s(),u()};H_(d)}(r,(()=>{l()})),t.onMounted((()=>{o.value.addEventListener("scroll",l)}));return n({update:()=>{o.value.scrollLeft=0,i.value=!0,l()}}),(e,n)=>{const l=dC;return t.openBlock(),t.createElementBlock("div",{ref_key:"wraperRef",ref:r,class:"scrollable-container"},[t.unref(a)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:"scrollable-control left",onClick:s},[t.createVNode(l,{name:"arrow-down"})])),t.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"scrollable-content"},[t.renderSlot(e.$slots,"default",{},void 0,!0)],512),t.unref(i)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:1,class:"scrollable-control right",onClick:c},[t.createVNode(l,{name:"arrow-down"})]))],512)}}},[["__scopeId","data-v-2dd42068"]]),Yne={class:"embed-container"},Xne=["textContent"],Zne=YN({__name:"embed",setup(e){const{options:n}=zN();let r=t.ref(!1);const o=t.computed((()=>`<iframe src="${n.value.shareUrl}" width="100%" height="720px" frameborder="0" allowfullscreen="true"></iframe>`)),a=()=>{const{copy:e}=xN({source:o});e(),I$("success",KN("export.embed.copied")),r.value=!1};return(e,n)=>{const i=ZU,l=Uk,s=XH;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(i,{ico:"embed",text:e.t("export.embed.text"),huge:"",onMenuClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},null,8,["text"]),t.createVNode(s,{visible:t.unref(r),icon:"embed",header:e.t("export.embed.title"),width:"460px",confirmBtn:e.t("export.embed.copy"),onConfirm:a,onClose:n[1]||(n[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",Yne,[t.createElementVNode("div",{class:"embed-tip",textContent:t.toDisplayString(e.t("export.embed.tip"))},null,8,Xne),t.createVNode(l,{class:"embed-textarea",value:t.unref(o),readonly:"",autosize:""},null,8,["value"])])])),_:1},8,["visible","header","confirmBtn"])],64)}}},[["__scopeId","data-v-cbb602ba"]]),Jne={class:"share-container"},Qne=["textContent"],ere=YN({__name:"share",setup(e){const{options:n}=zN();let r=t.ref(!1);const o=()=>{const{copy:e}=xN({source:n.value.shareUrl});e(),I$("success",KN("export.share.copied")),r.value=!1};return(e,a)=>{const i=ZU,l=Uk,s=XH;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(i,{ico:"share",text:e.t("export.share.text"),huge:"",onMenuClick:a[0]||(a[0]=e=>t.isRef(r)?r.value=!0:r=!0)},null,8,["text"]),t.createVNode(s,{visible:t.unref(r),icon:"share",header:e.t("export.share.text"),width:"420px",confirmBtn:e.t("export.share.copy"),onConfirm:o,onClose:a[1]||(a[1]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",Jne,[t.createElementVNode("div",{class:"share-tip",textContent:t.toDisplayString(e.t("export.share.tip"))},null,8,Qne),t.createVNode(l,{class:"share-textarea",value:t.unref(n).shareUrl,readonly:"",autosize:""},null,8,["value"])])])),_:1},8,["visible","header","confirmBtn"])],64)}}},[["__scopeId","data-v-89f81e52"]]);var tre={exports:{}};!function(e){!function(){function t(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){l(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(n){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof k&&k.global===k?k:void 0,i=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(e,t,i){var l=a.URL||a.webkitURL,s=document.createElement("a");t=t||e.name||"download",s.download=t,s.rel="noopener","string"==typeof e?(s.href=e,s.origin===location.origin?o(s):r(s.href)?n(e,t,i):o(s,s.target="_blank")):(s.href=l.createObjectURL(e),setTimeout((function(){l.revokeObjectURL(s.href)}),4e4),setTimeout((function(){o(s)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,a,i){if(a=a||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(t(e,i),a);else if(r(e))n(e,a,i);else{var l=document.createElement("a");l.href=e,l.target="_blank",setTimeout((function(){o(l)}))}}:function(e,t,r,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return n(e,t,r);var l="application/octet-stream"===e.type,s=/constructor/i.test(a.HTMLElement)||a.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||l&&s||i)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,p=d.createObjectURL(e);o?o.location=p:location.href=p,o=null,setTimeout((function(){d.revokeObjectURL(p)}),4e4)}});a.saveAs=l.saveAs=l,e.exports=l}()}(tre);var nre=tre.exports;const rre={__name:"text",setup(e){const{options:n,editor:r}=zN(),o=()=>{var e;if(!r.value)return;const t=new Blob([null==(e=r.value)?void 0:e.getText()],{type:"text/plain;charset=utf-8"}),{title:o}=n.value.document,a=""!==o?n.value.document.title:KN("document.untitled");nre.saveAs(t,`${a}.txt`)};return(e,n)=>{const r=ZU;return t.openBlock(),t.createBlock(r,{ico:"text",text:e.t("export.text"),huge:"",onMenuClick:o},null,8,["text"])}}};var ore={exports:{}};!function(e){!function(t){const n=function(){let e=0;return{escape:function(e){return e.replace(/([.*+?^${}()|[]\/\\])/g,"\\$1")},isDataUrl:function(e){return-1!==e.search(/^(data:)/)},canvasToBlob:function(e){return e.toBlob?new Promise((function(t){e.toBlob(t)})):(t=e,new Promise((function(e){var n=p(t.toDataURL().split(",")[1]),r=n.length,o=new Uint8Array(r);for(let t=0;t<r;t++)o[t]=n.charCodeAt(t);e(new Blob([o],{type:"image/png"}))})));var t},resolveUrl:function(e,t){var n=document.implementation.createHTMLDocument(),r=n.createElement("base"),o=(n.head.appendChild(r),n.createElement("a"));return n.body.appendChild(o),r.href=t,o.href=e,o.href},getAndEncode:function(e){let t=c.impl.urlCache.find((function(t){return t.url===e}));return t||(t={url:e,promise:null},c.impl.urlCache.push(t)),null===t.promise&&(c.impl.options.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+(new Date).getTime()),t.promise=new Promise((function(t){const n=c.impl.options.httpTimeout,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4===r.readyState)if(300<=r.status)a?t(a):i(`cannot fetch resource: ${e}, status: `+r.status);else{const e=new FileReader;e.onloadend=function(){t(e.result)},e.readAsDataURL(r.response)}},r.ontimeout=function(){a?t(a):i(`timeout of ${n}ms occured while fetching resource: `+e)},r.responseType="blob",r.timeout=n,0<c.impl.options.useCredentialsFilters.length&&(c.impl.options.useCredentials=0<c.impl.options.useCredentialsFilters.filter((t=>0<=e.search(t))).length),c.impl.options.useCredentials&&(r.withCredentials=!0),c.impl.options.corsImg&&0===e.indexOf("http")&&-1===e.indexOf(window.location.origin)){var o="POST"===(c.impl.options.corsImg.method||"GET").toUpperCase()?"POST":"GET";r.open(o,(c.impl.options.corsImg.url||"").replace("#{cors}",e),!0);let t=!1;const n=c.impl.options.corsImg.headers||{},a=(Object.keys(n).forEach((function(e){-1!==n[e].indexOf("application/json")&&(t=!0),r.setRequestHeader(e,n[e])})),function(e){try{return JSON.parse(JSON.stringify(e))}catch(t){i("corsImg.data is missing or invalid")}}(c.impl.options.corsImg.data||""));Object.keys(a).forEach((function(t){"string"==typeof a[t]&&(a[t]=a[t].replace("#{cors}",e))})),r.send(t?JSON.stringify(a):a)}else r.open("GET",e,!0),r.send();let a;function i(e){console.error(e),t("")}c.impl.options.imagePlaceholder&&(o=c.impl.options.imagePlaceholder.split(/,/))&&o[1]&&(a=o[1])}))),t.promise},uid:function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)|0).toString(36)).slice(-4)+e++},delay:function(e){return function(t){return new Promise((function(n){setTimeout((function(){n(t)}),e)}))}},asArray:function(e){var t=[],n=e.length;for(let r=0;r<n;r++)t.push(e[r]);return t},escapeXhtml:function(e){return e.replace(/%/g,"%25").replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(e){return"data:,"!==e?new Promise((function(t,n){const r=new Image;c.impl.options.useCredentials&&(r.crossOrigin="use-credentials"),r.onload=function(){window&&window.requestAnimationFrame?window.requestAnimationFrame((function(){t(r)})):t(r)},r.onerror=n,r.src=e})):Promise.resolve()},width:function(e){var t=i(e,"width");if(!isNaN(t))return t;t=i(e,"border-left-width");var n=i(e,"border-right-width");return e.scrollWidth+t+n},height:function(e){var t=i(e,"height");if(!isNaN(t))return t;t=i(e,"border-top-width");var n=i(e,"border-bottom-width");return e.scrollHeight+t+n},getWindow:n,isElement:a,isElementHostForOpenShadowRoot:function(e){return a(e)&&null!==e.shadowRoot},isShadowRoot:r,isInShadowRoot:o,isHTMLElement:function(e){return e instanceof n(e).HTMLElement},isHTMLCanvasElement:function(e){return e instanceof n(e).HTMLCanvasElement},isHTMLInputElement:function(e){return e instanceof n(e).HTMLInputElement},isHTMLImageElement:function(e){return e instanceof n(e).HTMLImageElement},isHTMLLinkElement:function(e){return e instanceof n(e).HTMLLinkElement},isHTMLScriptElement:function(e){return e instanceof n(e).HTMLScriptElement},isHTMLStyleElement:function(e){return e instanceof n(e).HTMLStyleElement},isHTMLTextAreaElement:function(e){return e instanceof n(e).HTMLTextAreaElement},isShadowSlotElement:function(e){return o(e)&&e instanceof n(e).HTMLSlotElement},isSVGElement:function(e){return e instanceof n(e).SVGElement},isSVGRectElement:function(e){return e instanceof n(e).SVGRectElement},isDimensionMissing:function(e){return isNaN(e)||e<=0}};function n(e){return((e=e?e.ownerDocument:void 0)?e.defaultView:void 0)||t||window}function r(e){return e instanceof n(e).ShadowRoot}function o(e){return null!==e&&Object.prototype.hasOwnProperty.call(e,"getRootNode")&&r(e.getRootNode())}function a(e){return e instanceof n(e).Element}function i(e,t){if(e.nodeType===u){let n=d(e).getPropertyValue(t);if("px"===n.slice(-2))return n=n.slice(0,-2),parseFloat(n)}return NaN}}(),r=function(){const e=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(e,n,a){return t(e)?Promise.resolve(e).then(r).then((function(t){let r=Promise.resolve(e);return t.forEach((function(e){r=r.then((function(t){return o(t,e,n,a)}))})),r})):Promise.resolve(e)},shouldProcess:t,impl:{readUrls:r,inline:o}};function t(t){return-1!==t.search(e)}function r(t){for(var r,o=[];null!==(r=e.exec(t));)o.push(r[1]);return o.filter((function(e){return!n.isDataUrl(e)}))}function o(e,t,r,o){return Promise.resolve(t).then((function(e){return r?n.resolveUrl(e,r):e})).then(o||n.getAndEncode).then((function(r){return e.replace((o=t,new RegExp(`(url\\(['"]?)(${n.escape(o)})(['"]?\\))`,"g")),`$1${r}$3`);var o}))}}(),o={resolveAll:function(){return a().then((function(e){return Promise.all(e.map((function(e){return e.resolve()})))})).then((function(e){return e.join("\n")}))},impl:{readAll:a}};function a(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(e){const t=[];return e.forEach((function(e){if(Object.prototype.hasOwnProperty.call(Object.getPrototypeOf(e),"cssRules"))try{n.asArray(e.cssRules||[]).forEach(t.push.bind(t))}catch(r){console.error("domtoimage: Error while reading CSS rules from "+e.href,r.toString())}})),t})).then((function(e){return e.filter((function(e){return e.type===CSSRule.FONT_FACE_RULE})).filter((function(e){return r.shouldProcess(e.style.getPropertyValue("src"))}))})).then((function(t){return t.map(e)}));function e(e){return{resolve:function(){var t=(e.parentStyleSheet||{}).href;return r.inlineAll(e.cssText,t)},src:function(){return e.style.getPropertyValue("src")}}}}const i={inlineAll:function e(t){return n.isElement(t)?function(e){const t=["background","background-image"].map((function(t){const n=e.style.getPropertyValue(t),o=e.style.getPropertyPriority(t);return n?r.inlineAll(n).then((function(n){e.style.setProperty(t,n,o)})):Promise.resolve()}));return Promise.all(t).then((function(){return e}))}(t).then((function(){return n.isHTMLImageElement(t)?l(t).inline():Promise.all(n.asArray(t.childNodes).map((function(t){return e(t)})))})):Promise.resolve(t)},impl:{newImage:l}};function l(e){return{inline:function(t){return n.isDataUrl(e.src)?Promise.resolve():Promise.resolve(e.src).then(t||n.getAndEncode).then((function(t){return new Promise((function(n){e.onload=n,e.onerror=n,e.src=t}))}))}}}const s={copyDefaultStyles:!0,imagePlaceholder:void 0,cacheBust:!1,useCredentials:!1,useCredentialsFilters:[],httpTimeout:3e4,styleCaching:"strict",corsImg:void 0,adjustClonedNode:void 0},c={toSvg:f,toPng:function(e,t){return h(e,t).then((function(e){return e.toDataURL()}))},toJpeg:function(e,t){return h(e,t).then((function(e){return e.toDataURL("image/jpeg",(t?t.quality:void 0)||1)}))},toBlob:function(e,t){return h(e,t).then(n.canvasToBlob)},toPixelData:function(e,t){return h(e,t).then((function(t){return t.getContext("2d").getImageData(0,0,n.width(e),n.height(e)).data}))},toCanvas:h,impl:{fontFaces:o,images:i,util:n,inliner:r,urlCache:[],options:{}}},u=(e.exports=c,("undefined"!=typeof Node?Node.ELEMENT_NODE:void 0)||1),d=(void 0!==t?t.getComputedStyle:void 0)||("undefined"!=typeof window?window.getComputedStyle:void 0)||globalThis.getComputedStyle,p=(void 0!==t?t.atob:void 0)||("undefined"!=typeof window?window.atob:void 0)||globalThis.atob;function f(e,t){c.impl.util.getWindow(e);var r=t=t||{};void 0===r.copyDefaultStyles?c.impl.options.copyDefaultStyles=s.copyDefaultStyles:c.impl.options.copyDefaultStyles=r.copyDefaultStyles,void 0===r.imagePlaceholder?c.impl.options.imagePlaceholder=s.imagePlaceholder:c.impl.options.imagePlaceholder=r.imagePlaceholder,void 0===r.cacheBust?c.impl.options.cacheBust=s.cacheBust:c.impl.options.cacheBust=r.cacheBust,void 0===r.corsImg?c.impl.options.corsImg=s.corsImg:c.impl.options.corsImg=r.corsImg,void 0===r.useCredentials?c.impl.options.useCredentials=s.useCredentials:c.impl.options.useCredentials=r.useCredentials,void 0===r.useCredentialsFilters?c.impl.options.useCredentialsFilters=s.useCredentialsFilters:c.impl.options.useCredentialsFilters=r.useCredentialsFilters,void 0===r.httpTimeout?c.impl.options.httpTimeout=s.httpTimeout:c.impl.options.httpTimeout=r.httpTimeout,void 0===r.styleCaching?c.impl.options.styleCaching=s.styleCaching:c.impl.options.styleCaching=r.styleCaching;let o=[];return Promise.resolve(e).then((function(e){if(e.nodeType===u)return e;var t=e,n=e.parentNode,r=document.createElement("span");return n.replaceChild(r,t),r.append(e),o.push({parent:n,child:t,wrapper:r}),r})).then((function(e){return function e(t,r,o,a){const i=r.filter;return t===m||n.isHTMLScriptElement(t)||n.isHTMLStyleElement(t)||n.isHTMLLinkElement(t)||null!==o&&i&&!i(t)?Promise.resolve():Promise.resolve(t).then((function(e){return n.isHTMLCanvasElement(e)?n.makeImage(e.toDataURL()):e.cloneNode(!1)})).then((function(e){return r.adjustClonedNode&&r.adjustClonedNode(t,e,!1),Promise.resolve(e)})).then((function(o){return function(t,o){const a=s(o);let i=Promise.resolve();if(0!==a.length){const s=d(l(o));n.asArray(a).forEach((function(n){i=i.then((function(){return e(n,r,s).then((function(e){e&&t.appendChild(e)}))}))}))}return i.then((function(){return t}));function l(e){return n.isShadowRoot(e)?e.host:e}function s(e){return n.isShadowSlotElement(e)?e.assignedNodes():e.childNodes}}(o,function(e){return n.isElementHostForOpenShadowRoot(e)?e.shadowRoot:e}(t))})).then((function(e){return r.adjustClonedNode&&r.adjustClonedNode(t,e,!0),Promise.resolve(e)})).then((function(e){return function(e,t){return!n.isElement(e)||n.isShadowSlotElement(t)?Promise.resolve(e):Promise.resolve().then(a).then(i).then(l).then(s).then((function(){return e}));function a(){function a(e,t){t.font=e.font,t.fontFamily=e.fontFamily,t.fontFeatureSettings=e.fontFeatureSettings,t.fontKerning=e.fontKerning,t.fontSize=e.fontSize,t.fontStretch=e.fontStretch,t.fontStyle=e.fontStyle,t.fontVariant=e.fontVariant,t.fontVariantCaps=e.fontVariantCaps,t.fontVariantEastAsian=e.fontVariantEastAsian,t.fontVariantLigatures=e.fontVariantLigatures,t.fontVariantNumeric=e.fontVariantNumeric,t.fontVariationSettings=e.fontVariationSettings,t.fontWeight=e.fontWeight}function i(e,t){const l=d(e);l.cssText?(t.style.cssText=l.cssText,a(l,t.style)):(function(e,t,r,o,a){const l=c.impl.options.copyDefaultStyles?function(e,t){t=function(e){var t=[];do{if(e.nodeType===u){var n=e.tagName;if(t.push(n),w.includes(n))break}}while(e=e.parentNode);return t}(t);var r=function(t){return("relaxed"!==e.styleCaching?t:t.filter(((e,t,n)=>0===t||t===n.length-1))).join(">")}(t);if(y[r])return y[r];var o=function(){if(m)return m.contentWindow;var e=document.characterSet||"UTF-8",t=(t=document.doctype)?(`<!DOCTYPE ${r(t.name)} ${r(t.publicId)} `+r(t.systemId)).trim()+">":"";return(m=document.createElement("iframe")).id="domtoimage-sandbox-"+n.uid(),m.style.visibility="hidden",m.style.position="fixed",document.body.appendChild(m),function(e,t,n,r){try{return e.contentWindow.document.write(t+`<html><head><meta charset='${n}'><title>${r}</title></head><body></body></html>`),e.contentWindow}catch(i){}var o=document.createElement("meta");o.setAttribute("charset",n);try{var a=document.implementation.createHTMLDocument(r),l=(a.head.appendChild(o),t+a.documentElement.outerHTML);return e.setAttribute("srcdoc",l),e.contentWindow}catch(i){}return e.contentDocument.head.appendChild(o),e.contentDocument.title=r,e.contentWindow}(m,t,e,"domtoimage-sandbox");function r(e){var t;return e?((t=document.createElement("div")).innerText=e,t.innerHTML):""}}();t=function(e,t){let n=e.body;do{var r=t.pop();r=e.createElement(r);n.appendChild(r),n=r}while(0<t.length);return n.textContent="",n}(o.document,t),o=function(e,t){const r={},o=e.getComputedStyle(t);return n.asArray(o).forEach((function(e){r[e]="width"===e||"height"===e?"auto":o.getPropertyValue(e)})),r}(o,t);return function(e){do{var t=e.parentElement;null!==t&&t.removeChild(e),e=t}while(e&&"BODY"!==e.tagName)}(t),y[r]=o}(e,t):{},s=a.style;n.asArray(r).forEach((function(e){var t,n=r.getPropertyValue(e),a=l[e],i=o?o.getPropertyValue(e):void 0;(n!==a||o&&n!==i)&&(a=r.getPropertyPriority(e),i=s,t=0<=["background-clip"].indexOf(e),a?(i.setProperty(e,n,a),t&&i.setProperty("-webkit-"+e,n,a)):(i.setProperty(e,n),t&&i.setProperty("-webkit-"+e,n)))}))}(r,e,l,o,t),null===o&&(["inset-block","inset-block-start","inset-block-end"].forEach((e=>t.style.removeProperty(e))),["left","right","top","bottom"].forEach((e=>{t.style.getPropertyValue(e)&&t.style.setProperty(e,"0px")}))))}i(t,e)}function i(){const r=n.uid();function o(o){const a=d(t,o),i=a.getPropertyValue("content");if(""!==i&&"none"!==i){let t=function(){const e=`.${r}:`+o,t=(a.cssText?l:s)();return document.createTextNode(e+`{${t}}`);function l(){return`${a.cssText} content: ${i};`}function s(){return n.asArray(a).map(e).join("; ")+";";function e(e){return e+": "+a.getPropertyValue(e)+(a.getPropertyPriority(e)?" !important":"")}}};const l=e.getAttribute("class")||"",s=(e.setAttribute("class",l+" "+r),document.createElement("style"));s.appendChild(t()),e.appendChild(s)}}[":before",":after"].forEach((function(e){o(e)}))}function l(){n.isHTMLTextAreaElement(t)&&(e.innerHTML=t.value),n.isHTMLInputElement(t)&&e.setAttribute("value",t.value)}function s(){n.isSVGElement(e)&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.isSVGRectElement(e))&&["width","height"].forEach((function(t){const n=e.getAttribute(t);n&&e.style.setProperty(t,n)}))}}(e,t)}))}(e,t,null)})).then(v).then(g).then((function(e){t.bgcolor&&(e.style.backgroundColor=t.bgcolor),t.width&&(e.style.width=t.width+"px"),t.height&&(e.style.height=t.height+"px"),t.style&&Object.keys(t.style).forEach((function(n){e.style[n]=t.style[n]}));let n=null;return"function"==typeof t.onclone&&(n=t.onclone(e)),Promise.resolve(n).then((function(){return e}))})).then((function(e){let r=t.width||n.width(e),o=t.height||n.height(e);return Promise.resolve(e).then((function(e){return e.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(e)})).then(n.escapeXhtml).then((function(e){var t=(n.isDimensionMissing(r)?' width="100%"':` width="${r}"`)+(n.isDimensionMissing(o)?' height="100%"':` height="${o}"`);return`<svg xmlns="http://www.w3.org/2000/svg"${(n.isDimensionMissing(r)?"":` width="${r}"`)+(n.isDimensionMissing(o)?"":` height="${o}"`)}><foreignObject${t}>${e}</foreignObject></svg>`})).then((function(e){return"data:image/svg+xml;charset=utf-8,"+e}))})).then((function(e){for(;0<o.length;){var t=o.pop();t.parent.replaceChild(t.child,t.wrapper)}return e})).then((function(e){return c.impl.urlCache=[],m&&(document.body.removeChild(m),m=null),b&&clearTimeout(b),b=setTimeout((()=>{b=null,y={}}),2e4),e}))}function h(e,t){return f(e,t=t||{}).then(n.makeImage).then((function(r){var o="number"!=typeof t.scale?1:t.scale,a=function(e,r){let o=t.width||n.width(e),a=t.height||n.height(e);return n.isDimensionMissing(o)&&(o=n.isDimensionMissing(a)?300:2*a),n.isDimensionMissing(a)&&(a=o/2),(e=document.createElement("canvas")).width=o*r,e.height=a*r,t.bgcolor&&((r=e.getContext("2d")).fillStyle=t.bgcolor,r.fillRect(0,0,e.width,e.height)),e}(e,o),i=a.getContext("2d");return i.msImageSmoothingEnabled=!1,i.imageSmoothingEnabled=!1,r&&(i.scale(o,o),i.drawImage(r,0,0)),a}))}let m=null;function v(e){return o.resolveAll().then((function(t){var n;return""!==t&&(n=document.createElement("style"),e.appendChild(n),n.appendChild(document.createTextNode(t))),e}))}function g(e){return i.inlineAll(e).then((function(){return e}))}let b=null,y={};const w=["ADDRESS","ARTICLE","ASIDE","BLOCKQUOTE","DETAILS","DIALOG","DD","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","LI","MAIN","NAV","OL","P","PRE","SECTION","SVG","TABLE","UL","math","svg","BODY","HEAD","HTML"]}(k)}(ore);var are=ore.exports;const ire={__name:"image",setup(e){const{container:n,options:r,page:o}=zN(),a=[{content:KN("export.image.png"),value:"png"},{content:KN("export.image.jpg"),value:"jpg"}],i=async({content:e,value:t})=>{if(!e)return;const a=o.value.zoomLevel;try{o.value.zoomLevel=100;const e=document.querySelector(`${n} .page-content`),a=await are.toBlob(e,{scale:devicePixelRatio}),{title:i}=r.value.document,l=""!==i?r.value.document.title:KN("document.untitled");nre.saveAs(a,`${l}${devicePixelRatio>1?"@"+devicePixelRatio+"x":""}.${t}`)}catch{const e=A$({theme:"warning",header:KN("export.image.error.title"),body:KN("export.image.error.message"),onConfirm(){e.destroy()}})}finally{o.value.zoomLevel=a}};return(e,n)=>{const r=ZU;return t.openBlock(),t.createBlock(r,{ico:"image",text:e.t("export.image.text"),"menu-type":"dropdown",huge:"","select-options":a,onClick:i},null,8,["text"])}}},lre={__name:"preview",setup(e){const{page:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"preview",text:e.t("page.preview"),shortcut:"F5",huge:"","menu-active":t.unref(n).preview.enabled,onMenuClick:r[0]||(r[0]=e=>t.unref(n).preview.enabled=!t.unref(n).preview.enabled)},null,8,["text","menu-active"])}}},sre={class:"background-container"},cre=["onClick"],ure={class:"background-more-menu"},dre=["textContent"],pre={class:"background-more-arrow"},fre=YN({__name:"background",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{container:o,page:a}=zN(),i=[{label:KN("page.bg.default"),value:a.value.defaultBackground},{label:KN("page.bg.color1"),value:"rgb(233, 246, 227)"},{label:KN("page.bg.color2"),value:"rgb(252, 242, 224)"},{label:KN("page.bg.color3"),value:"rgb(237, 244, 255)"},{label:KN("page.bg.color4"),value:"rgb(153, 205, 250)"},{label:KN("page.bg.color5"),value:"rgb(145, 145, 145)"}],l=t.ref(!1),s=e=>{a.value.background=e};return(e,c)=>{const u=dC,d=kE,p=rv,f=ZU;return t.openBlock(),t.createBlock(f,{ico:"page-background",text:e.t("page.bg.text"),huge:"","menu-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",sre,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,((e,n)=>t.createElementVNode("div",{class:t.normalizeClass(["background-item",{active:t.unref(a).background===e.value}]),style:t.normalizeStyle({backgroundColor:e.value}),key:n,onClick:t=>s(e.value)},t.toDisplayString(e.label),15,cre))),64))]),t.createVNode(p,{attach:t.unref(o),trigger:"click",placement:"right-bottom",onVisibleChange:c[0]||(c[0]=e=>l.value=e)},{content:t.withCtx((()=>[t.createVNode(d,{size:"small","color-modes":["monochrome"],"swatch-colors":[],"enable-alpha":"",onChange:s})])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["background-more",{active:l.value}])},[t.createElementVNode("div",ure,[t.createVNode(u,{name:"palette-color"}),t.createElementVNode("span",{textContent:t.toDisplayString(e.t("page.bg.custom"))},null,8,dre)]),t.createElementVNode("div",pre,[t.createVNode(u,{name:"arrow-down"})])],2)])),_:1},8,["attach"])])),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-39fc2273"]]),hre=e=>(t.pushScopeId("data-v-28f631d3"),e=e(),t.popScopeId(),e),mre={class:"watermark-container"},vre={class:"watermark-toolbar"},gre=["textContent"],bre={class:"watermark-type"},yre=hre((()=>t.createElementVNode("div",{class:"bg"},null,-1))),wre=["textContent"],kre=hre((()=>t.createElementVNode("div",{class:"bg"},null,-1))),xre=["textContent"],Ere=YN({__name:"watermark",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{options:o,page:a}=zN(),i=o.value.dicts.fonts.map((e=>({label:qN(e.label),value:e.value}))),l=()=>{a.value.watermark.text="",n.value=!1};return(e,o)=>{const s=ZU,c=qg,u=$W,d=PW,p=Eg,f=Kd;return t.openBlock(),t.createBlock(s,{ico:"watermark",text:e.t("page.watermark.text"),huge:"","menu-type":"popup","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",mre,[t.createElementVNode("div",vre,[t.createVNode(s,{style:{width:"140px"},tooltip:e.t("page.watermark.fontFamily"),"menu-type":"select","select-options":t.unref(i),value:t.unref(a).watermark.fontFamily,onMenuClick:o[0]||(o[0]=e=>t.unref(a).watermark.fontFamily=e)},null,8,["tooltip","select-options","value"]),t.createVNode(s,{"menu-type":"input",tooltip:e.t("page.watermark.fontSize")},{default:t.withCtx((()=>[t.createVNode(c,{modelValue:t.unref(a).watermark.fontSize,"onUpdate:modelValue":o[1]||(o[1]=e=>t.unref(a).watermark.fontSize=e),style:{width:"60px"},size:"small",theme:"column",align:"center",max:96,min:12,"allow-input-over-limit":!1,placeholder:""},null,8,["modelValue"])])),_:1},8,["tooltip"]),t.createVNode(u,{"menu-active":"bold"===t.unref(a).watermark.fontWeight,onMenuClickThrough:o[2]||(o[2]=e=>"bold"===t.unref(a).watermark.fontWeight?t.unref(a).watermark.fontWeight="normal":t.unref(a).watermark.fontWeight="bold")},null,8,["menu-active"]),t.createVNode(d,{text:e.t("page.watermark.fontColor"),"default-color":t.unref(a).watermark.fontColor,modeless:"",onChange:o[3]||(o[3]=e=>t.unref(a).watermark.fontColor=e)},null,8,["text","default-color"])]),t.createVNode(p,{modelValue:t.unref(a).watermark.text,"onUpdate:modelValue":o[4]||(o[4]=e=>t.unref(a).watermark.text=e),modelModifiers:{trim:!0},maxlength:"30",clearable:"",placeholder:e.t("page.watermark.content")},null,8,["modelValue","placeholder"]),t.createElementVNode("div",{class:"watermark-type-title",textContent:t.toDisplayString(e.t("page.watermark.type"))},null,8,gre),t.createElementVNode("div",bre,[t.createElementVNode("div",{class:t.normalizeClass(["item compact",{active:"compact"===t.unref(a).watermark.type}]),onClick:o[5]||(o[5]=e=>t.unref(a).watermark.type="compact")},[yre,t.createElementVNode("span",{textContent:t.toDisplayString(e.t("page.watermark.compact"))},null,8,wre)],2),t.createElementVNode("div",{class:t.normalizeClass(["item spacious",{active:"spacious"===t.unref(a).watermark.type}]),onClick:o[6]||(o[6]=e=>t.unref(a).watermark.type="spacious")},[kre,t.createElementVNode("span",{textContent:t.toDisplayString(e.t("page.watermark.spacious"))},null,8,xre)],2)]),""!==t.unref(a).watermark.text?(t.openBlock(),t.createBlock(f,{key:0,class:"clear-button",block:"",variant:"outline",textContent:t.toDisplayString(e.t("page.watermark.clear")),onClick:l},null,8,["textContent"])):t.createCommentVNode("",!0)])])),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-28f631d3"]]),Cre={__name:"line-number",setup(e){const{page:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"line-number",text:e.t("page.lineNumber"),"menu-active":t.unref(n).showLineNumber,huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).showLineNumber=!t.unref(n).showLineNumber)},null,8,["text","menu-active"])}}},Sre={__name:"break-marks",setup(e){const{page:n,editor:r}=zN(),o=()=>{n.value.showBreakMarks=!n.value.showBreakMarks,n.value.showBreakMarks?r.value.commands.showInvisibleCharacters():r.value.commands.hideInvisibleCharacters()};return(e,r)=>{const a=ZU;return t.openBlock(),t.createBlock(a,{ico:"break-marks",text:e.t("page.breakMarks"),huge:"","menu-active":t.unref(n).showBreakMarks,onMenuClick:o},null,8,["text","menu-active"])}}},Ore={__name:"break",setup(e){const{editor:n}=zN(),r=()=>{var e;null==(e=n.value)||e.chain().focus().setPageBreak().run()};return(e,n)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"page-break",text:e.t("page.break"),shortcut:"Ctrl+Enter",huge:"",onMenuClick:r},null,8,["text"])}}},_re={class:"label"},Nre={__name:"orientation",setup(e){const{page:n}=zN(),r=[{label:KN("page.orientation.landscape"),value:"landscape"},{label:KN("page.orientation.portrait"),value:"portrait"}];return(e,o)=>{const a=dC,i=eg,l=tg,s=ZU;return t.openBlock(),t.createBlock(s,{ico:"page-orientation",text:e.t("page.orientation.text"),"menu-type":"dropdown","overlay-class-name":"page-orientation-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,((e,r)=>t.createVNode(i,{key:r,value:e.value,active:t.unref(n).orientation===e.value,onClick:r=>t.unref(n).orientation=e.value},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["icon",{rotate:"vertical"===e.value}])},[t.createVNode(a,{name:"page"})],2),t.createElementVNode("div",_re,t.toDisplayString(e.label),1)])),_:2},1032,["value","active","onClick"]))),64))])),_:1})])),_:1},8,["text"])}}},Tre=["textContent"],Are={class:"desc"},Mre=["textContent"],Ire={__name:"size",setup(e){const{options:n,page:r}=zN();let o=t.ref(!1);return(e,a)=>{const i=eg,l=tg,s=fU,c=ZU;return t.openBlock(),t.createBlock(c,{ico:"page-size",text:e.t("page.size.text"),"menu-type":"dropdown","overlay-class-name":"page-size-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(l,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).dicts.pageSizes,((o,a)=>(t.openBlock(),t.createBlock(i,{key:a,value:a,active:t.unref(r).size.width===o.width,divider:t.unref(n).dicts.pageSizes.length-1===a,"min-column-width":150,onClick:e=>t.unref(r).size=o},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"label",textContent:t.toDisplayString(e.l(o.label))},null,8,Tre),t.createElementVNode("div",Are,t.toDisplayString(o.width+e.t("page.size.cm"))+" × "+t.toDisplayString(o.height+e.t("page.size.cm")),1)])),_:2},1032,["value","active","divider","onClick"])))),128)),t.createVNode(i,{onClick:a[0]||(a[0]=e=>t.isRef(o)?o.value=!0:o=!0)},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"label",textContent:t.toDisplayString(e.t("page.size.custom"))},null,8,Mre)])),_:1})])),_:1})])),default:t.withCtx((()=>[t.createVNode(s,{visible:t.unref(o),onClose:a[1]||(a[1]=e=>t.isRef(o)?o.value=!1:o=!1)},null,8,["visible"])])),_:1},8,["text"])}}},Pre={__name:"margin",setup(e){let n=t.ref(!1);return(e,r)=>{const o=fU,a=ZU;return t.openBlock(),t.createBlock(a,{ico:"page-margin",text:e.t("page.margin"),huge:"",onMenuClick:r[1]||(r[1]=e=>t.isRef(n)?n.value=!0:n=!0)},{default:t.withCtx((()=>[t.createVNode(o,{visible:t.unref(n),onClose:r[0]||(r[0]=e=>t.isRef(n)?n.value=!1:n=!1)},null,8,["visible"])])),_:1},8,["text"])}}},Lre={__name:"toggle-toc",setup(e){const{page:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"toc",text:e.t("toc.show"),huge:"","menu-active":t.unref(n).showToc,onMenuClick:r[0]||(r[0]=e=>t.unref(n).showToc=!t.unref(n).showToc)},null,8,["text","menu-active"])}}};var Rre={},Bre=/^([+-])?0*(\d+)(\.(\d+))?$/,Dre=/^([+-])?0*(\d+)(\.(\d+))?e(([+-])?(\d+))$/i,Vre=Rre.e2ten=function(e){var t=Dre.exec(e.toString());if(!t)return e;var n=t[2],r=t[4]||"",o=t[5]?+t[5]:0;if(o>0){var a=r.substr(0,o);a=a.length<o?a+new Array(o-a.length+1).join("0"):a,r=r.substr(o),n+=a}else{o=-o;var i=n.length-o;i=i<0?0:i;var l=n.substr(i,o);l=l.length<o?new Array(o-l.length+1).join("0")+l:l,n=n.substring(0,i),r=l+r}return n=""==n?"0":n,("-"==t[1]?"-":"")+n+(r?"."+r:"")};Rre.getNumbResult=function(e){var t=Bre.exec(e.toString());if(!t&&Dre.test(e.toString())&&(t=Bre.exec(Vre(e.toString()))),t)return{int:t[2],decimal:t[4],minus:"-"==t[1],num:t.slice(1,3).join("")}},Rre.centerArray=function e(t,n){if(t.splice.apply(t,[0,n.length].concat(n.splice(0,n.length))),arguments.length>2){var r=[].slice.call(arguments,2);r.unshift(t),e.apply(null,r)}return t};var jre=Rre.hasAttr=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};Rre.extend=function(e){for(var t,n=arguments[0]||{},r=Array.prototype.slice.call(arguments,1),o=0;o<r.length;o++){var a=r[o];for(t in a)jre(a,t)&&(n[t]=a[t])}return n},Rre.getDigit=function(e){return e>=5?4*(e-4)+4:e},Rre.unshiftZero=function(e,t){if(null==t&&(t=1),!(t<=0))for(;t--;)e.unshift(0)},Rre.clearZero=function(e,t,n){if(null==e)return"";var r=~"*.?+$^[](){}|\\/".indexOf(t)?"\\"+t:t,o=new RegExp("^"+r+"+"),a=new RegExp(r+"+$"),i=new RegExp(r+"{2}","g");return e=e.toString(),"^"==n&&(e=e.replace(o,"")),n&&"$"!=n||(e=e.replace(a,"")),n&&"nto1"!=n||(e=e.replace(i,t)),e};var Fre=Rre;function zre(e,t){var n=Fre.getNumbResult(e);if(!n)return e;t=t||{};var r=this.ch,o=this.ch_u,a=this.ch_f||"",i=this.ch_d||".",l=r.charAt(0),s=n.int,c=n.decimal,u="",d="",p=n.minus?a:"";if(c){c=Fre.clearZero(c,"0","$");for(var f=0;f<c.length;f++)d+=r.charAt(+c.charAt(f));d=d?i+d:""}if(u=function e(n,a,i){n=Fre.getNumbResult(n).int;var s="",c=arguments.length>1?arguments[1]:t.tenMin,u=n.length;if(1==u)return r.charAt(+n);if(u<=4)for(var d=0,p=u;p--;){var f=+n.charAt(d);s+=c&&2==u&&0==d&&1==f?"":r.charAt(f),s+=f&&p?o.charAt(p):"",d++}else{for(var h=n.length/4|0,m=n.length%4;0==m||!o.charAt(3+h);)m+=4,h--;var v=n.substr(0,m),g=n.substr(m);s=e(v,c)+o.charAt(3+h)+("0"==g.charAt(0)?l:"")+e(g,g.length>4&&c)}return s=Fre.clearZero(s,l)}(s),t.ww&&o.length>5){var h=o.charAt(4),m=o.charAt(5),v=u.lastIndexOf(m);~v&&(u=u.substring(0,v).replace(new RegExp(m,"g"),h+h)+u.substring(v))}return p+u+d}var $re={CL:zre,unCL:function(e){for(var t=(e=e.toString()).split(this.ch_d),n=t[0].replace(this.ch_f,""),r=t[1],o=!!~t[0].indexOf(this.ch_f),a=this.ch_u.charAt(1),i=this.ch_u.charAt(4),l=this.ch_u.charAt(5),s=(n=n.replace(new RegExp(i+"{2}","g"),l)).split(""),c=0,u=0,d=[],p=[],f=[],h=0;h<s.length;h++){var m,v=s[h],g=0;if(~(m=this.ch.indexOf(v)))m>0&&f.unshift(m);else if(~(g=this.ch_u.indexOf(v))){var b=Fre.getDigit(g);c>g?(Fre.unshiftZero(f,b),Fre.centerArray(p,f)):g>=u?(0==h&&(f=[1]),Fre.centerArray(d,p,f),d.length>0&&Fre.unshiftZero(d,b),u=g):(0==f.length&&a==v&&(f=[1]),Fre.centerArray(p,f),Fre.unshiftZero(p,Fre.getDigit(g)),c=g)}}Fre.centerArray(d,p,f).reverse(),0==d.length&&d.push(0);var y=0;if(r){d.push("."),y="0.";for(h=0;h<r.length;h++)y+=this.ch.indexOf(r.charAt(h)),d.push(this.ch.indexOf(r.charAt(h)));y=+y}return o&&d.unshift("-"),parseFloat(d.join(""))},toMoney:function(e,t){var n=Fre.getNumbResult(e),r=this.ch.charAt(0);if(t="object"==typeof t?t:{},!n)return e;t=Fre.extend({ww:!0,complete:!1,outSymbol:!0,unOmitYuan:!1,forceZheng:!1},t);var o=n.int,a=n.decimal||"",i=t.outSymbol?this.m_t:"",l=n.minus?this.ch_f:"",s="";if(t.complete){for(var c=1;c<this.m_u.length;c++)s+=zre.call(this,a.charAt(c-1)||"0")+this.m_u.charAt(c);l+=zre.call(this,o,t)+this.m_u.charAt(0)}else{var u=t.unOmitYuan||"0"!==o;if(a=a.substr(0,this.m_u.length-1),a=Fre.clearZero(a,"0","$")){var d;for(c=0;c<this.m_u.length-1;c++)a.charAt(c)&&"0"!=a.charAt(c)&&(s+=zre.call(this,a.charAt(c))+this.m_u.charAt(c+1),d=!1),"0"!==a.charAt(c)||d||(0==c&&"0"===o||(s+=r),d=!0)}!u&&s||(l+=zre.call(this,o,t)+this.m_u.charAt(0)),t.forceZheng?""!=s&&s.charAt(s.length-1)===this.m_u[2]||(s+=this.m_z):l+=n.decimal?"":this.m_z,t.forceZheng}return i+l+s}},Hre=Rre;var Ure=function(e,t){return{encodeS:function(t,n){return n=Hre.extend({ww:!0,tenMin:!0},n),$re.CL.call(e,t,n)},encodeB:function(e,n){return n=Hre.extend({ww:!0},n),$re.CL.call(t,e,n)},decodeS:function(){return $re.unCL.apply(e,arguments)},decodeB:function(){return $re.unCL.apply(t,arguments)},toMoney:function(e,n){return n=Hre.extend({ww:!0},n),$re.toMoney.call(t,e,n)}}};const Wre=x(Ure({ch:"零一二三四五六七八九",ch_u:"个十百千万亿",ch_f:"负",ch_d:"点"},{ch:"零壹贰叁肆伍陆柒捌玖",ch_u:"个拾佰仟万亿",ch_f:"负",ch_d:"点",m_t:"人民币",m_z:"整",m_u:"元角分"})),Gre={class:"label"},Kre={class:"desc"},qre={__name:"chinese-case",setup(e){const{editor:n}=zN(),r=[{label:"数字小写金额 → 中文大写金额",desc:"人民币伍佰肆拾叁元贰角壹分",func(e){const t=e.toString().replaceAll(",","").replaceAll("¥","").replaceAll(" ","");return Wre.toMoney(t,{unOmitYuan:!0,forceZheng:!0})}},{label:"阿拉伯数字 → 中文小写",desc:"十万零一百一十一",func:e=>Wre.encodeS(e)},{label:"科学记数法 → 中文小写",desc:"1.23456789e+21",func:e=>Wre.encodeS(e),divider:!0},{label:"中文大写金额 → 数字小写金额",desc:"¥54,321.00",func(e){const t=e.replaceAll("人民币","").replaceAll("元","").replaceAll("整",""),n=Wre.decodeB(t).toString().split(".");n[0]=n[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),2===n.length?n[1]=n[1].padEnd(2,"0"):n.push("00");return"¥"+n.join(".")}},{label:"中文小写 → 阿拉伯数字",desc:"54321",func:e=>Wre.decodeS(e)}];return(e,o)=>{const a=eg,i=tg,l=ZU;return t.openBlock(),t.createBlock(l,{ico:"chinese-case",text:e.t("tools.chineseCase.text"),tooltip:e.t("tools.chineseCase.tip"),"menu-type":"dropdown",huge:"","overlay-class-name":"chinese-case-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(i,null,{default:t.withCtx((()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(r,(e=>t.createVNode(a,{key:e.value,value:e.value,divider:e.divider,onClick:t=>(e=>{try{if(!n.value)return;const t=n.value.commands.getSelectionText();if(""===t)return;const r=e(t);if(""===r)throw new Error("转换失败");n.value.chain().focus().insertContent(r.toString()).run()}catch{I$("error","大小写转化失败,请检查当前选中的文本。")}})(e.func)},{default:t.withCtx((()=>[t.createElementVNode("div",Gre,t.toDisplayString(e.label),1),t.createElementVNode("div",Kre,t.toDisplayString(e.desc),1)])),_:2},1032,["value","divider","onClick"]))),64))])),_:1})])),_:1},8,["text","tooltip"])}}},Yre={__name:"delete",setup(e){const{editor:n}=zN(),r=()=>{const e=M$({theme:"danger",header:KN("table.delete.title"),body:KN("table.delete.message"),confirmBtn:{theme:"danger",content:KN("table.delete.delete")},onConfirm(){var t;null==(t=n.value)||t.chain().focus().deleteTable().run(),I$("success",KN("table.delete.success")),e.destroy()}})};return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-delete",text:e.t("table.delete.text"),huge:"",disabled:!(null==(a=t.unref(n))?void 0:a.can().deleteTable()),onMenuClick:r},null,8,["text","disabled"])}}},Xre={__name:"previous-cell",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-previous-cell",text:e.t("table.prevCell"),shortcut:"Shift+Tab","hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().goToPreviousCell()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().goToPreviousCell().run()})},null,8,["text","hide-text","disabled"])}}},Zre={__name:"next-cell",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-next-cell",text:e.t("table.nextCell"),shortcut:"Tab","hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().goToNextCell()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().goToNextCell().run()})},null,8,["text","hide-text","disabled"])}}},Jre={__name:"toggle-header-cell",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-header-cell",text:e.t("table.toggleHeaderCell"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderCell()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderCell().run()})},null,8,["text","hide-text","disabled"])}}},Qre={__name:"toggle-header-column",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-header-column",text:e.t("table.toggleHeaderColumn"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderColumn()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderColumn().run()})},null,8,["text","hide-text","disabled"])}}},eoe={__name:"toggle-header-row",setup(e){const{editor:n}=zN(),r=GN("toolbar");return(e,o)=>{var a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"table-header-row",text:e.t("table.toggleHeaderRow"),"hide-text":"classic"===t.unref(r).mode,disabled:!(null==(a=t.unref(n))?void 0:a.can().toggleHeaderRow()),onMenuClick:o[0]||(o[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleHeaderRow().run()})},null,8,["text","hide-text","disabled"])}}},toe={__name:"fix",setup(e){const{editor:n}=zN();return(e,r)=>{var o;const a=ZU;return t.openBlock(),t.createBlock(a,{ico:"table-fix",text:e.t("table.fix.text"),tooltip:e.t("table.fix.tip"),huge:"",disabled:!(null==(o=t.unref(n))?void 0:o.can().fixTables()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().fixTables().run()})},null,8,["text","tooltip","disabled"])}}},noe=["onMouseover"],roe={class:"table-custom"},ooe=["textContent"],aoe=YN({__name:"insert",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{editor:o}=zN(),a=Array.from({length:8},(()=>Array.from({length:10},(()=>""))));let i=t.ref({rows:0,cols:0}),l=t.ref(!0);const s=()=>{i.value.rows=0,i.value.cols=0},c=()=>{var e;const{rows:t,cols:r}=i.value;0===t||t>1e3||0===r||r>30||(null==(e=o.value)||e.chain().focus().insertTable({rows:t,cols:r,withHeaderRow:l.value}).run(),n.value=!1)};return(e,o)=>{const u=qg,d=Xy,p=Kd,f=ZU;return t.openBlock(),t.createBlock(f,{ico:"table",text:e.t("table.insert.text"),tooltip:e.t("table.insert.tip"),"menu-type":"popup",huge:"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",{class:"table-grid",onMouseleave:s},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),((e,n)=>(t.openBlock(),t.createElementBlock("div",{key:n,class:"row"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e,((e,r)=>{return t.openBlock(),t.createElementBlock("div",{key:r,class:t.normalizeClass(["cell",{selected:(o=n,a=r,i.value.rows&&i.value.rows>o&&i.value.cols&&i.value.cols>a)}]),onMouseover:e=>((e,t)=>{i.value.rows=e+1,i.value.cols=t+1})(n,r),onClick:c},null,42,noe);var o,a})),128))])))),128))],32),t.createElementVNode("div",roe,[t.createElementVNode("div",{class:"table-custom-title",textContent:t.toDisplayString(e.t("table.insert.property"))},null,8,ooe),t.createVNode(u,{modelValue:t.unref(i).rows,"onUpdate:modelValue":o[0]||(o[0]=e=>t.unref(i).rows=e),theme:"column",align:"right",max:1e3,min:0,label:e.t("table.insert.rows")},null,8,["modelValue","label"]),t.createVNode(u,{modelValue:t.unref(i).cols,"onUpdate:modelValue":o[1]||(o[1]=e=>t.unref(i).cols=e),theme:"column",align:"right",max:30,min:0,label:e.t("table.insert.cols")},null,8,["modelValue","label"]),t.createVNode(d,{modelValue:t.unref(l),"onUpdate:modelValue":o[2]||(o[2]=e=>t.isRef(l)?l.value=e:l=e)},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("table.insert.withHeader")),1)])),_:1},8,["modelValue"]),t.createVNode(p,{class:"insert-button",block:"",theme:"primary",variant:"base",textContent:t.toDisplayString(e.t("table.insert.create")),onClick:c},null,8,["textContent"])])])),_:1},8,["text","tooltip","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-0cac48db"]]),ioe={class:"title"},loe={key:0,class:"description"},soe={__name:"template",setup(e){const{options:n,editor:r}=zN();return(e,o)=>{const a=eg,i=tg,l=ZU;return t.unref(n).templates.length>0?(t.openBlock(),t.createBlock(l,{key:0,ico:"template",text:e.t("insert.template"),"menu-type":"dropdown",huge:"","overlay-class-name":"templates-dropdown"},{dropmenu:t.withCtx((()=>[t.createVNode(i,null,{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).templates,(e=>(t.openBlock(),t.createBlock(a,{key:e.value,value:e.value,divider:e.divider,class:t.normalizeClass({"has-description":e.description&&""!==e.description}),onClick:t=>(({content:e})=>{e&&r.value&&r.value.commands.insertContent(e)})(e)},{default:t.withCtx((()=>[t.createElementVNode("div",ioe,t.toDisplayString(e.title),1),e.description&&""!==e.description?(t.openBlock(),t.createElementBlock("div",loe,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])),_:2},1032,["value","divider","class","onClick"])))),128))])),_:1})])),_:1},8,["text"])):t.createCommentVNode("",!0)}}},coe={class:"page-divider-dropdown"},uoe={class:"page-divider-item-title"},doe=["textContent"],poe=["value","title","onClick"],foe=["data-type"],hoe=["textContent"],moe={class:"arrow"},voe={class:"page-divider-color-picker"},goe=YN({__name:"hr",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{container:o,editor:a}=zN(),i=[{label:KN("insert.hr.signle"),value:"signle"},{label:KN("insert.hr.double"),value:"double"},{label:KN("insert.hr.dotted"),value:"dotted"},{label:KN("insert.hr.dashed"),value:"dashed"},{label:KN("insert.hr.dashedDouble"),value:"dashed-double"},{label:KN("insert.hr.signleBold"),value:"signle-bold"},{label:KN("insert.hr.doubleBoldTop"),value:"double-bold-top"},{label:KN("insert.hr.doubleBoldBottom"),value:"double-bold-bottom"},{label:KN("insert.hr.wavy"),value:"wavy"}];let l=t.ref("#000"),s=t.ref(!1);const c=e=>{l.value=e,s.value=!1};return(e,u)=>{const d=dC,p=MW,f=rv,h=ZU;return t.openBlock(),t.createBlock(h,{ico:"hr",text:e.t("insert.hr.text"),"menu-type":"popup",huge:"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",coe,[t.createElementVNode("div",uoe,[t.createElementVNode("span",{textContent:t.toDisplayString(e.t("insert.hr.title"))},null,8,doe)]),(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(i,(e=>t.createElementVNode("div",{class:"page-divider-item",key:e.value,value:e.value,title:e.label,onClick:t=>(({value:e})=>{e&&a.value&&(a.value.chain().focus().setHr({type:e,color:l.value}).run(),n.value=!1)})(e)},[t.createElementVNode("hr",{class:"umo-page-divider","data-type":e.value,style:t.normalizeStyle({color:t.unref(l)})},null,12,foe)],8,poe))),64)),t.createVNode(f,{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=e=>t.isRef(s)?s.value=e:s=e),attach:t.unref(o),placement:"right-bottom",trigger:"click"},{content:t.withCtx((()=>[t.createElementVNode("div",voe,[t.createVNode(p,{"default-color":"#000",onChange:c})])])),default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["page-divider-item open-color-picker",{active:t.unref(s)}])},[t.createElementVNode("span",{textContent:t.toDisplayString(e.t("insert.hr.color"))},null,8,hoe),t.createElementVNode("div",moe,[t.createVNode(d,{name:"arrow-down"})])],2)])),_:1},8,["modelValue","attach"])])])),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-f5cb0a8e"]]),boe={__name:"hard-break",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"hard-break",text:e.t("insert.hardBreak"),huge:"",shortcut:"Shift+Enter",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().setHardBreak().run()})},null,8,["text"])}}},yoe={__name:"math",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"math",text:e.t("insert.math"),huge:"",onMenuClick:r[0]||(r[0]=e=>t.unref(n).chain().focus().insertContent("$\\LaTeX$").run())},null,8,["text"])}}},woe={class:"emojis-container narrow-scrollbar"},koe=["textContent"],xoe={class:"emojis-group-container"},Eoe=["onClick"],Coe=YN({__name:"emoji",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{options:o,editor:a}=zN();return(e,i)=>{const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"emoji",text:e.t("insert.emoji"),"menu-type":"popup",huge:"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",woe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).dicts.emojis,((r,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[t.createElementVNode("div",{class:"emojis-group-title",textContent:t.toDisplayString(e.l(r.label))},null,8,koe),t.createElementVNode("div",xoe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items.split(" "),((e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"emojis-group-item",key:r,onClick:t=>{return r=e,null==(o=a.value)||o.chain().focus().insertContent(r).run(),void(n.value=!1);var r,o}},t.toDisplayString(e),9,Eoe)))),128))])],64)))),128))])])),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-82570141"]]),Soe={__name:"chinese-date",setup(e){const n=e=>cN(RN(),e).value,r=e=>{const t=e=>{const t=["〇","一","二","三","四","五","六","七","八","九"];return e.toString().split("").map((e=>t[e])).join("")};return e.replace(/\d+/g,(e=>{if(4===e.length)return t(e);if(1===e.length)return t(e);if(2===e.length){const n=e.charAt(0),r=e.charAt(1);return"0"===n?t(n)+"十":"1"===n?"十"+t(r):"0"===r?t(n)+"十":t(n)+"十"+t(r)}return e}))},o=[{content:n("YYYY年M月D日")},{content:n("YYYY-M-D")},{content:n("YYYY/M/D")},{content:n("YYYY.M.D")},{content:n("YYYY年M月")},{content:n("YYYY年M月D日 dddd"),divider:!0},{content:r(n("YYYY年M月D日"))},{content:r(n("YYYY年M月"))},{content:r(n("YYYY年M月D日 dddd"))}],{editor:a}=zN(),i=({content:e})=>{var t;e&&(null==(t=a.value)||t.chain().focus().insertContent(e).run())};return(e,n)=>{const r=ZU;return t.openBlock(),t.createBlock(r,{ico:"date",text:e.t("insert.date"),"menu-type":"dropdown",huge:"","select-options":o,onClick:i},null,8,["text"])}}},Ooe={class:"symbols-container narrow-scrollbar"},_oe=["textContent"],Noe={class:"symbols-group-container"},Toe=["onClick"],Aoe=YN({__name:"symbol",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{options:o,editor:a}=zN();return(e,i)=>{const l=ZU;return t.openBlock(),t.createBlock(l,{ico:"symbol",text:e.t("insert.symbol"),"menu-type":"popup",huge:"","popup-visible":t.unref(n),onTogglePopup:t.unref(r)},{content:t.withCtx((()=>[t.createElementVNode("div",Ooe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(o).dicts.symbols,((r,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[t.createElementVNode("div",{class:"symbols-group-title",textContent:t.toDisplayString(e.l(r.label))},null,8,_oe),t.createElementVNode("div",Noe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.items.split(""),((e,r)=>(t.openBlock(),t.createElementBlock("div",{class:"symbols-group-item",key:r,onClick:t=>{return r=e,null==(o=a.value)||o.chain().focus().insertContent(r).run(),void(n.value=!1);var r,o}},t.toDisplayString(e),9,Toe)))),128))])],64)))),128))])])),_:1},8,["text","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-3457d9ba"]]),Moe={class:"link-container"},Ioe=YN({__name:"link",setup(e){const{editor:n}=zN();let r=t.ref(!1),o=t.ref(""),a=t.ref(""),i=t.ref({text:!1,href:!1});const l=()=>{var e,t;""!==o.value?a.value.startsWith("http://")||a.value.startsWith("https://")||a.value.startsWith("ftp://")||a.value.startsWith("ftps://")||a.value.startsWith("mailto://")?(i.value.text=!1,i.value.href=!1,null==(e=n.value)||e.commands.setLink({href:a.value,target:"_blank"}),null==(t=n.value)||t.chain().focus().insertContent(o.value).run(),r.value=!1):i.value.href=!0:i.value.text=!0};return t.watch((()=>r.value),(e=>{e?(o.value=n.value.commands.getSelectionText(),a.value=n.value.getAttributes("link").href||""):(o.value="",a.value="",i.value.text=!1,i.value.href=!1)})),(e,n)=>{const s=ZU,c=Eg,u=tk,d=ek,p=XH;return t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(s,{ico:"link",text:e.t("insert.link.text"),huge:"",onMenuClick:n[0]||(n[0]=e=>t.isRef(r)?r.value=!0:r=!0)},null,8,["text"]),t.createVNode(p,{visible:t.unref(r),icon:"link",header:e.t("insert.link.title"),width:"420px",draggable:"","destroy-on-close":"",confirmBtn:e.t("insert.link.insert"),onConfirm:l,onClose:n[3]||(n[3]=e=>t.isRef(r)?r.value=!1:r=!1)},{default:t.withCtx((()=>[t.createElementVNode("div",Moe,[t.createVNode(d,{"label-align":"top"},{default:t.withCtx((()=>[t.createVNode(u,{label:e.t("insert.link.hrefText")},{default:t.withCtx((()=>[t.createVNode(c,{modelValue:t.unref(o),"onUpdate:modelValue":n[1]||(n[1]=e=>t.isRef(o)?o.value=e:o=e),modelModifiers:{trim:!0},status:t.unref(i).text?"error":"default",placeholder:e.t("insert.link.hrefTextTip"),clearable:""},null,8,["modelValue","status","placeholder"])])),_:1},8,["label"]),t.createVNode(u,{label:e.t("insert.link.href")},{default:t.withCtx((()=>[t.createVNode(c,{modelValue:t.unref(a),"onUpdate:modelValue":n[2]||(n[2]=e=>t.isRef(a)?a.value=e:a=e),status:t.unref(i).href?"error":"default",type:"url",clearable:"",placeholder:e.t("insert.link.hrefTip")},null,8,["modelValue","status","placeholder"])])),_:1},8,["label"])])),_:1})])])),_:1},8,["visible","header","confirmBtn"])],64)}}},[["__scopeId","data-v-cb93cc3e"]]),Poe={__name:"print",setup(e){const{printing:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{text:e.t("print.text"),ico:"print",shortcut:"Ctrl+P",huge:"",onMenuClick:r[0]||(r[0]=e=>n.value=!0)},null,8,["text"])}}},Loe={__name:"search-replace",setup(e){const{searchReplace:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"search-replace",text:e.t("search.text"),shortcut:"Ctrl+F",huge:"",onMenuClick:r[0]||(r[0]=e=>n.value=!0)},null,8,["text"])}}},Roe={__name:"markdown",setup(e){const{options:n,editorDestroyed:r}=zN(),o=GN("document"),a=()=>{const e=M$({theme:"warning",header:o.value.enableMarkdown?KN("base.markdown.disable"):KN("base.markdown.enable"),body:KN("base.markdown.message"),confirmBtn:{theme:"warning",content:KN("base.markdown.toggle")},async onConfirm(){o.value.markdown=!o.value.markdown,e.destroy(),await t.nextTick(),r.value=!0,await t.nextTick(),r.value=!1}})};return(e,r)=>{const i=ZU;return t.unref(n).document.enableMarkdown?(t.openBlock(),t.createBlock(i,{key:0,text:e.t("base.markdown.text"),ico:"markdown",tooltip:t.unref(n).document.enableMarkdown?e.t("base.markdown.disable"):e.t("base.markdown.enable"),"menu-active":t.unref(o).markdown,huge:"",onMenuClick:a},null,8,["text","tooltip","menu-active"])):t.createCommentVNode("",!0)}}},Boe={__name:"code",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"code",text:e.t("base.code"),shortcut:"Ctrl+E","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("code"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleCode().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleCode().run()})},null,8,["text","menu-active","disabled"])}}},Doe={__name:"quote",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{text:e.t("base.quote"),ico:"quote",shortcut:"Ctrl+Shift+B","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("blockquote"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleBlockquote().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleBlockquote().run()})},null,8,["text","menu-active","disabled"])}}},Voe={__name:"line-height",setup(e){const{options:n,editor:r}=zN(),o=t.computed((()=>n.value.dicts.lineHeights.map((e=>{var t;return{content:e.default?qN(e.label)+KN("base.lineHeight.default"):qN(e.label),value:e.value,active:null==(t=r.value)?void 0:t.isActive({lineHeight:e.value})}})))),a=({content:e,value:t})=>{var n;e&&(null==(n=r.value)||n.chain().focus().setLineHeight(t).run())};return(e,n)=>{const r=ZU;return t.openBlock(),t.createBlock(r,{text:e.t("base.lineHeight.text"),ico:"line-height","menu-type":"dropdown","hide-text":"","select-options":t.unref(o),onClick:a},null,8,["text","select-options"])}}},joe={__name:"outdent",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"outdent",text:e.t("base.outdent"),shortcut:"Shift+Tab","hide-text":"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().outdent().run()})},null,8,["text"])}}},Foe={__name:"indent",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{text:e.t("base.indent"),ico:"indent",shortcut:"Tab","hide-text":"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().indent().run()})},null,8,["text"])}}},zoe={__name:"task-list",setup(e){const{editor:n}=zN();return(e,r)=>{var o;const a=eg,i=tg,l=ZU;return t.openBlock(),t.createBlock(l,{ico:"task-list",text:e.t("list.task.text"),shortcut:"Ctrl+Shift+9","menu-type":"dropdown","popup-handle":"arrow","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("taskList"),onMenuClick:r[3]||(r[3]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().toggleTaskList().run()})},{dropmenu:t.withCtx((()=>[t.createVNode(i,null,{default:t.withCtx((()=>{var o,i,l;return[t.createVNode(a,{disabled:!(null==(o=t.unref(n))?void 0:o.can().splitListItem("taskItem")),onClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().splitListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("list.task.split")),1)])),_:1},8,["disabled"]),t.createVNode(a,{disabled:!(null==(i=t.unref(n))?void 0:i.can().sinkListItem("taskItem")),onClick:r[1]||(r[1]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().sinkListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("list.task.sink")),1)])),_:1},8,["disabled"]),t.createVNode(a,{disabled:!(null==(l=t.unref(n))?void 0:l.can().liftListItem("taskItem")),onClick:r[2]||(r[2]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().liftListItem("taskItem").run()})},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.t("list.task.lift")),1)])),_:1},8,["disabled"])]})),_:1})])),_:1},8,["text","menu-active"])}}},$oe={class:"bullet-list-group"},Hoe=["onClick"],Uoe=YN({__name:"bullet-list",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{editor:o}=zN(),a=[{label:KN("list.bullet.disc"),value:"disc"},{label:KN("list.bullet.circle"),value:"circle"},{label:KN("list.bullet.square"),value:"square"}];let i=t.ref("");t.watch((()=>n.value),(e=>{if(e&&o.value){const{listStyleType:e}=o.value.getAttributes("bulletList");i.value=(null==e?void 0:e.listStyleType)||e||""}}));const l=e=>{var t,r;const a=null==(t=o.value)?void 0:t.chain().focus();(null==(r=o.value)?void 0:r.isActive("bulletList"))?o.value.getAttributes("bulletList").listStyleType!==e?a.updateAttributes("bulletList",{listStyleType:e}).run():a.toggleBulletList().run():a.toggleBulletList().updateAttributes("bulletList",{listStyleType:e}).run(),i.value=e,n.value=!1};return(e,s)=>{var c;const u=dC,d=oT,p=ZU;return t.openBlock(),t.createBlock(p,{ico:"bullet-list",text:e.t("list.bullet.text"),shortcut:"Ctrl+Shift+8","menu-type":"popup","popup-handle":"arrow","hide-text":"","menu-active":null==(c=t.unref(o))?void 0:c.isActive("bulletList"),"popup-visible":t.unref(n),onTogglePopup:t.unref(r),onMenuClick:s[0]||(s[0]=e=>l(a[0].value))},{content:t.withCtx((()=>[t.createElementVNode("div",$oe,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,(e=>t.createVNode(d,{key:e.value,content:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["bullet-list-item",{active:t.unref(i)==e.value}]),onClick:t=>l(e.value)},[t.createVNode(u,{class:"icon-bullet-list",name:`bullet-list-${e.value}`},null,8,["name"])],10,Hoe)])),_:2},1032,["content"]))),64))])])),_:1},8,["text","menu-active","popup-visible","onTogglePopup"])}}},[["__scopeId","data-v-3948bf22"]]),Woe={class:"ordered-list-group"},Goe=["onClick"],Koe=(e=>(t.pushScopeId("data-v-e6992af3"),e=e(),t.popScopeId(),e))((()=>t.createElementVNode("div",{class:"ordered-list-divider"},null,-1))),qoe=["textContent"],Yoe={class:"ordered-list-properties"},Xoe=["textContent"],Zoe=YN({__name:"ordered-list",setup(e){let{popupVisible:n,togglePopup:r}=IW();const{editor:o}=zN(),a=[{label:KN("list.ordered.decimal"),value:"decimal"},{label:KN("list.ordered.decimalLeadingZero"),value:"decimal-leading-zero"},{label:KN("list.ordered.lowerRoman"),value:"lower-roman"},{label:KN("list.ordered.upperRoman"),value:"upper-roman"},{label:KN("list.ordered.lowerLatin"),value:"lower-latin"},{label:KN("list.ordered.upperLatin"),value:"upper-latin"},{label:KN("list.ordered.tradChineseInformal"),value:"trad-chinese-informal"},{label:KN("list.ordered.simpChineseFormal"),value:"simp-chinese-formal"}];let i=t.ref("left");t.watch((()=>n.value),(e=>{if(e&&o.value){const{listStyleType:e}=o.value.getAttributes("orderedList");i.value=(null==e?void 0:e.listStyleType)||e||""}}));const l=e=>{var t,r;const a=null==(t=o.value)?void 0:t.chain().focus();(null==(r=o.value)?void 0:r.isActive("orderedList"))?o.value.getAttributes("orderedList").listStyleType!==e?a.updateAttributes("orderedList",{listStyleType:e}).run():a.toggleOrderedList().run():a.toggleOrderedList().updateAttributes("orderedList",{listStyleType:e}).run(),i.value=e,n.value=!1};let s=t.ref(1);const c=()=>{var e;o.value&&(null==(e=o.value)||e.chain().focus().updateAttributes("orderedList",{start:s.value}).run())};return t.watch((()=>n.value),(e=>{e&&o.value?s.value=o.value.getAttributes("orderedList").start:s.value=1})),(e,u)=>{var d;const p=dC,f=oT,h=qg,m=ZU;return t.openBlock(),t.createBlock(m,{ico:"ordered-list",text:e.t("list.ordered.text"),shortcut:"Ctrl+Shift+7","menu-type":"popup","popup-handle":"arrow","hide-text":"","popup-visible":t.unref(n),"menu-active":null==(d=t.unref(o))?void 0:d.isActive("orderedList"),onTogglePopup:t.unref(r),onMenuClick:u[1]||(u[1]=e=>l(a[0].value))},{content:t.withCtx((()=>[t.createElementVNode("div",Woe,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,(e=>t.createVNode(f,{key:e.value,content:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["ordered-list-item",{active:t.unref(i)==e.value}]),onClick:t=>l(e.value)},[t.createVNode(p,{class:"icon-ordered-list",name:`ordered-list-${e.value}`},null,8,["name"])],10,Goe)])),_:2},1032,["content"]))),64))]),Koe,t.createElementVNode("div",{class:"ordered-list-title",textContent:t.toDisplayString(e.t("list.ordered.property"))},null,8,qoe),t.createElementVNode("div",Yoe,[t.createVNode(h,{modelValue:t.unref(s),"onUpdate:modelValue":u[0]||(u[0]=e=>t.isRef(s)?s.value=e:s=e),min:1,align:"left",theme:"column",onChange:c},{label:t.withCtx((()=>[t.createElementVNode("span",{textContent:t.toDisplayString(e.t("list.ordered.startAt"))},null,8,Xoe)])),_:1},8,["modelValue"])])])),_:1},8,["text","popup-visible","menu-active","onTogglePopup"])}}},[["__scopeId","data-v-e6992af3"]]),Joe={__name:"superscript",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"superscript",text:e.t("base.superscript"),shortcut:"Ctrl+.","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("superscript"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleSuperscript().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.commands.toggleSuperscript()})},null,8,["text","menu-active","disabled"])}}},Qoe={__name:"subscript",setup(e){const{editor:n}=zN();return(e,r)=>{var o,a;const i=ZU;return t.openBlock(),t.createBlock(i,{ico:"subscript",text:e.t("base.subscript"),shortcut:"Ctrl+,","hide-text":"","menu-active":null==(o=t.unref(n))?void 0:o.isActive("subscript"),disabled:!(null==(a=t.unref(n))?void 0:a.can().chain().focus().toggleSubscript().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.commands.toggleSubscript()})},null,8,["text","menu-active","disabled"])}}},eae=["textContent"],tae=["title"],nae={__name:"font-family",setup(e){const{options:n,editor:r}=zN(),o=GN("toolbar"),a=GN("recent");let i=t.ref([]);const l=e=>{if(!e)return!0;if("string"!=typeof e)return!1;const t="fontname",n=100,r=100,o=document.createElement("canvas"),a=o.getContext("2d",{willReadFrequently:!0});o.width=n,o.height=r,a.textAlign="center",a.fillStyle="black",a.textBaseline="middle";const i=e=>{a.clearRect(0,0,n,r),a.font=`100px ${e}, ${t}`,a.fillText("text",50,50);const{data:o}=a.getImageData(0,0,n,r);return Array.from(o).filter((e=>0!==e))};return i(t).join("")!==i(e).join("")},s=t.computed((()=>{const e=[{label:KN("base.fontFamily.all"),children:n.value.dicts.fonts}],t=e=>e.map((e=>n.value.dicts.fonts.find((({value:t})=>t===e))||{label:e,item:e}));return a.value.fonts.length>0&&e.unshift({label:KN("base.fontFamily.recent"),children:t(a.value.fonts)}),i.value.length>0&&e.unshift({label:KN("base.fontFamily.used"),children:t(i.value)}),e})),c=()=>{const e=JSON.stringify(r.value.getJSON()).match(/"fontFamily":"([^"]+)"/g);e&&e.forEach((e=>{const t=e.replace('"fontFamily":"',"").replace('"',"");i.value.includes(t)||i.value.push(t)}))},u=e=>{e&&(a.value.fonts.forEach(((t,n)=>{t===e&&a.value.fonts.splice(n,1)})),a.value.fonts.unshift(e),a.value.fonts.length>10&&a.value.fonts.splice(10,1)),r.value.chain().focus().setFontFamily(e).run(),c()};return t.watch((()=>r.value),(e=>{e&&c()})),(e,n)=>{var a;const i=xw,c=Ew,d=ZU;return t.openBlock(),t.createBlock(d,{text:e.t("base.fontFamily.text"),"menu-type":"select","hide-text":"",value:(null==(a=t.unref(r))?void 0:a.getAttributes("textStyle").fontFamily)||null,style:t.normalizeStyle({width:"classic"!==t.unref(o).mode?"144px":"90px"}),filterable:"",onMenuClick:u},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(s),((n,r)=>(t.openBlock(),t.createBlock(c,{key:r,label:n.label,divider:!1},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.children,(n=>(t.openBlock(),t.createBlock(i,{class:"font-family-item",value:n.value,key:n.value,label:e.l(n.label)},{default:t.withCtx((()=>[t.createElementVNode("span",{style:t.normalizeStyle({fontFamily:n.value}),textContent:t.toDisplayString(e.l(n.label))},null,12,eae),l(n.value)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:"unsupport",title:e.t("base.fontFamily.unsupport")},"!",8,tae))])),_:2},1032,["value","label"])))),128))])),_:2},1032,["label"])))),128))])),_:1},8,["text","value","style"])}}},rae=["disabled"],oae={class:"heading-container"},aae=["onClick"],iae={class:"subtitle"},lae=["onClick"],sae={class:"subtitle"},cae=YN({__name:"heading",setup(e){let{popupVisible:n}=IW();const{container:r,editor:o}=zN(),a=GN("toolbar"),i=t.ref(null),l=t.ref([{label:KN("base.heading.paragraph"),desc:"text",value:"paragraph"}]);for(let t in Array.from({length:6})){const e=Number(t)+1;l.value.push({label:`${KN("base.heading.text",{level:e})}`,desc:`h${e}`,value:e})}const s=t.computed((()=>{var e;const t=e=>{var t;return null==(t=o.value)?void 0:t.isActive("heading",{level:e})};if(o.value){if(null==(e=o.value)?void 0:e.isActive("paragraph"))return"paragraph";if(t(1))return 1;if(t(2))return 2;if(t(3))return 3;if(t(4))return 4;if(t(5))return 5;if(t(6))return 6}return""})),c=e=>{var t,r;"paragraph"===e?null==(t=o.value)||t.chain().focus().setParagraph().run():null==(r=o.value)||r.chain().focus().toggleHeading({level:e}).run(),n.value=!1};return gN(i,(()=>{n.value=!1}),{ignore:[".umo-popup"]}),(e,u)=>{var d;const p=dC,f=rv,h=xw,m=ZU;return"classic"!==t.unref(a).mode?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["toolbar-headding",{unfold:t.unref(n)}]),disabled:!(null==(d=t.unref(o))?void 0:d.isEditable)},[t.createElementVNode("div",oae,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((e,n)=>{var r;return t.openBlock(),t.createElementBlock(t.Fragment,{key:e.value},[n<4?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",{active:e.value===t.unref(s)&&(null==(r=t.unref(o))?void 0:r.isEditable)}]),onClick:t=>c(e.value)},[t.createElementVNode("div",{class:t.normalizeClass(["title",e.desc])},t.toDisplayString(e.label),3),t.createElementVNode("div",iae,t.toDisplayString(e.desc),1)],10,aae)):t.createCommentVNode("",!0)],64)})),128)),t.createVNode(f,{attach:t.unref(r),trigger:"click",placement:"bottom-right","overlay-class-name":"heading-container-popup","destroy-on-close":"",visible:t.unref(n)},{content:t.withCtx((()=>[t.createElementVNode("div",{ref_key:"popupContentRef",ref:i,class:"heading-container"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,((e,n)=>{var r;return t.openBlock(),t.createElementBlock(t.Fragment,{key:e.value},[n>=4?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["card",{active:e.value===t.unref(s)&&(null==(r=t.unref(o))?void 0:r.isEditable)}]),onClick:t=>c(e.value)},[t.createElementVNode("div",{class:t.normalizeClass(["title",e.desc])},t.toDisplayString(e.label),3),t.createElementVNode("div",sae,t.toDisplayString(e.desc),1)],10,lae)):t.createCommentVNode("",!0)],64)})),128))],512)])),default:t.withCtx((()=>[t.createElementVNode("div",{class:"arrow",onClick:u[0]||(u[0]=e=>t.isRef(n)?n.value=!t.unref(n):n=!t.unref(n))},[t.createVNode(p,{name:"arrow-down"})])])),_:1},8,["attach","visible"])])],10,rae)):(t.openBlock(),t.createBlock(m,{key:1,text:e.t("base.heading.tip"),"hide-text":"","menu-type":"select",style:{width:"76px"},placeholder:e.t("base.heading.text"),borderless:"",value:t.unref(s),onMenuClick:c},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(e=>(t.openBlock(),t.createBlock(h,{class:"editor-heading-select-option",key:e.value,value:e.value,label:e.label},{default:t.withCtx((()=>[t.createElementVNode("div",{class:t.normalizeClass(["heading-size",e.desc])},t.toDisplayString(e.label),3)])),_:2},1032,["value","label"])))),128))])),_:1},8,["text","placeholder","value"]))}}},[["__scopeId","data-v-6d518fd8"]]),uae={__name:"clear-format",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"clear-format",text:e.t("base.clearFormat"),"hide-text":"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().unsetAllMarks().run()})},null,8,["text"])}}},dae={__name:"select-all",setup(e){const{editor:n}=zN();return(e,r)=>{const o=ZU;return t.openBlock(),t.createBlock(o,{ico:"select-all",text:e.t("base.selectAll"),shortcut:"Ctrl+A","hide-text":"",onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().selectAll().run()})},null,8,["text"])}}},pae={__name:"redo",setup(e){const{editor:n}=zN();return(e,r)=>{var o;const a=ZU;return t.openBlock(),t.createBlock(a,{ico:"redo",text:e.t("base.redo"),shortcut:"Ctrl+Y / Ctrl+Shift+Z","hide-text":"",disabled:!(null==(o=t.unref(n))?void 0:o.can().chain().focus().redo().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().redo().run()})},null,8,["text","disabled"])}}},fae={__name:"undo",setup(e){const{editor:n}=zN();return(e,r)=>{var o;const a=ZU;return t.openBlock(),t.createBlock(a,{ico:"undo",text:e.t("base.undo"),shortcut:"Ctrl+Z","hide-text":"",disabled:!(null==(o=t.unref(n))?void 0:o.can().chain().focus().undo().run()),onMenuClick:r[0]||(r[0]=e=>{var r;return null==(r=t.unref(n))?void 0:r.chain().focus().undo().run()})},null,8,["text","disabled"])}}},hae={class:"classic-menu"},mae={key:0,class:"virtual-group"},vae={class:"virtual-group"},gae={class:"virtual-group"},bae={class:"virtual-group"},yae={class:"virtual-group"},wae={class:"virtual-group"},kae={class:"virtual-group"},xae={class:"virtual-group"},Eae={class:"virtual-group"},Cae={class:"virtual-group"},Sae={class:"virtual-group"},Oae={class:"virtual-group"},_ae={class:"virtual-group"},Nae={class:"virtual-group"},Tae={class:"virtual-group"},Aae={class:"virtual-group"},Mae={class:"virtual-group"},Iae={class:"virtual-group"},Pae={class:"virtual-group"},Lae={class:"virtual-group"},Rae={class:"virtual-group"},Bae={class:"virtual-group"},Dae={class:"virtual-group"},Vae={class:"virtual-group-row"},jae={class:"virtual-group"},Fae={class:"virtual-group"},zae={class:"virtual-group"},$ae={class:"virtual-group"},Hae=YN({__name:"classic",props:{menus:{type:Array,required:!0},currentMenu:{type:String,required:!0}},emits:["menu-change"],setup(e,{emit:n}){const r=e,o=n,{container:a,options:i}=zN(),l=e=>i.value.toolbar.disableMenuItems.includes(e);let s=t.ref("");t.watch((()=>r.currentMenu),(async e=>{s.value=e,await t.nextTick();try{c.value.update()}catch{}}),{immediate:!0});const c=t.ref(),u=async e=>{o("menu-change",e),await t.nextTick(),c.value.update()};return(n,r)=>{const o=dC,i=xw,d=kw,p=fae,f=pae,h=dae,m=uae,v=cae,g=nae,b=LG,y=$W,w=zW,k=PG,x=IG,E=Qoe,C=Joe,S=PW,O=HW,_=_G,N=Zoe,T=Uoe,A=zoe,M=Foe,I=joe,P=Voe,L=MG,R=Doe,B=Boe,D=Roe,V=Loe,j=Poe,F=Ioe,z=kG,$=wG,H=yG,U=bG,W=gG,G=Aoe,K=Soe,q=Coe,Y=yoe,X=boe,Z=goe,J=vG,Q=mG,ee=soe,te=hG,ne=aoe,re=toe,oe=cK,ae=sK,ie=lK,le=iK,se=aK,ce=oK,ue=rK,de=nK,pe=tK,fe=eK,he=eoe,me=Qre,ve=Jre,ge=Zre,be=Xre,ye=Yre,we=dG,ke=QW,xe=DW,Ee=vW,Ce=dW,Se=iW,Oe=qre,_e=Lre,Ne=Pre,Te=Ire,Ae=Nre,Me=Ore,Ie=Sre,Pe=Cre,Le=Ere,Re=fre,Be=lre,De=ire,Ve=rre,je=ere,Fe=Zne,ze=qne;return t.openBlock(),t.createBlock(ze,{ref_key:"scrollableRef",ref:c,class:"scrollable-container"},{default:t.withCtx((()=>[t.createElementVNode("div",hae,[e.menus.length>1?(t.openBlock(),t.createElementBlock("div",mae,[t.createVNode(d,{modelValue:t.unref(s),"onUpdate:modelValue":r[0]||(r[0]=e=>t.isRef(s)?s.value=e:s=e),"popup-props":{destroyOnClose:!0,attach:t.unref(a)},size:"small","auto-width":"",borderless:"",onChange:u},{prefixIcon:t.withCtx((()=>[t.createVNode(o,{name:"menu"})])),default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.menus,(e=>(t.openBlock(),t.createBlock(i,{key:e.value,label:e.label,value:e.value},null,8,["label","value"])))),128))])),_:1},8,["modelValue","popup-props"])])):t.createCommentVNode("",!0),"base"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",vae,[t.createVNode(p),t.createVNode(f),t.createVNode(h),t.createVNode(m)]),t.createElementVNode("div",gae,[t.createVNode(v),t.createVNode(g,{borderless:""}),t.createVNode(b,{borderless:""}),t.createVNode(y),t.createVNode(w),t.createVNode(k),t.createVNode(x),t.createVNode(E),t.createVNode(C),t.createVNode(S),t.createVNode(O),t.createVNode(_)]),t.createElementVNode("div",bae,[t.createVNode(N),t.createVNode(T),t.createVNode(A),t.createVNode(M),t.createVNode(I),t.createVNode(P),t.createVNode(L),t.createVNode(R),l("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(B,{key:0}))]),t.createElementVNode("div",yae,[t.createVNode(D),t.createVNode(V)]),t.createElementVNode("div",wae,[l("print")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(j,{key:0}))])],64)):t.createCommentVNode("",!0),"insert"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",kae,[t.createVNode(F),t.createVNode(z),l("video")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock($,{key:0})),l("audio")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(H,{key:1})),l("file")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(U,{key:2})),l("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(W,{key:3})),t.createVNode(G),l("chineseDate")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(K,{key:4})),l("emoji")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(q,{key:5})),l("math")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Y,{key:6}))]),t.createElementVNode("div",xae,[t.createVNode(X),t.createVNode(Z),t.createVNode(J),t.createVNode(Q)]),t.createElementVNode("div",Eae,[t.createVNode(ee),t.createVNode(te)])],64)):t.createCommentVNode("",!0),"table"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",Cae,[t.createVNode(ne),t.createVNode(re)]),t.createElementVNode("div",Sae,[t.createVNode(oe),t.createVNode(ae)]),t.createElementVNode("div",Oae,[t.createVNode(ie,{huge:!1}),t.createVNode(le,{huge:!1}),t.createVNode(se,{huge:!1}),t.createVNode(ce,{huge:!1})]),t.createElementVNode("div",_ae,[t.createVNode(ue,{huge:!1}),t.createVNode(de,{huge:!1})]),t.createElementVNode("div",Nae,[t.createVNode(pe,{huge:!1}),t.createVNode(fe,{huge:!1})]),t.createElementVNode("div",Tae,[t.createVNode(he,{huge:!1}),t.createVNode(me,{huge:!1}),t.createVNode(ve,{huge:!1})]),t.createElementVNode("div",Aae,[t.createVNode(ge,{huge:!1}),t.createVNode(be,{huge:!1})]),t.createElementVNode("div",Mae,[t.createVNode(ye)])],64)):t.createCommentVNode("",!0),"tools"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",Iae,[t.createVNode(we),t.createVNode(ke)]),t.createElementVNode("div",Pae,[l("signature")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(xe,{key:0})),l("seal")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ee,{key:1}))]),t.createElementVNode("div",Lae,[l("diagrams")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ce,{key:0})),l("mermaid")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Se,{key:1}))]),t.createElementVNode("div",Rae,[l("chineseCase")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Oe,{key:0}))])],64)):t.createCommentVNode("",!0),"page"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",Bae,[t.createVNode(_e)]),t.createElementVNode("div",Dae,[t.createElementVNode("div",Vae,[t.createVNode(Ne),t.createVNode(Te),t.createVNode(Ae)])]),t.createElementVNode("div",jae,[t.createVNode(Me),t.createVNode(Ie),t.createVNode(Pe),t.createVNode(Le),t.createVNode(Re)]),t.createElementVNode("div",Fae,[t.createVNode(Be)])],64)):t.createCommentVNode("",!0),"export"===t.unref(s)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:6},[t.createElementVNode("div",zae,[t.createVNode(De),t.createVNode(Ve)]),t.createElementVNode("div",$ae,[l("share")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(je,{key:0})),l("embed")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Fe,{key:1}))])],64)):t.createCommentVNode("",!0)])])),_:1},512)}}},[["__scopeId","data-v-b4e870e5"]]),Uae={class:"ribbon-menu"},Wae={key:0,class:"ribbon-tabs"},Gae=["onClick"],Kae={class:"ribbon-container"},qae={class:"virtual-group"},Yae={class:"virtual-group-row"},Xae={class:"virtual-group-row"},Zae={class:"virtual-group"},Jae={class:"virtual-group-row"},Qae={class:"virtual-group-row"},eie={class:"virtual-group"},tie={class:"virtual-group-row"},nie={class:"virtual-group-row"},rie={class:"virtual-group"},oie={class:"virtual-group"},aie={class:"virtual-group"},iie={class:"virtual-group"},lie={class:"virtual-group"},sie={class:"virtual-group"},cie={class:"virtual-group"},uie={class:"virtual-group"},die={class:"virtual-group"},pie={class:"virtual-group-row"},fie={class:"virtual-group-row"},hie={class:"virtual-group"},mie={class:"virtual-group-row"},vie={class:"virtual-group-row"},gie={class:"virtual-group"},bie={class:"virtual-group-row"},yie={class:"virtual-group-row"},wie={class:"virtual-group"},kie={class:"virtual-group-row"},xie={class:"virtual-group-row"},Eie={class:"virtual-group"},Cie={class:"virtual-group"},Sie={class:"virtual-group"},Oie={class:"virtual-group"},_ie={class:"virtual-group"},Nie={class:"virtual-group"},Tie={class:"virtual-group"},Aie={class:"virtual-group-row"},Mie={class:"virtual-group-row"},Iie={class:"virtual-group-row"},Pie={class:"virtual-group"},Lie={class:"virtual-group"},Rie={class:"virtual-group"},Bie={class:"virtual-group"},Die=YN({__name:"ribbon",props:{menus:{type:Array,required:!0},currentMenu:{type:String,required:!0}},emits:["menu-change"],setup(e,{emit:n}){const r=n,o=e=>{const{options:t}=zN();return t.value.toolbar.disableMenuItems.includes(e)},a=t.ref();return(n,i)=>{const l=fae,s=pae,c=dae,u=uae,d=nae,p=LG,f=$W,h=zW,m=PG,v=IG,g=Qoe,b=Joe,y=PW,w=HW,k=_G,x=Zoe,E=Uoe,C=zoe,S=Foe,O=joe,_=Voe,N=FW,T=jW,A=VW,M=TG,I=NG,P=Doe,L=Boe,R=cae,B=Roe,D=Loe,V=Poe,j=Ioe,F=kG,z=wG,$=yG,H=bG,U=gG,W=Aoe,G=Soe,K=Coe,q=yoe,Y=boe,X=goe,Z=vG,J=mG,Q=soe,ee=hG,te=aoe,ne=toe,re=cK,oe=sK,ae=lK,ie=iK,le=rK,se=aK,ce=oK,ue=nK,de=tK,pe=eK,fe=eoe,he=Qre,me=Jre,ve=Zre,ge=Xre,be=Yre,ye=dG,we=QW,ke=DW,xe=vW,Ee=dW,Ce=iW,Se=qre,Oe=Lre,_e=Pre,Ne=Ire,Te=Nre,Ae=Ore,Me=Sre,Ie=Cre,Pe=Ere,Le=fre,Re=lre,Be=ire,De=rre,Ve=ere,je=Zne,Fe=qne;return t.openBlock(),t.createElementBlock("div",Uae,[e.menus.length>1?(t.openBlock(),t.createElementBlock("div",Wae,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.menus,(n=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["tabs-item",{active:e.currentMenu===n.value}]),key:n.value,onClick:e=>(async e=>{r("menu-change",e),await t.nextTick(),a.value.update()})(n.value)},t.toDisplayString(n.label),11,Gae)))),128))])):t.createCommentVNode("",!0),t.createVNode(Fe,{ref_key:"scrollableRef",ref:a,class:"scrollable-container"},{default:t.withCtx((()=>[t.createElementVNode("div",Kae,["base"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("div",qae,[t.createElementVNode("div",Yae,[t.createVNode(l),t.createVNode(s)]),t.createElementVNode("div",Xae,[t.createVNode(c),t.createVNode(u)])]),t.createElementVNode("div",Zae,[t.createElementVNode("div",Jae,[t.createVNode(d),t.createVNode(p)]),t.createElementVNode("div",Qae,[t.createVNode(f),t.createVNode(h),t.createVNode(m),t.createVNode(v),t.createVNode(g),t.createVNode(b),t.createVNode(y),t.createVNode(w),t.createVNode(k)])]),t.createElementVNode("div",eie,[t.createElementVNode("div",tie,[t.createVNode(x),t.createVNode(E),t.createVNode(C),t.createVNode(S),t.createVNode(O),t.createVNode(_)]),t.createElementVNode("div",nie,[t.createVNode(N),t.createVNode(T),t.createVNode(A),t.createVNode(M),t.createVNode(I),t.createVNode(P),o("code")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(L,{key:0}))])]),t.createElementVNode("div",rie,[t.createVNode(R)]),t.createElementVNode("div",oie,[t.createVNode(B),t.createVNode(D)]),t.createElementVNode("div",aie,[o("print")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(V,{key:0}))])],64)):t.createCommentVNode("",!0),"insert"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",iie,[t.createVNode(j),t.createVNode(F),o("video")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(z,{key:0})),o("audio")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock($,{key:1})),o("file")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(H,{key:2})),o("code-block")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(U,{key:3})),t.createVNode(W),o("chineseDate")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(G,{key:4})),o("emoji")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(K,{key:5})),o("math")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(q,{key:6}))]),t.createElementVNode("div",lie,[t.createVNode(Y),t.createVNode(X),t.createVNode(Z),t.createVNode(J)]),t.createElementVNode("div",sie,[t.createVNode(Q),t.createVNode(ee)])],64)):t.createCommentVNode("",!0),"table"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",cie,[t.createVNode(te),t.createVNode(ne)]),t.createElementVNode("div",uie,[t.createVNode(re),t.createVNode(oe)]),t.createElementVNode("div",die,[t.createElementVNode("div",pie,[t.createVNode(ae),t.createVNode(ie),t.createVNode(le)]),t.createElementVNode("div",fie,[t.createVNode(se),t.createVNode(ce),t.createVNode(ue)])]),t.createElementVNode("div",hie,[t.createElementVNode("div",mie,[t.createVNode(de)]),t.createElementVNode("div",vie,[t.createVNode(pe)])]),t.createElementVNode("div",gie,[t.createElementVNode("div",bie,[t.createVNode(fe),t.createVNode(he)]),t.createElementVNode("div",yie,[t.createVNode(me)])]),t.createElementVNode("div",wie,[t.createElementVNode("div",kie,[t.createVNode(ve)]),t.createElementVNode("div",xie,[t.createVNode(ge)])]),t.createElementVNode("div",Eie,[t.createVNode(be)])],64)):t.createCommentVNode("",!0),"tools"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[t.createElementVNode("div",Cie,[t.createVNode(ye),t.createVNode(we)]),t.createElementVNode("div",Sie,[o("signature")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(ke,{key:0})),o("seal")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(xe,{key:1}))]),t.createElementVNode("div",Oie,[o("diagrams")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ee,{key:0})),o("mermaid")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ce,{key:1}))]),t.createElementVNode("div",_ie,[o("chineseCase")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Se,{key:0}))])],64)):t.createCommentVNode("",!0),"page"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",Nie,[t.createVNode(Oe)]),t.createElementVNode("div",Tie,[t.createElementVNode("div",Aie,[t.createVNode(_e),t.createElementVNode("div",null,[t.createElementVNode("div",Mie,[t.createVNode(Ne)]),t.createElementVNode("div",Iie,[t.createVNode(Te)])])])]),t.createElementVNode("div",Pie,[t.createVNode(Ae),t.createVNode(Me),t.createVNode(Ie),t.createVNode(Pe),t.createVNode(Le)]),t.createElementVNode("div",Lie,[t.createVNode(Re)])],64)):t.createCommentVNode("",!0),"export"===e.currentMenu?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[t.createElementVNode("div",Rie,[t.createVNode(Be),t.createVNode(De)]),t.createElementVNode("div",Bie,[o("share")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(Ve,{key:0})),o("embed")?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(je,{key:1}))])],64)):t.createCommentVNode("",!0)])])),_:1},512)])}}},[["__scopeId","data-v-fd248be0"]]),Vie=e=>{const t={justNow:KN("time.justNow"),past:e=>e.match(/\d/)?KN("time.past",{n:e}):e,day:e=>1===e?KN("time.yesterday"):KN("time.day",{n:e}),hour:e=>KN("time.hour",{n:e}),minute:e=>KN("time.minute",{n:e}),second:e=>KN("time.second",{n:e})};return FN(new Date(e),{messages:t}).value.replace(/"/gi,"")},jie={key:0,class:"toolbar-container"},Fie={class:"status"},zie={class:"status-saved button-text"},$ie=["textContent"],Hie=["textContent"],Uie={class:"document-status-container status"},Wie=["textContent"],Gie=["textContent"],Kie={class:"document-button-container"},qie={class:"button-text"},Yie=YN({__name:"index",emits:["menu-change"],setup(e,{emit:n}){const r=n,{container:o,options:a,editor:i,savedAt:l}=zN(),s=GN("toolbar"),c=t.ref(!1),u=BN(),d=[{label:KN("toolbar.base"),value:"base"},{label:KN("toolbar.insert"),value:"insert"},{label:KN("toolbar.table"),value:"table"},{label:KN("toolbar.tools"),value:"tools"},{label:KN("toolbar.page"),value:"page"},{label:KN("toolbar.export"),value:"export"}];let p=d;a.value.toolbar.menus&&(p=a.value.toolbar.menus.map((e=>d.filter((t=>t.value===e))[0])));let f=t.ref(p[0].value);const h=e=>{f.value=e,r("menu-change",e)};t.watch((()=>{var e;return null==(e=i.value)?void 0:e.isActive("table")}),((e,t)=>{e?f.value="table":!e&&t&&(f.value="base")}));const m=t.computed((()=>{const e=[{label:KN("toolbar.ribbon"),value:"ribbon",prefixIcon:"toolbar-ribbon"},{label:KN("toolbar.classic"),value:"classic",prefixIcon:"toolbar-classic"},{label:KN("toolbar.hide"),value:"hideToolbar",prefixIcon:"hide-toolbar"}];return a.value.toolbar.enableSourceEditor&&e.splice(2,0,{label:KN("toolbar.source"),value:"source",prefixIcon:"toolbar-source",divider:!0}),e})),v=({value:e})=>{"hideToolbar"===e?s.value.show=!1:(s.value.show=!0,s.value.mode=e)},g=t.inject("saveContent"),b=()=>{var e;const t=GN("document"),{content:n}=t.value;if(n&&""!==n&&"<p></p>"!==n)null==(e=i.value)||e.chain().setContent(n,!0).focus().run();else{const e=A$({theme:"info",header:KN("save.cache.error.title"),body:KN("save.cache.error.message"),placement:"center",onConfirm(){e.destroy()}})}};return(e,n)=>{var r;const d=Die,y=Hae,w=Kne,k=Kd,x=rv,E=dC,C=tg,S=Qv,O=oT;return t.unref(s).show?(t.openBlock(),t.createElementBlock("div",jie,["ribbon"===t.unref(s).mode?(t.openBlock(),t.createBlock(d,{key:0,menus:t.unref(p),"current-menu":t.unref(f),onMenuChange:h},null,8,["menus","current-menu"])):t.createCommentVNode("",!0),"classic"===t.unref(s).mode?(t.openBlock(),t.createBlock(y,{key:1,menus:t.unref(p),"current-menu":t.unref(f),onMenuChange:h},null,8,["menus","current-menu"])):t.createCommentVNode("",!0),"source"===t.unref(s).mode&&t.unref(a).toolbar.enableSourceEditor?(t.openBlock(),t.createBlock(w,{key:2})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["toolbar-actions",t.unref(s).mode])},["source"!==t.unref(s).mode&&(null==(r=t.unref(i))?void 0:r.isEditable)?(t.openBlock(),t.createBlock(x,{key:0,attach:t.unref(o),trigger:"click",placement:"bottom-right",onVisibleChange:n[0]||(n[0]=e=>c.value=e)},{content:t.withCtx((()=>[t.createElementVNode("div",Uie,[t.createElementVNode("div",null,t.toDisplayString(e.t("save.network"))+" "+t.toDisplayString(t.unref(u)?e.t("save.online"):e.t("save.offline")),1),t.createElementVNode("div",null,[t.createTextVNode(t.toDisplayString(e.t("save.savedAt"))+" ",1),t.unref(l)?(t.openBlock(),t.createElementBlock("span",{key:0,textContent:t.toDisplayString(e.t("save.savedAtText",{time:t.unref(Vie)(t.unref(l))}))},null,8,Wie)):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(e.t("save.unsaved"))},null,8,Gie))]),t.createElementVNode("div",Kie,[t.createVNode(k,{size:"small",textContent:t.toDisplayString(e.t("save.text")),onClick:t.unref(g)},null,8,["textContent","onClick"]),t.createVNode(k,{size:"small",variant:"outline",textContent:t.toDisplayString(e.t("save.cache.text")),onClick:b},null,8,["textContent"])])])])),default:t.withCtx((()=>[t.createVNode(k,{class:t.normalizeClass(["button",{active:c.value}]),variant:"text",size:"small"},{default:t.withCtx((()=>[t.createElementVNode("span",Fie,[t.createElementVNode("span",{class:t.normalizeClass(["status-online",{offline:!t.unref(u)}])},null,2),t.createElementVNode("span",zie,[t.unref(l)?(t.openBlock(),t.createElementBlock("span",{key:0,textContent:t.toDisplayString(e.t("save.savedAtText",{time:t.unref(Vie)(t.unref(l))}))},null,8,$ie)):(t.openBlock(),t.createElementBlock("span",{key:1,class:"unsaved",textContent:t.toDisplayString(e.t("save.unsaved"))},null,8,Hie))])])])),_:1},8,["class"])])),_:1},8,["attach"])):t.createCommentVNode("",!0),t.createVNode(S,{trigger:"click",size:"small",placement:"bottom-right","popup-props":{destroyOnClose:!0,attach:t.unref(o)},onClick:v},{dropdown:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),(e=>(t.openBlock(),t.createBlock(C,{key:e.value,content:e.label,value:e.value,divider:e.divider,active:e.value===t.unref(s).mode},{prefixIcon:t.withCtx((()=>[t.createVNode(E,{name:e.prefixIcon},null,8,["name"])])),_:2},1032,["content","value","divider","active"])))),128))])),default:t.withCtx((()=>[t.createVNode(k,{class:"button",variant:"text",size:"small"},{default:t.withCtx((()=>[t.createVNode(E,{name:"expand-down"}),t.createElementVNode("span",qie,t.toDisplayString(e.t("toolbar.toggle")),1)])),_:1})])),_:1},8,["popup-props"])],2)])):(t.openBlock(),t.createBlock(O,{key:1,content:e.t("toolbar.show"),placement:"bottom-right"},{default:t.withCtx((()=>[t.createElementVNode("div",{class:"show-toolbar",onClick:n[1]||(n[1]=e=>t.unref(s).show=!0)},[t.createVNode(E,{name:"arrow-down"})])])),_:1},8,["content"]))}}},[["__scopeId","data-v-0d281529"]]);var Xie={pagination:{itemsPerPage:"{size} / page",jumpTo:"Jump to",page:"",total:"{total} items"},cascader:{empty:"Empty Data",loadingText:"loading...",placeholder:"please select"},calendar:{yearSelection:"{year}",monthSelection:"{month}",yearRadio:"year",monthRadio:"month",hideWeekend:"Hide Week",showWeekend:"Show Week",today:"Today",thisMonth:"This Month",week:"Monday,Tuesday,Wedsday,Thuresday,Friday,Saturday,Sunday",cellMonth:"January,February,March,April,May,June,July,August,September,October,November,December"},transfer:{title:"{checked} / {total}",empty:"Empty Data",placeholder:"enter keyword to search"},timePicker:{dayjsLocale:"en",now:"Now",confirm:"Confirm",anteMeridiem:"AM",postMeridiem:"PM",placeholder:"please select"},dialog:{confirm:"Confirm",cancel:"Cancel"},drawer:{confirm:"Confirm",cancel:"Cancel"},popconfirm:{confirm:{content:"OK"},cancel:{content:"Cancel"}},table:{empty:"Empty Data",loadingText:"loading...",loadingMoreText:"loading more",filterInputPlaceholder:"",sortAscendingOperationText:"click to sort ascending",sortCancelOperationText:"click to cancel sorting",sortDescendingOperationText:"click to sort descending",clearFilterResultButtonText:"Clear",columnConfigButtonText:"Column Config",columnConfigTitleText:"Table Column Config",columnConfigDescriptionText:"Please select columns to show them in the table",confirmText:"Confirm",cancelText:"Cancel",resetText:"Reset",selectAllText:"Select All",searchResultText:'Search "{result}". Find {count} items.'},select:{empty:"Empty Data",loadingText:"loading...",placeholder:"please select"},tree:{empty:"Empty Data"},treeSelect:{empty:"Empty Data",loadingText:"loading...",placeholder:"please select"},datePicker:{dayjsLocale:"en",placeholder:{date:"select date",month:"select month",year:"select year",quarter:"select quarter",week:"select week"},weekdays:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],quarters:["Q1","Q2","Q3","Q4"],rangeSeparator:" - ",direction:"ltr",format:"YYYY-MM-DD",dayAriaLabel:"D",yearAriaLabel:"Y",monthAriaLabel:"M",weekAbbreviation:"W",confirm:"Confirm",selectTime:"Select Time",selectDate:"Select Date",nextYear:"Next Year",preYear:"Last Year",nextMonth:"Next Month",preMonth:"Last Month",preDecade:"Last Decade",nextDecade:"Next Decade",now:"Now"},upload:{sizeLimitMessage:"File is too large to upload. {sizeLimit}",cancelUploadText:"Cancel",triggerUploadText:{fileInput:"Upload",image:"Click to upload",normal:"Upload",reupload:"ReUpload",continueUpload:"Continue Upload",delete:"Delete",uploading:"Uploading"},dragger:{dragDropText:"Drop here",draggingText:"Drag file to this area to upload",clickAndDragText:'Click "Upload" or Drag file to this area to upload'},file:{fileNameText:"filename",fileSizeText:"size",fileStatusText:"status",fileOperationText:"operation",fileOperationDateText:"date"},progress:{uploadingText:"Uploading",waitingText:"Waiting",failText:"Failed",successText:"Success"}},form:{errorMessage:{date:"${name} is invalid",url:"${name} is invalid",required:"${name} is required",max:"${name} must be at least ${validate} characters",min:"${name} cannot be longer than ${validate} characters",len:"${name} must be exactly ${validate} characters",enum:"${name} must be one of ${validate}",idcard:"${name} is invalid",telnumber:"${name} is invalid",pattern:"${name} is invalid",validator:"${name} is invalid",boolean:"${name} is not a boolean",number:"${name} must be a number"}},input:{placeholder:"please enter"},list:{loadingText:"loading...",loadingMoreText:"loading more"},alert:{expandText:"expand",collapseText:"collapse"},anchor:{copySuccessText:"copy the link successfully",copyText:"copy link"},colorPicker:{swatchColorTitle:"System Default",recentColorTitle:"Recently Used",clearConfirmText:"Clear recently used colors?"},guide:{finishButtonProps:{content:"Finish",theme:"primary"},nextButtonProps:{content:"Next Step",theme:"primary"},skipButtonProps:{content:"Skip",theme:"default"},prevButtonProps:{content:"Last Step",theme:"default"}},image:{errorText:"unable to load",loadingText:"loading"},imageViewer:{errorText:"unable to load",mirrorTipText:"mirror",rotateTipText:"rotate",originalSizeTipText:"original"},typography:{expandText:"more",collapseText:"collapse",copiedText:"copied"}};const Zie=["id"],Jie={class:"umo-toolbar"},Qie={class:"umo-main"},ele={key:0,class:"umo-footer"},tle=YN(Object.assign({name:"UmoEditor"},{__name:"index",props:V_,emits:["beforeCreate","created","changed","changed:selection","changed:transaction","changed:menu","changed:toolbar","changed:pageSize","changed:pageOrientation","changed:pageMargin","changed:pageBackground","changed:pageShowToc","changed:pagePreview","changed:pageZoom","changed:pageWatermark","changed:locale","changed:theme","contentError","print","focus","blur","saved","destroy"],setup(e,{expose:n,emit:r}){const o=e,a=r;t.onBeforeMount((()=>f(o)));const{container:i,toolbarKey:l,options:s,page:c,savedAt:u,editorDestroyed:d,editor:p,setOptions:f,printing:h,resetStore:m}=zN(),v=GN("toolbar",o.editorKey),g=GN("document",o.editorKey);t.watch((()=>o),(()=>f(o)),{deep:!0}),d.value=!1;const{appContext:b}=t.getCurrentInstance();b.config.globalProperties.t=WN.global.t,b.config.globalProperties.l=qN;const y=GN("locale");WN.global.locale.value=y.value!==s.value.locale?y.value:s.value.locale;const w=t.ref({"zh-CN":nc,"en-US":Xie}),k=e=>{if(!["light","dark","auto"].includes(e))throw new Error('"parmas" must be one of "light", "dark" or "auto".');if("auto"!==e)return document.querySelector("html").setAttribute("theme-mode",e),void a("changed:theme",e);const t="(prefers-color-scheme: dark)",n=window.matchMedia(t).matches;k(n?"dark":"light"),window.matchMedia(t).addEventListener("change",(e=>{k(e.matches?"dark":"light")}))};t.onMounted((()=>{k(s.value.theme)})),t.watch((()=>s.value.theme),(e=>{k(e)}));const x=e=>{if(!["zh-CN","en-US"].includes(e))throw new Error('"parmas" must be one of "zh-CN" or "en-US".');if(WN.global.locale.value===e)return;GN("locale").value=e,location.reload()},E=(e="html")=>{if(!p.value)throw new Error("editor is not ready!");if("html"===e)return p.value.getHTML();if("text"===e)return p.value.getText();if("json"===e)return p.value.getJSON();throw new Error("format must be html, text or json")},C=async()=>{if("source"!==v.value.mode&&!s.value.document.readOnly)try{let e=await I$("loading",{content:KN("save.saving"),placement:"bottom",closeBtn:!0,offset:[0,-20]});if(!(await s.value.onSave({html:p.value.getHTML(),json:p.value.getJSON(),text:p.value.getHTML()},c.value,g.value)))return e.close(),void(e=I$("error",{content:KN("save.failed"),placement:"bottom",offset:[0,-20]}));a("saved"),e.close(),I$("success",{content:KN("save.success"),placement:"bottom",offset:[0,-20]});const n=function(e={}){const{controls:n=!1,offset:r=0,immediate:o=!0,interval:a="requestAnimationFrame",callback:i}=e,l=t.ref(q_()+r),s=()=>l.value=q_()+r,c=i?()=>{s(),i(l.value)}:s,u="requestAnimationFrame"===a?yN(c,{immediate:o}):uN(c,a,{immediate:o});return n?{timestamp:l,...u}:l}({offset:0});u.value=n.value}catch(e){I$("error",{content:KN("save.error"),placement:"bottom",offset:[0,-20]}),console.error(e.message)}},S=()=>{const{toolbar:e,document:t}=s.value;e.disableMenuItems.includes("print")||"source"===v.value.mode||t.readOnly||(h.value=!0)},O=e=>{const t=()=>{localStorage.clear(),location.reload()};if(!0===e)return void t();const n=M$({theme:"warning",header:KN("resetAll.title"),body:KN("resetAll.message"),confirmBtn:{theme:"warning",content:KN("resetAll.reset")},onConfirm(){n.destroy(),t()}})},_=()=>{p.value.destroy(),m()};n({getOptions:()=>s.value,setOptions:f,setToolbar:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.mode){if("string"!=typeof e.mode)throw new Error('"parmas.size" must be a string.');if(e.mode&&!["classic","ribbon"].includes(e.mode))throw new Error('"parmas.mode" must be one of "classic" or "ribbon".');v.value.mode=e.mode}if(void 0!==e.show){if("boolean"!=typeof e.show)throw new Error('"parmas.show" must be a boolean.');v.value.show=e.show}},setPage:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.size){if("string"!=typeof e.size)throw new Error('"parmas.size" must be a string.');const t=s.value.dicts.pageSizes.find((t=>t.label===e.size));if(!t)throw new Error(`"parmas.size" must be one of ${s.value.dicts.pageSizes.map((e=>e.label))}.`);c.value.size=t}if(e.orientation){if("string"!=typeof e.orientation)throw new Error('"parmas.orientation" must be a string.');if(!["portrait","landscape"].includes(e.orientation))throw new Error('"parmas.mode" must be one of "portrait" or "landscape".');c.value.orientation=e.orientation}if(e.background){if("string"!=typeof e.background)throw new Error('"parmas.background" must be a string.');c.value.background=e.background}if(void 0!==e.showBreakMarks){if("boolean"!=typeof e.showBreakMarks)throw new Error('"parmas.showBreakMarks" must be a boolean.');c.value.showBreakMarks=e.showBreakMarks,e.showBreakMarks?p.value.commands.showInvisibleCharacters():p.value.commands.hideInvisibleCharacters()}},setWatermark:e=>{if(!e instanceof Object)throw new Error("parmas must be an object.");if(void 0!==e.alpha){if("number"!=typeof e.alpha)throw new Error('"parmas.alpha" must be a number.');c.value.watermark.alpha=e.alpha}if(e.text){if("string"!=typeof e.text)throw new Error('"parmas.text" must be a string.');if(e.text.length>30)throw new Error('"parmas.text" must be less than 30 characters.');c.value.watermark.text=e.text}if(e.type){if("string"!=typeof e.type)throw new Error('"parmas.type" must be a string.');if(!["compact","spacious"].includes(e.type))throw new Error('"parmas.type" must be one of "compact" or "spacious".');c.value.watermark.type=e.type}if(e.fontColor){if("string"!=typeof e.fontColor)throw new Error('"parmas.fontColor" must be a string.');c.value.watermark.fontColor=e.fontColor}if(e.fontSize){if("number"!=typeof e.fontSize)throw new Error('"parmas.fontSize" must be a number.');c.value.watermark.fontSize=e.fontSize}if(e.fontFamily||null===e.fontFamily){if(null!==e.fontFamily&&"string"!=typeof e.fontFamily)throw new Error('"parmas.fontFamily" must be a string.');c.value.watermark.fontFamily=e.fontFamily}if(e.fontWeight){if("string"!=typeof e.fontWeight)throw new Error('"parmas.fontWeight" must be a string.');if(!["normal","bold","bolder"].includes(e.fontWeight))throw new Error('"parmas.fontWeight" must be one of "normal", "bold" or "bolder".');c.value.watermark.fontWeight=e.fontWeight}},setDocument:e=>{var t,n;if(!e instanceof Object)throw new Error("parmas must be an object.");if(e.title){if("string"!=typeof e.title)throw new Error('"parmas.title" must be a string.');const t=""!==e.title?e.title:KN("document.untitled");g.value.title=t,s.value.document.title=t}if(void 0!==e.bubbleMenu){if("boolean"!=typeof e.bubbleMenu)throw new Error('"parmas.bubbleMenu" must be a boolean.');s.value.document.bubbleMenu=e.bubbleMenu}if(void 0!==e.blockMenu){if("boolean"!=typeof e.blockMenu)throw new Error('"parmas.blockMenu" must be a boolean.');s.value.document.blockMenu=e.blockMenu}if(void 0!==e.markdown){if("boolean"!=typeof e.markdown)throw new Error('"parmas.markdown" must be a boolean.');g.value.markdown=e.markdown}if(void 0!==e.spellcheck){if("boolean"!=typeof e.spellcheck)throw new Error('"parmas.spellcheck" must be a boolean.');g.value.spellcheck=e.spellcheck}if(e.autoSave){if("boolean"!=typeof(null==(t=e.autoSave)?void 0:t.enabled))throw new Error('"parmas.autoSave.enabled" must be a boolean.');if(s.value.document.autoSave.enabled=e.autoSave.enabled,"number"!==(null==(n=e.autoSave)?void 0:n.interval))throw new Error('"parmas.autoSave.interval" must be a number.');s.value.document.autoSave.interval=e.autoSave.interval}},setContent:(e,t={emitUpdate:!0,focusPosition:"start",focusOptions:{scrollIntoView:!0}})=>{if(!p.value)throw new Error("editor is not ready!");p.value.chain().setContent(e,t.emitUpdate).focus(t.focusPosition,t.focusOptions).run()},setLocale:x,setTheme:k,getContent:E,getImage:async(e="blob")=>{const t=c.value.zoomLevel;try{c.value.zoomLevel=100;const e=document.querySelector(`${i} .page-content`);if("blob"){return await are.toBlob(e)}if("jpeg"){return await are.toJpeg(e)}if("png"){return await are.toPng(e)}}catch{throw new Error(KN("export.image.error.message"))}finally{c.value.zoomLevel=t}},getText:()=>E("text"),getHTML:()=>E("html"),getJSON:()=>E("json"),saveContent:C,getContentExcerpt:(e=100,t=" ...")=>{const n=p.value.getText();return 0===n.length?"":n.substring(0,e)+t},getEditor:()=>p,getLocale:()=>WN.global.locale.value,getI18n:()=>WN,setReadOnly(e=!0){s.value.document.readOnly=e},print:S,focus:(e="start",t={scrollIntoView:!0})=>p.value.commands.focus(e,t),blur:()=>p.value.chain().blur().run(),reset:O,useAlert:A$,useConfirm:M$,useMessage:I$,destroy:_});let N=t.ref(!1),T=t.ref(!0),A=t.ref(null);const M=()=>{null!==A.value&&(clearInterval(A.value),A.value=null)};t.watch((()=>N.value),(e=>{const{autoSave:t}=s.value.document;if(t.enabled)return T.value?(T.value=!1,void setTimeout((()=>N.value=!1))):void(e?A.value=setInterval((()=>{C(),N.value=!1,M()}),t.interval):M())})),t.onBeforeUnmount((()=>{M(),_()})),a("beforeCreate"),t.watch((()=>p.value),(()=>{p.value&&(p.value.on("create",(({editor:e})=>a("created",{editor:e}))),p.value.on("update",(({editor:e})=>{a("changed",{editor:e}),N.value=!0})),p.value.on("selectionUpdate",(({editor:e})=>{a("changed:selection",{editor:e})})),p.value.on("transaction",(({editor:e,transaction:t})=>a("changed:transaction",{editor:e,transaction:t}))),p.value.on("focus",(({editor:e,event:t})=>a("focus",{editor:e,event:t}))),p.value.on("contentError",(({editor:e,error:t,disableCollaboration:n})=>a("contentError",{editor:e,error:t,disableCollaboration:n}))),p.value.on("blur",(({editor:e,event:t})=>a("blur",{editor:e,event:t}))),p.value.on("destroy",(()=>{m(),a("destroy")})))}));const I=e=>a("changed:menu",e);return t.watch((()=>v.value),((e,t)=>{a("changed:toolbar",{toolbar:e,oldToolbar:t})}),{deep:!0}),t.watch((()=>c.value.size),((e,t)=>a("changed:pageSize",{pageSize:e,oldPageSize:t})),{deep:!0}),t.watch((()=>c.value.margin),((e,t)=>a("changed:pageMargin",{pageMargin:e,oldPageMargin:t})),{deep:!0}),t.watch((()=>c.value.background),((e,t)=>a("changed:pageBackground",{pageBackground:e,oldPageBackground:t}))),t.watch((()=>c.value.orientation),((e,t)=>a("changed:pageOrientation",{pageOrientation:e,oldPageOrientation:t}))),t.watch((()=>c.value.showToc),(e=>a("changed:pageShowToc",e))),t.watch((()=>c.value.zoomLevel),((e,t)=>a("changed:pageZoom",{zoomLevel:e,oldZoomLevel:t}))),t.watch((()=>c.value.preview.enabled),(e=>a("changed:pagePreview",e))),t.watch((()=>c.value.watermark),((e,t)=>a("changed:pageWatermark",{pageWatermark:e,oldPageWatermark:t})),{deep:!0}),t.watch((()=>h.value),(()=>a("print")),{deep:!0}),t.watch((()=>WN.global.locale.value),((e,t)=>{a("changed:locale",{locale:e,oldLocale:t})})),t.provide("saveContent",C),t.provide("setLocale",x),t.provide("reset",O),TT("ctrl+s,command+s",C),TT("ctrl+p,command+p",S),t.watch((()=>v.value.mode),(e=>d.value="source"===e)),(e,n)=>{const r=Yie,o=Une,a=YH,u=U$,d=sC;return t.openBlock(),t.createBlock(d,{"global-config":{...w.value[t.unref(WN).global.locale.value],classPrefix:"umo"}},{default:t.withCtx((()=>[t.createElementVNode("div",{id:t.unref(i).substr(1),class:t.normalizeClass(["umo-editor-container",{"toolbar-classic":"classic"===t.unref(v).mode,"toolbar-ribbon":"ribbon"===t.unref(v).mode,"toolbar-source":"source"===t.unref(v).mode,"preview-mode":t.unref(c).preview.enabled,"laser-pointer":t.unref(c).preview.enabled&&t.unref(c).preview.laserPointer}]),style:t.normalizeStyle({height:t.unref(s).height})},[t.createElementVNode("header",Jie,[(t.openBlock(),t.createBlock(r,{key:t.unref(l),onMenuChange:I}))]),t.createElementVNode("main",Qie,["source"!==t.unref(v).mode?(t.openBlock(),t.createBlock(o,{key:0})):(t.openBlock(),t.createBlock(a,{key:1}))]),"source"!==t.unref(v).mode?(t.openBlock(),t.createElementBlock("footer",ele,[t.createVNode(u)])):t.createCommentVNode("",!0)],14,Zie)])),_:1},8,["global-config"])}}}),[["__scopeId","data-v-a81c59ff"]]),nle={install:(e,t)=>{const{setOptions:n}=zN();n(t),e.component(tle.name,tle)}};e.UmoEditor=tle,e.default=tle,e.useUmoEditor=nle,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|