@white-give/editor-vue 1.0.5 → 1.0.7
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/dist/es/index.js +319 -317
- package/dist/lib/index.js +5 -5
- package/package.json +1 -1
package/dist/lib/index.js
CHANGED
|
@@ -213,7 +213,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Ee=ne,ke=ee),de===void
|
|
|
213
213
|
`},u]}}const cde=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),fde=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],dde=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],hde=[...fde,...dde],pde=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),H$=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),G$=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),vde=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),gde=H$.concat(G$).sort().reverse();function mde(n){const e=cde(n),t=gde,r="and or not only",i="[\\w-]+",a="("+i+"|@\\{"+i+"\\})",o=[],s=[],l=function(_){return{className:"string",begin:"~?"+_+".*?"+_}},u=function(_,x,T){return{className:_,begin:x,relevance:T}},c={$pattern:/[a-z-]+/,keyword:r,attribute:pde.join(" ")},f={begin:"\\(",end:"\\)",contains:s,keywords:c,relevance:0};s.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,l("'"),l('"'),e.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},e.HEXCOLOR,f,u("variable","@@?"+i,10),u("variable","@\\{"+i+"\\}"),u("built_in","~?`[^`]*?`"),{className:"attribute",begin:i+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},e.IMPORTANT,{beginKeywords:"and not"},e.FUNCTION_DISPATCH);const d=s.concat({begin:/\{/,end:/\}/,contains:o}),h={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(s)},p={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+vde.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s}}]},v={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:c,returnEnd:!0,contains:s,relevance:0}},g={className:"variable",variants:[{begin:"@"+i+"\\s*:",relevance:15},{begin:"@"+i}],starts:{end:"[;}]",returnEnd:!0,contains:d}},y={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,h,u("keyword","all\\b"),u("variable","@\\{"+i+"\\}"),{begin:"\\b("+hde.join("|")+")\\b",className:"selector-tag"},e.CSS_NUMBER_MODE,u("selector-tag",a,0),u("selector-id","#"+a),u("selector-class","\\."+a,0),u("selector-tag","&",0),e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+H$.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+G$.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:d},{begin:"!important"},e.FUNCTION_DISPATCH]},b={begin:i+`:(:)?(${t.join("|")})`,returnBegin:!0,contains:[y]};return o.push(n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,v,g,b,p,y,h,e.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:o}}function yde(n){const e="\\[=*\\[",t="\\]=*\\]",r={begin:e,end:t,contains:["self"]},i=[n.COMMENT("--(?!"+e+")","$"),n.COMMENT("--"+e,t,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:n.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[n.inherit(n.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},n.C_NUMBER_MODE,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,{className:"string",begin:e,end:t,contains:[r],relevance:5}])}}function bde(n){const e={className:"variable",variants:[{begin:"\\$\\("+n.UNDERSCORE_IDENT_RE+"\\)",contains:[n.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},t={className:"string",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,e]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[e,t]},i={begin:"^"+n.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},o={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[e]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[n.HASH_COMMENT_MODE,e,t,r,i,a,o]}}function xde(n){const e=n.regex,t={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},i={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},o={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},s=/[A-Za-z][A-Za-z0-9+.-]*/,l={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:e.concat(/\[.+?\]\(/,s,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},u={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},c={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},f=n.inherit(u,{contains:[]}),d=n.inherit(c,{contains:[]});u.contains.push(d),c.contains.push(f);let h=[t,l];return[u,c,f,d].forEach(y=>{y.contains=y.contains.concat(h)}),h=h.concat(u,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:h},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:h}]}]},t,a,u,c,{className:"quote",begin:"^>\\s+",contains:h,end:"$"},i,r,l,o,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function _de(n){const e={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},t=/[a-zA-Z@][a-zA-Z0-9_]*/,s={"variable.language":["this","super"],$pattern:t,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},l={$pattern:t,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:s,illegal:"</",contains:[e,n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,n.C_NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[n.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+l.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:l,contains:[n.UNDERSCORE_TITLE_MODE]},{begin:"\\."+n.UNDERSCORE_IDENT_RE,relevance:0}]}}function Sde(n){const e=n.regex,t=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,i={$pattern:/[\w.]+/,keyword:t.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:i},o={begin:/->\{/,end:/\}/},s={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},l={scope:"variable",variants:[{begin:/\$\d/},{begin:e.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[s]},u={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},c=[n.BACKSLASH_ESCAPE,a,l],f=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],d=(v,g,y="\\1")=>{const b=y==="\\1"?y:e.concat(y,g);return e.concat(e.concat("(?:",v,")"),g,/(?:\\.|[^\\\/])*?/,b,/(?:\\.|[^\\\/])*?/,y,r)},h=(v,g,y)=>e.concat(e.concat("(?:",v,")"),g,/(?:\\.|[^\\\/])*?/,y,r),p=[l,n.HASH_COMMENT_MODE,n.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),o,{className:"string",contains:c,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},u,{begin:"(\\/\\/|"+n.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[n.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:d("s|tr|y",e.either(...f,{capture:!0}))},{begin:d("s|tr|y","\\(","\\)")},{begin:d("s|tr|y","\\[","\\]")},{begin:d("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:h("(?:m|qr)?",/\//,/\//)},{begin:h("m|qr",e.either(...f,{capture:!0}),/\1/)},{begin:h("m|qr",/\(/,/\)/)},{begin:h("m|qr",/\[/,/\]/)},{begin:h("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[n.TITLE_MODE,s]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[n.TITLE_MODE,s,u]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=p,o.contains=p,{name:"Perl",aliases:["pl","pm"],keywords:i,contains:p}}function wde(n){const e=n.regex,t=/(?![A-Za-z0-9])(?![$])/,r=e.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,t),i=e.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,t),a=e.concat(/[A-Z]+/,t),o={scope:"variable",match:"\\$+"+r},s={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},l={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},u=n.inherit(n.APOS_STRING_MODE,{illegal:null}),c=n.inherit(n.QUOTE_STRING_MODE,{illegal:null,contains:n.QUOTE_STRING_MODE.contains.concat(l)}),f={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:n.QUOTE_STRING_MODE.contains.concat(l),"on:begin":(J,te)=>{te.data._beginMatch=J[1]||J[2]},"on:end":(J,te)=>{te.data._beginMatch!==J[1]&&te.ignoreMatch()}},d=n.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),h=`[
|
|
214
214
|
]`,p={scope:"string",variants:[c,u,f,d]},v={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},g=["false","null","true"],y=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],b=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],x={keyword:y,literal:(J=>{const te=[];return J.forEach(Q=>{te.push(Q),Q.toLowerCase()===Q?te.push(Q.toUpperCase()):te.push(Q.toLowerCase())}),te})(g),built_in:b},T=J=>J.map(te=>te.replace(/\|\d+$/,"")),k={variants:[{match:[/new/,e.concat(h,"+"),e.concat("(?!",T(b).join("\\b|"),"\\b)"),i],scope:{1:"keyword",4:"title.class"}}]},C=e.concat(r,"\\b(?!\\()"),D={variants:[{match:[e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[i,e.concat(/::/,e.lookahead(/(?!class\b)/)),C],scope:{1:"title.class",3:"variable.constant"}},{match:[i,e.concat("::",e.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[i,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},O={scope:"attr",match:e.concat(r,e.lookahead(":"),e.lookahead(/(?!::)/))},R={relevance:0,begin:/\(/,end:/\)/,keywords:x,contains:[O,o,D,n.C_BLOCK_COMMENT_MODE,p,v,k]},V={relevance:0,match:[/\b/,e.concat("(?!fn\\b|function\\b|",T(y).join("\\b|"),"|",T(b).join("\\b|"),"\\b)"),r,e.concat(h,"*"),e.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[R]};R.contains.push(V);const F=[O,D,n.C_BLOCK_COMMENT_MODE,p,v,k],$={begin:e.concat(/#\[\s*\\?/,e.either(i,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:g,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:g,keyword:["new","array"]},contains:["self",...F]},...F,{scope:"meta",variants:[{match:i},{match:a}]}]};return{case_insensitive:!1,keywords:x,contains:[$,n.HASH_COMMENT_MODE,n.COMMENT("//","$"),n.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:n.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},s,{scope:"variable.language",match:/\$this\b/},o,V,D,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},k,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},n.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:x,contains:["self",$,o,D,n.C_BLOCK_COMMENT_MODE,p,v]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},n.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[n.inherit(n.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},n.UNDERSCORE_TITLE_MODE]},p,v]}}function kde(n){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function Tde(n){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function Cde(n){const e=n.regex,t=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},l={className:"meta",begin:/^(>>>|\.\.\.) /},u={className:"subst",begin:/\{/,end:/\}/,keywords:s,illegal:/#/},c={begin:/\{\{/,relevance:0},f={className:"string",contains:[n.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[n.BACKSLASH_ESCAPE,l,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[n.BACKSLASH_ESCAPE,l,c,u]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[n.BACKSLASH_ESCAPE,c,u]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[n.BACKSLASH_ESCAPE,c,u]},n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},d="[0-9](_?[0-9])*",h=`(\\b(${d}))?\\.(${d})|\\b(${d})\\.`,p=`\\b|${r.join("|")}`,v={className:"number",relevance:0,variants:[{begin:`(\\b(${d})|(${h}))[eE][+-]?(${d})[jJ]?(?=${p})`},{begin:`(${h})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${p})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${p})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${p})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${p})`},{begin:`\\b(${d})[jJ](?=${p})`}]},g={className:"comment",begin:e.lookahead(/# type:/),end:/$/,keywords:s,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},y={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:["self",l,v,f,n.HASH_COMMENT_MODE]}]};return u.contains=[f,v,l],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s,illegal:/(<\/|\?)|=>/,contains:[l,v,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},f,g,n.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[y]},{variants:[{match:[/\bclass/,/\s+/,t,/\s*/,/\(\s*/,t,/\s*\)/]},{match:[/\bclass/,/\s+/,t]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[v,y,f]}]}}function Ede(n){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function Mde(n){const e=n.regex,t=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=e.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),i=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=e.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:t,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[n.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:e.lookahead(e.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:t},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),n.HASH_COMMENT_MODE,{scope:"string",contains:[n.BACKSLASH_ESCAPE],variants:[n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),n.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[i,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[t,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:i},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function Ade(n){const e=n.regex,t="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=e.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),i=e.concat(r,/(::\w+)*/),o={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},s={className:"doctag",begin:"@[A-Za-z]+"},l={begin:"#<",end:">"},u=[n.COMMENT("#","$",{contains:[s]}),n.COMMENT("^=begin","^=end",{contains:[s],relevance:10}),n.COMMENT("^__END__",n.MATCH_NOTHING_RE)],c={className:"subst",begin:/#\{/,end:/\}/,keywords:o},f={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:e.concat(/<<[-~]?'?/,e.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[n.BACKSLASH_ESCAPE,c]})]}]},d="[1-9](_?[0-9])*|0",h="[0-9](_?[0-9])*",p={className:"number",relevance:0,variants:[{begin:`\\b(${d})(\\.(${h}))?([eE][+-]?(${h})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},v={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:o}]},k=[f,{variants:[{match:[/class\s+/,i,/\s+<\s+/,i]},{match:[/\b(class|module)\s+/,i]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:o},{match:[/(include|extend)\s+/,i],scope:{2:"title.class"},keywords:o},{relevance:0,match:[i,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,t],scope:{1:"keyword",3:"title.function"},contains:[v]},{begin:n.IDENT_RE+"::"},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[f,{begin:t}],relevance:0},p,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:o},{begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(l,u),relevance:0}].concat(l,u);c.contains=k,v.contains=k;const R=[{begin:/^\s*=>/,starts:{end:"$",contains:k}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:o,contains:k}}];return u.unshift(l),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:o,illegal:/\/\*/,contains:[n.SHEBANG({binary:"ruby"})].concat(R).concat(u).concat(k)}}function Nde(n){const e=n.regex,t=/(r#)?/,r=e.concat(t,n.UNDERSCORE_IDENT_RE),i=e.concat(t,n.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:e.concat(/\b/,/(?!let|for|while|if|else|match\b)/,i,e.lookahead(/\s*\(/))},o="([ui](8|16|32|64|128|size)|f(32|64))?",s=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],l=["true","false","Some","None","Ok","Err"],u=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],c=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:n.IDENT_RE+"!?",type:c,keyword:s,literal:l,built_in:u},illegal:"</",contains:[n.C_LINE_COMMENT_MODE,n.COMMENT("/\\*","\\*/",{contains:["self"]}),n.inherit(n.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+o},{begin:"\\b0o([0-7_]+)"+o},{begin:"\\b0x([A-Fa-f0-9_]+)"+o},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+o}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[n.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:n.IDENT_RE+"::",keywords:{keyword:"Self",built_in:u,type:c}},{className:"punctuation",begin:"->"},a]}}const Dde=n=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:n.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:n.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),Ode=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Ide=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Rde=[...Ode,...Ide],Lde=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Pde=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Bde=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),Vde=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function zde(n){const e=Dde(n),t=Bde,r=Pde,i="@[a-z-]+",a="and or not only",s={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE,e.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},e.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+Rde.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+t.join("|")+")"},s,{begin:/\(/,end:/\)/,contains:[e.CSS_NUMBER_MODE]},e.CSS_VARIABLE,{className:"attribute",begin:"\\b("+Vde.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[e.BLOCK_COMMENT,s,e.HEXCOLOR,e.CSS_NUMBER_MODE,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.IMPORTANT,e.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:i,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:Lde.join(" ")},contains:[{begin:i,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},s,n.QUOTE_STRING_MODE,n.APOS_STRING_MODE,e.HEXCOLOR,e.CSS_NUMBER_MODE]},e.FUNCTION_DISPATCH]}}function Fde(n){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function $de(n){const e=n.regex,t=n.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},i={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],o=["double precision","large object","with timezone","without timezone"],s=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],l=["add","asc","collation","desc","final","first","last","view"],u=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],c=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],f=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],d=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],h=c,p=[...u,...l].filter(T=>!c.includes(T)),v={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},g={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},y={match:e.concat(/\b/,e.either(...h),/\s*\(/),relevance:0,keywords:{built_in:h}};function b(T){return e.concat(/\b/,e.either(...T.map(k=>k.replace(/\s+/,"\\s+"))),/\b/)}const _={scope:"keyword",match:b(d),relevance:0};function x(T,{exceptions:k,when:C}={}){const D=C;return k=k||[],T.map(O=>O.match(/\|\d+$/)||k.includes(O)?O:D(O)?`${O}|0`:O)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:x(p,{when:T=>T.length<3}),literal:a,type:s,built_in:f},contains:[{scope:"type",match:b(o)},_,y,v,r,i,n.C_NUMBER_MODE,n.C_BLOCK_COMMENT_MODE,t,g]}}function U$(n){return n?typeof n=="string"?n:n.source:null}function dv(n){return dr("(?=",n,")")}function dr(...n){return n.map(t=>U$(t)).join("")}function Hde(n){const e=n[n.length-1];return typeof e=="object"&&e.constructor===Object?(n.splice(n.length-1,1),e):{}}function la(...n){return"("+(Hde(n).capture?"":"?:")+n.map(r=>U$(r)).join("|")+")"}const sN=n=>dr(/\b/,n,/\w$/.test(n)?/\b/:/\B/),Gde=["Protocol","Type"].map(sN),jL=["init","self"].map(sN),Ude=["Any","Self"],Pw=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],qL=["false","nil","true"],Wde=["assignment","associativity","higherThan","left","lowerThan","none","right"],jde=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],KL=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],W$=la(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),j$=la(W$,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Bw=dr(W$,j$,"*"),q$=la(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),cb=la(q$,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),bs=dr(q$,cb,"*"),Vy=dr(/[A-Z]/,cb,"*"),qde=["attached","autoclosure",dr(/convention\(/,la("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",dr(/objc\(/,bs,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],Kde=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function Yde(n){const e={match:/\s+/,relevance:0},t=n.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[n.C_LINE_COMMENT_MODE,t],i={match:[/\./,la(...Gde,...jL)],className:{2:"keyword"}},a={match:dr(/\./,la(...Pw)),relevance:0},o=Pw.filter(Me=>typeof Me=="string").concat(["_|0"]),s=Pw.filter(Me=>typeof Me!="string").concat(Ude).map(sN),l={variants:[{className:"keyword",match:la(...s,...jL)}]},u={$pattern:la(/\b\w+/,/#\w+/),keyword:o.concat(jde),literal:qL},c=[i,a,l],f={match:dr(/\./,la(...KL)),relevance:0},d={className:"built_in",match:dr(/\b/,la(...KL),/(?=\()/)},h=[f,d],p={match:/->/,relevance:0},v={className:"operator",relevance:0,variants:[{match:Bw},{match:`\\.(\\.|${j$})+`}]},g=[p,v],y="([0-9]_*)+",b="([0-9a-fA-F]_*)+",_={className:"number",relevance:0,variants:[{match:`\\b(${y})(\\.(${y}))?([eE][+-]?(${y}))?\\b`},{match:`\\b0x(${b})(\\.(${b}))?([pP][+-]?(${y}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},x=(Me="")=>({className:"subst",variants:[{match:dr(/\\/,Me,/[0\\tnr"']/)},{match:dr(/\\/,Me,/u\{[0-9a-fA-F]{1,8}\}/)}]}),T=(Me="")=>({className:"subst",match:dr(/\\/,Me,/[\t ]*(?:[\r\n]|\r\n)/)}),k=(Me="")=>({className:"subst",label:"interpol",begin:dr(/\\/,Me,/\(/),end:/\)/}),C=(Me="")=>({begin:dr(Me,/"""/),end:dr(/"""/,Me),contains:[x(Me),T(Me),k(Me)]}),D=(Me="")=>({begin:dr(Me,/"/),end:dr(/"/,Me),contains:[x(Me),k(Me)]}),O={className:"string",variants:[C(),C("#"),C("##"),C("###"),D(),D("#"),D("##"),D("###")]},R=[n.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[n.BACKSLASH_ESCAPE]}],V={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:R},F=Me=>{const Pe=dr(Me,/\//),Fe=dr(/\//,Me);return{begin:Pe,end:Fe,contains:[...R,{scope:"comment",begin:`#(?!.*${Fe})`,end:/$/}]}},$={scope:"regexp",variants:[F("###"),F("##"),F("#"),V]},J={match:dr(/`/,bs,/`/)},te={className:"variable",match:/\$\d+/},Q={className:"variable",match:`\\$${cb}+`},ne=[J,te,Q],ee={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:Kde,contains:[...g,_,O]}]}},de={scope:"keyword",match:dr(/@/,la(...qde),dv(la(/\(/,/\s+/)))},ke={scope:"meta",match:dr(/@/,bs)},Ee=[ee,de,ke],xe={match:dv(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:dr(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,cb,"+")},{className:"type",match:Vy,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:dr(/\s+&\s+/,dv(Vy)),relevance:0}]},De={begin:/</,end:/>/,keywords:u,contains:[...r,...c,...Ee,p,xe]};xe.contains.push(De);const ze={match:dr(bs,/\s*:/),keywords:"_|0",relevance:0},We={begin:/\(/,end:/\)/,relevance:0,keywords:u,contains:["self",ze,...r,$,...c,...h,...g,_,O,...ne,...Ee,xe]},tt={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,xe]},ht={begin:la(dv(dr(bs,/\s*:/)),dv(dr(bs,/\s+/,bs,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:bs}]},we={begin:/\(/,end:/\)/,keywords:u,contains:[ht,...r,...c,...g,_,O,...Ee,xe,We],endsParent:!0,illegal:/["']/},_e={match:[/(func|macro)/,/\s+/,la(J.match,bs,Bw)],className:{1:"keyword",3:"title.function"},contains:[tt,we,e],illegal:[/\[/,/%/]},me={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[tt,we,e],illegal:/\[|%/},ge={match:[/operator/,/\s+/,Bw],className:{1:"keyword",3:"title"}},ve={begin:[/precedencegroup/,/\s+/,Vy],className:{1:"keyword",3:"title"},contains:[xe],keywords:[...Wde,...qL],end:/}/},ye={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},le={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Se={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,bs,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:u,contains:[tt,...c,{begin:/:/,end:/\{/,keywords:u,contains:[{scope:"title.class.inherited",match:Vy},...c],relevance:0}]};for(const Me of O.variants){const Pe=Me.contains.find(Ve=>Ve.label==="interpol");Pe.keywords=u;const Fe=[...c,...h,...g,_,O,...ne];Pe.contains=[...Fe,{begin:/\(/,end:/\)/,contains:["self",...Fe]}]}return{name:"Swift",keywords:u,contains:[...r,_e,me,ye,le,Se,ge,ve,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},$,...c,...h,...g,_,O,...ne,...Ee,xe,We]}}const fb="[A-Za-z$_][0-9A-Za-z$_]*",K$=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Y$=["true","false","null","undefined","NaN","Infinity"],X$=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Z$=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],J$=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Q$=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],eH=[].concat(J$,X$,Z$);function Xde(n){const e=n.regex,t=(ee,{after:de})=>{const ke="</"+ee[0].slice(1);return ee.input.indexOf(ke,de)!==-1},r=fb,i={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(ee,de)=>{const ke=ee[0].length+ee.index,Ee=ee.input[ke];if(Ee==="<"||Ee===","){de.ignoreMatch();return}Ee===">"&&(t(ee,{after:ke})||de.ignoreMatch());let xe;const De=ee.input.substring(ke);if(xe=De.match(/^\s*=/)){de.ignoreMatch();return}if((xe=De.match(/^\s+extends\s+/))&&xe.index===0){de.ignoreMatch();return}}},s={$pattern:fb,keyword:K$,literal:Y$,built_in:eH,"variable.language":Q$},l="[0-9](_?[0-9])*",u=`\\.(${l})`,c="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",f={className:"number",variants:[{begin:`(\\b(${c})((${u})|\\.)?|(${u}))[eE][+-]?(${l})\\b`},{begin:`\\b(${c})\\b((${u})\\b|\\.)?|(${u})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},d={className:"subst",begin:"\\$\\{",end:"\\}",keywords:s,contains:[]},h={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,d],subLanguage:"xml"}},p={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,d],subLanguage:"css"}},v={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[n.BACKSLASH_ESCAPE,d],subLanguage:"graphql"}},g={className:"string",begin:"`",end:"`",contains:[n.BACKSLASH_ESCAPE,d]},b={className:"comment",variants:[n.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),n.C_BLOCK_COMMENT_MODE,n.C_LINE_COMMENT_MODE]},_=[n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,h,p,v,g,{match:/\$\d+/},f];d.contains=_.concat({begin:/\{/,end:/\}/,keywords:s,contains:["self"].concat(_)});const x=[].concat(b,d.contains),T=x.concat([{begin:/(\s*)\(/,end:/\)/,keywords:s,contains:["self"].concat(x)}]),k={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:T},C={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,e.concat(r,"(",e.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},D={relevance:0,match:e.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...X$,...Z$]}},O={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},R={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[k],illegal:/%/},V={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function F(ee){return e.concat("(?!",ee.join("|"),")")}const $={match:e.concat(/\b/,F([...J$,"super","import"].map(ee=>`${ee}\\s*\\(`)),r,e.lookahead(/\s*\(/)),className:"title.function",relevance:0},J={begin:e.concat(/\./,e.lookahead(e.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},k]},Q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+n.UNDERSCORE_IDENT_RE+")\\s*=>",ne={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,e.lookahead(Q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[k]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:s,exports:{PARAMS_CONTAINS:T,CLASS_REFERENCE:D},illegal:/#(?![$_A-z])/,contains:[n.SHEBANG({label:"shebang",binary:"node",relevance:5}),O,n.APOS_STRING_MODE,n.QUOTE_STRING_MODE,h,p,v,g,b,{match:/\$\d+/},f,D,{scope:"attr",match:r+e.lookahead(":"),relevance:0},ne,{begin:"("+n.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[b,n.REGEXP_MODE,{className:"function",begin:Q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:n.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s,contains:T}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:i.begin,end:i.end},{match:a},{begin:o.begin,"on:begin":o.isTrulyOpeningTag,end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0,contains:["self"]}]}]},R,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+n.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[k,n.inherit(n.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},J,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[k]},$,V,C,te,{match:/\$[(.]/}]}}function Zde(n){const e=n.regex,t=Xde(n),r=fb,i=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,n.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},o={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:i},contains:[t.exports.CLASS_REFERENCE]},s={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},l=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],u={$pattern:fb,keyword:K$.concat(l),literal:Y$,built_in:eH.concat(i),"variable.language":Q$},c={className:"meta",begin:"@"+r},f=(v,g,y)=>{const b=v.contains.findIndex(_=>_.label===g);if(b===-1)throw new Error("can not find mode to replace");v.contains.splice(b,1,y)};Object.assign(t.keywords,u),t.exports.PARAMS_CONTAINS.push(c);const d=t.contains.find(v=>v.scope==="attr"),h=Object.assign({},d,{match:e.concat(r,e.lookahead(/\s*\?:/))});t.exports.PARAMS_CONTAINS.push([t.exports.CLASS_REFERENCE,d,h]),t.contains=t.contains.concat([c,a,o,h]),f(t,"shebang",n.SHEBANG()),f(t,"use_strict",s);const p=t.contains.find(v=>v.label==="func.def");return p.relevance=0,Object.assign(t,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),t}function Jde(n){const e=n.regex,t={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},i=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,o=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,s=/\d{1,2}(:\d{1,2}){1,2}/,l={className:"literal",variants:[{begin:e.concat(/# */,e.either(a,i),/ *#/)},{begin:e.concat(/# */,s,/ *#/)},{begin:e.concat(/# */,o,/ *#/)},{begin:e.concat(/# */,e.either(a,i),/ +/,e.either(o,s),/ *#/)}]},u={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},c={className:"label",begin:/^\w+:/},f=n.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),d=n.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[t,r,l,u,c,f,d,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[d]}]}}function Qde(n){n.regex;const e=n.COMMENT(/\(;/,/;\)/);e.contains.push("self");const t=n.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],i={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},o={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},s={className:"number",relevance:0,match:/[+-]?\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/},l={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},u={className:"keyword",match:/\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|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[t,e,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,o,i,n.QUOTE_STRING_MODE,l,u,s]}}function ehe(n){const e=n.regex,t=e.concat(/[\p{L}_]/u,e.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,i={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},o=n.inherit(a,{begin:/\(/,end:/\)/}),s=n.inherit(n.APOS_STRING_MODE,{className:"string"}),l=n.inherit(n.QUOTE_STRING_MODE,{className:"string"}),u={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[i]},{begin:/'/,end:/'/,contains:[i]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,l,s,o,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,o,l,s]}]}]},n.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[l]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[u],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[u],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:e.concat(/</,e.lookahead(e.concat(t,e.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:t,relevance:0,starts:u}]},{className:"tag",begin:e.concat(/<\//,e.lookahead(e.concat(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function the(n){const e="true false yes no null",t="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},i={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},o={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[n.BACKSLASH_ESCAPE,i]},s=n.inherit(o,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),d={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},h={end:",",endsWithParent:!0,excludeEnd:!0,keywords:e,relevance:0},p={begin:/\{/,end:/\}/,contains:[h],illegal:"\\n",relevance:0},v={begin:"\\[",end:"\\]",contains:[h],illegal:"\\n",relevance:0},g=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+t},{className:"type",begin:"!<"+t+">"},{className:"type",begin:"!"+t},{className:"type",begin:"!!"+t},{className:"meta",begin:"&"+n.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+n.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},n.HASH_COMMENT_MODE,{beginKeywords:e,keywords:{literal:e}},d,{className:"number",begin:n.C_NUMBER_RE+"\\b",relevance:0},p,v,a,o],y=[...g];return y.pop(),y.push(s),h.contains=y,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:g}}const tH={arduino:Bfe,bash:Vfe,c:zfe,cpp:Ffe,csharp:$fe,css:Xfe,diff:Zfe,go:Jfe,graphql:Qfe,ini:ede,java:tde,javascript:ode,json:sde,kotlin:ude,less:mde,lua:yde,makefile:bde,markdown:xde,objectivec:_de,perl:Sde,php:wde,"php-template":kde,plaintext:Tde,python:Cde,"python-repl":Ede,r:Mde,ruby:Ade,rust:Nde,scss:zde,shell:Fde,sql:$de,swift:Yde,typescript:Zde,vbnet:Jde,wasm:Qde,xml:ehe,yaml:the};var Vw,YL;function nhe(){if(YL)return Vw;YL=1;function n(Ne){return Ne instanceof Map?Ne.clear=Ne.delete=Ne.set=function(){throw new Error("map is read-only")}:Ne instanceof Set&&(Ne.add=Ne.clear=Ne.delete=function(){throw new Error("set is read-only")}),Object.freeze(Ne),Object.getOwnPropertyNames(Ne).forEach(rt=>{const yt=Ne[rt],ln=typeof yt;(ln==="object"||ln==="function")&&!Object.isFrozen(yt)&&n(yt)}),Ne}class e{constructor(rt){rt.data===void 0&&(rt.data={}),this.data=rt.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function t(Ne){return Ne.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function r(Ne,...rt){const yt=Object.create(null);for(const ln in Ne)yt[ln]=Ne[ln];return rt.forEach(function(ln){for(const ce in ln)yt[ce]=ln[ce]}),yt}const i="</span>",a=Ne=>!!Ne.scope,o=(Ne,{prefix:rt})=>{if(Ne.startsWith("language:"))return Ne.replace("language:","language-");if(Ne.includes(".")){const yt=Ne.split(".");return[`${rt}${yt.shift()}`,...yt.map((ln,ce)=>`${ln}${"_".repeat(ce+1)}`)].join(" ")}return`${rt}${Ne}`};class s{constructor(rt,yt){this.buffer="",this.classPrefix=yt.classPrefix,rt.walk(this)}addText(rt){this.buffer+=t(rt)}openNode(rt){if(!a(rt))return;const yt=o(rt.scope,{prefix:this.classPrefix});this.span(yt)}closeNode(rt){a(rt)&&(this.buffer+=i)}value(){return this.buffer}span(rt){this.buffer+=`<span class="${rt}">`}}const l=(Ne={})=>{const rt={children:[]};return Object.assign(rt,Ne),rt};class u{constructor(){this.rootNode=l(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(rt){this.top.children.push(rt)}openNode(rt){const yt=l({scope:rt});this.add(yt),this.stack.push(yt)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(rt){return this.constructor._walk(rt,this.rootNode)}static _walk(rt,yt){return typeof yt=="string"?rt.addText(yt):yt.children&&(rt.openNode(yt),yt.children.forEach(ln=>this._walk(rt,ln)),rt.closeNode(yt)),rt}static _collapse(rt){typeof rt!="string"&&rt.children&&(rt.children.every(yt=>typeof yt=="string")?rt.children=[rt.children.join("")]:rt.children.forEach(yt=>{u._collapse(yt)}))}}class c extends u{constructor(rt){super(),this.options=rt}addText(rt){rt!==""&&this.add(rt)}startScope(rt){this.openNode(rt)}endScope(){this.closeNode()}__addSublanguage(rt,yt){const ln=rt.root;yt&&(ln.scope=`language:${yt}`),this.add(ln)}toHTML(){return new s(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(Ne){return Ne?typeof Ne=="string"?Ne:Ne.source:null}function d(Ne){return v("(?=",Ne,")")}function h(Ne){return v("(?:",Ne,")*")}function p(Ne){return v("(?:",Ne,")?")}function v(...Ne){return Ne.map(yt=>f(yt)).join("")}function g(Ne){const rt=Ne[Ne.length-1];return typeof rt=="object"&&rt.constructor===Object?(Ne.splice(Ne.length-1,1),rt):{}}function y(...Ne){return"("+(g(Ne).capture?"":"?:")+Ne.map(ln=>f(ln)).join("|")+")"}function b(Ne){return new RegExp(Ne.toString()+"|").exec("").length-1}function _(Ne,rt){const yt=Ne&&Ne.exec(rt);return yt&&yt.index===0}const x=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function T(Ne,{joinWith:rt}){let yt=0;return Ne.map(ln=>{yt+=1;const ce=yt;let ue=f(ln),j="";for(;ue.length>0;){const H=x.exec(ue);if(!H){j+=ue;break}j+=ue.substring(0,H.index),ue=ue.substring(H.index+H[0].length),H[0][0]==="\\"&&H[1]?j+="\\"+String(Number(H[1])+ce):(j+=H[0],H[0]==="("&&yt++)}return j}).map(ln=>`(${ln})`).join(rt)}const k=/\b\B/,C="[a-zA-Z]\\w*",D="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",R="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V="\\b(0b[01]+)",F="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",$=(Ne={})=>{const rt=/^#![ ]*\//;return Ne.binary&&(Ne.begin=v(rt,/.*\b/,Ne.binary,/\b.*/)),r({scope:"meta",begin:rt,end:/$/,relevance:0,"on:begin":(yt,ln)=>{yt.index!==0&&ln.ignoreMatch()}},Ne)},J={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[J]},Q={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[J]},ne={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},ee=function(Ne,rt,yt={}){const ln=r({scope:"comment",begin:Ne,end:rt,contains:[]},yt);ln.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ce=y("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ln.contains.push({begin:v(/[ ]+/,"(",ce,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ln},de=ee("//","$"),ke=ee("/\\*","\\*/"),Ee=ee("#","$"),xe={scope:"number",begin:O,relevance:0},De={scope:"number",begin:R,relevance:0},ze={scope:"number",begin:V,relevance:0},We={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[J,{begin:/\[/,end:/\]/,relevance:0,contains:[J]}]},tt={scope:"title",begin:C,relevance:0},ht={scope:"title",begin:D,relevance:0},we={begin:"\\.\\s*"+D,relevance:0};var me=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:J,BINARY_NUMBER_MODE:ze,BINARY_NUMBER_RE:V,COMMENT:ee,C_BLOCK_COMMENT_MODE:ke,C_LINE_COMMENT_MODE:de,C_NUMBER_MODE:De,C_NUMBER_RE:R,END_SAME_AS_BEGIN:function(Ne){return Object.assign(Ne,{"on:begin":(rt,yt)=>{yt.data._beginMatch=rt[1]},"on:end":(rt,yt)=>{yt.data._beginMatch!==rt[1]&&yt.ignoreMatch()}})},HASH_COMMENT_MODE:Ee,IDENT_RE:C,MATCH_NOTHING_RE:k,METHOD_GUARD:we,NUMBER_MODE:xe,NUMBER_RE:O,PHRASAL_WORDS_MODE:ne,QUOTE_STRING_MODE:Q,REGEXP_MODE:We,RE_STARTERS_RE:F,SHEBANG:$,TITLE_MODE:tt,UNDERSCORE_IDENT_RE:D,UNDERSCORE_TITLE_MODE:ht});function ge(Ne,rt){Ne.input[Ne.index-1]==="."&&rt.ignoreMatch()}function ve(Ne,rt){Ne.className!==void 0&&(Ne.scope=Ne.className,delete Ne.className)}function ye(Ne,rt){rt&&Ne.beginKeywords&&(Ne.begin="\\b("+Ne.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Ne.__beforeBegin=ge,Ne.keywords=Ne.keywords||Ne.beginKeywords,delete Ne.beginKeywords,Ne.relevance===void 0&&(Ne.relevance=0))}function le(Ne,rt){Array.isArray(Ne.illegal)&&(Ne.illegal=y(...Ne.illegal))}function Se(Ne,rt){if(Ne.match){if(Ne.begin||Ne.end)throw new Error("begin & end are not supported with match");Ne.begin=Ne.match,delete Ne.match}}function Me(Ne,rt){Ne.relevance===void 0&&(Ne.relevance=1)}const Pe=(Ne,rt)=>{if(!Ne.beforeMatch)return;if(Ne.starts)throw new Error("beforeMatch cannot be used with starts");const yt=Object.assign({},Ne);Object.keys(Ne).forEach(ln=>{delete Ne[ln]}),Ne.keywords=yt.keywords,Ne.begin=v(yt.beforeMatch,d(yt.begin)),Ne.starts={relevance:0,contains:[Object.assign(yt,{endsParent:!0})]},Ne.relevance=0,delete yt.beforeMatch},Fe=["of","and","for","in","not","or","if","then","parent","list","value"],Ve="keyword";function st(Ne,rt,yt=Ve){const ln=Object.create(null);return typeof Ne=="string"?ce(yt,Ne.split(" ")):Array.isArray(Ne)?ce(yt,Ne):Object.keys(Ne).forEach(function(ue){Object.assign(ln,st(Ne[ue],rt,ue))}),ln;function ce(ue,j){rt&&(j=j.map(H=>H.toLowerCase())),j.forEach(function(H){const X=H.split("|");ln[X[0]]=[ue,lt(X[0],X[1])]})}}function lt(Ne,rt){return rt?Number(rt):Tt(Ne)?0:1}function Tt(Ne){return Fe.includes(Ne.toLowerCase())}const an={},Pt=Ne=>{console.error(Ne)},xn=(Ne,...rt)=>{console.log(`WARN: ${Ne}`,...rt)},gn=(Ne,rt)=>{an[`${Ne}/${rt}`]||(console.log(`Deprecated as of ${Ne}. ${rt}`),an[`${Ne}/${rt}`]=!0)},ot=new Error;function bt(Ne,rt,{key:yt}){let ln=0;const ce=Ne[yt],ue={},j={};for(let H=1;H<=rt.length;H++)j[H+ln]=ce[H],ue[H+ln]=!0,ln+=b(rt[H-1]);Ne[yt]=j,Ne[yt]._emit=ue,Ne[yt]._multi=!0}function It(Ne){if(Array.isArray(Ne.begin)){if(Ne.skip||Ne.excludeBegin||Ne.returnBegin)throw Pt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ot;if(typeof Ne.beginScope!="object"||Ne.beginScope===null)throw Pt("beginScope must be object"),ot;bt(Ne,Ne.begin,{key:"beginScope"}),Ne.begin=T(Ne.begin,{joinWith:""})}}function sn(Ne){if(Array.isArray(Ne.end)){if(Ne.skip||Ne.excludeEnd||Ne.returnEnd)throw Pt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ot;if(typeof Ne.endScope!="object"||Ne.endScope===null)throw Pt("endScope must be object"),ot;bt(Ne,Ne.end,{key:"endScope"}),Ne.end=T(Ne.end,{joinWith:""})}}function _n(Ne){Ne.scope&&typeof Ne.scope=="object"&&Ne.scope!==null&&(Ne.beginScope=Ne.scope,delete Ne.scope)}function Hn(Ne){_n(Ne),typeof Ne.beginScope=="string"&&(Ne.beginScope={_wrap:Ne.beginScope}),typeof Ne.endScope=="string"&&(Ne.endScope={_wrap:Ne.endScope}),It(Ne),sn(Ne)}function On(Ne){function rt(j,H){return new RegExp(f(j),"m"+(Ne.case_insensitive?"i":"")+(Ne.unicodeRegex?"u":"")+(H?"g":""))}class yt{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(H,X){X.position=this.position++,this.matchIndexes[this.matchAt]=X,this.regexes.push([X,H]),this.matchAt+=b(H)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const H=this.regexes.map(X=>X[1]);this.matcherRe=rt(T(H,{joinWith:"|"}),!0),this.lastIndex=0}exec(H){this.matcherRe.lastIndex=this.lastIndex;const X=this.matcherRe.exec(H);if(!X)return null;const ie=X.findIndex((qe,at)=>at>0&&qe!==void 0),be=this.matchIndexes[ie];return X.splice(0,ie),Object.assign(X,be)}}class ln{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(H){if(this.multiRegexes[H])return this.multiRegexes[H];const X=new yt;return this.rules.slice(H).forEach(([ie,be])=>X.addRule(ie,be)),X.compile(),this.multiRegexes[H]=X,X}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(H,X){this.rules.push([H,X]),X.type==="begin"&&this.count++}exec(H){const X=this.getMatcher(this.regexIndex);X.lastIndex=this.lastIndex;let ie=X.exec(H);if(this.resumingScanAtSamePosition()&&!(ie&&ie.index===this.lastIndex)){const be=this.getMatcher(0);be.lastIndex=this.lastIndex+1,ie=be.exec(H)}return ie&&(this.regexIndex+=ie.position+1,this.regexIndex===this.count&&this.considerAll()),ie}}function ce(j){const H=new ln;return j.contains.forEach(X=>H.addRule(X.begin,{rule:X,type:"begin"})),j.terminatorEnd&&H.addRule(j.terminatorEnd,{type:"end"}),j.illegal&&H.addRule(j.illegal,{type:"illegal"}),H}function ue(j,H){const X=j;if(j.isCompiled)return X;[ve,Se,Hn,Pe].forEach(be=>be(j,H)),Ne.compilerExtensions.forEach(be=>be(j,H)),j.__beforeBegin=null,[ye,le,Me].forEach(be=>be(j,H)),j.isCompiled=!0;let ie=null;return typeof j.keywords=="object"&&j.keywords.$pattern&&(j.keywords=Object.assign({},j.keywords),ie=j.keywords.$pattern,delete j.keywords.$pattern),ie=ie||/\w+/,j.keywords&&(j.keywords=st(j.keywords,Ne.case_insensitive)),X.keywordPatternRe=rt(ie,!0),H&&(j.begin||(j.begin=/\B|\b/),X.beginRe=rt(X.begin),!j.end&&!j.endsWithParent&&(j.end=/\B|\b/),j.end&&(X.endRe=rt(X.end)),X.terminatorEnd=f(X.end)||"",j.endsWithParent&&H.terminatorEnd&&(X.terminatorEnd+=(j.end?"|":"")+H.terminatorEnd)),j.illegal&&(X.illegalRe=rt(j.illegal)),j.contains||(j.contains=[]),j.contains=[].concat(...j.contains.map(function(be){return Dt(be==="self"?j:be)})),j.contains.forEach(function(be){ue(be,X)}),j.starts&&ue(j.starts,H),X.matcher=ce(X),X}if(Ne.compilerExtensions||(Ne.compilerExtensions=[]),Ne.contains&&Ne.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Ne.classNameAliases=r(Ne.classNameAliases||{}),ue(Ne)}function Ye(Ne){return Ne?Ne.endsWithParent||Ye(Ne.starts):!1}function Dt(Ne){return Ne.variants&&!Ne.cachedVariants&&(Ne.cachedVariants=Ne.variants.map(function(rt){return r(Ne,{variants:null},rt)})),Ne.cachedVariants?Ne.cachedVariants:Ye(Ne)?r(Ne,{starts:Ne.starts?r(Ne.starts):null}):Object.isFrozen(Ne)?r(Ne):Ne}var Xt="11.11.1";class pn extends Error{constructor(rt,yt){super(rt),this.name="HTMLInjectionError",this.html=yt}}const wn=t,Qn=r,gr=Symbol("nomatch"),xr=7,Ni=function(Ne){const rt=Object.create(null),yt=Object.create(null),ln=[];let ce=!0;const ue="Could not find the language '{}', did you forget to load/include a language module?",j={disableAutodetect:!0,name:"Plain text",contains:[]};let H={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function X(Je){return H.noHighlightRe.test(Je)}function ie(Je){let Ct=Je.className+" ";Ct+=Je.parentNode?Je.parentNode.className:"";const un=H.languageDetectRe.exec(Ct);if(un){const jn=ae(un[1]);return jn||(xn(ue.replace("{}",un[1])),xn("Falling back to no-highlight mode for this block.",Je)),jn?un[1]:"no-highlight"}return Ct.split(/\s+/).find(jn=>X(jn)||ae(jn))}function be(Je,Ct,un){let jn="",er="";typeof Ct=="object"?(jn=Je,un=Ct.ignoreIllegals,er=Ct.language):(gn("10.7.0","highlight(lang, code, ...args) has been deprecated."),gn("10.7.0",`Please use highlight(code, options) instead.
|
|
215
215
|
https://github.com/highlightjs/highlight.js/issues/2277`),er=Je,jn=Ct),un===void 0&&(un=!0);const Jr={code:jn,language:er};ct("before:highlight",Jr);const to=Jr.result?Jr.result:qe(Jr.language,Jr.code,un);return to.code=Jr.code,ct("after:highlight",to),to}function qe(Je,Ct,un,jn){const er=Object.create(null);function Jr(Ot,on){return Ot.keywords[on]}function to(){if(!Cn.keywords){Er.addText(tr);return}let Ot=0;Cn.keywordPatternRe.lastIndex=0;let on=Cn.keywordPatternRe.exec(tr),In="";for(;on;){In+=tr.substring(Ot,on.index);const Yn=bi.case_insensitive?on[0].toLowerCase():on[0],Qr=Jr(Cn,Yn);if(Qr){const[Ba,cu]=Qr;if(Er.addText(In),In="",er[Yn]=(er[Yn]||0)+1,er[Yn]<=xr&&(ra+=cu),Ba.startsWith("_"))In+=on[0];else{const Bd=bi.classNameAliases[Ba]||Ba;Hi(on[0],Bd)}}else In+=on[0];Ot=Cn.keywordPatternRe.lastIndex,on=Cn.keywordPatternRe.exec(tr)}In+=tr.substring(Ot),Er.addText(In)}function au(){if(tr==="")return;let Ot=null;if(typeof Cn.subLanguage=="string"){if(!rt[Cn.subLanguage]){Er.addText(tr);return}Ot=qe(Cn.subLanguage,tr,!0,sl[Cn.subLanguage]),sl[Cn.subLanguage]=Ot._top}else Ot=Xe(tr,Cn.subLanguage.length?Cn.subLanguage:null);Cn.relevance>0&&(ra+=Ot.relevance),Er.__addSublanguage(Ot._emitter,Ot.language)}function ci(){Cn.subLanguage!=null?au():to(),tr=""}function Hi(Ot,on){Ot!==""&&(Er.startScope(on),Er.addText(Ot),Er.endScope())}function al(Ot,on){let In=1;const Yn=on.length-1;for(;In<=Yn;){if(!Ot._emit[In]){In++;continue}const Qr=bi.classNameAliases[Ot[In]]||Ot[In],Ba=on[In];Qr?Hi(Ba,Qr):(tr=Ba,to(),tr=""),In++}}function ou(Ot,on){return Ot.scope&&typeof Ot.scope=="string"&&Er.openNode(bi.classNameAliases[Ot.scope]||Ot.scope),Ot.beginScope&&(Ot.beginScope._wrap?(Hi(tr,bi.classNameAliases[Ot.beginScope._wrap]||Ot.beginScope._wrap),tr=""):Ot.beginScope._multi&&(al(Ot.beginScope,on),tr="")),Cn=Object.create(Ot,{parent:{value:Cn}}),Cn}function na(Ot,on,In){let Yn=_(Ot.endRe,In);if(Yn){if(Ot["on:end"]){const Qr=new e(Ot);Ot["on:end"](on,Qr),Qr.isMatchIgnored&&(Yn=!1)}if(Yn){for(;Ot.endsParent&&Ot.parent;)Ot=Ot.parent;return Ot}}if(Ot.endsWithParent)return na(Ot.parent,on,In)}function Ld(Ot){return Cn.matcher.regexIndex===0?(tr+=Ot[0],1):(Io=!0,0)}function Pd(Ot){const on=Ot[0],In=Ot.rule,Yn=new e(In),Qr=[In.__beforeBegin,In["on:begin"]];for(const Ba of Qr)if(Ba&&(Ba(Ot,Yn),Yn.isMatchIgnored))return Ld(on);return In.skip?tr+=on:(In.excludeBegin&&(tr+=on),ci(),!In.returnBegin&&!In.excludeBegin&&(tr=on)),ou(In,Ot),In.returnBegin?0:on.length}function su(Ot){const on=Ot[0],In=Ct.substring(Ot.index),Yn=na(Cn,Ot,In);if(!Yn)return gr;const Qr=Cn;Cn.endScope&&Cn.endScope._wrap?(ci(),Hi(on,Cn.endScope._wrap)):Cn.endScope&&Cn.endScope._multi?(ci(),al(Cn.endScope,Ot)):Qr.skip?tr+=on:(Qr.returnEnd||Qr.excludeEnd||(tr+=on),ci(),Qr.excludeEnd&&(tr=on));do Cn.scope&&Er.closeNode(),!Cn.skip&&!Cn.subLanguage&&(ra+=Cn.relevance),Cn=Cn.parent;while(Cn!==Yn.parent);return Yn.starts&&ou(Yn.starts,Ot),Qr.returnEnd?0:on.length}function lu(){const Ot=[];for(let on=Cn;on!==bi;on=on.parent)on.scope&&Ot.unshift(on.scope);Ot.forEach(on=>Er.openNode(on))}let uu={};function as(Ot,on){const In=on&&on[0];if(tr+=Ot,In==null)return ci(),0;if(uu.type==="begin"&&on.type==="end"&&uu.index===on.index&&In===""){if(tr+=Ct.slice(on.index,on.index+1),!ce){const Yn=new Error(`0 width match regex (${Je})`);throw Yn.languageName=Je,Yn.badRule=uu.rule,Yn}return 1}if(uu=on,on.type==="begin")return Pd(on);if(on.type==="illegal"&&!un){const Yn=new Error('Illegal lexeme "'+In+'" for mode "'+(Cn.scope||"<unnamed>")+'"');throw Yn.mode=Cn,Yn}else if(on.type==="end"){const Yn=su(on);if(Yn!==gr)return Yn}if(on.type==="illegal"&&In==="")return tr+=`
|
|
216
|
-
`,1;if(ss>1e5&&ss>on.index*3)throw new Error("potential infinite loop, way more iterations than matches");return tr+=In,In.length}const bi=ae(Je);if(!bi)throw Pt(ue.replace("{}",Je)),new Error('Unknown language: "'+Je+'"');const Cc=On(bi);let ol="",Cn=jn||Cc;const sl={},Er=new H.__emitter(H);lu();let tr="",ra=0,Pa=0,ss=0,Io=!1;try{if(bi.__emitTokens)bi.__emitTokens(Ct,Er);else{for(Cn.matcher.considerAll();;){ss++,Io?Io=!1:Cn.matcher.considerAll(),Cn.matcher.lastIndex=Pa;const Ot=Cn.matcher.exec(Ct);if(!Ot)break;const on=Ct.substring(Pa,Ot.index),In=as(on,Ot);Pa=Ot.index+In}as(Ct.substring(Pa))}return Er.finalize(),ol=Er.toHTML(),{language:Je,value:ol,relevance:ra,illegal:!1,_emitter:Er,_top:Cn}}catch(Ot){if(Ot.message&&Ot.message.includes("Illegal"))return{language:Je,value:wn(Ct),illegal:!0,relevance:0,_illegalBy:{message:Ot.message,index:Pa,context:Ct.slice(Pa-100,Pa+100),mode:Ot.mode,resultSoFar:ol},_emitter:Er};if(ce)return{language:Je,value:wn(Ct),illegal:!1,relevance:0,errorRaised:Ot,_emitter:Er,_top:Cn};throw Ot}}function at(Je){const Ct={value:wn(Je),illegal:!1,relevance:0,_top:j,_emitter:new H.__emitter(H)};return Ct._emitter.addText(Je),Ct}function Xe(Je,Ct){Ct=Ct||H.languages||Object.keys(rt);const un=at(Je),jn=Ct.filter(ae).filter(Ae).map(ci=>qe(ci,Je,!1));jn.unshift(un);const er=jn.sort((ci,Hi)=>{if(ci.relevance!==Hi.relevance)return Hi.relevance-ci.relevance;if(ci.language&&Hi.language){if(ae(ci.language).supersetOf===Hi.language)return 1;if(ae(Hi.language).supersetOf===ci.language)return-1}return 0}),[Jr,to]=er,au=Jr;return au.secondBest=to,au}function Mt(Je,Ct,un){const jn=Ct&&yt[Ct]||un;Je.classList.add("hljs"),Je.classList.add(`language-${jn}`)}function Yt(Je){let Ct=null;const un=ie(Je);if(X(un))return;if(ct("before:highlightElement",{el:Je,language:un}),Je.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Je);return}if(Je.children.length>0&&(H.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Je)),H.throwUnescapedHTML))throw new pn("One of your code blocks includes unescaped HTML.",Je.innerHTML);Ct=Je;const jn=Ct.textContent,er=un?be(jn,{language:un,ignoreIllegals:!0}):Xe(jn);Je.innerHTML=er.value,Je.dataset.highlighted="yes",Mt(Je,un,er.language),Je.result={language:er.language,re:er.relevance,relevance:er.relevance},er.secondBest&&(Je.secondBest={language:er.secondBest.language,relevance:er.secondBest.relevance}),ct("after:highlightElement",{el:Je,result:er,text:jn})}function zt(Je){H=Qn(H,Je)}const yn=()=>{G(),gn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Dn(){G(),gn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Z=!1;function G(){function Je(){G()}if(document.readyState==="loading"){Z||window.addEventListener("DOMContentLoaded",Je,!1),Z=!0;return}document.querySelectorAll(H.cssSelector).forEach(Yt)}function A(Je,Ct){let un=null;try{un=Ct(Ne)}catch(jn){if(Pt("Language definition for '{}' could not be registered.".replace("{}",Je)),ce)Pt(jn);else throw jn;un=j}un.name||(un.name=Je),rt[Je]=un,un.rawDefinition=Ct.bind(null,Ne),un.aliases&&he(un.aliases,{languageName:Je})}function L(Je){delete rt[Je];for(const Ct of Object.keys(yt))yt[Ct]===Je&&delete yt[Ct]}function Y(){return Object.keys(rt)}function ae(Je){return Je=(Je||"").toLowerCase(),rt[Je]||rt[yt[Je]]}function he(Je,{languageName:Ct}){typeof Je=="string"&&(Je=[Je]),Je.forEach(un=>{yt[un.toLowerCase()]=Ct})}function Ae(Je){const Ct=ae(Je);return Ct&&!Ct.disableAutodetect}function He(Je){Je["before:highlightBlock"]&&!Je["before:highlightElement"]&&(Je["before:highlightElement"]=Ct=>{Je["before:highlightBlock"](Object.assign({block:Ct.el},Ct))}),Je["after:highlightBlock"]&&!Je["after:highlightElement"]&&(Je["after:highlightElement"]=Ct=>{Je["after:highlightBlock"](Object.assign({block:Ct.el},Ct))})}function je(Je){He(Je),ln.push(Je)}function pt(Je){const Ct=ln.indexOf(Je);Ct!==-1&&ln.splice(Ct,1)}function ct(Je,Ct){const un=Je;ln.forEach(function(jn){jn[un]&&jn[un](Ct)})}function Bt(Je){return gn("10.7.0","highlightBlock will be removed entirely in v12.0"),gn("10.7.0","Please use highlightElement now."),Yt(Je)}Object.assign(Ne,{highlight:be,highlightAuto:Xe,highlightAll:G,highlightElement:Yt,highlightBlock:Bt,configure:zt,initHighlighting:yn,initHighlightingOnLoad:Dn,registerLanguage:A,unregisterLanguage:L,listLanguages:Y,getLanguage:ae,registerAliases:he,autoDetection:Ae,inherit:Qn,addPlugin:je,removePlugin:pt}),Ne.debugMode=function(){ce=!1},Ne.safeMode=function(){ce=!0},Ne.versionString=Xt,Ne.regex={concat:v,lookahead:d,either:y,optional:p,anyNumberOfTimes:h};for(const Je in me)typeof me[Je]=="object"&&n(me[Je]);return Object.assign(Ne,me),Ne},kr=Ni({});return kr.newInstance=()=>Ni({}),Vw=kr,kr.HighlightJS=kr,kr.default=kr,Vw}var rhe=nhe();const ihe=YF(rhe),XL={},ahe="hljs-";function nH(n){const e=ihe.newInstance();return n&&a(n),{highlight:t,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function t(l,u,c){const f=c||XL,d=typeof f.prefix=="string"?f.prefix:ahe;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:ohe,classPrefix:d});const h=e.highlight(u,{ignoreIllegals:!0,language:l});if(h.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:h.errorRaised});const p=h._emitter.root,v=p.data;return v.language=h.language,v.relevance=h.relevance,p}function r(l,u){const f=(u||XL).subset||i();let d=-1,h=0,p;for(;++d<f.length;){const v=f[d];if(!e.getLanguage(v))continue;const g=t(v,l,u);g.data&&g.data.relevance!==void 0&&g.data.relevance>h&&(h=g.data.relevance,p=g)}return p||{type:"root",children:[],data:{language:void 0,relevance:h}}}function i(){return e.listLanguages()}function a(l,u){if(typeof l=="string")e.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&e.registerLanguage(c,l[c])}}function o(l,u){if(typeof l=="string")e.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){const f=l[c];e.registerAliases(typeof f=="string"?f:[...f],{languageName:c})}}}function s(l){return!!e.getLanguage(l)}}class ohe{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const t=this.stack[this.stack.length-1],r=t.children[t.children.length-1];r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const r=this.stack[this.stack.length-1],i=e.root.children;t?r.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):r.children.push(...i)}openNode(e){const t=this,r=e.split(".").map(function(o,s){return s?o+"_".repeat(s):t.options.classPrefix+o}),i=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const js=m.defineComponent({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1},offset:{default:8},hasClass:{default:""},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(),a=m.ref(),o=m.ref(),s=m.ref(!1),l=m.computed(()=>t.contentStyle||{});return m.watch(()=>t.value,()=>{i.value&&(t.value?i.value.show():i.value.hide())}),m.onUnmounted(()=>{i.value&&i.value.destroy()}),m.onMounted(()=>{i.value=Zl(a.value,{content:o.value,allowHTML:!0,trigger:t.trigger,placement:t.placement,interactive:!0,appendTo:t.appendTo||document.body,maxWidth:"none",offset:[0,t.offset],duration:200,animation:"scale",theme:"popover",onShow(){s.value=!0,t.value||r("update:value",!0)},onShown(){},onHide(){t.value&&r("update:value",!1)},onHidden(){s.value=!1}}),t.disabled&&i.value.disable()}),(u,c)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-popover-wrapper white-editor-namespace flex-shrink-0",{center:n.center,[n.hasClass]:n.hasClass,inline:n.inline}]),ref_key:"triggerRef",ref:a},[m.createElementVNode("div",{class:"white-popover-content",style:m.normalizeStyle(l.value),ref_key:"contentRef",ref:o},[s.value?m.renderSlot(u.$slots,"content",{key:0}):m.createCommentVNode("",!0)],4),m.renderSlot(u.$slots,"default")],2))}}),she={class:"prefix"},lhe=["disabled","value","placeholder"],uhe={class:"suffix"},lm=m.defineComponent({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},simple:{type:Boolean,default:!1},status:{default:""},size:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(n,{expose:e,emit:t}){const r=t,i=m.ref(!1),a=c=>{r("update:value",c.target.value)},o=c=>{i.value=!1,r("blur",c)},s=c=>{i.value=!0,r("focus",c)},l=m.ref();return e({focus:()=>{l.value&&l.value.focus()}}),(c,f)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-input-wrapper",{disabled:n.disabled,focused:i.value,simple:n.simple,[n.size]:n.size,"status-success":n.status==="success","status-error":n.status==="error"}])},[m.createElementVNode("span",she,[m.renderSlot(c.$slots,"prefix")]),m.createElementVNode("input",{type:"text",ref_key:"inputRef",ref:l,disabled:n.disabled,value:n.value,placeholder:n.placeholder,onInput:f[0]||(f[0]=d=>a(d)),onFocus:f[1]||(f[1]=d=>s(d)),onBlur:f[2]||(f[2]=d=>o(d)),onChange:f[3]||(f[3]=d=>r("change",d)),onKeydown:f[4]||(f[4]=m.withKeys(d=>r("enter",d),["enter"]))},null,40,lhe),m.createElementVNode("span",uhe,[m.renderSlot(c.$slots,"suffix")])],2))}}),che={key:0,class:"white-select-wrapper"},fhe={class:"selector"},dhe={class:"icon"},hhe=["onClick"],phe={class:"icon"},wg=m.defineComponent({__name:"Select",props:{value:{},size:{default:""},options:{},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{default:"搜索"},maxHeight:{type:Boolean,default:!0},maxWidth:{default:0},hasBorder:{type:Boolean,default:!0}},emits:["update:value","change"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=m.ref(!1),o=m.ref(),s=m.ref(),l=m.ref(0),u=m.ref(""),c=m.computed(()=>r.options.find(y=>y.value===r.value)?.label||r.value||"请选择"),f=m.computed(()=>c.value==="请选择"),d=m.computed(()=>{if(!r.search||!u.value.trim())return r.options;const y=r.options.filter(b=>b.label.toLowerCase().indexOf(u.value.toLowerCase())!==-1);return y.length?y:r.options});m.watch(a,()=>{a.value?m.nextTick(()=>{s.value&&s.value.focus()}):u.value=""}),m.onBeforeUnmount(()=>{u.value=""});const h=()=>{o.value&&(l.value=r.maxWidth?Number(r.maxWidth):o.value.clientWidth)},p=new ResizeObserver(h);m.onMounted(()=>{o.value&&p.observe(o.value)}),m.onUnmounted(()=>{o.value&&p.unobserve(o.value)});const v=y=>{y.disabled||(i("update:value",y.value),i("change",y.value),a.value=!1)};return e({changePopoverVisible:y=>{a.value=y}}),(y,b)=>n.disabled?(m.openBlock(),m.createElementBlock("div",che,[m.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:o},[m.createElementVNode("div",fhe,m.toDisplayString(n.value),1),m.createElementVNode("div",dhe,[m.renderSlot(y.$slots,"icon",{},()=>[b[1]||(b[1]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px]"},null,-1))])])],512)])):(m.openBlock(),m.createBlock(js,{key:1,class:"white-select-wrapper",trigger:"click",value:a.value,"onUpdate:value":b[0]||(b[0]=_=>a.value=_),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"white-options-wrapper",style:m.normalizeStyle({width:l.value+2+"px",maxHeight:n.maxHeight?"260px":"auto"})},[m.renderSlot(y.$slots,"main",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(d.value,(_,x)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["option",{disabled:_.disabled,selected:_.value===n.value}]),key:x,onClick:T=>v(_)},m.toDisplayString(_.label),11,hhe))),128))])],4)]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["select",{[n.size]:n.size,"border border-[#d9d9d9] !bg-[#fff]":n.hasBorder}]),ref_key:"selectRef",ref:o},[m.createElementVNode("div",{class:m.normalizeClass(["selector",{placeholder:f.value}])},[m.renderSlot(y.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(c.value),1)])],2),m.createElementVNode("div",phe,[m.renderSlot(y.$slots,"icon",{},()=>[b[2]||(b[2]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px]"},null,-1))])])],2)]),_:3},8,["value"]))}});var h1={exports:{}};var vhe=h1.exports,ZL;function ghe(){return ZL||(ZL=1,(function(n,e){(function(r,i){n.exports=i()})(vhe,function(){return(function(){var t={686:(function(a,o,s){s.d(o,{default:function(){return Ee}});var l=s(279),u=s.n(l),c=s(370),f=s.n(c),d=s(817),h=s.n(d);function p(xe){try{return document.execCommand(xe)}catch{return!1}}var v=function(De){var ze=h()(De);return p("cut"),ze},g=v;function y(xe){var De=document.documentElement.getAttribute("dir")==="rtl",ze=document.createElement("textarea");ze.style.fontSize="12pt",ze.style.border="0",ze.style.padding="0",ze.style.margin="0",ze.style.position="absolute",ze.style[De?"right":"left"]="-9999px";var We=window.pageYOffset||document.documentElement.scrollTop;return ze.style.top="".concat(We,"px"),ze.setAttribute("readonly",""),ze.value=xe,ze}var b=function(De,ze){var We=y(De);ze.container.appendChild(We);var tt=h()(We);return p("copy"),We.remove(),tt},_=function(De){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},We="";return typeof De=="string"?We=b(De,ze):De instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(De?.type)?We=b(De.value,ze):(We=h()(De),p("copy")),We},x=_;function T(xe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(ze){return typeof ze}:T=function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze},T(xe)}var k=function(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ze=De.action,We=ze===void 0?"copy":ze,tt=De.container,ht=De.target,we=De.text;if(We!=="copy"&&We!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ht!==void 0)if(ht&&T(ht)==="object"&&ht.nodeType===1){if(We==="copy"&&ht.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(We==="cut"&&(ht.hasAttribute("readonly")||ht.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(we)return x(we,{container:tt});if(ht)return We==="cut"?g(ht):x(ht,{container:tt})},C=k;function D(xe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(ze){return typeof ze}:D=function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze},D(xe)}function O(xe,De){if(!(xe instanceof De))throw new TypeError("Cannot call a class as a function")}function R(xe,De){for(var ze=0;ze<De.length;ze++){var We=De[ze];We.enumerable=We.enumerable||!1,We.configurable=!0,"value"in We&&(We.writable=!0),Object.defineProperty(xe,We.key,We)}}function V(xe,De,ze){return De&&R(xe.prototype,De),ze&&R(xe,ze),xe}function F(xe,De){if(typeof De!="function"&&De!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(De&&De.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),De&&$(xe,De)}function $(xe,De){return $=Object.setPrototypeOf||function(We,tt){return We.__proto__=tt,We},$(xe,De)}function J(xe){var De=ne();return function(){var We=ee(xe),tt;if(De){var ht=ee(this).constructor;tt=Reflect.construct(We,arguments,ht)}else tt=We.apply(this,arguments);return te(this,tt)}}function te(xe,De){return De&&(D(De)==="object"||typeof De=="function")?De:Q(xe)}function Q(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ee(xe){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(ze){return ze.__proto__||Object.getPrototypeOf(ze)},ee(xe)}function de(xe,De){var ze="data-clipboard-".concat(xe);if(De.hasAttribute(ze))return De.getAttribute(ze)}var ke=(function(xe){F(ze,xe);var De=J(ze);function ze(We,tt){var ht;return O(this,ze),ht=De.call(this),ht.resolveOptions(tt),ht.listenClick(We),ht}return V(ze,[{key:"resolveOptions",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof tt.action=="function"?tt.action:this.defaultAction,this.target=typeof tt.target=="function"?tt.target:this.defaultTarget,this.text=typeof tt.text=="function"?tt.text:this.defaultText,this.container=D(tt.container)==="object"?tt.container:document.body}},{key:"listenClick",value:function(tt){var ht=this;this.listener=f()(tt,"click",function(we){return ht.onClick(we)})}},{key:"onClick",value:function(tt){var ht=tt.delegateTarget||tt.currentTarget,we=this.action(ht)||"copy",_e=C({action:we,container:this.container,target:this.target(ht),text:this.text(ht)});this.emit(_e?"success":"error",{action:we,text:_e,trigger:ht,clearSelection:function(){ht&&ht.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(tt){return de("action",tt)}},{key:"defaultTarget",value:function(tt){var ht=de("target",tt);if(ht)return document.querySelector(ht)}},{key:"defaultText",value:function(tt){return de("text",tt)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(tt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return x(tt,ht)}},{key:"cut",value:function(tt){return g(tt)}},{key:"isSupported",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ht=typeof tt=="string"?[tt]:tt,we=!!document.queryCommandSupported;return ht.forEach(function(_e){we=we&&!!document.queryCommandSupported(_e)}),we}}]),ze})(u()),Ee=ke}),828:(function(a){var o=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function l(u,c){for(;u&&u.nodeType!==o;){if(typeof u.matches=="function"&&u.matches(c))return u;u=u.parentNode}}a.exports=l}),438:(function(a,o,s){var l=s(828);function u(d,h,p,v,g){var y=f.apply(this,arguments);return d.addEventListener(p,y,g),{destroy:function(){d.removeEventListener(p,y,g)}}}function c(d,h,p,v,g){return typeof d.addEventListener=="function"?u.apply(null,arguments):typeof p=="function"?u.bind(null,document).apply(null,arguments):(typeof d=="string"&&(d=document.querySelectorAll(d)),Array.prototype.map.call(d,function(y){return u(y,h,p,v,g)}))}function f(d,h,p,v){return function(g){g.delegateTarget=l(g.target,h),g.delegateTarget&&v.call(d,g)}}a.exports=c}),879:(function(a,o){o.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},o.nodeList=function(s){var l=Object.prototype.toString.call(s);return s!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in s&&(s.length===0||o.node(s[0]))},o.string=function(s){return typeof s=="string"||s instanceof String},o.fn=function(s){var l=Object.prototype.toString.call(s);return l==="[object Function]"}}),370:(function(a,o,s){var l=s(879),u=s(438);function c(p,v,g){if(!p&&!v&&!g)throw new Error("Missing required arguments");if(!l.string(v))throw new TypeError("Second argument must be a String");if(!l.fn(g))throw new TypeError("Third argument must be a Function");if(l.node(p))return f(p,v,g);if(l.nodeList(p))return d(p,v,g);if(l.string(p))return h(p,v,g);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(p,v,g){return p.addEventListener(v,g),{destroy:function(){p.removeEventListener(v,g)}}}function d(p,v,g){return Array.prototype.forEach.call(p,function(y){y.addEventListener(v,g)}),{destroy:function(){Array.prototype.forEach.call(p,function(y){y.removeEventListener(v,g)})}}}function h(p,v,g){return u(document.body,p,v,g)}a.exports=c}),817:(function(a){function o(s){var l;if(s.nodeName==="SELECT")s.focus(),l=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var u=s.hasAttribute("readonly");u||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),u||s.removeAttribute("readonly"),l=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),l=c.toString()}return l}a.exports=o}),279:(function(a){function o(){}o.prototype={on:function(s,l,u){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:l,ctx:u}),this},once:function(s,l,u){var c=this;function f(){c.off(s,f),l.apply(u,arguments)}return f._=l,this.on(s,f,u)},emit:function(s){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=u.length;for(c;c<f;c++)u[c].fn.apply(u[c].ctx,l);return this},off:function(s,l){var u=this.e||(this.e={}),c=u[s],f=[];if(c&&l)for(var d=0,h=c.length;d<h;d++)c[d].fn!==l&&c[d].fn._!==l&&f.push(c[d]);return f.length?u[s]=f:delete u[s],this}},a.exports=o,a.exports.TinyEmitter=o})},r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={exports:{}};return t[a](o,o.exports,i),o.exports}return(function(){i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,{a:o}),o}})(),(function(){i.d=function(a,o){for(var s in o)i.o(o,s)&&!i.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})}})(),(function(){i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)}})(),i(686)})().default})})(h1)),h1.exports}var mhe=ghe();const yhe=YF(mhe),lN=n=>({toClipboard(e,t){return new Promise((r,i)=>{const a=document.createElement("button"),o=new yhe(a,{text:()=>e,action:()=>"copy",container:t!==void 0?t:document.body});o.on("success",s=>{o.destroy(),r(s)}),o.on("error",s=>{o.destroy(),i(s)}),document.body.appendChild(a),a.click(),document.body.removeChild(a)})}}),bhe={class:"h-[40px] flex items-center justify-between px-[20px] border-b bg-[#f8fafe] overflow-hidden rounded-tl-[8px] rounded-tr-[8px]",contenteditable:"false"},xhe={key:1,class:"flex items-center gap-2 text-[14px]"},_he={key:2,class:"flex items-center gap-4 text-[#6a737d]"},She=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=nH(tH),t=m.inject("options"),r=e.listLanguages().map(s=>({label:s,value:s})),i=s=>{a("language",s)},a=(s,l)=>{n.updateAttributes({[s]:l})},o=async()=>{const{toClipboard:s}=lN();await s(n.node.textContent)};return(s,l)=>{const u=m.resolveDirective("tooltip");return m.openBlock(),m.createBlock(m.unref(Jl),{ref:"containerRef",class:"block white-code-node"},{default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["border rounded-[8px] white-code-content overflow-hidden",{"hover:border-[#007bff]":!m.unref(t).editor.readOnly}])},[m.createElementVNode("div",bhe,[m.unref(t).editor.readOnly?(m.openBlock(),m.createElementBlock("div",xhe,m.toDisplayString(s.node.attrs.language),1)):(m.openBlock(),m.createBlock(wg,{key:0,class:"w-[120px]",options:m.unref(r),value:s.node.attrs.language,hasBorder:!1,onChange:i},null,8,["options","value"])),m.unref(t).editor.readOnly?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",_he,[m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-copy-content cursor-pointer",onClick:o},null,512),[[u,"复制代码"]]),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-remove cursor-pointer",onClick:l[0]||(l[0]=(...c)=>s.deleteNode&&s.deleteNode(...c))},null,512),[[u,"删除"]])]))]),m.createElementVNode("div",{class:m.normalizeClass(["white-code-theme block overflow-auto max-h-[250px]",{"word-wrap":s.node.attrs.wordWrap}])},[m.createVNode(m.unref(Mae),{class:m.normalizeClass(`line-numbers language-${s.node.attrs.language}`),style:"white-space: pre-wrap !important;",as:"code"},null,8,["class"])],2)],2)]),_:1},512)}}}),whe=nH(tH),khe=Lfe.extend({addAttributes(){return{...this.parent?.(),language:{default:"javascript"},theme:{default:"light"},wordWrap:{default:!0}}},addNodeView(){return tl(She)}}),The=khe.configure({lowlight:whe}),Che={class:"cursor-pointer text-[0.85em]"},Ehe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("container");return m.inject("options"),m.inject("page"),m.ref(!1),m.ref(new Date),document.getElementById(e),(t,r)=>(m.openBlock(),m.createBlock(m.unref(Jl),{as:"span",class:"umo-node-datetime"},{default:m.withCtx(()=>[r[0]||(r[0]=m.createElementVNode("i",{class:"w-iconfont icon-date !text-[0.85em] text-[#007bff] pr-1"},null,-1)),m.createElementVNode("span",Che,m.toDisplayString(t.node.attrs.text),1)]),_:1}))}}),Mhe=yi.create({name:"datetime",group:"inline",inline:!0,atom:!0,selectable:!1,addAttributes(){return{type:{default:"datetime"},date:{default:null},text:{default:"[日期]"},format:{default:null},withTime:{default:!1},capitalize:{default:!1}}},parseHTML(){return[{tag:'span[data-type="datetime"]'}]},renderHTML({HTMLAttributes:n}){return["span",Jn(n,{"data-type":"datetime"}),n.text]},addNodeView(){return tl(Ehe)},addCommands(){return{insertDatetime:n=>({chain:e})=>e().insertContent({type:this.name,attrs:n}).run()}}}),Ahe={type:{type:String,default:"rect"},tag:{type:[String,Object],default:"div"},resizable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!1},skewable:{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},skew:{type:Array,default:()=>[0,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],extraLines:Function};function M_(n,e){const t=r=>{e&&e(r),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t),document.removeEventListener("mouseleave",t),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",t)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),document.addEventListener("mouseleave",t),document.addEventListener("touchmove",n),document.addEventListener("touchend",t)}function ad(n){let e=0,t=0;if(Nhe(n)){const r=n.targetTouches[0];e=r.pageX,t=r.pageY}else e=n.clientX,t=n.clientY;return{clientX:e,clientY:t}}function Nhe(n){const e=Object.prototype.toString.call(n);return e.substring(8,e.length-1)==="TouchEvent"}const zy=(n=0)=>parseInt(n+"")+"px",zw={n:"top",s:"bottom",e:"right",w:"left",ne:"top-right",nw:"top-left",se:"bottom-right",sw:"bottom-left"},gC=["n","ne","e","se","s","sw","w","nw"],Dhe={n:0,ne:1,e:2,se:3,s:4,sw:5,w:6,nw:7},Ohe={0:0,1:1,2:2,3:2,4:3,5:4,6:4,7:5,8:6,9:6,10:7,11:8},Ihe=(n,e)=>{const t=Ohe[Math.floor(n/30)],r=(Dhe[e]+t)%8;return gC[r]},JL=(n=0,e)=>{let t=[];for(let r=0;r<gC.length;r++){const i=gC[r],[a,o]=zw[i].split("-"),s=Ihe(n,i),l={[a]:"0%",cursor:s+"-resize",side:zw[i]};if(o)l[o]="0%";else{const u=["top","bottom"].includes(a)?"left":"top";l[u]="50%"}e?e.includes(zw[i])&&t.push(l):t.push(l)}return t},uN=n=>n*Math.PI/180,Rhe=(n,e)=>Math.sqrt(n*n+e*e),ei=n=>Math.cos(uN(n)),ti=n=>Math.sin(uN(n)),Lhe=(n,e,t,r,i,a,o)=>{let{width:s,height:l,centerX:u,centerY:c,rotateAngle:f}=e;const d=s<0?-1:1,h=l<0?-1:1;if(s=Math.abs(s),l=Math.abs(l),["top-left","top-right","bottom-left","bottom-right"].includes(n)){n==="top-right"?r=-r:n==="bottom-left"?t=-t:n==="top-left"&&(t=-t,r=-r);const p=$w(s,t,a);s=p.width,t=p.deltaW;const v=Fw(l,r,o);l=v.height,r=v.deltaH,i&&(r=t/i,l=s/i)}switch(n){case"right":{const p=$w(s,t,a);s=p.width,t=p.deltaW,i?(r=t/i,l=s/i,u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f)):(u+=t/2*ei(f),c+=t/2*ti(f));break}case"top-right":{u+=t/2*ei(f)+r/2*ti(f),c+=t/2*ti(f)-r/2*ei(f);break}case"bottom-right":{u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f);break}case"bottom":{const p=Fw(l,r,o);l=p.height,r=p.deltaH,i?(t=r*i,s=l*i,u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f)):(u-=r/2*ti(f),c+=r/2*ei(f));break}case"bottom-left":{u-=t/2*ei(f)+r/2*ti(f),c-=t/2*ti(f)-r/2*ei(f);break}case"left":{t=-t;const p=$w(s,t,a);s=p.width,t=p.deltaW,i?(l=s/i,r=t/i,u-=t/2*ei(f)+r/2*ti(f),c-=t/2*ti(f)-r/2*ei(f)):(u-=t/2*ei(f),c-=t/2*ti(f));break}case"top-left":{u-=t/2*ei(f)-r/2*ti(f),c-=t/2*ti(f)+r/2*ei(f);break}case"top":{r=-r;const p=Fw(l,r,o);l=p.height,r=p.deltaH,i?(s=l*i,t=r*i,u+=t/2*ei(f)+r/2*ti(f),c+=t/2*ti(f)-r/2*ei(f)):(u+=r/2*ti(f),c-=r/2*ei(f));break}}return{position:{centerX:u,centerY:c},size:{width:s*d,height:l*h}}},Fw=(n,e,t)=>{const r=n+e;return r>t?n=r:(e=t-n,n=t),{height:n,deltaH:e}},$w=(n,e,t)=>{const r=n+e;return r>t?n=r:(e=t-n,n=t),{width:n,deltaW:e}},Phe=({centerX:n,centerY:e,width:t,height:r,angle:i})=>({top:e-r/2,left:n-t/2,width:t,height:r,angle:i}),Bhe=(n,e,t)=>{const{width:r,height:i}=n;return{width:Math.abs(r),height:Math.abs(i),left:e-Math.abs(r)/2,top:t-Math.abs(i)/2}};function db(n,e){const t=Math.abs(n)%e,r=n>0?e:-e;let i=0;return t>e/2?i=r*Math.ceil(Math.abs(n)/e):i=r*Math.floor(Math.abs(n)/e),i}function Vhe(n,e,t){if(!n||!e)return!1;const r=Ml(n,t),i=Ml(e,t);return r.left<i.left+i.width&&r.left+r.width>i.left&&r.top<i.top+i.height&&r.top+r.height>i.top}const Ml=(n,e)=>{var t=n.getBoundingClientRect();return{...t,left:t.left/e,top:t.top/e,right:t.right/e,bottom:t.bottom/e,width:t.width/e,height:t.height/e}},QL=n=>typeof n=="function";function zhe(n,e){let t=null,r=null;const i=m.computed(()=>n.value.offsetParent||document.body),a=m.computed(()=>Ml(i.value,e.scaleRatio)),o=m.ref({x:[],y:[]}),s=()=>{e.markline&&!QL(e.markline)&&(t||(t=document.querySelector(".es-drager-markline-x")||e3("x",i.value,e.color)),r||(r=document.querySelector(".es-drager-markline-y")||e3("y",i.value,e.color)))},l=(h={})=>{if(e.markline){if((!t||!r)&&s(),QL(e.markline))return e.markline(h);h.left===null?t.style.display="none":(t.style.left=h.left+"px",t.style.backgroundColor=e.color,t.style.display="block"),h.top===null?r.style.display="none":(r.style.top=h.top+"px",r.style.backgroundColor=e.color,r.style.display="block")}},u=()=>{const h=Ml(n.value,e.scaleRatio),p=Array.from(document.querySelectorAll(".es-drager"));if(e.extraLines){const b=e.extraLines(h)||[];p.push(...b)}const v=[],g=[],y=[];for(let b=0;b<p.length;b++){const _=p[b];_.nodeType===1?_!==n.value&&v.push(Ml(_,e.scaleRatio)):_.showTop||_.showTop===0?y.push(_):(_.showLeft||_.showLeft===0)&&g.push(_)}o.value=Fhe(v,h),o.value.x.push(...g),o.value.y.push(...y)},c=()=>{const h={top:null,left:null,diffX:0,diffY:0},p=Ml(n.value,e.scaleRatio);for(let v=0;v<o.value.y.length;v++){const{top:g,showTop:y}=o.value.y[v];if(Math.abs(g-p.top)<e.snapThreshold){h.diffY=g-p.top,h.top=y-a.value.top;break}}for(let v=0;v<o.value.x.length;v++){const{left:g,showLeft:y}=o.value.x[v];if(Math.abs(g-p.left)<e.snapThreshold){h.diffX=g-p.left,h.left=y-a.value.left;break}}return l(h),h},f=()=>{l({left:null,top:null})},d=h=>{if(!(!e.snap&&!e.markline))switch(h){case"drag-start":u();break;case"drag":return c();case"drag-end":f();break}};return m.onMounted(()=>{s()}),{marklineEmit:d}}function e3(n="x",e,t=""){const r=document.createElement("div");return r.classList.add(`es-drager-markline-${n}`),r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="9999",r.style.backgroundColor=t,r.style.display="none",n==="x"?(r.style.height="100%",r.style.width="1px"):(r.style.height="1px",r.style.width="100%"),e.appendChild(r),r}function Fhe(n,e){const t={x:[],y:[]},{width:r=0,height:i=0}=e;return n.forEach(a=>{const{top:o,left:s,width:l,height:u}=a;t.y.push({showTop:o,top:o}),t.y.push({showTop:o,top:o-i}),t.y.push({showTop:o+u/2,top:o+u/2-i/2}),t.y.push({showTop:o+u,top:o+u}),t.y.push({showTop:o+u,top:o+u-i}),t.x.push({showLeft:s,left:s}),t.x.push({showLeft:s+l,left:s+l}),t.x.push({showLeft:s+l/2,left:s+l/2-r/2}),t.x.push({showLeft:s+l,left:s+l-r}),t.x.push({showLeft:s,left:s-r})}),t}function $he(n,e,t,{getBoundary:r,fixBoundary:i,checkDragerCollision:a,emit:o}){let s=0,l=0;return{onKeydown:u=>{let{left:c,top:f}=e.value;if(s||(s=c),l||(l=f),["ArrowRight","ArrowLeft"].includes(u.key)){const d=u.key==="ArrowRight";let h=d?1:-1;n.snapToGrid&&(h=d?n.gridX:-n.gridX),c=c+h}else if(["ArrowUp","ArrowDown"].includes(u.key)){const d=u.key==="ArrowDown";let h=d?1:-1;n.snapToGrid&&(h=d?n.gridY:-n.gridY),f=f+h}if(n.boundary){const[d,h,p,v]=r();[c,f]=i(c,f,d,h,p,v)}e.value.left=c,e.value.top=f},onKeyup:u=>{["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(u.key)&&n.checkCollision&&a()&&(e.value.left=s,e.value.top=l),s=0,l=0}}}function Hhe(n,e,t){const r=m.ref(!1),i=m.ref(!1),a=m.ref({width:e.width,height:e.height,left:e.left,top:e.top,angle:e.angle,skew:e.skew}),{marklineEmit:o}=zhe(n,e),s=new Set;function l(v){if(s.add(v.button),e.disabled)return;r.value=!0,i.value=!0;let{clientX:g,clientY:y}=ad(v);const{left:b,top:_}=a.value;let x=0,T=0,k=0,C=0;e.boundary&&([x,T,k,C]=u()),o("drag-start"),t&&t("drag-start",a.value),M_(D=>{if(s.size>1)return;const{clientX:O,clientY:R}=ad(D);let V=(O-g)/e.scaleRatio+b,F=(R-y)/e.scaleRatio+_;if(e.snapToGrid){let{left:$,top:J}=a.value;const te=V-$,Q=F-J;V=$+db(te,e.gridX),F=J+db(Q,e.gridY)}e.boundary&&([V,F]=c(V,F,x,T,k,C)),a.value.left=V,a.value.top=F,t&&t("drag",a.value),m.nextTick(()=>{const $=o("drag");e.snap&&($.diffX&&(a.value.left+=$.diffX),$.diffY&&(a.value.top+=$.diffY))})},D=>{e.checkCollision&&f()&&(a.value.top=_,a.value.left=b),s.clear(),r.value=!1,o("drag-end"),t&&t("drag-end",a.value)})}const u=()=>{let v=0,g=0;const{left:y,top:b,height:_,width:x,angle:T}=a.value,k=n.value.offsetParent||document.body,C=Ml(k,e.scaleRatio);if(T){const R=Ml(n.value,e.scaleRatio);v=R.left-Math.floor(y-(R.width-x)+C.left),g=R.top-Math.floor(b-(R.height-_)+C.top)}const D=C.width-x,O=C.height-_;return[v,D-v,g,O-g,C.width,C.height]},c=(v,g,y,b,_,x)=>(v=v<y?y:v,v=v>b?b:v,g=g<_?_:g,g=g>x?x:g,[v,g]),f=()=>{const v=n.value.offsetParent||document.body,g=Array.from(v.children).filter(y=>y!==n.value&&y.classList.contains("es-drager"));for(let y=0;y<g.length;y++){const b=g[y];if(Vhe(n.value,b,e.scaleRatio))return!0}},d=()=>{i.value=!1},{onKeydown:h,onKeyup:p}=$he(e,a,i,{getBoundary:u,fixBoundary:c,checkDragerCollision:f,emit:t});return m.watch(i,v=>{v?(t("focus",v),document.addEventListener("click",d,{once:!0})):t("blur",v),!e.disabledKeyEvent&&(v?(document.addEventListener("keydown",h),document.addEventListener("keyup",p)):(document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)))}),m.onMounted(()=>{if(n.value){if(!a.value.width&&!a.value.height){const{width:v,height:g}=Ml(n.value,e.scaleRatio);a.value={...a.value,width:v+2,height:g+2}}if(n.value.addEventListener("mousedown",l),n.value.addEventListener("touchstart",l,{passive:!0}),e.type==="text"){const v=window.getComputedStyle(n.value);a.value.height=parseInt(v.fontSize)}}}),m.onBeforeUnmount(()=>{document.removeEventListener("click",d),document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}),{isMousedown:r,selected:i,dragData:a,getBoundary:u,checkDragerCollision:f}}const Ghe=n=>(m.pushScopeId("data-v-1b6d4877"),n=n(),m.popScopeId(),n),Uhe=Ghe(()=>m.createElementVNode("div",{class:"es-drager-rotate-handle"},[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[m.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)),Whe=m.defineComponent({__name:"rotate",props:{modelValue:{type:Number,default:0},element:{type:Object}},emits:["update:modelValue","rotate","rotate-start","rotate-end"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(null),a=m.computed({get:()=>t.modelValue,set:s=>{r("update:modelValue",s)}});function o(s){if(!t.element)return console.warn("[es-drager] rotate component need drag element property");s.stopPropagation();const{width:l,height:u,left:c,top:f}=t.element.getBoundingClientRect(),d=c+l/2,h=f+u/2;r("rotate-start",a.value),M_(p=>{const{clientX:v,clientY:g}=ad(p),y=d-v,b=h-g,_=Math.atan2(b,y)*180/Math.PI-90;a.value=(_+360)%360,r("rotate",a.value)},()=>{r("rotate-end",a.value)})}return(s,l)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"rotateRef",ref:i,class:"es-drager-rotate",onMousedown:m.withModifiers(o,["stop"]),onTouchstartPassive:o},[m.renderSlot(s.$slots,"default",{},()=>[Uhe],!0)],544))}}),rH=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},jhe=rH(Whe,[["__scopeId","data-v-1b6d4877"]]),qhe=n=>(m.pushScopeId("data-v-68f41cf2"),n=n(),m.popScopeId(),n),Khe=qhe(()=>m.createElementVNode("div",{class:"es-drager-skew-handle"},[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{fill:"currentColor",d:"M870.679273 271.378618L520.946036 65.489455a16.384 16.384 0 0 0-16.644654 0L154.568145 271.378618a16.290909 16.290909 0 0 0 0 28.094837l349.733237 205.889163a16.384 16.384 0 0 0 16.644654 0L870.679273 299.473455a16.290909 16.290909 0 0 0 0-28.094837zM512.623709 452.673164L228.528873 285.426036l284.094836-167.247127 284.094836 167.247127z m-22.574545 71.68L135.521745 322.615855a16.346764 16.346764 0 0 0-24.482909 14.270836l2.485528 405.820509a16.309527 16.309527 0 0 0 8.257163 14.075345l354.518109 201.728a16.346764 16.346764 0 0 0 24.482909-14.270836l-2.485527-405.820509a16.300218 16.300218 0 0 0-8.247854-14.093964z m-326.888728 198.842181l-2.020072-328.927418 287.529891 163.607273 2.020072 328.936727z m725.336437-400.607418L533.969455 524.325236a16.300218 16.300218 0 0 0-8.247855 14.066037l-2.485527 405.820509a16.365382 16.365382 0 0 0 24.4736 14.270836l354.546036-201.728a16.309527 16.309527 0 0 0 8.257164-14.075345l2.485527-405.820509a16.374691 16.374691 0 0 0-24.501527-14.270837z m-41.890909 373.462109L605.016436 838.683927v-57.902545l241.626764-142.671127v57.902545z m0-98.434327L605.016436 740.2496v-57.911855l241.626764-142.63389v57.911854z m0-98.443636L605.016436 641.833891v-57.902546l241.626764-142.63389v57.902545z"})])],-1)),Yhe=m.defineComponent({__name:"skew",props:{modelValue:{type:Array,default:()=>[0,0]},element:{type:Object}},emits:["update:modelValue","skew","skew-start","skew-end"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(null),a=m.computed({get:()=>t.modelValue,set:s=>{r("update:modelValue",s)}});function o(s){if(!t.element)return console.warn("[es-drager] skew component need drag element property");s.stopPropagation();const{width:l,height:u}=t.element.getBoundingClientRect(),{clientX:c,clientY:f}=ad(s),[d,h]=a.value;r("skew-start",a.value),M_(p=>{const{clientX:v,clientY:g}=ad(p),y=c-v,b=f-g,_=d+y/l*45,x=h+b/u*45;a.value=[+_.toFixed(2),+x.toFixed(2)],r("skew",a.value)},()=>{r("skew-end",a.value)})}return(s,l)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"skewRef",ref:i,class:"es-drager-skew",onMousedown:o,onTouchstartPassive:o},[m.renderSlot(s.$slots,"default",{},()=>[Khe],!0)],544))}}),Xhe=rH(Yhe,[["__scopeId","data-v-68f41cf2"]]),Zhe=["data-side","onMousedown","onTouchstartPassive"],Jhe=m.createElementVNode("div",{class:"es-drager-dot-handle"},null,-1),Ap=m.defineComponent({__name:"drager",props:Ahe,emits:["change","drag","drag-start","drag-end","resize","resize-start","resize-end","rotate","rotate-start","rotate-end","skew","skew-start","skew-end","focus","blur"],setup(n,{emit:e}){const t=n,r=e,i=(x,...T)=>{r(x,...T)},a=m.ref(null),{selected:o,dragData:s,isMousedown:l,getBoundary:u,checkDragerCollision:c}=Hhe(a,t,i),f=m.ref(JL(0,t.resizeList)),d=m.computed(()=>t.resizable&&!t.disabled),h=m.computed(()=>t.rotatable&&!t.disabled&&o.value),p=m.computed(()=>t.skewable&&!t.disabled&&o.value),v=m.computed(()=>t.type!="text"?f.value:f.value.filter(x=>!["top","bottom"].includes(x.side))),g=m.computed(()=>{const{width:x,height:T,left:k,top:C,angle:D,skew:O}=s.value,R={};x&&(R.width=zy(x)),T&&(t.type==="text"?R.fontSize=T+"px":R.height=zy(T));let V=[`translateX(${zy(k)})`,`translateY(${zy(C)})`,`rotate(${D}deg)`];if(O&&O.length){let F=`skewX(${O[0]}deg)`;F+=` skewY(${O[1]??0}deg)`,V.push(F)}return{...R,zIndex:t.zIndex,transform:V.join(" "),"--es-drager-color":t.color}});function y(x){a.value||(a.value=x.$el||x)}function b(x){f.value=JL(x,t.resizeList),i("rotate-end",s.value)}function _(x,T){if(t.disabled)return;T.stopPropagation();const{clientX:k,clientY:C}=ad(T),D=k,O=C,{width:R,height:V,left:F,top:$}=s.value,J=F+R/2,te=$+V/2,Q={width:R,height:V,centerX:J,centerY:te,rotateAngle:s.value.angle},ne=x.side;let{minWidth:ee,minHeight:de,aspectRatio:ke,equalProportion:Ee}=t;i("resize-start",s.value,ne),t.boundary&&u(),["text","image"].includes(t.type)&&ne.includes("-")&&(ke=Q.width/Q.height),M_(xe=>{const{clientX:De,clientY:ze}=ad(xe);let We=(De-D)/t.scaleRatio,tt=(ze-O)/t.scaleRatio;t.snapToGrid&&(We=db(We,t.gridX),tt=db(tt,t.gridY));const ht=Math.atan2(tt,We),we=Rhe(We,tt),_e=xe.shiftKey,me=ht-uN(Q.rotateAngle),ge=we*Math.cos(me),ve=we*Math.sin(me),ye=(Ee||_e)&&!ke?Q.width/Q.height:ke,{position:{centerX:le,centerY:Se},size:{width:Me,height:Pe}}=Lhe(ne,{...Q,rotateAngle:Q.rotateAngle},ge,ve,ye,ee,de),Fe=Phe({centerX:le,centerY:Se,width:Me,height:Pe,angle:s.value.angle});let Ve={...s.value,...Bhe(Fe,le,Se)};t.maxWidth>0&&(Ve.width=Math.min(Ve.width,t.maxWidth)),t.maxHeight>0&&(Ve.height=Math.min(Ve.height,t.maxHeight)),s.value=Ve,i("resize",s.value,ne)},()=>{t.checkCollision&&c()&&(s.value={...s.value,width:R,height:V,left:F,top:$}),i("resize-end",s.value,ne)})}return m.watch(()=>[t.width,t.height,t.left,t.top,t.angle],([x,T,k,C,D],[O,R,V,F,$])=>{x!==O&&(s.value.width=x),T!==R&&(s.value.height=T),k!==V&&(s.value.left=k),C!==F&&(s.value.top=C),D!==$&&(s.value.angle=D)}),m.watch(()=>s.value,x=>{r("change",{...x})},{deep:!0}),m.watch(()=>t.skew,(x,T)=>{s.value.skew=x??[]},{deep:!0}),m.watch(()=>t.selected,x=>{o.value=x},{immediate:!0}),(x,T)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(x.tag),{ref:y,class:m.normalizeClass(["es-drager",`es-drager-${x.type}`,{disabled:x.disabled,dragging:m.unref(l),selected:m.unref(o),border:x.border}]),style:m.normalizeStyle(g.value),onClick:T[7]||(T[7]=m.withModifiers(()=>{},["stop"])),onMousedown:T[8]||(T[8]=m.withModifiers(()=>{},["stop"]))},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"default"),d.value?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(v.value,(k,C)=>(m.openBlock(),m.createElementBlock("div",{key:C,class:"es-drager-dot","data-side":k.side,style:m.normalizeStyle({...k}),onMousedown:D=>_(k,D),onTouchstartPassive:D=>_(k,D)},[m.renderSlot(x.$slots,"resize",m.normalizeProps(m.guardReactiveProps({side:k.side})),()=>[Jhe])],44,Zhe))),128)):m.createCommentVNode("",!0),h.value?(m.openBlock(),m.createBlock(jhe,{key:1,modelValue:m.unref(s).angle,"onUpdate:modelValue":T[0]||(T[0]=k=>m.unref(s).angle=k),element:a.value,onRotate:T[1]||(T[1]=k=>i("rotate",m.unref(s))),onRotateStart:T[2]||(T[2]=k=>i("rotate-start",m.unref(s))),onRotateEnd:b},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"rotate")]),_:3},8,["modelValue","element"])):m.createCommentVNode("",!0),p.value?(m.openBlock(),m.createBlock(Xhe,{key:2,modelValue:m.unref(s).skew,"onUpdate:modelValue":T[3]||(T[3]=k=>m.unref(s).skew=k),element:a.value,onSkew:T[4]||(T[4]=k=>i("skew",m.unref(s))),onSkewStart:T[5]||(T[5]=k=>i("skew-start",m.unref(s))),onSkewEnd:T[6]||(T[6]=k=>i("skew-end",m.unref(s)))},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"skew")]),_:3},8,["modelValue","element"])):m.createCommentVNode("",!0)]),_:3},40,["class","style"]))}}),Qhe=n=>{n.component("es-drager",Ap)};Ap.install=Qhe;function iH(n,e,t){let r={};if(!n||!e)return r;const i=["pie","ring","radar"];e.titleText&&e.titleText!==""&&(r.title={},r.title.text=e.titleText,r.title.left=e.titleleft??"left");let a=[];function o(){r.legend={},r.legend.show=!!e.legend,r.legend[e.legendlocation]=10,r.legend.left=e.legendleft,r.legend.orient=e.legendorient,r.legend.data=[],a=n.legends,r.legend.data=n.legends}o();function s(){if(i.includes(e.seriesType)||(r.yAxis={type:"value"},r.xAxis={},r.xAxis.type="category",r.xAxis.data=n.labels),r.series=[],i.includes(e.seriesType))e.seriesType==="pie"&&r.series.push({name:"饼图",type:e.seriesType,data:n.labels.map((u,c)=>({value:n.series[0][c],name:u}))}),e.seriesType==="ring"&&r.series.push({name:"环形图",type:"pie",radius:["40%","70%"],itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},data:n.labels.map((u,c)=>({value:n.series[0][c],name:u}))}),e.seriesType==="radar"&&(r.series.push({name:"雷达图",type:e.seriesType,data:n.legends.map((u,c)=>({value:n.series[c],name:u}))}),r.radar={indicator:n.labels.map(u=>({name:u}))});else for(let u=0;u<a.length;u++)r.series.push({name:r.legend.data[u],type:e.seriesType,data:n.series[u]}),e.seriesType==="smooth"&&(r.series[u].type="line",r.series[u].smooth=!0),e.seriesType==="area"&&(r.series[u].type="line",r.series[u].areaStyle={});i.includes(e.seriesType)&&r.legend.data!==null&&delete r.legend.data}s(),r.grid={left:"3%",right:"4%",top:30,bottom:30,containLabel:!0},r?.legend?.show&&(r?.legend?.bottom?r.grid.bottom=60:r.grid.top=60);const l=t.echarts?.onSetOptions?.(n,e);return l!==null&&typeof l=="object"&&(r=l),JSON.parse(JSON.stringify(r))}var mC=function(n,e){return mC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},mC(n,e)};function Ie(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mC(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var epe=(function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n})(),tpe=(function(){function n(){this.browser=new epe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return n})(),En=new tpe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(En.wxa=!0,En.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?En.worker=!0:!En.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(En.node=!0,En.svgSupported=!0):npe(navigator.userAgent,En);function npe(n,e){var t=e.browser,r=n.match(/Firefox\/([\d.]+)/),i=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),a=n.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(n);r&&(t.firefox=!0,t.version=r[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var cN=12,aH="sans-serif",Hl=cN+"px "+aH,rpe=20,ipe=100,ape="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function ope(n){var e={};if(typeof JSON>"u")return e;for(var t=0;t<n.length;t++){var r=String.fromCharCode(t+32),i=(n.charCodeAt(t)-rpe)/ipe;e[r]=i}return e}var spe=ope(ape),Xo={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var n,e;return function(t,r){if(!n){var i=Xo.createCanvas();n=i&&i.getContext("2d")}if(n)return e!==r&&(e=n.font=r||Hl),n.measureText(t);t=t||"",r=r||Hl;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||cN,s=0;if(r.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=spe[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(n,e,t){var r=new Image;return r.onload=e,r.onerror=t,r.src=n,r}},oH=qs(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,e){return n["[object "+e+"]"]=!0,n},{}),sH=qs(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,e){return n["[object "+e+"Array]"]=!0,n},{}),Np=Object.prototype.toString,A_=Array.prototype,lpe=A_.forEach,upe=A_.filter,fN=A_.slice,cpe=A_.map,t3=(function(){}).constructor,Fy=t3?t3.prototype:null,dN="__proto__",fpe=2311;function lH(){return fpe++}function jo(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];typeof console<"u"&&console.error.apply(console,n)}function Ht(n){if(n==null||typeof n!="object")return n;var e=n,t=Np.call(n);if(t==="[object Array]"){if(!kg(n)){e=[];for(var r=0,i=n.length;r<i;r++)e[r]=Ht(n[r])}}else if(sH[t]){if(!kg(n)){var a=n.constructor;if(a.from)e=a.from(n);else{e=new a(n.length);for(var r=0,i=n.length;r<i;r++)e[r]=n[r]}}}else if(!oH[t]&&!kg(n)&&!od(n)){e={};for(var o in n)n.hasOwnProperty(o)&&o!==dN&&(e[o]=Ht(n[o]))}return e}function hn(n,e,t){if(!Gt(e)||!Gt(n))return t?Ht(e):n;for(var r in e)if(e.hasOwnProperty(r)&&r!==dN){var i=n[r],a=e[r];Gt(a)&&Gt(i)&&!Ze(a)&&!Ze(i)&&!od(a)&&!od(i)&&!n3(a)&&!n3(i)&&!kg(a)&&!kg(i)?hn(i,a,t):(t||!(r in n))&&(n[r]=Ht(e[r]))}return n}function hN(n,e){for(var t=n[0],r=1,i=n.length;r<i;r++)t=hn(t,n[r],e);return t}function Ke(n,e){if(Object.assign)Object.assign(n,e);else for(var t in e)e.hasOwnProperty(t)&&t!==dN&&(n[t]=e[t]);return n}function qt(n,e,t){for(var r=Mn(e),i=0,a=r.length;i<a;i++){var o=r[i];(t?e[o]!=null:n[o]==null)&&(n[o]=e[o])}return n}function dn(n,e){if(n){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t}return-1}function dpe(n,e){var t=n.prototype;function r(){}r.prototype=e.prototype,n.prototype=new r;for(var i in t)t.hasOwnProperty(i)&&(n.prototype[i]=t[i]);n.prototype.constructor=n,n.superClass=e}function Zr(n,e,t){if(n="prototype"in n?n.prototype:n,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var a=r[i];a!=="constructor"&&(t?e[a]!=null:n[a]==null)&&(n[a]=e[a])}else qt(n,e,t)}function Zi(n){return!n||typeof n=="string"?!1:typeof n.length=="number"}function U(n,e,t){if(n&&e)if(n.forEach&&n.forEach===lpe)n.forEach(e,t);else if(n.length===+n.length)for(var r=0,i=n.length;r<i;r++)e.call(t,n[r],r,n);else for(var a in n)n.hasOwnProperty(a)&&e.call(t,n[a],a,n)}function et(n,e,t){if(!n)return[];if(!e)return pN(n);if(n.map&&n.map===cpe)return n.map(e,t);for(var r=[],i=0,a=n.length;i<a;i++)r.push(e.call(t,n[i],i,n));return r}function qs(n,e,t,r){if(n&&e){for(var i=0,a=n.length;i<a;i++)t=e.call(r,t,n[i],i,n);return t}}function Kn(n,e,t){if(!n)return[];if(!e)return pN(n);if(n.filter&&n.filter===upe)return n.filter(e,t);for(var r=[],i=0,a=n.length;i<a;i++)e.call(t,n[i],i,n)&&r.push(n[i]);return r}function Sd(n,e,t){if(n&&e){for(var r=0,i=n.length;r<i;r++)if(e.call(t,n[r],r,n))return n[r]}}function Mn(n){if(!n)return[];if(Object.keys)return Object.keys(n);var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push(t);return e}function hpe(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];return function(){return n.apply(e,t.concat(fN.call(arguments)))}}var mt=Fy&&Vt(Fy.bind)?Fy.call.bind(Fy.bind):hpe;function cn(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return n.apply(this,e.concat(fN.call(arguments)))}}function Ze(n){return Array.isArray?Array.isArray(n):Np.call(n)==="[object Array]"}function Vt(n){return typeof n=="function"}function gt(n){return typeof n=="string"}function hb(n){return Np.call(n)==="[object String]"}function Ln(n){return typeof n=="number"}function Gt(n){var e=typeof n;return e==="function"||!!n&&e==="object"}function n3(n){return!!oH[Np.call(n)]}function _a(n){return!!sH[Np.call(n)]}function od(n){return typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.ownerDocument=="object"}function N_(n){return n.colorStops!=null}function ppe(n){return n.image!=null}function uH(n){return Np.call(n)==="[object RegExp]"}function Ti(n){return n!==n}function ai(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=0,r=n.length;t<r;t++)if(n[t]!=null)return n[t]}function At(n,e){return n??e}function pa(n,e,t){return n??e??t}function pN(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return fN.apply(n,e)}function D_(n){if(typeof n=="number")return[n,n,n,n];var e=n.length;return e===2?[n[0],n[1],n[0],n[1]]:e===3?[n[0],n[1],n[2],n[1]]:n}function Et(n,e){if(!n)throw new Error(e)}function So(n){return n==null?null:typeof n.trim=="function"?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var cH="__ec_primitive__";function pb(n){n[cH]=!0}function kg(n){return n[cH]}var vpe=(function(){function n(){this.data={}}return n.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},n.prototype.has=function(e){return this.data.hasOwnProperty(e)},n.prototype.get=function(e){return this.data[e]},n.prototype.set=function(e,t){return this.data[e]=t,this},n.prototype.keys=function(){return Mn(this.data)},n.prototype.forEach=function(e){var t=this.data;for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)},n})(),fH=typeof Map=="function";function gpe(){return fH?new Map:new vpe}var mpe=(function(){function n(e){var t=Ze(e);this.data=gpe();var r=this;e instanceof n?e.each(i):e&&U(e,i);function i(a,o){t?r.set(a,o):r.set(o,a)}}return n.prototype.hasKey=function(e){return this.data.has(e)},n.prototype.get=function(e){return this.data.get(e)},n.prototype.set=function(e,t){return this.data.set(e,t),t},n.prototype.each=function(e,t){this.data.forEach(function(r,i){e.call(t,r,i)})},n.prototype.keys=function(){var e=this.data.keys();return fH?Array.from(e):e},n.prototype.removeKey=function(e){this.data.delete(e)},n})();function Nt(n){return new mpe(n)}function um(n,e){for(var t=new n.constructor(n.length+e.length),r=0;r<n.length;r++)t[r]=n[r];for(var i=n.length,r=0;r<e.length;r++)t[r+i]=e[r];return t}function O_(n,e){var t;if(Object.create)t=Object.create(n);else{var r=function(){};r.prototype=n,t=new r}return e&&Ke(t,e),t}function dH(n){var e=n.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function kt(n,e){return n.hasOwnProperty(e)}function zr(){}var p1=180/Math.PI;function wd(n,e){return n==null&&(n=0),e==null&&(e=0),[n,e]}function ua(n,e){return n[0]=e[0],n[1]=e[1],n}function Rl(n){return[n[0],n[1]]}function vN(n,e,t){return n[0]=e,n[1]=t,n}function r3(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n}function yC(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n}function Mf(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n}function bC(n){return Math.sqrt(ype(n))}function ype(n){return n[0]*n[0]+n[1]*n[1]}function v1(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n}function Dp(n,e){var t=bC(e);return t===0?(n[0]=0,n[1]=0):(n[0]=e[0]/t,n[1]=e[1]/t),n}function xC(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}var Uu=xC;function bpe(n,e){return(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])}var Gf=bpe;function g1(n,e,t,r){return n[0]=e[0]+r*(t[0]-e[0]),n[1]=e[1]+r*(t[1]-e[1]),n}function Fr(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[2]*i+t[4],n[1]=t[1]*r+t[3]*i+t[5],n}function Wu(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n}function ju(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n}var Kd=(function(){function n(e,t){this.target=e,this.topTarget=t&&t.topTarget}return n})(),xpe=(function(){function n(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return n.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Kd(t,e),"dragstart",e.event))},n.prototype._drag=function(e){var t=this._draggingTarget;if(t){var r=e.offsetX,i=e.offsetY,a=r-this._x,o=i-this._y;this._x=r,this._y=i,t.drift(a,o,e),this.handler.dispatchToElement(new Kd(t,e),"drag",e.event);var s=this.handler.findHover(r,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Kd(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Kd(s,e),"dragenter",e.event))}},n.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Kd(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Kd(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},n})(),Oo=(function(){function n(e){e&&(this._$eventProcessor=e)}return n.prototype.on=function(e,t,r,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(i=r,r=t,t=null),!r||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===r)return this;var l={h:r,query:t,ctx:i||this,callAtLast:r.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},n.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},n.prototype.off=function(e,t){var r=this._$handlers;if(!r)return this;if(!e)return this._$handlers={},this;if(t){if(r[e]){for(var i=[],a=0,o=r[e].length;a<o;a++)r[e][a].h!==t&&i.push(r[e][a]);r[e]=i}r[e]&&r[e].length===0&&delete r[e]}else delete r[e];return this},n.prototype.trigger=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},n.prototype.triggerWithContext=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},n})(),_pe=Math.log(2);function _C(n,e,t,r,i,a){var o=r+"-"+i,s=n.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/_pe);return n[t][l]}for(var u=r|1<<t,c=t+1;r&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var p=1<<d;p&i||(f+=(h%2?-1:1)*n[t][d]*_C(n,e-1,c,u,i|p,a),h++)}return a[o]=f,f}function i3(n,e){var t=[[n[0],n[1],1,0,0,0,-e[0]*n[0],-e[0]*n[1]],[0,0,0,n[0],n[1],1,-e[1]*n[0],-e[1]*n[1]],[n[2],n[3],1,0,0,0,-e[2]*n[2],-e[2]*n[3]],[0,0,0,n[2],n[3],1,-e[3]*n[2],-e[3]*n[3]],[n[4],n[5],1,0,0,0,-e[4]*n[4],-e[4]*n[5]],[0,0,0,n[4],n[5],1,-e[5]*n[4],-e[5]*n[5]],[n[6],n[7],1,0,0,0,-e[6]*n[6],-e[6]*n[7]],[0,0,0,n[6],n[7],1,-e[7]*n[6],-e[7]*n[7]]],r={},i=_C(t,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*_C(t,7,o===0?1:0,1<<o,1<<s,r)/i*e[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var vb="___zrEVENTSAVED",Hw=[];function Spe(n,e,t,r,i){return SC(Hw,e,r,i,!0)&&SC(n,t,Hw[0],Hw[1])}function wpe(n,e){n&&t(n),e&&t(e);function t(r){var i=r[vb];i&&(i.clearMarkers&&i.clearMarkers(),delete r[vb])}}function SC(n,e,t,r,i){if(e.getBoundingClientRect&&En.domSupported&&!hH(e)){var a=e[vb]||(e[vb]={}),o=kpe(e,a),s=Tpe(o,a,i);if(s)return s(n,t,r),!0}return!1}function kpe(n,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[u]+":0",r[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),n.appendChild(o),t.push(o)}return e.clearMarkers=function(){U(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function Tpe(n,e,t){for(var r=t?"invTrans":"trans",i=e[r],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=n[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(n[u].offsetLeft,n[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[r]=t?i3(s,o):i3(o,s))}function hH(n){return n.nodeName.toUpperCase()==="CANVAS"}var Cpe=/([&<>"'])/g,Epe={"&":"&","<":"<",">":">",'"':""","'":"'"};function da(n){return n==null?"":(n+"").replace(Cpe,function(e,t){return Epe[t]})}var Mpe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gw=[],Ape=En.browser.firefox&&+En.browser.version.split(".")[0]<39;function wC(n,e,t,r){return t=t||{},r?a3(n,e,t):Ape&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):a3(n,e,t),t}function a3(n,e,t){if(En.domSupported&&n.getBoundingClientRect){var r=e.clientX,i=e.clientY;if(hH(n)){var a=n.getBoundingClientRect();t.zrX=r-a.left,t.zrY=i-a.top;return}else if(SC(Gw,n,r,i)){t.zrX=Gw[0],t.zrY=Gw[1];return}}t.zrX=t.zrY=0}function gN(n){return n||window.event}function fo(n,e,t){if(e=gN(e),e.zrX!=null)return e;var r=e.type,i=r&&r.indexOf("touch")>=0;if(i){var o=r!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&wC(n,o,e,t)}else{wC(n,e,e,t);var a=Npe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Mpe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Npe(n){var e=n.wheelDelta;if(e)return e;var t=n.deltaX,r=n.deltaY;if(t==null||r==null)return e;var i=Math.abs(r!==0?r:t),a=r>0?-1:r<0?1:t>0?-1:1;return 3*i*a}function kC(n,e,t,r){n.addEventListener(e,t,r)}function Dpe(n,e,t,r){n.removeEventListener(e,t,r)}var Gl=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function o3(n){return n.which===2||n.which===3}var Ope=(function(){function n(){this._track=[]}return n.prototype.recognize=function(e,t,r){return this._doTrack(e,t,r),this._recognize(e)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(e,t,r){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=wC(r,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},n.prototype._recognize=function(e){for(var t in Uw)if(Uw.hasOwnProperty(t)){var r=Uw[t](this._track,e);if(r)return r}},n})();function s3(n){var e=n[1][0]-n[0][0],t=n[1][1]-n[0][1];return Math.sqrt(e*e+t*t)}function Ipe(n){return[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]}var Uw={pinch:function(n,e){var t=n.length;if(t){var r=(n[t-1]||{}).points,i=(n[t-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=s3(r)/s3(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Ipe(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:n[0].target,event:e}}}}};function Ci(){return[1,0,0,1,0,0]}function I_(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function R_(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Vs(n,e,t){var r=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return n[0]=r,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=l,n}function Ks(n,e,t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4]+t[0],n[5]=e[5]+t[1],n}function Sc(n,e,t,r){r===void 0&&(r=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return n[0]=i*f+s*c,n[1]=-i*c+s*f,n[2]=a*f+l*c,n[3]=-a*c+f*l,n[4]=f*(o-r[0])+c*(u-r[1])+r[0],n[5]=f*(u-r[1])-c*(o-r[0])+r[1],n}function mN(n,e,t){var r=t[0],i=t[1];return n[0]=e[0]*r,n[1]=e[1]*i,n[2]=e[2]*r,n[3]=e[3]*i,n[4]=e[4]*r,n[5]=e[5]*i,n}function Zo(n,e){var t=e[0],r=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*r;return l?(l=1/l,n[0]=o*l,n[1]=-a*l,n[2]=-r*l,n[3]=t*l,n[4]=(r*s-o*i)*l,n[5]=(a*i-t*s)*l,n):null}function Rpe(n){var e=Ci();return R_(e,n),e}var jt=(function(){function n(e,t){this.x=e||0,this.y=t||0}return n.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(e,t){return this.x=e,this.y=t,this},n.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.scale=function(e){this.x*=e,this.y*=e},n.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},n.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},n.prototype.distance=function(e){var t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)},n.prototype.distanceSquare=function(e){var t=this.x-e.x,r=this.y-e.y;return t*t+r*r},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(e){if(e){var t=this.x,r=this.y;return this.x=e[0]*t+e[2]*r+e[4],this.y=e[1]*t+e[3]*r+e[5],this}},n.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},n.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},n.set=function(e,t,r){e.x=t,e.y=r},n.copy=function(e,t){e.x=t.x,e.y=t.y},n.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},n.lenSquare=function(e){return e.x*e.x+e.y*e.y},n.dot=function(e,t){return e.x*t.x+e.y*t.y},n.add=function(e,t,r){e.x=t.x+r.x,e.y=t.y+r.y},n.sub=function(e,t,r){e.x=t.x-r.x,e.y=t.y-r.y},n.scale=function(e,t,r){e.x=t.x*r,e.y=t.y*r},n.scaleAndAdd=function(e,t,r,i){e.x=t.x+r.x*i,e.y=t.y+r.y*i},n.lerp=function(e,t,r,i){var a=1-i;e.x=a*t.x+i*r.x,e.y=a*t.y+i*r.y},n})(),Af=Math.min,Rh=Math.max,TC=Math.abs,l3=["x","y"],Lpe=["width","height"],Lc=new jt,Pc=new jt,Bc=new jt,Vc=new jt,Ga=pH(),Jv=Ga.minTv,CC=Ga.maxTv,Tg=[0,0],Kt=(function(){function n(e,t,r,i){n.set(this,e,t,r,i)}return n.set=function(e,t,r,i,a){return i<0&&(t=t+i,i=-i),a<0&&(r=r+a,a=-a),e.x=t,e.y=r,e.width=i,e.height=a,e},n.prototype.union=function(e){var t=Af(e.x,this.x),r=Af(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Rh(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Rh(e.y+e.height,this.y+this.height)-r:this.height=e.height,this.x=t,this.y=r},n.prototype.applyTransform=function(e){n.applyTransform(this,this,e)},n.prototype.calculateTransform=function(e){var t=this,r=e.width/t.width,i=e.height/t.height,a=Ci();return Ks(a,a,[-t.x,-t.y]),mN(a,a,[r,i]),Ks(a,a,[e.x,e.y]),a},n.prototype.intersect=function(e,t,r){return n.intersect(this,e,t,r)},n.intersect=function(e,t,r,i){r&&jt.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!t)return!1;e instanceof n||(e=n.set(Ppe,e.x,e.y,e.width,e.height)),t instanceof n||(t=n.set(Bpe,t.x,t.y,t.width,t.height));var s=!!r;Ga.reset(i,s);var l=Ga.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=t.x+l,p=t.x+t.width-l,v=t.y+l,g=t.y+t.height-l;if(u>c||f>d||h>p||v>g)return!1;var y=!(c<h||p<u||d<v||g<f);return(s||a)&&(Tg[0]=1/0,Tg[1]=0,u3(u,c,h,p,0,s,a,o),u3(f,d,v,g,1,s,a,o),s&&jt.copy(r,y?Ga.useDir?Ga.dirMinTv:Jv:CC)),y},n.contain=function(e,t,r){return t>=e.x&&t<=e.x+e.width&&r>=e.y&&r<=e.y+e.height},n.prototype.contain=function(e,t){return n.contain(this,e,t)},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(e){n.copy(this,e)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(e){return new n(e.x,e.y,e.width,e.height)},n.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},n.applyTransform=function(e,t,r){if(!r){e!==t&&n.copy(e,t);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Lc.x=Bc.x=t.x,Lc.y=Vc.y=t.y,Pc.x=Vc.x=t.x+t.width,Pc.y=Bc.y=t.y+t.height,Lc.transform(r),Vc.transform(r),Pc.transform(r),Bc.transform(r),e.x=Af(Lc.x,Pc.x,Bc.x,Vc.x),e.y=Af(Lc.y,Pc.y,Bc.y,Vc.y);var l=Rh(Lc.x,Pc.x,Bc.x,Vc.x),u=Rh(Lc.y,Pc.y,Bc.y,Vc.y);e.width=l-e.x,e.height=u-e.y},n})(),Ppe=new Kt(0,0,0,0),Bpe=new Kt(0,0,0,0);function u3(n,e,t,r,i,a,o,s){var l=TC(e-t),u=TC(r-n),c=Af(l,u),f=l3[i],d=l3[1-i],h=Lpe[i];e<t||r<n?l<u?(a&&(CC[f]=-l),s&&(o[f]=e,o[h]=0)):(a&&(CC[f]=u),s&&(o[f]=n,o[h]=0)):(o&&(o[f]=Rh(n,t),o[h]=Af(e,r)-o[f]),a&&(c<Tg[0]||Ga.useDir)&&(Tg[0]=Af(c,Tg[0]),(l<u||!Ga.bidirectional)&&(Jv[f]=l,Jv[d]=0,Ga.useDir&&Ga.calcDirMTV()),(l>=u||!Ga.bidirectional)&&(Jv[f]=-u,Jv[d]=0,Ga.useDir&&Ga.calcDirMTV())))}function pH(){var n=0,e=new jt,t=new jt,r={minTv:new jt,maxTv:new jt,useDir:!1,dirMinTv:new jt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){r.touchThreshold=0,a&&a.touchThreshold!=null&&(r.touchThreshold=Rh(0,a.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,a&&a.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),t.copy(r.minTv),n=a.direction,r.bidirectional=a.bidirectional==null||!!a.bidirectional,r.bidirectional||e.set(Math.cos(n),Math.sin(n))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(n),u=Math.cos(n),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,i(t.x)&&i(t.y)){o.set(0,0);return}(r.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function i(a){return TC(a)<1e-10}return r}var vH="silent";function Vpe(n,e,t){return{type:n,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:zpe}}function zpe(){Gl(this.event)}var Fpe=(function(n){Ie(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(Oo),hv=(function(){function n(e,t){this.x=e,this.y=t}return n})(),$pe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ww=new Kt(0,0,0,0),gH=(function(n){Ie(e,n);function e(t,r,i,a,o){var s=n.call(this)||this;return s._hovered=new hv(0,0),s.storage=t,s.painter=r,s.painterRoot=a,s._pointerSize=o,i=i||new Fpe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new xpe(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(U($pe,function(r){t.on&&t.on(r,this[r],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var r=t.zrX,i=t.zrY,a=mH(this,r,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new hv(r,i):this.findHover(r,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var r=t.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new hv(0,0)},e.prototype.dispatch=function(t,r){var i=this[t];i&&i.call(this,r)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var r=this.proxy;r.setCursor&&r.setCursor(t)},e.prototype.dispatchToElement=function(t,r,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+r,s=Vpe(r,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(r,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(r,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(r,s)}))}},e.prototype.findHover=function(t,r,i){var a=this.storage.getDisplayList(),o=new hv(t,r);if(c3(a,o,t,r,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Kt(t-u,r-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Ww.copy(d.getBoundingRect()),d.transform&&Ww.applyTransform(d.transform),Ww.intersect(c)&&s.push(d))}if(s.length)for(var h=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=h)for(var y=0;y<v;y+=p){var b=t+g*Math.cos(y),_=r+g*Math.sin(y);if(c3(s,o,b,_,i),o.target)return o}}return o},e.prototype.processGesture=function(t,r){this._gestureMgr||(this._gestureMgr=new Ope);var i=this._gestureMgr;r==="start"&&i.clear();var a=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(r==="end"&&i.clear(),a){var o=a.type;t.gestureEvent=o;var s=new hv;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e})(Oo);U(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){gH.prototype[n]=function(e){var t=e.zrX,r=e.zrY,i=mH(this,t,r),a,o;if((n!=="mouseup"||!i)&&(a=this.findHover(t,r),o=a.target),n==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(n==="mouseup")this._upEl=o;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||Uu(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,n,e)}});function Hpe(n,e,t){if(n[n.rectHover?"rectContain":"contain"](e,t)){for(var r=n,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(e,t))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?vH:!0}return!1}function c3(n,e,t,r,i){for(var a=n.length-1;a>=0;a--){var o=n[a],s=void 0;if(o!==i&&!o.ignore&&(s=Hpe(o,t,r))&&(!e.topTarget&&(e.topTarget=o),s!==vH)){e.target=o;break}}}function mH(n,e,t){var r=n.painter;return e<0||e>r.getWidth()||t<0||t>r.getHeight()}var yH=32,pv=7;function Gpe(n){for(var e=0;n>=yH;)e|=n&1,n>>=1;return n+e}function f3(n,e,t,r){var i=e+1;if(i===t)return 1;if(r(n[i++],n[e])<0){for(;i<t&&r(n[i],n[i-1])<0;)i++;Upe(n,e,i)}else for(;i<t&&r(n[i],n[i-1])>=0;)i++;return i-e}function Upe(n,e,t){for(t--;e<t;){var r=n[e];n[e++]=n[t],n[t--]=r}}function d3(n,e,t,r,i){for(r===e&&r++;r<t;r++){for(var a=n[r],o=e,s=r,l;o<s;)l=o+s>>>1,i(a,n[l])<0?s=l:o=l+1;var u=r-o;switch(u){case 3:n[o+3]=n[o+2];case 2:n[o+2]=n[o+1];case 1:n[o+1]=n[o];break;default:for(;u>0;)n[o+u]=n[o+u-1],u--}n[o]=a}}function jw(n,e,t,r,i,a){var o=0,s=0,l=1;if(a(n,e[t+i])>0){for(s=r-i;l<s&&a(n,e[t+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(n,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])>0?o=c+1:l=c}return l}function qw(n,e,t,r,i,a){var o=0,s=0,l=1;if(a(n,e[t+i])<0){for(s=i+1;l<s&&a(n,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=r-i;l<s&&a(n,e[t+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])<0?l=c:o=c+1}return l}function Wpe(n,e){var t=pv,r,i,a=0,o=[];r=[],i=[];function s(h,p){r[a]=h,i[a]=p,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]<i[h+1]&&h--;else if(i[h]>i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]<i[h+1]&&h--,c(h)}}function c(h){var p=r[h],v=i[h],g=r[h+1],y=i[h+1];i[h]=v+y,h===a-3&&(r[h+1]=r[h+2],i[h+1]=i[h+2]),a--;var b=qw(n[g],n,p,v,0,e);p+=b,v-=b,v!==0&&(y=jw(n[p+v-1],n,g,y,y-1,e),y!==0&&(v<=y?f(p,v,g,y):d(p,v,g,y)))}function f(h,p,v,g){var y=0;for(y=0;y<p;y++)o[y]=n[h+y];var b=0,_=v,x=h;if(n[x++]=n[_++],--g===0){for(y=0;y<p;y++)n[x+y]=o[b+y];return}if(p===1){for(y=0;y<g;y++)n[x+y]=n[_+y];n[x+g]=o[b];return}for(var T=t,k,C,D;;){k=0,C=0,D=!1;do if(e(n[_],o[b])<0){if(n[x++]=n[_++],C++,k=0,--g===0){D=!0;break}}else if(n[x++]=o[b++],k++,C=0,--p===1){D=!0;break}while((k|C)<T);if(D)break;do{if(k=qw(n[_],o,b,p,0,e),k!==0){for(y=0;y<k;y++)n[x+y]=o[b+y];if(x+=k,b+=k,p-=k,p<=1){D=!0;break}}if(n[x++]=n[_++],--g===0){D=!0;break}if(C=jw(o[b],n,_,g,0,e),C!==0){for(y=0;y<C;y++)n[x+y]=n[_+y];if(x+=C,_+=C,g-=C,g===0){D=!0;break}}if(n[x++]=o[b++],--p===1){D=!0;break}T--}while(k>=pv||C>=pv);if(D)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),p===1){for(y=0;y<g;y++)n[x+y]=n[_+y];n[x+g]=o[b]}else{if(p===0)throw new Error;for(y=0;y<p;y++)n[x+y]=o[b+y]}}function d(h,p,v,g){var y=0;for(y=0;y<g;y++)o[y]=n[v+y];var b=h+p-1,_=g-1,x=v+g-1,T=0,k=0;if(n[x--]=n[b--],--p===0){for(T=x-(g-1),y=0;y<g;y++)n[T+y]=o[y];return}if(g===1){for(x-=p,b-=p,k=x+1,T=b+1,y=p-1;y>=0;y--)n[k+y]=n[T+y];n[x]=o[_];return}for(var C=t;;){var D=0,O=0,R=!1;do if(e(o[_],n[b])<0){if(n[x--]=n[b--],D++,O=0,--p===0){R=!0;break}}else if(n[x--]=o[_--],O++,D=0,--g===1){R=!0;break}while((D|O)<C);if(R)break;do{if(D=p-qw(o[_],n,h,p,p-1,e),D!==0){for(x-=D,b-=D,p-=D,k=x+1,T=b+1,y=D-1;y>=0;y--)n[k+y]=n[T+y];if(p===0){R=!0;break}}if(n[x--]=o[_--],--g===1){R=!0;break}if(O=g-jw(n[b],o,0,g,g-1,e),O!==0){for(x-=O,_-=O,g-=O,k=x+1,T=_+1,y=0;y<O;y++)n[k+y]=o[T+y];if(g<=1){R=!0;break}}if(n[x--]=n[b--],--p===0){R=!0;break}C--}while(D>=pv||O>=pv);if(R)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),g===1){for(x-=p,b-=p,k=x+1,T=b+1,y=p-1;y>=0;y--)n[k+y]=n[T+y];n[x]=o[_]}else{if(g===0)throw new Error;for(T=x-(g-1),y=0;y<g;y++)n[T+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function m1(n,e,t,r){t||(t=0),r||(r=n.length);var i=r-t;if(!(i<2)){var a=0;if(i<yH){a=f3(n,t,r,e),d3(n,t,r,t+a,e);return}var o=Wpe(n,e),s=Gpe(i);do{if(a=f3(n,t,r,e),a<s){var l=i;l>s&&(l=s),d3(n,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var ja=1,Qv=2,Eh=4,h3=!1;function Kw(){h3||(h3=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function p3(n,e){return n.zlevel===e.zlevel?n.z===e.z?n.z2-e.z2:n.z-e.z:n.zlevel-e.zlevel}var jpe=(function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=p3}return n.prototype.traverse=function(e,t){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(e,t)},n.prototype.getDisplayList=function(e,t){t=t||!1;var r=this._displayList;return(e||!r.length)&&this.updateDisplayList(t),r},n.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,r=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);r.length=this._displayListLen,m1(r,p3)},n.prototype._updateAndAddDisplayable=function(e,t,r){if(!(e.ignore&&!r)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=i,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),d=0;d<f.length;d++){var h=f[d];e.__dirty&&(h.__dirty|=ja),this._updateAndAddDisplayable(h,s,r)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Kw(),p.z=0),isNaN(p.z2)&&(Kw(),p.z2=0),isNaN(p.zlevel)&&(Kw(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var v=e.getDecalElement&&e.getDecalElement();v&&this._updateAndAddDisplayable(v,s,r);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,r);var y=e.getTextContent();y&&this._updateAndAddDisplayable(y,s,r)}},n.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},n.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,r=e.length;t<r;t++)this.delRoot(e[t]);return}var i=dn(this._roots,e);i>=0&&this._roots.splice(i,1)},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n})(),gb;gb=En.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};var Cg={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)))},elasticOut:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*n)*Math.sin((n-e)*(2*Math.PI)/r)+1)},elasticInOut:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),(n*=2)<1?-.5*(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)):t*Math.pow(2,-10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)*.5+1)},backIn:function(n){var e=1.70158;return n*n*((e+1)*n-e)},backOut:function(n){var e=1.70158;return--n*n*((e+1)*n+e)+1},backInOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)},bounceIn:function(n){return 1-Cg.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?Cg.bounceIn(n*2)*.5:Cg.bounceOut(n*2-1)*.5+.5}},$y=Math.pow,nc=Math.sqrt,mb=1e-8,bH=1e-4,v3=nc(3),Hy=1/3,Es=wd(),mo=wd(),Gh=wd();function qu(n){return n>-mb&&n<mb}function xH(n){return n>mb||n<-mb}function fi(n,e,t,r,i){var a=1-i;return a*a*(a*n+3*i*e)+i*i*(i*r+3*a*t)}function g3(n,e,t,r,i){var a=1-i;return 3*(((e-n)*a+2*(t-e)*i)*a+(r-t)*i*i)}function yb(n,e,t,r,i,a){var o=r+3*(e-t)-n,s=3*(t-e*2+n),l=3*(e-n),u=n-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(qu(c)&&qu(f))if(qu(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[h++]=p)}else{var v=f*f-4*c*d;if(qu(v)){var g=f/c,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(a[h++]=p),y>=0&&y<=1&&(a[h++]=y)}else if(v>0){var b=nc(v),_=c*s+1.5*o*(-f+b),x=c*s+1.5*o*(-f-b);_<0?_=-$y(-_,Hy):_=$y(_,Hy),x<0?x=-$y(-x,Hy):x=$y(x,Hy);var p=(-s-(_+x))/(3*o);p>=0&&p<=1&&(a[h++]=p)}else{var T=(2*c*s-3*o*f)/(2*nc(c*c*c)),k=Math.acos(T)/3,C=nc(c),D=Math.cos(k),p=(-s-2*C*D)/(3*o),y=(-s+C*(D+v3*Math.sin(k)))/(3*o),O=(-s+C*(D-v3*Math.sin(k)))/(3*o);p>=0&&p<=1&&(a[h++]=p),y>=0&&y<=1&&(a[h++]=y),O>=0&&O<=1&&(a[h++]=O)}}return h}function _H(n,e,t,r,i){var a=6*t-12*e+6*n,o=9*e+3*r-3*n-9*t,s=3*e-3*n,l=0;if(qu(o)){if(xH(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(qu(c))i[0]=-a/(2*o);else if(c>0){var f=nc(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function uc(n,e,t,r,i,a){var o=(e-n)*i+n,s=(t-e)*i+e,l=(r-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=n,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=r}function SH(n,e,t,r,i,a,o,s,l,u,c){var f,d=.005,h=1/0,p,v,g,y;Es[0]=l,Es[1]=u;for(var b=0;b<1;b+=.05)mo[0]=fi(n,t,i,o,b),mo[1]=fi(e,r,a,s,b),g=Gf(Es,mo),g<h&&(f=b,h=g);h=1/0;for(var _=0;_<32&&!(d<bH);_++)p=f-d,v=f+d,mo[0]=fi(n,t,i,o,p),mo[1]=fi(e,r,a,s,p),g=Gf(mo,Es),p>=0&&g<h?(f=p,h=g):(Gh[0]=fi(n,t,i,o,v),Gh[1]=fi(e,r,a,s,v),y=Gf(Gh,Es),v<=1&&y<h?(f=v,h=y):d*=.5);return c&&(c[0]=fi(n,t,i,o,f),c[1]=fi(e,r,a,s,f)),nc(h)}function qpe(n,e,t,r,i,a,o,s,l){for(var u=n,c=e,f=0,d=1/l,h=1;h<=l;h++){var p=h*d,v=fi(n,t,i,o,p),g=fi(e,r,a,s,p),y=v-u,b=g-c;f+=Math.sqrt(y*y+b*b),u=v,c=g}return f}function wi(n,e,t,r){var i=1-r;return i*(i*n+2*r*e)+r*r*t}function EC(n,e,t,r){return 2*((1-r)*(e-n)+r*(t-e))}function Kpe(n,e,t,r,i){var a=n-2*e+t,o=2*(e-n),s=n-r,l=0;if(qu(a)){if(xH(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(qu(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=nc(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function wH(n,e,t){var r=n+t-2*e;return r===0?.5:(n-e)/r}function cm(n,e,t,r,i){var a=(e-n)*r+n,o=(t-e)*r+e,s=(o-a)*r+a;i[0]=n,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function kH(n,e,t,r,i,a,o,s,l){var u,c=.005,f=1/0;Es[0]=o,Es[1]=s;for(var d=0;d<1;d+=.05){mo[0]=wi(n,t,i,d),mo[1]=wi(e,r,a,d);var h=Gf(Es,mo);h<f&&(u=d,f=h)}f=1/0;for(var p=0;p<32&&!(c<bH);p++){var v=u-c,g=u+c;mo[0]=wi(n,t,i,v),mo[1]=wi(e,r,a,v);var h=Gf(mo,Es);if(v>=0&&h<f)u=v,f=h;else{Gh[0]=wi(n,t,i,g),Gh[1]=wi(e,r,a,g);var y=Gf(Gh,Es);g<=1&&y<f?(u=g,f=y):c*=.5}}return l&&(l[0]=wi(n,t,i,u),l[1]=wi(e,r,a,u)),nc(f)}function Ype(n,e,t,r,i,a,o){for(var s=n,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=wi(n,t,i,d),p=wi(e,r,a,d),v=h-s,g=p-l;u+=Math.sqrt(v*v+g*g),s=h,l=p}return u}var Xpe=/cubic-bezier\(([0-9,\.e ]+)\)/;function yN(n){var e=n&&Xpe.exec(n);if(e){var t=e[1].split(","),r=+So(t[0]),i=+So(t[1]),a=+So(t[2]),o=+So(t[3]);if(isNaN(r+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:yb(0,r,a,1,l,s)&&fi(0,i,o,1,s[0])}}}var Zpe=(function(){function n(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||zr,this.ondestroy=e.ondestroy||zr,this.onrestart=e.onrestart||zr,e.easing&&this.setEasing(e.easing)}return n.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var r=this._life,i=e-this._startTime-this._pausedTime,a=i/r;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%r;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Vt(e)?e:Cg[e]||yN(e)},n})(),TH=(function(){function n(e){this.value=e}return n})(),Jpe=(function(){function n(){this._len=0}return n.prototype.insert=function(e){var t=new TH(e);return this.insertEntry(t),t},n.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},n.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n})(),lp=(function(){function n(e){this._list=new Jpe,this._maxSize=10,this._map={},this._maxSize=e}return n.prototype.put=function(e,t){var r=this._list,i=this._map,a=null;if(i[e]==null){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new TH(t),s.key=e,r.insertEntry(s),i[e]=s}return a},n.prototype.get=function(e){var t=this._map[e],r=this._list;if(t!=null)return t!==r.tail&&(r.remove(t),r.insertEntry(t)),t.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n})(),m3={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function qo(n){return n=Math.round(n),n<0?0:n>255?255:n}function Qpe(n){return n=Math.round(n),n<0?0:n>360?360:n}function fm(n){return n<0?0:n>1?1:n}function Yw(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?qo(parseFloat(e)/100*255):qo(parseInt(e,10))}function rc(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?fm(parseFloat(e)/100):fm(parseFloat(e))}function Xw(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function Ku(n,e,t){return n+(e-n)*t}function uo(n,e,t,r,i){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function MC(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}var CH=new lp(20),Gy=null;function Yd(n,e){Gy&&MC(Gy,e),Gy=CH.put(n,Gy||e.slice())}function Ia(n,e){if(n){e=e||[];var t=CH.get(n);if(t)return MC(e,t);n=n+"";var r=n.replace(/ /g,"").toLowerCase();if(r in m3)return MC(e,m3[r]),Yd(n,e),e;var i=r.length;if(r.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){uo(e,0,0,0,1);return}return uo(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Yd(n,e),e}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){uo(e,0,0,0,1);return}return uo(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Yd(n,e),e}return}var o=r.indexOf("("),s=r.indexOf(")");if(o!==-1&&s+1===i){var l=r.substr(0,o),u=r.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?uo(e,+u[0],+u[1],+u[2],1):uo(e,0,0,0,1);c=rc(u.pop());case"rgb":if(u.length>=3)return uo(e,Yw(u[0]),Yw(u[1]),Yw(u[2]),u.length===3?c:rc(u[3])),Yd(n,e),e;uo(e,0,0,0,1);return;case"hsla":if(u.length!==4){uo(e,0,0,0,1);return}return u[3]=rc(u[3]),AC(u,e),Yd(n,e),e;case"hsl":if(u.length!==3){uo(e,0,0,0,1);return}return AC(u,e),Yd(n,e),e;default:return}}uo(e,0,0,0,1)}}function AC(n,e){var t=(parseFloat(n[0])%360+360)%360/360,r=rc(n[1]),i=rc(n[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return e=e||[],uo(e,qo(Xw(o,a,t+1/3)*255),qo(Xw(o,a,t)*255),qo(Xw(o,a,t-1/3)*255),1),n.length===4&&(e[3]=n[3]),e}function eve(n){if(n){var e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.min(e,t,r),a=Math.max(e,t,r),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,d=((a-r)/6+o/2)/o;e===a?l=d-f:t===a?l=1/3+c-d:r===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return n[3]!=null&&h.push(n[3]),h}}function NC(n,e){var t=Ia(n);if(t){for(var r=0;r<3;r++)e<0?t[r]=t[r]*(1-e)|0:t[r]=(255-t[r])*e+t[r]|0,t[r]>255?t[r]=255:t[r]<0&&(t[r]=0);return zs(t,t.length===4?"rgba":"rgb")}}function Zw(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){t=t||[];var r=n*(e.length-1),i=Math.floor(r),a=Math.ceil(r),o=e[i],s=e[a],l=r-i;return t[0]=qo(Ku(o[0],s[0],l)),t[1]=qo(Ku(o[1],s[1],l)),t[2]=qo(Ku(o[2],s[2],l)),t[3]=fm(Ku(o[3],s[3],l)),t}}function tve(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){var r=n*(e.length-1),i=Math.floor(r),a=Math.ceil(r),o=Ia(e[i]),s=Ia(e[a]),l=r-i,u=zs([qo(Ku(o[0],s[0],l)),qo(Ku(o[1],s[1],l)),qo(Ku(o[2],s[2],l)),fm(Ku(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:r}:u}}function ic(n,e,t,r){var i=Ia(n);if(n)return i=eve(i),e!=null&&(i[0]=Qpe(Vt(e)?e(i[0]):e)),t!=null&&(i[1]=rc(Vt(t)?t(i[1]):t)),r!=null&&(i[2]=rc(Vt(r)?r(i[2]):r)),zs(AC(i),"rgba")}function bb(n,e){var t=Ia(n);if(t&&e!=null)return t[3]=fm(e),zs(t,"rgba")}function zs(n,e){if(!(!n||!n.length)){var t=n[0]+","+n[1]+","+n[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+n[3]),e+"("+t+")"}}function xb(n,e){var t=Ia(n);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var y3=new lp(100);function DC(n){if(gt(n)){var e=y3.get(n);return e||(e=NC(n,-.1),y3.put(n,e)),e}else if(N_(n)){var t=Ke({},n);return t.colorStops=et(n.colorStops,function(r){return{offset:r.offset,color:NC(r.color,-.1)}}),t}return n}var _b=Math.round;function dm(n){var e;if(!n||n==="transparent")n="none";else if(typeof n=="string"&&n.indexOf("rgba")>-1){var t=Ia(n);t&&(n="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:n,opacity:e??1}}var b3=1e-4;function Yu(n){return n<b3&&n>-b3}function Uy(n){return _b(n*1e3)/1e3}function OC(n){return _b(n*1e4)/1e4}function nve(n){return"matrix("+Uy(n[0])+","+Uy(n[1])+","+Uy(n[2])+","+Uy(n[3])+","+OC(n[4])+","+OC(n[5])+")"}var rve={left:"start",right:"end",center:"middle",middle:"middle"};function ive(n,e,t){return t==="top"?n+=e/2:t==="bottom"&&(n-=e/2),n}function ave(n){return n&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)}function ove(n){var e=n.style,t=n.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function EH(n){return n&&!!n.image}function sve(n){return n&&!!n.svgElement}function bN(n){return EH(n)||sve(n)}function MH(n){return n.type==="linear"}function AH(n){return n.type==="radial"}function NH(n){return n&&(n.type==="linear"||n.type==="radial")}function L_(n){return"url(#"+n+")"}function DH(n){var e=n.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function OH(n){var e=n.x||0,t=n.y||0,r=(n.rotation||0)*p1,i=At(n.scaleX,1),a=At(n.scaleY,1),o=n.skewX||0,s=n.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),r&&l.push("rotate("+r+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+_b(o*p1)+"deg, "+_b(s*p1)+"deg)"),l.join(" ")}var lve=(function(){return En.hasGlobalWindow&&Vt(window.btoa)?function(n){return window.btoa(unescape(encodeURIComponent(n)))}:typeof Buffer<"u"?function(n){return Buffer.from(n).toString("base64")}:function(n){return process.env.NODE_ENV!=="production"&&jo("Base64 isn't natively supported in the current environment."),null}})(),IC=Array.prototype.slice;function Sl(n,e,t){return(e-n)*t+n}function Jw(n,e,t,r){for(var i=e.length,a=0;a<i;a++)n[a]=Sl(e[a],t[a],r);return n}function uve(n,e,t,r){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=Sl(e[o][s],t[o][s],r)}return n}function Wy(n,e,t,r){for(var i=e.length,a=0;a<i;a++)n[a]=e[a]+t[a]*r;return n}function x3(n,e,t,r){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=e[o][s]+t[o][s]*r}return n}function cve(n,e){for(var t=n.length,r=e.length,i=t>r?e:n,a=Math.min(t,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function fve(n,e,t){var r=n,i=e;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){var s=a>o;if(s)r.length=o;else for(var l=a;l<o;l++)r.push(t===1?i[l]:IC.call(i[l]))}for(var u=r[0]&&r[0].length,l=0;l<r.length;l++)if(t===1)isNaN(r[l])&&(r[l]=i[l]);else for(var c=0;c<u;c++)isNaN(r[l][c])&&(r[l][c]=i[l][c])}}function Eg(n){if(Zi(n)){var e=n.length;if(Zi(n[0])){for(var t=[],r=0;r<e;r++)t.push(IC.call(n[r]));return t}return IC.call(n)}return n}function y1(n){return n[0]=Math.floor(n[0])||0,n[1]=Math.floor(n[1])||0,n[2]=Math.floor(n[2])||0,n[3]=n[3]==null?1:n[3],"rgba("+n.join(",")+")"}function dve(n){return Zi(n&&n[0])?2:1}var jy=0,b1=1,IH=2,eg=3,RC=4,LC=5,_3=6;function S3(n){return n===RC||n===LC}function qy(n){return n===b1||n===IH}var vv=[0,0,0,0],hve=(function(){function n(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return n.prototype.isFinished=function(){return this._finished},n.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},n.prototype.needsAnimate=function(){return this.keyframes.length>=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(e,t,r){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=_3,l=t;if(Zi(t)){var u=dve(t);s=u,(u===1&&!Ln(t[0])||u===2&&!Ln(t[0][0]))&&(o=!0)}else if(Ln(t)&&!Ti(t))s=jy;else if(gt(t))if(!isNaN(+t))s=jy;else{var c=Ia(t);c&&(l=c,s=eg)}else if(N_(t)){var f=Ke({},l);f.colorStops=et(t.colorStops,function(h){return{offset:h.offset,color:Ia(h.color)}}),MH(t)?s=RC:AH(t)&&(s=LC),l=f}a===0?this.valType=s:(s!==this.valType||s===_3)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:t,percent:0};return r&&(d.easing=r,d.easingFunc=Vt(r)?r:Cg[r]||yN(r)),i.push(d),d},n.prototype.prepare=function(e,t){var r=this.keyframes;this._needsSort&&r.sort(function(v,g){return v.time-g.time});for(var i=this.valType,a=r.length,o=r[a-1],s=this.discrete,l=qy(i),u=S3(i),c=0;c<a;c++){var f=r[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==a-1?fve(d,h,i):u&&cve(d.colorStops,h.colorStops))}if(!s&&i!==LC&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=r[0].value,c=0;c<a;c++)i===jy?r[c].additiveValue=r[c].value-p:i===eg?r[c].additiveValue=Wy([],r[c].value,p,-1):qy(i)&&(r[c].additiveValue=i===b1?Wy([],r[c].value,p,-1):x3([],r[c].value,p,-1))}},n.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r=this._additiveTrack!=null,i=r?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===eg,c,f=this._lastFr,d=Math.min,h,p;if(s===1)h=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=d(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=t);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=d(c-1,s-2)}p=o[c+1],h=o[c]}if(h&&p){this._lastFr=c,this._lastFrP=t;var g=p.percent-h.percent,y=g===0?1:d((t-h.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var b=r?this._additiveValue:u?vv:e[l];if((qy(a)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=y<1?h.rawValue:p.rawValue;else if(qy(a))a===b1?Jw(b,h[i],p[i],y):uve(b,h[i],p[i],y);else if(S3(a)){var _=h[i],x=p[i],T=a===RC;e[l]={type:T?"linear":"radial",x:Sl(_.x,x.x,y),y:Sl(_.y,x.y,y),colorStops:et(_.colorStops,function(C,D){var O=x.colorStops[D];return{offset:Sl(C.offset,O.offset,y),color:y1(Jw([],C.color,O.color,y))}}),global:x.global},T?(e[l].x2=Sl(_.x2,x.x2,y),e[l].y2=Sl(_.y2,x.y2,y)):e[l].r=Sl(_.r,x.r,y)}else if(u)Jw(b,h[i],p[i],y),r||(e[l]=y1(b));else{var k=Sl(h[i],p[i],y);r?this._additiveValue=k:e[l]=k}r&&this._addToTarget(e)}}},n.prototype._addToTarget=function(e){var t=this.valType,r=this.propName,i=this._additiveValue;t===jy?e[r]=e[r]+i:t===eg?(Ia(e[r],vv),Wy(vv,vv,i,1),e[r]=y1(vv)):t===b1?Wy(e[r],e[r],i,1):t===IH&&x3(e[r],e[r],i,1)},n})(),xN=(function(){function n(e,t,r,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){jo("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=r}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(e){this._target=e},n.prototype.when=function(e,t,r){return this.whenWithKeys(e,t,Mn(t),r)},n.prototype.whenWithKeys=function(e,t,r,i){for(var a=this._tracks,o=0;o<r.length;o++){var s=r[o],l=a[s];if(!l){l=a[s]=new hve(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,d=f[f.length-1];u=d&&d.value,c.valType===eg&&u&&(u=y1(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Eg(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Eg(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,r=0;r<t;r++)e[r].call(this)},n.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var r=0;r<t.length;r++)t[r].call(this)},n.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,r=0;r<t.length;r++)e[t[r]].setFinished()},n.prototype._getAdditiveTrack=function(e){var t,r=this._additiveAnimators;if(r)for(var i=0;i<r.length;i++){var a=r[i].getTrack(e);a&&(t=a)}return t},n.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,r=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else r.push(s)}if(r.length||this._force){var d=new Zpe({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var g=0;g<r.length;g++)r[g].step(t._target,h);var y=t._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},n.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},n.prototype.delay=function(e){return this._delay=e,this},n.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},n.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},n.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},n.prototype.getClip=function(){return this._clip},n.prototype.getTrack=function(e){return this._tracks[e]},n.prototype.getTracks=function(){var e=this;return et(this._trackKeys,function(t){return e._tracks[t]})},n.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var r=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=r[e[a]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!r[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},n.prototype.saveTo=function(e,t,r){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var a=t[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[r?0:s.length-1];l&&(e[a]=Eg(l.rawValue))}}}},n.prototype.__changeFinalValue=function(e,t){t=t||Mn(e);for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},n})();function Lh(){return new Date().getTime()}var pve=(function(n){Ie(e,n);function e(t){var r=n.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,t=t||{},r.stage=t.stage||{},r}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var r=t.getClip();r&&this.addClip(r)},e.prototype.removeClip=function(t){if(t.animation){var r=t.prev,i=t.next;r?r.next=i:this._head=i,i?i.prev=r:this._tail=r,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var r=t.getClip();r&&this.removeClip(r),t.animation=null},e.prototype.update=function(t){for(var r=Lh()-this._pausedTime,i=r-this._time,a=this._head;a;){var o=a.next,s=a.step(r,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=r,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function r(){t._running&&(gb(r),!t._paused&&t.update())}gb(r)},e.prototype.start=function(){this._running||(this._time=Lh(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Lh(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Lh()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var r=t.next;t.prev=t.next=t.animation=null,t=r}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,r){r=r||{},this.start();var i=new xN(t,r.loop);return this.addAnimator(i),i},e})(Oo),vve=300,Qw=En.domSupported,e2=(function(){var n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=et(n,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:n,touch:e,pointer:r}})(),w3={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},k3=!1;function PC(n){var e=n.pointerType;return e==="pen"||e==="touch"}function gve(n){n.touching=!0,n.touchTimer!=null&&(clearTimeout(n.touchTimer),n.touchTimer=null),n.touchTimer=setTimeout(function(){n.touching=!1,n.touchTimer=null},700)}function t2(n){n&&(n.zrByTouch=!0)}function mve(n,e){return fo(n.dom,new yve(n,e),!0)}function RH(n,e){for(var t=e,r=!1;t&&t.nodeType!==9&&!(r=t.domBelongToZr||t!==e&&t===n.painterRoot);)t=t.parentNode;return r}var yve=(function(){function n(e,t){this.stopPropagation=zr,this.stopImmediatePropagation=zr,this.preventDefault=zr,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return n})(),Vo={mousedown:function(n){n=fo(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=fo(this.dom,n);var e=this.__mayPointerCapture;e&&(n.zrX!==e[0]||n.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=fo(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){n=fo(this.dom,n);var e=n.toElement||n.relatedTarget;RH(this,e)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){k3=!0,n=fo(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){k3||(n=fo(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){n=fo(this.dom,n),t2(n),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),Vo.mousemove.call(this,n),Vo.mousedown.call(this,n)},touchmove:function(n){n=fo(this.dom,n),t2(n),this.handler.processGesture(n,"change"),Vo.mousemove.call(this,n)},touchend:function(n){n=fo(this.dom,n),t2(n),this.handler.processGesture(n,"end"),Vo.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<vve&&Vo.click.call(this,n)},pointerdown:function(n){Vo.mousedown.call(this,n)},pointermove:function(n){PC(n)||Vo.mousemove.call(this,n)},pointerup:function(n){Vo.mouseup.call(this,n)},pointerout:function(n){PC(n)||Vo.mouseout.call(this,n)}};U(["click","dblclick","contextmenu"],function(n){Vo[n]=function(e){e=fo(this.dom,e),this.trigger(n,e)}});var BC={pointermove:function(n){PC(n)||BC.mousemove.call(this,n)},pointerup:function(n){BC.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),e&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function bve(n,e){var t=e.domHandlers;En.pointerEventsSupported?U(e2.pointer,function(r){x1(e,r,function(i){t[r].call(n,i)})}):(En.touchEventsSupported&&U(e2.touch,function(r){x1(e,r,function(i){t[r].call(n,i),gve(e)})}),U(e2.mouse,function(r){x1(e,r,function(i){i=gN(i),e.touching||t[r].call(n,i)})}))}function xve(n,e){En.pointerEventsSupported?U(w3.pointer,t):En.touchEventsSupported||U(w3.mouse,t);function t(r){function i(a){a=gN(a),RH(n,a.target)||(a=mve(n,a),e.domHandlers[r].call(n,a))}x1(e,r,i,{capture:!0})}}function x1(n,e,t,r){n.mounted[e]=t,n.listenerOpts[e]=r,kC(n.domTarget,e,t,r)}function n2(n){var e=n.mounted;for(var t in e)e.hasOwnProperty(t)&&Dpe(n.domTarget,t,e[t],n.listenerOpts[t]);n.mounted={}}var T3=(function(){function n(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return n})(),_ve=(function(n){Ie(e,n);function e(t,r){var i=n.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=r,i._localHandlerScope=new T3(t,Vo),Qw&&(i._globalHandlerScope=new T3(document,BC)),bve(i,i._localHandlerScope),i}return e.prototype.dispose=function(){n2(this._localHandlerScope),Qw&&n2(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Qw&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var r=this._globalHandlerScope;t?xve(this,r):n2(r)}},e})(Oo),LH=1;En.hasGlobalWindow&&(LH=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Sb=LH,VC=.4,zC="#333",FC="#ccc",Sve="#eee",C3=I_,E3=5e-5;function zc(n){return n>E3||n<-E3}var Fc=[],Xd=[],r2=Ci(),i2=Math.abs,Al=(function(){function n(){}return n.prototype.getLocalTransform=function(e){return n.getLocalTransform(this,e)},n.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},n.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},n.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},n.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},n.prototype.needLocalTransform=function(){return zc(this.rotation)||zc(this.x)||zc(this.y)||zc(this.scaleX-1)||zc(this.scaleY-1)||zc(this.skewX)||zc(this.skewY)},n.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),r=this.transform;if(!(t||e)){r&&(C3(r),this.invTransform=null);return}r=r||Ci(),t?this.getLocalTransform(r):C3(r),e&&(t?Vs(r,e,r):R_(r,e)),this.transform=r,this._resolveGlobalScaleRatio(r)},n.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Fc);var r=Fc[0]<0?-1:1,i=Fc[1]<0?-1:1,a=((Fc[0]-r)*t+r)/Fc[0]||0,o=((Fc[1]-i)*t+i)/Fc[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Ci(),Zo(this.invTransform,e)},n.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},n.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);r=Math.sqrt(r)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=r,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Ci(),Vs(Xd,e.invTransform,t),t=Xd);var r=this.originX,i=this.originY;(r||i)&&(r2[4]=r,r2[5]=i,Vs(Xd,t,r2),Xd[4]-=r,Xd[5]-=i,t=Xd),this.setLocalTransform(t)}},n.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},n.prototype.transformCoordToLocal=function(e,t){var r=[e,t],i=this.invTransform;return i&&Fr(r,r,i),r},n.prototype.transformCoordToGlobal=function(e,t){var r=[e,t],i=this.transform;return i&&Fr(r,r,i),r},n.prototype.getLineScale=function(){var e=this.transform;return e&&i2(e[0]-1)>1e-10&&i2(e[3]-1)>1e-10?Math.sqrt(i2(e[0]*e[3]-e[2]*e[1])):1},n.prototype.copyTransform=function(e){wb(this,e)},n.getLocalTransform=function(e,t){t=t||[];var r=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(r||i||s||l){var p=r+s,v=i+l;t[4]=-p*a-d*v*o,t[5]=-v*o-h*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=h*a,t[2]=d*o,u&&Sc(t,t,u),t[4]+=r+c,t[5]+=i+f,t},n.initDefaultProps=(function(){var e=n.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),n})(),Ys=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function wb(n,e){for(var t=0;t<Ys.length;t++){var r=Ys[t];n[r]=e[r]}}function Fs(n){Ky||(Ky=new lp(100)),n=n||Hl;var e=Ky.get(n);return e||(e={font:n,strWidthCache:new lp(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Xo.measureText("国",n).width,asciiCharWidth:Xo.measureText("a",n).width},Ky.put(n,e)),e}var Ky;function wve(n){if(!(a2>=M3)){n=n||Hl;for(var e=[],t=+new Date,r=0;r<=127;r++)e[r]=Xo.measureText(String.fromCharCode(r),n).width;var i=+new Date-t;return i>16?a2=M3:i>2&&a2++,e}}var a2=0,M3=5;function PH(n,e){return n.asciiWidthMapTried||(n.asciiWidthMap=wve(n.font),n.asciiWidthMapTried=!0),0<=e&&e<=127?n.asciiWidthMap!=null?n.asciiWidthMap[e]:n.asciiCharWidth:n.stWideCharWidth}function $s(n,e){var t=n.strWidthCache,r=t.get(e);return r==null&&(r=Xo.measureText(e,n.font).width,t.put(e,r)),r}function A3(n,e,t,r){var i=$s(Fs(e),n),a=Ym(e),o=up(0,i,t),s=Uf(0,a,r),l=new Kt(o,s,i,a);return l}function P_(n,e,t,r){var i=((n||"")+"").split(`
|
|
216
|
+
`,1;if(ss>1e5&&ss>on.index*3)throw new Error("potential infinite loop, way more iterations than matches");return tr+=In,In.length}const bi=ae(Je);if(!bi)throw Pt(ue.replace("{}",Je)),new Error('Unknown language: "'+Je+'"');const Cc=On(bi);let ol="",Cn=jn||Cc;const sl={},Er=new H.__emitter(H);lu();let tr="",ra=0,Pa=0,ss=0,Io=!1;try{if(bi.__emitTokens)bi.__emitTokens(Ct,Er);else{for(Cn.matcher.considerAll();;){ss++,Io?Io=!1:Cn.matcher.considerAll(),Cn.matcher.lastIndex=Pa;const Ot=Cn.matcher.exec(Ct);if(!Ot)break;const on=Ct.substring(Pa,Ot.index),In=as(on,Ot);Pa=Ot.index+In}as(Ct.substring(Pa))}return Er.finalize(),ol=Er.toHTML(),{language:Je,value:ol,relevance:ra,illegal:!1,_emitter:Er,_top:Cn}}catch(Ot){if(Ot.message&&Ot.message.includes("Illegal"))return{language:Je,value:wn(Ct),illegal:!0,relevance:0,_illegalBy:{message:Ot.message,index:Pa,context:Ct.slice(Pa-100,Pa+100),mode:Ot.mode,resultSoFar:ol},_emitter:Er};if(ce)return{language:Je,value:wn(Ct),illegal:!1,relevance:0,errorRaised:Ot,_emitter:Er,_top:Cn};throw Ot}}function at(Je){const Ct={value:wn(Je),illegal:!1,relevance:0,_top:j,_emitter:new H.__emitter(H)};return Ct._emitter.addText(Je),Ct}function Xe(Je,Ct){Ct=Ct||H.languages||Object.keys(rt);const un=at(Je),jn=Ct.filter(ae).filter(Ae).map(ci=>qe(ci,Je,!1));jn.unshift(un);const er=jn.sort((ci,Hi)=>{if(ci.relevance!==Hi.relevance)return Hi.relevance-ci.relevance;if(ci.language&&Hi.language){if(ae(ci.language).supersetOf===Hi.language)return 1;if(ae(Hi.language).supersetOf===ci.language)return-1}return 0}),[Jr,to]=er,au=Jr;return au.secondBest=to,au}function Mt(Je,Ct,un){const jn=Ct&&yt[Ct]||un;Je.classList.add("hljs"),Je.classList.add(`language-${jn}`)}function Yt(Je){let Ct=null;const un=ie(Je);if(X(un))return;if(ct("before:highlightElement",{el:Je,language:un}),Je.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Je);return}if(Je.children.length>0&&(H.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(Je)),H.throwUnescapedHTML))throw new pn("One of your code blocks includes unescaped HTML.",Je.innerHTML);Ct=Je;const jn=Ct.textContent,er=un?be(jn,{language:un,ignoreIllegals:!0}):Xe(jn);Je.innerHTML=er.value,Je.dataset.highlighted="yes",Mt(Je,un,er.language),Je.result={language:er.language,re:er.relevance,relevance:er.relevance},er.secondBest&&(Je.secondBest={language:er.secondBest.language,relevance:er.secondBest.relevance}),ct("after:highlightElement",{el:Je,result:er,text:jn})}function zt(Je){H=Qn(H,Je)}const yn=()=>{G(),gn("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Dn(){G(),gn("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Z=!1;function G(){function Je(){G()}if(document.readyState==="loading"){Z||window.addEventListener("DOMContentLoaded",Je,!1),Z=!0;return}document.querySelectorAll(H.cssSelector).forEach(Yt)}function A(Je,Ct){let un=null;try{un=Ct(Ne)}catch(jn){if(Pt("Language definition for '{}' could not be registered.".replace("{}",Je)),ce)Pt(jn);else throw jn;un=j}un.name||(un.name=Je),rt[Je]=un,un.rawDefinition=Ct.bind(null,Ne),un.aliases&&he(un.aliases,{languageName:Je})}function L(Je){delete rt[Je];for(const Ct of Object.keys(yt))yt[Ct]===Je&&delete yt[Ct]}function Y(){return Object.keys(rt)}function ae(Je){return Je=(Je||"").toLowerCase(),rt[Je]||rt[yt[Je]]}function he(Je,{languageName:Ct}){typeof Je=="string"&&(Je=[Je]),Je.forEach(un=>{yt[un.toLowerCase()]=Ct})}function Ae(Je){const Ct=ae(Je);return Ct&&!Ct.disableAutodetect}function He(Je){Je["before:highlightBlock"]&&!Je["before:highlightElement"]&&(Je["before:highlightElement"]=Ct=>{Je["before:highlightBlock"](Object.assign({block:Ct.el},Ct))}),Je["after:highlightBlock"]&&!Je["after:highlightElement"]&&(Je["after:highlightElement"]=Ct=>{Je["after:highlightBlock"](Object.assign({block:Ct.el},Ct))})}function je(Je){He(Je),ln.push(Je)}function pt(Je){const Ct=ln.indexOf(Je);Ct!==-1&&ln.splice(Ct,1)}function ct(Je,Ct){const un=Je;ln.forEach(function(jn){jn[un]&&jn[un](Ct)})}function Bt(Je){return gn("10.7.0","highlightBlock will be removed entirely in v12.0"),gn("10.7.0","Please use highlightElement now."),Yt(Je)}Object.assign(Ne,{highlight:be,highlightAuto:Xe,highlightAll:G,highlightElement:Yt,highlightBlock:Bt,configure:zt,initHighlighting:yn,initHighlightingOnLoad:Dn,registerLanguage:A,unregisterLanguage:L,listLanguages:Y,getLanguage:ae,registerAliases:he,autoDetection:Ae,inherit:Qn,addPlugin:je,removePlugin:pt}),Ne.debugMode=function(){ce=!1},Ne.safeMode=function(){ce=!0},Ne.versionString=Xt,Ne.regex={concat:v,lookahead:d,either:y,optional:p,anyNumberOfTimes:h};for(const Je in me)typeof me[Je]=="object"&&n(me[Je]);return Object.assign(Ne,me),Ne},kr=Ni({});return kr.newInstance=()=>Ni({}),Vw=kr,kr.HighlightJS=kr,kr.default=kr,Vw}var rhe=nhe();const ihe=YF(rhe),XL={},ahe="hljs-";function nH(n){const e=ihe.newInstance();return n&&a(n),{highlight:t,highlightAuto:r,listLanguages:i,register:a,registerAlias:o,registered:s};function t(l,u,c){const f=c||XL,d=typeof f.prefix=="string"?f.prefix:ahe;if(!e.getLanguage(l))throw new Error("Unknown language: `"+l+"` is not registered");e.configure({__emitter:ohe,classPrefix:d});const h=e.highlight(u,{ignoreIllegals:!0,language:l});if(h.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:h.errorRaised});const p=h._emitter.root,v=p.data;return v.language=h.language,v.relevance=h.relevance,p}function r(l,u){const f=(u||XL).subset||i();let d=-1,h=0,p;for(;++d<f.length;){const v=f[d];if(!e.getLanguage(v))continue;const g=t(v,l,u);g.data&&g.data.relevance!==void 0&&g.data.relevance>h&&(h=g.data.relevance,p=g)}return p||{type:"root",children:[],data:{language:void 0,relevance:h}}}function i(){return e.listLanguages()}function a(l,u){if(typeof l=="string")e.registerLanguage(l,u);else{let c;for(c in l)Object.hasOwn(l,c)&&e.registerLanguage(c,l[c])}}function o(l,u){if(typeof l=="string")e.registerAliases(typeof u=="string"?u:[...u],{languageName:l});else{let c;for(c in l)if(Object.hasOwn(l,c)){const f=l[c];e.registerAliases(typeof f=="string"?f:[...f],{languageName:c})}}}function s(l){return!!e.getLanguage(l)}}class ohe{constructor(e){this.options=e,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(e){if(e==="")return;const t=this.stack[this.stack.length-1],r=t.children[t.children.length-1];r&&r.type==="text"?r.value+=e:t.children.push({type:"text",value:e})}startScope(e){this.openNode(String(e))}endScope(){this.closeNode()}__addSublanguage(e,t){const r=this.stack[this.stack.length-1],i=e.root.children;t?r.children.push({type:"element",tagName:"span",properties:{className:[t]},children:i}):r.children.push(...i)}openNode(e){const t=this,r=e.split(".").map(function(o,s){return s?o+"_".repeat(s):t.options.classPrefix+o}),i=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};i.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const js=m.defineComponent({__name:"Popover",props:{value:{type:Boolean,default:!1},trigger:{default:"click"},placement:{default:"bottom"},appendTo:{},contentStyle:{},center:{type:Boolean,default:!1},offset:{default:8},hasClass:{default:""},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(),a=m.ref(),o=m.ref(),s=m.ref(!1),l=m.computed(()=>t.contentStyle||{});return m.watch(()=>t.value,()=>{i.value&&(t.value?i.value.show():i.value.hide())}),m.onUnmounted(()=>{i.value&&i.value.destroy()}),m.onMounted(()=>{i.value=Zl(a.value,{content:o.value,allowHTML:!0,trigger:t.trigger,placement:t.placement,interactive:!0,appendTo:t.appendTo||document.body,maxWidth:"none",offset:[0,t.offset],duration:200,animation:"scale",theme:"popover",onShow(){s.value=!0,t.value||r("update:value",!0)},onShown(){},onHide(){t.value&&r("update:value",!1)},onHidden(){s.value=!1}}),t.disabled&&i.value.disable()}),(u,c)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-popover-wrapper flex-shrink-0",{center:n.center,[n.hasClass]:n.hasClass,inline:n.inline}]),ref_key:"triggerRef",ref:a},[m.createElementVNode("div",{class:"white-popover-content white-editor-namespace",style:m.normalizeStyle(l.value),ref_key:"contentRef",ref:o},[s.value?m.renderSlot(u.$slots,"content",{key:0}):m.createCommentVNode("",!0)],4),m.renderSlot(u.$slots,"default")],2))}}),she={class:"prefix"},lhe=["disabled","value","placeholder"],uhe={class:"suffix"},lm=m.defineComponent({__name:"Input",props:{value:{},disabled:{type:Boolean,default:!1},placeholder:{default:""},simple:{type:Boolean,default:!1},status:{default:""},size:{default:""}},emits:["update:value","input","change","blur","focus","enter"],setup(n,{expose:e,emit:t}){const r=t,i=m.ref(!1),a=c=>{r("update:value",c.target.value)},o=c=>{i.value=!1,r("blur",c)},s=c=>{i.value=!0,r("focus",c)},l=m.ref();return e({focus:()=>{l.value&&l.value.focus()}}),(c,f)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-input-wrapper",{disabled:n.disabled,focused:i.value,simple:n.simple,[n.size]:n.size,"status-success":n.status==="success","status-error":n.status==="error"}])},[m.createElementVNode("span",she,[m.renderSlot(c.$slots,"prefix")]),m.createElementVNode("input",{type:"text",ref_key:"inputRef",ref:l,disabled:n.disabled,value:n.value,placeholder:n.placeholder,onInput:f[0]||(f[0]=d=>a(d)),onFocus:f[1]||(f[1]=d=>s(d)),onBlur:f[2]||(f[2]=d=>o(d)),onChange:f[3]||(f[3]=d=>r("change",d)),onKeydown:f[4]||(f[4]=m.withKeys(d=>r("enter",d),["enter"]))},null,40,lhe),m.createElementVNode("span",uhe,[m.renderSlot(c.$slots,"suffix")])],2))}}),che={key:0,class:"white-select-wrapper"},fhe={class:"selector"},dhe={class:"icon"},hhe=["onClick"],phe={class:"icon"},wg=m.defineComponent({__name:"Select",props:{value:{},size:{default:""},options:{},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{default:"搜索"},maxHeight:{type:Boolean,default:!0},maxWidth:{default:0},hasBorder:{type:Boolean,default:!0}},emits:["update:value","change"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=m.ref(!1),o=m.ref(),s=m.ref(),l=m.ref(0),u=m.ref(""),c=m.computed(()=>r.options.find(y=>y.value===r.value)?.label||r.value||"请选择"),f=m.computed(()=>c.value==="请选择"),d=m.computed(()=>{if(!r.search||!u.value.trim())return r.options;const y=r.options.filter(b=>b.label.toLowerCase().indexOf(u.value.toLowerCase())!==-1);return y.length?y:r.options});m.watch(a,()=>{a.value?m.nextTick(()=>{s.value&&s.value.focus()}):u.value=""}),m.onBeforeUnmount(()=>{u.value=""});const h=()=>{o.value&&(l.value=r.maxWidth?Number(r.maxWidth):o.value.clientWidth)},p=new ResizeObserver(h);m.onMounted(()=>{o.value&&p.observe(o.value)}),m.onUnmounted(()=>{o.value&&p.unobserve(o.value)});const v=y=>{y.disabled||(i("update:value",y.value),i("change",y.value),a.value=!1)};return e({changePopoverVisible:y=>{a.value=y}}),(y,b)=>n.disabled?(m.openBlock(),m.createElementBlock("div",che,[m.createElementVNode("div",{class:"select disabled",ref_key:"selectRef",ref:o},[m.createElementVNode("div",fhe,m.toDisplayString(n.value),1),m.createElementVNode("div",dhe,[m.renderSlot(y.$slots,"icon",{},()=>[b[1]||(b[1]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px]"},null,-1))])])],512)])):(m.openBlock(),m.createBlock(js,{key:1,class:"white-select-wrapper",trigger:"click",value:a.value,"onUpdate:value":b[0]||(b[0]=_=>a.value=_),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"white-options-wrapper",style:m.normalizeStyle({width:l.value+2+"px",maxHeight:n.maxHeight?"260px":"auto"})},[m.renderSlot(y.$slots,"main",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(d.value,(_,x)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["option",{disabled:_.disabled,selected:_.value===n.value}]),key:x,onClick:T=>v(_)},m.toDisplayString(_.label),11,hhe))),128))])],4)]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["select",{[n.size]:n.size,"border border-[#d9d9d9] !bg-[#fff]":n.hasBorder}]),ref_key:"selectRef",ref:o},[m.createElementVNode("div",{class:m.normalizeClass(["selector",{placeholder:f.value}])},[m.renderSlot(y.$slots,"default",{},()=>[m.createTextVNode(m.toDisplayString(c.value),1)])],2),m.createElementVNode("div",phe,[m.renderSlot(y.$slots,"icon",{},()=>[b[2]||(b[2]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px]"},null,-1))])])],2)]),_:3},8,["value"]))}});var h1={exports:{}};var vhe=h1.exports,ZL;function ghe(){return ZL||(ZL=1,(function(n,e){(function(r,i){n.exports=i()})(vhe,function(){return(function(){var t={686:(function(a,o,s){s.d(o,{default:function(){return Ee}});var l=s(279),u=s.n(l),c=s(370),f=s.n(c),d=s(817),h=s.n(d);function p(xe){try{return document.execCommand(xe)}catch{return!1}}var v=function(De){var ze=h()(De);return p("cut"),ze},g=v;function y(xe){var De=document.documentElement.getAttribute("dir")==="rtl",ze=document.createElement("textarea");ze.style.fontSize="12pt",ze.style.border="0",ze.style.padding="0",ze.style.margin="0",ze.style.position="absolute",ze.style[De?"right":"left"]="-9999px";var We=window.pageYOffset||document.documentElement.scrollTop;return ze.style.top="".concat(We,"px"),ze.setAttribute("readonly",""),ze.value=xe,ze}var b=function(De,ze){var We=y(De);ze.container.appendChild(We);var tt=h()(We);return p("copy"),We.remove(),tt},_=function(De){var ze=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},We="";return typeof De=="string"?We=b(De,ze):De instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(De?.type)?We=b(De.value,ze):(We=h()(De),p("copy")),We},x=_;function T(xe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?T=function(ze){return typeof ze}:T=function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze},T(xe)}var k=function(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ze=De.action,We=ze===void 0?"copy":ze,tt=De.container,ht=De.target,we=De.text;if(We!=="copy"&&We!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ht!==void 0)if(ht&&T(ht)==="object"&&ht.nodeType===1){if(We==="copy"&&ht.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(We==="cut"&&(ht.hasAttribute("readonly")||ht.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(we)return x(we,{container:tt});if(ht)return We==="cut"?g(ht):x(ht,{container:tt})},C=k;function D(xe){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?D=function(ze){return typeof ze}:D=function(ze){return ze&&typeof Symbol=="function"&&ze.constructor===Symbol&&ze!==Symbol.prototype?"symbol":typeof ze},D(xe)}function O(xe,De){if(!(xe instanceof De))throw new TypeError("Cannot call a class as a function")}function R(xe,De){for(var ze=0;ze<De.length;ze++){var We=De[ze];We.enumerable=We.enumerable||!1,We.configurable=!0,"value"in We&&(We.writable=!0),Object.defineProperty(xe,We.key,We)}}function V(xe,De,ze){return De&&R(xe.prototype,De),ze&&R(xe,ze),xe}function F(xe,De){if(typeof De!="function"&&De!==null)throw new TypeError("Super expression must either be null or a function");xe.prototype=Object.create(De&&De.prototype,{constructor:{value:xe,writable:!0,configurable:!0}}),De&&$(xe,De)}function $(xe,De){return $=Object.setPrototypeOf||function(We,tt){return We.__proto__=tt,We},$(xe,De)}function J(xe){var De=ne();return function(){var We=ee(xe),tt;if(De){var ht=ee(this).constructor;tt=Reflect.construct(We,arguments,ht)}else tt=We.apply(this,arguments);return te(this,tt)}}function te(xe,De){return De&&(D(De)==="object"||typeof De=="function")?De:Q(xe)}function Q(xe){if(xe===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return xe}function ne(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function ee(xe){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(ze){return ze.__proto__||Object.getPrototypeOf(ze)},ee(xe)}function de(xe,De){var ze="data-clipboard-".concat(xe);if(De.hasAttribute(ze))return De.getAttribute(ze)}var ke=(function(xe){F(ze,xe);var De=J(ze);function ze(We,tt){var ht;return O(this,ze),ht=De.call(this),ht.resolveOptions(tt),ht.listenClick(We),ht}return V(ze,[{key:"resolveOptions",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof tt.action=="function"?tt.action:this.defaultAction,this.target=typeof tt.target=="function"?tt.target:this.defaultTarget,this.text=typeof tt.text=="function"?tt.text:this.defaultText,this.container=D(tt.container)==="object"?tt.container:document.body}},{key:"listenClick",value:function(tt){var ht=this;this.listener=f()(tt,"click",function(we){return ht.onClick(we)})}},{key:"onClick",value:function(tt){var ht=tt.delegateTarget||tt.currentTarget,we=this.action(ht)||"copy",_e=C({action:we,container:this.container,target:this.target(ht),text:this.text(ht)});this.emit(_e?"success":"error",{action:we,text:_e,trigger:ht,clearSelection:function(){ht&&ht.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(tt){return de("action",tt)}},{key:"defaultTarget",value:function(tt){var ht=de("target",tt);if(ht)return document.querySelector(ht)}},{key:"defaultText",value:function(tt){return de("text",tt)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(tt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return x(tt,ht)}},{key:"cut",value:function(tt){return g(tt)}},{key:"isSupported",value:function(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ht=typeof tt=="string"?[tt]:tt,we=!!document.queryCommandSupported;return ht.forEach(function(_e){we=we&&!!document.queryCommandSupported(_e)}),we}}]),ze})(u()),Ee=ke}),828:(function(a){var o=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function l(u,c){for(;u&&u.nodeType!==o;){if(typeof u.matches=="function"&&u.matches(c))return u;u=u.parentNode}}a.exports=l}),438:(function(a,o,s){var l=s(828);function u(d,h,p,v,g){var y=f.apply(this,arguments);return d.addEventListener(p,y,g),{destroy:function(){d.removeEventListener(p,y,g)}}}function c(d,h,p,v,g){return typeof d.addEventListener=="function"?u.apply(null,arguments):typeof p=="function"?u.bind(null,document).apply(null,arguments):(typeof d=="string"&&(d=document.querySelectorAll(d)),Array.prototype.map.call(d,function(y){return u(y,h,p,v,g)}))}function f(d,h,p,v){return function(g){g.delegateTarget=l(g.target,h),g.delegateTarget&&v.call(d,g)}}a.exports=c}),879:(function(a,o){o.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},o.nodeList=function(s){var l=Object.prototype.toString.call(s);return s!==void 0&&(l==="[object NodeList]"||l==="[object HTMLCollection]")&&"length"in s&&(s.length===0||o.node(s[0]))},o.string=function(s){return typeof s=="string"||s instanceof String},o.fn=function(s){var l=Object.prototype.toString.call(s);return l==="[object Function]"}}),370:(function(a,o,s){var l=s(879),u=s(438);function c(p,v,g){if(!p&&!v&&!g)throw new Error("Missing required arguments");if(!l.string(v))throw new TypeError("Second argument must be a String");if(!l.fn(g))throw new TypeError("Third argument must be a Function");if(l.node(p))return f(p,v,g);if(l.nodeList(p))return d(p,v,g);if(l.string(p))return h(p,v,g);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(p,v,g){return p.addEventListener(v,g),{destroy:function(){p.removeEventListener(v,g)}}}function d(p,v,g){return Array.prototype.forEach.call(p,function(y){y.addEventListener(v,g)}),{destroy:function(){Array.prototype.forEach.call(p,function(y){y.removeEventListener(v,g)})}}}function h(p,v,g){return u(document.body,p,v,g)}a.exports=c}),817:(function(a){function o(s){var l;if(s.nodeName==="SELECT")s.focus(),l=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var u=s.hasAttribute("readonly");u||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),u||s.removeAttribute("readonly"),l=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),l=c.toString()}return l}a.exports=o}),279:(function(a){function o(){}o.prototype={on:function(s,l,u){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:l,ctx:u}),this},once:function(s,l,u){var c=this;function f(){c.off(s,f),l.apply(u,arguments)}return f._=l,this.on(s,f,u)},emit:function(s){var l=[].slice.call(arguments,1),u=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=u.length;for(c;c<f;c++)u[c].fn.apply(u[c].ctx,l);return this},off:function(s,l){var u=this.e||(this.e={}),c=u[s],f=[];if(c&&l)for(var d=0,h=c.length;d<h;d++)c[d].fn!==l&&c[d].fn._!==l&&f.push(c[d]);return f.length?u[s]=f:delete u[s],this}},a.exports=o,a.exports.TinyEmitter=o})},r={};function i(a){if(r[a])return r[a].exports;var o=r[a]={exports:{}};return t[a](o,o.exports,i),o.exports}return(function(){i.n=function(a){var o=a&&a.__esModule?function(){return a.default}:function(){return a};return i.d(o,{a:o}),o}})(),(function(){i.d=function(a,o){for(var s in o)i.o(o,s)&&!i.o(a,s)&&Object.defineProperty(a,s,{enumerable:!0,get:o[s]})}})(),(function(){i.o=function(a,o){return Object.prototype.hasOwnProperty.call(a,o)}})(),i(686)})().default})})(h1)),h1.exports}var mhe=ghe();const yhe=YF(mhe),lN=n=>({toClipboard(e,t){return new Promise((r,i)=>{const a=document.createElement("button"),o=new yhe(a,{text:()=>e,action:()=>"copy",container:t!==void 0?t:document.body});o.on("success",s=>{o.destroy(),r(s)}),o.on("error",s=>{o.destroy(),i(s)}),document.body.appendChild(a),a.click(),document.body.removeChild(a)})}}),bhe={class:"h-[40px] flex items-center justify-between px-[20px] border-b bg-[#f8fafe] overflow-hidden rounded-tl-[8px] rounded-tr-[8px]",contenteditable:"false"},xhe={key:1,class:"flex items-center gap-2 text-[14px]"},_he={key:2,class:"flex items-center gap-4 text-[#6a737d]"},She=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=nH(tH),t=m.inject("options"),r=e.listLanguages().map(s=>({label:s,value:s})),i=s=>{a("language",s)},a=(s,l)=>{n.updateAttributes({[s]:l})},o=async()=>{const{toClipboard:s}=lN();await s(n.node.textContent)};return(s,l)=>{const u=m.resolveDirective("tooltip");return m.openBlock(),m.createBlock(m.unref(Jl),{ref:"containerRef",class:"block white-code-node"},{default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["border rounded-[8px] white-code-content overflow-hidden",{"hover:border-[#007bff]":!m.unref(t).editor.readOnly}])},[m.createElementVNode("div",bhe,[m.unref(t).editor.readOnly?(m.openBlock(),m.createElementBlock("div",xhe,m.toDisplayString(s.node.attrs.language),1)):(m.openBlock(),m.createBlock(wg,{key:0,class:"w-[120px]",options:m.unref(r),value:s.node.attrs.language,hasBorder:!1,onChange:i},null,8,["options","value"])),m.unref(t).editor.readOnly?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",_he,[m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-copy-content cursor-pointer",onClick:o},null,512),[[u,"复制代码"]]),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-remove cursor-pointer",onClick:l[0]||(l[0]=(...c)=>s.deleteNode&&s.deleteNode(...c))},null,512),[[u,"删除"]])]))]),m.createElementVNode("div",{class:m.normalizeClass(["white-code-theme block overflow-auto max-h-[250px]",{"word-wrap":s.node.attrs.wordWrap}])},[m.createVNode(m.unref(Mae),{class:m.normalizeClass(`line-numbers language-${s.node.attrs.language}`),style:"white-space: pre-wrap !important;",as:"code"},null,8,["class"])],2)],2)]),_:1},512)}}}),whe=nH(tH),khe=Lfe.extend({addAttributes(){return{...this.parent?.(),language:{default:"javascript"},theme:{default:"light"},wordWrap:{default:!0}}},addNodeView(){return tl(She)}}),The=khe.configure({lowlight:whe}),Che={class:"cursor-pointer text-[0.85em]"},Ehe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("container");return m.inject("options"),m.inject("page"),m.ref(!1),m.ref(new Date),document.getElementById(e),(t,r)=>(m.openBlock(),m.createBlock(m.unref(Jl),{as:"span",class:"umo-node-datetime"},{default:m.withCtx(()=>[r[0]||(r[0]=m.createElementVNode("i",{class:"w-iconfont icon-date !text-[0.85em] text-[#007bff] pr-1"},null,-1)),m.createElementVNode("span",Che,m.toDisplayString(t.node.attrs.text),1)]),_:1}))}}),Mhe=yi.create({name:"datetime",group:"inline",inline:!0,atom:!0,selectable:!1,addAttributes(){return{type:{default:"datetime"},date:{default:null},text:{default:"[日期]"},format:{default:null},withTime:{default:!1},capitalize:{default:!1}}},parseHTML(){return[{tag:'span[data-type="datetime"]'}]},renderHTML({HTMLAttributes:n}){return["span",Jn(n,{"data-type":"datetime"}),n.text]},addNodeView(){return tl(Ehe)},addCommands(){return{insertDatetime:n=>({chain:e})=>e().insertContent({type:this.name,attrs:n}).run()}}}),Ahe={type:{type:String,default:"rect"},tag:{type:[String,Object],default:"div"},resizable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!1},skewable:{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},skew:{type:Array,default:()=>[0,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],extraLines:Function};function M_(n,e){const t=r=>{e&&e(r),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t),document.removeEventListener("mouseleave",t),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",t)};document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),document.addEventListener("mouseleave",t),document.addEventListener("touchmove",n),document.addEventListener("touchend",t)}function ad(n){let e=0,t=0;if(Nhe(n)){const r=n.targetTouches[0];e=r.pageX,t=r.pageY}else e=n.clientX,t=n.clientY;return{clientX:e,clientY:t}}function Nhe(n){const e=Object.prototype.toString.call(n);return e.substring(8,e.length-1)==="TouchEvent"}const zy=(n=0)=>parseInt(n+"")+"px",zw={n:"top",s:"bottom",e:"right",w:"left",ne:"top-right",nw:"top-left",se:"bottom-right",sw:"bottom-left"},gC=["n","ne","e","se","s","sw","w","nw"],Dhe={n:0,ne:1,e:2,se:3,s:4,sw:5,w:6,nw:7},Ohe={0:0,1:1,2:2,3:2,4:3,5:4,6:4,7:5,8:6,9:6,10:7,11:8},Ihe=(n,e)=>{const t=Ohe[Math.floor(n/30)],r=(Dhe[e]+t)%8;return gC[r]},JL=(n=0,e)=>{let t=[];for(let r=0;r<gC.length;r++){const i=gC[r],[a,o]=zw[i].split("-"),s=Ihe(n,i),l={[a]:"0%",cursor:s+"-resize",side:zw[i]};if(o)l[o]="0%";else{const u=["top","bottom"].includes(a)?"left":"top";l[u]="50%"}e?e.includes(zw[i])&&t.push(l):t.push(l)}return t},uN=n=>n*Math.PI/180,Rhe=(n,e)=>Math.sqrt(n*n+e*e),ei=n=>Math.cos(uN(n)),ti=n=>Math.sin(uN(n)),Lhe=(n,e,t,r,i,a,o)=>{let{width:s,height:l,centerX:u,centerY:c,rotateAngle:f}=e;const d=s<0?-1:1,h=l<0?-1:1;if(s=Math.abs(s),l=Math.abs(l),["top-left","top-right","bottom-left","bottom-right"].includes(n)){n==="top-right"?r=-r:n==="bottom-left"?t=-t:n==="top-left"&&(t=-t,r=-r);const p=$w(s,t,a);s=p.width,t=p.deltaW;const v=Fw(l,r,o);l=v.height,r=v.deltaH,i&&(r=t/i,l=s/i)}switch(n){case"right":{const p=$w(s,t,a);s=p.width,t=p.deltaW,i?(r=t/i,l=s/i,u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f)):(u+=t/2*ei(f),c+=t/2*ti(f));break}case"top-right":{u+=t/2*ei(f)+r/2*ti(f),c+=t/2*ti(f)-r/2*ei(f);break}case"bottom-right":{u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f);break}case"bottom":{const p=Fw(l,r,o);l=p.height,r=p.deltaH,i?(t=r*i,s=l*i,u+=t/2*ei(f)-r/2*ti(f),c+=t/2*ti(f)+r/2*ei(f)):(u-=r/2*ti(f),c+=r/2*ei(f));break}case"bottom-left":{u-=t/2*ei(f)+r/2*ti(f),c-=t/2*ti(f)-r/2*ei(f);break}case"left":{t=-t;const p=$w(s,t,a);s=p.width,t=p.deltaW,i?(l=s/i,r=t/i,u-=t/2*ei(f)+r/2*ti(f),c-=t/2*ti(f)-r/2*ei(f)):(u-=t/2*ei(f),c-=t/2*ti(f));break}case"top-left":{u-=t/2*ei(f)-r/2*ti(f),c-=t/2*ti(f)+r/2*ei(f);break}case"top":{r=-r;const p=Fw(l,r,o);l=p.height,r=p.deltaH,i?(s=l*i,t=r*i,u+=t/2*ei(f)+r/2*ti(f),c+=t/2*ti(f)-r/2*ei(f)):(u+=r/2*ti(f),c-=r/2*ei(f));break}}return{position:{centerX:u,centerY:c},size:{width:s*d,height:l*h}}},Fw=(n,e,t)=>{const r=n+e;return r>t?n=r:(e=t-n,n=t),{height:n,deltaH:e}},$w=(n,e,t)=>{const r=n+e;return r>t?n=r:(e=t-n,n=t),{width:n,deltaW:e}},Phe=({centerX:n,centerY:e,width:t,height:r,angle:i})=>({top:e-r/2,left:n-t/2,width:t,height:r,angle:i}),Bhe=(n,e,t)=>{const{width:r,height:i}=n;return{width:Math.abs(r),height:Math.abs(i),left:e-Math.abs(r)/2,top:t-Math.abs(i)/2}};function db(n,e){const t=Math.abs(n)%e,r=n>0?e:-e;let i=0;return t>e/2?i=r*Math.ceil(Math.abs(n)/e):i=r*Math.floor(Math.abs(n)/e),i}function Vhe(n,e,t){if(!n||!e)return!1;const r=Ml(n,t),i=Ml(e,t);return r.left<i.left+i.width&&r.left+r.width>i.left&&r.top<i.top+i.height&&r.top+r.height>i.top}const Ml=(n,e)=>{var t=n.getBoundingClientRect();return{...t,left:t.left/e,top:t.top/e,right:t.right/e,bottom:t.bottom/e,width:t.width/e,height:t.height/e}},QL=n=>typeof n=="function";function zhe(n,e){let t=null,r=null;const i=m.computed(()=>n.value.offsetParent||document.body),a=m.computed(()=>Ml(i.value,e.scaleRatio)),o=m.ref({x:[],y:[]}),s=()=>{e.markline&&!QL(e.markline)&&(t||(t=document.querySelector(".es-drager-markline-x")||e3("x",i.value,e.color)),r||(r=document.querySelector(".es-drager-markline-y")||e3("y",i.value,e.color)))},l=(h={})=>{if(e.markline){if((!t||!r)&&s(),QL(e.markline))return e.markline(h);h.left===null?t.style.display="none":(t.style.left=h.left+"px",t.style.backgroundColor=e.color,t.style.display="block"),h.top===null?r.style.display="none":(r.style.top=h.top+"px",r.style.backgroundColor=e.color,r.style.display="block")}},u=()=>{const h=Ml(n.value,e.scaleRatio),p=Array.from(document.querySelectorAll(".es-drager"));if(e.extraLines){const b=e.extraLines(h)||[];p.push(...b)}const v=[],g=[],y=[];for(let b=0;b<p.length;b++){const _=p[b];_.nodeType===1?_!==n.value&&v.push(Ml(_,e.scaleRatio)):_.showTop||_.showTop===0?y.push(_):(_.showLeft||_.showLeft===0)&&g.push(_)}o.value=Fhe(v,h),o.value.x.push(...g),o.value.y.push(...y)},c=()=>{const h={top:null,left:null,diffX:0,diffY:0},p=Ml(n.value,e.scaleRatio);for(let v=0;v<o.value.y.length;v++){const{top:g,showTop:y}=o.value.y[v];if(Math.abs(g-p.top)<e.snapThreshold){h.diffY=g-p.top,h.top=y-a.value.top;break}}for(let v=0;v<o.value.x.length;v++){const{left:g,showLeft:y}=o.value.x[v];if(Math.abs(g-p.left)<e.snapThreshold){h.diffX=g-p.left,h.left=y-a.value.left;break}}return l(h),h},f=()=>{l({left:null,top:null})},d=h=>{if(!(!e.snap&&!e.markline))switch(h){case"drag-start":u();break;case"drag":return c();case"drag-end":f();break}};return m.onMounted(()=>{s()}),{marklineEmit:d}}function e3(n="x",e,t=""){const r=document.createElement("div");return r.classList.add(`es-drager-markline-${n}`),r.style.position="absolute",r.style.top="0px",r.style.left="0px",r.style.zIndex="9999",r.style.backgroundColor=t,r.style.display="none",n==="x"?(r.style.height="100%",r.style.width="1px"):(r.style.height="1px",r.style.width="100%"),e.appendChild(r),r}function Fhe(n,e){const t={x:[],y:[]},{width:r=0,height:i=0}=e;return n.forEach(a=>{const{top:o,left:s,width:l,height:u}=a;t.y.push({showTop:o,top:o}),t.y.push({showTop:o,top:o-i}),t.y.push({showTop:o+u/2,top:o+u/2-i/2}),t.y.push({showTop:o+u,top:o+u}),t.y.push({showTop:o+u,top:o+u-i}),t.x.push({showLeft:s,left:s}),t.x.push({showLeft:s+l,left:s+l}),t.x.push({showLeft:s+l/2,left:s+l/2-r/2}),t.x.push({showLeft:s+l,left:s+l-r}),t.x.push({showLeft:s,left:s-r})}),t}function $he(n,e,t,{getBoundary:r,fixBoundary:i,checkDragerCollision:a,emit:o}){let s=0,l=0;return{onKeydown:u=>{let{left:c,top:f}=e.value;if(s||(s=c),l||(l=f),["ArrowRight","ArrowLeft"].includes(u.key)){const d=u.key==="ArrowRight";let h=d?1:-1;n.snapToGrid&&(h=d?n.gridX:-n.gridX),c=c+h}else if(["ArrowUp","ArrowDown"].includes(u.key)){const d=u.key==="ArrowDown";let h=d?1:-1;n.snapToGrid&&(h=d?n.gridY:-n.gridY),f=f+h}if(n.boundary){const[d,h,p,v]=r();[c,f]=i(c,f,d,h,p,v)}e.value.left=c,e.value.top=f},onKeyup:u=>{["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"].includes(u.key)&&n.checkCollision&&a()&&(e.value.left=s,e.value.top=l),s=0,l=0}}}function Hhe(n,e,t){const r=m.ref(!1),i=m.ref(!1),a=m.ref({width:e.width,height:e.height,left:e.left,top:e.top,angle:e.angle,skew:e.skew}),{marklineEmit:o}=zhe(n,e),s=new Set;function l(v){if(s.add(v.button),e.disabled)return;r.value=!0,i.value=!0;let{clientX:g,clientY:y}=ad(v);const{left:b,top:_}=a.value;let x=0,T=0,k=0,C=0;e.boundary&&([x,T,k,C]=u()),o("drag-start"),t&&t("drag-start",a.value),M_(D=>{if(s.size>1)return;const{clientX:O,clientY:R}=ad(D);let V=(O-g)/e.scaleRatio+b,F=(R-y)/e.scaleRatio+_;if(e.snapToGrid){let{left:$,top:J}=a.value;const te=V-$,Q=F-J;V=$+db(te,e.gridX),F=J+db(Q,e.gridY)}e.boundary&&([V,F]=c(V,F,x,T,k,C)),a.value.left=V,a.value.top=F,t&&t("drag",a.value),m.nextTick(()=>{const $=o("drag");e.snap&&($.diffX&&(a.value.left+=$.diffX),$.diffY&&(a.value.top+=$.diffY))})},D=>{e.checkCollision&&f()&&(a.value.top=_,a.value.left=b),s.clear(),r.value=!1,o("drag-end"),t&&t("drag-end",a.value)})}const u=()=>{let v=0,g=0;const{left:y,top:b,height:_,width:x,angle:T}=a.value,k=n.value.offsetParent||document.body,C=Ml(k,e.scaleRatio);if(T){const R=Ml(n.value,e.scaleRatio);v=R.left-Math.floor(y-(R.width-x)+C.left),g=R.top-Math.floor(b-(R.height-_)+C.top)}const D=C.width-x,O=C.height-_;return[v,D-v,g,O-g,C.width,C.height]},c=(v,g,y,b,_,x)=>(v=v<y?y:v,v=v>b?b:v,g=g<_?_:g,g=g>x?x:g,[v,g]),f=()=>{const v=n.value.offsetParent||document.body,g=Array.from(v.children).filter(y=>y!==n.value&&y.classList.contains("es-drager"));for(let y=0;y<g.length;y++){const b=g[y];if(Vhe(n.value,b,e.scaleRatio))return!0}},d=()=>{i.value=!1},{onKeydown:h,onKeyup:p}=$he(e,a,i,{getBoundary:u,fixBoundary:c,checkDragerCollision:f,emit:t});return m.watch(i,v=>{v?(t("focus",v),document.addEventListener("click",d,{once:!0})):t("blur",v),!e.disabledKeyEvent&&(v?(document.addEventListener("keydown",h),document.addEventListener("keyup",p)):(document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)))}),m.onMounted(()=>{if(n.value){if(!a.value.width&&!a.value.height){const{width:v,height:g}=Ml(n.value,e.scaleRatio);a.value={...a.value,width:v+2,height:g+2}}if(n.value.addEventListener("mousedown",l),n.value.addEventListener("touchstart",l,{passive:!0}),e.type==="text"){const v=window.getComputedStyle(n.value);a.value.height=parseInt(v.fontSize)}}}),m.onBeforeUnmount(()=>{document.removeEventListener("click",d),document.removeEventListener("keydown",h),document.removeEventListener("keyup",p)}),{isMousedown:r,selected:i,dragData:a,getBoundary:u,checkDragerCollision:f}}const Ghe=n=>(m.pushScopeId("data-v-1b6d4877"),n=n(),m.popScopeId(),n),Uhe=Ghe(()=>m.createElementVNode("div",{class:"es-drager-rotate-handle"},[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[m.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)),Whe=m.defineComponent({__name:"rotate",props:{modelValue:{type:Number,default:0},element:{type:Object}},emits:["update:modelValue","rotate","rotate-start","rotate-end"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(null),a=m.computed({get:()=>t.modelValue,set:s=>{r("update:modelValue",s)}});function o(s){if(!t.element)return console.warn("[es-drager] rotate component need drag element property");s.stopPropagation();const{width:l,height:u,left:c,top:f}=t.element.getBoundingClientRect(),d=c+l/2,h=f+u/2;r("rotate-start",a.value),M_(p=>{const{clientX:v,clientY:g}=ad(p),y=d-v,b=h-g,_=Math.atan2(b,y)*180/Math.PI-90;a.value=(_+360)%360,r("rotate",a.value)},()=>{r("rotate-end",a.value)})}return(s,l)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"rotateRef",ref:i,class:"es-drager-rotate",onMousedown:m.withModifiers(o,["stop"]),onTouchstartPassive:o},[m.renderSlot(s.$slots,"default",{},()=>[Uhe],!0)],544))}}),rH=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},jhe=rH(Whe,[["__scopeId","data-v-1b6d4877"]]),qhe=n=>(m.pushScopeId("data-v-68f41cf2"),n=n(),m.popScopeId(),n),Khe=qhe(()=>m.createElementVNode("div",{class:"es-drager-skew-handle"},[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},[m.createElementVNode("path",{fill:"currentColor",d:"M870.679273 271.378618L520.946036 65.489455a16.384 16.384 0 0 0-16.644654 0L154.568145 271.378618a16.290909 16.290909 0 0 0 0 28.094837l349.733237 205.889163a16.384 16.384 0 0 0 16.644654 0L870.679273 299.473455a16.290909 16.290909 0 0 0 0-28.094837zM512.623709 452.673164L228.528873 285.426036l284.094836-167.247127 284.094836 167.247127z m-22.574545 71.68L135.521745 322.615855a16.346764 16.346764 0 0 0-24.482909 14.270836l2.485528 405.820509a16.309527 16.309527 0 0 0 8.257163 14.075345l354.518109 201.728a16.346764 16.346764 0 0 0 24.482909-14.270836l-2.485527-405.820509a16.300218 16.300218 0 0 0-8.247854-14.093964z m-326.888728 198.842181l-2.020072-328.927418 287.529891 163.607273 2.020072 328.936727z m725.336437-400.607418L533.969455 524.325236a16.300218 16.300218 0 0 0-8.247855 14.066037l-2.485527 405.820509a16.365382 16.365382 0 0 0 24.4736 14.270836l354.546036-201.728a16.309527 16.309527 0 0 0 8.257164-14.075345l2.485527-405.820509a16.374691 16.374691 0 0 0-24.501527-14.270837z m-41.890909 373.462109L605.016436 838.683927v-57.902545l241.626764-142.671127v57.902545z m0-98.434327L605.016436 740.2496v-57.911855l241.626764-142.63389v57.911854z m0-98.443636L605.016436 641.833891v-57.902546l241.626764-142.63389v57.902545z"})])],-1)),Yhe=m.defineComponent({__name:"skew",props:{modelValue:{type:Array,default:()=>[0,0]},element:{type:Object}},emits:["update:modelValue","skew","skew-start","skew-end"],setup(n,{emit:e}){const t=n,r=e,i=m.ref(null),a=m.computed({get:()=>t.modelValue,set:s=>{r("update:modelValue",s)}});function o(s){if(!t.element)return console.warn("[es-drager] skew component need drag element property");s.stopPropagation();const{width:l,height:u}=t.element.getBoundingClientRect(),{clientX:c,clientY:f}=ad(s),[d,h]=a.value;r("skew-start",a.value),M_(p=>{const{clientX:v,clientY:g}=ad(p),y=c-v,b=f-g,_=d+y/l*45,x=h+b/u*45;a.value=[+_.toFixed(2),+x.toFixed(2)],r("skew",a.value)},()=>{r("skew-end",a.value)})}return(s,l)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"skewRef",ref:i,class:"es-drager-skew",onMousedown:o,onTouchstartPassive:o},[m.renderSlot(s.$slots,"default",{},()=>[Khe],!0)],544))}}),Xhe=rH(Yhe,[["__scopeId","data-v-68f41cf2"]]),Zhe=["data-side","onMousedown","onTouchstartPassive"],Jhe=m.createElementVNode("div",{class:"es-drager-dot-handle"},null,-1),Ap=m.defineComponent({__name:"drager",props:Ahe,emits:["change","drag","drag-start","drag-end","resize","resize-start","resize-end","rotate","rotate-start","rotate-end","skew","skew-start","skew-end","focus","blur"],setup(n,{emit:e}){const t=n,r=e,i=(x,...T)=>{r(x,...T)},a=m.ref(null),{selected:o,dragData:s,isMousedown:l,getBoundary:u,checkDragerCollision:c}=Hhe(a,t,i),f=m.ref(JL(0,t.resizeList)),d=m.computed(()=>t.resizable&&!t.disabled),h=m.computed(()=>t.rotatable&&!t.disabled&&o.value),p=m.computed(()=>t.skewable&&!t.disabled&&o.value),v=m.computed(()=>t.type!="text"?f.value:f.value.filter(x=>!["top","bottom"].includes(x.side))),g=m.computed(()=>{const{width:x,height:T,left:k,top:C,angle:D,skew:O}=s.value,R={};x&&(R.width=zy(x)),T&&(t.type==="text"?R.fontSize=T+"px":R.height=zy(T));let V=[`translateX(${zy(k)})`,`translateY(${zy(C)})`,`rotate(${D}deg)`];if(O&&O.length){let F=`skewX(${O[0]}deg)`;F+=` skewY(${O[1]??0}deg)`,V.push(F)}return{...R,zIndex:t.zIndex,transform:V.join(" "),"--es-drager-color":t.color}});function y(x){a.value||(a.value=x.$el||x)}function b(x){f.value=JL(x,t.resizeList),i("rotate-end",s.value)}function _(x,T){if(t.disabled)return;T.stopPropagation();const{clientX:k,clientY:C}=ad(T),D=k,O=C,{width:R,height:V,left:F,top:$}=s.value,J=F+R/2,te=$+V/2,Q={width:R,height:V,centerX:J,centerY:te,rotateAngle:s.value.angle},ne=x.side;let{minWidth:ee,minHeight:de,aspectRatio:ke,equalProportion:Ee}=t;i("resize-start",s.value,ne),t.boundary&&u(),["text","image"].includes(t.type)&&ne.includes("-")&&(ke=Q.width/Q.height),M_(xe=>{const{clientX:De,clientY:ze}=ad(xe);let We=(De-D)/t.scaleRatio,tt=(ze-O)/t.scaleRatio;t.snapToGrid&&(We=db(We,t.gridX),tt=db(tt,t.gridY));const ht=Math.atan2(tt,We),we=Rhe(We,tt),_e=xe.shiftKey,me=ht-uN(Q.rotateAngle),ge=we*Math.cos(me),ve=we*Math.sin(me),ye=(Ee||_e)&&!ke?Q.width/Q.height:ke,{position:{centerX:le,centerY:Se},size:{width:Me,height:Pe}}=Lhe(ne,{...Q,rotateAngle:Q.rotateAngle},ge,ve,ye,ee,de),Fe=Phe({centerX:le,centerY:Se,width:Me,height:Pe,angle:s.value.angle});let Ve={...s.value,...Bhe(Fe,le,Se)};t.maxWidth>0&&(Ve.width=Math.min(Ve.width,t.maxWidth)),t.maxHeight>0&&(Ve.height=Math.min(Ve.height,t.maxHeight)),s.value=Ve,i("resize",s.value,ne)},()=>{t.checkCollision&&c()&&(s.value={...s.value,width:R,height:V,left:F,top:$}),i("resize-end",s.value,ne)})}return m.watch(()=>[t.width,t.height,t.left,t.top,t.angle],([x,T,k,C,D],[O,R,V,F,$])=>{x!==O&&(s.value.width=x),T!==R&&(s.value.height=T),k!==V&&(s.value.left=k),C!==F&&(s.value.top=C),D!==$&&(s.value.angle=D)}),m.watch(()=>s.value,x=>{r("change",{...x})},{deep:!0}),m.watch(()=>t.skew,(x,T)=>{s.value.skew=x??[]},{deep:!0}),m.watch(()=>t.selected,x=>{o.value=x},{immediate:!0}),(x,T)=>(m.openBlock(),m.createBlock(m.resolveDynamicComponent(x.tag),{ref:y,class:m.normalizeClass(["es-drager",`es-drager-${x.type}`,{disabled:x.disabled,dragging:m.unref(l),selected:m.unref(o),border:x.border}]),style:m.normalizeStyle(g.value),onClick:T[7]||(T[7]=m.withModifiers(()=>{},["stop"])),onMousedown:T[8]||(T[8]=m.withModifiers(()=>{},["stop"]))},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"default"),d.value?(m.openBlock(!0),m.createElementBlock(m.Fragment,{key:0},m.renderList(v.value,(k,C)=>(m.openBlock(),m.createElementBlock("div",{key:C,class:"es-drager-dot","data-side":k.side,style:m.normalizeStyle({...k}),onMousedown:D=>_(k,D),onTouchstartPassive:D=>_(k,D)},[m.renderSlot(x.$slots,"resize",m.normalizeProps(m.guardReactiveProps({side:k.side})),()=>[Jhe])],44,Zhe))),128)):m.createCommentVNode("",!0),h.value?(m.openBlock(),m.createBlock(jhe,{key:1,modelValue:m.unref(s).angle,"onUpdate:modelValue":T[0]||(T[0]=k=>m.unref(s).angle=k),element:a.value,onRotate:T[1]||(T[1]=k=>i("rotate",m.unref(s))),onRotateStart:T[2]||(T[2]=k=>i("rotate-start",m.unref(s))),onRotateEnd:b},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"rotate")]),_:3},8,["modelValue","element"])):m.createCommentVNode("",!0),p.value?(m.openBlock(),m.createBlock(Xhe,{key:2,modelValue:m.unref(s).skew,"onUpdate:modelValue":T[3]||(T[3]=k=>m.unref(s).skew=k),element:a.value,onSkew:T[4]||(T[4]=k=>i("skew",m.unref(s))),onSkewStart:T[5]||(T[5]=k=>i("skew-start",m.unref(s))),onSkewEnd:T[6]||(T[6]=k=>i("skew-end",m.unref(s)))},{default:m.withCtx(()=>[m.renderSlot(x.$slots,"skew")]),_:3},8,["modelValue","element"])):m.createCommentVNode("",!0)]),_:3},40,["class","style"]))}}),Qhe=n=>{n.component("es-drager",Ap)};Ap.install=Qhe;function iH(n,e,t){let r={};if(!n||!e)return r;const i=["pie","ring","radar"];e.titleText&&e.titleText!==""&&(r.title={},r.title.text=e.titleText,r.title.left=e.titleleft??"left");let a=[];function o(){r.legend={},r.legend.show=!!e.legend,r.legend[e.legendlocation]=10,r.legend.left=e.legendleft,r.legend.orient=e.legendorient,r.legend.data=[],a=n.legends,r.legend.data=n.legends}o();function s(){if(i.includes(e.seriesType)||(r.yAxis={type:"value"},r.xAxis={},r.xAxis.type="category",r.xAxis.data=n.labels),r.series=[],i.includes(e.seriesType))e.seriesType==="pie"&&r.series.push({name:"饼图",type:e.seriesType,data:n.labels.map((u,c)=>({value:n.series[0][c],name:u}))}),e.seriesType==="ring"&&r.series.push({name:"环形图",type:"pie",radius:["40%","70%"],itemStyle:{borderRadius:10,borderColor:"#fff",borderWidth:2},data:n.labels.map((u,c)=>({value:n.series[0][c],name:u}))}),e.seriesType==="radar"&&(r.series.push({name:"雷达图",type:e.seriesType,data:n.legends.map((u,c)=>({value:n.series[c],name:u}))}),r.radar={indicator:n.labels.map(u=>({name:u}))});else for(let u=0;u<a.length;u++)r.series.push({name:r.legend.data[u],type:e.seriesType,data:n.series[u]}),e.seriesType==="smooth"&&(r.series[u].type="line",r.series[u].smooth=!0),e.seriesType==="area"&&(r.series[u].type="line",r.series[u].areaStyle={});i.includes(e.seriesType)&&r.legend.data!==null&&delete r.legend.data}s(),r.grid={left:"3%",right:"4%",top:30,bottom:30,containLabel:!0},r?.legend?.show&&(r?.legend?.bottom?r.grid.bottom=60:r.grid.top=60);const l=t.echarts?.onSetOptions?.(n,e);return l!==null&&typeof l=="object"&&(r=l),JSON.parse(JSON.stringify(r))}var mC=function(n,e){return mC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},mC(n,e)};function Ie(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");mC(n,e);function t(){this.constructor=n}n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var epe=(function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n})(),tpe=(function(){function n(){this.browser=new epe,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return n})(),En=new tpe;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(En.wxa=!0,En.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?En.worker=!0:!En.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(En.node=!0,En.svgSupported=!0):npe(navigator.userAgent,En);function npe(n,e){var t=e.browser,r=n.match(/Firefox\/([\d.]+)/),i=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),a=n.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(n);r&&(t.firefox=!0,t.version=r[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var cN=12,aH="sans-serif",Hl=cN+"px "+aH,rpe=20,ipe=100,ape="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function ope(n){var e={};if(typeof JSON>"u")return e;for(var t=0;t<n.length;t++){var r=String.fromCharCode(t+32),i=(n.charCodeAt(t)-rpe)/ipe;e[r]=i}return e}var spe=ope(ape),Xo={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var n,e;return function(t,r){if(!n){var i=Xo.createCanvas();n=i&&i.getContext("2d")}if(n)return e!==r&&(e=n.font=r||Hl),n.measureText(t);t=t||"",r=r||Hl;var a=/((?:\d+)?\.?\d*)px/.exec(r),o=a&&+a[1]||cN,s=0;if(r.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=spe[t[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(n,e,t){var r=new Image;return r.onload=e,r.onerror=t,r.src=n,r}},oH=qs(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,e){return n["[object "+e+"]"]=!0,n},{}),sH=qs(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,e){return n["[object "+e+"Array]"]=!0,n},{}),Np=Object.prototype.toString,A_=Array.prototype,lpe=A_.forEach,upe=A_.filter,fN=A_.slice,cpe=A_.map,t3=(function(){}).constructor,Fy=t3?t3.prototype:null,dN="__proto__",fpe=2311;function lH(){return fpe++}function jo(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];typeof console<"u"&&console.error.apply(console,n)}function Ht(n){if(n==null||typeof n!="object")return n;var e=n,t=Np.call(n);if(t==="[object Array]"){if(!kg(n)){e=[];for(var r=0,i=n.length;r<i;r++)e[r]=Ht(n[r])}}else if(sH[t]){if(!kg(n)){var a=n.constructor;if(a.from)e=a.from(n);else{e=new a(n.length);for(var r=0,i=n.length;r<i;r++)e[r]=n[r]}}}else if(!oH[t]&&!kg(n)&&!od(n)){e={};for(var o in n)n.hasOwnProperty(o)&&o!==dN&&(e[o]=Ht(n[o]))}return e}function hn(n,e,t){if(!Gt(e)||!Gt(n))return t?Ht(e):n;for(var r in e)if(e.hasOwnProperty(r)&&r!==dN){var i=n[r],a=e[r];Gt(a)&&Gt(i)&&!Ze(a)&&!Ze(i)&&!od(a)&&!od(i)&&!n3(a)&&!n3(i)&&!kg(a)&&!kg(i)?hn(i,a,t):(t||!(r in n))&&(n[r]=Ht(e[r]))}return n}function hN(n,e){for(var t=n[0],r=1,i=n.length;r<i;r++)t=hn(t,n[r],e);return t}function Ke(n,e){if(Object.assign)Object.assign(n,e);else for(var t in e)e.hasOwnProperty(t)&&t!==dN&&(n[t]=e[t]);return n}function qt(n,e,t){for(var r=Mn(e),i=0,a=r.length;i<a;i++){var o=r[i];(t?e[o]!=null:n[o]==null)&&(n[o]=e[o])}return n}function dn(n,e){if(n){if(n.indexOf)return n.indexOf(e);for(var t=0,r=n.length;t<r;t++)if(n[t]===e)return t}return-1}function dpe(n,e){var t=n.prototype;function r(){}r.prototype=e.prototype,n.prototype=new r;for(var i in t)t.hasOwnProperty(i)&&(n.prototype[i]=t[i]);n.prototype.constructor=n,n.superClass=e}function Zr(n,e,t){if(n="prototype"in n?n.prototype:n,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(e),i=0;i<r.length;i++){var a=r[i];a!=="constructor"&&(t?e[a]!=null:n[a]==null)&&(n[a]=e[a])}else qt(n,e,t)}function Zi(n){return!n||typeof n=="string"?!1:typeof n.length=="number"}function U(n,e,t){if(n&&e)if(n.forEach&&n.forEach===lpe)n.forEach(e,t);else if(n.length===+n.length)for(var r=0,i=n.length;r<i;r++)e.call(t,n[r],r,n);else for(var a in n)n.hasOwnProperty(a)&&e.call(t,n[a],a,n)}function et(n,e,t){if(!n)return[];if(!e)return pN(n);if(n.map&&n.map===cpe)return n.map(e,t);for(var r=[],i=0,a=n.length;i<a;i++)r.push(e.call(t,n[i],i,n));return r}function qs(n,e,t,r){if(n&&e){for(var i=0,a=n.length;i<a;i++)t=e.call(r,t,n[i],i,n);return t}}function Kn(n,e,t){if(!n)return[];if(!e)return pN(n);if(n.filter&&n.filter===upe)return n.filter(e,t);for(var r=[],i=0,a=n.length;i<a;i++)e.call(t,n[i],i,n)&&r.push(n[i]);return r}function Sd(n,e,t){if(n&&e){for(var r=0,i=n.length;r<i;r++)if(e.call(t,n[r],r,n))return n[r]}}function Mn(n){if(!n)return[];if(Object.keys)return Object.keys(n);var e=[];for(var t in n)n.hasOwnProperty(t)&&e.push(t);return e}function hpe(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];return function(){return n.apply(e,t.concat(fN.call(arguments)))}}var mt=Fy&&Vt(Fy.bind)?Fy.call.bind(Fy.bind):hpe;function cn(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return n.apply(this,e.concat(fN.call(arguments)))}}function Ze(n){return Array.isArray?Array.isArray(n):Np.call(n)==="[object Array]"}function Vt(n){return typeof n=="function"}function gt(n){return typeof n=="string"}function hb(n){return Np.call(n)==="[object String]"}function Ln(n){return typeof n=="number"}function Gt(n){var e=typeof n;return e==="function"||!!n&&e==="object"}function n3(n){return!!oH[Np.call(n)]}function _a(n){return!!sH[Np.call(n)]}function od(n){return typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.ownerDocument=="object"}function N_(n){return n.colorStops!=null}function ppe(n){return n.image!=null}function uH(n){return Np.call(n)==="[object RegExp]"}function Ti(n){return n!==n}function ai(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=0,r=n.length;t<r;t++)if(n[t]!=null)return n[t]}function At(n,e){return n??e}function pa(n,e,t){return n??e??t}function pN(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return fN.apply(n,e)}function D_(n){if(typeof n=="number")return[n,n,n,n];var e=n.length;return e===2?[n[0],n[1],n[0],n[1]]:e===3?[n[0],n[1],n[2],n[1]]:n}function Et(n,e){if(!n)throw new Error(e)}function So(n){return n==null?null:typeof n.trim=="function"?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var cH="__ec_primitive__";function pb(n){n[cH]=!0}function kg(n){return n[cH]}var vpe=(function(){function n(){this.data={}}return n.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},n.prototype.has=function(e){return this.data.hasOwnProperty(e)},n.prototype.get=function(e){return this.data[e]},n.prototype.set=function(e,t){return this.data[e]=t,this},n.prototype.keys=function(){return Mn(this.data)},n.prototype.forEach=function(e){var t=this.data;for(var r in t)t.hasOwnProperty(r)&&e(t[r],r)},n})(),fH=typeof Map=="function";function gpe(){return fH?new Map:new vpe}var mpe=(function(){function n(e){var t=Ze(e);this.data=gpe();var r=this;e instanceof n?e.each(i):e&&U(e,i);function i(a,o){t?r.set(a,o):r.set(o,a)}}return n.prototype.hasKey=function(e){return this.data.has(e)},n.prototype.get=function(e){return this.data.get(e)},n.prototype.set=function(e,t){return this.data.set(e,t),t},n.prototype.each=function(e,t){this.data.forEach(function(r,i){e.call(t,r,i)})},n.prototype.keys=function(){var e=this.data.keys();return fH?Array.from(e):e},n.prototype.removeKey=function(e){this.data.delete(e)},n})();function Nt(n){return new mpe(n)}function um(n,e){for(var t=new n.constructor(n.length+e.length),r=0;r<n.length;r++)t[r]=n[r];for(var i=n.length,r=0;r<e.length;r++)t[r+i]=e[r];return t}function O_(n,e){var t;if(Object.create)t=Object.create(n);else{var r=function(){};r.prototype=n,t=new r}return e&&Ke(t,e),t}function dH(n){var e=n.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function kt(n,e){return n.hasOwnProperty(e)}function zr(){}var p1=180/Math.PI;function wd(n,e){return n==null&&(n=0),e==null&&(e=0),[n,e]}function ua(n,e){return n[0]=e[0],n[1]=e[1],n}function Rl(n){return[n[0],n[1]]}function vN(n,e,t){return n[0]=e,n[1]=t,n}function r3(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n}function yC(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n}function Mf(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n}function bC(n){return Math.sqrt(ype(n))}function ype(n){return n[0]*n[0]+n[1]*n[1]}function v1(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n}function Dp(n,e){var t=bC(e);return t===0?(n[0]=0,n[1]=0):(n[0]=e[0]/t,n[1]=e[1]/t),n}function xC(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}var Uu=xC;function bpe(n,e){return(n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1])}var Gf=bpe;function g1(n,e,t,r){return n[0]=e[0]+r*(t[0]-e[0]),n[1]=e[1]+r*(t[1]-e[1]),n}function Fr(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[2]*i+t[4],n[1]=t[1]*r+t[3]*i+t[5],n}function Wu(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n}function ju(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n}var Kd=(function(){function n(e,t){this.target=e,this.topTarget=t&&t.topTarget}return n})(),xpe=(function(){function n(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return n.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Kd(t,e),"dragstart",e.event))},n.prototype._drag=function(e){var t=this._draggingTarget;if(t){var r=e.offsetX,i=e.offsetY,a=r-this._x,o=i-this._y;this._x=r,this._y=i,t.drift(a,o,e),this.handler.dispatchToElement(new Kd(t,e),"drag",e.event);var s=this.handler.findHover(r,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Kd(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Kd(s,e),"dragenter",e.event))}},n.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Kd(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Kd(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},n})(),Oo=(function(){function n(e){e&&(this._$eventProcessor=e)}return n.prototype.on=function(e,t,r,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(i=r,r=t,t=null),!r||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===r)return this;var l={h:r,query:t,ctx:i||this,callAtLast:r.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},n.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},n.prototype.off=function(e,t){var r=this._$handlers;if(!r)return this;if(!e)return this._$handlers={},this;if(t){if(r[e]){for(var i=[],a=0,o=r[e].length;a<o;a++)r[e][a].h!==t&&i.push(r[e][a]);r[e]=i}r[e]&&r[e].length===0&&delete r[e]}else delete r[e];return this},n.prototype.trigger=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},n.prototype.triggerWithContext=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},n})(),_pe=Math.log(2);function _C(n,e,t,r,i,a){var o=r+"-"+i,s=n.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/_pe);return n[t][l]}for(var u=r|1<<t,c=t+1;r&1<<c;)c++;for(var f=0,d=0,h=0;d<s;d++){var p=1<<d;p&i||(f+=(h%2?-1:1)*n[t][d]*_C(n,e-1,c,u,i|p,a),h++)}return a[o]=f,f}function i3(n,e){var t=[[n[0],n[1],1,0,0,0,-e[0]*n[0],-e[0]*n[1]],[0,0,0,n[0],n[1],1,-e[1]*n[0],-e[1]*n[1]],[n[2],n[3],1,0,0,0,-e[2]*n[2],-e[2]*n[3]],[0,0,0,n[2],n[3],1,-e[3]*n[2],-e[3]*n[3]],[n[4],n[5],1,0,0,0,-e[4]*n[4],-e[4]*n[5]],[0,0,0,n[4],n[5],1,-e[5]*n[4],-e[5]*n[5]],[n[6],n[7],1,0,0,0,-e[6]*n[6],-e[6]*n[7]],[0,0,0,n[6],n[7],1,-e[7]*n[6],-e[7]*n[7]]],r={},i=_C(t,8,0,0,0,r);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*_C(t,7,o===0?1:0,1<<o,1<<s,r)/i*e[o];return function(l,u,c){var f=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/f,l[1]=(u*a[3]+c*a[4]+a[5])/f}}}var vb="___zrEVENTSAVED",Hw=[];function Spe(n,e,t,r,i){return SC(Hw,e,r,i,!0)&&SC(n,t,Hw[0],Hw[1])}function wpe(n,e){n&&t(n),e&&t(e);function t(r){var i=r[vb];i&&(i.clearMarkers&&i.clearMarkers(),delete r[vb])}}function SC(n,e,t,r,i){if(e.getBoundingClientRect&&En.domSupported&&!hH(e)){var a=e[vb]||(e[vb]={}),o=kpe(e,a),s=Tpe(o,a,i);if(s)return s(n,t,r),!0}return!1}function kpe(n,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var r=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",i[u]+":0",r[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),n.appendChild(o),t.push(o)}return e.clearMarkers=function(){U(t,function(c){c.parentNode&&c.parentNode.removeChild(c)})},t}function Tpe(n,e,t){for(var r=t?"invTrans":"trans",i=e[r],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=n[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&a&&d===a[f]&&h===a[f+1],s.push(n[u].offsetLeft,n[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[r]=t?i3(s,o):i3(o,s))}function hH(n){return n.nodeName.toUpperCase()==="CANVAS"}var Cpe=/([&<>"'])/g,Epe={"&":"&","<":"<",">":">",'"':""","'":"'"};function da(n){return n==null?"":(n+"").replace(Cpe,function(e,t){return Epe[t]})}var Mpe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gw=[],Ape=En.browser.firefox&&+En.browser.version.split(".")[0]<39;function wC(n,e,t,r){return t=t||{},r?a3(n,e,t):Ape&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):a3(n,e,t),t}function a3(n,e,t){if(En.domSupported&&n.getBoundingClientRect){var r=e.clientX,i=e.clientY;if(hH(n)){var a=n.getBoundingClientRect();t.zrX=r-a.left,t.zrY=i-a.top;return}else if(SC(Gw,n,r,i)){t.zrX=Gw[0],t.zrY=Gw[1];return}}t.zrX=t.zrY=0}function gN(n){return n||window.event}function fo(n,e,t){if(e=gN(e),e.zrX!=null)return e;var r=e.type,i=r&&r.indexOf("touch")>=0;if(i){var o=r!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&wC(n,o,e,t)}else{wC(n,e,e,t);var a=Npe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&Mpe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function Npe(n){var e=n.wheelDelta;if(e)return e;var t=n.deltaX,r=n.deltaY;if(t==null||r==null)return e;var i=Math.abs(r!==0?r:t),a=r>0?-1:r<0?1:t>0?-1:1;return 3*i*a}function kC(n,e,t,r){n.addEventListener(e,t,r)}function Dpe(n,e,t,r){n.removeEventListener(e,t,r)}var Gl=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function o3(n){return n.which===2||n.which===3}var Ope=(function(){function n(){this._track=[]}return n.prototype.recognize=function(e,t,r){return this._doTrack(e,t,r),this._recognize(e)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(e,t,r){var i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=wC(r,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},n.prototype._recognize=function(e){for(var t in Uw)if(Uw.hasOwnProperty(t)){var r=Uw[t](this._track,e);if(r)return r}},n})();function s3(n){var e=n[1][0]-n[0][0],t=n[1][1]-n[0][1];return Math.sqrt(e*e+t*t)}function Ipe(n){return[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]}var Uw={pinch:function(n,e){var t=n.length;if(t){var r=(n[t-1]||{}).points,i=(n[t-2]||{}).points||r;if(i&&i.length>1&&r&&r.length>1){var a=s3(r)/s3(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=Ipe(r);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:n[0].target,event:e}}}}};function Ci(){return[1,0,0,1,0,0]}function I_(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function R_(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n}function Vs(n,e,t){var r=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return n[0]=r,n[1]=i,n[2]=a,n[3]=o,n[4]=s,n[5]=l,n}function Ks(n,e,t){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4]+t[0],n[5]=e[5]+t[1],n}function Sc(n,e,t,r){r===void 0&&(r=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),f=Math.cos(t);return n[0]=i*f+s*c,n[1]=-i*c+s*f,n[2]=a*f+l*c,n[3]=-a*c+f*l,n[4]=f*(o-r[0])+c*(u-r[1])+r[0],n[5]=f*(u-r[1])-c*(o-r[0])+r[1],n}function mN(n,e,t){var r=t[0],i=t[1];return n[0]=e[0]*r,n[1]=e[1]*i,n[2]=e[2]*r,n[3]=e[3]*i,n[4]=e[4]*r,n[5]=e[5]*i,n}function Zo(n,e){var t=e[0],r=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*r;return l?(l=1/l,n[0]=o*l,n[1]=-a*l,n[2]=-r*l,n[3]=t*l,n[4]=(r*s-o*i)*l,n[5]=(a*i-t*s)*l,n):null}function Rpe(n){var e=Ci();return R_(e,n),e}var jt=(function(){function n(e,t){this.x=e||0,this.y=t||0}return n.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(e,t){return this.x=e,this.y=t,this},n.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},n.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},n.prototype.scale=function(e){this.x*=e,this.y*=e},n.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},n.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},n.prototype.dot=function(e){return this.x*e.x+this.y*e.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},n.prototype.distance=function(e){var t=this.x-e.x,r=this.y-e.y;return Math.sqrt(t*t+r*r)},n.prototype.distanceSquare=function(e){var t=this.x-e.x,r=this.y-e.y;return t*t+r*r},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(e){if(e){var t=this.x,r=this.y;return this.x=e[0]*t+e[2]*r+e[4],this.y=e[1]*t+e[3]*r+e[5],this}},n.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},n.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},n.set=function(e,t,r){e.x=t,e.y=r},n.copy=function(e,t){e.x=t.x,e.y=t.y},n.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},n.lenSquare=function(e){return e.x*e.x+e.y*e.y},n.dot=function(e,t){return e.x*t.x+e.y*t.y},n.add=function(e,t,r){e.x=t.x+r.x,e.y=t.y+r.y},n.sub=function(e,t,r){e.x=t.x-r.x,e.y=t.y-r.y},n.scale=function(e,t,r){e.x=t.x*r,e.y=t.y*r},n.scaleAndAdd=function(e,t,r,i){e.x=t.x+r.x*i,e.y=t.y+r.y*i},n.lerp=function(e,t,r,i){var a=1-i;e.x=a*t.x+i*r.x,e.y=a*t.y+i*r.y},n})(),Af=Math.min,Rh=Math.max,TC=Math.abs,l3=["x","y"],Lpe=["width","height"],Lc=new jt,Pc=new jt,Bc=new jt,Vc=new jt,Ga=pH(),Jv=Ga.minTv,CC=Ga.maxTv,Tg=[0,0],Kt=(function(){function n(e,t,r,i){n.set(this,e,t,r,i)}return n.set=function(e,t,r,i,a){return i<0&&(t=t+i,i=-i),a<0&&(r=r+a,a=-a),e.x=t,e.y=r,e.width=i,e.height=a,e},n.prototype.union=function(e){var t=Af(e.x,this.x),r=Af(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Rh(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Rh(e.y+e.height,this.y+this.height)-r:this.height=e.height,this.x=t,this.y=r},n.prototype.applyTransform=function(e){n.applyTransform(this,this,e)},n.prototype.calculateTransform=function(e){var t=this,r=e.width/t.width,i=e.height/t.height,a=Ci();return Ks(a,a,[-t.x,-t.y]),mN(a,a,[r,i]),Ks(a,a,[e.x,e.y]),a},n.prototype.intersect=function(e,t,r){return n.intersect(this,e,t,r)},n.intersect=function(e,t,r,i){r&&jt.set(r,0,0);var a=i&&i.outIntersectRect||null,o=i&&i.clamp;if(a&&(a.x=a.y=a.width=a.height=NaN),!e||!t)return!1;e instanceof n||(e=n.set(Ppe,e.x,e.y,e.width,e.height)),t instanceof n||(t=n.set(Bpe,t.x,t.y,t.width,t.height));var s=!!r;Ga.reset(i,s);var l=Ga.touchThreshold,u=e.x+l,c=e.x+e.width-l,f=e.y+l,d=e.y+e.height-l,h=t.x+l,p=t.x+t.width-l,v=t.y+l,g=t.y+t.height-l;if(u>c||f>d||h>p||v>g)return!1;var y=!(c<h||p<u||d<v||g<f);return(s||a)&&(Tg[0]=1/0,Tg[1]=0,u3(u,c,h,p,0,s,a,o),u3(f,d,v,g,1,s,a,o),s&&jt.copy(r,y?Ga.useDir?Ga.dirMinTv:Jv:CC)),y},n.contain=function(e,t,r){return t>=e.x&&t<=e.x+e.width&&r>=e.y&&r<=e.y+e.height},n.prototype.contain=function(e,t){return n.contain(this,e,t)},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(e){n.copy(this,e)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(e){return new n(e.x,e.y,e.width,e.height)},n.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},n.applyTransform=function(e,t,r){if(!r){e!==t&&n.copy(e,t);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var i=r[0],a=r[3],o=r[4],s=r[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Lc.x=Bc.x=t.x,Lc.y=Vc.y=t.y,Pc.x=Vc.x=t.x+t.width,Pc.y=Bc.y=t.y+t.height,Lc.transform(r),Vc.transform(r),Pc.transform(r),Bc.transform(r),e.x=Af(Lc.x,Pc.x,Bc.x,Vc.x),e.y=Af(Lc.y,Pc.y,Bc.y,Vc.y);var l=Rh(Lc.x,Pc.x,Bc.x,Vc.x),u=Rh(Lc.y,Pc.y,Bc.y,Vc.y);e.width=l-e.x,e.height=u-e.y},n})(),Ppe=new Kt(0,0,0,0),Bpe=new Kt(0,0,0,0);function u3(n,e,t,r,i,a,o,s){var l=TC(e-t),u=TC(r-n),c=Af(l,u),f=l3[i],d=l3[1-i],h=Lpe[i];e<t||r<n?l<u?(a&&(CC[f]=-l),s&&(o[f]=e,o[h]=0)):(a&&(CC[f]=u),s&&(o[f]=n,o[h]=0)):(o&&(o[f]=Rh(n,t),o[h]=Af(e,r)-o[f]),a&&(c<Tg[0]||Ga.useDir)&&(Tg[0]=Af(c,Tg[0]),(l<u||!Ga.bidirectional)&&(Jv[f]=l,Jv[d]=0,Ga.useDir&&Ga.calcDirMTV()),(l>=u||!Ga.bidirectional)&&(Jv[f]=-u,Jv[d]=0,Ga.useDir&&Ga.calcDirMTV())))}function pH(){var n=0,e=new jt,t=new jt,r={minTv:new jt,maxTv:new jt,useDir:!1,dirMinTv:new jt,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(a,o){r.touchThreshold=0,a&&a.touchThreshold!=null&&(r.touchThreshold=Rh(0,a.touchThreshold)),r.negativeSize=!1,o&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,a&&a.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),t.copy(r.minTv),n=a.direction,r.bidirectional=a.bidirectional==null||!!a.bidirectional,r.bidirectional||e.set(Math.cos(n),Math.sin(n))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,l=Math.sin(n),u=Math.cos(n),c=l*a.y+u*a.x;if(i(c)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(t.x=s*u/c,t.y=s*l/c,i(t.x)&&i(t.y)){o.set(0,0);return}(r.bidirectional||e.dot(t)>0)&&t.len()<o.len()&&o.copy(t)}};function i(a){return TC(a)<1e-10}return r}var vH="silent";function Vpe(n,e,t){return{type:n,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:zpe}}function zpe(){Gl(this.event)}var Fpe=(function(n){Ie(e,n);function e(){var t=n!==null&&n.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e})(Oo),hv=(function(){function n(e,t){this.x=e,this.y=t}return n})(),$pe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ww=new Kt(0,0,0,0),gH=(function(n){Ie(e,n);function e(t,r,i,a,o){var s=n.call(this)||this;return s._hovered=new hv(0,0),s.storage=t,s.painter=r,s.painterRoot=a,s._pointerSize=o,i=i||new Fpe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new xpe(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(U($pe,function(r){t.on&&t.on(r,this[r],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var r=t.zrX,i=t.zrY,a=mH(this,r,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new hv(r,i):this.findHover(r,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var r=t.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new hv(0,0)},e.prototype.dispatch=function(t,r){var i=this[t];i&&i.call(this,r)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var r=this.proxy;r.setCursor&&r.setCursor(t)},e.prototype.dispatchToElement=function(t,r,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+r,s=Vpe(r,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(r,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(r,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(r,s)}))}},e.prototype.findHover=function(t,r,i){var a=this.storage.getDisplayList(),o=new hv(t,r);if(c3(a,o,t,r,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Kt(t-u,r-u,l,l),f=a.length-1;f>=0;f--){var d=a[f];d!==i&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Ww.copy(d.getBoundingRect()),d.transform&&Ww.applyTransform(d.transform),Ww.intersect(c)&&s.push(d))}if(s.length)for(var h=4,p=Math.PI/12,v=Math.PI*2,g=0;g<u;g+=h)for(var y=0;y<v;y+=p){var b=t+g*Math.cos(y),_=r+g*Math.sin(y);if(c3(s,o,b,_,i),o.target)return o}}return o},e.prototype.processGesture=function(t,r){this._gestureMgr||(this._gestureMgr=new Ope);var i=this._gestureMgr;r==="start"&&i.clear();var a=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(r==="end"&&i.clear(),a){var o=a.type;t.gestureEvent=o;var s=new hv;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e})(Oo);U(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){gH.prototype[n]=function(e){var t=e.zrX,r=e.zrY,i=mH(this,t,r),a,o;if((n!=="mouseup"||!i)&&(a=this.findHover(t,r),o=a.target),n==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(n==="mouseup")this._upEl=o;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||Uu(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,n,e)}});function Hpe(n,e,t){if(n[n.rectHover?"rectContain":"contain"](e,t)){for(var r=n,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(e,t))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return i?vH:!0}return!1}function c3(n,e,t,r,i){for(var a=n.length-1;a>=0;a--){var o=n[a],s=void 0;if(o!==i&&!o.ignore&&(s=Hpe(o,t,r))&&(!e.topTarget&&(e.topTarget=o),s!==vH)){e.target=o;break}}}function mH(n,e,t){var r=n.painter;return e<0||e>r.getWidth()||t<0||t>r.getHeight()}var yH=32,pv=7;function Gpe(n){for(var e=0;n>=yH;)e|=n&1,n>>=1;return n+e}function f3(n,e,t,r){var i=e+1;if(i===t)return 1;if(r(n[i++],n[e])<0){for(;i<t&&r(n[i],n[i-1])<0;)i++;Upe(n,e,i)}else for(;i<t&&r(n[i],n[i-1])>=0;)i++;return i-e}function Upe(n,e,t){for(t--;e<t;){var r=n[e];n[e++]=n[t],n[t--]=r}}function d3(n,e,t,r,i){for(r===e&&r++;r<t;r++){for(var a=n[r],o=e,s=r,l;o<s;)l=o+s>>>1,i(a,n[l])<0?s=l:o=l+1;var u=r-o;switch(u){case 3:n[o+3]=n[o+2];case 2:n[o+2]=n[o+1];case 1:n[o+1]=n[o];break;default:for(;u>0;)n[o+u]=n[o+u-1],u--}n[o]=a}}function jw(n,e,t,r,i,a){var o=0,s=0,l=1;if(a(n,e[t+i])>0){for(s=r-i;l<s&&a(n,e[t+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(n,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])>0?o=c+1:l=c}return l}function qw(n,e,t,r,i,a){var o=0,s=0,l=1;if(a(n,e[t+i])<0){for(s=i+1;l<s&&a(n,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=r-i;l<s&&a(n,e[t+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(n,e[t+c])<0?l=c:o=c+1}return l}function Wpe(n,e){var t=pv,r,i,a=0,o=[];r=[],i=[];function s(h,p){r[a]=h,i[a]=p,a+=1}function l(){for(;a>1;){var h=a-2;if(h>=1&&i[h-1]<=i[h]+i[h+1]||h>=2&&i[h-2]<=i[h]+i[h-1])i[h-1]<i[h+1]&&h--;else if(i[h]>i[h+1])break;c(h)}}function u(){for(;a>1;){var h=a-2;h>0&&i[h-1]<i[h+1]&&h--,c(h)}}function c(h){var p=r[h],v=i[h],g=r[h+1],y=i[h+1];i[h]=v+y,h===a-3&&(r[h+1]=r[h+2],i[h+1]=i[h+2]),a--;var b=qw(n[g],n,p,v,0,e);p+=b,v-=b,v!==0&&(y=jw(n[p+v-1],n,g,y,y-1,e),y!==0&&(v<=y?f(p,v,g,y):d(p,v,g,y)))}function f(h,p,v,g){var y=0;for(y=0;y<p;y++)o[y]=n[h+y];var b=0,_=v,x=h;if(n[x++]=n[_++],--g===0){for(y=0;y<p;y++)n[x+y]=o[b+y];return}if(p===1){for(y=0;y<g;y++)n[x+y]=n[_+y];n[x+g]=o[b];return}for(var T=t,k,C,D;;){k=0,C=0,D=!1;do if(e(n[_],o[b])<0){if(n[x++]=n[_++],C++,k=0,--g===0){D=!0;break}}else if(n[x++]=o[b++],k++,C=0,--p===1){D=!0;break}while((k|C)<T);if(D)break;do{if(k=qw(n[_],o,b,p,0,e),k!==0){for(y=0;y<k;y++)n[x+y]=o[b+y];if(x+=k,b+=k,p-=k,p<=1){D=!0;break}}if(n[x++]=n[_++],--g===0){D=!0;break}if(C=jw(o[b],n,_,g,0,e),C!==0){for(y=0;y<C;y++)n[x+y]=n[_+y];if(x+=C,_+=C,g-=C,g===0){D=!0;break}}if(n[x++]=o[b++],--p===1){D=!0;break}T--}while(k>=pv||C>=pv);if(D)break;T<0&&(T=0),T+=2}if(t=T,t<1&&(t=1),p===1){for(y=0;y<g;y++)n[x+y]=n[_+y];n[x+g]=o[b]}else{if(p===0)throw new Error;for(y=0;y<p;y++)n[x+y]=o[b+y]}}function d(h,p,v,g){var y=0;for(y=0;y<g;y++)o[y]=n[v+y];var b=h+p-1,_=g-1,x=v+g-1,T=0,k=0;if(n[x--]=n[b--],--p===0){for(T=x-(g-1),y=0;y<g;y++)n[T+y]=o[y];return}if(g===1){for(x-=p,b-=p,k=x+1,T=b+1,y=p-1;y>=0;y--)n[k+y]=n[T+y];n[x]=o[_];return}for(var C=t;;){var D=0,O=0,R=!1;do if(e(o[_],n[b])<0){if(n[x--]=n[b--],D++,O=0,--p===0){R=!0;break}}else if(n[x--]=o[_--],O++,D=0,--g===1){R=!0;break}while((D|O)<C);if(R)break;do{if(D=p-qw(o[_],n,h,p,p-1,e),D!==0){for(x-=D,b-=D,p-=D,k=x+1,T=b+1,y=D-1;y>=0;y--)n[k+y]=n[T+y];if(p===0){R=!0;break}}if(n[x--]=o[_--],--g===1){R=!0;break}if(O=g-jw(n[b],o,0,g,g-1,e),O!==0){for(x-=O,_-=O,g-=O,k=x+1,T=_+1,y=0;y<O;y++)n[k+y]=o[T+y];if(g<=1){R=!0;break}}if(n[x--]=n[b--],--p===0){R=!0;break}C--}while(D>=pv||O>=pv);if(R)break;C<0&&(C=0),C+=2}if(t=C,t<1&&(t=1),g===1){for(x-=p,b-=p,k=x+1,T=b+1,y=p-1;y>=0;y--)n[k+y]=n[T+y];n[x]=o[_]}else{if(g===0)throw new Error;for(T=x-(g-1),y=0;y<g;y++)n[T+y]=o[y]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function m1(n,e,t,r){t||(t=0),r||(r=n.length);var i=r-t;if(!(i<2)){var a=0;if(i<yH){a=f3(n,t,r,e),d3(n,t,r,t+a,e);return}var o=Wpe(n,e),s=Gpe(i);do{if(a=f3(n,t,r,e),a<s){var l=i;l>s&&(l=s),d3(n,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var ja=1,Qv=2,Eh=4,h3=!1;function Kw(){h3||(h3=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function p3(n,e){return n.zlevel===e.zlevel?n.z===e.z?n.z2-e.z2:n.z-e.z:n.zlevel-e.zlevel}var jpe=(function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=p3}return n.prototype.traverse=function(e,t){for(var r=0;r<this._roots.length;r++)this._roots[r].traverse(e,t)},n.prototype.getDisplayList=function(e,t){t=t||!1;var r=this._displayList;return(e||!r.length)&&this.updateDisplayList(t),r},n.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,r=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);r.length=this._displayListLen,m1(r,p3)},n.prototype._updateAndAddDisplayable=function(e,t,r){if(!(e.ignore&&!r)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath(),a=t&&t.length,o=0,s=e.__clipPaths;if(!e.ignoreClip&&(a||i)){if(s||(s=e.__clipPaths=[]),a)for(var l=0;l<t.length;l++)s[o++]=t[l];for(var u=i,c=e;u;)u.parent=c,u.updateTransform(),s[o++]=u,c=u,u=u.getClipPath()}if(s&&(s.length=o),e.childrenRef){for(var f=e.childrenRef(),d=0;d<f.length;d++){var h=f[d];e.__dirty&&(h.__dirty|=ja),this._updateAndAddDisplayable(h,s,r)}e.__dirty=0}else{var p=e;isNaN(p.z)&&(Kw(),p.z=0),isNaN(p.z2)&&(Kw(),p.z2=0),isNaN(p.zlevel)&&(Kw(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var v=e.getDecalElement&&e.getDecalElement();v&&this._updateAndAddDisplayable(v,s,r);var g=e.getTextGuideLine();g&&this._updateAndAddDisplayable(g,s,r);var y=e.getTextContent();y&&this._updateAndAddDisplayable(y,s,r)}},n.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},n.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,r=e.length;t<r;t++)this.delRoot(e[t]);return}var i=dn(this._roots,e);i>=0&&this._roots.splice(i,1)},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n})(),gb;gb=En.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};var Cg={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)))},elasticOut:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*n)*Math.sin((n-e)*(2*Math.PI)/r)+1)},elasticInOut:function(n){var e,t=.1,r=.4;return n===0?0:n===1?1:(!t||t<1?(t=1,e=r/4):e=r*Math.asin(1/t)/(2*Math.PI),(n*=2)<1?-.5*(t*Math.pow(2,10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)):t*Math.pow(2,-10*(n-=1))*Math.sin((n-e)*(2*Math.PI)/r)*.5+1)},backIn:function(n){var e=1.70158;return n*n*((e+1)*n-e)},backOut:function(n){var e=1.70158;return--n*n*((e+1)*n+e)+1},backInOut:function(n){var e=2.5949095;return(n*=2)<1?.5*(n*n*((e+1)*n-e)):.5*((n-=2)*n*((e+1)*n+e)+2)},bounceIn:function(n){return 1-Cg.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?Cg.bounceIn(n*2)*.5:Cg.bounceOut(n*2-1)*.5+.5}},$y=Math.pow,nc=Math.sqrt,mb=1e-8,bH=1e-4,v3=nc(3),Hy=1/3,Es=wd(),mo=wd(),Gh=wd();function qu(n){return n>-mb&&n<mb}function xH(n){return n>mb||n<-mb}function fi(n,e,t,r,i){var a=1-i;return a*a*(a*n+3*i*e)+i*i*(i*r+3*a*t)}function g3(n,e,t,r,i){var a=1-i;return 3*(((e-n)*a+2*(t-e)*i)*a+(r-t)*i*i)}function yb(n,e,t,r,i,a){var o=r+3*(e-t)-n,s=3*(t-e*2+n),l=3*(e-n),u=n-i,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(qu(c)&&qu(f))if(qu(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[h++]=p)}else{var v=f*f-4*c*d;if(qu(v)){var g=f/c,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(a[h++]=p),y>=0&&y<=1&&(a[h++]=y)}else if(v>0){var b=nc(v),_=c*s+1.5*o*(-f+b),x=c*s+1.5*o*(-f-b);_<0?_=-$y(-_,Hy):_=$y(_,Hy),x<0?x=-$y(-x,Hy):x=$y(x,Hy);var p=(-s-(_+x))/(3*o);p>=0&&p<=1&&(a[h++]=p)}else{var T=(2*c*s-3*o*f)/(2*nc(c*c*c)),k=Math.acos(T)/3,C=nc(c),D=Math.cos(k),p=(-s-2*C*D)/(3*o),y=(-s+C*(D+v3*Math.sin(k)))/(3*o),O=(-s+C*(D-v3*Math.sin(k)))/(3*o);p>=0&&p<=1&&(a[h++]=p),y>=0&&y<=1&&(a[h++]=y),O>=0&&O<=1&&(a[h++]=O)}}return h}function _H(n,e,t,r,i){var a=6*t-12*e+6*n,o=9*e+3*r-3*n-9*t,s=3*e-3*n,l=0;if(qu(o)){if(xH(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(qu(c))i[0]=-a/(2*o);else if(c>0){var f=nc(c),u=(-a+f)/(2*o),d=(-a-f)/(2*o);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function uc(n,e,t,r,i,a){var o=(e-n)*i+n,s=(t-e)*i+e,l=(r-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,f=(c-u)*i+u;a[0]=n,a[1]=o,a[2]=u,a[3]=f,a[4]=f,a[5]=c,a[6]=l,a[7]=r}function SH(n,e,t,r,i,a,o,s,l,u,c){var f,d=.005,h=1/0,p,v,g,y;Es[0]=l,Es[1]=u;for(var b=0;b<1;b+=.05)mo[0]=fi(n,t,i,o,b),mo[1]=fi(e,r,a,s,b),g=Gf(Es,mo),g<h&&(f=b,h=g);h=1/0;for(var _=0;_<32&&!(d<bH);_++)p=f-d,v=f+d,mo[0]=fi(n,t,i,o,p),mo[1]=fi(e,r,a,s,p),g=Gf(mo,Es),p>=0&&g<h?(f=p,h=g):(Gh[0]=fi(n,t,i,o,v),Gh[1]=fi(e,r,a,s,v),y=Gf(Gh,Es),v<=1&&y<h?(f=v,h=y):d*=.5);return c&&(c[0]=fi(n,t,i,o,f),c[1]=fi(e,r,a,s,f)),nc(h)}function qpe(n,e,t,r,i,a,o,s,l){for(var u=n,c=e,f=0,d=1/l,h=1;h<=l;h++){var p=h*d,v=fi(n,t,i,o,p),g=fi(e,r,a,s,p),y=v-u,b=g-c;f+=Math.sqrt(y*y+b*b),u=v,c=g}return f}function wi(n,e,t,r){var i=1-r;return i*(i*n+2*r*e)+r*r*t}function EC(n,e,t,r){return 2*((1-r)*(e-n)+r*(t-e))}function Kpe(n,e,t,r,i){var a=n-2*e+t,o=2*(e-n),s=n-r,l=0;if(qu(a)){if(xH(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(qu(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var f=nc(c),u=(-o+f)/(2*a),d=(-o-f)/(2*a);u>=0&&u<=1&&(i[l++]=u),d>=0&&d<=1&&(i[l++]=d)}}return l}function wH(n,e,t){var r=n+t-2*e;return r===0?.5:(n-e)/r}function cm(n,e,t,r,i){var a=(e-n)*r+n,o=(t-e)*r+e,s=(o-a)*r+a;i[0]=n,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function kH(n,e,t,r,i,a,o,s,l){var u,c=.005,f=1/0;Es[0]=o,Es[1]=s;for(var d=0;d<1;d+=.05){mo[0]=wi(n,t,i,d),mo[1]=wi(e,r,a,d);var h=Gf(Es,mo);h<f&&(u=d,f=h)}f=1/0;for(var p=0;p<32&&!(c<bH);p++){var v=u-c,g=u+c;mo[0]=wi(n,t,i,v),mo[1]=wi(e,r,a,v);var h=Gf(mo,Es);if(v>=0&&h<f)u=v,f=h;else{Gh[0]=wi(n,t,i,g),Gh[1]=wi(e,r,a,g);var y=Gf(Gh,Es);g<=1&&y<f?(u=g,f=y):c*=.5}}return l&&(l[0]=wi(n,t,i,u),l[1]=wi(e,r,a,u)),nc(f)}function Ype(n,e,t,r,i,a,o){for(var s=n,l=e,u=0,c=1/o,f=1;f<=o;f++){var d=f*c,h=wi(n,t,i,d),p=wi(e,r,a,d),v=h-s,g=p-l;u+=Math.sqrt(v*v+g*g),s=h,l=p}return u}var Xpe=/cubic-bezier\(([0-9,\.e ]+)\)/;function yN(n){var e=n&&Xpe.exec(n);if(e){var t=e[1].split(","),r=+So(t[0]),i=+So(t[1]),a=+So(t[2]),o=+So(t[3]);if(isNaN(r+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:yb(0,r,a,1,l,s)&&fi(0,i,o,1,s[0])}}}var Zpe=(function(){function n(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||zr,this.ondestroy=e.ondestroy||zr,this.onrestart=e.onrestart||zr,e.easing&&this.setEasing(e.easing)}return n.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var r=this._life,i=e-this._startTime-this._pausedTime,a=i/r;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%r;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Vt(e)?e:Cg[e]||yN(e)},n})(),TH=(function(){function n(e){this.value=e}return n})(),Jpe=(function(){function n(){this._len=0}return n.prototype.insert=function(e){var t=new TH(e);return this.insertEntry(t),t},n.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},n.prototype.remove=function(e){var t=e.prev,r=e.next;t?t.next=r:this.head=r,r?r.prev=t:this.tail=t,e.next=e.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n})(),lp=(function(){function n(e){this._list=new Jpe,this._maxSize=10,this._map={},this._maxSize=e}return n.prototype.put=function(e,t){var r=this._list,i=this._map,a=null;if(i[e]==null){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new TH(t),s.key=e,r.insertEntry(s),i[e]=s}return a},n.prototype.get=function(e){var t=this._map[e],r=this._list;if(t!=null)return t!==r.tail&&(r.remove(t),r.insertEntry(t)),t.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n})(),m3={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function qo(n){return n=Math.round(n),n<0?0:n>255?255:n}function Qpe(n){return n=Math.round(n),n<0?0:n>360?360:n}function fm(n){return n<0?0:n>1?1:n}function Yw(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?qo(parseFloat(e)/100*255):qo(parseInt(e,10))}function rc(n){var e=n;return e.length&&e.charAt(e.length-1)==="%"?fm(parseFloat(e)/100):fm(parseFloat(e))}function Xw(n,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?n+(e-n)*t*6:t*2<1?e:t*3<2?n+(e-n)*(2/3-t)*6:n}function Ku(n,e,t){return n+(e-n)*t}function uo(n,e,t,r,i){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function MC(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}var CH=new lp(20),Gy=null;function Yd(n,e){Gy&&MC(Gy,e),Gy=CH.put(n,Gy||e.slice())}function Ia(n,e){if(n){e=e||[];var t=CH.get(n);if(t)return MC(e,t);n=n+"";var r=n.replace(/ /g,"").toLowerCase();if(r in m3)return MC(e,m3[r]),Yd(n,e),e;var i=r.length;if(r.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){uo(e,0,0,0,1);return}return uo(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Yd(n,e),e}else if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){uo(e,0,0,0,1);return}return uo(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Yd(n,e),e}return}var o=r.indexOf("("),s=r.indexOf(")");if(o!==-1&&s+1===i){var l=r.substr(0,o),u=r.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?uo(e,+u[0],+u[1],+u[2],1):uo(e,0,0,0,1);c=rc(u.pop());case"rgb":if(u.length>=3)return uo(e,Yw(u[0]),Yw(u[1]),Yw(u[2]),u.length===3?c:rc(u[3])),Yd(n,e),e;uo(e,0,0,0,1);return;case"hsla":if(u.length!==4){uo(e,0,0,0,1);return}return u[3]=rc(u[3]),AC(u,e),Yd(n,e),e;case"hsl":if(u.length!==3){uo(e,0,0,0,1);return}return AC(u,e),Yd(n,e),e;default:return}}uo(e,0,0,0,1)}}function AC(n,e){var t=(parseFloat(n[0])%360+360)%360/360,r=rc(n[1]),i=rc(n[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return e=e||[],uo(e,qo(Xw(o,a,t+1/3)*255),qo(Xw(o,a,t)*255),qo(Xw(o,a,t-1/3)*255),1),n.length===4&&(e[3]=n[3]),e}function eve(n){if(n){var e=n[0]/255,t=n[1]/255,r=n[2]/255,i=Math.min(e,t,r),a=Math.max(e,t,r),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,f=((a-t)/6+o/2)/o,d=((a-r)/6+o/2)/o;e===a?l=d-f:t===a?l=1/3+c-d:r===a&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return n[3]!=null&&h.push(n[3]),h}}function NC(n,e){var t=Ia(n);if(t){for(var r=0;r<3;r++)e<0?t[r]=t[r]*(1-e)|0:t[r]=(255-t[r])*e+t[r]|0,t[r]>255?t[r]=255:t[r]<0&&(t[r]=0);return zs(t,t.length===4?"rgba":"rgb")}}function Zw(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){t=t||[];var r=n*(e.length-1),i=Math.floor(r),a=Math.ceil(r),o=e[i],s=e[a],l=r-i;return t[0]=qo(Ku(o[0],s[0],l)),t[1]=qo(Ku(o[1],s[1],l)),t[2]=qo(Ku(o[2],s[2],l)),t[3]=fm(Ku(o[3],s[3],l)),t}}function tve(n,e,t){if(!(!(e&&e.length)||!(n>=0&&n<=1))){var r=n*(e.length-1),i=Math.floor(r),a=Math.ceil(r),o=Ia(e[i]),s=Ia(e[a]),l=r-i,u=zs([qo(Ku(o[0],s[0],l)),qo(Ku(o[1],s[1],l)),qo(Ku(o[2],s[2],l)),fm(Ku(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:r}:u}}function ic(n,e,t,r){var i=Ia(n);if(n)return i=eve(i),e!=null&&(i[0]=Qpe(Vt(e)?e(i[0]):e)),t!=null&&(i[1]=rc(Vt(t)?t(i[1]):t)),r!=null&&(i[2]=rc(Vt(r)?r(i[2]):r)),zs(AC(i),"rgba")}function bb(n,e){var t=Ia(n);if(t&&e!=null)return t[3]=fm(e),zs(t,"rgba")}function zs(n,e){if(!(!n||!n.length)){var t=n[0]+","+n[1]+","+n[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+n[3]),e+"("+t+")"}}function xb(n,e){var t=Ia(n);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var y3=new lp(100);function DC(n){if(gt(n)){var e=y3.get(n);return e||(e=NC(n,-.1),y3.put(n,e)),e}else if(N_(n)){var t=Ke({},n);return t.colorStops=et(n.colorStops,function(r){return{offset:r.offset,color:NC(r.color,-.1)}}),t}return n}var _b=Math.round;function dm(n){var e;if(!n||n==="transparent")n="none";else if(typeof n=="string"&&n.indexOf("rgba")>-1){var t=Ia(n);t&&(n="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:n,opacity:e??1}}var b3=1e-4;function Yu(n){return n<b3&&n>-b3}function Uy(n){return _b(n*1e3)/1e3}function OC(n){return _b(n*1e4)/1e4}function nve(n){return"matrix("+Uy(n[0])+","+Uy(n[1])+","+Uy(n[2])+","+Uy(n[3])+","+OC(n[4])+","+OC(n[5])+")"}var rve={left:"start",right:"end",center:"middle",middle:"middle"};function ive(n,e,t){return t==="top"?n+=e/2:t==="bottom"&&(n-=e/2),n}function ave(n){return n&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)}function ove(n){var e=n.style,t=n.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function EH(n){return n&&!!n.image}function sve(n){return n&&!!n.svgElement}function bN(n){return EH(n)||sve(n)}function MH(n){return n.type==="linear"}function AH(n){return n.type==="radial"}function NH(n){return n&&(n.type==="linear"||n.type==="radial")}function L_(n){return"url(#"+n+")"}function DH(n){var e=n.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function OH(n){var e=n.x||0,t=n.y||0,r=(n.rotation||0)*p1,i=At(n.scaleX,1),a=At(n.scaleY,1),o=n.skewX||0,s=n.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),r&&l.push("rotate("+r+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+_b(o*p1)+"deg, "+_b(s*p1)+"deg)"),l.join(" ")}var lve=(function(){return En.hasGlobalWindow&&Vt(window.btoa)?function(n){return window.btoa(unescape(encodeURIComponent(n)))}:typeof Buffer<"u"?function(n){return Buffer.from(n).toString("base64")}:function(n){return process.env.NODE_ENV!=="production"&&jo("Base64 isn't natively supported in the current environment."),null}})(),IC=Array.prototype.slice;function Sl(n,e,t){return(e-n)*t+n}function Jw(n,e,t,r){for(var i=e.length,a=0;a<i;a++)n[a]=Sl(e[a],t[a],r);return n}function uve(n,e,t,r){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=Sl(e[o][s],t[o][s],r)}return n}function Wy(n,e,t,r){for(var i=e.length,a=0;a<i;a++)n[a]=e[a]+t[a]*r;return n}function x3(n,e,t,r){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){n[o]||(n[o]=[]);for(var s=0;s<a;s++)n[o][s]=e[o][s]+t[o][s]*r}return n}function cve(n,e){for(var t=n.length,r=e.length,i=t>r?e:n,a=Math.min(t,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,r);s++)i.push({offset:o.offset,color:o.color.slice()})}function fve(n,e,t){var r=n,i=e;if(!(!r.push||!i.push)){var a=r.length,o=i.length;if(a!==o){var s=a>o;if(s)r.length=o;else for(var l=a;l<o;l++)r.push(t===1?i[l]:IC.call(i[l]))}for(var u=r[0]&&r[0].length,l=0;l<r.length;l++)if(t===1)isNaN(r[l])&&(r[l]=i[l]);else for(var c=0;c<u;c++)isNaN(r[l][c])&&(r[l][c]=i[l][c])}}function Eg(n){if(Zi(n)){var e=n.length;if(Zi(n[0])){for(var t=[],r=0;r<e;r++)t.push(IC.call(n[r]));return t}return IC.call(n)}return n}function y1(n){return n[0]=Math.floor(n[0])||0,n[1]=Math.floor(n[1])||0,n[2]=Math.floor(n[2])||0,n[3]=n[3]==null?1:n[3],"rgba("+n.join(",")+")"}function dve(n){return Zi(n&&n[0])?2:1}var jy=0,b1=1,IH=2,eg=3,RC=4,LC=5,_3=6;function S3(n){return n===RC||n===LC}function qy(n){return n===b1||n===IH}var vv=[0,0,0,0],hve=(function(){function n(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return n.prototype.isFinished=function(){return this._finished},n.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},n.prototype.needsAnimate=function(){return this.keyframes.length>=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(e,t,r){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=_3,l=t;if(Zi(t)){var u=dve(t);s=u,(u===1&&!Ln(t[0])||u===2&&!Ln(t[0][0]))&&(o=!0)}else if(Ln(t)&&!Ti(t))s=jy;else if(gt(t))if(!isNaN(+t))s=jy;else{var c=Ia(t);c&&(l=c,s=eg)}else if(N_(t)){var f=Ke({},l);f.colorStops=et(t.colorStops,function(h){return{offset:h.offset,color:Ia(h.color)}}),MH(t)?s=RC:AH(t)&&(s=LC),l=f}a===0?this.valType=s:(s!==this.valType||s===_3)&&(o=!0),this.discrete=this.discrete||o;var d={time:e,value:l,rawValue:t,percent:0};return r&&(d.easing=r,d.easingFunc=Vt(r)?r:Cg[r]||yN(r)),i.push(d),d},n.prototype.prepare=function(e,t){var r=this.keyframes;this._needsSort&&r.sort(function(v,g){return v.time-g.time});for(var i=this.valType,a=r.length,o=r[a-1],s=this.discrete,l=qy(i),u=S3(i),c=0;c<a;c++){var f=r[c],d=f.value,h=o.value;f.percent=f.time/e,s||(l&&c!==a-1?fve(d,h,i):u&&cve(d.colorStops,h.colorStops))}if(!s&&i!==LC&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=r[0].value,c=0;c<a;c++)i===jy?r[c].additiveValue=r[c].value-p:i===eg?r[c].additiveValue=Wy([],r[c].value,p,-1):qy(i)&&(r[c].additiveValue=i===b1?Wy([],r[c].value,p,-1):x3([],r[c].value,p,-1))}},n.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var r=this._additiveTrack!=null,i=r?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===eg,c,f=this._lastFr,d=Math.min,h,p;if(s===1)h=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var v=d(f+1,s-1);for(c=v;c>=0&&!(o[c].percent<=t);c--);c=d(c,s-2)}else{for(c=f;c<s&&!(o[c].percent>t);c++);c=d(c-1,s-2)}p=o[c+1],h=o[c]}if(h&&p){this._lastFr=c,this._lastFrP=t;var g=p.percent-h.percent,y=g===0?1:d((t-h.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var b=r?this._additiveValue:u?vv:e[l];if((qy(a)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)e[l]=y<1?h.rawValue:p.rawValue;else if(qy(a))a===b1?Jw(b,h[i],p[i],y):uve(b,h[i],p[i],y);else if(S3(a)){var _=h[i],x=p[i],T=a===RC;e[l]={type:T?"linear":"radial",x:Sl(_.x,x.x,y),y:Sl(_.y,x.y,y),colorStops:et(_.colorStops,function(C,D){var O=x.colorStops[D];return{offset:Sl(C.offset,O.offset,y),color:y1(Jw([],C.color,O.color,y))}}),global:x.global},T?(e[l].x2=Sl(_.x2,x.x2,y),e[l].y2=Sl(_.y2,x.y2,y)):e[l].r=Sl(_.r,x.r,y)}else if(u)Jw(b,h[i],p[i],y),r||(e[l]=y1(b));else{var k=Sl(h[i],p[i],y);r?this._additiveValue=k:e[l]=k}r&&this._addToTarget(e)}}},n.prototype._addToTarget=function(e){var t=this.valType,r=this.propName,i=this._additiveValue;t===jy?e[r]=e[r]+i:t===eg?(Ia(e[r],vv),Wy(vv,vv,i,1),e[r]=y1(vv)):t===b1?Wy(e[r],e[r],i,1):t===IH&&x3(e[r],e[r],i,1)},n})(),xN=(function(){function n(e,t,r,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){jo("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=r}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(e){this._target=e},n.prototype.when=function(e,t,r){return this.whenWithKeys(e,t,Mn(t),r)},n.prototype.whenWithKeys=function(e,t,r,i){for(var a=this._tracks,o=0;o<r.length;o++){var s=r[o],l=a[s];if(!l){l=a[s]=new hve(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var f=c.keyframes,d=f[f.length-1];u=d&&d.value,c.valType===eg&&u&&(u=y1(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,Eg(u),i),this._trackKeys.push(s)}l.addKeyframe(e,Eg(t[s]),i)}return this._maxTime=Math.max(this._maxTime,e),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,r=0;r<t;r++)e[r].call(this)},n.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var r=0;r<t.length;r++)t[r].call(this)},n.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,r=0;r<t.length;r++)e[t[r]].setFinished()},n.prototype._getAdditiveTrack=function(e){var t,r=this._additiveAnimators;if(r)for(var i=0;i<r.length;i++){var a=r[i].getTrack(e);a&&(t=a)}return t},n.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,r=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var f=u[c-1];f&&(t._target[s.propName]=f.rawValue),s.setFinished()}else r.push(s)}if(r.length||this._force){var d=new Zpe({life:i,loop:this._loop,delay:this._delay||0,onframe:function(h){t._started=2;var p=t._additiveAnimators;if(p){for(var v=!1,g=0;g<p.length;g++)if(p[g]._clip){v=!0;break}v||(t._additiveAnimators=null)}for(var g=0;g<r.length;g++)r[g].step(t._target,h);var y=t._onframeCbs;if(y)for(var g=0;g<y.length;g++)y[g](t._target,h)},ondestroy:function(){t._doneCallback()}});this._clip=d,this.animation&&this.animation.addClip(d),e&&d.setEasing(e)}else this._doneCallback();return this}},n.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},n.prototype.delay=function(e){return this._delay=e,this},n.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},n.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},n.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},n.prototype.getClip=function(){return this._clip},n.prototype.getTrack=function(e){return this._tracks[e]},n.prototype.getTracks=function(){var e=this;return et(this._trackKeys,function(t){return e._tracks[t]})},n.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var r=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=r[e[a]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!r[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},n.prototype.saveTo=function(e,t,r){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var a=t[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[r?0:s.length-1];l&&(e[a]=Eg(l.rawValue))}}}},n.prototype.__changeFinalValue=function(e,t){t=t||Mn(e);for(var r=0;r<t.length;r++){var i=t[r],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},n})();function Lh(){return new Date().getTime()}var pve=(function(n){Ie(e,n);function e(t){var r=n.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,t=t||{},r.stage=t.stage||{},r}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var r=t.getClip();r&&this.addClip(r)},e.prototype.removeClip=function(t){if(t.animation){var r=t.prev,i=t.next;r?r.next=i:this._head=i,i?i.prev=r:this._tail=r,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var r=t.getClip();r&&this.removeClip(r),t.animation=null},e.prototype.update=function(t){for(var r=Lh()-this._pausedTime,i=r-this._time,a=this._head;a;){var o=a.next,s=a.step(r,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=r,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function r(){t._running&&(gb(r),!t._paused&&t.update())}gb(r)},e.prototype.start=function(){this._running||(this._time=Lh(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Lh(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Lh()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var r=t.next;t.prev=t.next=t.animation=null,t=r}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,r){r=r||{},this.start();var i=new xN(t,r.loop);return this.addAnimator(i),i},e})(Oo),vve=300,Qw=En.domSupported,e2=(function(){var n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=et(n,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:n,touch:e,pointer:r}})(),w3={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},k3=!1;function PC(n){var e=n.pointerType;return e==="pen"||e==="touch"}function gve(n){n.touching=!0,n.touchTimer!=null&&(clearTimeout(n.touchTimer),n.touchTimer=null),n.touchTimer=setTimeout(function(){n.touching=!1,n.touchTimer=null},700)}function t2(n){n&&(n.zrByTouch=!0)}function mve(n,e){return fo(n.dom,new yve(n,e),!0)}function RH(n,e){for(var t=e,r=!1;t&&t.nodeType!==9&&!(r=t.domBelongToZr||t!==e&&t===n.painterRoot);)t=t.parentNode;return r}var yve=(function(){function n(e,t){this.stopPropagation=zr,this.stopImmediatePropagation=zr,this.preventDefault=zr,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return n})(),Vo={mousedown:function(n){n=fo(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=fo(this.dom,n);var e=this.__mayPointerCapture;e&&(n.zrX!==e[0]||n.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=fo(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){n=fo(this.dom,n);var e=n.toElement||n.relatedTarget;RH(this,e)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){k3=!0,n=fo(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){k3||(n=fo(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){n=fo(this.dom,n),t2(n),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),Vo.mousemove.call(this,n),Vo.mousedown.call(this,n)},touchmove:function(n){n=fo(this.dom,n),t2(n),this.handler.processGesture(n,"change"),Vo.mousemove.call(this,n)},touchend:function(n){n=fo(this.dom,n),t2(n),this.handler.processGesture(n,"end"),Vo.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<vve&&Vo.click.call(this,n)},pointerdown:function(n){Vo.mousedown.call(this,n)},pointermove:function(n){PC(n)||Vo.mousemove.call(this,n)},pointerup:function(n){Vo.mouseup.call(this,n)},pointerout:function(n){PC(n)||Vo.mouseout.call(this,n)}};U(["click","dblclick","contextmenu"],function(n){Vo[n]=function(e){e=fo(this.dom,e),this.trigger(n,e)}});var BC={pointermove:function(n){PC(n)||BC.mousemove.call(this,n)},pointerup:function(n){BC.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),e&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function bve(n,e){var t=e.domHandlers;En.pointerEventsSupported?U(e2.pointer,function(r){x1(e,r,function(i){t[r].call(n,i)})}):(En.touchEventsSupported&&U(e2.touch,function(r){x1(e,r,function(i){t[r].call(n,i),gve(e)})}),U(e2.mouse,function(r){x1(e,r,function(i){i=gN(i),e.touching||t[r].call(n,i)})}))}function xve(n,e){En.pointerEventsSupported?U(w3.pointer,t):En.touchEventsSupported||U(w3.mouse,t);function t(r){function i(a){a=gN(a),RH(n,a.target)||(a=mve(n,a),e.domHandlers[r].call(n,a))}x1(e,r,i,{capture:!0})}}function x1(n,e,t,r){n.mounted[e]=t,n.listenerOpts[e]=r,kC(n.domTarget,e,t,r)}function n2(n){var e=n.mounted;for(var t in e)e.hasOwnProperty(t)&&Dpe(n.domTarget,t,e[t],n.listenerOpts[t]);n.mounted={}}var T3=(function(){function n(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return n})(),_ve=(function(n){Ie(e,n);function e(t,r){var i=n.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=r,i._localHandlerScope=new T3(t,Vo),Qw&&(i._globalHandlerScope=new T3(document,BC)),bve(i,i._localHandlerScope),i}return e.prototype.dispose=function(){n2(this._localHandlerScope),Qw&&n2(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Qw&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var r=this._globalHandlerScope;t?xve(this,r):n2(r)}},e})(Oo),LH=1;En.hasGlobalWindow&&(LH=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Sb=LH,VC=.4,zC="#333",FC="#ccc",Sve="#eee",C3=I_,E3=5e-5;function zc(n){return n>E3||n<-E3}var Fc=[],Xd=[],r2=Ci(),i2=Math.abs,Al=(function(){function n(){}return n.prototype.getLocalTransform=function(e){return n.getLocalTransform(this,e)},n.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},n.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},n.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},n.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},n.prototype.needLocalTransform=function(){return zc(this.rotation)||zc(this.x)||zc(this.y)||zc(this.scaleX-1)||zc(this.scaleY-1)||zc(this.skewX)||zc(this.skewY)},n.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),r=this.transform;if(!(t||e)){r&&(C3(r),this.invTransform=null);return}r=r||Ci(),t?this.getLocalTransform(r):C3(r),e&&(t?Vs(r,e,r):R_(r,e)),this.transform=r,this._resolveGlobalScaleRatio(r)},n.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Fc);var r=Fc[0]<0?-1:1,i=Fc[1]<0?-1:1,a=((Fc[0]-r)*t+r)/Fc[0]||0,o=((Fc[1]-i)*t+i)/Fc[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Ci(),Zo(this.invTransform,e)},n.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},n.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);r=Math.sqrt(r)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=r,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Ci(),Vs(Xd,e.invTransform,t),t=Xd);var r=this.originX,i=this.originY;(r||i)&&(r2[4]=r,r2[5]=i,Vs(Xd,t,r2),Xd[4]-=r,Xd[5]-=i,t=Xd),this.setLocalTransform(t)}},n.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},n.prototype.transformCoordToLocal=function(e,t){var r=[e,t],i=this.invTransform;return i&&Fr(r,r,i),r},n.prototype.transformCoordToGlobal=function(e,t){var r=[e,t],i=this.transform;return i&&Fr(r,r,i),r},n.prototype.getLineScale=function(){var e=this.transform;return e&&i2(e[0]-1)>1e-10&&i2(e[3]-1)>1e-10?Math.sqrt(i2(e[0]*e[3]-e[2]*e[1])):1},n.prototype.copyTransform=function(e){wb(this,e)},n.getLocalTransform=function(e,t){t=t||[];var r=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,f=e.y,d=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(r||i||s||l){var p=r+s,v=i+l;t[4]=-p*a-d*v*o,t[5]=-v*o-h*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=h*a,t[2]=d*o,u&&Sc(t,t,u),t[4]+=r+c,t[5]+=i+f,t},n.initDefaultProps=(function(){var e=n.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),n})(),Ys=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function wb(n,e){for(var t=0;t<Ys.length;t++){var r=Ys[t];n[r]=e[r]}}function Fs(n){Ky||(Ky=new lp(100)),n=n||Hl;var e=Ky.get(n);return e||(e={font:n,strWidthCache:new lp(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:Xo.measureText("国",n).width,asciiCharWidth:Xo.measureText("a",n).width},Ky.put(n,e)),e}var Ky;function wve(n){if(!(a2>=M3)){n=n||Hl;for(var e=[],t=+new Date,r=0;r<=127;r++)e[r]=Xo.measureText(String.fromCharCode(r),n).width;var i=+new Date-t;return i>16?a2=M3:i>2&&a2++,e}}var a2=0,M3=5;function PH(n,e){return n.asciiWidthMapTried||(n.asciiWidthMap=wve(n.font),n.asciiWidthMapTried=!0),0<=e&&e<=127?n.asciiWidthMap!=null?n.asciiWidthMap[e]:n.asciiCharWidth:n.stWideCharWidth}function $s(n,e){var t=n.strWidthCache,r=t.get(e);return r==null&&(r=Xo.measureText(e,n.font).width,t.put(e,r)),r}function A3(n,e,t,r){var i=$s(Fs(e),n),a=Ym(e),o=up(0,i,t),s=Uf(0,a,r),l=new Kt(o,s,i,a);return l}function P_(n,e,t,r){var i=((n||"")+"").split(`
|
|
217
217
|
`),a=i.length;if(a===1)return A3(i[0],e,t,r);for(var o=new Kt(0,0,0,0),s=0;s<i.length;s++){var l=A3(i[s],e,t,r);s===0?o.copy(l):o.union(l)}return o}function up(n,e,t,r){return t==="right"?r?n+=e:n-=e:t==="center"&&(r?n+=e/2:n-=e/2),n}function Uf(n,e,t,r){return t==="middle"?r?n+=e/2:n-=e/2:t==="bottom"&&(r?n+=e:n-=e),n}function Ym(n){return Fs(n).stWideCharWidth}function Jo(n,e){return typeof n=="string"?n.lastIndexOf("%")>=0?parseFloat(n)/100*e:parseFloat(n):n}function kb(n,e,t){var r=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",f="top";if(r instanceof Array)l+=Jo(r[0],t.width),u+=Jo(r[1],t.height),c=null,f=null;else switch(r){case"left":l-=i,u+=s,c="right",f="middle";break;case"right":l+=i+o,u+=s,f="middle";break;case"top":l+=o/2,u-=i,c="center",f="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=i,u+=s,f="middle";break;case"insideRight":l+=o-i,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",f="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,f="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",f="bottom";break}return n=n||{},n.x=l,n.y=u,n.align=c,n.verticalAlign=f,n}var o2="__zr_normal__",s2=Ys.concat(["ignore"]),kve=qs(Ys,function(n,e){return n[e]=!0,n},{ignore:!1}),Zd={},Tve=new Kt(0,0,0,0),Yy=[],B_=(function(){function n(e){this.id=lH(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return n.prototype._init=function(e){this.attr(e)},n.prototype.drift=function(e,t,r){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[5]+=t,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var r=this.textConfig,i=r.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;a.copyTransform(t);var c=r.position!=null,f=r.autoOverflowArea,d=void 0;if((f||c)&&(d=Tve,r.layoutRect?d.copy(r.layoutRect):d.copy(this.getBoundingRect()),i||d.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(Zd,r,d):kb(Zd,r,d),a.x=Zd.x,a.y=Zd.y,o=Zd.align,s=Zd.verticalAlign;var h=r.origin;if(h&&r.rotation!=null){var p=void 0,v=void 0;h==="center"?(p=d.width*.5,v=d.height*.5):(p=Jo(h[0],d.width),v=Jo(h[1],d.height)),u=!0,a.originX=-a.x+p+(i?0:d.x),a.originY=-a.y+v+(i?0:d.y)}}r.rotation!=null&&(a.rotation=r.rotation);var g=r.offset;g&&(a.x+=g[0],a.y+=g[1],u||(a.originX=-g[0],a.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var b=y.overflowRect=y.overflowRect||new Kt(0,0,0,0);a.getLocalTransform(Yy),Zo(Yy,Yy),Kt.copy(b,d),b.applyTransform(Yy)}else y.overflowRect=null;var _=r.inside==null?typeof r.position=="string"&&r.position.indexOf("inside")>=0:r.inside,x=void 0,T=void 0,k=void 0;_&&this.canBeInsideText()?(x=r.insideFill,T=r.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(T==null||T==="auto")&&(T=this.getInsideTextStroke(x),k=!0)):(x=r.outsideFill,T=r.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(T==null||T==="auto")&&(T=this.getOutsideStroke(x),k=!0)),x=x||"#000",(x!==y.fill||T!==y.stroke||k!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=x,y.stroke=T,y.autoStroke=k,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=ja,l&&t.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(e){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?FC:zC},n.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),r=typeof t=="string"&&Ia(t);r||(r=[255,255,255,1]);for(var i=r[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)r[o]=r[o]*i+(a?0:255)*(1-i);return r[3]=1,zs(r,"rgba")},n.prototype.traverse=function(e,t){},n.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},Ke(this.extra,t)):this[e]=t},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(Gt(e))for(var r=e,i=Mn(r),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},n.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,r=0;r<this.animators.length;r++){var i=this.animators[r],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==o2)){var o=i.targetName,s=o?t[o]:t;i.saveTo(s)}}},n.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,s2)},n.prototype._savePrimaryToNormal=function(e,t,r){for(var i=0;i<r.length;i++){var a=r[i];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},n.prototype.hasState=function(){return this.currentStates.length>0},n.prototype.getState=function(e){return this.states[e]},n.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},n.prototype.clearStates=function(e){this.useState(o2,!1,e)},n.prototype.useState=function(e,t,r,i){var a=e===o2,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(dn(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){jo("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!r&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(e,t,r,c),d&&d.useState(e,t,r,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ja),u}}},n.prototype.useStates=function(e,t,r){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&i.push(c)}var f=i[o-1],d=!!(f&&f.hoverLayer||r);d&&this._toggleHoverLayerFlag(!0);var h=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(e.join(","),h,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(e,t,d),g&&g.useStates(e,t,d),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ja)}},n.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},n.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},n.prototype.removeState=function(e){var t=dn(this.currentStates,e);if(t>=0){var r=this.currentStates.slice();r.splice(t,1),this.useStates(r)}},n.prototype.replaceState=function(e,t,r){var i=this.currentStates.slice(),a=dn(i,e),o=dn(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:r&&!o&&i.push(t),this.useStates(i)},n.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},n.prototype._mergeStates=function(e){for(var t={},r,i=0;i<e.length;i++){var a=e[i];Ke(t,a),a.textConfig&&(r=r||{},Ke(r,a.textConfig))}return r&&(t.textConfig=r),t},n.prototype._applyStateObj=function(e,t,r,i,a,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=Ke({},i?this.textConfig:r.textConfig),Ke(this.textConfig,t.textConfig)):s&&r.textConfig&&(this.textConfig=r.textConfig);for(var l={},u=!1,c=0;c<s2.length;c++){var f=s2[c],d=a&&kve[f];t&&t[f]!=null?d?(u=!0,l[f]=t[f]):this[f]=t[f]:s&&r[f]!=null&&(d?(u=!0,l[f]=r[f]):this[f]=r[f])}if(!a)for(var c=0;c<this.animators.length;c++){var h=this.animators[c],p=h.targetName;h.getLoop()||h.__changeFinalValue(p?(t||r)[p]:t||r)}u&&this._transitionState(e,l,o)},n.prototype._attachComponent=function(e){if(e.__zr&&!e.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(e===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this},n.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},n.prototype.getClipPath=function(){return this._clipPath},n.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},n.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},n.prototype.getTextContent=function(){return this._textContent},n.prototype.setTextContent=function(e){var t=this._textContent;if(t!==e){if(t&&t!==e&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&e.__zr&&!e.__hostTarget)throw new Error("Text element has been added to zrender.");e.innerTransformable=new Al,this._attachComponent(e),this._textContent=e,this.markRedraw()}},n.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Ke(this.textConfig,e),this.markRedraw()},n.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},n.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},n.prototype.getTextGuideLine=function(){return this._textGuide},n.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},n.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},n.prototype.markRedraw=function(){this.__dirty|=ja;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},n.prototype.dirty=function(){this.markRedraw()},n.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,r=this._textGuide;t&&(t.__inHover=e),r&&(r.__inHover=e)},n.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var r=0;r<t.length;r++)e.animation.addAnimator(t[r]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},n.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var r=0;r<t.length;r++)e.animation.removeAnimator(t[r]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},n.prototype.animate=function(e,t,r){var i=e?this[e]:this;if(process.env.NODE_ENV!=="production"&&!i){jo('Property "'+e+'" is not existed in element '+this.id);return}var a=new xN(i,t,r);return e&&(a.targetName=e),this.addAnimator(a,e),a},n.prototype.addAnimator=function(e,t){var r=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var a=i.animators,o=dn(a,e);o>=0&&a.splice(o,1)}),this.animators.push(e),r&&r.animation.addAnimator(e),r&&r.wakeUp()},n.prototype.updateDuringAnimation=function(e){this.markRedraw()},n.prototype.stopAnimation=function(e,t){for(var r=this.animators,i=r.length,a=[],o=0;o<i;o++){var s=r[o];!e||e===s.scope?s.stop(t):a.push(s)}return this.animators=a,this},n.prototype.animateTo=function(e,t,r){l2(this,e,t,r)},n.prototype.animateFrom=function(e,t,r){l2(this,e,t,r,!0)},n.prototype._transitionState=function(e,t,r,i){for(var a=l2(this,t,r,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},n.prototype.getBoundingRect=function(){return null},n.prototype.getPaintRect=function(){return null},n.initDefaultProps=(function(){var e=n.prototype;e.type="element",e.name="",e.ignore=e.silent=e.ignoreHostSilent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=ja;var t={};function r(a,o,s){t[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),t[a+o+s]=!0)}function i(a,o,s,l){Object.defineProperty(e,a,{get:function(){if(process.env.NODE_ENV!=="production"&&r(a,s,l),!this[o]){var c=this[o]=[];u(this,c)}return this[o]},set:function(c){process.env.NODE_ENV!=="production"&&r(a,s,l),this[s]=c[0],this[l]=c[1],this[o]=c,u(this,c)}});function u(c,f){Object.defineProperty(f,0,{get:function(){return c[s]},set:function(d){c[s]=d}}),Object.defineProperty(f,1,{get:function(){return c[l]},set:function(d){c[l]=d}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))})(),n})();Zr(B_,Oo);Zr(B_,Al);function l2(n,e,t,r,i){t=t||{};var a=[];BH(n,"",n,e,t,r,a,i);var o=a.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},f=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&t.during&&a[0].during(function(p,v){t.during(v)});for(var d=0;d<a.length;d++){var h=a[d];c&&h.done(c),f&&h.aborted(f),t.force&&h.duration(t.duration),h.start(t.easing)}return a}function u2(n,e,t){for(var r=0;r<t;r++)n[r]=e[r]}function Cve(n){return Zi(n[0])}function Eve(n,e,t){if(Zi(e[t]))if(Zi(n[t])||(n[t]=[]),_a(e[t])){var r=e[t].length;n[t].length!==r&&(n[t]=new e[t].constructor(r),u2(n[t],e[t],r))}else{var i=e[t],a=n[t],o=i.length;if(Cve(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?u2(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else u2(a,i,o);a.length=i.length}else n[t]=e[t]}function Mve(n,e){return n===e||Zi(n)&&Zi(e)&&Ave(n,e)}function Ave(n,e){var t=n.length;if(t!==e.length)return!1;for(var r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}function BH(n,e,t,r,i,a,o,s){for(var l=Mn(r),u=i.duration,c=i.delay,f=i.additive,d=i.setToFinal,h=!Gt(a),p=n.animators,v=[],g=0;g<l.length;g++){var y=l[g],b=r[y];if(b!=null&&t[y]!=null&&(h||a[y]))if(Gt(b)&&!Zi(b)&&!N_(b)){if(e){s||(t[y]=b,n.updateDuringAnimation(e));continue}BH(n,y,t[y],b,i,a&&a[y],o,s)}else v.push(y);else s||(t[y]=b,n.updateDuringAnimation(e),v.push(y))}var _=v.length;if(!f&&_)for(var x=0;x<p.length;x++){var T=p[x];if(T.targetName===e){var k=T.stopTracks(v);if(k){var C=dn(p,T);p.splice(C,1)}}}if(i.force||(v=Kn(v,function(V){return!Mve(r[V],t[V])}),_=v.length),_>0||i.force&&!o.length){var D=void 0,O=void 0,R=void 0;if(s){O={},d&&(D={});for(var x=0;x<_;x++){var y=v[x];O[y]=t[y],d?D[y]=r[y]:t[y]=r[y]}}else if(d){R={};for(var x=0;x<_;x++){var y=v[x];R[y]=Eg(t[y]),Eve(t,r,y)}}var T=new xN(t,!1,!1,f?Kn(p,function(F){return F.targetName===e}):null);T.targetName=e,i.scope&&(T.scope=i.scope),d&&D&&T.whenWithKeys(0,D,v),R&&T.whenWithKeys(0,R,v),T.whenWithKeys(u??500,s?O:r,v).delay(c||0),n.addAnimator(T,e),o.push(T)}}var $t=(function(n){Ie(e,n);function e(t){var r=n.call(this)||this;return r.isGroup=!0,r._children=[],r.attr(t),r}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var r=this._children,i=0;i<r.length;i++)if(r[i].name===t)return r[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),process.env.NODE_ENV!=="production"&&t.__hostTarget))throw"This elemenet has been used as an attachment";return this},e.prototype.addBefore=function(t,r){if(t&&t!==this&&t.parent!==this&&r&&r.parent===this){var i=this._children,a=i.indexOf(r);a>=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,r){var i=dn(this._children,t);return i>=0&&this.replaceAt(r,i),this},e.prototype.replaceAt=function(t,r){var i=this._children,a=i[r];if(t&&t!==this&&t.parent!==this&&t!==a){i[r]=t,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var r=this.__zr;r&&r!==t.__zr&&t.addSelfToZr(r),r&&r.refresh()},e.prototype.remove=function(t){var r=this.__zr,i=this._children,a=dn(i,t);return a<0?this:(i.splice(a,1),t.parent=null,r&&t.removeSelfFromZr(r),r&&r.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,r=this.__zr,i=0;i<t.length;i++){var a=t[i];r&&a.removeSelfFromZr(r),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,r){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];t.call(r,o,a)}return this},e.prototype.traverse=function(t,r){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=t.call(r,a);a.isGroup&&!o&&a.traverse(t,r)}return this},e.prototype.addSelfToZr=function(t){n.prototype.addSelfToZr.call(this,t);for(var r=0;r<this._children.length;r++){var i=this._children[r];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){n.prototype.removeSelfFromZr.call(this,t);for(var r=0;r<this._children.length;r++){var i=this._children[r];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var r=new Kt(0,0,0,0),i=t||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(Kt.applyTransform(r,u,c),o=o||r.clone(),o.union(r)):(o=o||u.clone(),o.union(u))}}return o||r},e})(B_);$t.prototype.type="group";var tg={},VH={};function Nve(n){delete VH[n]}function Dve(n){if(!n)return!1;if(typeof n=="string")return xb(n,1)<VC;if(n.colorStops){for(var e=n.colorStops,t=0,r=e.length,i=0;i<r;i++)t+=xb(e[i].color,1);return t/=r,t<VC}return!1}var Ove=(function(){function n(e,t,r){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,r=r||{},this.dom=t,this.id=e;var a=new jpe,o=r.renderer||"canvas";if(tg[o]||(o=Mn(tg)[0]),process.env.NODE_ENV!=="production"&&!tg[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");r.useDirtyRect=r.useDirtyRect==null?!1:r.useDirtyRect;var s=new tg[o](t,a,r,e),l=r.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!En.node&&!En.worker&&!l?new _ve(s.getViewportRoot(),s.root):null,c=r.useCoarsePointer,f=c==null||c==="auto"?En.touchEventsSupported:!!c,d=44,h;f&&(h=At(r.pointerSize,d)),this.handler=new gH(a,s,u,s.root,h),this.animation=new pve({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return n.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},n.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},n.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},n.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=Dve(e))},n.prototype.getBackgroundColor=function(){return this._backgroundColor},n.prototype.setDarkMode=function(e){this._darkMode=e},n.prototype.isDarkMode=function(){return this._darkMode},n.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},n.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},n.prototype.flush=function(){this._disposed||this._flush(!1)},n.prototype._flush=function(e){var t,r=Lh();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=Lh();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-r})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},n.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},n.prototype.on=function(e,t,r){return this._disposed||this.handler.on(e,t,r),this},n.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},n.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},n.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof $t&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},n.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,Nve(this.id))},n})();function N3(n,e){var t=new Ove(lH(),n,e);return VH[t.id]=t,t}function Ive(n,e){tg[n]=e}var $C;function Rve(n){if(typeof $C=="function")return $C(n)}function Lve(n){$C=n}var D3=1e-4,zH=20;function Pve(n){return n.replace(/^\s+|\s+$/g,"")}var Za=Math.min,Vr=Math.max,Ds=Math.abs;function qn(n,e,t,r){var i=e[0],a=e[1],o=t[0],s=t[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(r)if(l>0){if(n<=i)return o;if(n>=a)return s}else{if(n>=i)return o;if(n<=a)return s}else{if(n===i)return o;if(n===a)return s}return(n-i)/l*u+o}var vt=Bve;function Bve(n,e,t){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%";break}return Tb(n,e,t)}function Tb(n,e,t){return gt(n)?Pve(n).match(/%$/)?parseFloat(n)/100*e+(t||0):parseFloat(n):n==null?NaN:+n}function Wr(n,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),zH),n=(+n).toFixed(e),t?n:+n}function wo(n){return n.sort(function(e,t){return e-t}),n}function Os(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(n*e)/e===n)return t}return HC(n)}function HC(n){var e=n.toString().toLowerCase(),t=e.indexOf("e"),r=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-r)}function FH(n,e){var t=Math.log,r=Math.LN10,i=Math.floor(t(n[1]-n[0])/r),a=Math.round(t(Ds(e[1]-e[0]))/r),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function Vve(n,e){var t=qs(n,function(h,p){return h+(isNaN(p)?0:p)},0);if(t===0)return[];for(var r=Math.pow(10,e),i=et(n,function(h){return(isNaN(h)?0:h)/t*r*100}),a=r*100,o=et(i,function(h){return Math.floor(h)}),s=qs(o,function(h,p){return h+p},0),l=et(i,function(h,p){return h-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,f=0,d=l.length;f<d;++f)l[f]>u&&(u=l[f],c=f);++o[c],l[c]=0,++s}return et(o,function(h){return h/r})}function zve(n,e){var t=Math.max(Os(n),Os(e)),r=n+e;return t>zH?r:Wr(r,t)}var O3=9007199254740991;function $H(n){var e=Math.PI*2;return(n%e+e)%e}function hm(n){return n>-D3&&n<D3}var Fve=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function kd(n){if(n instanceof Date)return n;if(gt(n)){var e=Fve.exec(n);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(n==null)return new Date(NaN);return new Date(Math.round(n))}function $ve(n){return Math.pow(10,V_(n))}function V_(n){if(n===0)return 0;var e=Math.floor(Math.log(n)/Math.LN10);return n/Math.pow(10,e)>=10&&e++,e}function HH(n,e){var t=V_(n),r=Math.pow(10,t),i=n/r,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,n=a*r,t>=-20?+n.toFixed(t<0?-t:0):n}function c2(n,e){var t=(n.length-1)*e+1,r=Math.floor(t),i=+n[r-1],a=t-r;return a?i+a*(n[r]-i):i}function I3(n){n.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,r=0;r<n.length;){for(var i=n[r].interval,a=n[r].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,a[o]=o?1:1-t),e=i[o],t=a[o];i[0]===i[1]&&a[0]*a[1]!==1?n.splice(r,1):r++}return n;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Ul(n){var e=parseFloat(n);return e==n&&(e!==0||!gt(n)||n.indexOf("x")<=0)?e:NaN}function _N(n){return!isNaN(Ul(n))}function GH(){return Math.round(Math.random()*9)}function UH(n,e){return e===0?n:UH(e,n%e)}function R3(n,e){return n==null?e:e==null?n:n*e/UH(n,e)}var Hve="[ECharts] ",L3={},Gve=typeof console<"u"&&console.warn&&console.log;function z_(n,e,t){if(Gve){if(t){if(L3[e])return;L3[e]=!0}console[n](Hve+e)}}function WH(n,e){z_("log",n,e)}function Sr(n,e){z_("warn",n,e)}function Rn(n,e){z_("error",n,e)}function Xs(n){process.env.NODE_ENV!=="production"&&z_("warn","DEPRECATED: "+n,!0)}function Ur(n,e,t){process.env.NODE_ENV!=="production"&&Xs((t?"["+t+"]":"")+(n+" is deprecated; use "+e+" instead."))}function Sa(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t="";if(process.env.NODE_ENV!=="production"){var r=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":Ti(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":Vt(i)?"function () { ... }":uH(i)?i+"":null};t=et(n,function(i){if(gt(i))return i;var a=r(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=r(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return t}function Un(n){throw new Error(n)}function P3(n,e,t){return(e-n)*t+n}var jH="series\0",qH="\0_ec_\0";function ar(n){return n instanceof Array?n:n==null?[]:[n]}function sd(n,e,t){if(n){n[e]=n[e]||{},n.emphasis=n.emphasis||{},n.emphasis[e]=n.emphasis[e]||{};for(var r=0,i=t.length;r<i;r++){var a=t[r];!n.emphasis[e].hasOwnProperty(a)&&n[e].hasOwnProperty(a)&&(n.emphasis[e][a]=n[e][a])}}}var B3=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Op(n){return Gt(n)&&!Ze(n)&&!(n instanceof Date)?n.value:n}function Uve(n){return Gt(n)&&!(n instanceof Array)}function KH(n,e,t){var r=t==="normalMerge",i=t==="replaceMerge",a=t==="replaceAll";n=n||[],e=(e||[]).slice();var o=Nt();U(e,function(l,u){if(!Gt(l)){e[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!z3(l.id)&&V3(l.id),l.name!=null&&!z3(l.name)&&V3(l.name))});var s=Wve(n,o,t);return(r||i)&&jve(s,n,o,e),r&&qve(s,e),r||i?Kve(s,e,i):a&&Yve(s,e),Xve(s),s}function Wve(n,e,t){var r=[];if(t==="replaceAll")return r;for(var i=0;i<n.length;i++){var a=n[i];a&&a.id!=null&&e.set(a.id,i),r.push({existing:t==="replaceMerge"||cp(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return r}function jve(n,e,t,r){U(r,function(i,a){if(!(!i||i.id==null)){var o=Mg(i.id),s=t.get(o);if(s!=null){var l=n[s];Et(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],r[a]=null}}})}function qve(n,e){U(e,function(t,r){if(!(!t||t.name==null))for(var i=0;i<n.length;i++){var a=n[i].existing;if(!n[i].newOption&&a&&(a.id==null||t.id==null)&&!cp(t)&&!cp(a)&&YH("name",a,t)){n[i].newOption=t,e[r]=null;return}}})}function Kve(n,e,t){U(e,function(r){if(r){for(var i,a=0;(i=n[a])&&(i.newOption||cp(i.existing)||i.existing&&r.id!=null&&!YH("id",r,i.existing));)a++;i?(i.newOption=r,i.brandNew=t):n.push({newOption:r,brandNew:t,existing:null,keyInfo:null}),a++}})}function Yve(n,e){U(e,function(t){n.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Xve(n){var e=Nt();U(n,function(t){var r=t.existing;r&&e.set(r.id,t)}),U(n,function(t){var r=t.newOption;Et(!r||r.id==null||!e.get(r.id)||e.get(r.id)===t,"id duplicates: "+(r&&r.id)),r&&r.id!=null&&e.set(r.id,t),!t.keyInfo&&(t.keyInfo={})}),U(n,function(t,r){var i=t.existing,a=t.newOption,o=t.keyInfo;if(Gt(a)){if(o.name=a.name!=null?Mg(a.name):i?i.name:jH+r,i)o.id=Mg(i.id);else if(a.id!=null)o.id=Mg(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function YH(n,e,t){var r=oi(e[n],null),i=oi(t[n],null);return r!=null&&i!=null&&r===i}function Mg(n){if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;return oi(n,"")}function oi(n,e){return n==null?e:gt(n)?n:Ln(n)||hb(n)?n+"":e}function V3(n){process.env.NODE_ENV!=="production"&&Sr("`"+n+"` is invalid id or name. Must be a string or number.")}function z3(n){return hb(n)||_N(n)}function SN(n){var e=n.name;return!!(e&&e.indexOf(jH))}function cp(n){return n&&n.id!=null&&Mg(n.id).indexOf(qH)===0}function Zve(n){return qH+n}function Jve(n,e,t){U(n,function(r){var i=r.newOption;Gt(i)&&(r.keyInfo.mainType=e,r.keyInfo.subType=Qve(e,i,r.existing,t))})}function Qve(n,e,t,r){var i=e.type?e.type:t?t.subType:r.determineSubType(n,e);return i}function ege(n,e){var t={},r={};return i(n||[],t),i(e||[],r,t),[a(t),a(r)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var f=oi(o[u].seriesId,null);if(f==null)return;for(var d=ar(o[u].dataIndex),h=l&&l[f],p=0,v=d.length;p<v;p++){var g=d[p];h&&h[g]?h[g]=null:(s[f]||(s[f]={}))[g]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function ld(n,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return Ze(e.dataIndex)?et(e.dataIndex,function(t){return n.indexOfRawIndex(t)}):n.indexOfRawIndex(e.dataIndex);if(e.name!=null)return Ze(e.name)?et(e.name,function(t){return n.indexOfName(t)}):n.indexOfName(e.name)}function Sn(){var n="__ec_inner_"+tge++;return function(e){return e[n]||(e[n]={})}}var tge=GH();function Uh(n,e,t){var r=wN(e,t),i=r.mainTypeSpecified,a=r.queryOptionMap,o=r.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var f=Ip(n,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=f.models,s[c+"Model"]=f.models[0]}),s}function wN(n,e){var t;if(gt(n)){var r={};r[n+"Index"]=0,t=r}else t=n;var i=Nt(),a={},o=!1;return U(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],f=(u[2]||"").toLowerCase();if(!(!c||!f||e&&e.includeMainTypes&&dn(e.includeMainTypes,c)<0)){o=o||!!c;var d=i.get(c)||i.set(c,{});d[f]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var Nr={useDefault:!0,enableAll:!1,enableNone:!1},nge={useDefault:!1,enableAll:!0,enableNone:!0};function Ip(n,e,t,r){r=r||Nr;var i=t.index,a=t.id,o=t.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=r.useDefault&&(l=n.getComponent(e))?[l]:[],s}if(i==="none"||i===!1){if(r.enableNone)return s.models=[],s;process.env.NODE_ENV!=="production"&&Rn('`"none"` or `false` is not a valid value on index option.'),i=-1}return i==="all"&&(r.enableAll?i=a=o=null:(process.env.NODE_ENV!=="production"&&Rn('`"all"` is not a valid value on index option.'),i=-1)),s.models=n.queryComponents({mainType:e,index:i,id:a,name:o}),s}function XH(n,e,t){n.setAttribute?n.setAttribute(e,t):n[e]=t}function rge(n,e){return n.getAttribute?n.getAttribute(e):n[e]}function ige(n){return n==="auto"?En.domSupported?"html":"richText":n||"html"}function GC(n,e){var t=Nt(),r=[];return U(n,function(i){var a=e(i);(t.get(a)||(r.push(a),t.set(a,[]))).push(i)}),{keys:r,buckets:t}}function ZH(n,e,t,r,i){var a=e==null||e==="auto";if(r==null)return r;if(Ln(r)){var o=P3(t||0,r,i);return Wr(o,a?Math.max(Os(t||0),Os(r)):e)}else{if(gt(r))return i<1?t:r;for(var s=[],l=t,u=r,c=Math.max(l?l.length:0,u.length),f=0;f<c;++f){var d=n.getDimensionInfo(f);if(d&&d.type==="ordinal")s[f]=(i<1&&l?l:u)[f];else{var h=l&&l[f]?l[f]:0,p=u[f],o=P3(h,p,i);s[f]=Wr(o,a?Math.max(Os(h),Os(p)):e)}}return s}}var ac=(function(){function n(){}return n.prototype.reset=function(e,t,r,i){return this._list=e,this._step=i=i||1,this._idx=t,this._end=r??(i>0?e.length:0),this.item=null,this.key=NaN,this},n.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},n})();function f2(n){n.option=n.parentModel=n.ecModel=null}var age=".",$c="___EC__COMPONENT__CONTAINER___",JH="___EC__EXTENDED_CLASS___";function Is(n){var e={main:"",sub:""};if(n){var t=n.split(age);e.main=t[0]||"",e.sub=t[1]||""}return e}function oge(n){Et(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal')}function sge(n){return!!(n&&n[JH])}function kN(n,e){n.$constructor=n,n.extend=function(t){process.env.NODE_ENV!=="production"&&U(e,function(a){t[a]||console.warn("Method `"+a+"` should be implemented"+(t.type?" in "+t.type:"")+".")});var r=this,i;return lge(r)?i=(function(a){Ie(o,a);function o(){return a.apply(this,arguments)||this}return o})(r):(i=function(){(t.$constructor||r).apply(this,arguments)},dpe(i,this)),Ke(i.prototype,t),i[JH]=!0,i.extend=this.extend,i.superCall=fge,i.superApply=dge,i.superClass=r,i}}function lge(n){return Vt(n)&&/^class\s/.test(Function.prototype.toString.call(n))}function QH(n,e){n.extend=e.extend}var uge=Math.round(Math.random()*10);function cge(n){var e=["__\0is_clz",uge++].join("_");n.prototype[e]=!0,process.env.NODE_ENV!=="production"&&Et(!n.isInstance,'The method "is" can not be defined.'),n.isInstance=function(t){return!!(t&&t[e])}}function fge(n,e){for(var t=[],r=2;r<arguments.length;r++)t[r-2]=arguments[r];return this.superClass.prototype[e].apply(n,t)}function dge(n,e,t){return this.superClass.prototype[e].apply(n,t)}function F_(n){var e={};n.registerClass=function(r){var i=r.type||r.prototype.type;if(i){oge(i),r.prototype.type=i;var a=Is(i);if(!a.sub)process.env.NODE_ENV!=="production"&&e[a.main]&&console.warn(a.main+" exists."),e[a.main]=r;else if(a.sub!==$c){var o=t(a);o[a.sub]=r}}return r},n.getClass=function(r,i,a){var o=e[r];if(o&&o[$c]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+r+"."+(i||"")+" is used but not imported.":r+".type should be specified.");return o},n.getClassesByMainType=function(r){var i=Is(r),a=[],o=e[i.main];return o&&o[$c]?U(o,function(s,l){l!==$c&&a.push(s)}):a.push(o),a},n.hasClass=function(r){var i=Is(r);return!!e[i.main]},n.getAllClassMainTypes=function(){var r=[];return U(e,function(i,a){r.push(a)}),r},n.hasSubTypes=function(r){var i=Is(r),a=e[i.main];return a&&a[$c]};function t(r){var i=e[r.main];return(!i||!i[$c])&&(i=e[r.main]={},i[$c]=!0),i}}function ud(n,e){for(var t=0;t<n.length;t++)n[t][1]||(n[t][1]=n[t][0]);return e=e||!1,function(r,i,a){for(var o={},s=0;s<n.length;s++){var l=n[s][1];if(!(i&&dn(i,l)>=0||a&&dn(a,l)<0)){var u=r.getShallow(l,e);u!=null&&(o[n[s][0]]=u)}}return o}}var hge=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],pge=ud(hge),vge=(function(){function n(){}return n.prototype.getAreaStyle=function(e,t){return pge(this,e,t)},n})(),UC=new lp(50);function gge(n){if(typeof n=="string"){var e=UC.get(n);return e&&e.image}else return n}function TN(n,e,t,r,i){if(n)if(typeof n=="string"){if(e&&e.__zrImageSrc===n||!t)return e;var a=UC.get(n),o={hostEl:t,cb:r,cbPayload:i};return a?(e=a.image,!$_(e)&&a.pending.push(o)):(e=Xo.loadImage(n,F3,F3),e.__zrImageSrc=n,UC.put(n,e.__cachedImgObj={image:e,pending:[o]})),e}else return n;else return e}function F3(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<n.pending.length;e++){var t=n.pending[e],r=t.cb;r&&r(this,t.cbPayload),t.hostEl.dirty()}n.pending.length=0}function $_(n){return n&&n.width&&n.height}var d2=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function mge(n,e,t,r,i,a){if(!t){n.text="",n.isTruncated=!1;return}var o=(e+"").split(`
|
|
218
218
|
`);a=eG(t,r,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)tG(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;n.text=o.join(`
|
|
219
219
|
`),n.isTruncated=s}function eG(n,e,t,r){r=r||{};var i=Ke({},r);t=At(t,"..."),i.maxIterations=At(r.maxIterations,2);var a=i.minChar=At(r.minChar,0),o=i.fontMeasureInfo=Fs(e),s=o.asciiCharWidth;i.placeholder=At(r.placeholder,"");for(var l=n=Math.max(0,n-1),u=0;u<a&&l>=s;u++)l-=s;var c=$s(o,t);return c>l&&(t="",c=0),l=n-c,i.ellipsis=t,i.ellipsisWidth=c,i.contentWidth=l,i.containerWidth=n,i}function tG(n,e,t){var r=t.containerWidth,i=t.contentWidth,a=t.fontMeasureInfo;if(!r){n.textLine="",n.isTruncated=!1;return}var o=$s(a,e);if(o<=r){n.textLine=e,n.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?yge(e,i,a):o>0?Math.floor(e.length*i/o):0;e=e.substr(0,l),o=$s(a,e)}e===""&&(e=t.placeholder),n.textLine=e,n.isTruncated=!0}function yge(n,e,t){for(var r=0,i=0,a=n.length;i<a&&r<e;i++)r+=PH(t,n.charCodeAt(i));return i}function bge(n,e,t,r){var i=CN(n),a=e.overflow,o=e.padding,s=o?o[1]+o[3]:0,l=o?o[0]+o[2]:0,u=e.font,c=a==="truncate",f=Ym(u),d=At(e.lineHeight,f),h=e.lineOverflow==="truncate",p=!1,v=e.width;v==null&&t!=null&&(v=t-s);var g=e.height;g==null&&r!=null&&(g=r-l);var y;v!=null&&(a==="break"||a==="breakAll")?y=i?nG(i,e.font,v,a==="breakAll",0).lines:[]:y=i?i.split(`
|
|
@@ -271,7 +271,7 @@ echarts.use([`+F+"]);":"Unknown series "+V))}return}if(f==="tooltip"){if(_){proc
|
|
|
271
271
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
272
272
|
2. Cannot start or end with "-"
|
|
273
273
|
3. "-" cannot repeat`);Cr.customSchemes.push([n,e])}function MLe(){Cr.scanner=xLe(Cr.customSchemes);for(let n=0;n<Cr.tokenQueue.length;n++)Cr.tokenQueue[n][1]({scanner:Cr.scanner});Cr.parser=wLe(Cr.scanner.tokens);for(let n=0;n<Cr.pluginQueue.length;n++)Cr.pluginQueue[n][1]({scanner:Cr.scanner,parser:Cr.parser});return Cr.initialized=!0,Cr}function LO(n){return Cr.initialized||MLe(),kLe(Cr.parser.start,n,TY(Cr.scanner.start,n))}LO.scan=TY;function EY(n,e=null,t=null){if(e&&typeof e=="object"){if(t)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);t=e,e=null}const r=new RO(t),i=LO(n),a=[];for(let o=0;o<i.length;o++){const s=i[o];s.isLink&&(!e||s.t===e)&&r.check(s)&&a.push(s.toFormattedObject(r))}return a}function ALe(n){return n.length===1?n[0].isLink:n.length===3&&n[1].isLink?["()","[]"].includes(n[0].value+n[2].value):!1}function NLe(n){return new $n({key:new Wn("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(u=>u.docChanged)&&!t.doc.eq(r.doc),a=e.some(u=>u.getMeta("preventAutolink"));if(!i||a)return;const{tr:o}=r,s=rre(t.doc,[...e]);if(ure(s).forEach(({newRange:u})=>{const c=are(r.doc,u,h=>h.isTextblock);let f,d;if(c.length>1?(f=c[0],d=r.doc.textBetween(f.pos,f.pos+f.node.nodeSize,void 0," ")):c.length&&r.doc.textBetween(u.from,u.to," "," ").endsWith(" ")&&(f=c[0],d=r.doc.textBetween(f.pos,u.to,void 0," ")),f&&d){const h=d.split(" ").filter(y=>y!=="");if(h.length<=0)return!1;const p=h[h.length-1],v=f.pos+d.lastIndexOf(p);if(!p)return!1;const g=LO(p).map(y=>y.toObject(n.defaultProtocol));if(!ALe(g))return!1;g.filter(y=>y.isLink).map(y=>({...y,from:v+y.start+1,to:v+y.end+1})).filter(y=>r.schema.marks.code?!r.doc.rangeHasMark(y.from,y.to,r.schema.marks.code):!0).filter(y=>n.validate(y.value)).filter(y=>n.shouldAutoLink(y.value)).forEach(y=>{VA(y.from,y.to,r.doc).some(b=>b.mark.type===n.type)||o.addMark(y.from,y.to,n.type.create({href:y.href}))})}}),!!o.steps.length)return o}})}function DLe(n){return new $n({key:new Wn("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,a;if(r.button!==0||!e.editable)return!1;let o=r.target;const s=[];for(;o.nodeName!=="DIV";)s.push(o),o=o.parentNode;if(!s.find(d=>d.nodeName==="A"))return!1;const l=aF(e.state,n.type.name),u=r.target,c=(i=u?.href)!==null&&i!==void 0?i:l.href,f=(a=u?.target)!==null&&a!==void 0?a:l.target;return u&&c?(window.open(c,f),!0):!1}}})}function OLe(n){return new $n({key:new Wn("handlePasteLink"),props:{handlePaste:(e,t,r)=>{const{state:i}=e,{selection:a}=i,{empty:o}=a;if(o)return!1;let s="";r.content.forEach(u=>{s+=u.textContent});const l=EY(s,{defaultProtocol:n.defaultProtocol}).find(u=>u.isLink&&u.value===s);return!s||!l?!1:n.editor.commands.setMark(n.type,{href:l.href})}}})}const ILe=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function uf(n,e){const t=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&t.push(i)}),!n||n.replace(ILe,"").match(new RegExp(`^(?:(?:${t.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const RLe=yc.create({name:"link",priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(n=>{if(typeof n=="string"){QV(n);return}QV(n.scheme,n.optionalSlashes)})},onDestroy(){ELe()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:"http",HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},isAllowedUri:(n,e)=>!!uf(n,e.protocols),validate:n=>!!n,shouldAutoLink:n=>!!n}},addAttributes(){return{href:{default:null,parseHTML(n){return n.getAttribute("href")}},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:"a[href]",getAttrs:n=>{const e=n.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:t=>!!uf(t,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:n}){return this.options.isAllowedUri(n.href,{defaultValidate:e=>!!uf(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",Jn(this.options.HTMLAttributes,n),0]:["a",Jn(this.options.HTMLAttributes,{...n,href:""}),0]},addCommands(){return{setLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!uf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,n).setMeta("preventAutolink",!0).run():!1},toggleLink:n=>({chain:e})=>{const{href:t}=n;return this.options.isAllowedUri(t,{defaultValidate:r=>!!uf(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[tb({find:n=>{const e=[];if(n){const{protocols:t,defaultProtocol:r}=this.options,i=EY(n).filter(a=>a.isLink&&this.options.isAllowedUri(a.value,{defaultValidate:o=>!!uf(o,t),protocols:t,defaultProtocol:r}));i.length&&i.forEach(a=>e.push({text:a.value,data:{href:a.href},index:a.start}))}return e},type:this.type,getAttributes:n=>{var e;return{href:(e=n.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const n=[],{protocols:e,defaultProtocol:t}=this.options;return this.options.autolink&&n.push(NLe({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!uf(i,e),protocols:e,defaultProtocol:t}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&n.push(DLe({type:this.type})),this.options.linkOnPaste&&n.push(OLe({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),n}}),MY=RLe.extend({addStorage(){return{edit:!1,meta:{}}},addProseMirrorPlugins(){return[new $n({props:{handleClick(n,e,t){const r=t.target;if(r.tagName==="A"){const i=r.getAttribute("href");return n.dispatch(n.state.tr.setMeta("link-click",{target:r,href:i,pos:e})),!0}return!1}}})]},onTransaction({transaction:n}){const e=n.getMeta("link-click");e&&(this.storage.edit=!0,this.storage.meta=e)}});MY.configure({openOnClick:n=>!n.editor.isEditable});const LLe=fr.create({name:"margin",addOptions(){return{types:["heading","paragraph","audio","codeBlock","file","iframe","image","toc","video","horizontalRule","table","bulletList","orderedList","taskList","echarts"],margin:{top:0,bottom:0}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{margin:{default:{},parseHTML:n=>{const{marginTop:e,marginBottom:t}=n.style;if(e===""&&t===""||e==="0px"&&t==="0px")return{};const r={top:"0px",bottom:"0px"};return e&&e!=="0px"&&(r.top=e.replace(/px/g,"")),t&&t!=="0px"&&(r.bottom=t.replace(/px/g,"")),r},renderHTML:({margin:n})=>{if(!Object.keys(n).length)return{};const{top:e,bottom:t}=n;let r="";return e&&e!==""&&(r+=`margin-top: ${e}px;`),t&&t!==""&&(r+=`margin-bottom: ${t}px;`),{style:r}}}}}]},addCommands(){return{setMargin:n=>({editor:e,commands:t})=>this.options.types.every(r=>{const{margin:i}=e.getAttributes(r);return t.updateAttributes(r,{margin:Object.assign({},i,n)})}),unsetMargin:()=>({commands:n})=>this.options.types.every(e=>n.resetAttributes(e,"margin"))}}});function PLe(n){var e;const{char:t,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:a,startOfLine:o,$position:s}=n,l=r&&!i,u=Hre(t),c=new RegExp(`\\s${u}$`),f=o?"^":"",d=i?"":u,h=l?new RegExp(`${f}${u}.*?(?=\\s${d}|$)`,"gm"):new RegExp(`${f}(?:^)?${u}[^\\s${d}]*`,"gm"),p=((e=s.nodeBefore)===null||e===void 0?void 0:e.isText)&&s.nodeBefore.text;if(!p)return null;const v=s.pos-p.length,g=Array.from(p.matchAll(h)).pop();if(!g||g.input===void 0||g.index===void 0)return null;const y=g.input.slice(Math.max(0,g.index-1),g.index),b=new RegExp(`^[${a?.join("")}\0]?$`).test(y);if(a!==null&&!b)return null;const _=v+g.index;let x=_+g[0].length;return l&&c.test(p.slice(x-1,x+1))&&(g[0]+=" ",x+=1),_<s.pos&&x>=s.pos?{range:{from:_,to:x},query:g[0].slice(t.length),text:g[0]}:null}const BLe=new Wn("suggestion");function VLe({pluginKey:n=BLe,editor:e,char:t="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:a=[" "],startOfLine:o=!1,decorationTag:s="span",decorationClass:l="suggestion",command:u=()=>null,items:c=()=>[],render:f=()=>({}),allow:d=()=>!0,findSuggestionMatch:h=PLe}){let p;const v=f?.(),g=new $n({key:n,view(){return{update:async(y,b)=>{var _,x,T,k,C,D,O;const R=(_=this.key)===null||_===void 0?void 0:_.getState(b),V=(x=this.key)===null||x===void 0?void 0:x.getState(y.state),F=R.active&&V.active&&R.range.from!==V.range.from,$=!R.active&&V.active,J=R.active&&!V.active,te=!$&&!J&&R.query!==V.query,Q=$||F&&te,ne=te||F,ee=J||F&&te;if(!Q&&!ne&&!ee)return;const de=ee&&!Q?R:V,ke=y.dom.querySelector(`[data-decoration-id="${de.decorationId}"]`);p={editor:e,range:de.range,query:de.query,text:de.text,items:[],command:Ee=>u({editor:e,range:de.range,props:Ee}),decorationNode:ke,clientRect:ke?()=>{var Ee;const{decorationId:xe}=(Ee=this.key)===null||Ee===void 0?void 0:Ee.getState(e.state),De=y.dom.querySelector(`[data-decoration-id="${xe}"]`);return De?.getBoundingClientRect()||null}:null},Q&&((T=v?.onBeforeStart)===null||T===void 0||T.call(v,p)),ne&&((k=v?.onBeforeUpdate)===null||k===void 0||k.call(v,p)),(ne||Q)&&(p.items=await c({editor:e,query:de.query})),ee&&((C=v?.onExit)===null||C===void 0||C.call(v,p)),ne&&((D=v?.onUpdate)===null||D===void 0||D.call(v,p)),Q&&((O=v?.onStart)===null||O===void 0||O.call(v,p))},destroy:()=>{var y;p&&((y=v?.onExit)===null||y===void 0||y.call(v,p))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(y,b,_,x){const{isEditable:T}=e,{composing:k}=e.view,{selection:C}=y,{empty:D,from:O}=C,R={...b};if(R.composing=k,T&&(D||e.view.composing)){(O<b.range.from||O>b.range.to)&&!k&&!b.composing&&(R.active=!1);const V=h({char:t,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:a,startOfLine:o,$position:C.$from}),F=`id_${Math.floor(Math.random()*4294967295)}`;V&&d({editor:e,state:x,range:V.range,isActive:b.active})?(R.active=!0,R.decorationId=b.decorationId?b.decorationId:F,R.range=V.range,R.query=V.query,R.text=V.text):R.active=!1}else R.active=!1;return R.active||(R.decorationId=null,R.range={from:0,to:0},R.query=null,R.text=null),R}},props:{handleKeyDown(y,b){var _;const{active:x,range:T}=g.getState(y.state);return x&&((_=v?.onKeyDown)===null||_===void 0?void 0:_.call(v,{view:y,event:b,range:T}))||!1},decorations(y){const{active:b,range:_,decorationId:x}=g.getState(y);return b?hr.create(y.doc,[ii.inline(_.from,_.to,{nodeName:s,class:l,"data-decoration-id":x})]):null}}});return g}const zLe=new Wn("mention"),FLe=yi.create({name:"mention",priority:101,addOptions(){return{HTMLAttributes:{},renderText({options:n,node:e}){var t;return`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`},deleteTriggerWithBackspace:!1,renderHTML({options:n,node:e}){var t;return["span",Jn(this.HTMLAttributes,n.HTMLAttributes),`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`]},suggestion:{char:"@",pluginKey:zLe,command:({editor:n,range:e,props:t})=>{var r,i,a;const o=n.view.state.selection.$to.nodeAfter;((r=o?.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:this.name,attrs:t},{type:"text",text:" "}]).run(),(a=(i=n.view.dom.ownerDocument.defaultView)===null||i===void 0?void 0:i.getSelection())===null||a===void 0||a.collapseToEnd()},allow:({state:n,range:e})=>{const t=n.doc.resolve(e.from),r=n.schema.nodes[this.name];return!!t.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:e}){if(this.options.renderLabel!==void 0)return console.warn("renderLabel is deprecated use renderText and renderHTML instead"),["span",Jn({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:n})];const t={...this.options};t.HTMLAttributes=Jn({"data-type":this.name},this.options.HTMLAttributes,e);const r=this.options.renderHTML({options:t,node:n});return typeof r=="string"?["span",Jn({"data-type":this.name},this.options.HTMLAttributes,e),r]:r},renderText({node:n}){return this.options.renderLabel!==void 0?(console.warn("renderLabel is deprecated use renderText and renderHTML instead"),this.options.renderLabel({options:this.options,node:n})):this.options.renderText({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:e})=>{let t=!1;const{selection:r}=e,{empty:i,anchor:a}=r;return i?(e.doc.nodesBetween(a-1,a,(o,s)=>{if(o.type.name===this.name)return t=!0,n.insertText(this.options.deleteTriggerWithBackspace?"":this.options.suggestion.char||"",s,s+o.nodeSize),!1}),t):!1})}},addProseMirrorPlugins(){return[VLe({editor:this.editor,...this.options.suggestion})]}}),$Le=FLe.extend({addAttributes(){return{id:{default:null},label:{default:null}}},addCommands(){return{insertMention:()=>({commands:n})=>n.insertContent(` ${this.options?.suggestion?.char??"@"}`)}}}),HLe=$Le.configure({HTMLAttributes:{class:"white-node-mention"}}),GLe={key:0,class:"list-none text-[#333] text-[14px]"},ULe={class:"bg-white border rounded-md shadow-md p-2 max-h-[300px] overflow-y-auto"},WLe=["onClick"],jLe=m.defineComponent({__name:"mentions",props:{items:{type:Array,required:!0},command:{type:Function,required:!0}},setup(n,{expose:e}){const t=n,r=m.ref(0);m.watch(()=>t.items,()=>{r.value=0});const i=({event:u})=>u.key==="ArrowUp"?(a(),!0):u.key==="ArrowDown"?(o(),!0):u.key==="Enter"?t.items.length===0?!1:(s(),!0):!1,a=()=>{r.value=(r.value+t.items.length-1)%t.items.length},o=()=>{r.value=(r.value+1)%t.items.length},s=()=>{l(r.value)},l=u=>{const c=t.items[u];c&&t.command(c)};return e({onKeyDown:i}),(u,c)=>n.items.length>0?(m.openBlock(),m.createElementBlock("div",GLe,[m.createElementVNode("ul",ULe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(n.items,(f,d)=>(m.openBlock(),m.createElementBlock("li",{key:d,class:m.normalizeClass(["!px-2 cursor-pointer h-[30px] flex items-center rounded-md hover:bg-[#f5f5f5]",{"bg-[#007bff] text-white hover:!bg-[#007bff] hover:text-white":d===r.value}]),onClick:h=>l(d)},m.toDisplayString(f.label),11,WLe))),128))])])):m.createCommentVNode("",!0)}}),qLe=(n,e)=>({items:({query:t})=>n.filter(r=>r.label.includes(t)).slice(0,10),command:({editor:t,range:r,props:i})=>{console.log(i),t.chain().focus().deleteRange(r).insertContent({type:"mention",attrs:{id:i.id,label:i.label}}).run()},render:()=>{let t,r;return{onStart:i=>{t=new DF(jLe,{props:i,editor:i.editor}),i.clientRect&&(r=Zl("body",{getReferenceClientRect:i.clientRect,appendTo:document.querySelector(`#${e}`),content:t.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(i){t.updateProps(i),i.clientRect&&r[0].setProps({getReferenceClientRect:i.clientRect})},onKeyDown(i){return i.event.key==="Escape"?(r[0].hide(),!0):t.ref?.onKeyDown(i)},onExit(){r[0].destroy(),t.destroy()}}}}),KLe=fr.create({name:"nodeAlign",addOptions(){return{defaultAlignment:"center",alignments:["flex-start","center","flex-end"],types:["image","video","audio","iframe","file","echarts"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{nodeAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.justifyContent||this.options.defaultAlignment,renderHTML:n=>n.nodeAlign===this.options.defaultAlignment?{}:{style:`justify-content: ${n.nodeAlign}`}}}}]},addCommands(){return{setNodeAlign:n=>({state:e,dispatch:t,tr:r})=>{if(!this.options.alignments.includes(n))return!1;const{selection:i}=e;let a=!1;return e.doc.nodesBetween(i.from,i.to,(o,s)=>{if(this.options.types.includes(o.type.name))return r.setNodeMarkup(s,void 0,{...o.attrs,nodeAlign:n}),a=!0,!1}),a&&t&&t(r),a},unsetNodeAlign:()=>({state:n,dispatch:e,tr:t})=>{const{selection:r}=n;let i=!1;return n.doc.nodesBetween(r.from,r.to,(a,o)=>{if(this.options.types.includes(a.type.name))return t.setNodeMarkup(o,void 0,{...a.attrs,nodeAlign:this.options.defaultAlignment}),i=!0,!1}),i&&e&&e(t),i}}}}),YLe="listItem",ez="textStyle",tz=/^(\d+)\.\s$/,XLe=yi.create({name:"orderedList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:n=>n.hasAttribute("start")?parseInt(n.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:n=>n.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:n}){const{start:e,...t}=n;return e===1?["ol",Jn(this.options.HTMLAttributes,t),0]:["ol",Jn(this.options.HTMLAttributes,n),0]},addCommands(){return{toggleOrderedList:()=>({commands:n,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(YLe,this.editor.getAttributes(ez)).run():n.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let n=Jg({find:tz,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)&&(n=Jg({find:tz,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(ez)}),joinPredicate:(e,t)=>t.childCount+t.attrs.start===+e[1],editor:this.editor})),[n]}}),ZLe=XLe.extend({content:"listItem*",addAttributes(){return{...this.parent?.(),listType:{default:"decimal",parseHTML:n=>n.style.getPropertyValue("list-style-type")||"decimal",renderHTML:({listType:n})=>({style:`list-style-type: ${n}`,type:n})}}}}),JLe=fr.create({name:"selection",addProseMirrorPlugins(){const{editor:n}=this;return[new $n({key:new Wn("selection"),props:{decorations(e){return e.selection.empty||n.isFocused?null:hr.create(e.doc,[ii.inline(e.selection.from,e.selection.to,{class:"white-selection"})])}}})]},addCommands(){return{setCurrentNodeSelection:()=>({editor:n,chain:e})=>{n.commands.selectParentNode();const{$anchor:t}=n.state.selection;return e().setNodeSelection(t.pos-t.depth).run()},deleteSelectionNode:()=>({editor:n,commands:e})=>{const t=Fl(n);return t?e.deleteSelection()?!0:e.deleteNode(t.type.name):!1}}}});function Fl(n){const{$anchor:e,node:t}=n.state.selection;return t?.type?.isAtom?t:(n.commands.selectParentNode(),e.node(1)||t)}function QLe(n){const{from:e,to:t,empty:r}=n.state.selection;return r?"":n.state.doc.textBetween(e,t,"")}var zM,FM;if(typeof WeakMap<"u"){let n=new WeakMap;zM=e=>n.get(e),FM=(e,t)=>(n.set(e,t),t)}else{const n=[];let t=0;zM=r=>{for(let i=0;i<n.length;i+=2)if(n[i]==r)return n[i+1]},FM=(r,i)=>(t==10&&(t=0),n[t++]=r,n[t++]=i)}var Br=class{constructor(n,e,t,r){this.width=n,this.height=e,this.map=t,this.problems=r}findCell(n){for(let e=0;e<this.map.length;e++){const t=this.map[e];if(t!=n)continue;const r=e%this.width,i=e/this.width|0;let a=r+1,o=i+1;for(let s=1;a<this.width&&this.map[e+s]==t;s++)a++;for(let s=1;o<this.height&&this.map[e+this.width*s]==t;s++)o++;return{left:r,top:i,right:a,bottom:o}}throw new RangeError(`No cell with offset ${n} found`)}colCount(n){for(let e=0;e<this.map.length;e++)if(this.map[e]==n)return e%this.width;throw new RangeError(`No cell with offset ${n} found`)}nextCell(n,e,t){const{left:r,right:i,top:a,bottom:o}=this.findCell(n);return e=="horiz"?(t<0?r==0:i==this.width)?null:this.map[a*this.width+(t<0?r-1:i)]:(t<0?a==0:o==this.height)?null:this.map[r+this.width*(t<0?a-1:o)]}rectBetween(n,e){const{left:t,right:r,top:i,bottom:a}=this.findCell(n),{left:o,right:s,top:l,bottom:u}=this.findCell(e);return{left:Math.min(t,o),top:Math.min(i,l),right:Math.max(r,s),bottom:Math.max(a,u)}}cellsInRect(n){const e=[],t={};for(let r=n.top;r<n.bottom;r++)for(let i=n.left;i<n.right;i++){const a=r*this.width+i,o=this.map[a];t[o]||(t[o]=!0,!(i==n.left&&i&&this.map[a-1]==o||r==n.top&&r&&this.map[a-this.width]==o)&&e.push(o))}return e}positionAt(n,e,t){for(let r=0,i=0;;r++){const a=i+t.child(r).nodeSize;if(r==n){let o=e+n*this.width;const s=(n+1)*this.width;for(;o<s&&this.map[o]<i;)o++;return o==s?a-1:this.map[o]}i=a}}static get(n){return zM(n)||FM(n,e3e(n))}};function e3e(n){if(n.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+n.type.name);const e=t3e(n),t=n.childCount,r=[];let i=0,a=null;const o=[];for(let u=0,c=e*t;u<c;u++)r[u]=0;for(let u=0,c=0;u<t;u++){const f=n.child(u);c++;for(let p=0;;p++){for(;i<r.length&&r[i]!=0;)i++;if(p==f.childCount)break;const v=f.child(p),{colspan:g,rowspan:y,colwidth:b}=v.attrs;for(let _=0;_<y;_++){if(_+u>=t){(a||(a=[])).push({type:"overlong_rowspan",pos:c,n:y-_});break}const x=i+_*e;for(let T=0;T<g;T++){r[x+T]==0?r[x+T]=c:(a||(a=[])).push({type:"collision",row:u,pos:c,n:g-T});const k=b&&b[T];if(k){const C=(x+T)%e*2,D=o[C];D==null||D!=k&&o[C+1]==1?(o[C]=k,o[C+1]=1):D==k&&o[C+1]++}}}i+=g,c+=v.nodeSize}const d=(u+1)*e;let h=0;for(;i<d;)r[i++]==0&&h++;h&&(a||(a=[])).push({type:"missing",row:u,n:h}),c++}(e===0||t===0)&&(a||(a=[])).push({type:"zero_sized"});const s=new Br(e,t,r,a);let l=!1;for(let u=0;!l&&u<o.length;u+=2)o[u]!=null&&o[u+1]<t&&(l=!0);return l&&n3e(s,o,n),s}function t3e(n){let e=-1,t=!1;for(let r=0;r<n.childCount;r++){const i=n.child(r);let a=0;if(t)for(let o=0;o<r;o++){const s=n.child(o);for(let l=0;l<s.childCount;l++){const u=s.child(l);o+u.attrs.rowspan>r&&(a+=u.attrs.colspan)}}for(let o=0;o<i.childCount;o++){const s=i.child(o);a+=s.attrs.colspan,s.attrs.rowspan>1&&(t=!0)}e==-1?e=a:e!=a&&(e=Math.max(e,a))}return e}function n3e(n,e,t){n.problems||(n.problems=[]);const r={};for(let i=0;i<n.map.length;i++){const a=n.map[i];if(r[a])continue;r[a]=!0;const o=t.nodeAt(a);if(!o)throw new RangeError(`No cell with offset ${a} found`);let s=null;const l=o.attrs;for(let u=0;u<l.colspan;u++){const c=(i+u)%n.width,f=e[c*2];f!=null&&(!l.colwidth||l.colwidth[u]!=f)&&((s||(s=r3e(l)))[u]=f)}s&&n.problems.unshift({type:"colwidth mismatch",pos:a,colwidth:s})}}function r3e(n){if(n.colwidth)return n.colwidth.slice();const e=[];for(let t=0;t<n.colspan;t++)e.push(0);return e}function ea(n){let e=n.cached.tableNodeTypes;if(!e){e=n.cached.tableNodeTypes={};for(const t in n.nodes){const r=n.nodes[t],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Bu=new Wn("selectingCells");function qp(n){for(let e=n.depth-1;e>0;e--)if(n.node(e).type.spec.tableRole=="row")return n.node(0).resolve(n.before(e+1));return null}function i3e(n){for(let e=n.depth;e>0;e--){const t=n.node(e).type.spec.tableRole;if(t==="cell"||t==="header_cell")return n.node(e)}return null}function is(n){const e=n.selection.$head;for(let t=e.depth;t>0;t--)if(e.node(t).type.spec.tableRole=="row")return!0;return!1}function bS(n){const e=n.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const t=qp(e.$head)||a3e(e.$head);if(t)return t;throw new RangeError(`No cell found around position ${e.head}`)}function a3e(n){for(let e=n.nodeAfter,t=n.pos;e;e=e.firstChild,t++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t)}for(let e=n.nodeBefore,t=n.pos;e;e=e.lastChild,t--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return n.doc.resolve(t-e.nodeSize)}}function $M(n){return n.parent.type.spec.tableRole=="row"&&!!n.nodeAfter}function o3e(n){return n.node(0).resolve(n.pos+n.nodeAfter.nodeSize)}function PO(n,e){return n.depth==e.depth&&n.pos>=e.start(-1)&&n.pos<=e.end(-1)}function AY(n,e,t){const r=n.node(-1),i=Br.get(r),a=n.start(-1),o=i.nextCell(n.pos-a,e,t);return o==null?null:n.node(0).resolve(a+o)}function gd(n,e,t=1){const r={...n,colspan:n.colspan-t};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,t),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function NY(n,e,t=1){const r={...n,colspan:n.colspan+t};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<t;i++)r.colwidth.splice(e,0,0)}return r}function s3e(n,e,t){const r=ea(e.type.schema).header_cell;for(let i=0;i<n.height;i++)if(e.nodeAt(n.map[t+i*n.width]).type!=r)return!1;return!0}var wr=class bl extends fn{constructor(e,t=e){const r=e.node(-1),i=Br.get(r),a=e.start(-1),o=i.rectBetween(e.pos-a,t.pos-a),s=e.node(0),l=i.cellsInRect(o).filter(c=>c!=t.pos-a);l.unshift(t.pos-a);const u=l.map(c=>{const f=r.nodeAt(c);if(!f)throw RangeError(`No cell with offset ${c} found`);const d=a+c+1;return new j9(s.resolve(d),s.resolve(d+f.content.size))});super(u[0].$from,u[0].$to,u),this.$anchorCell=e,this.$headCell=t}map(e,t){const r=e.resolve(t.map(this.$anchorCell.pos)),i=e.resolve(t.map(this.$headCell.pos));if($M(r)&&$M(i)&&PO(r,i)){const a=this.$anchorCell.node(-1)!=r.node(-1);return a&&this.isRowSelection()?bl.rowSelection(r,i):a&&this.isColSelection()?bl.colSelection(r,i):new bl(r,i)}return Ut.between(r,i)}content(){const e=this.$anchorCell.node(-1),t=Br.get(e),r=this.$anchorCell.start(-1),i=t.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),a={},o=[];for(let l=i.top;l<i.bottom;l++){const u=[];for(let c=l*t.width+i.left,f=i.left;f<i.right;f++,c++){const d=t.map[c];if(a[d])continue;a[d]=!0;const h=t.findCell(d);let p=e.nodeAt(d);if(!p)throw RangeError(`No cell with offset ${d} found`);const v=i.left-h.left,g=h.right-i.right;if(v>0||g>0){let y=p.attrs;if(v>0&&(y=gd(y,0,v)),g>0&&(y=gd(y,y.colspan-g,g)),h.left<i.left){if(p=p.type.createAndFill(y),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else p=p.type.create(y,p.content)}if(h.top<i.top||h.bottom>i.bottom){const y={...p.attrs,rowspan:Math.min(h.bottom,i.bottom)-Math.max(h.top,i.top)};h.top<i.top?p=p.type.createAndFill(y):p=p.type.create(y,p.content)}u.push(p)}o.push(e.child(l).copy(ut.from(u)))}const s=this.isColSelection()&&this.isRowSelection()?e:o;return new Lt(ut.from(s),1,1)}replace(e,t=Lt.empty){const r=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){const{$from:s,$to:l}=i[o],u=e.mapping.slice(r);e.replace(u.map(s.pos),u.map(l.pos),o?Lt.empty:t)}const a=fn.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);a&&e.setSelection(a)}replaceWith(e,t){this.replace(e,new Lt(ut.from(t),0,0))}forEachCell(e){const t=this.$anchorCell.node(-1),r=Br.get(t),i=this.$anchorCell.start(-1),a=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let o=0;o<a.length;o++)e(t.nodeAt(a[o]),i+a[o])}isColSelection(){const e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,t=e){const r=e.node(-1),i=Br.get(r),a=e.start(-1),o=i.findCell(e.pos-a),s=i.findCell(t.pos-a),l=e.node(0);return o.top<=s.top?(o.top>0&&(e=l.resolve(a+i.map[o.left])),s.bottom<i.height&&(t=l.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(t=l.resolve(a+i.map[s.left])),o.bottom<i.height&&(e=l.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new bl(e,t)}isRowSelection(){const e=this.$anchorCell.node(-1),t=Br.get(e),r=this.$anchorCell.start(-1),i=t.colCount(this.$anchorCell.pos-r),a=t.colCount(this.$headCell.pos-r);if(Math.min(i,a)>0)return!1;const o=i+this.$anchorCell.nodeAfter.attrs.colspan,s=a+this.$headCell.nodeAfter.attrs.colspan;return Math.max(o,s)==t.width}eq(e){return e instanceof bl&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,t=e){const r=e.node(-1),i=Br.get(r),a=e.start(-1),o=i.findCell(e.pos-a),s=i.findCell(t.pos-a),l=e.node(0);return o.left<=s.left?(o.left>0&&(e=l.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(t=l.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(t=l.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(e=l.resolve(a+i.map[i.width*(o.top+1)-1]))),new bl(e,t)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,t){return new bl(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,r=t){return new bl(e.resolve(t),e.resolve(r))}getBookmark(){return new l3e(this.$anchorCell.pos,this.$headCell.pos)}};wr.prototype.visible=!1;fn.jsonID("cell",wr);var l3e=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){const t=e.resolve(this.anchor),r=e.resolve(this.head);return t.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&t.index()<t.parent.childCount&&r.index()<r.parent.childCount&&PO(t,r)?new wr(t,r):fn.near(r,1)}};function u3e(n){if(!(n.selection instanceof wr))return null;const e=[];return n.selection.forEachCell((t,r)=>{e.push(ii.node(r,r+t.nodeSize,{class:"selectedCell"}))}),hr.create(n.doc,e)}function c3e({$from:n,$to:e}){if(n.pos==e.pos||n.pos<e.pos-6)return!1;let t=n.pos,r=e.pos,i=n.depth;for(;i>=0&&!(n.after(i+1)<n.end(i));i--,t++);for(let a=e.depth;a>=0&&!(e.before(a+1)>e.start(a));a--,r--);return t==r&&/row|table/.test(n.node(i).type.spec.tableRole)}function f3e({$from:n,$to:e}){let t,r;for(let i=n.depth;i>0;i--){const a=n.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){t=a;break}}for(let i=e.depth;i>0;i--){const a=e.node(i);if(a.type.spec.tableRole==="cell"||a.type.spec.tableRole==="header_cell"){r=a;break}}return t!==r&&e.parentOffset===0}function d3e(n,e,t){const r=(e||n).selection,i=(e||n).doc;let a,o;if(r instanceof rn&&(o=r.node.type.spec.tableRole)){if(o=="cell"||o=="header_cell")a=wr.create(i,r.from);else if(o=="row"){const s=i.resolve(r.from+1);a=wr.rowSelection(s,s)}else if(!t){const s=Br.get(r.node),l=r.from+1,u=l+s.map[s.width*s.height-1];a=wr.create(i,l+1,u)}}else r instanceof Ut&&c3e(r)?a=Ut.create(i,r.from):r instanceof Ut&&f3e(r)&&(a=Ut.create(i,r.$from.start(),r.$from.end()));return a&&(e||(e=n.tr)).setSelection(a),e}var h3e=new Wn("fix-tables");function OY(n,e,t,r){const i=n.childCount,a=e.childCount;e:for(let o=0,s=0;o<a;o++){const l=e.child(o);for(let u=s,c=Math.min(i,o+3);u<c;u++)if(n.child(u)==l){s=u+1,t+=l.nodeSize;continue e}r(l,t),s<i&&n.child(s).sameMarkup(l)?OY(n.child(s),l,t+1,r):l.nodesBetween(0,l.content.size,r,t+1),t+=l.nodeSize}}function IY(n,e){let t;const r=(i,a)=>{i.type.spec.tableRole=="table"&&(t=p3e(n,i,a,t))};return e?e.doc!=n.doc&&OY(e.doc,n.doc,0,r):n.doc.descendants(r),t}function p3e(n,e,t,r){const i=Br.get(e);if(!i.problems)return r;r||(r=n.tr);const a=[];for(let l=0;l<i.height;l++)a.push(0);for(let l=0;l<i.problems.length;l++){const u=i.problems[l];if(u.type=="collision"){const c=e.nodeAt(u.pos);if(!c)continue;const f=c.attrs;for(let d=0;d<f.rowspan;d++)a[u.row+d]+=u.n;r.setNodeMarkup(r.mapping.map(t+1+u.pos),null,gd(f,f.colspan-u.n,u.n))}else if(u.type=="missing")a[u.row]+=u.n;else if(u.type=="overlong_rowspan"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(t+1+u.pos),null,{...c.attrs,rowspan:c.attrs.rowspan-u.n})}else if(u.type=="colwidth mismatch"){const c=e.nodeAt(u.pos);if(!c)continue;r.setNodeMarkup(r.mapping.map(t+1+u.pos),null,{...c.attrs,colwidth:u.colwidth})}else if(u.type=="zero_sized"){const c=r.mapping.map(t);r.delete(c,c+e.nodeSize)}}let o,s;for(let l=0;l<a.length;l++)a[l]&&(o==null&&(o=l),s=l);for(let l=0,u=t+1;l<i.height;l++){const c=e.child(l),f=u+c.nodeSize,d=a[l];if(d>0){let h="cell";c.firstChild&&(h=c.firstChild.type.spec.tableRole);const p=[];for(let g=0;g<d;g++){const y=ea(n.schema)[h].createAndFill();y&&p.push(y)}const v=(l==0||o==l-1)&&s==l?u+1:f-1;r.insert(r.mapping.map(v),p)}u=f}return r.setMeta(h3e,{fixTables:!0})}function rl(n){const e=n.selection,t=bS(n),r=t.node(-1),i=t.start(-1),a=Br.get(r);return{...e instanceof wr?a.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):a.findCell(t.pos-i),tableStart:i,map:a,table:r}}function RY(n,{map:e,tableStart:t,table:r},i){let a=i>0?-1:0;s3e(e,r,i+a)&&(a=i==0||i==e.width?null:0);for(let o=0;o<e.height;o++){const s=o*e.width+i;if(i>0&&i<e.width&&e.map[s-1]==e.map[s]){const l=e.map[s],u=r.nodeAt(l);n.setNodeMarkup(n.mapping.map(t+l),null,NY(u.attrs,i-e.colCount(l))),o+=u.attrs.rowspan-1}else{const l=a==null?ea(r.type.schema).cell:r.nodeAt(e.map[s+a]).type,u=e.positionAt(o,i,r);n.insert(n.mapping.map(t+u),l.createAndFill())}}return n}function v3e(n,e){if(!is(n))return!1;if(e){const t=rl(n);e(RY(n.tr,t,t.left))}return!0}function g3e(n,e){if(!is(n))return!1;if(e){const t=rl(n);e(RY(n.tr,t,t.right))}return!0}function m3e(n,{map:e,table:t,tableStart:r},i){const a=n.mapping.maps.length;for(let o=0;o<e.height;){const s=o*e.width+i,l=e.map[s],u=t.nodeAt(l),c=u.attrs;if(i>0&&e.map[s-1]==l||i<e.width-1&&e.map[s+1]==l)n.setNodeMarkup(n.mapping.slice(a).map(r+l),null,gd(c,i-e.colCount(l)));else{const f=n.mapping.slice(a).map(r+l);n.delete(f,f+u.nodeSize)}o+=c.rowspan}}function y3e(n,e){if(!is(n))return!1;if(e){const t=rl(n),r=n.tr;if(t.left==0&&t.right==t.map.width)return!1;for(let i=t.right-1;m3e(r,t,i),i!=t.left;i--){const a=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!a)throw RangeError("No table found");t.table=a,t.map=Br.get(a)}e(r)}return!0}function b3e(n,e,t){var r;const i=ea(e.type.schema).header_cell;for(let a=0;a<n.width;a++)if(((r=e.nodeAt(n.map[a+t*n.width]))==null?void 0:r.type)!=i)return!1;return!0}function LY(n,{map:e,tableStart:t,table:r},i){var a;let o=t;for(let u=0;u<i;u++)o+=r.child(u).nodeSize;const s=[];let l=i>0?-1:0;b3e(e,r,i+l)&&(l=i==0||i==e.height?null:0);for(let u=0,c=e.width*i;u<e.width;u++,c++)if(i>0&&i<e.height&&e.map[c]==e.map[c-e.width]){const f=e.map[c],d=r.nodeAt(f).attrs;n.setNodeMarkup(t+f,null,{...d,rowspan:d.rowspan+1}),u+=d.colspan-1}else{const f=l==null?ea(r.type.schema).cell:(a=r.nodeAt(e.map[c+l*e.width]))==null?void 0:a.type,d=f?.createAndFill();d&&s.push(d)}return n.insert(o,ea(r.type.schema).row.create(null,s)),n}function x3e(n,e){if(!is(n))return!1;if(e){const t=rl(n);e(LY(n.tr,t,t.top))}return!0}function _3e(n,e){if(!is(n))return!1;if(e){const t=rl(n);e(LY(n.tr,t,t.bottom))}return!0}function S3e(n,{map:e,table:t,tableStart:r},i){let a=0;for(let u=0;u<i;u++)a+=t.child(u).nodeSize;const o=a+t.child(i).nodeSize,s=n.mapping.maps.length;n.delete(a+r,o+r);const l=new Set;for(let u=0,c=i*e.width;u<e.width;u++,c++){const f=e.map[c];if(!l.has(f)){if(l.add(f),i>0&&f==e.map[c-e.width]){const d=t.nodeAt(f).attrs;n.setNodeMarkup(n.mapping.slice(s).map(f+r),null,{...d,rowspan:d.rowspan-1}),u+=d.colspan-1}else if(i<e.height&&f==e.map[c+e.width]){const d=t.nodeAt(f),h=d.attrs,p=d.type.create({...h,rowspan:d.attrs.rowspan-1},d.content),v=e.positionAt(i+1,u,t);n.insert(n.mapping.slice(s).map(r+v),p),u+=h.colspan-1}}}}function w3e(n,e){if(!is(n))return!1;if(e){const t=rl(n),r=n.tr;if(t.top==0&&t.bottom==t.map.height)return!1;for(let i=t.bottom-1;S3e(r,t,i),i!=t.top;i--){const a=t.tableStart?r.doc.nodeAt(t.tableStart-1):r.doc;if(!a)throw RangeError("No table found");t.table=a,t.map=Br.get(t.table)}e(r)}return!0}function nz(n){const e=n.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function k3e({width:n,height:e,map:t},r){let i=r.top*n+r.left,a=i,o=(r.bottom-1)*n+r.left,s=i+(r.right-r.left-1);for(let l=r.top;l<r.bottom;l++){if(r.left>0&&t[a]==t[a-1]||r.right<n&&t[s]==t[s+1])return!0;a+=n,s+=n}for(let l=r.left;l<r.right;l++){if(r.top>0&&t[i]==t[i-n]||r.bottom<e&&t[o]==t[o+n])return!0;i++,o++}return!1}function rz(n,e){const t=n.selection;if(!(t instanceof wr)||t.$anchorCell.pos==t.$headCell.pos)return!1;const r=rl(n),{map:i}=r;if(k3e(i,r))return!1;if(e){const a=n.tr,o={};let s=ut.empty,l,u;for(let c=r.top;c<r.bottom;c++)for(let f=r.left;f<r.right;f++){const d=i.map[c*i.width+f],h=r.table.nodeAt(d);if(!(o[d]||!h))if(o[d]=!0,l==null)l=d,u=h;else{nz(h)||(s=s.append(h.content));const p=a.mapping.map(d+r.tableStart);a.delete(p,p+h.nodeSize)}}if(l==null||u==null)return!0;if(a.setNodeMarkup(l+r.tableStart,null,{...NY(u.attrs,u.attrs.colspan,r.right-r.left-u.attrs.colspan),rowspan:r.bottom-r.top}),s.size){const c=l+1+u.content.size,f=nz(u)?l+1:c;a.replaceWith(f+r.tableStart,c+r.tableStart,s)}a.setSelection(new wr(a.doc.resolve(l+r.tableStart))),e(a)}return!0}function iz(n,e){const t=ea(n.schema);return T3e(({node:r})=>t[r.type.spec.tableRole])(n,e)}function T3e(n){return(e,t)=>{var r;const i=e.selection;let a,o;if(i instanceof wr){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;a=i.$anchorCell.nodeAfter,o=i.$anchorCell.pos}else{if(a=i3e(i.$from),!a)return!1;o=(r=qp(i.$from))==null?void 0:r.pos}if(a==null||o==null||a.attrs.colspan==1&&a.attrs.rowspan==1)return!1;if(t){let s=a.attrs;const l=[],u=s.colwidth;s.rowspan>1&&(s={...s,rowspan:1}),s.colspan>1&&(s={...s,colspan:1});const c=rl(e),f=e.tr;for(let h=0;h<c.right-c.left;h++)l.push(u?{...s,colwidth:u&&u[h]?[u[h]]:null}:s);let d;for(let h=c.top;h<c.bottom;h++){let p=c.map.positionAt(h,c.left,c.table);h==c.top&&(p+=a.nodeSize);for(let v=c.left,g=0;v<c.right;v++,g++)v==c.left&&h==c.top||f.insert(d=f.mapping.map(p+c.tableStart,1),n({node:a,row:h,col:v}).createAndFill(l[g]))}f.setNodeMarkup(o,n({node:a,row:c.top,col:c.left}),l[0]),i instanceof wr&&f.setSelection(new wr(f.doc.resolve(i.$anchorCell.pos),d?f.doc.resolve(d):void 0)),t(f)}return!0}}function C3e(n,e){return function(t,r){if(!is(t))return!1;const i=bS(t);if(i.nodeAfter.attrs[n]===e)return!1;if(r){const a=t.tr;t.selection instanceof wr?t.selection.forEachCell((o,s)=>{o.attrs[n]!==e&&a.setNodeMarkup(s,null,{...o.attrs,[n]:e})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[n]:e}),r(a)}return!0}}function E3e(n){return function(e,t){if(!is(e))return!1;if(t){const r=ea(e.schema),i=rl(e),a=e.tr,o=i.map.cellsInRect(n=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:n=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(l=>i.table.nodeAt(l));for(let l=0;l<o.length;l++)s[l].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[l],r.cell,s[l].attrs);if(a.steps.length==0)for(let l=0;l<o.length;l++)a.setNodeMarkup(i.tableStart+o[l],r.header_cell,s[l].attrs);t(a)}return!0}}function az(n,e,t){const r=e.map.cellsInRect({left:0,top:0,right:n=="row"?e.map.width:1,bottom:n=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const a=e.table.nodeAt(r[i]);if(a&&a.type!==t.header_cell)return!1}return!0}function zm(n,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?E3e(n):function(t,r){if(!is(t))return!1;if(r){const i=ea(t.schema),a=rl(t),o=t.tr,s=az("row",a,i),l=az("column",a,i),c=(n==="column"?s:n==="row"?l:!1)?1:0,f=n=="column"?{left:0,top:c,right:1,bottom:a.map.height}:n=="row"?{left:c,top:0,right:a.map.width,bottom:1}:a,d=n=="column"?l?i.cell:i.header_cell:n=="row"?s?i.cell:i.header_cell:i.cell;a.map.cellsInRect(f).forEach(h=>{const p=h+a.tableStart,v=o.doc.nodeAt(p);v&&o.setNodeMarkup(p,d,v.attrs)}),r(o)}return!0}}zm("row",{useDeprecatedLogic:!0});zm("column",{useDeprecatedLogic:!0});var M3e=zm("cell",{useDeprecatedLogic:!0});function A3e(n,e){if(e<0){const t=n.nodeBefore;if(t)return n.pos-t.nodeSize;for(let r=n.index(-1)-1,i=n.before();r>=0;r--){const a=n.node(-1).child(r),o=a.lastChild;if(o)return i-1-o.nodeSize;i-=a.nodeSize}}else{if(n.index()<n.parent.childCount-1)return n.pos+n.nodeAfter.nodeSize;const t=n.node(-1);for(let r=n.indexAfter(-1),i=n.after();r<t.childCount;r++){const a=t.child(r);if(a.childCount)return i+1;i+=a.nodeSize}}return null}function oz(n){return function(e,t){if(!is(e))return!1;const r=A3e(bS(e),n);if(r==null)return!1;if(t){const i=e.doc.resolve(r);t(e.tr.setSelection(Ut.between(i,o3e(i))).scrollIntoView())}return!0}}function N3e(n,e){const t=n.selection.$anchor;for(let r=t.depth;r>0;r--)if(t.node(r).type.spec.tableRole=="table")return e&&e(n.tr.delete(t.before(r),t.after(r)).scrollIntoView()),!0;return!1}function n1(n,e){const t=n.selection;if(!(t instanceof wr))return!1;if(e){const r=n.tr,i=ea(n.schema).cell.createAndFill().content;t.forEachCell((a,o)=>{a.content.eq(i)||r.replace(r.mapping.map(o+1),r.mapping.map(o+a.nodeSize-1),new Lt(i,0,0))}),r.docChanged&&e(r)}return!0}function D3e(n){if(!n.size)return null;let{content:e,openStart:t,openEnd:r}=n;for(;e.childCount==1&&(t>0&&r>0||e.child(0).type.spec.tableRole=="table");)t--,r--,e=e.child(0).content;const i=e.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a=="row")for(let l=0;l<e.childCount;l++){let u=e.child(l).content;const c=l?0:Math.max(0,t-1),f=l<e.childCount-1?0:Math.max(0,r-1);(c||f)&&(u=HM(ea(o).row,new Lt(u,c,f)).content),s.push(u)}else if(a=="cell"||a=="header_cell")s.push(t||r?HM(ea(o).row,new Lt(e,t,r)).content:e);else return null;return O3e(o,s)}function O3e(n,e){const t=[];for(let i=0;i<e.length;i++){const a=e[i];for(let o=a.childCount-1;o>=0;o--){const{rowspan:s,colspan:l}=a.child(o).attrs;for(let u=i;u<i+s;u++)t[u]=(t[u]||0)+l}}let r=0;for(let i=0;i<t.length;i++)r=Math.max(r,t[i]);for(let i=0;i<t.length;i++)if(i>=e.length&&e.push(ut.empty),t[i]<r){const a=ea(n).cell.createAndFill(),o=[];for(let s=t[i];s<r;s++)o.push(a);e[i]=e[i].append(ut.from(o))}return{height:e.length,width:r,rows:e}}function HM(n,e){const t=n.createAndFill();return new uA(t).replace(0,t.content.size,e).doc}function I3e({width:n,height:e,rows:t},r,i){if(n!=r){const a=[],o=[];for(let s=0;s<t.length;s++){const l=t[s],u=[];for(let c=a[s]||0,f=0;c<r;f++){let d=l.child(f%l.childCount);c+d.attrs.colspan>r&&(d=d.type.createChecked(gd(d.attrs,d.attrs.colspan,c+d.attrs.colspan-r),d.content)),u.push(d),c+=d.attrs.colspan;for(let h=1;h<d.attrs.rowspan;h++)a[s+h]=(a[s+h]||0)+d.attrs.colspan}o.push(ut.from(u))}t=o,n=r}if(e!=i){const a=[];for(let o=0,s=0;o<i;o++,s++){const l=[],u=t[s%e];for(let c=0;c<u.childCount;c++){let f=u.child(c);o+f.attrs.rowspan>i&&(f=f.type.create({...f.attrs,rowspan:Math.max(1,i-f.attrs.rowspan)},f.content)),l.push(f)}a.push(ut.from(l))}t=a,e=i}return{width:n,height:e,rows:t}}function R3e(n,e,t,r,i,a,o){const s=n.doc.type.schema,l=ea(s);let u,c;if(i>e.width)for(let f=0,d=0;f<e.height;f++){const h=t.child(f);d+=h.nodeSize;const p=[];let v;h.lastChild==null||h.lastChild.type==l.cell?v=u||(u=l.cell.createAndFill()):v=c||(c=l.header_cell.createAndFill());for(let g=e.width;g<i;g++)p.push(v);n.insert(n.mapping.slice(o).map(d-1+r),p)}if(a>e.height){const f=[];for(let p=0,v=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const g=p>=e.width?!1:t.nodeAt(e.map[v+p]).type==l.header_cell;f.push(g?c||(c=l.header_cell.createAndFill()):u||(u=l.cell.createAndFill()))}const d=l.row.create(null,ut.from(f)),h=[];for(let p=e.height;p<a;p++)h.push(d);n.insert(n.mapping.slice(o).map(r+t.nodeSize-2),h)}return!!(u||c)}function sz(n,e,t,r,i,a,o,s){if(o==0||o==e.height)return!1;let l=!1;for(let u=i;u<a;u++){const c=o*e.width+u,f=e.map[c];if(e.map[c-e.width]==f){l=!0;const d=t.nodeAt(f),{top:h,left:p}=e.findCell(f);n.setNodeMarkup(n.mapping.slice(s).map(f+r),null,{...d.attrs,rowspan:o-h}),n.insert(n.mapping.slice(s).map(e.positionAt(o,p,t)),d.type.createAndFill({...d.attrs,rowspan:h+d.attrs.rowspan-o})),u+=d.attrs.colspan-1}}return l}function lz(n,e,t,r,i,a,o,s){if(o==0||o==e.width)return!1;let l=!1;for(let u=i;u<a;u++){const c=u*e.width+o,f=e.map[c];if(e.map[c-1]==f){l=!0;const d=t.nodeAt(f),h=e.colCount(f),p=n.mapping.slice(s).map(f+r);n.setNodeMarkup(p,null,gd(d.attrs,o-h,d.attrs.colspan-(o-h))),n.insert(p+d.nodeSize,d.type.createAndFill(gd(d.attrs,0,o-h))),u+=d.attrs.rowspan-1}}return l}function uz(n,e,t,r,i){let a=t?n.doc.nodeAt(t-1):n.doc;if(!a)throw new Error("No table found");let o=Br.get(a);const{top:s,left:l}=r,u=l+i.width,c=s+i.height,f=n.tr;let d=0;function h(){if(a=t?f.doc.nodeAt(t-1):f.doc,!a)throw new Error("No table found");o=Br.get(a),d=f.mapping.maps.length}R3e(f,o,a,t,u,c,d)&&h(),sz(f,o,a,t,l,u,s,d)&&h(),sz(f,o,a,t,l,u,c,d)&&h(),lz(f,o,a,t,s,c,l,d)&&h(),lz(f,o,a,t,s,c,u,d)&&h();for(let p=s;p<c;p++){const v=o.positionAt(p,l,a),g=o.positionAt(p,u,a);f.replace(f.mapping.slice(d).map(v+t),f.mapping.slice(d).map(g+t),new Lt(i.rows[p-s],0,0))}h(),f.setSelection(new wr(f.doc.resolve(t+o.positionAt(s,l,a)),f.doc.resolve(t+o.positionAt(c-1,u-1,a)))),e(f)}var L3e=xA({ArrowLeft:r1("horiz",-1),ArrowRight:r1("horiz",1),ArrowUp:r1("vert",-1),ArrowDown:r1("vert",1),"Shift-ArrowLeft":i1("horiz",-1),"Shift-ArrowRight":i1("horiz",1),"Shift-ArrowUp":i1("vert",-1),"Shift-ArrowDown":i1("vert",1),Backspace:n1,"Mod-Backspace":n1,Delete:n1,"Mod-Delete":n1});function P1(n,e,t){return t.eq(n.selection)?!1:(e&&e(n.tr.setSelection(t).scrollIntoView()),!0)}function r1(n,e){return(t,r,i)=>{if(!i)return!1;const a=t.selection;if(a instanceof wr)return P1(t,r,fn.near(a.$headCell,e));if(n!="horiz"&&!a.empty)return!1;const o=PY(i,n,e);if(o==null)return!1;if(n=="horiz")return P1(t,r,fn.near(t.doc.resolve(a.head+e),e));{const s=t.doc.resolve(o),l=AY(s,n,e);let u;return l?u=fn.near(l,1):e<0?u=fn.near(t.doc.resolve(s.before(-1)),-1):u=fn.near(t.doc.resolve(s.after(-1)),1),P1(t,r,u)}}}function i1(n,e){return(t,r,i)=>{if(!i)return!1;const a=t.selection;let o;if(a instanceof wr)o=a;else{const l=PY(i,n,e);if(l==null)return!1;o=new wr(t.doc.resolve(l))}const s=AY(o.$headCell,n,e);return s?P1(t,r,new wr(o.$anchorCell,s)):!1}}function P3e(n,e){const t=n.state.doc,r=qp(t.resolve(e));return r?(n.dispatch(n.state.tr.setSelection(new wr(r))),!0):!1}function B3e(n,e,t){if(!is(n.state))return!1;let r=D3e(t);const i=n.state.selection;if(i instanceof wr){r||(r={width:1,height:1,rows:[ut.from(HM(ea(n.state.schema).cell,t))]});const a=i.$anchorCell.node(-1),o=i.$anchorCell.start(-1),s=Br.get(a).rectBetween(i.$anchorCell.pos-o,i.$headCell.pos-o);return r=I3e(r,s.right-s.left,s.bottom-s.top),uz(n.state,n.dispatch,o,s,r),!0}else if(r){const a=bS(n.state),o=a.start(-1);return uz(n.state,n.dispatch,o,Br.get(a.node(-1)).findCell(a.pos-o),r),!0}else return!1}function V3e(n,e){var t;if(e.ctrlKey||e.metaKey)return;const r=cz(n,e.target);let i;if(e.shiftKey&&n.state.selection instanceof wr)a(n.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=qp(n.state.selection.$anchor))!=null&&((t=CT(n,e))==null?void 0:t.pos)!=i.pos)a(i,e),e.preventDefault();else if(!r)return;function a(l,u){let c=CT(n,u);const f=Bu.getState(n.state)==null;if(!c||!PO(l,c))if(f)c=l;else return;const d=new wr(l,c);if(f||!n.state.selection.eq(d)){const h=n.state.tr.setSelection(d);f&&h.setMeta(Bu,l.pos),n.dispatch(h)}}function o(){n.root.removeEventListener("mouseup",o),n.root.removeEventListener("dragstart",o),n.root.removeEventListener("mousemove",s),Bu.getState(n.state)!=null&&n.dispatch(n.state.tr.setMeta(Bu,-1))}function s(l){const u=l,c=Bu.getState(n.state);let f;if(c!=null)f=n.state.doc.resolve(c);else if(cz(n,u.target)!=r&&(f=CT(n,e),!f))return o();f&&a(f,u)}n.root.addEventListener("mouseup",o),n.root.addEventListener("dragstart",o),n.root.addEventListener("mousemove",s)}function PY(n,e,t){if(!(n.state.selection instanceof Ut))return null;const{$head:r}=n.state.selection;for(let i=r.depth-1;i>=0;i--){const a=r.node(i);if((t<0?r.index(i):r.indexAfter(i))!=(t<0?0:a.childCount))return null;if(a.type.spec.tableRole=="cell"||a.type.spec.tableRole=="header_cell"){const s=r.before(i),l=e=="vert"?t>0?"down":"up":t>0?"right":"left";return n.endOfTextblock(l)?s:null}}return null}function cz(n,e){for(;e&&e!=n.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function CT(n,e){const t=n.posAtCoords({left:e.clientX,top:e.clientY});return t&&t?qp(n.state.doc.resolve(t.pos)):null}var z3e=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.table.style.setProperty("--default-cell-min-width",`${t}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),GM(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,GM(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function GM(n,e,t,r,i,a){var o;let s=0,l=!0,u=e.firstChild;const c=n.firstChild;if(c){for(let f=0,d=0;f<c.childCount;f++){const{colspan:h,colwidth:p}=c.child(f).attrs;for(let v=0;v<h;v++,d++){const g=i==d?a:p&&p[v],y=g?g+"px":"";if(s+=g||r,g||(l=!1),u)u.style.width!=y&&(u.style.width=y),u=u.nextSibling;else{const b=document.createElement("col");b.style.width=y,e.appendChild(b)}}}for(;u;){const f=u.nextSibling;(o=u.parentNode)==null||o.removeChild(u),u=f}l?(t.style.width=s+"px",t.style.minWidth=""):(t.style.width="",t.style.minWidth=s+"px")}}var qa=new Wn("tableColumnResizing");function F3e({handleWidth:n=5,cellMinWidth:e=25,defaultCellMinWidth:t=100,View:r=z3e,lastColumnResizable:i=!0}={}){const a=new $n({key:qa,state:{init(o,s){var l,u;const c=(u=(l=a.spec)==null?void 0:l.props)==null?void 0:u.nodeViews,f=ea(s.schema).table.name;return r&&c&&(c[f]=(d,h)=>new r(d,t,h)),new $3e(-1,!1)},apply(o,s){return s.apply(o)}},props:{attributes:o=>{const s=qa.getState(o);return s&&s.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,s)=>{H3e(o,s,n,i)},mouseleave:o=>{G3e(o)},mousedown:(o,s)=>{U3e(o,s,e,t)}},decorations:o=>{const s=qa.getState(o);if(s&&s.activeHandle>-1)return Y3e(o,s.activeHandle)},nodeViews:{}}});return a}var $3e=class B1{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(e){const t=this,r=e.getMeta(qa);if(r&&r.setHandle!=null)return new B1(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new B1(t.activeHandle,r.setDragging);if(t.activeHandle>-1&&e.docChanged){let i=e.mapping.map(t.activeHandle,-1);return $M(e.doc.resolve(i))||(i=-1),new B1(i,t.dragging)}return t}};function H3e(n,e,t,r){if(!n.editable)return;const i=qa.getState(n.state);if(i&&!i.dragging){const a=j3e(e.target);let o=-1;if(a){const{left:s,right:l}=a.getBoundingClientRect();e.clientX-s<=t?o=fz(n,e,"left",t):l-e.clientX<=t&&(o=fz(n,e,"right",t))}if(o!=i.activeHandle){if(!r&&o!==-1){const s=n.state.doc.resolve(o),l=s.node(-1),u=Br.get(l),c=s.start(-1);if(u.colCount(s.pos-c)+s.nodeAfter.attrs.colspan-1==u.width-1)return}BY(n,o)}}}function G3e(n){if(!n.editable)return;const e=qa.getState(n.state);e&&e.activeHandle>-1&&!e.dragging&&BY(n,-1)}function U3e(n,e,t,r){var i;if(!n.editable)return!1;const a=(i=n.dom.ownerDocument.defaultView)!=null?i:window,o=qa.getState(n.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const s=n.state.doc.nodeAt(o.activeHandle),l=W3e(n,o.activeHandle,s.attrs);n.dispatch(n.state.tr.setMeta(qa,{setDragging:{startX:e.clientX,startWidth:l}}));function u(f){a.removeEventListener("mouseup",u),a.removeEventListener("mousemove",c);const d=qa.getState(n.state);d?.dragging&&(q3e(n,d.activeHandle,dz(d.dragging,f,t)),n.dispatch(n.state.tr.setMeta(qa,{setDragging:null})))}function c(f){if(!f.which)return u(f);const d=qa.getState(n.state);if(d&&d.dragging){const h=dz(d.dragging,f,t);hz(n,d.activeHandle,h,r)}}return hz(n,o.activeHandle,l,r),a.addEventListener("mouseup",u),a.addEventListener("mousemove",c),e.preventDefault(),!0}function W3e(n,e,{colspan:t,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const a=n.domAtPos(e);let s=a.node.childNodes[a.offset].offsetWidth,l=t;if(r)for(let u=0;u<t;u++)r[u]&&(s-=r[u],l--);return s/l}function j3e(n){for(;n&&n.nodeName!="TD"&&n.nodeName!="TH";)n=n.classList&&n.classList.contains("ProseMirror")?null:n.parentNode;return n}function fz(n,e,t,r){const i=t=="right"?-r:r,a=n.posAtCoords({left:e.clientX+i,top:e.clientY});if(!a)return-1;const{pos:o}=a,s=qp(n.state.doc.resolve(o));if(!s)return-1;if(t=="right")return s.pos;const l=Br.get(s.node(-1)),u=s.start(-1),c=l.map.indexOf(s.pos-u);return c%l.width==0?-1:u+l.map[c-1]}function dz(n,e,t){const r=e.clientX-n.startX;return Math.max(t,n.startWidth+r)}function BY(n,e){n.dispatch(n.state.tr.setMeta(qa,{setHandle:e}))}function q3e(n,e,t){const r=n.state.doc.resolve(e),i=r.node(-1),a=Br.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,l=n.state.tr;for(let u=0;u<a.height;u++){const c=u*a.width+s;if(u&&a.map[c]==a.map[c-a.width])continue;const f=a.map[c],d=i.nodeAt(f).attrs,h=d.colspan==1?0:s-a.colCount(f);if(d.colwidth&&d.colwidth[h]==t)continue;const p=d.colwidth?d.colwidth.slice():K3e(d.colspan);p[h]=t,l.setNodeMarkup(o+f,null,{...d,colwidth:p})}l.docChanged&&n.dispatch(l)}function hz(n,e,t,r){const i=n.state.doc.resolve(e),a=i.node(-1),o=i.start(-1),s=Br.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1;let l=n.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&GM(a,l.firstChild,l,r,s,t)}function K3e(n){return Array(n).fill(0)}function Y3e(n,e){var t;const r=[],i=n.doc.resolve(e),a=i.node(-1);if(!a)return hr.empty;const o=Br.get(a),s=i.start(-1),l=o.colCount(i.pos-s)+i.nodeAfter.attrs.colspan-1;for(let u=0;u<o.height;u++){const c=l+u*o.width;if((l==o.width-1||o.map[c]!=o.map[c+1])&&(u==0||o.map[c]!=o.map[c-o.width])){const f=o.map[c],d=s+f+a.nodeAt(f).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",(t=qa.getState(n))!=null&&t.dragging&&r.push(ii.node(s+f,s+f+a.nodeAt(f).nodeSize,{class:"column-resize-dragging"})),r.push(ii.widget(d,h))}}return hr.create(n.doc,r)}function X3e({allowTableNodeSelection:n=!1}={}){return new $n({key:Bu,state:{init(){return null},apply(e,t){const r=e.getMeta(Bu);if(r!=null)return r==-1?null:r;if(t==null||!e.docChanged)return t;const{deleted:i,pos:a}=e.mapping.mapResult(t);return i?null:a}},props:{decorations:u3e,handleDOMEvents:{mousedown:V3e},createSelectionBetween(e){return Bu.getState(e.state)!=null?e.state.selection:null},handleTripleClick:P3e,handleKeyDown:L3e,handlePaste:B3e},appendTransaction(e,t,r){return d3e(r,IY(r,t),n)}})}function UM(n,e){return e?["width",`${Math.max(e,n)}px`]:["min-width",`${n}px`]}function pz(n,e,t,r,i,a){var o;let s=0,l=!0,u=e.firstChild;const c=n.firstChild;if(c!==null)for(let f=0,d=0;f<c.childCount;f+=1){const{colspan:h,colwidth:p}=c.child(f).attrs;for(let v=0;v<h;v+=1,d+=1){const g=i===d?a:p&&p[v],y=g?`${g}px`:"";if(s+=g||r,g||(l=!1),u){if(u.style.width!==y){const[b,_]=UM(r,g);u.style.setProperty(b,_)}u=u.nextSibling}else{const b=document.createElement("col"),[_,x]=UM(r,g);b.style.setProperty(_,x),e.appendChild(b)}}}for(;u;){const f=u.nextSibling;(o=u.parentNode)===null||o===void 0||o.removeChild(u),u=f}l?(t.style.width=`${s}px`,t.style.minWidth=""):(t.style.width="",t.style.minWidth=`${s}px`)}class Z3e{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")),pz(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,pz(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function J3e(n,e,t,r){let i=0,a=!0;const o=[],s=n.firstChild;if(!s)return{};for(let f=0,d=0;f<s.childCount;f+=1){const{colspan:h,colwidth:p}=s.child(f).attrs;for(let v=0;v<h;v+=1,d+=1){const g=t===d?r:p&&p[v];i+=g||e,g||(a=!1);const[y,b]=UM(e,g);o.push(["col",{style:`${y}: ${b}`}])}}const l=a?`${i}px`:"",u=a?"":`${i}px`;return{colgroup:["colgroup",{},...o],tableWidth:l,tableMinWidth:u}}function vz(n,e){return n.createAndFill()}function Q3e(n){if(n.cached.tableNodeTypes)return n.cached.tableNodeTypes;const e={};return Object.keys(n.nodes).forEach(t=>{const r=n.nodes[t];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),n.cached.tableNodeTypes=e,e}function ePe(n,e,t,r,i){const a=Q3e(n),o=[],s=[];for(let u=0;u<t;u+=1){const c=vz(a.cell);if(c&&s.push(c),r){const f=vz(a.header_cell);f&&o.push(f)}}const l=[];for(let u=0;u<e;u+=1)l.push(a.row.createChecked(null,r&&u===0?o:s));return a.table.createChecked(null,l)}function tPe(n){return n instanceof wr}const a1=({editor:n})=>{const{selection:e}=n.state;if(!tPe(e))return!1;let t=0;const r=rF(e.ranges[0].$from,a=>a.type.name==="table");return r?.node.descendants(a=>{if(a.type.name==="table")return!1;["tableCell","tableHeader"].includes(a.type.name)&&(t+=1)}),t===e.ranges.length?(n.commands.deleteTable(),!0):!1},nPe=yi.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:Z3e,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:n,HTMLAttributes:e}){const{colgroup:t,tableWidth:r,tableMinWidth:i}=J3e(n,this.options.cellMinWidth);return["table",Jn(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${i}`}),t,["tbody",0]]},addCommands(){return{insertTable:({rows:n=3,cols:e=3,withHeaderRow:t=!0}={})=>({tr:r,dispatch:i,editor:a})=>{const o=ePe(a.schema,n,e,t);if(i){const s=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(Ut.near(r.doc.resolve(s)))}return!0},addColumnBefore:()=>({state:n,dispatch:e})=>v3e(n,e),addColumnAfter:()=>({state:n,dispatch:e})=>g3e(n,e),deleteColumn:()=>({state:n,dispatch:e})=>y3e(n,e),addRowBefore:()=>({state:n,dispatch:e})=>x3e(n,e),addRowAfter:()=>({state:n,dispatch:e})=>_3e(n,e),deleteRow:()=>({state:n,dispatch:e})=>w3e(n,e),deleteTable:()=>({state:n,dispatch:e})=>N3e(n,e),mergeCells:()=>({state:n,dispatch:e})=>rz(n,e),splitCell:()=>({state:n,dispatch:e})=>iz(n,e),toggleHeaderColumn:()=>({state:n,dispatch:e})=>zm("column")(n,e),toggleHeaderRow:()=>({state:n,dispatch:e})=>zm("row")(n,e),toggleHeaderCell:()=>({state:n,dispatch:e})=>M3e(n,e),mergeOrSplit:()=>({state:n,dispatch:e})=>rz(n,e)?!0:iz(n,e),setCellAttribute:(n,e)=>({state:t,dispatch:r})=>C3e(n,e)(t,r),goToNextCell:()=>({state:n,dispatch:e})=>oz(1)(n,e),goToPreviousCell:()=>({state:n,dispatch:e})=>oz(-1)(n,e),fixTables:()=>({state:n,dispatch:e})=>(e&&IY(n),!0),setCellSelection:n=>({tr:e,dispatch:t})=>{if(t){const r=wr.create(e.doc,n.anchorCell,n.headCell);e.setSelection(r)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:a1,"Mod-Backspace":a1,Delete:a1,"Mod-Delete":a1}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[F3e({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],X3e({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(n){const e={name:n.name,options:n.options,storage:n.storage};return{tableRole:Bn(tn(n,"tableRole",e))}}}),rPe=n=>{const e={};return n.split(";").map(r=>r.trim()).filter(Boolean).forEach(r=>{const[i,a]=r.split(":").map(o=>o.trim());i&&a&&(e[i]=a)}),e},iPe=n=>{const e=/\.(\w+)\s*\{([^}]+)\}/g;let t;const r={};for(;(t=e.exec(n))!==null;){const[,i,a]=t,o=rPe(a);r[i]=o}return r},aPe=nPe.extend({addProseMirrorPlugins(){return[...this.parent?.()??[],new $n({key:new Wn("handleExcelPaste"),props:{handlePaste(n,e){const{clipboardData:t}=e;if(!t)return!1;const r=t.getData("text/html");if(!r)return!1;const a=new DOMParser().parseFromString(r,"text/html");if(!a?.querySelector("html")?.getAttribute("xmlns:x")?.includes("office:excel"))return!1;const s=a.querySelector("table");if(!s)return!1;const l=Array.from(a.head.querySelectorAll("style")).map(h=>h.textContent).join(`
|
|
274
|
-
`),u=iPe(l);s.querySelectorAll("td, th").forEach(h=>{const p=u[h.getAttribute("class")];p?.background&&(h.style.background=p.background),p?.color&&(h.style.color=p.color),p?.["text-align"]&&h.setAttribute("align",p["text-align"])});const{schema:c}=n.state,f=Ol.fromSchema(c).parse(s),d=n.state.tr.replaceSelectionWith(f);return n.dispatch(d),!0}}})]}}),oPe=aPe.configure({allowTableNodeSelection:!0,resizable:!0}),sPe=yi.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:n}){return["td",Jn(this.options.HTMLAttributes,n),0]}}),VY={addAttributes(){return{...this.parent?.(),align:{default:null,parseHTML:n=>n.getAttribute("align")??null,renderHTML:({align:n})=>({align:n})},background:{default:null,parseHTML:n=>{const t=(n.getAttribute("style")??"").match(/background(?:-color)?:\s*([^;]+)/i);return t?t[1].trim():null},renderHTML:({background:n})=>n?{style:`background-color: ${n}`}:{}},color:{default:null,parseHTML:n=>{const e=n.getAttribute("style")??"",t=e.match(new RegExp("(?<!background-)color:\\s*([^;]+)","i"));return e.includes("background-color")?null:t?t[1].trim():null},renderHTML:({color:n})=>n?{style:`color: ${n}`}:{}}}}},lPe=sPe.extend(VY),uPe=yi.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:n}){return["th",Jn(this.options.HTMLAttributes,n),0]}}),cPe=uPe.extend(VY),fPe=["textContent"],dPe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("options"),t=m.inject("editor");return(r,i)=>(m.openBlock(),m.createBlock(m.unref(Jl),{as:"span",class:"inline-block mx-[0.3rem] !bg-transparent"},{default:m.withCtx(()=>[m.createElementVNode("span",{class:"rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border",style:m.normalizeStyle({color:r.node.attrs.color,backgroundColor:r.node.attrs.backgroundColor,cursor:!m.unref(e).document?.readOnly||m.unref(t).isEditable?"pointer":"default"}),textContent:m.toDisplayString(r.node.attrs.text)},null,12,fPe)]),_:1}))}}),hPe=yi.create({name:"tag",group:"inline",inline:!0,atom:!0,addAttributes(){return{type:{default:"default"},text:{default:"默认标签"},color:{default:"#999"},backgroundColor:{default:"rgba(0, 0, 0, 0.05)"}}},parseHTML(){return[{tag:'span[data-type="tag"]'}]},renderHTML({HTMLAttributes:n}){return["span",Jn(n,{"data-type":"tag"}),n.text]},addNodeView(){return tl(dPe)},addCommands(){return{insertTag:n=>({chain:e})=>e().insertContent({type:this.name,attrs:n}).run()}}}),pPe=fr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"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")}}}),vPe=pPe.extend({addOptions(){return{...this.parent?.(),types:["heading","paragraph"],alignments:["left","center","right","justify","distributed"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlignLast?"distributed":n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:n.textAlign==="distributed"?{style:"text-align-last: justify"}:{style:`text-align: ${n.textAlign}`}}}}]},addKeyboardShortcuts(){return{...this.parent?.(),"Mod-Shift-d":()=>this.editor.commands.setTextAlign("distributed")}}}),sa=m.ref({isRunning:!1,currentParagraph:0,currentTextNode:0,currentChar:0});let cf=null,jv={totalChars:0,typedChars:0};function gPe(n){return n.reduce((e,t)=>t.type==="paragraph"&&t.content?t.content.reduce((r,i)=>r+(i.type==="text"?i.text?.length??0:0),e):e,0)}const mPe=fr.create({name:"typewriter",addCommands(){return{startTypewriter:(n,e)=>({editor:t})=>((async()=>{try{cf&&(clearTimeout(cf),cf=null),sa.value={isRunning:!0,currentParagraph:0,currentTextNode:0,currentChar:0},jv={totalChars:gPe(n?.content??[]),typedChars:0};const r=e?.focus===null?null:e?.focus??"end",i=async u=>{await new Promise(c=>{setTimeout(()=>{try{t.chain().insertContent(u).focus(r).run()}catch(f){console.error("插入内容时出错:",f)}c()},0)})},a=Math.max(e?.speed??1,0),o=u=>u?.type==="paragraph"&&(!u.content||u.content.length===0||u.content.length===1&&u.content[0].type==="text"&&!u.content[0].text),s=async(u,c,f,d=!1)=>{let h=0;if(u.type==="paragraph")if(o(u)){const p=[u];for(let v=c+1;v<f.length&&o(f[v]);v++)p.push(f[v]),h++,sa.value.currentParagraph++;await i(p),sa.value.currentParagraph++}else{if(await i([{type:"paragraph",attrs:u.attrs}]),u.content&&u.content.length>0)for(let p=0;p<u.content.length;p++){sa.value.currentTextNode=p;const v=u.content[p],g=await s(v,p,u.content,!1);p=p+(g??0)}else t.commands.enter();sa.value.currentParagraph++}else if(u.type==="text"){const p=u.text??"",v=u.marks??[],g=e?.step??1;for(let y=0;y<p.length;y+=g){if(!sa.value.isRunning)return;const b=Math.min(y+g,p.length),_=p.slice(y,b);await new Promise(x=>{cf=setTimeout(async()=>{await i([{type:"text",text:_,marks:v}]),sa.value.currentChar=y+_.length-1,jv.typedChars+=_.length,e?.onProgress&&jv.totalChars>0&&e.onProgress(jv.typedChars/jv.totalChars),x()},a)})}}else if(u.type==="table"){const p=[u];for(let v=c+1;v<f.length&&o(f[v]);v++)p.push(f[v]),h++;p.length===1&&p.push({type:"paragraph"}),await i(p),t.commands.enter()}else d?await i([u,{type:"paragraph"}]):await i([u]);return h},l=n?.content??[];for(let u=0;u<l.length&&sa.value.isRunning;u++){const c=await s(l[u],u,l,!0);u=u+(c??0)}sa.value.isRunning&&e?.onComplete&&e.onComplete(),sa.value.isRunning=!1}catch(r){console.error("类型写入器出错:",r)}})(),!0),stopTypewriter:()=>()=>(sa.value.isRunning=!1,cf&&(clearTimeout(cf),cf=null),!0),getTypewriterState:()=>({isRunning:sa.value.isRunning,currentParagraph:sa.value.currentParagraph,currentTextNode:sa.value.currentTextNode,currentChar:sa.value.currentChar})}}}),yPe={class:"max-w-full node-view-video white-view-node"},bPe=["src"],xPe={key:0,class:"uploading absolute top-0 right-0 left-0 h-[2px] bg-[#007bff]"},_Pe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("options"),t=m.inject("editor"),r=m.inject("uploadFileMap"),i=m.ref(null),a=m.ref(!1),o=m.ref(null),s=m.ref(0),l=m.ref(0),u=m.computed(()=>{const{nodeAlign:h,margin:p}=n.node.attrs,v=p?.top&&p?.top!==""?`${p.top}px`:void 0,g=p?.bottom&&p?.bottom!==""?`${p.bottom}px`:void 0;return{"justify-content":h,marginTop:v,marginBottom:g}}),c=()=>{t.value?.chain().focus().setNodeSelection(n.getPos()).run(),a.value=!0};m.onMounted(async()=>{if(await m.nextTick(),!(n.node.attrs.uploaded||!n.node.attrs.id)&&r.value.has(n.node.attrs.id))try{const h=r.value.get(n.node.attrs.id),{id:p,url:v}=await e.value?.onFileUpload?.(h)??{};i.value&&Ef(t.value,{id:p,src:v,uploaded:!0},n.getPos()),r.value.delete(n.node.attrs.id)}catch(h){console.error(h)}});const f=()=>{if(n.node.attrs.width===null){const{clientWidth:h=0,clientHeight:p=0}=o.value??{};s.value=i.value?.$el.clientWidth??0;const v=h/p;l.value=i.value?.$el.clientWidth/v,n.updateAttributes({width:(200*v).toFixed(2)}),setTimeout(()=>{n.updateAttributes({height:i.value?.$el.clientHeight})},200)}},d=({width:h,height:p})=>{n.updateAttributes({width:h,height:p})};return T_(i,()=>{a.value=!1}),(h,p)=>(m.openBlock(),m.createBlock(m.unref(Jl),{id:h.node.attrs.id,ref_key:"containerRef",ref:i,class:"white-video-wrapper flex max-h-full relative",style:m.normalizeStyle(u.value)},{default:m.withCtx(()=>[m.createElementVNode("div",yPe,[m.createVNode(m.unref(Ap),{selected:a.value,rotatable:!1,boundary:!1,width:Number(h.node.attrs.width),height:Number(h.node.attrs.height),"min-width":300,"min-height":200,"max-width":s.value,"max-height":l.value,"equal-proportion":!0,disabled:m.unref(e).editor?.readOnly,onResize:d,onFocus:c},{default:m.withCtx(()=>[m.createElementVNode("video",{ref_key:"videoRef",ref:o,src:h.node.attrs.src,preload:"metadata",crossorigin:"anonymous",controls:"",onCanplay:f,onClick:c},null,40,bPe),!h.node.attrs.uploaded&&h.node.attrs.id!==null?(m.openBlock(),m.createElementBlock("div",xPe)):m.createCommentVNode("",!0)]),_:1},8,["selected","width","height","max-width","max-height","disabled"])])]),_:1},8,["id","style"]))}}),SPe=yi.create({name:"video",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},file:{default:null},id:{default:null},name:{default:null},size:{default:null},src:{default:null},width:{default:null},height:{default:200},draggable:{default:!1},uploaded:{default:!1},previewType:{default:"video"}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:n}){return["video",Jn(n)]},addNodeView(){return tl(_Pe)},addCommands(){return{setVideo:n=>({commands:e,editor:t})=>e.insertContentAt(t.state.selection.anchor,{type:this.name,attrs:n})}}}),wPe=({container:n,options:e,uploadFileMap:t})=>{const{document:r,users:i,file:a,disableExtensions:o}=e.value,s={highlight:Wae.configure({multicolor:!0}),"ordered-list":ZLe,"bullet-list":Ice,"line-height":fLe.configure({types:["heading","paragraph"],defaultLineHeight:1.7}),margin:LLe,link:MY,image:yY,inlineImage:uLe,video:SPe,audio:oce,"code-block":The,tag:hPe,columns:Nce,mention:HLe.configure({suggestion:qLe(i??[],n.value)}),"date-time":Mhe,hr:KRe,"web-page":QRe,TaskList:Moe.configure({HTMLAttributes:{class:"white-task-list"}}),TaskItem:Noe.configure({nested:!0})},l=[qle.configure({bold:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1,history:!1}),toe.configure({placeholder:()=>"输入内容..."}),eoe.extend({addKeyboardShortcuts(){return{}}}),$ae.configure({className:"white-node-focused",mode:"all"}),jRe,Hae,WRe,Rae.extend({renderHTML:({HTMLAttributes:u})=>["b",u,0]}),Eoe,noe,roe,Vae,Bae,cLe,vPe,KLe,tce,oPe,ioe,cPe,lPe,HRe,JLe,nue.configure({scrollParent:()=>document.getElementById(`${n.value}`),getId:()=>ip()}),PF.configure(r?.typographyRules),Lae.configure({limit:r?.characterLimit!==0?r?.characterLimit:void 0}),URe.configure({allowedMimeTypes:a?.allowedMimeTypes,onPaste:async(u,c)=>{for(const f of c){const d=await vue(f);u.commands.insertFile({file:f,uploadFileMap:t.value,autoType:!0,fileDim:d})}},onDrop:(u,c,f)=>{for(const d of c)u.commands.insertFile({file:d,uploadFileMap:t.value,autoType:!0,pos:f})}}),Fae.configure({color:"#007bff"}),mPe];return Object.values(s).forEach(u=>{if(!o?.includes(u.name)){if(Array.isArray(u)){l.push(...u);return}l.push(u)}}),l},gz=n=>{let e=!0;return n.value.editor?.enableMarkdown||(e=[PF,yY]),e},kPe=m.defineComponent({__name:"ScrollAble",setup(n,{expose:e}){const t=m.ref(null),r=m.ref(null),i=m.ref(!0),a=m.ref(!0),o=()=>{const{scrollLeft:c=0,scrollWidth:f=0,clientWidth:d=0}=r.value??{};i.value=c===0,a.value=c+d+10>=f},s=()=>{(r.value?.scrollLeft||r.value?.scrollLeft===0)&&(r.value.scrollLeft-=r.value.offsetWidth-10||100)},l=()=>{(r.value?.scrollLeft||r.value?.scrollLeft===0)&&(r.value.scrollLeft+=r.value.offsetWidth-10||100)};return que(t,()=>{o()}),m.onMounted(()=>{r.value?.addEventListener("scroll",o)}),e({update:()=>{r.value&&(r.value.scrollLeft=0),a.value=!0,o()}}),(c,f)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"wraperRef",ref:t,class:m.normalizeClass(["white-scrollable-container flex items-center",{"!pl-[36px]":!i.value,"!pr-[36px]":!a.value}])},[i.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:0,class:"w-scrollable-control scrollable-left",onClick:s},[...f[0]||(f[0]=[m.createElementVNode("i",{class:"w-iconfont icon-left"},null,-1)])])),m.createElementVNode("div",{ref_key:"contentRef",ref:r,class:"w-scrollable-content text-center flex items-center"},[m.renderSlot(c.$slots,"default")],512),a.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:1,class:"w-scrollable-control scrollable-right",onClick:l},[...f[1]||(f[1]=[m.createElementVNode("i",{class:"w-iconfont icon-right"},null,-1)])]))],2))}}),TPe={class:"w-[28px] h-[28px] cursor-pointer flex items-center justify-center gap-[0.4rem] text-[12px] rounded-[4px] hover:text-[#007aff] hover:bg-[#edeef2]"},CPe=m.defineComponent({__name:"tool-column",setup(n){const e=m.inject("page"),t=m.ref(!1),r=i=>{e.value.toolbar=i,t.value=!1};return(i,a)=>(m.openBlock(),m.createBlock(js,{trigger:"click",placement:"bottom",value:t.value,"onUpdate:value":a[2]||(a[2]=o=>t.value=o),contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",m.unref(e).toolbar==="single"?"text-[#007aff]":""]),onClick:a[0]||(a[0]=o=>r("single"))},[...a[3]||(a[3]=[m.createElementVNode("i",{class:"w-iconfont icon-single"},null,-1),m.createTextVNode(" 单行工具栏 ",-1)])],2),m.createElementVNode("div",{class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",m.unref(e).toolbar==="double"?"text-[#007aff]":""]),onClick:a[1]||(a[1]=o=>r("double"))},[...a[4]||(a[4]=[m.createElementVNode("i",{class:"w-iconfont icon-double"},null,-1),m.createTextVNode(" 双行工具栏 ",-1)])],2)]),default:m.withCtx(()=>[m.createElementVNode("span",TPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[13px] transition-transform duration-200",t.value?"rotate-180":""])},null,2)])]),_:1},8,["value"]))}}),EPe=["disabled"],MPe={key:0,class:"text-[12px] mt-2"},An=m.defineComponent({__name:"MenusButton",props:{ico:{default:""},text:{default:""},hideText:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shortcut:{default:void 0},shortcutText:{default:void 0},menuActive:{type:Boolean,default:!1}},setup(n){const e=m.useAttrs(),t=m.inject("editor"),r=(...i)=>{e.onMenuClickThrough?e.onMenuClickThrough(...i):e.onMenuClick&&e.onMenuClick(...i)};return(i,a)=>{const o=m.resolveDirective("tooltip");return m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(t)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(t)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(t)?.isEditable===!1)},m.unref(e),{onClick:r}),[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`])},null,2),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",MPe,m.toDisplayString(n.text),1))],16,EPe)),[[o,`${n.text}`]])}}}),WM=m.defineComponent({__name:"bold",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"bold",text:"加粗",shortcut:"Ctrl+B","hide-text":"","menu-active":m.unref(e)?.isActive("bold"),disabled:!m.unref(e)?.can().chain().focus().toggleBold().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleBold().run())},null,8,["menu-active","disabled"]))}}),jM=m.defineComponent({__name:"underline",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"underline",text:"下划线",shortcut:"Ctrl+U","hide-text":"","menu-active":m.unref(e)?.isActive("underline"),disabled:!m.unref(e)?.can().chain().focus().toggleUnderline().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleUnderline().run())},null,8,["menu-active","disabled"]))}}),qM=m.defineComponent({__name:"decoration",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"decoration",text:"删除线",shortcut:"Ctrl+Shift+X","hide-text":"","menu-active":m.unref(e)?.isActive("strike"),disabled:!m.unref(e)?.can().chain().focus().toggleStrike().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleStrike().run())},null,8,["menu-active","disabled"]))}}),KM=m.defineComponent({__name:"italic",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"italic",text:"斜体",shortcut:"Ctrl+I","hide-text":"","menu-active":m.unref(e)?.isActive("italic"),disabled:!m.unref(e)?.can().chain().focus().toggleItalic().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleItalic().run())},null,8,["menu-active","disabled"]))}}),APe=["disabled"],NPe={key:0,class:"text-[13px] text-[#333639] ml-[3px]"},DPe={class:"flex items-center justify-center w-full h-full"},OPe=["disabled"],IPe={class:"h-full gap-[5px]"},RPe={key:0,class:"text-[12px] mt-2"},il=m.defineComponent({__name:"MenusPopup",props:{ico:{default:""},icoSize:{default:14},text:{default:""},hideText:{type:Boolean,default:!1},popupVisible:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shortcut:{default:void 0},shortcutText:{default:void 0},menuActive:{type:Boolean,default:!1},popupType:{default:"arrow"},placement:{default:"bottom"},trigger:{default:"click"}},emits:["update:popupVisible"],setup(n,{emit:e}){const t=m.useAttrs(),r=m.inject("editor"),i=n,a=e,o=m.computed({get:()=>i.popupVisible,set:l=>a("update:popupVisible",l)}),s=(...l)=>{t.onMenuClickThrough?t.onMenuClickThrough(...l):t.onMenuClick&&t.onMenuClick(...l)};return(l,u)=>{const c=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[n.popupType==="arrow"?m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({key:0,class:["white-editor-tool-item white-editor-tool-pop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",{class:"flex items-center h-full",onClick:s},[m.createElementVNode("div",null,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`]),style:m.normalizeStyle(n.hideText?`font-size: ${n.icoSize}px`:"")},null,6),m.renderSlot(l.$slots,"default")]),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",NPe,m.toDisplayString(n.text),1))]),m.createVNode(js,{trigger:n.trigger,value:o.value,"onUpdate:value":u[0]||(u[0]=f=>o.value=f),placement:n.placement,disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1),hasClass:"flex items-center justify-center w-[13px] h-full hover:bg-[#d7d3d3] mr-[-6px] ml-[4px] w-arrow"},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.createElementVNode("span",DPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])]),_:3},8,["trigger","value","placement","disabled"])],16,APe)),[[c,`${n.text}`]]):m.createCommentVNode("",!0),n.popupType==="select"?(m.openBlock(),m.createBlock(js,{key:1,trigger:n.trigger,value:o.value,"onUpdate:value":u[1]||(u[1]=f=>o.value=f),placement:n.placement},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item white-editor-tool-pop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",IPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`]),style:m.normalizeStyle(n.hideText?`font-size: ${n.icoSize}px`:"")},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",RPe,m.toDisplayString(n.text),1))])],16,OPe)),[[c,`${n.text}`]])])]),_:3},8,["trigger","value","placement"])):m.createCommentVNode("",!0)],64)}}});function t_(n){"@babel/helpers - typeof";return t_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t_(n)}var LPe=/^\s+/,PPe=/\s+$/;function Qt(n,e){if(n=n||"",e=e||{},n instanceof Qt)return n;if(!(this instanceof Qt))return new Qt(n,e);var t=BPe(n);this._originalInput=n,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.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=t.ok}Qt.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),e,t,r,i,a,o;return e=n.r/255,t=n.g/255,r=n.b/255,e<=.03928?i=e/12.92:i=Math.pow((e+.055)/1.055,2.4),t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(n){return this._a=zY(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=yz(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=yz(this._r,this._g,this._b),e=Math.round(n.h*360),t=Math.round(n.s*100),r=Math.round(n.v*100);return this._a==1?"hsv("+e+", "+t+"%, "+r+"%)":"hsva("+e+", "+t+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var n=mz(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=mz(this._r,this._g,this._b),e=Math.round(n.h*360),t=Math.round(n.s*100),r=Math.round(n.l*100);return this._a==1?"hsl("+e+", "+t+"%, "+r+"%)":"hsla("+e+", "+t+"%, "+r+"%, "+this._roundA+")"},toHex:function(n){return bz(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return $Pe(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(Ar(this._r,255)*100)+"%",g:Math.round(Ar(this._g,255)*100)+"%",b:Math.round(Ar(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ar(this._r,255)*100)+"%, "+Math.round(Ar(this._g,255)*100)+"%, "+Math.round(Ar(this._b,255)*100)+"%)":"rgba("+Math.round(Ar(this._r,255)*100)+"%, "+Math.round(Ar(this._g,255)*100)+"%, "+Math.round(Ar(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:QPe[bz(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var e="#"+xz(this._r,this._g,this._b,this._a),t=e,r=this._gradientType?"GradientType = 1, ":"";if(n){var i=Qt(n);t="#"+xz(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+t+")"},toString:function(n){var e=!!n;n=n||this._format;var t=!1,r=this._a<1&&this._a>=0,i=!e&&r&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(t=this.toRgbString()),n==="prgb"&&(t=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(t=this.toHexString()),n==="hex3"&&(t=this.toHexString(!0)),n==="hex4"&&(t=this.toHex8String(!0)),n==="hex8"&&(t=this.toHex8String()),n==="name"&&(t=this.toName()),n==="hsl"&&(t=this.toHslString()),n==="hsv"&&(t=this.toHsvString()),t||this.toHexString())},clone:function(){return Qt(this.toString())},_applyModification:function(n,e){var t=n.apply(null,[this].concat([].slice.call(e)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(WPe,arguments)},brighten:function(){return this._applyModification(jPe,arguments)},darken:function(){return this._applyModification(qPe,arguments)},desaturate:function(){return this._applyModification(HPe,arguments)},saturate:function(){return this._applyModification(GPe,arguments)},greyscale:function(){return this._applyModification(UPe,arguments)},spin:function(){return this._applyModification(KPe,arguments)},_applyCombination:function(n,e){return n.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(ZPe,arguments)},complement:function(){return this._applyCombination(YPe,arguments)},monochromatic:function(){return this._applyCombination(JPe,arguments)},splitcomplement:function(){return this._applyCombination(XPe,arguments)},triad:function(){return this._applyCombination(_z,[3])},tetrad:function(){return this._applyCombination(_z,[4])}};Qt.fromRatio=function(n,e){if(t_(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=hg(n[r]));n=t}return Qt(n,e)};function BPe(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,a=null,o=!1,s=!1;return typeof n=="string"&&(n=r4e(n)),t_(n)=="object"&&(ml(n.r)&&ml(n.g)&&ml(n.b)?(e=VPe(n.r,n.g,n.b),o=!0,s=String(n.r).substr(-1)==="%"?"prgb":"rgb"):ml(n.h)&&ml(n.s)&&ml(n.v)?(r=hg(n.s),i=hg(n.v),e=FPe(n.h,r,i),o=!0,s="hsv"):ml(n.h)&&ml(n.s)&&ml(n.l)&&(r=hg(n.s),a=hg(n.l),e=zPe(n.h,r,a),o=!0,s="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=zY(t),{ok:o,format:n.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function VPe(n,e,t){return{r:Ar(n,255)*255,g:Ar(e,255)*255,b:Ar(t,255)*255}}function mz(n,e,t){n=Ar(n,255),e=Ar(e,255),t=Ar(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var l=r-i;switch(o=s>.5?l/(2-r-i):l/(r+i),r){case n:a=(e-t)/l+(e<t?6:0);break;case e:a=(t-n)/l+2;break;case t:a=(n-e)/l+4;break}a/=6}return{h:a,s:o,l:s}}function zPe(n,e,t){var r,i,a;n=Ar(n,360),e=Ar(e,100),t=Ar(t,100);function o(u,c,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(c-u)*6*f:f<1/2?c:f<2/3?u+(c-u)*(2/3-f)*6:u}if(e===0)r=i=a=t;else{var s=t<.5?t*(1+e):t+e-t*e,l=2*t-s;r=o(l,s,n+1/3),i=o(l,s,n),a=o(l,s,n-1/3)}return{r:r*255,g:i*255,b:a*255}}function yz(n,e,t){n=Ar(n,255),e=Ar(e,255),t=Ar(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,o,s=r,l=r-i;if(o=r===0?0:l/r,r==i)a=0;else{switch(r){case n:a=(e-t)/l+(e<t?6:0);break;case e:a=(t-n)/l+2;break;case t:a=(n-e)/l+4;break}a/=6}return{h:a,s:o,v:s}}function FPe(n,e,t){n=Ar(n,360)*6,e=Ar(e,100),t=Ar(t,100);var r=Math.floor(n),i=n-r,a=t*(1-e),o=t*(1-i*e),s=t*(1-(1-i)*e),l=r%6,u=[t,o,a,a,s,t][l],c=[s,t,t,o,a,a][l],f=[a,a,s,t,t,o][l];return{r:u*255,g:c*255,b:f*255}}function bz(n,e,t,r){var i=[Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function $Pe(n,e,t,r,i){var a=[Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16)),Uo(FY(r))];return i&&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)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function xz(n,e,t,r){var i=[Uo(FY(r)),Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16))];return i.join("")}Qt.equals=function(n,e){return!n||!e?!1:Qt(n).toRgbString()==Qt(e).toRgbString()};Qt.random=function(){return Qt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function HPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.s-=e/100,t.s=xS(t.s),Qt(t)}function GPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.s+=e/100,t.s=xS(t.s),Qt(t)}function UPe(n){return Qt(n).desaturate(100)}function WPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.l+=e/100,t.l=xS(t.l),Qt(t)}function jPe(n,e){e=e===0?0:e||10;var t=Qt(n).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Qt(t)}function qPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.l-=e/100,t.l=xS(t.l),Qt(t)}function KPe(n,e){var t=Qt(n).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,Qt(t)}function YPe(n){var e=Qt(n).toHsl();return e.h=(e.h+180)%360,Qt(e)}function _z(n,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Qt(n).toHsl(),r=[Qt(n)],i=360/e,a=1;a<e;a++)r.push(Qt({h:(t.h+a*i)%360,s:t.s,l:t.l}));return r}function XPe(n){var e=Qt(n).toHsl(),t=e.h;return[Qt(n),Qt({h:(t+72)%360,s:e.s,l:e.l}),Qt({h:(t+216)%360,s:e.s,l:e.l})]}function ZPe(n,e,t){e=e||6,t=t||30;var r=Qt(n).toHsl(),i=360/t,a=[Qt(n)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(Qt(r));return a}function JPe(n,e){e=e||6;for(var t=Qt(n).toHsv(),r=t.h,i=t.s,a=t.v,o=[],s=1/e;e--;)o.push(Qt({h:r,s:i,v:a})),a=(a+s)%1;return o}Qt.mix=function(n,e,t){t=t===0?0:t||50;var r=Qt(n).toRgb(),i=Qt(e).toRgb(),a=t/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return Qt(o)};Qt.readability=function(n,e){var t=Qt(n),r=Qt(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};Qt.isReadable=function(n,e,t){var r=Qt.readability(n,e),i,a;switch(a=!1,i=i4e(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};Qt.mostReadable=function(n,e,t){var r=null,i=0,a,o,s,l;t=t||{},o=t.includeFallbackColors,s=t.level,l=t.size;for(var u=0;u<e.length;u++)a=Qt.readability(n,e[u]),a>i&&(i=a,r=Qt(e[u]));return Qt.isReadable(n,r,{level:s,size:l})||!o?r:(t.includeFallbackColors=!1,Qt.mostReadable(n,["#fff","#000"],t))};var YM=Qt.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"},QPe=Qt.hexNames=e4e(YM);function e4e(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function zY(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Ar(n,e){t4e(n)&&(n="100%");var t=n4e(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function xS(n){return Math.min(1,Math.max(0,n))}function $a(n){return parseInt(n,16)}function t4e(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function n4e(n){return typeof n=="string"&&n.indexOf("%")!=-1}function Uo(n){return n.length==1?"0"+n:""+n}function hg(n){return n<=1&&(n=n*100+"%"),n}function FY(n){return Math.round(parseFloat(n)*255).toString(16)}function Sz(n){return $a(n)/255}var Bo=(function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 ml(n){return!!Bo.CSS_UNIT.exec(n)}function r4e(n){n=n.replace(LPe,"").replace(PPe,"").toLowerCase();var e=!1;if(YM[n])n=YM[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Bo.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=Bo.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Bo.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=Bo.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Bo.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=Bo.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Bo.hex8.exec(n))?{r:$a(t[1]),g:$a(t[2]),b:$a(t[3]),a:Sz(t[4]),format:e?"name":"hex8"}:(t=Bo.hex6.exec(n))?{r:$a(t[1]),g:$a(t[2]),b:$a(t[3]),format:e?"name":"hex"}:(t=Bo.hex4.exec(n))?{r:$a(t[1]+""+t[1]),g:$a(t[2]+""+t[2]),b:$a(t[3]+""+t[3]),a:Sz(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Bo.hex3.exec(n))?{r:$a(t[1]+""+t[1]),g:$a(t[2]+""+t[2]),b:$a(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function i4e(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}const wz=(n,e,t=!1)=>{if(t)switch(e){case"rgb":return n.toRgb();case"prgb":return n.toPercentageRgb();case"hsl":return n.toHsl();case"hsv":return n.toHsv();default:return null}else{let r=e;e==="hex"&&n.getAlpha()<1&&(r="hex8");let i=n.toString(r);try{i=JSON.parse(i)}catch{}return i}},ET=(n,e)=>!!(Object.prototype.hasOwnProperty.call(n,e)&&typeof n[e]<"u"),o1=n=>typeof n>"u",_S=["update:tinyColor","update:modelValue","input"];function SS(n,e,t){let r,i;const a=m.computed({get:()=>{const{modelValue:s,tinyColor:l,value:u}=n,c=l??s??u;return o1(i)&&(o1(u)||(i=Qt(u).getFormat()),o1(s)||(i=Qt(s).getFormat())),o1(r)&&(typeof u=="object"&&!(u instanceof Qt)&&(r=!0),typeof s=="object"&&(r=!0)),Qt(c)},set:s=>{o(s)}}),o=s=>{const l=Qt(s);if(ET(n,"tinyColor")&&e("update:tinyColor",l),ET(n,"modelValue")){const u=wz(l,i,r);e("update:modelValue",u)}if(ET(n,"value")){const u=wz(l,i,r);e("input",u)}};return a}const $Y=n=>{const e={x:0,y:0};return n instanceof MouseEvent&&(e.x=n.pageX,e.y=n.pageY),typeof TouchEvent<"u"&&n instanceof TouchEvent&&(e.x=n.touches?.[0]?n.touches[0].pageX:n.changedTouches?.[0]?n.changedTouches[0].pageX:0,e.y=n.touches?.[0]?n.touches[0].pageY:n.changedTouches?.[0]?n.changedTouches[0].pageY:0),e},a4e=()=>{const n=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0,e=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0;return{x:n,y:e}},HY=n=>{const{x:e,y:t}=a4e(),r=n.getBoundingClientRect();return{x:r.left+e,y:r.top+t}},BO=n=>n.code==="ArrowUp"||n.keyCode===38?"up":n.code==="ArrowDown"||n.keyCode===40?"down":n.code==="ArrowLeft"||n.keyCode===37?"left":n.code==="ArrowRight"||n.keyCode===39?"right":null;function o4e(n){const e=n.toString();return e.indexOf(".")!==-1?e.split(".")[1].length:0}function MT(n,e,t){return Math.min(Math.max(n,e),t)}const GY=(n,e=20)=>{let t,r,i;return(...a)=>{t?(clearTimeout(r),r=setTimeout(()=>{Date.now()-i>=e&&(n(...a),i=Date.now())},Math.max(e-(Date.now()-i),0))):(n(...a),i=Date.now(),t=!0)}},s4e=["aria-valuetext"],l4e=m.defineComponent({__name:"SaturationSlider",props:{hue:{},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(_S),setup(n,{emit:e}){const t=e,r=n,i=m.ref(0),a=SS(r,t),o=m.computed(()=>a.value.toHsv()),s=m.computed(()=>r.hue??o.value.h),l=m.computed(()=>`hsl(${s.value}, 100%, 50%)`),u=m.computed(()=>-(o.value.v*100)+1+100+"%"),c=m.computed(()=>o.value.v<=.01?i.value*100+"%":o.value.s*100+"%"),f=m.ref(null);function d(_){const x=f.value;if(!x)return;const T=x.clientWidth,k=x.clientHeight,{x:C,y:D}=HY(x),{x:O,y:R}=$Y(_),V=MT(O-C,0,T),F=MT(R-D,0,k),$=V/T,J=MT(1-F/k,0,1);i.value=$;let te=Math.round($*100),Q=Math.round(J*100);te===1&&(te=.01),Q===1&&(Q=.01),h({h:s.value,s:te,v:Q,a:o.value.a})}function h(_){a.value=_}const p=GY(d,20);function v(_){_.preventDefault(),_.type.startsWith("mouse")?(window.addEventListener("mousemove",p),window.addEventListener("mouseup",p),window.addEventListener("mouseup",g)):_.type.startsWith("touch")&&(window.addEventListener("touchmove",p),window.addEventListener("touchend",p),window.addEventListener("touchend",g))}function g(){y()}function y(){window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",p),window.removeEventListener("mouseup",g),window.removeEventListener("touchmove",p),window.removeEventListener("touchend",p),window.removeEventListener("touchend",g)}function b(_){switch(_.preventDefault(),BO(_)){case"left":{const x=o.value.s-.01;h({...o.value,s:x>=0?x:0});break}case"right":{const x=o.value.s+.01;h({...o.value,s:x>1?1:x});break}case"up":{const x=o.value.v+.01;h({...o.value,v:x>1?1:x});break}case"down":{const x=o.value.v-.01;h({...o.value,v:x<0?0:x});break}}}return m.onUnmounted(()=>{y()}),(_,x)=>(m.openBlock(),m.createElementBlock("div",{class:"vc-saturation-slider bg",style:m.normalizeStyle({background:l.value}),ref_key:"containerRef",ref:f,onMousedown:v,onTouchstart:v,role:"application","aria-label":"Saturation and brightness picker"},[x[1]||(x[1]=m.createElementVNode("div",{class:"bg white"},null,-1)),x[2]||(x[2]=m.createElementVNode("div",{class:"bg black"},null,-1)),m.createElementVNode("div",{class:"picker-wrap",style:m.normalizeStyle({top:u.value,left:c.value}),role:"slider",tabindex:"0","aria-valuemin":"0","aria-valuemax":"1","aria-label":"press arrow to change saturation or brightness","aria-valuenow":"?","aria-valuetext":`saturation: ${o.value.s.toFixed(0)}%, brightness: ${o.value.v.toFixed(0)}%`,onKeydown:b},x[0]||(x[0]=[m.createElementVNode("div",{class:"picker"},null,-1)]),44,s4e)],36))}}),Id=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},UY=Id(l4e,[["__scopeId","data-v-4d048d6e"]]),XM=n=>typeof n<"u",u4e={class:"vc-base-slider"},c4e={key:0,class:"background"},f4e=["aria-label","aria-valuemax","aria-valuenow"],d4e=m.defineComponent({__name:"BaseSlider",props:{direction:{default:"horizontal"},modelValue:{default:0},value:{default:0},max:{default:100},step:{},ariaLabel:{default:"slider"}},emits:["input","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=m.computed(()=>t.modelValue??t.value),a=m.computed(()=>{let p=i.value/t.max;return t.direction==="vertical"&&(p=1-p),100*p+"%"}),o=m.ref(null);function s(p){XM(p)&&(r("input",p),r("update:modelValue",p))}function l(p){const{direction:v,max:g}=t,y=o.value;if(!y)return;const b=y.clientWidth,_=y.clientHeight,{x,y:T}=HY(y),{x:k,y:C}=$Y(p),D=k-x,O=C-T;let R;v==="vertical"?O<0?R=g:O>_?R=0:R=(1-O/_)*g:D<0?R=0:D>b?R=g:R=D/b*g,s(R)}const u=GY(l);function c(p){l(p),p.type.startsWith("mouse")?(window.addEventListener("mousemove",u),window.addEventListener("mouseup",f)):(window.addEventListener("touchmove",u),window.addEventListener("touchend",f))}function f(){d()}function d(){window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",f),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",f)}function h(p){p.preventDefault();const{direction:v,max:g}=t,y=BO(p),b=t.step??g/100,_=i.value;let x;switch(y){case"left":{if(v!=="horizontal")return;x=_-b<0?0:_-b;break}case"right":{if(v!=="horizontal")return;x=_+b>g?g:_+b;break}case"down":{if(v!=="vertical")return;x=_-b<0?0:_-b;break}case"up":{if(v!=="vertical")return;x=_+b>g?g:_+b;break}}s(x)}return m.onUnmounted(()=>{d()}),(p,v)=>(m.openBlock(),m.createElementBlock("div",u4e,[p.$slots.background?(m.openBlock(),m.createElementBlock("div",c4e,[m.renderSlot(p.$slots,"background",{},void 0,!0)])):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass({slider:!0,horizontal:p.direction==="horizontal",vertical:p.direction==="vertical"}),ref_key:"containerRef",ref:o,onMousedown:c,onTouchstart:c,role:"slider","aria-label":p.ariaLabel,"aria-valuemax":p.max,"aria-valuemin":"0","aria-valuenow":i.value.toFixed(1),tabindex:"0",onKeydown:h},[m.createElementVNode("div",{class:"picker-wrap",style:m.normalizeStyle({left:p.direction==="horizontal"?a.value:0,top:p.direction==="vertical"?a.value:0}),role:"presentation"},[m.renderSlot(p.$slots,"picker",{},()=>[v[0]||(v[0]=m.createElementVNode("div",{class:"picker"},null,-1))],!0)],4)],42,f4e)]))}}),WY=Id(d4e,[["__scopeId","data-v-972b0fad"]]),h4e=m.defineComponent({__name:"HueSlider",props:{direction:{default:"horizontal"},modelValue:{default:0}},emits:["update:modelValue"],setup(n,{emit:e}){m.useCssVars(c=>({"2f44f39d":i.value}));const t=n,r=e,i=m.computed(()=>`linear-gradient(to ${t.direction==="horizontal"?"right":"top"}, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)`),a=m.computed(()=>{const c=Number(t.modelValue);return Number.isNaN(c)?0:c}),o=m.ref();m.watch(a,(c,f)=>{c!==0&&c-f>0&&(o.value="right"),c!==0&&c-f<0&&(o.value="left")});const s=m.computed(()=>t.direction==="vertical"?a.value===0&&o.value==="right"?0:a.value:t.direction==="horizontal"?a.value===0&&o.value==="right"?360:a.value:0);function l(c){u(Math.round(c))}function u(c){r("update:modelValue",c)}return(c,f)=>(m.openBlock(),m.createBlock(WY,{class:"vc-hue-slider",max:360,step:1,modelValue:s.value,direction:c.direction,"onUpdate:modelValue":l,"aria-label":"Hue"},{background:m.withCtx(()=>f[0]||(f[0]=[m.createElementVNode("div",{class:"gradient"},null,-1)])),picker:m.withCtx(()=>[m.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","direction"]))}}),jY=Id(h4e,[["__scopeId","data-v-5367c985"]]),p4e=m.defineComponent({__name:"CheckerboardBG",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(n){const e=n;function t(a,o,s){if(typeof document>"u")return null;var l=document.createElement("canvas");l.width=l.height=s*2;var u=l.getContext("2d");return u?(u.fillStyle=a,u.fillRect(0,0,l.width,l.height),u.fillStyle=o,u.fillRect(0,0,s,s),u.translate(s,s),u.fillRect(0,0,s,s),l.toDataURL()):null}function r(a,o,s){return t(a,o,s)}const i=m.computed(()=>`url(${r(e.white,e.grey,e.size)})`);return(a,o)=>(m.openBlock(),m.createElementBlock("div",{class:"vc-checkerboard",style:m.normalizeStyle({backgroundImage:i.value})},null,4))}}),ZM=Id(p4e,[["__scopeId","data-v-37d61ccd"]]),v4e=m.defineComponent({__name:"AlphaSlider",props:{tinyColor:{},modelValue:{},value:{}},emits:_S,setup(n,{emit:e}){const t=SS(n,e),r=m.computed(()=>{const o=t.value.toRgb(),s=[o.r,o.g,o.b].join(",");return"linear-gradient(to right, rgba("+s+", 0) 0%, rgba("+s+", 1) 100%)"}),i=m.computed(()=>t.value.getAlpha());function a(o){t.value=t.value.setAlpha(o).clone()}return(o,s)=>(m.openBlock(),m.createBlock(WY,{class:"vc-alpha-slider",modelValue:i.value,max:1,"aria-label":"Transparency","onUpdate:modelValue":a},{background:m.withCtx(()=>[m.createVNode(ZM),m.createElementVNode("div",{class:"gradient",style:m.normalizeStyle({background:r.value})},null,4)]),_:1},8,["modelValue"]))}}),g4e=Id(v4e,[["__scopeId","data-v-07dd346b"]]),m4e={class:"vc-editable-input"},y4e=["value","aria-label"],b4e={key:0,class:"vc-input-desc","aria-hidden":"true"},x4e=m.defineComponent({__name:"EditableInput",props:{value:{},label:{},desc:{},max:{},min:{},step:{default:1},a11y:{}},emits:["change","blur"],setup(n,{emit:e}){const t=n,r=e,i=t.a11y?.label??t.label,a=`input__label__${i}__${Math.random().toString().slice(2,5)}`;function o(c){const{min:f,max:d}=t;if(XM(d)&&+c>d){r("change",d);return}if(XM(f)&&+c<f){r("change",f);return}r("change",c)}function s(c){o(c.target?.value)}function l(c){r("blur",c)}function u(c){let f=Number(t.value);if(!isNaN(f)){let d=t.step;const h=o4e(d),p=BO(c);p==="up"&&(o((f+d).toFixed(h)),c.preventDefault()),p==="down"&&(o((f-d).toFixed(h)),c.preventDefault())}}return(c,f)=>(m.openBlock(),m.createElementBlock("div",m4e,[m.createElementVNode("input",{class:"vc-input-input",value:t.value,onKeydown:u,onInput:s,onBlur:l,"aria-label":m.unref(i),id:a},null,40,y4e),m.createElementVNode("label",{for:a,class:"vc-input-label","aria-hidden":"true"},m.toDisplayString(t.label),1),c.desc?(m.openBlock(),m.createElementBlock("span",b4e,m.toDisplayString(c.desc),1)):m.createCommentVNode("",!0)]))}}),$o=Id(x4e,[["__scopeId","data-v-9c267b2b"]]),kz=n=>Qt(n).isValid(),_4e=n=>Qt(n).getAlpha()===0,qY=m.defineComponent({__name:"HexInput",props:{value:{},label:{},desc:{},a11y:{},type:{default:"hex"},withHash:{type:Boolean,default:!1}},emits:["change"],setup(n,{emit:e}){const t=n,r=e,i={label:t.type==="hex"?"Hex":"Hex with transparency",...t.a11y},a=(u,c="hex")=>{let f="";return c==="hex"&&(f=Qt(u).toHexString()),c==="hex8"&&(f=Qt(u).toHex8String()),t.withHash!==!0&&(f=f.replace("#","")),f},o=m.ref(a(t.value,t.type));m.watch(()=>t.value,u=>{Qt.equals(u,o.value)||(o.value=a(u,t.type))});const s=u=>{if(!u)return;o.value=u;let c=u.length;u[0]==="#"&&(c=c-1),!(t.type==="hex"&&c%3!==0&&c!==8)&&(t.type==="hex8"&&c!==8||kz(u)&&r("change",u))},l=()=>{let u=o.value.length;o.value[0]==="#"&&(u=u-1),!(kz(o.value)&&(t.type==="hex"&&u===6||t.type==="hex8"&&u===8))&&(o.value=a(t.value,t.type))};return(u,c)=>(m.openBlock(),m.createBlock($o,{label:t.label,a11y:i,value:o.value,onChange:s,onBlur:l},null,8,["label","value"]))}});function S4e(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return n.charAt(Math.floor(Math.random()*n.length))+n.charAt(Math.floor(Math.random()*n.length))}const KY=n=>{const e=m.ref(0),t=`__from__vc__hue__${S4e()}`;return m.watch(n,r=>{if(r[t])return;const i=r.toHsl().h;i===0&&e.value!==0||(e.value=i)},{immediate:!0}),{hueRef:e,updateHueRef:r=>{const i=Qt({...n.value.toHsl(),h:r});i[t]=!0,n.value=i,e.value=r}}},w4e={class:"title","aria-hidden":"true"},k4e={class:"body"},T4e={class:"saturation"},C4e={class:"hue"},E4e={class:"preview"},M4e={class:"preview-label","aria-hidden":"true"},A4e={class:"preview-swatches"},N4e=["aria-label"],D4e=["aria-label"],O4e={class:"preview-label","aria-hidden":"true"},I4e={key:0,class:"actions"},R4e=["aria-label"],L4e={class:"fields"},P4e=["aria-label"];_S.concat(["ok","cancel","reset"]);const B4e={class:"saturation"},V4e={class:"controls"},z4e={class:"sliders"},F4e={class:"hue"},$4e={key:0,class:"alpha"},H4e={class:"color"},G4e=["aria-label"],U4e={key:0,class:"field"},W4e={class:"field_double"},j4e={class:"field_single"},q4e={class:"field_single"},K4e={class:"field_single"},Y4e={key:0,class:"field_single"},X4e={class:"presets",role:"listbox","aria-label":"A color preset, pick one to set as current color"},Z4e=["onClick","title","aria-label","aria-selected","onKeydown"],J4e=["onClick","aria-selected","title","onKeydown"],Q4e=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"],e5e=m.defineComponent({__name:"SketchPicker",props:{presetColors:{default:()=>Q4e},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(_S),setup(n,{emit:e}){const t=n,r=SS(t,e),{hueRef:i,updateHueRef:a}=KY(r),o=m.computed(()=>Number(r.value.getAlpha().toFixed(2))),s=m.computed(()=>{let h;return o.value<1?h=r.value.toHex8String():h=r.value.toHexString(),h.replace("#","")}),l=m.computed(()=>r.value.toRgb()),u=h=>{r.value=h},c=(h,p)=>{if(!p||isNaN(Number(p)))return;const v={[h]:p};r.value={...l.value,...v}},f=h=>{!h||isNaN(Number(h))||(r.value=r.value.setAlpha(h).clone())},d=h=>{r.value=h};return(h,p)=>(m.openBlock(),m.createElementBlock("div",{role:"application","aria-label":"Sketch color picker",class:m.normalizeClass(["vc-sketch-picker",h.disableAlpha?"alpha-disabled":""])},[m.createElementVNode("div",B4e,[m.createVNode(UY,{hue:m.unref(i),tinyColor:m.unref(r),"onUpdate:tinyColor":p[0]||(p[0]=v=>m.isRef(r)?r.value=v:null)},null,8,["hue","tinyColor"])]),m.createElementVNode("div",V4e,[m.createElementVNode("div",z4e,[m.createElementVNode("div",F4e,[m.createVNode(jY,{modelValue:m.unref(i),"onUpdate:modelValue":m.unref(a)},null,8,["modelValue","onUpdate:modelValue"])]),h.disableAlpha?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",$4e,[m.createVNode(g4e,{tinyColor:m.unref(r),"onUpdate:tinyColor":p[1]||(p[1]=v=>m.isRef(r)?r.value=v:null)},null,8,["tinyColor"])]))]),m.createElementVNode("div",H4e,[m.createElementVNode("div",{"aria-label":`Current color is ${m.unref(r).toRgbString()}`,class:"active-color",style:m.normalizeStyle({background:m.unref(r).toRgbString()})},null,12,G4e),m.createVNode(ZM)])]),h.disableFields?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",U4e,[m.createElementVNode("div",W4e,[m.createVNode(qY,{label:"hex",value:s.value,onChange:u,type:o.value<1?"hex8":"hex"},null,8,["value","type"])]),m.createElementVNode("div",j4e,[m.createVNode($o,{label:"r",value:l.value.r,onChange:p[2]||(p[2]=v=>c("r",v)),a11y:{label:"Red"}},null,8,["value"])]),m.createElementVNode("div",q4e,[m.createVNode($o,{label:"g",value:l.value.g,onChange:p[3]||(p[3]=v=>c("g",v)),a11y:{label:"Green"}},null,8,["value"])]),m.createElementVNode("div",K4e,[m.createVNode($o,{label:"b",value:l.value.b,onChange:p[4]||(p[4]=v=>c("b",v)),a11y:{label:"Blue"}},null,8,["value"])]),h.disableAlpha?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Y4e,[m.createVNode($o,{label:"a",value:o.value,step:.01,max:1,onChange:f,a11y:{label:"Transparency"}},null,8,["value"])]))])),m.createElementVNode("div",X4e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.presetColors,v=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.unref(_4e)(v)?(m.openBlock(),m.createElementBlock("div",{key:v,class:"preset-color",onClick:g=>d(v),"aria-label":"Color: transparency","aria-selected":o.value===0,role:"option",tabindex:"0",title:v,onKeydown:m.withKeys(g=>d(v),["space"])},[m.createVNode(ZM)],40,J4e)):(m.openBlock(),m.createElementBlock("div",{class:"preset-color",key:v+"-color",style:m.normalizeStyle({background:v}),onClick:g=>d(v),title:v,"aria-label":"Color:"+v,"aria-selected":`#${s.value.toLowerCase()}`===v.toLowerCase(),role:"option",tabindex:"0",onKeydown:m.withKeys(g=>d(v),["space"])},null,44,Z4e))],64))),256))])],2))}}),VO=Id(e5e,[["__scopeId","data-v-fdb7d989"]]),Tz=m.defineComponent({__name:"color",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#000"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1,s===""?t.value?.chain().focus().unsetColor().run():t.value?.chain().focus().setColor(s).run()},o=aA(s=>{i.value=s,s===""?t.value?.chain().focus().unsetColor().run():t.value?.chain().focus().setColor(s).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"text-editor",text:"文字颜色","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>m.unref(t)?.isEditable===!1?()=>{}:a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:i.value})},null,4)]),_:1},8,["popup-visible"]))}}),Cz=m.defineComponent({__name:"background-color",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#007bff"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1,s===""?t.value?.chain().focus().unsetHighlight().run():t.value?.chain().focus().setHighlight({color:s}).run()},o=aA(s=>{i.value=s,s===""?t.value?.chain().focus().unsetHighlight().run():t.value?.chain().focus().setHighlight({color:s}).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"fill",text:"背景颜色","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>m.unref(t)?.isEditable===!1?()=>{}:a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:m.unref(t)?.getAttributes("highlight")?.color||i.value})},null,4)]),_:1},8,["popup-visible"]))}});var YY=(n=>(n.C="C",n.X="X",n.Z="Z",n.Y="Y",n.A="A",n.G="G",n.L="L",n.F="F",n.D="D",n.B="B",n.P="P",n.O="O",n.R="R",n.T="T",n.MINUS="-",n.EQUAL="=",n.DIGIT_0="0",n.DELETE="DELETE",n.UP="ARROWUP",n.DOWN="ARROWDOWN",n.LEFT="ARROWLEFT",n.RIGHT="ARROWRIGHT",n.ENTER="ENTER",n.SPACE=" ",n.TAB="TAB",n.BACKSPACE="BACKSPACE",n.ESC="ESCAPE",n.PAGEUP="PAGEUP",n.PAGEDOWN="PAGEDOWN",n.F5="F5",n))(YY||{});const Fm=[{label:"默认",value:"14px",order:4},{label:"初号",value:"42pt",order:20},{label:"小初",value:"36pt",order:19},{label:"一号",value:"26pt",order:16},{label:"小一",value:"24pt",order:15},{label:"二号",value:"22pt",order:14},{label:"小二",value:"18pt",order:11},{label:"三号",value:"16pt",order:10},{label:"小三",value:"15pt",order:9},{label:"四号",value:"14pt",order:7},{label:"小四",value:"12pt",order:4},{label:"五号",value:"10.5pt",order:1},{label:"小五",value:"9pt",order:1},{label:"六号",value:"8pt",order:1},{label:"小六",value:"7.5pt",order:1},{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}],JM=[{label:"正文",value:"paragraph",element:"p"},{label:"标题1",value:"1",element:"h1"},{label:"标题2",value:"2",element:"h2"},{label:"标题3",value:"3",element:"h3"},{label:"标题4",value:"4",element:"h4"},{label:"标题5",value:"5",element:"h5"},{label:"标题6",value:"6",element:"h6"}],Ez={bar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},smooth:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},ring:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},area:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:["坐标1","坐标2","坐标3","坐标4","坐标5"],legends:["X","Y"],series:[[12,19,5,2,18],[7,11,13,21,9]]}},t5e=[{label:"网页",layout:"web"},{label:"A4",width:21,height:29.7,default:!0,layout:"page"},{label:"A3",width:29.7,height:42,layout:"page"},{label:"A5",width:14.8,height:21,layout:"page"},{label:"B5",width:17.6,height:25,layout:"page"},{label:"5号信纸",width:10.9,height:12.9,layout:"page"},{label:"6号信纸",width:11.9,height:22.9,layout:"page"},{label:"7号信纸",width:16.1,height:22.8,layout:"page"},{label:"9号信纸",width:22.8,height:32.3,layout:"page"},{label:"法律用纸",width:21.5,height:33.5,layout:"page"}],Mz=[{label:"默认",value:"decimal",code:`<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>
|
|
274
|
+
`),u=iPe(l);s.querySelectorAll("td, th").forEach(h=>{const p=u[h.getAttribute("class")];p?.background&&(h.style.background=p.background),p?.color&&(h.style.color=p.color),p?.["text-align"]&&h.setAttribute("align",p["text-align"])});const{schema:c}=n.state,f=Ol.fromSchema(c).parse(s),d=n.state.tr.replaceSelectionWith(f);return n.dispatch(d),!0}}})]}}),oPe=aPe.configure({allowTableNodeSelection:!0,resizable:!0}),sPe=yi.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:n}){return["td",Jn(this.options.HTMLAttributes,n),0]}}),VY={addAttributes(){return{...this.parent?.(),align:{default:null,parseHTML:n=>n.getAttribute("align")??null,renderHTML:({align:n})=>({align:n})},background:{default:null,parseHTML:n=>{const t=(n.getAttribute("style")??"").match(/background(?:-color)?:\s*([^;]+)/i);return t?t[1].trim():null},renderHTML:({background:n})=>n?{style:`background-color: ${n}`}:{}},color:{default:null,parseHTML:n=>{const e=n.getAttribute("style")??"",t=e.match(new RegExp("(?<!background-)color:\\s*([^;]+)","i"));return e.includes("background-color")?null:t?t[1].trim():null},renderHTML:({color:n})=>n?{style:`color: ${n}`}:{}}}}},lPe=sPe.extend(VY),uPe=yi.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:n=>{const e=n.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:n}){return["th",Jn(this.options.HTMLAttributes,n),0]}}),cPe=uPe.extend(VY),fPe=["textContent"],dPe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("options"),t=m.inject("editor");return(r,i)=>(m.openBlock(),m.createBlock(m.unref(Jl),{as:"span",class:"inline-block mx-[0.3rem] !bg-transparent"},{default:m.withCtx(()=>[m.createElementVNode("span",{class:"rounded-[0.2em] px-[0.4em] py-[0.15em] inline-block mx-[0.2em] text-sm font-[500] border-[#0000000d] box-border",style:m.normalizeStyle({color:r.node.attrs.color,backgroundColor:r.node.attrs.backgroundColor,cursor:!m.unref(e).document?.readOnly||m.unref(t).isEditable?"pointer":"default"}),textContent:m.toDisplayString(r.node.attrs.text)},null,12,fPe)]),_:1}))}}),hPe=yi.create({name:"tag",group:"inline",inline:!0,atom:!0,addAttributes(){return{type:{default:"default"},text:{default:"默认标签"},color:{default:"#999"},backgroundColor:{default:"rgba(0, 0, 0, 0.05)"}}},parseHTML(){return[{tag:'span[data-type="tag"]'}]},renderHTML({HTMLAttributes:n}){return["span",Jn(n,{"data-type":"tag"}),n.text]},addNodeView(){return tl(dPe)},addCommands(){return{insertTag:n=>({chain:e})=>e().insertContent({type:this.name,attrs:n}).run()}}}),pPe=fr.create({name:"textAlign",addOptions(){return{types:[],alignments:["left","center","right","justify"],defaultAlignment:null}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>{const e=n.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:n=>n.textAlign?{style:`text-align: ${n.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:n=>({commands:e})=>this.options.alignments.includes(n)?this.options.types.map(t=>e.updateAttributes(t,{textAlign:n})).every(t=>t):!1,unsetTextAlign:()=>({commands:n})=>this.options.types.map(e=>n.resetAttributes(e,"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")}}}),vPe=pPe.extend({addOptions(){return{...this.parent?.(),types:["heading","paragraph"],alignments:["left","center","right","justify","distributed"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{textAlign:{default:this.options.defaultAlignment,parseHTML:n=>n.style.textAlignLast?"distributed":n.style.textAlign||this.options.defaultAlignment,renderHTML:n=>n.textAlign===this.options.defaultAlignment?{}:n.textAlign==="distributed"?{style:"text-align-last: justify"}:{style:`text-align: ${n.textAlign}`}}}}]},addKeyboardShortcuts(){return{...this.parent?.(),"Mod-Shift-d":()=>this.editor.commands.setTextAlign("distributed")}}}),sa=m.ref({isRunning:!1,currentParagraph:0,currentTextNode:0,currentChar:0});let cf=null,jv={totalChars:0,typedChars:0};function gPe(n){return n.reduce((e,t)=>t.type==="paragraph"&&t.content?t.content.reduce((r,i)=>r+(i.type==="text"?i.text?.length??0:0),e):e,0)}const mPe=fr.create({name:"typewriter",addCommands(){return{startTypewriter:(n,e)=>({editor:t})=>((async()=>{try{cf&&(clearTimeout(cf),cf=null),sa.value={isRunning:!0,currentParagraph:0,currentTextNode:0,currentChar:0},jv={totalChars:gPe(n?.content??[]),typedChars:0};const r=e?.focus===null?null:e?.focus??"end",i=async u=>{await new Promise(c=>{setTimeout(()=>{try{t.chain().insertContent(u).focus(r).run()}catch(f){console.error("插入内容时出错:",f)}c()},0)})},a=Math.max(e?.speed??1,0),o=u=>u?.type==="paragraph"&&(!u.content||u.content.length===0||u.content.length===1&&u.content[0].type==="text"&&!u.content[0].text),s=async(u,c,f,d=!1)=>{let h=0;if(u.type==="paragraph")if(o(u)){const p=[u];for(let v=c+1;v<f.length&&o(f[v]);v++)p.push(f[v]),h++,sa.value.currentParagraph++;await i(p),sa.value.currentParagraph++}else{if(await i([{type:"paragraph",attrs:u.attrs}]),u.content&&u.content.length>0)for(let p=0;p<u.content.length;p++){sa.value.currentTextNode=p;const v=u.content[p],g=await s(v,p,u.content,!1);p=p+(g??0)}else t.commands.enter();sa.value.currentParagraph++}else if(u.type==="text"){const p=u.text??"",v=u.marks??[],g=e?.step??1;for(let y=0;y<p.length;y+=g){if(!sa.value.isRunning)return;const b=Math.min(y+g,p.length),_=p.slice(y,b);await new Promise(x=>{cf=setTimeout(async()=>{await i([{type:"text",text:_,marks:v}]),sa.value.currentChar=y+_.length-1,jv.typedChars+=_.length,e?.onProgress&&jv.totalChars>0&&e.onProgress(jv.typedChars/jv.totalChars),x()},a)})}}else if(u.type==="table"){const p=[u];for(let v=c+1;v<f.length&&o(f[v]);v++)p.push(f[v]),h++;p.length===1&&p.push({type:"paragraph"}),await i(p),t.commands.enter()}else d?await i([u,{type:"paragraph"}]):await i([u]);return h},l=n?.content??[];for(let u=0;u<l.length&&sa.value.isRunning;u++){const c=await s(l[u],u,l,!0);u=u+(c??0)}sa.value.isRunning&&e?.onComplete&&e.onComplete(),sa.value.isRunning=!1}catch(r){console.error("类型写入器出错:",r)}})(),!0),stopTypewriter:()=>()=>(sa.value.isRunning=!1,cf&&(clearTimeout(cf),cf=null),!0),getTypewriterState:()=>({isRunning:sa.value.isRunning,currentParagraph:sa.value.currentParagraph,currentTextNode:sa.value.currentTextNode,currentChar:sa.value.currentChar})}}}),yPe={class:"max-w-full node-view-video white-view-node"},bPe=["src"],xPe={key:0,class:"uploading absolute top-0 right-0 left-0 h-[2px] bg-[#007bff]"},_Pe=m.defineComponent({__name:"node-view",props:Ql,setup(n){const e=m.inject("options"),t=m.inject("editor"),r=m.inject("uploadFileMap"),i=m.ref(null),a=m.ref(!1),o=m.ref(null),s=m.ref(0),l=m.ref(0),u=m.computed(()=>{const{nodeAlign:h,margin:p}=n.node.attrs,v=p?.top&&p?.top!==""?`${p.top}px`:void 0,g=p?.bottom&&p?.bottom!==""?`${p.bottom}px`:void 0;return{"justify-content":h,marginTop:v,marginBottom:g}}),c=()=>{t.value?.chain().focus().setNodeSelection(n.getPos()).run(),a.value=!0};m.onMounted(async()=>{if(await m.nextTick(),!(n.node.attrs.uploaded||!n.node.attrs.id)&&r.value.has(n.node.attrs.id))try{const h=r.value.get(n.node.attrs.id),{id:p,url:v}=await e.value?.onFileUpload?.(h)??{};i.value&&Ef(t.value,{id:p,src:v,uploaded:!0},n.getPos()),r.value.delete(n.node.attrs.id)}catch(h){console.error(h)}});const f=()=>{if(n.node.attrs.width===null){const{clientWidth:h=0,clientHeight:p=0}=o.value??{};s.value=i.value?.$el.clientWidth??0;const v=h/p;l.value=i.value?.$el.clientWidth/v,n.updateAttributes({width:(200*v).toFixed(2)}),setTimeout(()=>{n.updateAttributes({height:i.value?.$el.clientHeight})},200)}},d=({width:h,height:p})=>{n.updateAttributes({width:h,height:p})};return T_(i,()=>{a.value=!1}),(h,p)=>(m.openBlock(),m.createBlock(m.unref(Jl),{id:h.node.attrs.id,ref_key:"containerRef",ref:i,class:"white-video-wrapper flex max-h-full relative",style:m.normalizeStyle(u.value)},{default:m.withCtx(()=>[m.createElementVNode("div",yPe,[m.createVNode(m.unref(Ap),{selected:a.value,rotatable:!1,boundary:!1,width:Number(h.node.attrs.width),height:Number(h.node.attrs.height),"min-width":300,"min-height":200,"max-width":s.value,"max-height":l.value,"equal-proportion":!0,disabled:m.unref(e).editor?.readOnly,onResize:d,onFocus:c},{default:m.withCtx(()=>[m.createElementVNode("video",{ref_key:"videoRef",ref:o,src:h.node.attrs.src,preload:"metadata",crossorigin:"anonymous",controls:"",onCanplay:f,onClick:c},null,40,bPe),!h.node.attrs.uploaded&&h.node.attrs.id!==null?(m.openBlock(),m.createElementBlock("div",xPe)):m.createCommentVNode("",!0)]),_:1},8,["selected","width","height","max-width","max-height","disabled"])])]),_:1},8,["id","style"]))}}),SPe=yi.create({name:"video",group:"block",atom:!0,addAttributes(){return{vnode:{default:!0},file:{default:null},id:{default:null},name:{default:null},size:{default:null},src:{default:null},width:{default:null},height:{default:200},draggable:{default:!1},uploaded:{default:!1},previewType:{default:"video"}}},parseHTML(){return[{tag:"video"}]},renderHTML({HTMLAttributes:n}){return["video",Jn(n)]},addNodeView(){return tl(_Pe)},addCommands(){return{setVideo:n=>({commands:e,editor:t})=>e.insertContentAt(t.state.selection.anchor,{type:this.name,attrs:n})}}}),wPe=({container:n,options:e,uploadFileMap:t})=>{const{document:r,users:i,file:a,disableExtensions:o}=e.value,s={highlight:Wae.configure({multicolor:!0}),"ordered-list":ZLe,"bullet-list":Ice,"line-height":fLe.configure({types:["heading","paragraph"],defaultLineHeight:1.7}),margin:LLe,link:MY,image:yY,inlineImage:uLe,video:SPe,audio:oce,"code-block":The,tag:hPe,columns:Nce,mention:HLe.configure({suggestion:qLe(i??[],n.value)}),"date-time":Mhe,hr:KRe,"web-page":QRe,TaskList:Moe.configure({HTMLAttributes:{class:"white-task-list"}}),TaskItem:Noe.configure({nested:!0})},l=[qle.configure({bold:!1,bulletList:!1,orderedList:!1,codeBlock:!1,horizontalRule:!1,dropcursor:!1,history:!1}),toe.configure({placeholder:()=>"输入内容..."}),eoe.extend({addKeyboardShortcuts(){return{}}}),$ae.configure({className:"white-node-focused",mode:"all"}),jRe,Hae,WRe,Rae.extend({renderHTML:({HTMLAttributes:u})=>["b",u,0]}),Eoe,noe,roe,Vae,Bae,cLe,vPe,KLe,tce,oPe,ioe,cPe,lPe,HRe,JLe,nue.configure({scrollParent:()=>document.getElementById(`${n.value}`),getId:()=>ip()}),PF.configure(r?.typographyRules),Lae.configure({limit:r?.characterLimit!==0?r?.characterLimit:void 0}),URe.configure({allowedMimeTypes:a?.allowedMimeTypes,onPaste:async(u,c)=>{for(const f of c){const d=await vue(f);u.commands.insertFile({file:f,uploadFileMap:t.value,autoType:!0,fileDim:d})}},onDrop:(u,c,f)=>{for(const d of c)u.commands.insertFile({file:d,uploadFileMap:t.value,autoType:!0,pos:f})}}),Fae.configure({color:"#007bff"}),mPe];return Object.values(s).forEach(u=>{if(!o?.includes(u.name)){if(Array.isArray(u)){l.push(...u);return}l.push(u)}}),l},gz=n=>{let e=!0;return n.value.editor?.enableMarkdown||(e=[PF,yY]),e},kPe=m.defineComponent({__name:"ScrollAble",setup(n,{expose:e}){const t=m.ref(null),r=m.ref(null),i=m.ref(!0),a=m.ref(!0),o=()=>{const{scrollLeft:c=0,scrollWidth:f=0,clientWidth:d=0}=r.value??{};i.value=c===0,a.value=c+d+10>=f},s=()=>{(r.value?.scrollLeft||r.value?.scrollLeft===0)&&(r.value.scrollLeft-=r.value.offsetWidth-10||100)},l=()=>{(r.value?.scrollLeft||r.value?.scrollLeft===0)&&(r.value.scrollLeft+=r.value.offsetWidth-10||100)};return que(t,()=>{o()}),m.onMounted(()=>{r.value?.addEventListener("scroll",o)}),e({update:()=>{r.value&&(r.value.scrollLeft=0),a.value=!0,o()}}),(c,f)=>(m.openBlock(),m.createElementBlock("div",{ref_key:"wraperRef",ref:t,class:m.normalizeClass(["white-scrollable-container flex items-center",{"!pl-[36px]":!i.value,"!pr-[36px]":!a.value}])},[i.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:0,class:"w-scrollable-control scrollable-left",onClick:s},[...f[0]||(f[0]=[m.createElementVNode("i",{class:"w-iconfont icon-left"},null,-1)])])),m.createElementVNode("div",{ref_key:"contentRef",ref:r,class:"w-scrollable-content text-center flex items-center"},[m.renderSlot(c.$slots,"default")],512),a.value?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",{key:1,class:"w-scrollable-control scrollable-right",onClick:l},[...f[1]||(f[1]=[m.createElementVNode("i",{class:"w-iconfont icon-right"},null,-1)])]))],2))}}),TPe={class:"w-[28px] h-[28px] cursor-pointer flex items-center justify-center gap-[0.4rem] text-[12px] rounded-[4px] hover:text-[#007aff] hover:bg-[#edeef2]"},CPe=m.defineComponent({__name:"tool-column",setup(n){const e=m.inject("page"),t=m.ref(!1),r=i=>{e.value.toolbar=i,t.value=!1};return(i,a)=>(m.openBlock(),m.createBlock(js,{trigger:"click",placement:"bottom",value:t.value,"onUpdate:value":a[2]||(a[2]=o=>t.value=o),contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",m.unref(e).toolbar==="single"?"text-[#007aff]":""]),onClick:a[0]||(a[0]=o=>r("single"))},[...a[3]||(a[3]=[m.createElementVNode("i",{class:"w-iconfont icon-single"},null,-1),m.createTextVNode(" 单行工具栏 ",-1)])],2),m.createElementVNode("div",{class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",m.unref(e).toolbar==="double"?"text-[#007aff]":""]),onClick:a[1]||(a[1]=o=>r("double"))},[...a[4]||(a[4]=[m.createElementVNode("i",{class:"w-iconfont icon-double"},null,-1),m.createTextVNode(" 双行工具栏 ",-1)])],2)]),default:m.withCtx(()=>[m.createElementVNode("span",TPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[13px] transition-transform duration-200",t.value?"rotate-180":""])},null,2)])]),_:1},8,["value"]))}}),EPe=["disabled"],MPe={key:0,class:"text-[12px] mt-2"},An=m.defineComponent({__name:"MenusButton",props:{ico:{default:""},text:{default:""},hideText:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shortcut:{default:void 0},shortcutText:{default:void 0},menuActive:{type:Boolean,default:!1}},setup(n){const e=m.useAttrs(),t=m.inject("editor"),r=(...i)=>{e.onMenuClickThrough?e.onMenuClickThrough(...i):e.onMenuClick&&e.onMenuClick(...i)};return(i,a)=>{const o=m.resolveDirective("tooltip");return m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(t)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(t)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(t)?.isEditable===!1)},m.unref(e),{onClick:r}),[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`])},null,2),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",MPe,m.toDisplayString(n.text),1))],16,EPe)),[[o,`${n.text}`]])}}}),WM=m.defineComponent({__name:"bold",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"bold",text:"加粗",shortcut:"Ctrl+B","hide-text":"","menu-active":m.unref(e)?.isActive("bold"),disabled:!m.unref(e)?.can().chain().focus().toggleBold().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleBold().run())},null,8,["menu-active","disabled"]))}}),jM=m.defineComponent({__name:"underline",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"underline",text:"下划线",shortcut:"Ctrl+U","hide-text":"","menu-active":m.unref(e)?.isActive("underline"),disabled:!m.unref(e)?.can().chain().focus().toggleUnderline().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleUnderline().run())},null,8,["menu-active","disabled"]))}}),qM=m.defineComponent({__name:"decoration",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"decoration",text:"删除线",shortcut:"Ctrl+Shift+X","hide-text":"","menu-active":m.unref(e)?.isActive("strike"),disabled:!m.unref(e)?.can().chain().focus().toggleStrike().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleStrike().run())},null,8,["menu-active","disabled"]))}}),KM=m.defineComponent({__name:"italic",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"italic",text:"斜体",shortcut:"Ctrl+I","hide-text":"","menu-active":m.unref(e)?.isActive("italic"),disabled:!m.unref(e)?.can().chain().focus().toggleItalic().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleItalic().run())},null,8,["menu-active","disabled"]))}}),APe=["disabled"],NPe={key:0,class:"text-[13px] text-[#333639] ml-[3px]"},DPe={class:"flex items-center justify-center w-full h-full"},OPe=["disabled"],IPe={class:"h-full gap-[5px]"},RPe={key:0,class:"text-[12px] mt-2"},il=m.defineComponent({__name:"MenusPopup",props:{ico:{default:""},icoSize:{default:14},text:{default:""},hideText:{type:Boolean,default:!1},popupVisible:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},shortcut:{default:void 0},shortcutText:{default:void 0},menuActive:{type:Boolean,default:!1},popupType:{default:"arrow"},placement:{default:"bottom"},trigger:{default:"click"}},emits:["update:popupVisible"],setup(n,{emit:e}){const t=m.useAttrs(),r=m.inject("editor"),i=n,a=e,o=m.computed({get:()=>i.popupVisible,set:l=>a("update:popupVisible",l)}),s=(...l)=>{t.onMenuClickThrough?t.onMenuClickThrough(...l):t.onMenuClick&&t.onMenuClick(...l)};return(l,u)=>{const c=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[n.popupType==="arrow"?m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({key:0,class:["white-editor-tool-item white-editor-tool-pop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",{class:"flex items-center h-full",onClick:s},[m.createElementVNode("div",null,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`]),style:m.normalizeStyle(n.hideText?`font-size: ${n.icoSize}px`:"")},null,6),m.renderSlot(l.$slots,"default")]),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",NPe,m.toDisplayString(n.text),1))]),m.createVNode(js,{trigger:n.trigger,value:o.value,"onUpdate:value":u[0]||(u[0]=f=>o.value=f),placement:n.placement,disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1),hasClass:"flex items-center justify-center w-[13px] h-full hover:bg-[#d7d3d3] mr-[-6px] ml-[4px] w-arrow"},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.createElementVNode("span",DPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])]),_:3},8,["trigger","value","placement","disabled"])],16,APe)),[[c,`${n.text}`]]):m.createCommentVNode("",!0),n.popupType==="select"?(m.openBlock(),m.createBlock(js,{key:1,trigger:n.trigger,value:o.value,"onUpdate:value":u[1]||(u[1]=f=>o.value=f),placement:n.placement},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.renderSlot(l.$slots,"default",{},()=>[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item white-editor-tool-pop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",IPe,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont w-icon",`icon-${n.ico}`]),style:m.normalizeStyle(n.hideText?`font-size: ${n.icoSize}px`:"")},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",RPe,m.toDisplayString(n.text),1))])],16,OPe)),[[c,`${n.text}`]])])]),_:3},8,["trigger","value","placement"])):m.createCommentVNode("",!0)],64)}}});function t_(n){"@babel/helpers - typeof";return t_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t_(n)}var LPe=/^\s+/,PPe=/\s+$/;function Qt(n,e){if(n=n||"",e=e||{},n instanceof Qt)return n;if(!(this instanceof Qt))return new Qt(n,e);var t=BPe(n);this._originalInput=n,this._r=t.r,this._g=t.g,this._b=t.b,this._a=t.a,this._roundA=Math.round(100*this._a)/100,this._format=e.format||t.format,this._gradientType=e.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=t.ok}Qt.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 n=this.toRgb();return(n.r*299+n.g*587+n.b*114)/1e3},getLuminance:function(){var n=this.toRgb(),e,t,r,i,a,o;return e=n.r/255,t=n.g/255,r=n.b/255,e<=.03928?i=e/12.92:i=Math.pow((e+.055)/1.055,2.4),t<=.03928?a=t/12.92:a=Math.pow((t+.055)/1.055,2.4),r<=.03928?o=r/12.92:o=Math.pow((r+.055)/1.055,2.4),.2126*i+.7152*a+.0722*o},setAlpha:function(n){return this._a=zY(n),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var n=yz(this._r,this._g,this._b);return{h:n.h*360,s:n.s,v:n.v,a:this._a}},toHsvString:function(){var n=yz(this._r,this._g,this._b),e=Math.round(n.h*360),t=Math.round(n.s*100),r=Math.round(n.v*100);return this._a==1?"hsv("+e+", "+t+"%, "+r+"%)":"hsva("+e+", "+t+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var n=mz(this._r,this._g,this._b);return{h:n.h*360,s:n.s,l:n.l,a:this._a}},toHslString:function(){var n=mz(this._r,this._g,this._b),e=Math.round(n.h*360),t=Math.round(n.s*100),r=Math.round(n.l*100);return this._a==1?"hsl("+e+", "+t+"%, "+r+"%)":"hsla("+e+", "+t+"%, "+r+"%, "+this._roundA+")"},toHex:function(n){return bz(this._r,this._g,this._b,n)},toHexString:function(n){return"#"+this.toHex(n)},toHex8:function(n){return $Pe(this._r,this._g,this._b,this._a,n)},toHex8String:function(n){return"#"+this.toHex8(n)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(Ar(this._r,255)*100)+"%",g:Math.round(Ar(this._g,255)*100)+"%",b:Math.round(Ar(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(Ar(this._r,255)*100)+"%, "+Math.round(Ar(this._g,255)*100)+"%, "+Math.round(Ar(this._b,255)*100)+"%)":"rgba("+Math.round(Ar(this._r,255)*100)+"%, "+Math.round(Ar(this._g,255)*100)+"%, "+Math.round(Ar(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:QPe[bz(this._r,this._g,this._b,!0)]||!1},toFilter:function(n){var e="#"+xz(this._r,this._g,this._b,this._a),t=e,r=this._gradientType?"GradientType = 1, ":"";if(n){var i=Qt(n);t="#"+xz(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+e+",endColorstr="+t+")"},toString:function(n){var e=!!n;n=n||this._format;var t=!1,r=this._a<1&&this._a>=0,i=!e&&r&&(n==="hex"||n==="hex6"||n==="hex3"||n==="hex4"||n==="hex8"||n==="name");return i?n==="name"&&this._a===0?this.toName():this.toRgbString():(n==="rgb"&&(t=this.toRgbString()),n==="prgb"&&(t=this.toPercentageRgbString()),(n==="hex"||n==="hex6")&&(t=this.toHexString()),n==="hex3"&&(t=this.toHexString(!0)),n==="hex4"&&(t=this.toHex8String(!0)),n==="hex8"&&(t=this.toHex8String()),n==="name"&&(t=this.toName()),n==="hsl"&&(t=this.toHslString()),n==="hsv"&&(t=this.toHsvString()),t||this.toHexString())},clone:function(){return Qt(this.toString())},_applyModification:function(n,e){var t=n.apply(null,[this].concat([].slice.call(e)));return this._r=t._r,this._g=t._g,this._b=t._b,this.setAlpha(t._a),this},lighten:function(){return this._applyModification(WPe,arguments)},brighten:function(){return this._applyModification(jPe,arguments)},darken:function(){return this._applyModification(qPe,arguments)},desaturate:function(){return this._applyModification(HPe,arguments)},saturate:function(){return this._applyModification(GPe,arguments)},greyscale:function(){return this._applyModification(UPe,arguments)},spin:function(){return this._applyModification(KPe,arguments)},_applyCombination:function(n,e){return n.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(ZPe,arguments)},complement:function(){return this._applyCombination(YPe,arguments)},monochromatic:function(){return this._applyCombination(JPe,arguments)},splitcomplement:function(){return this._applyCombination(XPe,arguments)},triad:function(){return this._applyCombination(_z,[3])},tetrad:function(){return this._applyCombination(_z,[4])}};Qt.fromRatio=function(n,e){if(t_(n)=="object"){var t={};for(var r in n)n.hasOwnProperty(r)&&(r==="a"?t[r]=n[r]:t[r]=hg(n[r]));n=t}return Qt(n,e)};function BPe(n){var e={r:0,g:0,b:0},t=1,r=null,i=null,a=null,o=!1,s=!1;return typeof n=="string"&&(n=r4e(n)),t_(n)=="object"&&(ml(n.r)&&ml(n.g)&&ml(n.b)?(e=VPe(n.r,n.g,n.b),o=!0,s=String(n.r).substr(-1)==="%"?"prgb":"rgb"):ml(n.h)&&ml(n.s)&&ml(n.v)?(r=hg(n.s),i=hg(n.v),e=FPe(n.h,r,i),o=!0,s="hsv"):ml(n.h)&&ml(n.s)&&ml(n.l)&&(r=hg(n.s),a=hg(n.l),e=zPe(n.h,r,a),o=!0,s="hsl"),n.hasOwnProperty("a")&&(t=n.a)),t=zY(t),{ok:o,format:n.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:t}}function VPe(n,e,t){return{r:Ar(n,255)*255,g:Ar(e,255)*255,b:Ar(t,255)*255}}function mz(n,e,t){n=Ar(n,255),e=Ar(e,255),t=Ar(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,o,s=(r+i)/2;if(r==i)a=o=0;else{var l=r-i;switch(o=s>.5?l/(2-r-i):l/(r+i),r){case n:a=(e-t)/l+(e<t?6:0);break;case e:a=(t-n)/l+2;break;case t:a=(n-e)/l+4;break}a/=6}return{h:a,s:o,l:s}}function zPe(n,e,t){var r,i,a;n=Ar(n,360),e=Ar(e,100),t=Ar(t,100);function o(u,c,f){return f<0&&(f+=1),f>1&&(f-=1),f<1/6?u+(c-u)*6*f:f<1/2?c:f<2/3?u+(c-u)*(2/3-f)*6:u}if(e===0)r=i=a=t;else{var s=t<.5?t*(1+e):t+e-t*e,l=2*t-s;r=o(l,s,n+1/3),i=o(l,s,n),a=o(l,s,n-1/3)}return{r:r*255,g:i*255,b:a*255}}function yz(n,e,t){n=Ar(n,255),e=Ar(e,255),t=Ar(t,255);var r=Math.max(n,e,t),i=Math.min(n,e,t),a,o,s=r,l=r-i;if(o=r===0?0:l/r,r==i)a=0;else{switch(r){case n:a=(e-t)/l+(e<t?6:0);break;case e:a=(t-n)/l+2;break;case t:a=(n-e)/l+4;break}a/=6}return{h:a,s:o,v:s}}function FPe(n,e,t){n=Ar(n,360)*6,e=Ar(e,100),t=Ar(t,100);var r=Math.floor(n),i=n-r,a=t*(1-e),o=t*(1-i*e),s=t*(1-(1-i)*e),l=r%6,u=[t,o,a,a,s,t][l],c=[s,t,t,o,a,a][l],f=[a,a,s,t,t,o][l];return{r:u*255,g:c*255,b:f*255}}function bz(n,e,t,r){var i=[Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function $Pe(n,e,t,r,i){var a=[Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16)),Uo(FY(r))];return i&&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)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function xz(n,e,t,r){var i=[Uo(FY(r)),Uo(Math.round(n).toString(16)),Uo(Math.round(e).toString(16)),Uo(Math.round(t).toString(16))];return i.join("")}Qt.equals=function(n,e){return!n||!e?!1:Qt(n).toRgbString()==Qt(e).toRgbString()};Qt.random=function(){return Qt.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})};function HPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.s-=e/100,t.s=xS(t.s),Qt(t)}function GPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.s+=e/100,t.s=xS(t.s),Qt(t)}function UPe(n){return Qt(n).desaturate(100)}function WPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.l+=e/100,t.l=xS(t.l),Qt(t)}function jPe(n,e){e=e===0?0:e||10;var t=Qt(n).toRgb();return t.r=Math.max(0,Math.min(255,t.r-Math.round(255*-(e/100)))),t.g=Math.max(0,Math.min(255,t.g-Math.round(255*-(e/100)))),t.b=Math.max(0,Math.min(255,t.b-Math.round(255*-(e/100)))),Qt(t)}function qPe(n,e){e=e===0?0:e||10;var t=Qt(n).toHsl();return t.l-=e/100,t.l=xS(t.l),Qt(t)}function KPe(n,e){var t=Qt(n).toHsl(),r=(t.h+e)%360;return t.h=r<0?360+r:r,Qt(t)}function YPe(n){var e=Qt(n).toHsl();return e.h=(e.h+180)%360,Qt(e)}function _z(n,e){if(isNaN(e)||e<=0)throw new Error("Argument to polyad must be a positive number");for(var t=Qt(n).toHsl(),r=[Qt(n)],i=360/e,a=1;a<e;a++)r.push(Qt({h:(t.h+a*i)%360,s:t.s,l:t.l}));return r}function XPe(n){var e=Qt(n).toHsl(),t=e.h;return[Qt(n),Qt({h:(t+72)%360,s:e.s,l:e.l}),Qt({h:(t+216)%360,s:e.s,l:e.l})]}function ZPe(n,e,t){e=e||6,t=t||30;var r=Qt(n).toHsl(),i=360/t,a=[Qt(n)];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,a.push(Qt(r));return a}function JPe(n,e){e=e||6;for(var t=Qt(n).toHsv(),r=t.h,i=t.s,a=t.v,o=[],s=1/e;e--;)o.push(Qt({h:r,s:i,v:a})),a=(a+s)%1;return o}Qt.mix=function(n,e,t){t=t===0?0:t||50;var r=Qt(n).toRgb(),i=Qt(e).toRgb(),a=t/100,o={r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a};return Qt(o)};Qt.readability=function(n,e){var t=Qt(n),r=Qt(e);return(Math.max(t.getLuminance(),r.getLuminance())+.05)/(Math.min(t.getLuminance(),r.getLuminance())+.05)};Qt.isReadable=function(n,e,t){var r=Qt.readability(n,e),i,a;switch(a=!1,i=i4e(t),i.level+i.size){case"AAsmall":case"AAAlarge":a=r>=4.5;break;case"AAlarge":a=r>=3;break;case"AAAsmall":a=r>=7;break}return a};Qt.mostReadable=function(n,e,t){var r=null,i=0,a,o,s,l;t=t||{},o=t.includeFallbackColors,s=t.level,l=t.size;for(var u=0;u<e.length;u++)a=Qt.readability(n,e[u]),a>i&&(i=a,r=Qt(e[u]));return Qt.isReadable(n,r,{level:s,size:l})||!o?r:(t.includeFallbackColors=!1,Qt.mostReadable(n,["#fff","#000"],t))};var YM=Qt.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"},QPe=Qt.hexNames=e4e(YM);function e4e(n){var e={};for(var t in n)n.hasOwnProperty(t)&&(e[n[t]]=t);return e}function zY(n){return n=parseFloat(n),(isNaN(n)||n<0||n>1)&&(n=1),n}function Ar(n,e){t4e(n)&&(n="100%");var t=n4e(n);return n=Math.min(e,Math.max(0,parseFloat(n))),t&&(n=parseInt(n*e,10)/100),Math.abs(n-e)<1e-6?1:n%e/parseFloat(e)}function xS(n){return Math.min(1,Math.max(0,n))}function $a(n){return parseInt(n,16)}function t4e(n){return typeof n=="string"&&n.indexOf(".")!=-1&&parseFloat(n)===1}function n4e(n){return typeof n=="string"&&n.indexOf("%")!=-1}function Uo(n){return n.length==1?"0"+n:""+n}function hg(n){return n<=1&&(n=n*100+"%"),n}function FY(n){return Math.round(parseFloat(n)*255).toString(16)}function Sz(n){return $a(n)/255}var Bo=(function(){var n="[-\\+]?\\d+%?",e="[-\\+]?\\d*\\.\\d+%?",t="(?:"+e+")|(?:"+n+")",r="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?",i="[\\s|\\(]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")[,|\\s]+("+t+")\\s*\\)?";return{CSS_UNIT:new RegExp(t),rgb:new RegExp("rgb"+r),rgba:new RegExp("rgba"+i),hsl:new RegExp("hsl"+r),hsla:new RegExp("hsla"+i),hsv:new RegExp("hsv"+r),hsva:new RegExp("hsva"+i),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 ml(n){return!!Bo.CSS_UNIT.exec(n)}function r4e(n){n=n.replace(LPe,"").replace(PPe,"").toLowerCase();var e=!1;if(YM[n])n=YM[n],e=!0;else if(n=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var t;return(t=Bo.rgb.exec(n))?{r:t[1],g:t[2],b:t[3]}:(t=Bo.rgba.exec(n))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=Bo.hsl.exec(n))?{h:t[1],s:t[2],l:t[3]}:(t=Bo.hsla.exec(n))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=Bo.hsv.exec(n))?{h:t[1],s:t[2],v:t[3]}:(t=Bo.hsva.exec(n))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=Bo.hex8.exec(n))?{r:$a(t[1]),g:$a(t[2]),b:$a(t[3]),a:Sz(t[4]),format:e?"name":"hex8"}:(t=Bo.hex6.exec(n))?{r:$a(t[1]),g:$a(t[2]),b:$a(t[3]),format:e?"name":"hex"}:(t=Bo.hex4.exec(n))?{r:$a(t[1]+""+t[1]),g:$a(t[2]+""+t[2]),b:$a(t[3]+""+t[3]),a:Sz(t[4]+""+t[4]),format:e?"name":"hex8"}:(t=Bo.hex3.exec(n))?{r:$a(t[1]+""+t[1]),g:$a(t[2]+""+t[2]),b:$a(t[3]+""+t[3]),format:e?"name":"hex"}:!1}function i4e(n){var e,t;return n=n||{level:"AA",size:"small"},e=(n.level||"AA").toUpperCase(),t=(n.size||"small").toLowerCase(),e!=="AA"&&e!=="AAA"&&(e="AA"),t!=="small"&&t!=="large"&&(t="small"),{level:e,size:t}}const wz=(n,e,t=!1)=>{if(t)switch(e){case"rgb":return n.toRgb();case"prgb":return n.toPercentageRgb();case"hsl":return n.toHsl();case"hsv":return n.toHsv();default:return null}else{let r=e;e==="hex"&&n.getAlpha()<1&&(r="hex8");let i=n.toString(r);try{i=JSON.parse(i)}catch{}return i}},ET=(n,e)=>!!(Object.prototype.hasOwnProperty.call(n,e)&&typeof n[e]<"u"),o1=n=>typeof n>"u",_S=["update:tinyColor","update:modelValue","input"];function SS(n,e,t){let r,i;const a=m.computed({get:()=>{const{modelValue:s,tinyColor:l,value:u}=n,c=l??s??u;return o1(i)&&(o1(u)||(i=Qt(u).getFormat()),o1(s)||(i=Qt(s).getFormat())),o1(r)&&(typeof u=="object"&&!(u instanceof Qt)&&(r=!0),typeof s=="object"&&(r=!0)),Qt(c)},set:s=>{o(s)}}),o=s=>{const l=Qt(s);if(ET(n,"tinyColor")&&e("update:tinyColor",l),ET(n,"modelValue")){const u=wz(l,i,r);e("update:modelValue",u)}if(ET(n,"value")){const u=wz(l,i,r);e("input",u)}};return a}const $Y=n=>{const e={x:0,y:0};return n instanceof MouseEvent&&(e.x=n.pageX,e.y=n.pageY),typeof TouchEvent<"u"&&n instanceof TouchEvent&&(e.x=n.touches?.[0]?n.touches[0].pageX:n.changedTouches?.[0]?n.changedTouches[0].pageX:0,e.y=n.touches?.[0]?n.touches[0].pageY:n.changedTouches?.[0]?n.changedTouches[0].pageY:0),e},a4e=()=>{const n=window.scrollX||window.pageXOffset||document.documentElement.scrollLeft||0,e=window.scrollY||window.pageYOffset||document.documentElement.scrollTop||0;return{x:n,y:e}},HY=n=>{const{x:e,y:t}=a4e(),r=n.getBoundingClientRect();return{x:r.left+e,y:r.top+t}},BO=n=>n.code==="ArrowUp"||n.keyCode===38?"up":n.code==="ArrowDown"||n.keyCode===40?"down":n.code==="ArrowLeft"||n.keyCode===37?"left":n.code==="ArrowRight"||n.keyCode===39?"right":null;function o4e(n){const e=n.toString();return e.indexOf(".")!==-1?e.split(".")[1].length:0}function MT(n,e,t){return Math.min(Math.max(n,e),t)}const GY=(n,e=20)=>{let t,r,i;return(...a)=>{t?(clearTimeout(r),r=setTimeout(()=>{Date.now()-i>=e&&(n(...a),i=Date.now())},Math.max(e-(Date.now()-i),0))):(n(...a),i=Date.now(),t=!0)}},s4e=["aria-valuetext"],l4e=m.defineComponent({__name:"SaturationSlider",props:{hue:{},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(_S),setup(n,{emit:e}){const t=e,r=n,i=m.ref(0),a=SS(r,t),o=m.computed(()=>a.value.toHsv()),s=m.computed(()=>r.hue??o.value.h),l=m.computed(()=>`hsl(${s.value}, 100%, 50%)`),u=m.computed(()=>-(o.value.v*100)+1+100+"%"),c=m.computed(()=>o.value.v<=.01?i.value*100+"%":o.value.s*100+"%"),f=m.ref(null);function d(_){const x=f.value;if(!x)return;const T=x.clientWidth,k=x.clientHeight,{x:C,y:D}=HY(x),{x:O,y:R}=$Y(_),V=MT(O-C,0,T),F=MT(R-D,0,k),$=V/T,J=MT(1-F/k,0,1);i.value=$;let te=Math.round($*100),Q=Math.round(J*100);te===1&&(te=.01),Q===1&&(Q=.01),h({h:s.value,s:te,v:Q,a:o.value.a})}function h(_){a.value=_}const p=GY(d,20);function v(_){_.preventDefault(),_.type.startsWith("mouse")?(window.addEventListener("mousemove",p),window.addEventListener("mouseup",p),window.addEventListener("mouseup",g)):_.type.startsWith("touch")&&(window.addEventListener("touchmove",p),window.addEventListener("touchend",p),window.addEventListener("touchend",g))}function g(){y()}function y(){window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",p),window.removeEventListener("mouseup",g),window.removeEventListener("touchmove",p),window.removeEventListener("touchend",p),window.removeEventListener("touchend",g)}function b(_){switch(_.preventDefault(),BO(_)){case"left":{const x=o.value.s-.01;h({...o.value,s:x>=0?x:0});break}case"right":{const x=o.value.s+.01;h({...o.value,s:x>1?1:x});break}case"up":{const x=o.value.v+.01;h({...o.value,v:x>1?1:x});break}case"down":{const x=o.value.v-.01;h({...o.value,v:x<0?0:x});break}}}return m.onUnmounted(()=>{y()}),(_,x)=>(m.openBlock(),m.createElementBlock("div",{class:"vc-saturation-slider bg",style:m.normalizeStyle({background:l.value}),ref_key:"containerRef",ref:f,onMousedown:v,onTouchstart:v,role:"application","aria-label":"Saturation and brightness picker"},[x[1]||(x[1]=m.createElementVNode("div",{class:"bg white"},null,-1)),x[2]||(x[2]=m.createElementVNode("div",{class:"bg black"},null,-1)),m.createElementVNode("div",{class:"picker-wrap",style:m.normalizeStyle({top:u.value,left:c.value}),role:"slider",tabindex:"0","aria-valuemin":"0","aria-valuemax":"1","aria-label":"press arrow to change saturation or brightness","aria-valuenow":"?","aria-valuetext":`saturation: ${o.value.s.toFixed(0)}%, brightness: ${o.value.v.toFixed(0)}%`,onKeydown:b},x[0]||(x[0]=[m.createElementVNode("div",{class:"picker"},null,-1)]),44,s4e)],36))}}),Id=(n,e)=>{const t=n.__vccOpts||n;for(const[r,i]of e)t[r]=i;return t},UY=Id(l4e,[["__scopeId","data-v-4d048d6e"]]),XM=n=>typeof n<"u",u4e={class:"vc-base-slider"},c4e={key:0,class:"background"},f4e=["aria-label","aria-valuemax","aria-valuenow"],d4e=m.defineComponent({__name:"BaseSlider",props:{direction:{default:"horizontal"},modelValue:{default:0},value:{default:0},max:{default:100},step:{},ariaLabel:{default:"slider"}},emits:["input","update:modelValue"],setup(n,{emit:e}){const t=n,r=e,i=m.computed(()=>t.modelValue??t.value),a=m.computed(()=>{let p=i.value/t.max;return t.direction==="vertical"&&(p=1-p),100*p+"%"}),o=m.ref(null);function s(p){XM(p)&&(r("input",p),r("update:modelValue",p))}function l(p){const{direction:v,max:g}=t,y=o.value;if(!y)return;const b=y.clientWidth,_=y.clientHeight,{x,y:T}=HY(y),{x:k,y:C}=$Y(p),D=k-x,O=C-T;let R;v==="vertical"?O<0?R=g:O>_?R=0:R=(1-O/_)*g:D<0?R=0:D>b?R=g:R=D/b*g,s(R)}const u=GY(l);function c(p){l(p),p.type.startsWith("mouse")?(window.addEventListener("mousemove",u),window.addEventListener("mouseup",f)):(window.addEventListener("touchmove",u),window.addEventListener("touchend",f))}function f(){d()}function d(){window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",f),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",f)}function h(p){p.preventDefault();const{direction:v,max:g}=t,y=BO(p),b=t.step??g/100,_=i.value;let x;switch(y){case"left":{if(v!=="horizontal")return;x=_-b<0?0:_-b;break}case"right":{if(v!=="horizontal")return;x=_+b>g?g:_+b;break}case"down":{if(v!=="vertical")return;x=_-b<0?0:_-b;break}case"up":{if(v!=="vertical")return;x=_+b>g?g:_+b;break}}s(x)}return m.onUnmounted(()=>{d()}),(p,v)=>(m.openBlock(),m.createElementBlock("div",u4e,[p.$slots.background?(m.openBlock(),m.createElementBlock("div",c4e,[m.renderSlot(p.$slots,"background",{},void 0,!0)])):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass({slider:!0,horizontal:p.direction==="horizontal",vertical:p.direction==="vertical"}),ref_key:"containerRef",ref:o,onMousedown:c,onTouchstart:c,role:"slider","aria-label":p.ariaLabel,"aria-valuemax":p.max,"aria-valuemin":"0","aria-valuenow":i.value.toFixed(1),tabindex:"0",onKeydown:h},[m.createElementVNode("div",{class:"picker-wrap",style:m.normalizeStyle({left:p.direction==="horizontal"?a.value:0,top:p.direction==="vertical"?a.value:0}),role:"presentation"},[m.renderSlot(p.$slots,"picker",{},()=>[v[0]||(v[0]=m.createElementVNode("div",{class:"picker"},null,-1))],!0)],4)],42,f4e)]))}}),WY=Id(d4e,[["__scopeId","data-v-972b0fad"]]),h4e=m.defineComponent({__name:"HueSlider",props:{direction:{default:"horizontal"},modelValue:{default:0}},emits:["update:modelValue"],setup(n,{emit:e}){m.useCssVars(c=>({"2f44f39d":i.value}));const t=n,r=e,i=m.computed(()=>`linear-gradient(to ${t.direction==="horizontal"?"right":"top"}, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%)`),a=m.computed(()=>{const c=Number(t.modelValue);return Number.isNaN(c)?0:c}),o=m.ref();m.watch(a,(c,f)=>{c!==0&&c-f>0&&(o.value="right"),c!==0&&c-f<0&&(o.value="left")});const s=m.computed(()=>t.direction==="vertical"?a.value===0&&o.value==="right"?0:a.value:t.direction==="horizontal"?a.value===0&&o.value==="right"?360:a.value:0);function l(c){u(Math.round(c))}function u(c){r("update:modelValue",c)}return(c,f)=>(m.openBlock(),m.createBlock(WY,{class:"vc-hue-slider",max:360,step:1,modelValue:s.value,direction:c.direction,"onUpdate:modelValue":l,"aria-label":"Hue"},{background:m.withCtx(()=>f[0]||(f[0]=[m.createElementVNode("div",{class:"gradient"},null,-1)])),picker:m.withCtx(()=>[m.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue","direction"]))}}),jY=Id(h4e,[["__scopeId","data-v-5367c985"]]),p4e=m.defineComponent({__name:"CheckerboardBG",props:{size:{default:8},white:{default:"#fff"},grey:{default:"#e6e6e6"}},setup(n){const e=n;function t(a,o,s){if(typeof document>"u")return null;var l=document.createElement("canvas");l.width=l.height=s*2;var u=l.getContext("2d");return u?(u.fillStyle=a,u.fillRect(0,0,l.width,l.height),u.fillStyle=o,u.fillRect(0,0,s,s),u.translate(s,s),u.fillRect(0,0,s,s),l.toDataURL()):null}function r(a,o,s){return t(a,o,s)}const i=m.computed(()=>`url(${r(e.white,e.grey,e.size)})`);return(a,o)=>(m.openBlock(),m.createElementBlock("div",{class:"vc-checkerboard",style:m.normalizeStyle({backgroundImage:i.value})},null,4))}}),ZM=Id(p4e,[["__scopeId","data-v-37d61ccd"]]),v4e=m.defineComponent({__name:"AlphaSlider",props:{tinyColor:{},modelValue:{},value:{}},emits:_S,setup(n,{emit:e}){const t=SS(n,e),r=m.computed(()=>{const o=t.value.toRgb(),s=[o.r,o.g,o.b].join(",");return"linear-gradient(to right, rgba("+s+", 0) 0%, rgba("+s+", 1) 100%)"}),i=m.computed(()=>t.value.getAlpha());function a(o){t.value=t.value.setAlpha(o).clone()}return(o,s)=>(m.openBlock(),m.createBlock(WY,{class:"vc-alpha-slider",modelValue:i.value,max:1,"aria-label":"Transparency","onUpdate:modelValue":a},{background:m.withCtx(()=>[m.createVNode(ZM),m.createElementVNode("div",{class:"gradient",style:m.normalizeStyle({background:r.value})},null,4)]),_:1},8,["modelValue"]))}}),g4e=Id(v4e,[["__scopeId","data-v-07dd346b"]]),m4e={class:"vc-editable-input"},y4e=["value","aria-label"],b4e={key:0,class:"vc-input-desc","aria-hidden":"true"},x4e=m.defineComponent({__name:"EditableInput",props:{value:{},label:{},desc:{},max:{},min:{},step:{default:1},a11y:{}},emits:["change","blur"],setup(n,{emit:e}){const t=n,r=e,i=t.a11y?.label??t.label,a=`input__label__${i}__${Math.random().toString().slice(2,5)}`;function o(c){const{min:f,max:d}=t;if(XM(d)&&+c>d){r("change",d);return}if(XM(f)&&+c<f){r("change",f);return}r("change",c)}function s(c){o(c.target?.value)}function l(c){r("blur",c)}function u(c){let f=Number(t.value);if(!isNaN(f)){let d=t.step;const h=o4e(d),p=BO(c);p==="up"&&(o((f+d).toFixed(h)),c.preventDefault()),p==="down"&&(o((f-d).toFixed(h)),c.preventDefault())}}return(c,f)=>(m.openBlock(),m.createElementBlock("div",m4e,[m.createElementVNode("input",{class:"vc-input-input",value:t.value,onKeydown:u,onInput:s,onBlur:l,"aria-label":m.unref(i),id:a},null,40,y4e),m.createElementVNode("label",{for:a,class:"vc-input-label","aria-hidden":"true"},m.toDisplayString(t.label),1),c.desc?(m.openBlock(),m.createElementBlock("span",b4e,m.toDisplayString(c.desc),1)):m.createCommentVNode("",!0)]))}}),$o=Id(x4e,[["__scopeId","data-v-9c267b2b"]]),kz=n=>Qt(n).isValid(),_4e=n=>Qt(n).getAlpha()===0,qY=m.defineComponent({__name:"HexInput",props:{value:{},label:{},desc:{},a11y:{},type:{default:"hex"},withHash:{type:Boolean,default:!1}},emits:["change"],setup(n,{emit:e}){const t=n,r=e,i={label:t.type==="hex"?"Hex":"Hex with transparency",...t.a11y},a=(u,c="hex")=>{let f="";return c==="hex"&&(f=Qt(u).toHexString()),c==="hex8"&&(f=Qt(u).toHex8String()),t.withHash!==!0&&(f=f.replace("#","")),f},o=m.ref(a(t.value,t.type));m.watch(()=>t.value,u=>{Qt.equals(u,o.value)||(o.value=a(u,t.type))});const s=u=>{if(!u)return;o.value=u;let c=u.length;u[0]==="#"&&(c=c-1),!(t.type==="hex"&&c%3!==0&&c!==8)&&(t.type==="hex8"&&c!==8||kz(u)&&r("change",u))},l=()=>{let u=o.value.length;o.value[0]==="#"&&(u=u-1),!(kz(o.value)&&(t.type==="hex"&&u===6||t.type==="hex8"&&u===8))&&(o.value=a(t.value,t.type))};return(u,c)=>(m.openBlock(),m.createBlock($o,{label:t.label,a11y:i,value:o.value,onChange:s,onBlur:l},null,8,["label","value"]))}});function S4e(){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";return n.charAt(Math.floor(Math.random()*n.length))+n.charAt(Math.floor(Math.random()*n.length))}const KY=n=>{const e=m.ref(0),t=`__from__vc__hue__${S4e()}`;return m.watch(n,r=>{if(r[t])return;const i=r.toHsl().h;i===0&&e.value!==0||(e.value=i)},{immediate:!0}),{hueRef:e,updateHueRef:r=>{const i=Qt({...n.value.toHsl(),h:r});i[t]=!0,n.value=i,e.value=r}}},w4e={class:"title","aria-hidden":"true"},k4e={class:"body"},T4e={class:"saturation"},C4e={class:"hue"},E4e={class:"preview"},M4e={class:"preview-label","aria-hidden":"true"},A4e={class:"preview-swatches"},N4e=["aria-label"],D4e=["aria-label"],O4e={class:"preview-label","aria-hidden":"true"},I4e={key:0,class:"actions"},R4e=["aria-label"],L4e={class:"fields"},P4e=["aria-label"];_S.concat(["ok","cancel","reset"]);const B4e={class:"saturation"},V4e={class:"controls"},z4e={class:"sliders"},F4e={class:"hue"},$4e={key:0,class:"alpha"},H4e={class:"color"},G4e=["aria-label"],U4e={key:0,class:"field"},W4e={class:"field_double"},j4e={class:"field_single"},q4e={class:"field_single"},K4e={class:"field_single"},Y4e={key:0,class:"field_single"},X4e={class:"presets",role:"listbox","aria-label":"A color preset, pick one to set as current color"},Z4e=["onClick","title","aria-label","aria-selected","onKeydown"],J4e=["onClick","aria-selected","title","onKeydown"],Q4e=["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF","rgba(0,0,0,0)"],e5e=m.defineComponent({__name:"SketchPicker",props:{presetColors:{default:()=>Q4e},disableAlpha:{type:Boolean,default:!1},disableFields:{type:Boolean,default:!1},tinyColor:{},modelValue:{},value:{}},emits:["change"].concat(_S),setup(n,{emit:e}){const t=n,r=SS(t,e),{hueRef:i,updateHueRef:a}=KY(r),o=m.computed(()=>Number(r.value.getAlpha().toFixed(2))),s=m.computed(()=>{let h;return o.value<1?h=r.value.toHex8String():h=r.value.toHexString(),h.replace("#","")}),l=m.computed(()=>r.value.toRgb()),u=h=>{r.value=h},c=(h,p)=>{if(!p||isNaN(Number(p)))return;const v={[h]:p};r.value={...l.value,...v}},f=h=>{!h||isNaN(Number(h))||(r.value=r.value.setAlpha(h).clone())},d=h=>{r.value=h};return(h,p)=>(m.openBlock(),m.createElementBlock("div",{role:"application","aria-label":"Sketch color picker",class:m.normalizeClass(["vc-sketch-picker",h.disableAlpha?"alpha-disabled":""])},[m.createElementVNode("div",B4e,[m.createVNode(UY,{hue:m.unref(i),tinyColor:m.unref(r),"onUpdate:tinyColor":p[0]||(p[0]=v=>m.isRef(r)?r.value=v:null)},null,8,["hue","tinyColor"])]),m.createElementVNode("div",V4e,[m.createElementVNode("div",z4e,[m.createElementVNode("div",F4e,[m.createVNode(jY,{modelValue:m.unref(i),"onUpdate:modelValue":m.unref(a)},null,8,["modelValue","onUpdate:modelValue"])]),h.disableAlpha?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",$4e,[m.createVNode(g4e,{tinyColor:m.unref(r),"onUpdate:tinyColor":p[1]||(p[1]=v=>m.isRef(r)?r.value=v:null)},null,8,["tinyColor"])]))]),m.createElementVNode("div",H4e,[m.createElementVNode("div",{"aria-label":`Current color is ${m.unref(r).toRgbString()}`,class:"active-color",style:m.normalizeStyle({background:m.unref(r).toRgbString()})},null,12,G4e),m.createVNode(ZM)])]),h.disableFields?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",U4e,[m.createElementVNode("div",W4e,[m.createVNode(qY,{label:"hex",value:s.value,onChange:u,type:o.value<1?"hex8":"hex"},null,8,["value","type"])]),m.createElementVNode("div",j4e,[m.createVNode($o,{label:"r",value:l.value.r,onChange:p[2]||(p[2]=v=>c("r",v)),a11y:{label:"Red"}},null,8,["value"])]),m.createElementVNode("div",q4e,[m.createVNode($o,{label:"g",value:l.value.g,onChange:p[3]||(p[3]=v=>c("g",v)),a11y:{label:"Green"}},null,8,["value"])]),m.createElementVNode("div",K4e,[m.createVNode($o,{label:"b",value:l.value.b,onChange:p[4]||(p[4]=v=>c("b",v)),a11y:{label:"Blue"}},null,8,["value"])]),h.disableAlpha?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("div",Y4e,[m.createVNode($o,{label:"a",value:o.value,step:.01,max:1,onChange:f,a11y:{label:"Transparency"}},null,8,["value"])]))])),m.createElementVNode("div",X4e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(t.presetColors,v=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.unref(_4e)(v)?(m.openBlock(),m.createElementBlock("div",{key:v,class:"preset-color",onClick:g=>d(v),"aria-label":"Color: transparency","aria-selected":o.value===0,role:"option",tabindex:"0",title:v,onKeydown:m.withKeys(g=>d(v),["space"])},[m.createVNode(ZM)],40,J4e)):(m.openBlock(),m.createElementBlock("div",{class:"preset-color",key:v+"-color",style:m.normalizeStyle({background:v}),onClick:g=>d(v),title:v,"aria-label":"Color:"+v,"aria-selected":`#${s.value.toLowerCase()}`===v.toLowerCase(),role:"option",tabindex:"0",onKeydown:m.withKeys(g=>d(v),["space"])},null,44,Z4e))],64))),256))])],2))}}),VO=Id(e5e,[["__scopeId","data-v-fdb7d989"]]),Tz=m.defineComponent({__name:"color",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#000"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1,s===""?t.value?.chain().focus().unsetColor().run():t.value?.chain().focus().setColor(s).run()},o=aA(s=>{i.value=s,s===""?t.value?.chain().focus().unsetColor().run():t.value?.chain().focus().setColor(s).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"text-editor",text:"文字颜色","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>m.unref(t)?.isEditable===!1?()=>{}:a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:i.value})},null,4)]),_:1},8,["popup-visible"]))}}),Cz=m.defineComponent({__name:"background-color",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#007bff"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1,s===""?t.value?.chain().focus().unsetHighlight().run():t.value?.chain().focus().setHighlight({color:s}).run()},o=aA(s=>{i.value=s,s===""?t.value?.chain().focus().unsetHighlight().run():t.value?.chain().focus().setHighlight({color:s}).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"fill",text:"背景颜色","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>m.unref(t)?.isEditable===!1?()=>{}:a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:m.unref(t)?.getAttributes("highlight")?.color||i.value})},null,4)]),_:1},8,["popup-visible"]))}});var YY=(n=>(n.C="C",n.X="X",n.Z="Z",n.Y="Y",n.A="A",n.G="G",n.L="L",n.F="F",n.D="D",n.B="B",n.P="P",n.O="O",n.R="R",n.T="T",n.MINUS="-",n.EQUAL="=",n.DIGIT_0="0",n.DELETE="DELETE",n.UP="ARROWUP",n.DOWN="ARROWDOWN",n.LEFT="ARROWLEFT",n.RIGHT="ARROWRIGHT",n.ENTER="ENTER",n.SPACE=" ",n.TAB="TAB",n.BACKSPACE="BACKSPACE",n.ESC="ESCAPE",n.PAGEUP="PAGEUP",n.PAGEDOWN="PAGEDOWN",n.F5="F5",n))(YY||{});const Fm=[{label:"默认",value:"14px",order:4},{label:"初号",value:"42pt",order:20},{label:"小初",value:"36pt",order:19},{label:"一号",value:"26pt",order:16},{label:"小一",value:"24pt",order:15},{label:"二号",value:"22pt",order:14},{label:"小二",value:"18pt",order:11},{label:"三号",value:"16pt",order:10},{label:"小三",value:"15pt",order:9},{label:"四号",value:"14pt",order:7},{label:"小四",value:"12pt",order:4},{label:"五号",value:"10.5pt",order:1},{label:"小五",value:"9pt",order:1},{label:"六号",value:"8pt",order:1},{label:"小六",value:"7.5pt",order:1},{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}],JM=[{label:"正文",value:"paragraph",element:"p"},{label:"标题1",value:"1",element:"h1"},{label:"标题2",value:"2",element:"h2"},{label:"标题3",value:"3",element:"h3"},{label:"标题4",value:"4",element:"h4"},{label:"标题5",value:"5",element:"h5"},{label:"标题6",value:"6",element:"h6"}],Ez={bar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},column:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},line:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},smooth:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},pie:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},ring:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["值"],series:[[12,19,5,2,18]]},area:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},radar:{labels:["类别1","类别2","类别3","类别4","类别5"],legends:["系列1","系列2"],series:[[12,19,5,2,18],[7,11,13,21,9]]},scatter:{labels:["坐标1","坐标2","坐标3","坐标4","坐标5"],legends:["X","Y"],series:[[12,19,5,2,18],[7,11,13,21,9]]}},Mz=[{label:"默认",value:"decimal",code:`<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>
|
|
275
275
|
<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"></path>
|
|
276
276
|
`},{label:"以0开头的数字",value:"decimal-leading-zero",code:`<path
|
|
277
277
|
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"
|
|
@@ -310,7 +310,7 @@ echarts.use([`+F+"]);":"Unknown series "+V))}return}if(f==="tooltip"){if(_){proc
|
|
|
310
310
|
</g>`}],Az=[{label:"默认",value:"disc",code:`<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>
|
|
311
311
|
<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"></path>`},{label:"空心圆",value:"circle",code:`<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>
|
|
312
312
|
<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"></path>`},{label:"实心方块",value:"square",code:`<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>
|
|
313
|
-
<path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"></path>`}],n5e=[{label:"表情与角色",items:"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😶 😏 😒 🙄 😬 😮 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵💫 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻"},{label:"动物与自然",items:"🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦔 🦇 🐻 🐻❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🐌 🦋 🐛 🐜 🐝 🐞 🦗 🕷️ 🕸️ 🦂 🦟 🦠 💐 🌸 💮 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 ☀️ 🌝 🌞 🪐 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊"},{label:"食物与食品",items:"🍇 🍉 🍊 🍋 🍌 🍍 🥭 🍎 🍏 🍐 🍑 🍒 🍓 🥝 🍅 🥥 🥑 🍆 🥔 🥕 🌽 🌶️ 🥬 🥦 🧄 🧅 🍄 🥜 🌰 🍞 🥐 🥖 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🥙 🧆 🥚 🍳 🥘 🍲 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🥤 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🏺"},{label:"活动",items:"🧧 🎁 🎄 🧨 ✨ 🎈 🎉 🏮 🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🧿 🎮 🕹️ 🎰 🎲 🧩 🧸 ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🧶"},{label:"旅行与景点",items:"🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🚏 🛣️ 🛤️ 🛢️ ⛽ 🚨 🚥 🚦 🛑 🚧 ⚓ ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 🧭 ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦"},{label:"物品",items:"📔 📕 📖 📗 📘 📙 📚 📒 📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🔍 🔎 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🏹 🛡️ 🔧 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🧰 🧲 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩺 🚪 🛏️ 🛋️ 🪑 🚽 🚿 🛁 🪒 🧴 🧷 🧹 🧺 🧻 🧼 🧽 🧯 🛒 🚬 ⚰️ ⚱️ 💎 🔇 🔈 🔉 🔊 🔔 🔕 🔋 🔌 💻 🖥️ 🖨️ ⌨️ 🖱️ 🖲️ 📷 🧱"},{label:"符号",items:"💡 ✅ ☑️ ✔️ ❌ ❎ ❓ ❗ ❔ ❕ ⌛ ⏳ 💰 🆒 🆕 🆖 🅾️ 🆗 🆘 🈲 🉑 🈸 ⛔ 🚫 📵 ✳️ ✴️ ❇️ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲 💌 💘 💝 💖 💗 💓 💞 💕 💟 ❣️ 💔 🤍 💯 💢 💥 💬 💤 ➰ ➿ 🔅 📴 ➡️ 🔃 🔄 🔙 🔚 🔛 🔝 🔀 🔁 🔂"}],qv=[{label:"网页",value:"web",icon:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M867.62382187 81.79484409c53.52106667 0 96.93866667 43.37208853 96.93866666 96.89315627v664.0071104a102.4 102.4 0 0 1-102.4 102.4H161.83751147a102.4 102.4 0 0 1-102.4-102.4V178.64248889c0-53.52106667 43.37208853-96.93866667 96.8931552-96.93866667z m28.6264896 319.2604448H127.74968853v441.59431147c0 17.29422187 12.83413333 31.58471147 29.4912 33.8147552l4.64213334 0.31857813h700.23395626a34.13333333 34.13333333 0 0 0 34.13333334-34.13333333V401.05528889z m-34.13333334-250.99377813H161.88302187a34.13333333 34.13333333 0 0 0-34.13333334 34.13333333V332.74311076h768.50062294V184.19484409a34.13333333 34.13333333 0 0 0-34.13333334-34.13333333zM216.9059552 195.93671076a45.51111147 45.51111147 0 1 1 0 91.02222293 45.51111147 45.51111147 0 0 1 0-91.02222293z m136.53333333 0a45.51111147 45.51111147 0 1 1 0 91.02222293 45.51111147 45.51111147 0 0 1 0-91.02222293z" fill="#515151" p-id="6081"></path></svg>',validate:n=>n.startsWith("http://")||n.startsWith("https://")},{label:"哔哩哔哩",value:"bilibili",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.39 3.714h.5c.88.032 1.614.337 2.2.918.586.58.889 1.312.91 2.194v4.293c-.021.88-.324 1.615-.91 2.201-.586.586-1.32.889-2.2.91H4.11c-.88-.021-1.614-.324-2.2-.91-.586-.586-.889-1.32-.91-2.2V6.825c.021-.882.324-1.613.91-2.194.586-.58 1.32-.886 2.2-.918h.452l-.684-.653a.72.72 0 0 1-.218-.529.72.72 0 0 1 .218-.529l.015-.015a.763.763 0 0 1 .537-.218c.202 0 .38.072.537.218L6.63 3.59c.041.041.078.083.109.124h2.49a.487.487 0 0 1 .092-.124l1.665-1.602a.763.763 0 0 1 .536-.218c.203 0 .386.088.542.233a.691.691 0 0 1 .228.53.72.72 0 0 1-.217.528l-.685.653zm-7.28 1.51c-.434.01-.8.16-1.096.45-.295.29-.448.66-.458 1.105v4.387c.01.445.163.813.458 1.104.296.29.662.441 1.097.45h7.778c.435-.009.801-.16 1.097-.45.295-.29.448-.659.458-1.104V6.779c-.01-.446-.163-.814-.458-1.105a1.563 1.563 0 0 0-1.097-.45H4.111zm1.557 2.255c.217 0 .399.072.544.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.736.736 0 0 1-.544.218.739.739 0 0 1-.545-.218.809.809 0 0 1-.233-.56v-.684c0-.218.075-.402.225-.553a.753.753 0 0 1 .553-.225zm4.666 0c.218 0 .4.072.545.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.737.737 0 0 1-.545.218.739.739 0 0 1-.544-.218.809.809 0 0 1-.233-.56v-.684a.809.809 0 0 1 .233-.56.738.738 0 0 1 .544-.218z" fill="#07A3D7"/></svg>',validate(n){return/^https?:\/\/(www\.)?bilibili\.com\/video\/[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/video\/([a-zA-Z0-9]+)/)?.[1];return e?`https://player.bilibili.com/player.html?bvid=${e}`:""}},{label:"优酷",value:"youku",icon:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M270.528 902.592c-82.688-45.952-104.576-161.984-43.072-232 26.688-30.208 214.592-142.784 229.632-137.344 17.088 5.504 7.488-.64-112.768-71.36-105.92-62.464-129.152-83.776-144.896-129.792-34.816-105.664 58.112-218.944 166.08-202.496 24.576 4.096 102.528 42.56 175.616 87.168 13.696 8.32 70.4 41.216 125.76 73.472 119.616 69.376 153.792 97.472 178.368 148.288 20.48 41.856 24.576 100.928 10.24 151.68-8.896 32.32-41.664 78.976-71.04 100.992l-19.2 14.4-33.408-19.2c-19.2-11.008-34.176-17.92-34.176-15.808 0 1.344 12.288 10.24 27.328 18.56 15.04 8.896 27.328 17.152 27.328 19.2 0 4.8-281.6 168.832-334.208 194.24-51.904 26.112-100.48 26.112-147.584 0z" fill="#018EFF"/><path d="M665.984 654.4c0-1.088-6.912-5.888-15.936-10.624-20.16-10.112-21.248-5.888-1.088 4.736 16.512 9.024 17.024 9.6 17.024 5.888zm-50.56 5.952c-8.448-7.424-55.744-33.408-55.744-30.72 0 2.56 53.632 35.008 58.432 35.52 1.024 0 0-2.112-2.688-4.8z" fill="#018EFF"/><path d="M673.472 653.44a4171.008 4171.008 0 0 0-126.336-72.768c-43.712-24.064-92.224-52.864-233.6-137.344C238.4 398.72 213.76 374.016 199.424 332.16c-34.816-105.664 58.048-218.944 166.016-202.496 24.576 4.096 102.4 42.56 175.552 87.168 13.632 8.32 70.336 41.216 125.632 73.472 114.112 65.92 146.88 92.032 170.752 133.184 47.872 81.728 29.44 195.008-40.96 257.472-13.632 11.648-27.968 21.248-32.768 21.248-4.8-.64-45.12-21.952-90.176-48.704z" fill="#FF396E"/><path d="M270.464 902.592A152.32 152.32 0 0 1 193.28 781.76c-6.144-76.8 21.184-115.328 130.496-179.84l75.136-44.608L568.96 630.08c93.568 39.808 172.8 72.064 176.256 72.064 4.096 0 6.784 2.048 6.784 5.504 0 5.504-273.216 165.44-334.016 194.944-51.84 26.112-100.352 26.112-147.52 0z" fill="#00BEFF"/></svg>',validate(n){return/^https?:\/\/v\.youku\.com\/v_show\/id_[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/id_([a-zA-Z0-9]+)/)?.[1];return e?`https://player.youku.com/embed/${e}`:""}},{label:"Figma",value:"figma",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.324 8c0-1.475 1.2-2.675 2.675-2.675 1.475 0 2.675 1.2 2.675 2.675 0 1.475-1.2 2.675-2.675 2.675A2.678 2.678 0 0 1 8.324 8z" fill="#1ABCFE"/><path d="M3 13.325c0-1.475 1.2-2.675 2.675-2.675h2.65v2.675C8.325 14.8 7.125 16 5.65 16 4.175 16 3 14.8 3 13.325z" fill="#0ACF83"/><path d="M8.324 0v5.325H11c1.475 0 2.675-1.2 2.675-2.675C13.674 1.175 12.474 0 11 0H8.324z" fill="#FF7262"/><path d="M3 2.675C3 4.15 4.2 5.35 5.675 5.35h2.65V0H5.65C4.175 0 3 1.2 3 2.675z" fill="#F24E1E"/><path d="M3 8c0 1.475 1.2 2.675 2.675 2.675h2.65v-5.35H5.65C4.175 5.325 3 6.525 3 8z" fill="#A259FF"/></svg>',validate(n){return/^https?:\/\/www\.figma\.com\/file\/[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/file\/([a-zA-Z0-9]+)/)?.[1];return e?`https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/${e}`:""}},{label:"墨刀",value:"mado",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 3h2.715v4.752H2V3zm6.958 0H6.242v4.752h2.716V3zm4.582 0h-2.716v4.752h2.716V3zM9.107 14l-1.096-2.5a3.905 3.905 0 0 0 2.812-3.748h2.716A6.621 6.621 0 0 1 9.107 14z" fill="#F33"/></svg>',validate(n){return/^https?:\/\/modao\.cc\/app\/[a-zA-Z0-9]+/.test(n)},transformURL(n){return n}},{label:"腾讯视频",value:"tencent_video",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.314 14.541c-1.416-.025-1.71-1.416-1.964-3.16-.155-1.06-.182-2.155-.182-3.23 0-1.074.027-2.169.182-3.23.31-2.14.685-3.75 3.123-2.95 2.336.768 4.586 2.126 6.56 3.67.1.085.209.177.324.272.705.59 1.62 1.355 1.642 2.239-.021.882-.936 1.647-1.641 2.237-.115.096-.225.187-.324.274-1.975 1.543-4.225 2.901-6.561 3.67-.418.136-.774.203-1.08.208h-.08z" fill="#4396F7"/><path d="M2.98 13.143c-1.202-.029-1.527-.954-1.755-2.162l-.02-.1-.036-.206C1.025 9.847 1 8.991 1 8.152c0-.84.025-1.694.17-2.523l.036-.205.019-.1c.267-1.418.668-2.447 2.464-2.094-.151.487-.247 1.067-.339 1.692-.154 1.061-.181 2.156-.181 3.23 0 1.074.027 2.169.181 3.23.092.624.188 1.204.34 1.692a3.501 3.501 0 0 1-.592.07H2.98z" fill="#EF8E34"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.689 3.229c.125.025.256.055.395.094 2.181.6 4.28 1.66 6.124 2.866.66.483 1.812 1.16 1.834 1.962-.023.803-1.175 1.48-1.834 1.963-1.843 1.205-3.943 2.266-6.124 2.866-.139.038-.27.069-.395.094-.151-.488-.248-1.068-.338-1.693-.155-1.06-.182-2.156-.182-3.23 0-1.074.027-2.169.182-3.23.09-.62.185-1.197.335-1.683l.003-.009z" fill="#78E445"/><path d="M4.845 8.156c0-1.82.13-2.04.13-2.04.053-.234.18-.298.378-.241 0 0 .587.124 2.006.87 1.435.754 1.875 1.168 1.875 1.168.217.188.172.305 0 .483 0 0-.269.308-1.875 1.14-1.606.83-2.006.894-2.006.894-.239.056-.332-.015-.377-.24 0 0-.13-.21-.13-2.034z" fill="#fff"/></svg>',validate(n){return n.startsWith("https://modao.cc/proto/")},transformURL(n){const e=n.match(/\/cover\/[a-zA-Z0-9]+\/([a-zA-Z0-9]+)/)?.[1];return e?`https://v.qq.com/iframe/player.html?vid=${e}`:""}}],r5e={class:"w-[170px] flex flex-wrap gap-[10px]"},i5e=["onClick"],a5e=["innerHTML"],Nz=m.defineComponent({__name:"ordered-list",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref("");m.watch(()=>t.value,a=>{if(a&&e.value){const{listType:o}=e.value.getAttributes("orderedList");r.value=o}});const i=a=>{const o=e.value?.chain().focus();e.value?.isActive("orderedList")?e.value.getAttributes("orderedList").listType===a?o?.toggleOrderedList().run():o?.updateAttributes("orderedList",{listType:a}).run():(o?.toggleOrderedList().run(),e.value?.chain().updateAttributes("orderedList",{listType:a}).run()),r.value=a,t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"ordered-list",icoSize:16,text:"有序列表","hide-text":"",shortcut:"Ctrl+Shift+7","popup-visible":t.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>t.value=s),"popup-type":"arrow",onMenuClick:o[1]||(o[1]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(m.unref(Mz)[0].value))},{content:m.withCtx(()=>[m.createElementVNode("div",r5e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(Mz),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["w-[50px] h-[50px] cursor-pointer rounded-[3px] flex items-center justify-center border hover:bg-[#F5F5F5] overflow-hidden",{"border-[#333639]":r.value===s.value}]),onClick:u=>i(s.value)},[(m.openBlock(),m.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 44 44",innerHTML:s.code},null,8,a5e))],10,i5e))),128))])]),_:1},8,["popup-visible"]))}}),o5e={class:"w-[170px] flex flex-wrap gap-[10px]"},s5e=["onClick"],l5e=["innerHTML"],Dz=m.defineComponent({__name:"bullet-list",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref("");m.watch(()=>t.value,a=>{if(a&&e.value){const{listType:o}=e.value.getAttributes("bulletList");r.value=o}});const i=a=>{const o=e.value?.chain().focus();e.value?.isActive("bulletList")?e.value.getAttributes("bulletList").listType===a?o?.toggleBulletList().run():o?.updateAttributes("bulletList",{listType:a}).run():(o?.toggleBulletList().run(),e.value?.chain().updateAttributes("bulletList",{listType:a}).run()),r.value=a,t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"bullet-list",icoSize:16,text:"无序列表","hide-text":"",shortcut:"Ctrl+Shift+7","popup-visible":t.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>t.value=s),"popup-type":"arrow",onMenuClick:o[1]||(o[1]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(m.unref(Az)[0].value))},{content:m.withCtx(()=>[m.createElementVNode("div",o5e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(Az),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["w-[50px] h-[50px] cursor-pointer rounded-[3px] flex items-center justify-center border hover:bg-[#F5F5F5]",{"border-[#333639]":r.value===s.value}]),onClick:u=>i(s.value)},[(m.openBlock(),m.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 44 44",innerHTML:s.code},null,8,l5e))],10,s5e))),128))])]),_:1},8,["popup-visible"]))}}),Oz=m.defineComponent({__name:"text-indent",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"indent-right",text:"增加缩进",shortcut:"Tab","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().indent().run())}))}}),u5e=["disabled"],c5e={key:0,class:"text-[13px] text-[#333639] ml-[3px]"},f5e={class:"flex items-center justify-center w-full h-full"},d5e=["disabled"],h5e={class:"flex items-center gap-[4px] h-full"},p5e={key:0,class:"text-[13px] text-[#333639]"},wS=m.defineComponent({__name:"MenusDropdown",props:{ico:{default:""},icoSize:{default:16},text:{default:""},hideText:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},menuActive:{type:Boolean,default:!1},dropType:{default:"dropdown"},popupVisible:{type:Boolean,default:!1},maxHeight:{type:Boolean,default:!0}},emits:["update:popupVisible"],setup(n,{emit:e}){const t=m.useAttrs(),r=m.inject("editor"),i=n,a=e,o=m.computed({get:()=>i.popupVisible,set:l=>a("update:popupVisible",l)}),s=(...l)=>{t.onMenuClickThrough?t.onMenuClickThrough(...l):t.onMenuClick&&t.onMenuClick(...l)};return(l,u)=>{const c=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[n.dropType==="dropdown"?m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({key:0,class:["white-editor-tool-item white-editor-tool-drop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",{class:"flex items-center h-full",onClick:s},[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`]),style:m.normalizeStyle(`font-size: ${n.icoSize}px`)},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",c5e,m.toDisplayString(n.text),1))]),m.createVNode(js,{trigger:"click",value:o.value,"onUpdate:value":u[0]||(u[0]=f=>o.value=f),placement:"bottom",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"},disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1),hasClass:"flex items-center justify-center w-[13px] h-full hover:bg-[#d7d3d3] mr-[-6px] ml-[4px] w-arrow"},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.createElementVNode("span",f5e,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])]),_:3},8,["value","disabled"])],16,u5e)),[[c,`${n.text}`]]):m.createCommentVNode("",!0),n.dropType==="select"?(m.openBlock(),m.createBlock(js,{key:1,trigger:"click",value:o.value,"onUpdate:value":u[1]||(u[1]=f=>o.value=f),placement:"bottom",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item white-editor-tool-drop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",h5e,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`]),style:m.normalizeStyle(`font-size: ${n.icoSize}px`)},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",p5e,m.toDisplayString(n.text),1)),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])],16,d5e)),[[c,`${n.text}`]])]),_:3},8,["value"])):m.createCommentVNode("",!0)],64)}}}),v5e=["disabled"],g5e=["disabled"],m5e=["disabled"],y5e=["disabled"],b5e=["disabled"],XY=m.defineComponent({__name:"text-align",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.computed(()=>!e.value||e.value.isActive({textAlign:"left"})?"left":e.value.isActive({textAlign:"center"})?"center":e.value.isActive({textAlign:"right"})?"right":e.value.isActive({textAlign:"justify"})?"justify":e.value.isActive({textAlign:"distributed"})?"distributed":"left"),i=a=>{switch(a){case"left":e.value?.can().chain().focus().setTextAlign("left").run()&&e.value.chain().focus().setTextAlign("left").run(),e.value?.can().chain().focus().setNodeAlign("flex-start").run()&&e.value.chain().focus().setNodeAlign("flex-start").run();break;case"center":e.value?.can().chain().focus().setTextAlign("center").run()&&e.value.chain().focus().setTextAlign("center").run(),e.value?.can().chain().focus().setNodeAlign("center").run()&&e.value.chain().focus().setNodeAlign("center").run();break;case"right":e.value?.can().chain().focus().setTextAlign("right").run()&&e.value.chain().focus().setTextAlign("right").run(),e.value?.can().chain().focus().setNodeAlign("flex-end").run()&&e.value.chain().focus().setNodeAlign("flex-end").run();break;case"justify":e.value?.can().chain().focus().setTextAlign("justify").run()&&e.value.chain().focus().setTextAlign("justify").run();break;case"distributed":e.value?.can().chain().focus().setTextAlign("distributed").run()&&e.value.chain().focus().setTextAlign("distributed").run();break}t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(wS,{ico:`align-${r.value}`,text:"对齐方式","hide-text":"",onMenuClick:o[5]||(o[5]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(r.value)),"popup-visible":t.value,"onUpdate:popupVisible":o[6]||(o[6]=s=>t.value=s)},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[0]||(o[0]=s=>i("left")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("left").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("left").run()},[...o[7]||(o[7]=[m.createElementVNode("i",{class:"w-iconfont icon-align-left"},null,-1),m.createTextVNode(" 左对齐 ",-1)])],8,v5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[1]||(o[1]=s=>i("center")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("center").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("center").run()},[...o[8]||(o[8]=[m.createElementVNode("i",{class:"w-iconfont icon-align-center"},null,-1),m.createTextVNode(" 居中对齐 ",-1)])],8,g5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[2]||(o[2]=s=>i("right")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("right").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("flex-end").run()},[...o[9]||(o[9]=[m.createElementVNode("i",{class:"w-iconfont icon-align-right"},null,-1),m.createTextVNode(" 右对齐 ",-1)])],8,m5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[3]||(o[3]=s=>i("justify")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("justify").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("justify").run()},[...o[10]||(o[10]=[m.createElementVNode("i",{class:"w-iconfont icon-align-justify"},null,-1),m.createTextVNode(" 两端对齐 ",-1)])],8,y5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[4]||(o[4]=s=>i("distributed")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("distributed").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("distributed").run()},[...o[11]||(o[11]=[m.createElementVNode("i",{class:"w-iconfont icon-align-distributed"},null,-1),m.createTextVNode(" 分散对齐 ",-1)])],8,b5e)]),_:1},8,["ico","popup-visible"]))}}),Iz=m.defineComponent({__name:"sub-script",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"sub-script",text:"下标",shortcut:"Ctrl+,","hide-text":"","menu-active":m.unref(e)?.isActive("subscript"),disabled:!m.unref(e)?.can().chain().focus().toggleSubscript().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.commands.toggleSubscript())},null,8,["menu-active","disabled"]))}}),Rz=m.defineComponent({__name:"sup-script",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"sup-script",text:"上标",shortcut:"Ctrl+.","hide-text":"","menu-active":m.unref(e)?.isActive("superscript"),disabled:!m.unref(e)?.can().chain().focus().toggleSuperscript().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.commands.toggleSuperscript())},null,8,["menu-active","disabled"]))}}),Lz=m.defineComponent({__name:"quote",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"quote",text:"引用",shortcut:"Ctrl+Shift+B","hide-text":"","menu-active":m.unref(e)?.isActive("blockquote"),disabled:!m.unref(e)?.can().chain().focus().toggleBlockquote().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleBlockquote().run())},null,8,["menu-active","disabled"]))}}),Pz=m.defineComponent({__name:"code",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"code",text:"代码",shortcut:"Ctrl+E","hide-text":"","menu-active":m.unref(e)?.isActive("code"),disabled:!m.unref(e)?.can().chain().focus().toggleCode().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleCode().run())},null,8,["menu-active","disabled"]))}}),x5e=["onClick"],Bz=m.defineComponent({__name:"line-height",setup(n){const e=m.inject("editor"),t=m.inject("options"),r=m.ref(!1),i=m.computed(()=>t.value.dicts?.lineHeights.map(o=>({label:o.label,value:o.value,active:e.value?.isActive({lineHeight:o.value})}))),a=({content:o,value:s})=>{o&&(e.value?.chain().focus().setLineHeight(s).run(),r.value=!1)};return(o,s)=>(m.openBlock(),m.createBlock(wS,{"drop-type":"select",ico:"line-height",text:"行高","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":s[0]||(s[0]=l=>r.value=l)},{content:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,l=>(m.openBlock(),m.createElementBlock("div",{key:l.value,class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[4px] text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",l.active?"!text-[#007bff] font-[500]":""]),onClick:u=>a({content:l.label,value:l.value})},m.toDisplayString(l.label),11,x5e))),128))]),_:1},8,["popup-visible"]))}}),Vz=m.defineComponent({__name:"undo",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"unde",text:"撤销",shortcut:"Ctrl+Z","hide-text":"",disabled:!m.unref(e)?.can().chain().focus().undo().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().undo().run())},null,8,["disabled"]))}}),zz=m.defineComponent({__name:"redo",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"redo",text:"重做",shortcut:"Ctrl+Y","hide-text":"",disabled:!m.unref(e)?.can().chain().focus().redo().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().redo().run())},null,8,["disabled"]))}}),Fz=m.defineComponent({__name:"format-painter",setup(n){const e=m.inject("editor"),t=r=>{if(e.value?.view?.painter?.enabled){e.value?.commands.unsetFormatPainter();return}e.value?.chain().focus().setFormatPainter(r).run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"format-painter",text:"格式刷","menu-active":m.unref(e)?.view?.painter?.enabled,disabled:m.unref(e)?.state?.selection?.empty,"hide-text":"",onMenuClick:i[0]||(i[0]=a=>t(!0)),onDblclick:i[1]||(i[1]=a=>t(!1))},null,8,["menu-active","disabled"]))}}),$z=m.defineComponent({__name:"clear-format",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"clear-format",text:"清除格式","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().unsetAllMarks().run())}))}}),Hz=m.defineComponent({__name:"hard-break",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"hard-break",text:"换行","hide-text":"",shortcut:"Shift+Enter",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setHardBreak().run())}))}}),_5e=["checked"],S5e={class:"checkbox-label"},ZY=m.defineComponent({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(n,{emit:e}){const t=n,r=e,i=a=>{t.disabled||r("update:value",a.target.checked)};return(a,o)=>(m.openBlock(),m.createElementBlock("label",{class:m.normalizeClass(["white-checkbox",{checked:n.value,disabled:n.disabled}]),onChange:o[0]||(o[0]=s=>i(s))},[o[1]||(o[1]=m.createElementVNode("span",{class:"checkbox-input"},null,-1)),m.createElementVNode("input",{class:"checkbox-original",type:"checkbox",checked:n.value},null,8,_5e),m.createElementVNode("span",S5e,[m.renderSlot(a.$slots,"default")])],34))}}),w5e={class:"w-full white-table-generator-content"},k5e={class:"text-[14px] font-[600] mb-[5px] user-select-none flex items-center justify-between"},T5e=["onMouseenter"],C5e=m.defineComponent({__name:"TableGenerator",emits:["insert","close"],setup(n,{emit:e}){const t=e,r=m.ref(!0),i=m.ref([]),a=()=>{if(!i.value.length)return;const[o,s]=i.value;t("insert",{row:o,col:s,checked:r.value})};return(o,s)=>(m.openBlock(),m.createElementBlock("div",w5e,[m.createElementVNode("div",k5e,[m.createElementVNode("span",null,"表格 "+m.toDisplayString(`${i.value[0]||0} * ${i.value[1]||0}`),1),m.createVNode(ZY,{value:r.value,"onUpdate:value":s[0]||(s[0]=l=>r.value=l)},{default:m.withCtx(()=>[...s[3]||(s[3]=[m.createTextVNode("包含表头",-1)])]),_:1},8,["value"])]),m.createElementVNode("table",{onMouseleave:s[1]||(s[1]=l=>i.value=[]),onClick:s[2]||(s[2]=l=>a())},[m.createElementVNode("tbody",null,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(10,l=>m.createElementVNode("tr",{key:l},[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(10,u=>m.createElementVNode("td",{onMouseenter:c=>i.value=[l,u],key:u},[m.createElementVNode("div",{class:m.normalizeClass(["cell cursor-pointer",{active:i.value.length&&i.value[0]&&i.value[1]&&l<=i.value[0]&&u<=i.value[1]}])},null,2)],40,T5e)),64))])),64))])],32)]))}}),Gz=m.defineComponent({__name:"table",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor"),t=m.ref(!1),r=i=>{const{row:a,col:o,checked:s}=i;e.value?.chain().focus().insertTable({rows:a,cols:o,withHeaderRow:s}).run(),t.value=!1};return(i,a)=>(m.openBlock(),m.createBlock(il,{ico:"edit-table",icoSize:16,text:"插入表格","hide-text":n.hideText,"popup-visible":t.value,"onUpdate:popupVisible":a[0]||(a[0]=o=>t.value=o),"popup-type":"select"},{content:m.withCtx(()=>[m.createVNode(C5e,{onInsert:r})]),_:1},8,["hide-text","popup-visible"]))}}),Wo=m.defineComponent({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=()=>{t.disabled||r("click")};return(a,o)=>(m.openBlock(),m.createElementBlock("button",{class:m.normalizeClass(["white-button",{disabled:n.disabled,checked:!n.disabled&&n.checked,default:!n.disabled&&n.type==="default",primary:!n.disabled&&n.type==="primary",checkbox:!n.disabled&&n.type==="checkbox",radio:!n.disabled&&n.type==="radio",small:n.size==="small",first:n.first,last:n.last}]),onClick:o[0]||(o[0]=s=>i())},[m.renderSlot(a.$slots,"default")],2))}}),E5e={class:"w-[250px]"},M5e={class:"flex justify-end mt-[10px] gap-[10px]"},Uz=m.defineComponent({__name:"link",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.ref(""),t=m.ref(""),r=m.inject("editor"),i=m.ref(!1),a=()=>{r.value?.commands.setLink({href:e.value,target:"_blank"}),r.value?.chain().focus().insertContent(t.value).run(),i.value=!1},o=()=>{e.value="",t.value="",i.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"link",icoSize:16,text:"插入链接","hide-text":n.hideText,"popup-visible":i.value,"onUpdate:popupVisible":l[4]||(l[4]=u=>i.value=u),"popup-type":"select"},{content:m.withCtx(()=>[m.createElementVNode("div",E5e,[l[7]||(l[7]=m.createElementVNode("div",{class:"font-[500] text-[14px] mb-[5px]"},"链接到",-1)),m.createVNode(lm,{placeholder:"请输入网址",value:e.value,"onUpdate:value":l[0]||(l[0]=u=>e.value=u)},null,8,["value"]),l[8]||(l[8]=m.createElementVNode("div",{class:"font-[500] text-[14px] mb-[5px] mt-[10px]"},"显示文案",-1)),m.createVNode(lm,{placeholder:"请输入显示文案",value:t.value,"onUpdate:value":l[1]||(l[1]=u=>t.value=u)},null,8,["value"]),m.createElementVNode("div",M5e,[m.createVNode(Wo,{onClick:l[2]||(l[2]=u=>o())},{default:m.withCtx(()=>[...l[5]||(l[5]=[m.createTextVNode("取消",-1)])]),_:1}),m.createVNode(Wo,{type:"primary",onClick:l[3]||(l[3]=u=>a()),disabled:!e.value||!t.value},{default:m.withCtx(()=>[...l[6]||(l[6]=[m.createTextVNode(" 确定 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["hide-text","popup-visible"]))}}),A5e=["onClick"],N5e={class:"icon"},zO=m.defineComponent({__name:"MenusSelect",props:{value:{},size:{default:""},options:{},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{default:"搜索"},maxHeight:{type:Boolean,default:!0},maxWidth:{default:0}},emits:["update:value"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=m.inject("editor"),o=m.ref(!1),s=m.ref(),l=m.ref(),u=m.ref(0),c=m.ref(""),f=m.computed(()=>r.options.find(b=>b.value===r.value)?.label||r.value||"请选择"),d=m.computed(()=>f.value==="请选择"),h=m.computed(()=>{if(!r.search||!c.value.trim())return r.options;const b=r.options.filter(_=>_.label.toLowerCase().indexOf(c.value.toLowerCase())!==-1);return b.length?b:r.options});m.watch(o,()=>{o.value?m.nextTick(()=>{l.value&&l.value.focus()}):c.value=""}),m.onBeforeUnmount(()=>{c.value=""});const p=()=>{s.value&&(u.value=r.maxWidth?Number(r.maxWidth):s.value.clientWidth)},v=new ResizeObserver(p);m.onMounted(()=>{s.value&&v.observe(s.value)}),m.onUnmounted(()=>{s.value&&v.unobserve(s.value)});const g=b=>{b.disabled||(i("update:value",b.value),o.value=!1)};return e({changePopoverVisible:b=>{o.value=b}}),(b,_)=>(m.openBlock(),m.createBlock(js,{class:"white-select-wrapper",trigger:"click",value:o.value,"onUpdate:value":_[0]||(_[0]=x=>o.value=x),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"},disabled:n.disabled||m.unref(a)?.isEditable===!1},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"white-options-wrapper",style:m.normalizeStyle({width:u.value+2+"px",maxHeight:n.maxHeight?"260px":"auto"})},[m.renderSlot(b.$slots,"main",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(h.value,(x,T)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["option",{disabled:x.disabled,selected:x.value===n.value}]),key:T,onClick:k=>g(x)},m.toDisplayString(x.label),11,A5e))),128))])],4)]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["select border border-[#d9d9d9] !bg-[#fff]",{[n.size]:n.size,disabled:n.disabled||m.unref(a)?.isEditable===!1}]),ref_key:"selectRef",ref:s},[m.createElementVNode("div",{class:m.normalizeClass(["selector",{placeholder:d.value}])},m.toDisplayString(f.value),3),m.createElementVNode("div",N5e,[m.renderSlot(b.$slots,"icon",{},()=>[_[1]||(_[1]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px] transition-transform duration-200"},null,-1))])])],2)]),_:3},8,["value","disabled"]))}}),Wz=m.defineComponent({__name:"font-size",setup(n){const e=m.inject("editor"),t=m.computed(()=>e.value?.getAttributes("textStyle").fontSize||"14px");return(r,i)=>(m.openBlock(),m.createBlock(zO,{value:t.value,size:"small",options:m.unref(Fm),"onUpdate:value":i[0]||(i[0]=a=>m.unref(e)?.chain().focus().setFontSize(a).run())},null,8,["value","options"]))}}),jz=m.defineComponent({__name:"font-family",setup(n){const e=m.inject("editor"),t=[{label:"默认字体",value:null},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangsong"},{label:"Arial",value:"Arial"},{label:"Times New Roman",value:"Times New Roman"},{label:"Verdana",value:"Verdana"},{label:"Helvetica",value:"Helvetica"},{label:"Tahoma",value:"Tahoma"},{label:"Georgia",value:"Georgia"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"}],r=m.computed(()=>e.value?.getAttributes("textStyle").fontFamily||null);return(i,a)=>(m.openBlock(),m.createBlock(zO,{class:"w-[120px]",size:"small",value:r.value,options:t,"onUpdate:value":a[0]||(a[0]=o=>m.unref(e)?.chain().focus().setFontFamily(o).run())},null,8,["value"]))}}),D5e=["onClick"],O5e=m.defineComponent({__name:"font-heading",setup(n){const e=m.inject("editor"),t=m.ref(),r=m.computed(()=>{const a=o=>e.value?.isActive("heading",{level:o});if(e.value){if(e.value?.isActive("paragraph"))return"paragraph";if(a(1))return"1";if(a(2))return"2";if(a(3))return"3";if(a(4))return"4";if(a(5))return"5";if(a(6))return"6"}return""}),i=a=>{a==="paragraph"?e.value?.chain().focus().setParagraph().run():e.value?.chain().focus().toggleHeading({level:Number(a)}).run(),t.value.changePopoverVisible(!1)};return(a,o)=>(m.openBlock(),m.createBlock(zO,{value:r.value,size:"small",options:m.unref(JM),"max-width":100,ref_key:"selectRef",ref:t},{main:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(JM),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["white-heading-wrapper cursor-pointer",{selected:s.value===r.value,[s.element]:!0}]),onClick:u=>i(s.value)},m.toDisplayString(s.label),11,D5e))),128))]),_:1},8,["value","options"]))}}),I5e=m.defineComponent({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(n,{emit:e}){const t=n,r=m.ref(),i=e,a=m.ref(!1),o=m.computed(()=>({width:t.width+"px",...t.contentStyle||{}}));m.watch(()=>t.visible,()=>{t.visible&&m.nextTick(()=>r.value.focus())});const s=()=>{i("update:visible",!1),i("closed")},l=()=>{t.visible&&t.closeOnEsc&&s()},u=()=>{t.closeOnClickMask&&s()};return(c,f)=>(m.openBlock(),m.createBlock(m.Teleport,{to:"body"},[m.createVNode(m.Transition,{name:"modal-fade"},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("div",{class:"white-modal-wrapper white-editor-namespace",ref_key:"modalRef",ref:r,tabindex:"-1",onKeyup:f[3]||(f[3]=m.withKeys(d=>l(),["esc"])),onClick:f[4]||(f[4]=m.withModifiers(d=>u(),["self"]))},[m.createVNode(m.Transition,{name:"modal-zoom",onAfterLeave:f[1]||(f[1]=d=>a.value=!1),onBeforeEnter:f[2]||(f[2]=d=>a.value=!0)},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("div",{class:"modal-content",style:m.normalizeStyle(o.value)},[n.closeButton?(m.openBlock(),m.createElementBlock("span",{key:0,class:"close-btn",onClick:f[0]||(f[0]=d=>s())},[...f[5]||(f[5]=[m.createElementVNode("i",{class:"w-iconfont icon-close"},null,-1)])])):m.createCommentVNode("",!0),a.value?m.renderSlot(c.$slots,"default",{key:1}):m.createCommentVNode("",!0)],4),[[m.vShow,n.visible]])]),_:3})],544),[[m.vShow,n.visible]])]),_:3})]))}}),R5e={class:"white-editor-table-content"},L5e=["id","onFocus","onBlur","onPaste"],qz=30,Kz=15,P5e=m.defineComponent({__name:"ChartData",props:{type:{},data:{}},emits:["updateData"],setup(n,{expose:e,emit:t}){const r=n,i=m.ref([0,0]),a=m.ref(null),o=m.ref("bar"),s=()=>{o.value=r.type;const p=[],{labels:v,legends:g,series:y}=r.data,b=v.length,_=y.length;p.push(["",...g]);for(let x=0;x<b;x++){const T=[v[x]];for(let k=0;k<_;k++)T.push(y[k][x]+"");p.push(T)}for(let x=0;x<b+1;x++)for(let T=0;T<_+1;T++){const k=document.querySelector(`#cell-${x}-${T}`);k&&(k.value=p[x][T]+"")}i.value=[_+1,b+1]},l=(p,v)=>{if(p===0||v===0)return;const g=document.querySelector(`#cell-${p}-${v}`);g&&g.value&&(/^[0-9]+$/.test(g.value)||(g.value="0"))},u=()=>{if(!a.value)return;const[p,v]=a.value,g=document.querySelector(`#cell-${p+1}-${v}`);g&&g.focus()},c=p=>{p.key.toUpperCase()===YY.ENTER&&u()},f=t;m.onMounted(()=>{s(),document.addEventListener("keydown",c)}),m.onBeforeUnmount(()=>{f("updateData",d()),document.removeEventListener("keydown",c)});const d=()=>{const p=[];let v=[],g=[];for(let y=1;y<qz;y++){const b=document.querySelector(`#cell-${y}-0`);b&&b.value&&p.push({rowIndex:y,value:b.value})}for(let y=1;y<Kz;y++){const b=document.querySelector(`#cell-0-${y}`);if(b&&b.value){v.push(b.value);const _=[];for(let x=0;x<p.length;x++){const T=document.querySelector(`#cell-${p[x].rowIndex}-${y}`);let k=0;T&&T.value&&+T.value&&(k=+T.value),_.push(k)}g.push(_)}}return o.value==="scatter"&&(v.length>2&&(v=v.slice(0,2),g=g.slice(0,2)),v.length<2&&(v.push("Y"),g.push(g[0]))),(o.value==="ring"||o.value==="pie")&&v.length>1&&(v=v.slice(0,1),g=g.slice(0,1)),{data:{labels:p.map(y=>y.value),legends:v,series:g},type:o.value}},h=(p,v,g)=>{p.preventDefault(),console.log("handlePaste",p.clipboardData,v,g),p.clipboardData};return e({getTableData:d,initData:s}),(p,v)=>(m.openBlock(),m.createElementBlock("div",R5e,[m.createElementVNode("table",null,[m.createElementVNode("tbody",null,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(qz,g=>m.createElementVNode("tr",{key:g},[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(Kz,y=>m.createElementVNode("td",{key:y,class:m.normalizeClass({head:y===1&&g<=i.value[1]||g===1&&y<=i.value[0]})},[g===1&&y===1?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("input",{key:0,class:m.normalizeClass(["item",{selected:g<=i.value[1]&&y<=i.value[0]}]),id:`cell-${g-1}-${y-1}`,autocomplete:"off",onFocus:b=>a.value=[g-1,y-1],onBlur:b=>l(g-1,y-1),onPaste:b=>h(b,g-1,y-1)},null,42,L5e))],2)),64))])),64))])])]))}}),B5e={class:"w-full inline-flex items-center mb-[15px]"},V5e={class:"flex items-center gap-[1.2rem] h-[400px]"},z5e={class:"w-[55%] h-full border rounded-md p-2"},F5e={class:"flex-1 h-full border rounded-md p-4"},$5e={class:"flex items-center gap-[10px] mb-[10px]"},H5e={class:"flex items-center gap-[10px] mb-[10px]"},G5e={class:"flex items-center gap-[10px] mb-[10px]"},U5e={class:"flex items-center gap-[10px] mb-[10px]"},W5e={class:"flex items-center gap-[10px] mb-[10px]"},j5e={key:0,class:"w-full h-[400px] overflow-auto"},q5e={class:"flex items-center justify-end gap-[0.8rem] mt-6"},QM=m.defineComponent({__name:"echarts",props:{icon:{default:"chart"},text:{default:"插入图表"},isEdit:{type:Boolean,default:!1},hideText:{type:Boolean,default:!0}},setup(n){const e=n,t=m.inject("editor"),r=m.inject("options"),i=m.ref(!1),a=m.ref("type"),o=m.ref(1),s=m.ref(null),l=m.ref(),u=m.ref({data:[],config:{seriesType:"bar",legendorient:"horizontal",titleText:"",legend:!1,legendleft:"center",legendlocation:"top",titleleft:"left"}});let c=null;const f=async()=>{if(i.value=!0,a.value="type",e.isEdit){if(s.value=Fl(t.value),s.value?.type?.name!=="echarts"||(h(),!s.value.attrs?.chartConfig))return;const x=s.value.attrs?.chartConfig;u.value=JSON.parse(JSON.stringify(x)),console.log("chartConfig",u.value),await m.nextTick(),d()}else h(),await m.nextTick(),d()},d=async()=>{if(await m.nextTick(),c=TE(l.value),!u.value.data){console.log("图表数据为空");return}const x=iH(JSON.parse(JSON.stringify(u.value.data)),JSON.parse(JSON.stringify(u.value.config)),r.value);try{c.setOption(x)}catch(T){console.log("图表渲染错误:",T),y()}},h=()=>{u.value.config.seriesType="bar",u.value.config.legend=!0,u.value.config.legendorient="horizontal",u.value.config.legendlocation="top",u.value.config.legendleft="center",u.value.config.titleText="",u.value.config.titleleft="left",u.value.data=Ez[u.value.config.seriesType]},p=x=>{u.value.data=Ez[x]},v=x=>{u.value.data=x.data},g=x=>{a.value=x,x==="type"&&b()},y=()=>{c!==null&&(c.dispose(),c=null)},b=async()=>{try{y(),await m.nextTick(),await d()}catch(x){console.log("图表配置错误:",x)}},_=()=>{const x={id:"",name:"",mode:o.value,chartOptions:null,chartConfig:null,nodeAlign:"center",margin:{}};e.isEdit?x.id=s.value.attrs.id:x.id=ip(),x.chartConfig=JSON.parse(JSON.stringify({data:u.value.data,config:u.value.config})),e.isEdit?t.value.commands.updateEcharts(x):t.value.commands.setEcharts(x),i.value=!1};return m.onMounted(()=>{}),(x,T)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:n.icon,text:n.text,"hide-text":n.hideText,onMenuClick:f},null,8,["ico","text","hide-text"]),m.createVNode(I5e,{visible:i.value,"onUpdate:visible":T[8]||(T[8]=k=>i.value=k),closeButton:"",width:800},{default:m.withCtx(()=>[T[17]||(T[17]=m.createElementVNode("div",{class:"w-full mb-6 font-[500] text-[18px]"},"图表配置",-1)),m.createElementVNode("div",B5e,[m.createElementVNode("span",{class:m.normalizeClass(["px-3 py-2 bg-[#f5f5f5] text-[#333] cursor-pointer rounded-l-md",{"!bg-[#007bff] !text-[#fff]":a.value==="type"}]),onClick:T[0]||(T[0]=k=>g("type"))}," 图表类型 ",2),m.createElementVNode("span",{class:m.normalizeClass(["px-3 py-2 bg-[#f5f5f5] text-[#333] cursor-pointer rounded-r-md",{"!bg-[#007bff] !text-[#fff]":a.value==="data"}]),onClick:T[1]||(T[1]=k=>g("data"))}," 图表数据 ",2)]),m.withDirectives(m.createElementVNode("div",V5e,[m.createElementVNode("div",z5e,[m.createElementVNode("div",{ref_key:"chartRef",ref:l,class:"w-full h-full"},null,512)]),m.createElementVNode("div",F5e,[m.createElementVNode("div",$5e,[T[9]||(T[9]=m.createElementVNode("span",{class:"flex-shrink-0"},"图表类型:",-1)),m.createVNode(wg,{value:u.value.config.seriesType,"onUpdate:value":T[2]||(T[2]=k=>u.value.config.seriesType=k),options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"},{label:"曲线图",value:"smooth"},{label:"饼图",value:"pie"},{label:"环形图",value:"ring"},{label:"面积图",value:"area"},{label:"散点图",value:"scatter"},{label:"雷达图",value:"radar"}],maxHeight:!1,onChange:p,class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",H5e,[T[10]||(T[10]=m.createElementVNode("span",{class:"flex-shrink-0"},"标题名称:",-1)),m.createVNode(lm,{value:u.value.config.titleText,"onUpdate:value":T[3]||(T[3]=k=>u.value.config.titleText=k),placeholder:"请输入标题名称",class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",G5e,[m.createVNode(ZY,{value:u.value.config.legend,"onUpdate:value":T[4]||(T[4]=k=>u.value.config.legend=k),class:"flex-shrink-0"},{default:m.withCtx(()=>[...T[11]||(T[11]=[m.createTextVNode(" 显示图例 ",-1)])]),_:1},8,["value"])]),u.value.config.legend?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.createElementVNode("div",U5e,[T[12]||(T[12]=m.createElementVNode("span",{class:"flex-shrink-0"},"横向位置:",-1)),m.createVNode(wg,{value:u.value.config.legendleft,"onUpdate:value":T[5]||(T[5]=k=>u.value.config.legendleft=k),options:[{label:"左侧",value:"left"},{label:"居中",value:"center"},{label:"右侧",value:"right"}],class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",W5e,[T[13]||(T[13]=m.createElementVNode("span",{class:"flex-shrink-0"},"纵向位置:",-1)),m.createVNode(wg,{value:u.value.config.legendlocation,"onUpdate:value":T[6]||(T[6]=k=>u.value.config.legendlocation=k),options:[{label:"顶部",value:"top"},{label:"底部",value:"bottom"}],class:"flex-1"},null,8,["value"])])],64)):m.createCommentVNode("",!0),m.createVNode(Wo,{type:"primary",onClick:b,size:"small",class:"w-full"},{default:m.withCtx(()=>[...T[14]||(T[14]=[m.createTextVNode("预览",-1)])]),_:1})])],512),[[m.vShow,a.value==="type"]]),a.value==="data"?(m.openBlock(),m.createElementBlock("div",j5e,[m.createVNode(P5e,{type:u.value.config.seriesType,data:u.value.data,onUpdateData:v},null,8,["type","data"])])):m.createCommentVNode("",!0),m.createElementVNode("div",q5e,[m.createVNode(Wo,{onClick:T[7]||(T[7]=k=>i.value=!1)},{default:m.withCtx(()=>[...T[15]||(T[15]=[m.createTextVNode("取消",-1)])]),_:1}),m.createVNode(Wo,{type:"primary",onClick:_},{default:m.withCtx(()=>[...T[16]||(T[16]=[m.createTextVNode("确定",-1)])]),_:1})])]),_:1},8,["visible"])],64))}}),Yz=m.defineComponent({__name:"text-outdent",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"indent-left",text:"减少缩进",shortcut:"Shift+Tab","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().outdent().run())}))}}),Kp=m.defineComponent({__name:"align-center",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("center").run()&&e.value.chain().focus().setTextAlign("center").run(),e.value?.can().chain().focus().setNodeAlign("center").run()&&e.value.chain().focus().setNodeAlign("center").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-center",shortcut:"Ctrl+Shift+E",text:"居中对齐","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"center"})||m.unref(e)?.isActive({nodeAlign:"center"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("center").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("center").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),Yp=m.defineComponent({__name:"align-right",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("right").run()&&e.value.chain().focus().setTextAlign("right").run(),e.value?.can().chain().focus().setNodeAlign("flex-end").run()&&e.value.chain().focus().setNodeAlign("flex-end").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-right",text:"右对齐",shortcut:"Ctrl+Shift+R","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"right"})||m.unref(e)?.isActive({nodeAlign:"flex-end"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("right").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("flex-end").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),Xp=m.defineComponent({__name:"align-left",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("left").run()&&e.value.chain().focus().setTextAlign("left").run(),console.log(e.value?.can().chain().focus().setNodeAlign("flex-start").run(),"22222"),e.value?.can().chain().focus().setNodeAlign("flex-start").run()&&e.value.chain().focus().setNodeAlign("flex-start").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-left",text:"左对齐",shortcut:"Ctrl+Shift+L","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"left"})||m.unref(e)?.isActive({nodeAlign:"flex-start"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("left").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("left").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),K5e=m.defineComponent({__name:"align-justify",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"align-justify",text:"两端对齐",shortcut:"Ctrl+Shift+J","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"justify"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("justify").run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setTextAlign("justify").run())},null,8,["menu-active","disabled"]))}}),Y5e=m.defineComponent({__name:"align-distributed",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"align-distributed",text:"分散对齐",shortcut:"Ctrl+Shift+D","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"distributed"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("distributed").run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setTextAlign("distributed").run())},null,8,["menu-active","disabled"]))}}),X5e=m.defineComponent({__name:"size-increase",setup(n){const e=m.inject("editor"),t=i=>{e.value?.chain().focus().setFontSize(i).run()},r=()=>{const{fontSize:i}=e.value?.getAttributes("textStyle")??{};if(i){const a=Fm.find(({value:s})=>s===i);if(!a)return;const o=Fm.find(({order:s})=>s===a.order+1);o&&t(o.value)}else t("16px")};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"size-increase",text:"增大字体","hide-text":"",onMenuClick:r}))}}),Z5e=m.defineComponent({__name:"size-decrease",setup(n){const e=m.inject("editor"),t=i=>{e.value?.chain().focus().setFontSize(i).run()},r=()=>{const{fontSize:i}=e.value?.getAttributes("textStyle")??{};if(i){const a=Fm.find(({value:s})=>s===i);if(console.log(i,a),!a)return;const o=Fm.find(({order:s})=>s===a.order-1);o&&t(o.value)}else t("14px")};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"size-decrease",text:"减小字体","hide-text":"",onMenuClick:r}))}}),J5e={class:"p-[5px] bg-[#f3f4f6] rounded-[5px]"},Q5e={class:"w-[240px] h-[50px] white-no-scrollbar overflow-x-auto"},eBe=["onClick"],tBe={class:"font-[500]"},nBe={class:"text-[12px] text-[#737373]"},rBe=m.defineComponent({__name:"heading",setup(n){const e=m.inject("editor"),t=m.computed(()=>{const i=a=>e.value?.isActive("heading",{level:a});if(e.value){if(e.value?.isActive("paragraph"))return"paragraph";if(i(1))return"1";if(i(2))return"2";if(i(3))return"3";if(i(4))return"4";if(i(5))return"5";if(i(6))return"6"}return""}),r=i=>{e.value?.isEditable!==!1&&(i==="paragraph"?e.value?.chain().focus().setParagraph().run():e.value?.chain().focus().toggleHeading({level:Number(i)}).run())};return(i,a)=>(m.openBlock(),m.createElementBlock("div",J5e,[m.createElementVNode("div",Q5e,[m.createElementVNode("div",{class:m.normalizeClass(["flex items-center w-max h-full",{"opacity-50 cursor-not-allowed":m.unref(e)?.isEditable===!1}])},[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(JM),o=>(m.openBlock(),m.createElementBlock("div",{key:o.value,class:m.normalizeClass(["w-[80px] h-full flex flex-col gap-[2px] items-center justify-center cursor-pointer flex-shrink-0 rounded-[5px]",{"bg-[#fff]":t.value===o.value,"cursor-not-allowed":m.unref(e)?.isEditable===!1}]),onClick:s=>r(o.value)},[m.createElementVNode("div",tBe,m.toDisplayString(o.label),1),m.createElementVNode("div",nBe,m.toDisplayString(o.element==="p"?"段落":o.element),1)],10,eBe))),128))],2)])]))}}),iBe={class:"text-[14px]"},iu=m.defineComponent({__name:"MenusCheck",props:{ico:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},setup(n){const e=m.useAttrs(),t=(...r)=>{e.onMenuClickThrough?e.onMenuClickThrough(...r):e.onMenuClick&&e.onMenuClick(...r)};return(r,i)=>(m.openBlock(),m.createElementBlock("div",m.mergeProps({class:"w-check-item w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center gap-2 cursor-pointer"},m.unref(e),{onClick:t}),[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`])},null,2),m.createElementVNode("div",iBe,m.toDisplayString(n.text),1)],16))}}),aBe=m.defineComponent({__name:"image",props:{hideText:{type:Boolean,default:!0},isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap"),r=i=>{e.value?.chain().focus().selectFiles(i,t.value).run()};return(i,a)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"image",text:"图片",onMenuClick:a[1]||(a[1]=o=>r("image"))})):(m.openBlock(),m.createBlock(An,{key:0,ico:"image",text:"插入图片","hide-text":n.hideText,onMenuClick:a[0]||(a[0]=o=>r("image"))},null,8,["hide-text"]))}}),oBe=m.defineComponent({__name:"audio",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"audio",text:"音频",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("audio",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"audio",text:"插入音频","hide-text":"",onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("audio",m.unref(t)).run())}))}}),sBe=m.defineComponent({__name:"video",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"video",text:"视频",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("video",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"video",text:"插入视频","hide-text":"",onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("video",m.unref(t)).run())}))}}),lBe=m.defineComponent({__name:"tag",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor");return(t,r)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"tag",text:"标签",onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().insertTag().run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"tag",text:"插入标签","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().insertTag().run())}))}}),uBe=m.defineComponent({__name:"file",props:{hideText:{type:Boolean,default:!0},isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"add-file",text:"文件",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("file",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"add-file",text:"插入文件","hide-text":n.hideText,onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("file",m.unref(t)).run())},null,8,["hide-text"]))}}),cBe=m.defineComponent({__name:"data-time",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=i=>zue(Que(),i).value,t=m.inject("editor"),r=({content:i,format:a,capitalize:o,value:s})=>{i&&t.value?.chain().insertDatetime({text:i.includes("自定义")?`[${i}]`:i,date:e(a),withTime:s==="withTime",format:a,capitalize:o}).focus().run()};return(i,a)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"date",text:"日期",onMenuClick:a[1]||(a[1]=o=>r({content:e("YYYY年M月D日"),format:"YYYY-MM-DD HH:mm:ss",capitalize:!0,value:"withTime"}))})):(m.openBlock(),m.createBlock(An,{key:0,ico:"date",text:"插入日期",shortcut:"Ctrl+B","hide-text":"",onMenuClick:a[0]||(a[0]=o=>r({content:e("YYYY年M月D日"),format:"YYYY-MM-DD HH:mm:ss",capitalize:!0,value:"withTime"}))}))}}),fBe=m.defineComponent({__name:"divider",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor");return(t,r)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"divider",text:"分隔线",onMenuClick:r[1]||(r[1]=i=>m.unref(e).chain().focus().setHr({type:"signle",color:"#000"}).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"divider",text:"分隔线","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e).chain().focus().setHr({type:"signle",color:"#000"}).run())}))}}),dBe={class:"w-[310px] max-h-[400px] overflow-auto white-no-scrollbar"},hBe={class:"flex flex-wrap gap-[0.5rem]"},pBe=["onClick"],vBe=m.defineComponent({__name:"emoji-content",emits:["select"],setup(n,{emit:e}){const t=e,r=i=>{t("select",i)};return(i,a)=>(m.openBlock(),m.createElementBlock("div",dBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(n5e),(o,s)=>(m.openBlock(),m.createElementBlock(m.Fragment,{key:s},[m.createElementVNode("div",{class:m.normalizeClass(["text-[12px] text-[#666] mb-[10px]",s!==0?"mt-[10px]":""])},m.toDisplayString(o.label),3),m.createElementVNode("div",hBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(o.items.split(" "),(l,u)=>(m.openBlock(),m.createElementBlock("div",{key:u,class:"text-[25px] w-[32px] h-[32px] rounded-[4px] cursor-pointer flex items-center justify-center hover:bg-[#f1f2f2]",onClick:c=>r(l)},m.toDisplayString(l),9,pBe))),128))])],64))),128))]))}}),gBe=m.defineComponent({__name:"emoji",props:{hideText:{type:Boolean,default:!0},onSelectEmoji:{type:Function,default:void 0}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=a=>{e.onSelectEmoji?e.onSelectEmoji(a):t.value?.chain().focus().insertContent(a).run(),r.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"emoji",icoSize:16,text:"插入表情","hide-text":n.hideText,"popup-visible":r.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>r.value=s),"popup-type":"select",placement:"right",trigger:"mouseenter"},{content:m.withCtx(()=>[m.createVNode(vBe,{onSelect:i})]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center justify-between cursor-pointer",{"bg-[#edeef2]":r.value}])},[...o[1]||(o[1]=[m.createElementVNode("span",{class:"inline-flex items-center gap-2"},[m.createElementVNode("i",{class:"w-iconfont icon-emoji"}),m.createElementVNode("span",{class:"text-[14px]"},"表情")],-1),m.createElementVNode("i",{class:"w-iconfont icon-right !text-[10px]"},null,-1)])],2)]),_:1},8,["hide-text","popup-visible"]))}}),mBe={class:"w-full text-center pb-2"},yBe={class:"w-[175px] h-[80px] flex items-center gap-[6px]"},bBe=["onMouseenter","onClick"],xBe=m.defineComponent({__name:"columns",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref([1,2,3,4,5]),i=m.ref(0),a=s=>{i.value=s},o=s=>{e.value?.chain().focus().setColumns(s,!0).run(),e.value?.chain().focus().updateAttributes("columnBlock",{columnSize:s}).run(),t.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"column",icoSize:16,text:"插入分栏","hide-text":"","popup-visible":t.value,"onUpdate:popupVisible":l[0]||(l[0]=u=>t.value=u),"popup-type":"select",placement:"right",trigger:"mouseenter"},{content:m.withCtx(()=>[m.createElementVNode("div",mBe,m.toDisplayString(i.value)+" 分栏",1),m.createElementVNode("div",yBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.value,u=>(m.openBlock(),m.createElementBlock("div",{key:u,class:m.normalizeClass(["w-[30px] h-full bg-[rgba(23,26,29,0.06)] rounded-[4px] cursor-pointer flex-shrink-0",{"!bg-[#007bff]":i.value>=u}]),onMouseenter:c=>a(u),onClick:c=>o(u)},null,42,bBe))),128))])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center justify-between cursor-pointer",{"bg-[#edeef2]":t.value}])},[...l[1]||(l[1]=[m.createElementVNode("span",{class:"inline-flex items-center gap-2"},[m.createElementVNode("i",{class:"w-iconfont icon-column"}),m.createTextVNode(),m.createElementVNode("span",{class:"text-[14px]"},"分栏")],-1),m.createElementVNode("i",{class:"w-iconfont icon-right !text-[10px]"},null,-1)])],2)]),_:1},8,["popup-visible"]))}}),_Be=m.defineComponent({__name:"code-block",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(iu,{ico:"code",text:"代码块",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setCodeBlock().run())}))}}),SBe=m.defineComponent({__name:"web-page",setup(n){const e=m.inject("editor"),t=()=>{e.value?.chain().focus().setParagraph().run(),e.value?.chain().focus().setIframe({type:"",src:""}).run()};return(r,i)=>(m.openBlock(),m.createBlock(iu,{ico:"web-page",text:"网页",onMenuClick:i[0]||(i[0]=a=>t())}))}}),wBe=["disabled"],kBe={class:"w-[110px]"},Xz=m.defineComponent({__name:"insert-menu",props:{hideText:{type:Boolean,default:!1}},setup(n){const e=m.ref(!1),t=m.inject("editor");return(r,i)=>{const a=m.resolveDirective("tooltip");return m.openBlock(),m.createBlock(il,{ico:"add-circle",icoSize:16,text:"插入元素","hide-text":n.hideText,"popup-visible":e.value,"onUpdate:popupVisible":i[0]||(i[0]=o=>e.value=o),"popup-type":"select"},{content:m.withCtx(()=>[m.createElementVNode("div",kBe,[m.createVNode(aBe,{isInset:!0}),m.createVNode(oBe,{isInset:!0}),m.createVNode(sBe,{isInset:!0}),m.createVNode(uBe,{isInset:!0}),m.createVNode(lBe,{isInset:!0}),m.createVNode(cBe,{isInset:!0}),m.createVNode(fBe,{isInset:!0}),m.createVNode(gBe),m.createVNode(xBe),m.createVNode(_Be),m.createVNode(SBe)])]),default:m.withCtx(()=>[n.hideText?m.withDirectives((m.openBlock(),m.createElementBlock("button",{key:0,disabled:m.unref(t)?.isEditable===!1,class:m.normalizeClass(["white-editor-tool-item flex items-center justify-center gap-[6px] px-[7px]",{"is-disabled":m.unref(t)?.isEditable===!1}])},[...i[1]||(i[1]=[m.createElementVNode("i",{class:"w-iconfont icon-add-circle"},null,-1),m.createElementVNode("span",{class:"text-[14px]"},"插入",-1)])],10,wBe)),[[a,"插入元素"]]):m.createCommentVNode("",!0)]),_:1},8,["hide-text","popup-visible"])}}}),Zz=m.defineComponent({__name:"task-list",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"task-list",text:"任务列表",shortcut:"Ctrl+Shift+9","hide-text":"","menu-active":m.unref(e)?.isActive("taskList"),disabled:!m.unref(e)?.can().chain().focus().toggleTaskList().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleTaskList().run())},null,8,["menu-active","disabled"]))}}),TBe={class:"flex w-full h-full"},CBe={key:0,class:"inline-flex items-center mx-auto"},EBe={class:"pr-[20px] flex-shrink-0"},MBe={class:"space-y-[6px] px-[20px] border-r border-l"},ABe={class:"space-x-[5px] flex"},NBe={class:"space-x-[5px] flex"},DBe={class:"space-y-[6px] px-[20px] border-r"},OBe={class:"space-x-[8px] flex"},IBe={class:"space-x-[5px] flex"},RBe={class:"space-y-[6px] px-[20px] border-r"},LBe={class:"space-x-[5px] flex"},PBe={class:"space-x-[5px] flex"},BBe={class:"px-[20px] border-r"},VBe={class:"space-x-[6px] pl-[20px] flex"},zBe={key:1,class:"inline-flex items-center gap-[10px] mx-auto"},FBe={class:"px-4 inline-flex items-center"},$Be=m.defineComponent({__name:"index",setup(n){const e=m.inject("page");return(t,r)=>(m.openBlock(),m.createElementBlock("div",TBe,[m.createVNode(kPe,{ref:"scrollableRef",class:"flex-1 h-full p-[10px]"},{default:m.withCtx(()=>[m.unref(e).toolbar==="double"?(m.openBlock(),m.createElementBlock("div",CBe,[m.createElementVNode("div",EBe,[m.createVNode(Xz)]),m.createElementVNode("div",MBe,[m.createElementVNode("div",ABe,[m.createVNode(Vz),m.createVNode(zz)]),m.createElementVNode("div",NBe,[m.createVNode(Fz),m.createVNode($z)])]),m.createElementVNode("div",DBe,[m.createElementVNode("div",OBe,[m.createVNode(jz),m.createVNode(Wz),m.createVNode(X5e),m.createVNode(Z5e)]),m.createElementVNode("div",IBe,[m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(Rz),m.createVNode(Iz),m.createVNode(Tz),m.createVNode(Cz)])]),m.createElementVNode("div",RBe,[m.createElementVNode("div",LBe,[m.createVNode(Nz),m.createVNode(Dz),m.createVNode(Oz),m.createVNode(Yz),m.createVNode(Bz),m.createVNode(Zz)]),m.createElementVNode("div",PBe,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(K5e),m.createVNode(Y5e),m.createVNode(Lz),m.createVNode(Pz),m.createVNode(Hz)])]),m.createElementVNode("div",BBe,[m.createVNode(rBe)]),m.createElementVNode("div",VBe,[m.createVNode(Gz,{hideText:!1}),m.createVNode(QM,{hideText:!1}),m.createVNode(Uz,{hideText:!1})])])):(m.openBlock(),m.createElementBlock("div",zBe,[m.createVNode(Xz,{hideText:!0}),m.createVNode(Vz),m.createVNode(zz),m.createVNode(Fz),m.createVNode($z),m.createVNode(O5e),m.createVNode(jz),m.createVNode(Wz),m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(Tz),m.createVNode(Cz),m.createVNode(Nz),m.createVNode(Dz),m.createVNode(Zz),m.createVNode(Oz),m.createVNode(Yz),m.createVNode(XY),m.createVNode(Bz),m.createVNode(Rz),m.createVNode(Iz),m.createVNode(Hz),m.createVNode(Lz),m.createVNode(Pz),m.createVNode(QM),m.createVNode(Gz),m.createVNode(Uz)]))]),_:1},512),m.createElementVNode("div",FBe,[m.createVNode(CPe)])]))}}),HBe={class:"h-full flex items-center gap-[0.8rem]"},GBe={key:0,class:"min-w-[100px] flex items-center gap-[0.4rem] rounded hover:text-[#007aff] px-[0.4rem] py-[0.3rem] cursor-pointer select-none"},UBe=["onClick"],WBe={class:"text-[14px] font-[500]"},jBe={key:0,class:"text-[12px] ml-[0.4rem]"},qBe={key:0,class:"min-w-[100px] flex items-center gap-[0.4rem] rounded hover:text-[#007aff] px-[0.4rem] py-[0.3rem] cursor-pointer select-none"},KBe={class:"flex-1 text-center text-[14px]"},YBe={class:"w-[150px] flex flex-col gap-[0.8rem] text-[14px] px-[0.6rem]"},XBe={class:"flex justify-between"},ZBe={class:"flex justify-between"},JBe={class:"flex justify-between"},QBe={class:"flex justify-between"},e8e=m.defineComponent({__name:"FootLeft",setup(n){const e=m.ref(!1),t=m.ref(!1),r=m.inject("page"),i=m.inject("editor"),a=m.inject("options"),o=m.ref({characters:0,paragraphs:0,words:i.value.storage.characterCount?.words()||0,images:0,headings:0}),s=m.computed(()=>r.value.layout==="web"?"网页":r.value.size.key),l=c=>{if(r.value.layout=c.layout,c.layout&&c.layout==="web"){t.value=!1;return}const{label:f,width:d,height:h}=c;r.value.size={key:f,width:d,height:h},t.value=!1},u=()=>{if(!i.value)return;const{doc:c}=i.value.state;let f=0,d=0,h=0;c.descendants(v=>{v.type.name==="paragraph"&&f++,v.type.name==="image"&&d++,v.type.name==="heading"&&h++});const p=i.value.storage.characterCount?.characters()||0;o.value={characters:p,paragraphs:f,words:i.value.storage.characterCount?.words()||0,images:d,headings:h}};return m.watch(()=>i.value,(c,f)=>{f&&f.off("update",u),c&&(c.on("update",u),u())},{immediate:!0}),m.onBeforeUnmount(()=>{i.value&&i.value.off("update",u)}),(c,f)=>{const d=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock("div",HBe,[m.unref(a).layout.toc.show?m.withDirectives((m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["cursor-pointer hover:bg-[#e8e8e8] p-[0.3rem] rounded",{"bg-[#e8e8e8]":m.unref(r).showToc}]),onClick:f[0]||(f[0]=h=>m.unref(r).showToc=!m.unref(r).showToc)},[...f[3]||(f[3]=[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},[m.createElementVNode("path",{d:"M369.0496 460.3392H184.32a81.92 81.92 0 0 1-81.92-81.92v-184.832a81.92 81.92 0 0 1 81.92-81.92h184.7296a81.92 81.92 0 0 1 81.92 81.92v184.832a81.92 81.92 0 0 1-81.92 81.92zM184.32 173.1072a20.48 20.48 0 0 0-20.48 20.48v184.832a20.48 20.48 0 0 0 20.48 20.48h184.7296a20.48 20.48 0 0 0 20.48-20.48v-184.832a20.48 20.48 0 0 0-20.48-20.48zM369.0496 914.688H184.32a81.92 81.92 0 0 1-81.92-81.92v-184.8832a81.92 81.92 0 0 1 81.92-81.92h184.7296a81.92 81.92 0 0 1 81.92 81.92v184.8832a81.92 81.92 0 0 1-81.92 81.92zM184.32 627.4048a20.48 20.48 0 0 0-20.48 20.48v184.8832a20.48 20.48 0 0 0 20.48 20.48h184.7296a20.48 20.48 0 0 0 20.48-20.48v-184.8832a20.48 20.48 0 0 0-20.48-20.48zM827.904 914.688h-184.8832a81.92 81.92 0 0 1-81.92-81.92v-184.8832a81.92 81.92 0 0 1 81.92-81.92h184.8832a81.92 81.92 0 0 1 81.92 81.92v184.8832a81.92 81.92 0 0 1-81.92 81.92z m-184.8832-287.2832a20.48 20.48 0 0 0-20.48 20.48v184.8832a20.48 20.48 0 0 0 20.48 20.48h184.8832a20.48 20.48 0 0 0 20.48-20.48v-184.8832a20.48 20.48 0 0 0-20.48-20.48z",fill:"#474A54","p-id":"15222"}),m.createElementVNode("path",{d:"M527.230586 280.884442m36.203867-36.203867l130.732164-130.732164q36.203867-36.203867 72.407735 0l130.732164 130.732164q36.203867 36.203867 0 72.407735l-130.732164 130.732164q-36.203867 36.203867-72.407735 0l-130.732164-130.732164q-36.203867-36.203867 0-72.407735Z",fill:"#FDA338","p-id":"15223"}),m.createElementVNode("path",{d:"M730.3168 493.4656a81.92 81.92 0 0 1-57.9072-23.9104L541.696 338.7904a81.92 81.92 0 0 1 0-115.8144L672.4096 92.16A81.92 81.92 0 0 1 788.48 92.16l130.7648 130.7136a81.92 81.92 0 0 1 0 115.8144L788.48 469.5552a81.92 81.92 0 0 1-58.1632 23.9104z m0-363.52a20.48 20.48 0 0 0-14.4896 5.9904L585.1136 266.24a20.48 20.48 0 0 0 0 28.9792l130.7136 130.7136a20.48 20.48 0 0 0 28.9792 0L875.52 295.3728a20.48 20.48 0 0 0 0-29.1328l-130.7136-130.56a20.48 20.48 0 0 0-14.4896-5.9904z",fill:"#474A54","p-id":"15224"})],-1)])],2)),[[d,m.unref(r).showToc?"关闭大纲":"打开大纲"]]):m.createCommentVNode("",!0),m.createVNode(js,{trigger:"click",placement:"top",value:t.value,"onUpdate:value":f[1]||(f[1]=h=>t.value=h),contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(t5e),(h,p)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["px-[12px] py-[7px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",s.value===h.label?"text-[#007aff]":""]),key:p,onClick:v=>l(h)},[m.createElementVNode("span",WBe,m.toDisplayString(h.label),1),h.width?(m.openBlock(),m.createElementBlock("span",jBe,m.toDisplayString(h.width)+" * "+m.toDisplayString(h.height)+"cm ",1)):m.createCommentVNode("",!0)],10,UBe))),128))]),default:m.withCtx(()=>[m.unref(a).layout.foot.pageSize?(m.openBlock(),m.createElementBlock("div",GBe,[f[4]||(f[4]=m.createElementVNode("span",{class:"flex-1 text-center text-[14px]"},"页面大小",-1)),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",t.value?"rotate-180":""])},null,2)])):m.createCommentVNode("",!0)]),_:1},8,["value"]),m.createVNode(js,{trigger:"click",value:e.value,"onUpdate:value":f[2]||(f[2]=h=>e.value=h),placement:"top"},{content:m.withCtx(()=>[m.createElementVNode("div",YBe,[m.createElementVNode("div",XBe,[f[5]||(f[5]=m.createElementVNode("span",{class:"w-[80px]"},"字符数:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.characters),1)]),m.createElementVNode("div",ZBe,[f[6]||(f[6]=m.createElementVNode("span",{class:"w-[80px]"},"段落:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.paragraphs),1)]),m.createElementVNode("div",JBe,[f[7]||(f[7]=m.createElementVNode("span",{class:"w-[80px]"},"图片:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.images),1)]),m.createElementVNode("div",QBe,[f[8]||(f[8]=m.createElementVNode("span",{class:"w-[80px]"},"标题:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.headings),1)])])]),default:m.withCtx(()=>[m.unref(a).layout.foot.character?(m.openBlock(),m.createElementBlock("div",qBe,[m.createElementVNode("span",KBe,m.toDisplayString(o.value.characters)+" 字符",1),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",e.value?"rotate-180":""])},null,2)])):m.createCommentVNode("",!0)]),_:1},8,["value"])])}}});var V1={exports:{}},t8e=V1.exports,Jz;function n8e(){return Jz||(Jz=1,(function(n,e){(function(t,r){r()})(t8e,function(){function t(u,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,f){var d=new XMLHttpRequest;d.open("GET",u),d.responseType="blob",d.onload=function(){l(d.response,c,f)},d.onerror=function(){console.error("could not download file")},d.send()}function i(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function a(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dy=="object"&&Dy.global===Dy?Dy:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,f){var d=o.URL||o.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?a(h):i(h.href)?r(u,c,f):a(h,h.target="_blank")):(h.href=d.createObjectURL(u),setTimeout(function(){d.revokeObjectURL(h.href)},4e4),setTimeout(function(){a(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,f){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(t(u,f),c);else if(i(u))r(u,c,f);else{var d=document.createElement("a");d.href=u,d.target="_blank",setTimeout(function(){a(d)})}}:function(u,c,f,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,f);var h=u.type==="application/octet-stream",p=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||h&&p||s)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var _=g.result;_=v?_:_.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=_:location=_,d=null},g.readAsDataURL(u)}else{var y=o.URL||o.webkitURL,b=y.createObjectURL(u);d?d.location=b:location.href=b,d=null,setTimeout(function(){y.revokeObjectURL(b)},4e4)}});o.saveAs=l.saveAs=l,n.exports=l})})(V1)),V1.exports}var r8e=n8e();const i8e=()=>{const n=document.createElement("iframe");return n.style.width="0",n.style.height="0",n.style.position="absolute",n.style.right="0",n.style.top="0",n.style.border="0",document.body.appendChild(n),n},a8e=async(n,e)=>{const t=i8e(),r=t.contentWindow;if(!t.contentDocument||!r)return;t.contentDocument.write(n),t.contentDocument.close();const i=()=>{console.log("handleLoadIframe"),r.focus(),r.print()},a=()=>{t.removeEventListener("load",i),r.removeEventListener("afterprint",a),document.body.removeChild(t),e()};t.addEventListener("load",i),r.addEventListener("afterprint",a)},o8e=m.defineComponent({__name:"print",setup(n){const e=m.inject("options"),t=m.inject("container"),r=m.inject("page"),i=m.computed(()=>e.value?.dicts?.lineHeights?.find(c=>c.default)?.value??1.7),a=()=>{const c=document.querySelector(`#${t.value} .white-editor-container`)?.outerHTML??"";return s(c)},o=()=>Array.from(document.querySelectorAll("link, style")).map(c=>c.outerHTML).join(""),s=c=>{const f=document.createElement("div");f.innerHTML=c;const d=f.querySelectorAll(".white-chart-node");for(const h of d){const p=dW(h);if(p){const v=p.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),g=document.createElement("img");g.src=v,g.style.width="100%",h?.parentNode?.replaceChild(g,h)}}return f.innerHTML},l=()=>{const{size:c,margin:f}=r.value;return`
|
|
313
|
+
<path d="M14 27v6H8v-6h6zm0-9v6H8v-6h6zm0-9v6H8V9h6z"></path>`}],t5e=[{label:"表情与角色",items:"😀 😃 😄 😁 😆 😅 🤣 😂 🙂 🙃 😉 😊 😇 🥰 😍 🤩 😘 😗 😚 😙 😋 😛 😜 🤪 😝 🤑 🤗 🤭 🤫 🤔 🤐 🤨 😐 😑 😶 😶 😏 😒 🙄 😬 😮 🤥 😌 😔 😪 🤤 😴 😷 🤒 🤕 🤢 🤮 🤧 🥵 🥶 🥴 😵 😵💫 🤯 🤠 🥳 😎 🤓 🧐 😕 😟 🙁 ☹️ 😮 😯 😲 😳 🥺 😦 😧 😨 😰 😥 😢 😭 😱 😖 😣 😞 😓 😩 😫 🥱 😤 😡 😠 🤬 😈 👿 💀 ☠️ 💩 🤡 👹 👺 👻 👽 👾 🤖 👋 🤚 🖐️ ✋ 🖖 👌 🤏 ✌️ 🤞 🤟 🤘 🤙 👈 👉 👆 🖕 👇 ☝️ 👍 👎 ✊ 👊 🤛 🤜 👏 🙌 👐 🤲 🤝 🙏 ✍️ 💅 🤳 💪 🦾 🦿 🦵 🦶 👂 🦻"},{label:"动物与自然",items:"🐵 🐒 🦍 🦧 🐶 🐕 🦮 🐕🦺 🐩 🐺 🦊 🦝 🐱 🐈 🐈⬛ 🦁 🐯 🐅 🐆 🐴 🐎 🦄 🦓 🦌 🐮 🐂 🐃 🐄 🐷 🐖 🐗 🐽 🐏 🐑 🐐 🐪 🐫 🦙 🦒 🐘 🦏 🦛 🐭 🐁 🐀 🐹 🐰 🐇 🐿️ 🦔 🦇 🐻 🐻❄️ 🐨 🐼 🦥 🦦 🦨 🦘 🦡 🐾 🦃 🐔 🐓 🐣 🐤 🐥 🐦 🐧 🕊️ 🦅 🦆 🦢 🦉 🦩 🦚 🦜 🐸 🐊 🐢 🦎 🐍 🐲 🐉 🦕 🦖 🐳 🐋 🐬 🦭 🐟 🐠 🐡 🦈 🐙 🐚 🐌 🦋 🐛 🐜 🐝 🐞 🦗 🕷️ 🕸️ 🦂 🦟 🦠 💐 🌸 💮 🏵️ 🌹 🥀 🌺 🌻 🌼 🌷 🌱 🌲 🌳 🌴 🌵 🌾 🌿 ☘️ 🍀 🍁 🍂 🍃 🌒 🌓 🌔 🌕 🌖 🌗 🌘 🌙 🌚 🌛 🌜 ☀️ 🌝 🌞 🪐 🌟 🌠 🌌 ☁️ ⛅ ⛈️ 🌤️ 🌥️ 🌦️ 🌧️ 🌨️ 🌩️ 🌪️ 🌫️ 🌬️ 🌀 🌈 🌂 ☂️ ☔ ⛱️ ⚡ ❄️ ☃️ ⛄ ☄️ 🔥 💧 🌊"},{label:"食物与食品",items:"🍇 🍉 🍊 🍋 🍌 🍍 🥭 🍎 🍏 🍐 🍑 🍒 🍓 🥝 🍅 🥥 🥑 🍆 🥔 🥕 🌽 🌶️ 🥬 🥦 🧄 🧅 🍄 🥜 🌰 🍞 🥐 🥖 🥨 🥯 🥞 🧇 🧀 🍖 🍗 🥩 🥓 🍔 🍟 🍕 🌭 🥪 🌮 🌯 🥙 🧆 🥚 🍳 🥘 🍲 🥣 🥗 🍿 🧈 🧂 🥫 🍱 🍘 🍙 🍚 🍛 🍜 🍝 🍠 🍢 🍣 🍤 🍥 🥮 🍡 🥟 🥠 🥡 🦀 🦞 🦐 🦑 🦪 🍦 🍧 🍨 🍩 🍪 🎂 🍰 🧁 🥧 🍫 🍬 🍭 🍮 🍯 🍼 🥛 ☕ 🍵 🍶 🍾 🍷 🍸 🍹 🍺 🍻 🥂 🥃 🥤 🧃 🧉 🧊 🥢 🍽️ 🍴 🥄 🔪 🏺"},{label:"活动",items:"🧧 🎁 🎄 🧨 ✨ 🎈 🎉 🏮 🎗️ 🎟️ 🎫 🎖️ 🏆 🏅 🥇 🥈 🥉 ⚽ ⚾ 🥎 🏀 🏐 🏈 🏉 🎾 🥏 🎳 🏏 🏑 🏒 🥍 🏓 🏸 🥊 🥋 🥅 ⛳ ⛸️ 🎣 🤿 🎽 🎿 🛷 🥌 🎯 🪀 🪁 🎱 🔮 🧿 🎮 🕹️ 🎰 🎲 🧩 🧸 ♟️ 🃏 🀄 🎴 🎭 🖼️ 🎨 🧵 🧶"},{label:"旅行与景点",items:"🚈 🚉 🚊 🚝 🚞 🚋 🚌 🚍 🚎 🚐 🚑 🚒 🚓 🚔 🚕 🚖 🚗 🚘 🚙 🚚 🚛 🚜 🏎️ 🏍️ 🛵 🦽 🦼 🛺 🚲 🛴 🛹 🚏 🛣️ 🛤️ 🛢️ ⛽ 🚨 🚥 🚦 🛑 🚧 ⚓ ⛵ 🛶 🚤 🛳️ ⛴️ 🛥️ 🚢 ✈️ 🛩️ 🛫 🛬 🪂 💺 🚁 🚟 🚠 🚡 🛰️ 🚀 🛸 🛎️ 🧳 🧭 ⌚ ⏰ ⏱️ ⏲️ 🕰️ 🕛 🕧 🕐 🕜 🕑 🕝 🕒 🕞 🕓 🕟 🕔 🕠 🕕 🕡 🕖 🕢 🕗 🕣 🕘 🕤 🕙 🕥 🕚 🕦"},{label:"物品",items:"📔 📕 📖 📗 📘 📙 📚 📒 📃 📜 📄 📰 🗞️ 📑 🔖 🏷️ 💰 🔍 🔎 💴 💵 💶 💷 💸 💳 🧾 💹 ✉️ 📧 📨 📩 📤 📥 📦 📫 📪 📬 📭 📮 🗳️ ✏️ ✒️ 🖋️ 🖊️ 🖌️ 🖍️ 📝 💼 📁 📂 🗂️ 📅 📆 🗒️ 🗓️ 📇 📈 📉 📊 📋 📌 📍 📎 🖇️ 📏 📐 ✂️ 🗃️ 🗄️ 🗑️ 🔒 🔓 🔏 🔐 🔑 🗝️ 🔨 🪓 ⛏️ ⚒️ 🛠️ 🗡️ ⚔️ 🔫 🏹 🛡️ 🔧 🔩 ⚙️ 🗜️ ⚖️ 🦯 🔗 ⛓️ 🧰 🧲 ⚗️ 🧪 🧫 🧬 🔬 🔭 📡 💉 🩸 💊 🩹 🩺 🚪 🛏️ 🛋️ 🪑 🚽 🚿 🛁 🪒 🧴 🧷 🧹 🧺 🧻 🧼 🧽 🧯 🛒 🚬 ⚰️ ⚱️ 💎 🔇 🔈 🔉 🔊 🔔 🔕 🔋 🔌 💻 🖥️ 🖨️ ⌨️ 🖱️ 🖲️ 📷 🧱"},{label:"符号",items:"💡 ✅ ☑️ ✔️ ❌ ❎ ❓ ❗ ❔ ❕ ⌛ ⏳ 💰 🆒 🆕 🆖 🅾️ 🆗 🆘 🈲 🉑 🈸 ⛔ 🚫 📵 ✳️ ✴️ ❇️ 🔟 🔠 🔡 🔢 🔣 🔤 🅰️ 🆎 🅱️ 🆑 🆒 🆓 ℹ️ 🆔 🆕 🆖 🅾️ 🆗 🅿️ 🆘 🆙 🆚 🈁 🈂️ 🔴 🟠 🟡 🟢 🔵 🟣 🟤 ⚫ ⚪ 🟥 🟧 🟨 🟩 🟦 🟪 🟫 🔶 🔷 🔸 🔹 🔺 🔻 💠 🔘 🔳 🔲 💌 💘 💝 💖 💗 💓 💞 💕 💟 ❣️ 💔 🤍 💯 💢 💥 💬 💤 ➰ ➿ 🔅 📴 ➡️ 🔃 🔄 🔙 🔚 🔛 🔝 🔀 🔁 🔂"}],qv=[{label:"网页",value:"web",icon:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M867.62382187 81.79484409c53.52106667 0 96.93866667 43.37208853 96.93866666 96.89315627v664.0071104a102.4 102.4 0 0 1-102.4 102.4H161.83751147a102.4 102.4 0 0 1-102.4-102.4V178.64248889c0-53.52106667 43.37208853-96.93866667 96.8931552-96.93866667z m28.6264896 319.2604448H127.74968853v441.59431147c0 17.29422187 12.83413333 31.58471147 29.4912 33.8147552l4.64213334 0.31857813h700.23395626a34.13333333 34.13333333 0 0 0 34.13333334-34.13333333V401.05528889z m-34.13333334-250.99377813H161.88302187a34.13333333 34.13333333 0 0 0-34.13333334 34.13333333V332.74311076h768.50062294V184.19484409a34.13333333 34.13333333 0 0 0-34.13333334-34.13333333zM216.9059552 195.93671076a45.51111147 45.51111147 0 1 1 0 91.02222293 45.51111147 45.51111147 0 0 1 0-91.02222293z m136.53333333 0a45.51111147 45.51111147 0 1 1 0 91.02222293 45.51111147 45.51111147 0 0 1 0-91.02222293z" fill="#515151" p-id="6081"></path></svg>',validate:n=>n.startsWith("http://")||n.startsWith("https://")},{label:"哔哩哔哩",value:"bilibili",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M11.39 3.714h.5c.88.032 1.614.337 2.2.918.586.58.889 1.312.91 2.194v4.293c-.021.88-.324 1.615-.91 2.201-.586.586-1.32.889-2.2.91H4.11c-.88-.021-1.614-.324-2.2-.91-.586-.586-.889-1.32-.91-2.2V6.825c.021-.882.324-1.613.91-2.194.586-.58 1.32-.886 2.2-.918h.452l-.684-.653a.72.72 0 0 1-.218-.529.72.72 0 0 1 .218-.529l.015-.015a.763.763 0 0 1 .537-.218c.202 0 .38.072.537.218L6.63 3.59c.041.041.078.083.109.124h2.49a.487.487 0 0 1 .092-.124l1.665-1.602a.763.763 0 0 1 .536-.218c.203 0 .386.088.542.233a.691.691 0 0 1 .228.53.72.72 0 0 1-.217.528l-.685.653zm-7.28 1.51c-.434.01-.8.16-1.096.45-.295.29-.448.66-.458 1.105v4.387c.01.445.163.813.458 1.104.296.29.662.441 1.097.45h7.778c.435-.009.801-.16 1.097-.45.295-.29.448-.659.458-1.104V6.779c-.01-.446-.163-.814-.458-1.105a1.563 1.563 0 0 0-1.097-.45H4.111zm1.557 2.255c.217 0 .399.072.544.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.736.736 0 0 1-.544.218.739.739 0 0 1-.545-.218.809.809 0 0 1-.233-.56v-.684c0-.218.075-.402.225-.553a.753.753 0 0 1 .553-.225zm4.666 0c.218 0 .4.072.545.218a.809.809 0 0 1 .233.56v.684a.809.809 0 0 1-.233.56.737.737 0 0 1-.545.218.739.739 0 0 1-.544-.218.809.809 0 0 1-.233-.56v-.684a.809.809 0 0 1 .233-.56.738.738 0 0 1 .544-.218z" fill="#07A3D7"/></svg>',validate(n){return/^https?:\/\/(www\.)?bilibili\.com\/video\/[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/video\/([a-zA-Z0-9]+)/)?.[1];return e?`https://player.bilibili.com/player.html?bvid=${e}`:""}},{label:"优酷",value:"youku",icon:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path d="M270.528 902.592c-82.688-45.952-104.576-161.984-43.072-232 26.688-30.208 214.592-142.784 229.632-137.344 17.088 5.504 7.488-.64-112.768-71.36-105.92-62.464-129.152-83.776-144.896-129.792-34.816-105.664 58.112-218.944 166.08-202.496 24.576 4.096 102.528 42.56 175.616 87.168 13.696 8.32 70.4 41.216 125.76 73.472 119.616 69.376 153.792 97.472 178.368 148.288 20.48 41.856 24.576 100.928 10.24 151.68-8.896 32.32-41.664 78.976-71.04 100.992l-19.2 14.4-33.408-19.2c-19.2-11.008-34.176-17.92-34.176-15.808 0 1.344 12.288 10.24 27.328 18.56 15.04 8.896 27.328 17.152 27.328 19.2 0 4.8-281.6 168.832-334.208 194.24-51.904 26.112-100.48 26.112-147.584 0z" fill="#018EFF"/><path d="M665.984 654.4c0-1.088-6.912-5.888-15.936-10.624-20.16-10.112-21.248-5.888-1.088 4.736 16.512 9.024 17.024 9.6 17.024 5.888zm-50.56 5.952c-8.448-7.424-55.744-33.408-55.744-30.72 0 2.56 53.632 35.008 58.432 35.52 1.024 0 0-2.112-2.688-4.8z" fill="#018EFF"/><path d="M673.472 653.44a4171.008 4171.008 0 0 0-126.336-72.768c-43.712-24.064-92.224-52.864-233.6-137.344C238.4 398.72 213.76 374.016 199.424 332.16c-34.816-105.664 58.048-218.944 166.016-202.496 24.576 4.096 102.4 42.56 175.552 87.168 13.632 8.32 70.336 41.216 125.632 73.472 114.112 65.92 146.88 92.032 170.752 133.184 47.872 81.728 29.44 195.008-40.96 257.472-13.632 11.648-27.968 21.248-32.768 21.248-4.8-.64-45.12-21.952-90.176-48.704z" fill="#FF396E"/><path d="M270.464 902.592A152.32 152.32 0 0 1 193.28 781.76c-6.144-76.8 21.184-115.328 130.496-179.84l75.136-44.608L568.96 630.08c93.568 39.808 172.8 72.064 176.256 72.064 4.096 0 6.784 2.048 6.784 5.504 0 5.504-273.216 165.44-334.016 194.944-51.84 26.112-100.352 26.112-147.52 0z" fill="#00BEFF"/></svg>',validate(n){return/^https?:\/\/v\.youku\.com\/v_show\/id_[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/id_([a-zA-Z0-9]+)/)?.[1];return e?`https://player.youku.com/embed/${e}`:""}},{label:"Figma",value:"figma",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.324 8c0-1.475 1.2-2.675 2.675-2.675 1.475 0 2.675 1.2 2.675 2.675 0 1.475-1.2 2.675-2.675 2.675A2.678 2.678 0 0 1 8.324 8z" fill="#1ABCFE"/><path d="M3 13.325c0-1.475 1.2-2.675 2.675-2.675h2.65v2.675C8.325 14.8 7.125 16 5.65 16 4.175 16 3 14.8 3 13.325z" fill="#0ACF83"/><path d="M8.324 0v5.325H11c1.475 0 2.675-1.2 2.675-2.675C13.674 1.175 12.474 0 11 0H8.324z" fill="#FF7262"/><path d="M3 2.675C3 4.15 4.2 5.35 5.675 5.35h2.65V0H5.65C4.175 0 3 1.2 3 2.675z" fill="#F24E1E"/><path d="M3 8c0 1.475 1.2 2.675 2.675 2.675h2.65v-5.35H5.65C4.175 5.325 3 6.525 3 8z" fill="#A259FF"/></svg>',validate(n){return/^https?:\/\/www\.figma\.com\/file\/[a-zA-Z0-9]+/.test(n)},transformURL(n){const e=n.match(/\/file\/([a-zA-Z0-9]+)/)?.[1];return e?`https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/${e}`:""}},{label:"墨刀",value:"mado",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 3h2.715v4.752H2V3zm6.958 0H6.242v4.752h2.716V3zm4.582 0h-2.716v4.752h2.716V3zM9.107 14l-1.096-2.5a3.905 3.905 0 0 0 2.812-3.748h2.716A6.621 6.621 0 0 1 9.107 14z" fill="#F33"/></svg>',validate(n){return/^https?:\/\/modao\.cc\/app\/[a-zA-Z0-9]+/.test(n)},transformURL(n){return n}},{label:"腾讯视频",value:"tencent_video",icon:'<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.314 14.541c-1.416-.025-1.71-1.416-1.964-3.16-.155-1.06-.182-2.155-.182-3.23 0-1.074.027-2.169.182-3.23.31-2.14.685-3.75 3.123-2.95 2.336.768 4.586 2.126 6.56 3.67.1.085.209.177.324.272.705.59 1.62 1.355 1.642 2.239-.021.882-.936 1.647-1.641 2.237-.115.096-.225.187-.324.274-1.975 1.543-4.225 2.901-6.561 3.67-.418.136-.774.203-1.08.208h-.08z" fill="#4396F7"/><path d="M2.98 13.143c-1.202-.029-1.527-.954-1.755-2.162l-.02-.1-.036-.206C1.025 9.847 1 8.991 1 8.152c0-.84.025-1.694.17-2.523l.036-.205.019-.1c.267-1.418.668-2.447 2.464-2.094-.151.487-.247 1.067-.339 1.692-.154 1.061-.181 2.156-.181 3.23 0 1.074.027 2.169.181 3.23.092.624.188 1.204.34 1.692a3.501 3.501 0 0 1-.592.07H2.98z" fill="#EF8E34"/><path fill-rule="evenodd" clip-rule="evenodd" d="M3.689 3.229c.125.025.256.055.395.094 2.181.6 4.28 1.66 6.124 2.866.66.483 1.812 1.16 1.834 1.962-.023.803-1.175 1.48-1.834 1.963-1.843 1.205-3.943 2.266-6.124 2.866-.139.038-.27.069-.395.094-.151-.488-.248-1.068-.338-1.693-.155-1.06-.182-2.156-.182-3.23 0-1.074.027-2.169.182-3.23.09-.62.185-1.197.335-1.683l.003-.009z" fill="#78E445"/><path d="M4.845 8.156c0-1.82.13-2.04.13-2.04.053-.234.18-.298.378-.241 0 0 .587.124 2.006.87 1.435.754 1.875 1.168 1.875 1.168.217.188.172.305 0 .483 0 0-.269.308-1.875 1.14-1.606.83-2.006.894-2.006.894-.239.056-.332-.015-.377-.24 0 0-.13-.21-.13-2.034z" fill="#fff"/></svg>',validate(n){return n.startsWith("https://modao.cc/proto/")},transformURL(n){const e=n.match(/\/cover\/[a-zA-Z0-9]+\/([a-zA-Z0-9]+)/)?.[1];return e?`https://v.qq.com/iframe/player.html?vid=${e}`:""}}],n5e={class:"w-[170px] flex flex-wrap gap-[10px]"},r5e=["onClick"],i5e=["innerHTML"],Nz=m.defineComponent({__name:"ordered-list",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref("");m.watch(()=>t.value,a=>{if(a&&e.value){const{listType:o}=e.value.getAttributes("orderedList");r.value=o}});const i=a=>{const o=e.value?.chain().focus();e.value?.isActive("orderedList")?e.value.getAttributes("orderedList").listType===a?o?.toggleOrderedList().run():o?.updateAttributes("orderedList",{listType:a}).run():(o?.toggleOrderedList().run(),e.value?.chain().updateAttributes("orderedList",{listType:a}).run()),r.value=a,t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"ordered-list",icoSize:16,text:"有序列表","hide-text":"",shortcut:"Ctrl+Shift+7","popup-visible":t.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>t.value=s),"popup-type":"arrow",onMenuClick:o[1]||(o[1]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(m.unref(Mz)[0].value))},{content:m.withCtx(()=>[m.createElementVNode("div",n5e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(Mz),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["w-[50px] h-[50px] cursor-pointer rounded-[3px] flex items-center justify-center border hover:bg-[#F5F5F5] overflow-hidden",{"border-[#333639]":r.value===s.value}]),onClick:u=>i(s.value)},[(m.openBlock(),m.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 44 44",innerHTML:s.code},null,8,i5e))],10,r5e))),128))])]),_:1},8,["popup-visible"]))}}),a5e={class:"w-[170px] flex flex-wrap gap-[10px]"},o5e=["onClick"],s5e=["innerHTML"],Dz=m.defineComponent({__name:"bullet-list",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref("");m.watch(()=>t.value,a=>{if(a&&e.value){const{listType:o}=e.value.getAttributes("bulletList");r.value=o}});const i=a=>{const o=e.value?.chain().focus();e.value?.isActive("bulletList")?e.value.getAttributes("bulletList").listType===a?o?.toggleBulletList().run():o?.updateAttributes("bulletList",{listType:a}).run():(o?.toggleBulletList().run(),e.value?.chain().updateAttributes("bulletList",{listType:a}).run()),r.value=a,t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"bullet-list",icoSize:16,text:"无序列表","hide-text":"",shortcut:"Ctrl+Shift+7","popup-visible":t.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>t.value=s),"popup-type":"arrow",onMenuClick:o[1]||(o[1]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(m.unref(Az)[0].value))},{content:m.withCtx(()=>[m.createElementVNode("div",a5e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(Az),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["w-[50px] h-[50px] cursor-pointer rounded-[3px] flex items-center justify-center border hover:bg-[#F5F5F5]",{"border-[#333639]":r.value===s.value}]),onClick:u=>i(s.value)},[(m.openBlock(),m.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 44 44",innerHTML:s.code},null,8,s5e))],10,o5e))),128))])]),_:1},8,["popup-visible"]))}}),Oz=m.defineComponent({__name:"text-indent",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"indent-right",text:"增加缩进",shortcut:"Tab","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().indent().run())}))}}),l5e=["disabled"],u5e={key:0,class:"text-[13px] text-[#333639] ml-[3px]"},c5e={class:"flex items-center justify-center w-full h-full"},f5e=["disabled"],d5e={class:"flex items-center gap-[4px] h-full"},h5e={key:0,class:"text-[13px] text-[#333639]"},wS=m.defineComponent({__name:"MenusDropdown",props:{ico:{default:""},icoSize:{default:16},text:{default:""},hideText:{type:Boolean,default:!1},forceEnabled:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},menuActive:{type:Boolean,default:!1},dropType:{default:"dropdown"},popupVisible:{type:Boolean,default:!1},maxHeight:{type:Boolean,default:!0}},emits:["update:popupVisible"],setup(n,{emit:e}){const t=m.useAttrs(),r=m.inject("editor"),i=n,a=e,o=m.computed({get:()=>i.popupVisible,set:l=>a("update:popupVisible",l)}),s=(...l)=>{t.onMenuClickThrough?t.onMenuClickThrough(...l):t.onMenuClick&&t.onMenuClick(...l)};return(l,u)=>{const c=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[n.dropType==="dropdown"?m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({key:0,class:["white-editor-tool-item white-editor-tool-drop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",{class:"flex items-center h-full",onClick:s},[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`]),style:m.normalizeStyle(`font-size: ${n.icoSize}px`)},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",u5e,m.toDisplayString(n.text),1))]),m.createVNode(js,{trigger:"click",value:o.value,"onUpdate:value":u[0]||(u[0]=f=>o.value=f),placement:"bottom",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"},disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1),hasClass:"flex items-center justify-center w-[13px] h-full hover:bg-[#d7d3d3] mr-[-6px] ml-[4px] w-arrow"},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.createElementVNode("span",c5e,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])]),_:3},8,["value","disabled"])],16,l5e)),[[c,`${n.text}`]]):m.createCommentVNode("",!0),n.dropType==="select"?(m.openBlock(),m.createBlock(js,{key:1,trigger:"click",value:o.value,"onUpdate:value":u[1]||(u[1]=f=>o.value=f),placement:"bottom",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.renderSlot(l.$slots,"content")]),default:m.withCtx(()=>[m.withDirectives((m.openBlock(),m.createElementBlock("button",m.mergeProps({class:["white-editor-tool-item white-editor-tool-drop-item flex items-center justify-center",{"is-show-text":!n.hideText,"is-active":n.menuActive&&m.unref(r)?.isEditable!==!1,"is-disabled":!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)}],disabled:!n.forceEnabled&&(n.disabled||m.unref(r)?.isEditable===!1)},m.unref(t)),[m.createElementVNode("div",d5e,[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`]),style:m.normalizeStyle(`font-size: ${n.icoSize}px`)},null,6),n.hideText?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("p",h5e,m.toDisplayString(n.text),1)),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",o.value?"rotate-180":""])},null,2)])],16,f5e)),[[c,`${n.text}`]])]),_:3},8,["value"])):m.createCommentVNode("",!0)],64)}}}),p5e=["disabled"],v5e=["disabled"],g5e=["disabled"],m5e=["disabled"],y5e=["disabled"],XY=m.defineComponent({__name:"text-align",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.computed(()=>!e.value||e.value.isActive({textAlign:"left"})?"left":e.value.isActive({textAlign:"center"})?"center":e.value.isActive({textAlign:"right"})?"right":e.value.isActive({textAlign:"justify"})?"justify":e.value.isActive({textAlign:"distributed"})?"distributed":"left"),i=a=>{switch(a){case"left":e.value?.can().chain().focus().setTextAlign("left").run()&&e.value.chain().focus().setTextAlign("left").run(),e.value?.can().chain().focus().setNodeAlign("flex-start").run()&&e.value.chain().focus().setNodeAlign("flex-start").run();break;case"center":e.value?.can().chain().focus().setTextAlign("center").run()&&e.value.chain().focus().setTextAlign("center").run(),e.value?.can().chain().focus().setNodeAlign("center").run()&&e.value.chain().focus().setNodeAlign("center").run();break;case"right":e.value?.can().chain().focus().setTextAlign("right").run()&&e.value.chain().focus().setTextAlign("right").run(),e.value?.can().chain().focus().setNodeAlign("flex-end").run()&&e.value.chain().focus().setNodeAlign("flex-end").run();break;case"justify":e.value?.can().chain().focus().setTextAlign("justify").run()&&e.value.chain().focus().setTextAlign("justify").run();break;case"distributed":e.value?.can().chain().focus().setTextAlign("distributed").run()&&e.value.chain().focus().setTextAlign("distributed").run();break}t.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(wS,{ico:`align-${r.value}`,text:"对齐方式","hide-text":"",onMenuClick:o[5]||(o[5]=s=>m.unref(e)?.isEditable===!1?()=>{}:i(r.value)),"popup-visible":t.value,"onUpdate:popupVisible":o[6]||(o[6]=s=>t.value=s)},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[0]||(o[0]=s=>i("left")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("left").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("left").run()},[...o[7]||(o[7]=[m.createElementVNode("i",{class:"w-iconfont icon-align-left"},null,-1),m.createTextVNode(" 左对齐 ",-1)])],8,p5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[1]||(o[1]=s=>i("center")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("center").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("center").run()},[...o[8]||(o[8]=[m.createElementVNode("i",{class:"w-iconfont icon-align-center"},null,-1),m.createTextVNode(" 居中对齐 ",-1)])],8,v5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[2]||(o[2]=s=>i("right")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("right").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("flex-end").run()},[...o[9]||(o[9]=[m.createElementVNode("i",{class:"w-iconfont icon-align-right"},null,-1),m.createTextVNode(" 右对齐 ",-1)])],8,g5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[3]||(o[3]=s=>i("justify")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("justify").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("justify").run()},[...o[10]||(o[10]=[m.createElementVNode("i",{class:"w-iconfont icon-align-justify"},null,-1),m.createTextVNode(" 两端对齐 ",-1)])],8,m5e),m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-2 text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",onClick:o[4]||(o[4]=s=>i("distributed")),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("distributed").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("distributed").run()},[...o[11]||(o[11]=[m.createElementVNode("i",{class:"w-iconfont icon-align-distributed"},null,-1),m.createTextVNode(" 分散对齐 ",-1)])],8,y5e)]),_:1},8,["ico","popup-visible"]))}}),Iz=m.defineComponent({__name:"sub-script",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"sub-script",text:"下标",shortcut:"Ctrl+,","hide-text":"","menu-active":m.unref(e)?.isActive("subscript"),disabled:!m.unref(e)?.can().chain().focus().toggleSubscript().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.commands.toggleSubscript())},null,8,["menu-active","disabled"]))}}),Rz=m.defineComponent({__name:"sup-script",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"sup-script",text:"上标",shortcut:"Ctrl+.","hide-text":"","menu-active":m.unref(e)?.isActive("superscript"),disabled:!m.unref(e)?.can().chain().focus().toggleSuperscript().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.commands.toggleSuperscript())},null,8,["menu-active","disabled"]))}}),Lz=m.defineComponent({__name:"quote",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"quote",text:"引用",shortcut:"Ctrl+Shift+B","hide-text":"","menu-active":m.unref(e)?.isActive("blockquote"),disabled:!m.unref(e)?.can().chain().focus().toggleBlockquote().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleBlockquote().run())},null,8,["menu-active","disabled"]))}}),Pz=m.defineComponent({__name:"code",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"code",text:"代码",shortcut:"Ctrl+E","hide-text":"","menu-active":m.unref(e)?.isActive("code"),disabled:!m.unref(e)?.can().chain().focus().toggleCode().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleCode().run())},null,8,["menu-active","disabled"]))}}),b5e=["onClick"],Bz=m.defineComponent({__name:"line-height",setup(n){const e=m.inject("editor"),t=m.inject("options"),r=m.ref(!1),i=m.computed(()=>t.value.dicts?.lineHeights.map(o=>({label:o.label,value:o.value,active:e.value?.isActive({lineHeight:o.value})}))),a=({content:o,value:s})=>{o&&(e.value?.chain().focus().setLineHeight(s).run(),r.value=!1)};return(o,s)=>(m.openBlock(),m.createBlock(wS,{"drop-type":"select",ico:"line-height",text:"行高","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":s[0]||(s[0]=l=>r.value=l)},{content:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,l=>(m.openBlock(),m.createElementBlock("div",{key:l.value,class:m.normalizeClass(["px-[12px] py-[5px] flex items-center gap-[4px] text-[14px] hover:bg-[rgb(242,243,245)] cursor-pointer",l.active?"!text-[#007bff] font-[500]":""]),onClick:u=>a({content:l.label,value:l.value})},m.toDisplayString(l.label),11,b5e))),128))]),_:1},8,["popup-visible"]))}}),Vz=m.defineComponent({__name:"undo",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"unde",text:"撤销",shortcut:"Ctrl+Z","hide-text":"",disabled:!m.unref(e)?.can().chain().focus().undo().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().undo().run())},null,8,["disabled"]))}}),zz=m.defineComponent({__name:"redo",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"redo",text:"重做",shortcut:"Ctrl+Y","hide-text":"",disabled:!m.unref(e)?.can().chain().focus().redo().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().redo().run())},null,8,["disabled"]))}}),Fz=m.defineComponent({__name:"format-painter",setup(n){const e=m.inject("editor"),t=r=>{if(e.value?.view?.painter?.enabled){e.value?.commands.unsetFormatPainter();return}e.value?.chain().focus().setFormatPainter(r).run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"format-painter",text:"格式刷","menu-active":m.unref(e)?.view?.painter?.enabled,disabled:m.unref(e)?.state?.selection?.empty,"hide-text":"",onMenuClick:i[0]||(i[0]=a=>t(!0)),onDblclick:i[1]||(i[1]=a=>t(!1))},null,8,["menu-active","disabled"]))}}),$z=m.defineComponent({__name:"clear-format",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"clear-format",text:"清除格式","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().unsetAllMarks().run())}))}}),Hz=m.defineComponent({__name:"hard-break",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"hard-break",text:"换行","hide-text":"",shortcut:"Shift+Enter",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setHardBreak().run())}))}}),x5e=["checked"],_5e={class:"checkbox-label"},ZY=m.defineComponent({__name:"Checkbox",props:{value:{type:Boolean},disabled:{type:Boolean,default:!1}},emits:["update:value"],setup(n,{emit:e}){const t=n,r=e,i=a=>{t.disabled||r("update:value",a.target.checked)};return(a,o)=>(m.openBlock(),m.createElementBlock("label",{class:m.normalizeClass(["white-checkbox",{checked:n.value,disabled:n.disabled}]),onChange:o[0]||(o[0]=s=>i(s))},[o[1]||(o[1]=m.createElementVNode("span",{class:"checkbox-input"},null,-1)),m.createElementVNode("input",{class:"checkbox-original",type:"checkbox",checked:n.value},null,8,x5e),m.createElementVNode("span",_5e,[m.renderSlot(a.$slots,"default")])],34))}}),S5e={class:"w-full white-table-generator-content"},w5e={class:"text-[14px] font-[600] mb-[5px] user-select-none flex items-center justify-between"},k5e=["onMouseenter"],T5e=m.defineComponent({__name:"TableGenerator",emits:["insert","close"],setup(n,{emit:e}){const t=e,r=m.ref(!0),i=m.ref([]),a=()=>{if(!i.value.length)return;const[o,s]=i.value;t("insert",{row:o,col:s,checked:r.value})};return(o,s)=>(m.openBlock(),m.createElementBlock("div",S5e,[m.createElementVNode("div",w5e,[m.createElementVNode("span",null,"表格 "+m.toDisplayString(`${i.value[0]||0} * ${i.value[1]||0}`),1),m.createVNode(ZY,{value:r.value,"onUpdate:value":s[0]||(s[0]=l=>r.value=l)},{default:m.withCtx(()=>[...s[3]||(s[3]=[m.createTextVNode("包含表头",-1)])]),_:1},8,["value"])]),m.createElementVNode("table",{onMouseleave:s[1]||(s[1]=l=>i.value=[]),onClick:s[2]||(s[2]=l=>a())},[m.createElementVNode("tbody",null,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(10,l=>m.createElementVNode("tr",{key:l},[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(10,u=>m.createElementVNode("td",{onMouseenter:c=>i.value=[l,u],key:u},[m.createElementVNode("div",{class:m.normalizeClass(["cell cursor-pointer",{active:i.value.length&&i.value[0]&&i.value[1]&&l<=i.value[0]&&u<=i.value[1]}])},null,2)],40,k5e)),64))])),64))])],32)]))}}),Gz=m.defineComponent({__name:"table",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor"),t=m.ref(!1),r=i=>{const{row:a,col:o,checked:s}=i;e.value?.chain().focus().insertTable({rows:a,cols:o,withHeaderRow:s}).run(),t.value=!1};return(i,a)=>(m.openBlock(),m.createBlock(il,{ico:"edit-table",icoSize:16,text:"插入表格","hide-text":n.hideText,"popup-visible":t.value,"onUpdate:popupVisible":a[0]||(a[0]=o=>t.value=o),"popup-type":"select"},{content:m.withCtx(()=>[m.createVNode(T5e,{onInsert:r})]),_:1},8,["hide-text","popup-visible"]))}}),Wo=m.defineComponent({__name:"Button",props:{checked:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},type:{default:"default"},size:{default:"normal"},first:{type:Boolean,default:!1},last:{type:Boolean,default:!1}},emits:["click"],setup(n,{emit:e}){const t=n,r=e,i=()=>{t.disabled||r("click")};return(a,o)=>(m.openBlock(),m.createElementBlock("button",{class:m.normalizeClass(["white-button",{disabled:n.disabled,checked:!n.disabled&&n.checked,default:!n.disabled&&n.type==="default",primary:!n.disabled&&n.type==="primary",checkbox:!n.disabled&&n.type==="checkbox",radio:!n.disabled&&n.type==="radio",small:n.size==="small",first:n.first,last:n.last}]),onClick:o[0]||(o[0]=s=>i())},[m.renderSlot(a.$slots,"default")],2))}}),C5e={class:"w-[250px]"},E5e={class:"flex justify-end mt-[10px] gap-[10px]"},Uz=m.defineComponent({__name:"link",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.ref(""),t=m.ref(""),r=m.inject("editor"),i=m.ref(!1),a=()=>{r.value?.commands.setLink({href:e.value,target:"_blank"}),r.value?.chain().focus().insertContent(t.value).run(),i.value=!1},o=()=>{e.value="",t.value="",i.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"link",icoSize:16,text:"插入链接","hide-text":n.hideText,"popup-visible":i.value,"onUpdate:popupVisible":l[4]||(l[4]=u=>i.value=u),"popup-type":"select"},{content:m.withCtx(()=>[m.createElementVNode("div",C5e,[l[7]||(l[7]=m.createElementVNode("div",{class:"font-[500] text-[14px] mb-[5px]"},"链接到",-1)),m.createVNode(lm,{placeholder:"请输入网址",value:e.value,"onUpdate:value":l[0]||(l[0]=u=>e.value=u)},null,8,["value"]),l[8]||(l[8]=m.createElementVNode("div",{class:"font-[500] text-[14px] mb-[5px] mt-[10px]"},"显示文案",-1)),m.createVNode(lm,{placeholder:"请输入显示文案",value:t.value,"onUpdate:value":l[1]||(l[1]=u=>t.value=u)},null,8,["value"]),m.createElementVNode("div",E5e,[m.createVNode(Wo,{onClick:l[2]||(l[2]=u=>o())},{default:m.withCtx(()=>[...l[5]||(l[5]=[m.createTextVNode("取消",-1)])]),_:1}),m.createVNode(Wo,{type:"primary",onClick:l[3]||(l[3]=u=>a()),disabled:!e.value||!t.value},{default:m.withCtx(()=>[...l[6]||(l[6]=[m.createTextVNode(" 确定 ",-1)])]),_:1},8,["disabled"])])])]),_:1},8,["hide-text","popup-visible"]))}}),M5e=["onClick"],A5e={class:"icon"},zO=m.defineComponent({__name:"MenusSelect",props:{value:{},size:{default:""},options:{},disabled:{type:Boolean,default:!1},search:{type:Boolean,default:!1},searchLabel:{default:"搜索"},maxHeight:{type:Boolean,default:!0},maxWidth:{default:0}},emits:["update:value"],setup(n,{expose:e,emit:t}){const r=n,i=t,a=m.inject("editor"),o=m.ref(!1),s=m.ref(),l=m.ref(),u=m.ref(0),c=m.ref(""),f=m.computed(()=>r.options.find(b=>b.value===r.value)?.label||r.value||"请选择"),d=m.computed(()=>f.value==="请选择"),h=m.computed(()=>{if(!r.search||!c.value.trim())return r.options;const b=r.options.filter(_=>_.label.toLowerCase().indexOf(c.value.toLowerCase())!==-1);return b.length?b:r.options});m.watch(o,()=>{o.value?m.nextTick(()=>{l.value&&l.value.focus()}):c.value=""}),m.onBeforeUnmount(()=>{c.value=""});const p=()=>{s.value&&(u.value=r.maxWidth?Number(r.maxWidth):s.value.clientWidth)},v=new ResizeObserver(p);m.onMounted(()=>{s.value&&v.observe(s.value)}),m.onUnmounted(()=>{s.value&&v.unobserve(s.value)});const g=b=>{b.disabled||(i("update:value",b.value),o.value=!1)};return e({changePopoverVisible:b=>{o.value=b}}),(b,_)=>(m.openBlock(),m.createBlock(js,{class:"white-select-wrapper",trigger:"click",value:o.value,"onUpdate:value":_[0]||(_[0]=x=>o.value=x),placement:"bottom",contentStyle:{padding:0,boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"},disabled:n.disabled||m.unref(a)?.isEditable===!1},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"white-options-wrapper",style:m.normalizeStyle({width:u.value+2+"px",maxHeight:n.maxHeight?"260px":"auto"})},[m.renderSlot(b.$slots,"main",{},()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(h.value,(x,T)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["option",{disabled:x.disabled,selected:x.value===n.value}]),key:T,onClick:k=>g(x)},m.toDisplayString(x.label),11,M5e))),128))])],4)]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["select border border-[#d9d9d9] !bg-[#fff]",{[n.size]:n.size,disabled:n.disabled||m.unref(a)?.isEditable===!1}]),ref_key:"selectRef",ref:s},[m.createElementVNode("div",{class:m.normalizeClass(["selector",{placeholder:d.value}])},m.toDisplayString(f.value),3),m.createElementVNode("div",A5e,[m.renderSlot(b.$slots,"icon",{},()=>[_[1]||(_[1]=m.createElementVNode("i",{class:"w-iconfont icon-bottom !text-[8px] transition-transform duration-200"},null,-1))])])],2)]),_:3},8,["value","disabled"]))}}),Wz=m.defineComponent({__name:"font-size",setup(n){const e=m.inject("editor"),t=m.computed(()=>e.value?.getAttributes("textStyle").fontSize||"14px");return(r,i)=>(m.openBlock(),m.createBlock(zO,{value:t.value,size:"small",options:m.unref(Fm),"onUpdate:value":i[0]||(i[0]=a=>m.unref(e)?.chain().focus().setFontSize(a).run())},null,8,["value","options"]))}}),jz=m.defineComponent({__name:"font-family",setup(n){const e=m.inject("editor"),t=[{label:"默认字体",value:null},{label:"华文宋体",value:"STSong"},{label:"华文仿宋",value:"STFangsong"},{label:"Arial",value:"Arial"},{label:"Times New Roman",value:"Times New Roman"},{label:"Verdana",value:"Verdana"},{label:"Helvetica",value:"Helvetica"},{label:"Tahoma",value:"Tahoma"},{label:"Georgia",value:"Georgia"},{label:"Comic Sans MS",value:"Comic Sans MS"},{label:"Impact",value:"Impact"}],r=m.computed(()=>e.value?.getAttributes("textStyle").fontFamily||null);return(i,a)=>(m.openBlock(),m.createBlock(zO,{class:"w-[120px]",size:"small",value:r.value,options:t,"onUpdate:value":a[0]||(a[0]=o=>m.unref(e)?.chain().focus().setFontFamily(o).run())},null,8,["value"]))}}),N5e=["onClick"],D5e=m.defineComponent({__name:"font-heading",setup(n){const e=m.inject("editor"),t=m.ref(),r=m.computed(()=>{const a=o=>e.value?.isActive("heading",{level:o});if(e.value){if(e.value?.isActive("paragraph"))return"paragraph";if(a(1))return"1";if(a(2))return"2";if(a(3))return"3";if(a(4))return"4";if(a(5))return"5";if(a(6))return"6"}return""}),i=a=>{a==="paragraph"?e.value?.chain().focus().setParagraph().run():e.value?.chain().focus().toggleHeading({level:Number(a)}).run(),t.value.changePopoverVisible(!1)};return(a,o)=>(m.openBlock(),m.createBlock(zO,{value:r.value,size:"small",options:m.unref(JM),"max-width":100,ref_key:"selectRef",ref:t},{main:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(JM),(s,l)=>(m.openBlock(),m.createElementBlock("div",{key:l,class:m.normalizeClass(["white-heading-wrapper cursor-pointer",{selected:s.value===r.value,[s.element]:!0}]),onClick:u=>i(s.value)},m.toDisplayString(s.label),11,N5e))),128))]),_:1},8,["value","options"]))}}),O5e=m.defineComponent({__name:"Modal",props:{visible:{type:Boolean},width:{default:480},closeButton:{type:Boolean,default:!1},closeOnClickMask:{type:Boolean,default:!0},closeOnEsc:{type:Boolean,default:!0},contentStyle:{}},emits:["update:visible","closed"],setup(n,{emit:e}){const t=n,r=m.ref(),i=e,a=m.ref(!1),o=m.computed(()=>({width:t.width+"px",...t.contentStyle||{}}));m.watch(()=>t.visible,()=>{t.visible&&m.nextTick(()=>r.value.focus())});const s=()=>{i("update:visible",!1),i("closed")},l=()=>{t.visible&&t.closeOnEsc&&s()},u=()=>{t.closeOnClickMask&&s()};return(c,f)=>(m.openBlock(),m.createBlock(m.Teleport,{to:"body"},[m.createVNode(m.Transition,{name:"modal-fade"},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("div",{class:"white-modal-wrapper white-editor-namespace",ref_key:"modalRef",ref:r,tabindex:"-1",onKeyup:f[3]||(f[3]=m.withKeys(d=>l(),["esc"])),onClick:f[4]||(f[4]=m.withModifiers(d=>u(),["self"]))},[m.createVNode(m.Transition,{name:"modal-zoom",onAfterLeave:f[1]||(f[1]=d=>a.value=!1),onBeforeEnter:f[2]||(f[2]=d=>a.value=!0)},{default:m.withCtx(()=>[m.withDirectives(m.createElementVNode("div",{class:"modal-content",style:m.normalizeStyle(o.value)},[n.closeButton?(m.openBlock(),m.createElementBlock("span",{key:0,class:"close-btn",onClick:f[0]||(f[0]=d=>s())},[...f[5]||(f[5]=[m.createElementVNode("i",{class:"w-iconfont icon-close"},null,-1)])])):m.createCommentVNode("",!0),a.value?m.renderSlot(c.$slots,"default",{key:1}):m.createCommentVNode("",!0)],4),[[m.vShow,n.visible]])]),_:3})],544),[[m.vShow,n.visible]])]),_:3})]))}}),I5e={class:"white-editor-table-content"},R5e=["id","onFocus","onBlur","onPaste"],qz=30,Kz=15,L5e=m.defineComponent({__name:"ChartData",props:{type:{},data:{}},emits:["updateData"],setup(n,{expose:e,emit:t}){const r=n,i=m.ref([0,0]),a=m.ref(null),o=m.ref("bar"),s=()=>{o.value=r.type;const p=[],{labels:v,legends:g,series:y}=r.data,b=v.length,_=y.length;p.push(["",...g]);for(let x=0;x<b;x++){const T=[v[x]];for(let k=0;k<_;k++)T.push(y[k][x]+"");p.push(T)}for(let x=0;x<b+1;x++)for(let T=0;T<_+1;T++){const k=document.querySelector(`#cell-${x}-${T}`);k&&(k.value=p[x][T]+"")}i.value=[_+1,b+1]},l=(p,v)=>{if(p===0||v===0)return;const g=document.querySelector(`#cell-${p}-${v}`);g&&g.value&&(/^[0-9]+$/.test(g.value)||(g.value="0"))},u=()=>{if(!a.value)return;const[p,v]=a.value,g=document.querySelector(`#cell-${p+1}-${v}`);g&&g.focus()},c=p=>{p.key.toUpperCase()===YY.ENTER&&u()},f=t;m.onMounted(()=>{s(),document.addEventListener("keydown",c)}),m.onBeforeUnmount(()=>{f("updateData",d()),document.removeEventListener("keydown",c)});const d=()=>{const p=[];let v=[],g=[];for(let y=1;y<qz;y++){const b=document.querySelector(`#cell-${y}-0`);b&&b.value&&p.push({rowIndex:y,value:b.value})}for(let y=1;y<Kz;y++){const b=document.querySelector(`#cell-0-${y}`);if(b&&b.value){v.push(b.value);const _=[];for(let x=0;x<p.length;x++){const T=document.querySelector(`#cell-${p[x].rowIndex}-${y}`);let k=0;T&&T.value&&+T.value&&(k=+T.value),_.push(k)}g.push(_)}}return o.value==="scatter"&&(v.length>2&&(v=v.slice(0,2),g=g.slice(0,2)),v.length<2&&(v.push("Y"),g.push(g[0]))),(o.value==="ring"||o.value==="pie")&&v.length>1&&(v=v.slice(0,1),g=g.slice(0,1)),{data:{labels:p.map(y=>y.value),legends:v,series:g},type:o.value}},h=(p,v,g)=>{p.preventDefault(),console.log("handlePaste",p.clipboardData,v,g),p.clipboardData};return e({getTableData:d,initData:s}),(p,v)=>(m.openBlock(),m.createElementBlock("div",I5e,[m.createElementVNode("table",null,[m.createElementVNode("tbody",null,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(qz,g=>m.createElementVNode("tr",{key:g},[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(Kz,y=>m.createElementVNode("td",{key:y,class:m.normalizeClass({head:y===1&&g<=i.value[1]||g===1&&y<=i.value[0]})},[g===1&&y===1?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock("input",{key:0,class:m.normalizeClass(["item",{selected:g<=i.value[1]&&y<=i.value[0]}]),id:`cell-${g-1}-${y-1}`,autocomplete:"off",onFocus:b=>a.value=[g-1,y-1],onBlur:b=>l(g-1,y-1),onPaste:b=>h(b,g-1,y-1)},null,42,R5e))],2)),64))])),64))])])]))}}),P5e={class:"w-full inline-flex items-center mb-[15px]"},B5e={class:"flex items-center gap-[1.2rem] h-[400px]"},V5e={class:"w-[55%] h-full border rounded-md p-2"},z5e={class:"flex-1 h-full border rounded-md p-4"},F5e={class:"flex items-center gap-[10px] mb-[10px]"},$5e={class:"flex items-center gap-[10px] mb-[10px]"},H5e={class:"flex items-center gap-[10px] mb-[10px]"},G5e={class:"flex items-center gap-[10px] mb-[10px]"},U5e={class:"flex items-center gap-[10px] mb-[10px]"},W5e={key:0,class:"w-full h-[400px] overflow-auto"},j5e={class:"flex items-center justify-end gap-[0.8rem] mt-6"},QM=m.defineComponent({__name:"echarts",props:{icon:{default:"chart"},text:{default:"插入图表"},isEdit:{type:Boolean,default:!1},hideText:{type:Boolean,default:!0}},setup(n){const e=n,t=m.inject("editor"),r=m.inject("options"),i=m.ref(!1),a=m.ref("type"),o=m.ref(1),s=m.ref(null),l=m.ref(),u=m.ref({data:[],config:{seriesType:"bar",legendorient:"horizontal",titleText:"",legend:!1,legendleft:"center",legendlocation:"top",titleleft:"left"}});let c=null;const f=async()=>{if(i.value=!0,a.value="type",e.isEdit){if(s.value=Fl(t.value),s.value?.type?.name!=="echarts"||(h(),!s.value.attrs?.chartConfig))return;const x=s.value.attrs?.chartConfig;u.value=JSON.parse(JSON.stringify(x)),console.log("chartConfig",u.value),await m.nextTick(),d()}else h(),await m.nextTick(),d()},d=async()=>{if(await m.nextTick(),c=TE(l.value),!u.value.data){console.log("图表数据为空");return}const x=iH(JSON.parse(JSON.stringify(u.value.data)),JSON.parse(JSON.stringify(u.value.config)),r.value);try{c.setOption(x)}catch(T){console.log("图表渲染错误:",T),y()}},h=()=>{u.value.config.seriesType="bar",u.value.config.legend=!0,u.value.config.legendorient="horizontal",u.value.config.legendlocation="top",u.value.config.legendleft="center",u.value.config.titleText="",u.value.config.titleleft="left",u.value.data=Ez[u.value.config.seriesType]},p=x=>{u.value.data=Ez[x]},v=x=>{u.value.data=x.data},g=x=>{a.value=x,x==="type"&&b()},y=()=>{c!==null&&(c.dispose(),c=null)},b=async()=>{try{y(),await m.nextTick(),await d()}catch(x){console.log("图表配置错误:",x)}},_=()=>{const x={id:"",name:"",mode:o.value,chartOptions:null,chartConfig:null,nodeAlign:"center",margin:{}};e.isEdit?x.id=s.value.attrs.id:x.id=ip(),x.chartConfig=JSON.parse(JSON.stringify({data:u.value.data,config:u.value.config})),e.isEdit?t.value.commands.updateEcharts(x):t.value.commands.setEcharts(x),i.value=!1};return m.onMounted(()=>{}),(x,T)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:n.icon,text:n.text,"hide-text":n.hideText,onMenuClick:f},null,8,["ico","text","hide-text"]),m.createVNode(O5e,{visible:i.value,"onUpdate:visible":T[8]||(T[8]=k=>i.value=k),closeButton:"",width:800},{default:m.withCtx(()=>[T[17]||(T[17]=m.createElementVNode("div",{class:"w-full mb-6 font-[500] text-[18px]"},"图表配置",-1)),m.createElementVNode("div",P5e,[m.createElementVNode("span",{class:m.normalizeClass(["px-3 py-2 bg-[#f5f5f5] text-[#333] cursor-pointer rounded-l-md",{"!bg-[#007bff] !text-[#fff]":a.value==="type"}]),onClick:T[0]||(T[0]=k=>g("type"))}," 图表类型 ",2),m.createElementVNode("span",{class:m.normalizeClass(["px-3 py-2 bg-[#f5f5f5] text-[#333] cursor-pointer rounded-r-md",{"!bg-[#007bff] !text-[#fff]":a.value==="data"}]),onClick:T[1]||(T[1]=k=>g("data"))}," 图表数据 ",2)]),m.withDirectives(m.createElementVNode("div",B5e,[m.createElementVNode("div",V5e,[m.createElementVNode("div",{ref_key:"chartRef",ref:l,class:"w-full h-full"},null,512)]),m.createElementVNode("div",z5e,[m.createElementVNode("div",F5e,[T[9]||(T[9]=m.createElementVNode("span",{class:"flex-shrink-0"},"图表类型:",-1)),m.createVNode(wg,{value:u.value.config.seriesType,"onUpdate:value":T[2]||(T[2]=k=>u.value.config.seriesType=k),options:[{label:"柱状图",value:"bar"},{label:"折线图",value:"line"},{label:"曲线图",value:"smooth"},{label:"饼图",value:"pie"},{label:"环形图",value:"ring"},{label:"面积图",value:"area"},{label:"散点图",value:"scatter"},{label:"雷达图",value:"radar"}],maxHeight:!1,onChange:p,class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",$5e,[T[10]||(T[10]=m.createElementVNode("span",{class:"flex-shrink-0"},"标题名称:",-1)),m.createVNode(lm,{value:u.value.config.titleText,"onUpdate:value":T[3]||(T[3]=k=>u.value.config.titleText=k),placeholder:"请输入标题名称",class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",H5e,[m.createVNode(ZY,{value:u.value.config.legend,"onUpdate:value":T[4]||(T[4]=k=>u.value.config.legend=k),class:"flex-shrink-0"},{default:m.withCtx(()=>[...T[11]||(T[11]=[m.createTextVNode(" 显示图例 ",-1)])]),_:1},8,["value"])]),u.value.config.legend?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.createElementVNode("div",G5e,[T[12]||(T[12]=m.createElementVNode("span",{class:"flex-shrink-0"},"横向位置:",-1)),m.createVNode(wg,{value:u.value.config.legendleft,"onUpdate:value":T[5]||(T[5]=k=>u.value.config.legendleft=k),options:[{label:"左侧",value:"left"},{label:"居中",value:"center"},{label:"右侧",value:"right"}],class:"flex-1"},null,8,["value"])]),m.createElementVNode("div",U5e,[T[13]||(T[13]=m.createElementVNode("span",{class:"flex-shrink-0"},"纵向位置:",-1)),m.createVNode(wg,{value:u.value.config.legendlocation,"onUpdate:value":T[6]||(T[6]=k=>u.value.config.legendlocation=k),options:[{label:"顶部",value:"top"},{label:"底部",value:"bottom"}],class:"flex-1"},null,8,["value"])])],64)):m.createCommentVNode("",!0),m.createVNode(Wo,{type:"primary",onClick:b,size:"small",class:"w-full"},{default:m.withCtx(()=>[...T[14]||(T[14]=[m.createTextVNode("预览",-1)])]),_:1})])],512),[[m.vShow,a.value==="type"]]),a.value==="data"?(m.openBlock(),m.createElementBlock("div",W5e,[m.createVNode(L5e,{type:u.value.config.seriesType,data:u.value.data,onUpdateData:v},null,8,["type","data"])])):m.createCommentVNode("",!0),m.createElementVNode("div",j5e,[m.createVNode(Wo,{onClick:T[7]||(T[7]=k=>i.value=!1)},{default:m.withCtx(()=>[...T[15]||(T[15]=[m.createTextVNode("取消",-1)])]),_:1}),m.createVNode(Wo,{type:"primary",onClick:_},{default:m.withCtx(()=>[...T[16]||(T[16]=[m.createTextVNode("确定",-1)])]),_:1})])]),_:1},8,["visible"])],64))}}),Yz=m.defineComponent({__name:"text-outdent",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"indent-left",text:"减少缩进",shortcut:"Shift+Tab","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().outdent().run())}))}}),Kp=m.defineComponent({__name:"align-center",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("center").run()&&e.value.chain().focus().setTextAlign("center").run(),e.value?.can().chain().focus().setNodeAlign("center").run()&&e.value.chain().focus().setNodeAlign("center").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-center",shortcut:"Ctrl+Shift+E",text:"居中对齐","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"center"})||m.unref(e)?.isActive({nodeAlign:"center"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("center").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("center").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),Yp=m.defineComponent({__name:"align-right",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("right").run()&&e.value.chain().focus().setTextAlign("right").run(),e.value?.can().chain().focus().setNodeAlign("flex-end").run()&&e.value.chain().focus().setNodeAlign("flex-end").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-right",text:"右对齐",shortcut:"Ctrl+Shift+R","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"right"})||m.unref(e)?.isActive({nodeAlign:"flex-end"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("right").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("flex-end").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),Xp=m.defineComponent({__name:"align-left",setup(n){const e=m.inject("editor"),t=()=>{e.value?.can().chain().focus().setTextAlign("left").run()&&e.value.chain().focus().setTextAlign("left").run(),console.log(e.value?.can().chain().focus().setNodeAlign("flex-start").run(),"22222"),e.value?.can().chain().focus().setNodeAlign("flex-start").run()&&e.value.chain().focus().setNodeAlign("flex-start").run()};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"align-left",text:"左对齐",shortcut:"Ctrl+Shift+L","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"left"})||m.unref(e)?.isActive({nodeAlign:"flex-start"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("left").run()&&!m.unref(e)?.can().chain().focus().setNodeAlign("left").run(),onMenuClick:t},null,8,["menu-active","disabled"]))}}),q5e=m.defineComponent({__name:"align-justify",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"align-justify",text:"两端对齐",shortcut:"Ctrl+Shift+J","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"justify"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("justify").run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setTextAlign("justify").run())},null,8,["menu-active","disabled"]))}}),K5e=m.defineComponent({__name:"align-distributed",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"align-distributed",text:"分散对齐",shortcut:"Ctrl+Shift+D","hide-text":"","menu-active":m.unref(e)?.isActive({textAlign:"distributed"}),disabled:!m.unref(e)?.can().chain().focus().setTextAlign("distributed").run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setTextAlign("distributed").run())},null,8,["menu-active","disabled"]))}}),Y5e=m.defineComponent({__name:"size-increase",setup(n){const e=m.inject("editor"),t=i=>{e.value?.chain().focus().setFontSize(i).run()},r=()=>{const{fontSize:i}=e.value?.getAttributes("textStyle")??{};if(i){const a=Fm.find(({value:s})=>s===i);if(!a)return;const o=Fm.find(({order:s})=>s===a.order+1);o&&t(o.value)}else t("16px")};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"size-increase",text:"增大字体","hide-text":"",onMenuClick:r}))}}),X5e=m.defineComponent({__name:"size-decrease",setup(n){const e=m.inject("editor"),t=i=>{e.value?.chain().focus().setFontSize(i).run()},r=()=>{const{fontSize:i}=e.value?.getAttributes("textStyle")??{};if(i){const a=Fm.find(({value:s})=>s===i);if(console.log(i,a),!a)return;const o=Fm.find(({order:s})=>s===a.order-1);o&&t(o.value)}else t("14px")};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"size-decrease",text:"减小字体","hide-text":"",onMenuClick:r}))}}),Z5e={class:"p-[5px] bg-[#f3f4f6] rounded-[5px]"},J5e={class:"w-[240px] h-[50px] white-no-scrollbar overflow-x-auto"},Q5e=["onClick"],eBe={class:"font-[500]"},tBe={class:"text-[12px] text-[#737373]"},nBe=m.defineComponent({__name:"heading",setup(n){const e=m.inject("editor"),t=m.computed(()=>{const i=a=>e.value?.isActive("heading",{level:a});if(e.value){if(e.value?.isActive("paragraph"))return"paragraph";if(i(1))return"1";if(i(2))return"2";if(i(3))return"3";if(i(4))return"4";if(i(5))return"5";if(i(6))return"6"}return""}),r=i=>{e.value?.isEditable!==!1&&(i==="paragraph"?e.value?.chain().focus().setParagraph().run():e.value?.chain().focus().toggleHeading({level:Number(i)}).run())};return(i,a)=>(m.openBlock(),m.createElementBlock("div",Z5e,[m.createElementVNode("div",J5e,[m.createElementVNode("div",{class:m.normalizeClass(["flex items-center w-max h-full",{"opacity-50 cursor-not-allowed":m.unref(e)?.isEditable===!1}])},[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(JM),o=>(m.openBlock(),m.createElementBlock("div",{key:o.value,class:m.normalizeClass(["w-[80px] h-full flex flex-col gap-[2px] items-center justify-center cursor-pointer flex-shrink-0 rounded-[5px]",{"bg-[#fff]":t.value===o.value,"cursor-not-allowed":m.unref(e)?.isEditable===!1}]),onClick:s=>r(o.value)},[m.createElementVNode("div",eBe,m.toDisplayString(o.label),1),m.createElementVNode("div",tBe,m.toDisplayString(o.element==="p"?"段落":o.element),1)],10,Q5e))),128))],2)])]))}}),rBe={class:"text-[14px]"},iu=m.defineComponent({__name:"MenusCheck",props:{ico:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},setup(n){const e=m.useAttrs(),t=(...r)=>{e.onMenuClickThrough?e.onMenuClickThrough(...r):e.onMenuClick&&e.onMenuClick(...r)};return(r,i)=>(m.openBlock(),m.createElementBlock("div",m.mergeProps({class:"w-check-item w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center gap-2 cursor-pointer"},m.unref(e),{onClick:t}),[m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont",`icon-${n.ico}`])},null,2),m.createElementVNode("div",rBe,m.toDisplayString(n.text),1)],16))}}),iBe=m.defineComponent({__name:"image",props:{hideText:{type:Boolean,default:!0},isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap"),r=i=>{e.value?.chain().focus().selectFiles(i,t.value).run()};return(i,a)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"image",text:"图片",onMenuClick:a[1]||(a[1]=o=>r("image"))})):(m.openBlock(),m.createBlock(An,{key:0,ico:"image",text:"插入图片","hide-text":n.hideText,onMenuClick:a[0]||(a[0]=o=>r("image"))},null,8,["hide-text"]))}}),aBe=m.defineComponent({__name:"audio",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"audio",text:"音频",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("audio",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"audio",text:"插入音频","hide-text":"",onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("audio",m.unref(t)).run())}))}}),oBe=m.defineComponent({__name:"video",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"video",text:"视频",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("video",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"video",text:"插入视频","hide-text":"",onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("video",m.unref(t)).run())}))}}),sBe=m.defineComponent({__name:"tag",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor");return(t,r)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"tag",text:"标签",onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().insertTag().run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"tag",text:"插入标签","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().insertTag().run())}))}}),lBe=m.defineComponent({__name:"file",props:{hideText:{type:Boolean,default:!0},isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor"),t=m.inject("uploadFileMap");return(r,i)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"add-file",text:"文件",onMenuClick:i[1]||(i[1]=a=>m.unref(e)?.chain().focus().selectFiles("file",m.unref(t)).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"add-file",text:"插入文件","hide-text":n.hideText,onMenuClick:i[0]||(i[0]=a=>m.unref(e)?.chain().focus().selectFiles("file",m.unref(t)).run())},null,8,["hide-text"]))}}),uBe=m.defineComponent({__name:"data-time",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=i=>zue(Que(),i).value,t=m.inject("editor"),r=({content:i,format:a,capitalize:o,value:s})=>{i&&t.value?.chain().insertDatetime({text:i.includes("自定义")?`[${i}]`:i,date:e(a),withTime:s==="withTime",format:a,capitalize:o}).focus().run()};return(i,a)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"date",text:"日期",onMenuClick:a[1]||(a[1]=o=>r({content:e("YYYY年M月D日"),format:"YYYY-MM-DD HH:mm:ss",capitalize:!0,value:"withTime"}))})):(m.openBlock(),m.createBlock(An,{key:0,ico:"date",text:"插入日期",shortcut:"Ctrl+B","hide-text":"",onMenuClick:a[0]||(a[0]=o=>r({content:e("YYYY年M月D日"),format:"YYYY-MM-DD HH:mm:ss",capitalize:!0,value:"withTime"}))}))}}),cBe=m.defineComponent({__name:"divider",props:{isInset:{type:Boolean,default:!1}},setup(n){const e=m.inject("editor");return(t,r)=>n.isInset?(m.openBlock(),m.createBlock(iu,{key:1,ico:"divider",text:"分隔线",onMenuClick:r[1]||(r[1]=i=>m.unref(e).chain().focus().setHr({type:"signle",color:"#000"}).run())})):(m.openBlock(),m.createBlock(An,{key:0,ico:"divider",text:"分隔线","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e).chain().focus().setHr({type:"signle",color:"#000"}).run())}))}}),fBe={class:"w-[310px] max-h-[400px] overflow-auto white-no-scrollbar"},dBe={class:"flex flex-wrap gap-[0.5rem]"},hBe=["onClick"],pBe=m.defineComponent({__name:"emoji-content",emits:["select"],setup(n,{emit:e}){const t=e,r=i=>{t("select",i)};return(i,a)=>(m.openBlock(),m.createElementBlock("div",fBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(t5e),(o,s)=>(m.openBlock(),m.createElementBlock(m.Fragment,{key:s},[m.createElementVNode("div",{class:m.normalizeClass(["text-[12px] text-[#666] mb-[10px]",s!==0?"mt-[10px]":""])},m.toDisplayString(o.label),3),m.createElementVNode("div",dBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(o.items.split(" "),(l,u)=>(m.openBlock(),m.createElementBlock("div",{key:u,class:"text-[25px] w-[32px] h-[32px] rounded-[4px] cursor-pointer flex items-center justify-center hover:bg-[#f1f2f2]",onClick:c=>r(l)},m.toDisplayString(l),9,hBe))),128))])],64))),128))]))}}),vBe=m.defineComponent({__name:"emoji",props:{hideText:{type:Boolean,default:!0},onSelectEmoji:{type:Function,default:void 0}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=a=>{e.onSelectEmoji?e.onSelectEmoji(a):t.value?.chain().focus().insertContent(a).run(),r.value=!1};return(a,o)=>(m.openBlock(),m.createBlock(il,{ico:"emoji",icoSize:16,text:"插入表情","hide-text":n.hideText,"popup-visible":r.value,"onUpdate:popupVisible":o[0]||(o[0]=s=>r.value=s),"popup-type":"select",placement:"right",trigger:"mouseenter"},{content:m.withCtx(()=>[m.createVNode(pBe,{onSelect:i})]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center justify-between cursor-pointer",{"bg-[#edeef2]":r.value}])},[...o[1]||(o[1]=[m.createElementVNode("span",{class:"inline-flex items-center gap-2"},[m.createElementVNode("i",{class:"w-iconfont icon-emoji"}),m.createElementVNode("span",{class:"text-[14px]"},"表情")],-1),m.createElementVNode("i",{class:"w-iconfont icon-right !text-[10px]"},null,-1)])],2)]),_:1},8,["hide-text","popup-visible"]))}}),gBe={class:"w-full text-center pb-2"},mBe={class:"w-[175px] h-[80px] flex items-center gap-[6px]"},yBe=["onMouseenter","onClick"],bBe=m.defineComponent({__name:"columns",setup(n){const e=m.inject("editor"),t=m.ref(!1),r=m.ref([1,2,3,4,5]),i=m.ref(0),a=s=>{i.value=s},o=s=>{e.value?.chain().focus().setColumns(s,!0).run(),e.value?.chain().focus().updateAttributes("columnBlock",{columnSize:s}).run(),t.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"column",icoSize:16,text:"插入分栏","hide-text":"","popup-visible":t.value,"onUpdate:popupVisible":l[0]||(l[0]=u=>t.value=u),"popup-type":"select",placement:"right",trigger:"mouseenter"},{content:m.withCtx(()=>[m.createElementVNode("div",gBe,m.toDisplayString(i.value)+" 分栏",1),m.createElementVNode("div",mBe,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(r.value,u=>(m.openBlock(),m.createElementBlock("div",{key:u,class:m.normalizeClass(["w-[30px] h-full bg-[rgba(23,26,29,0.06)] rounded-[4px] cursor-pointer flex-shrink-0",{"!bg-[#007bff]":i.value>=u}]),onMouseenter:c=>a(u),onClick:c=>o(u)},null,42,yBe))),128))])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:m.normalizeClass(["w-full rounded-[4px] hover:bg-[#edeef2] px-2 py-[0.3rem] inline-flex items-center justify-between cursor-pointer",{"bg-[#edeef2]":t.value}])},[...l[1]||(l[1]=[m.createElementVNode("span",{class:"inline-flex items-center gap-2"},[m.createElementVNode("i",{class:"w-iconfont icon-column"}),m.createTextVNode(),m.createElementVNode("span",{class:"text-[14px]"},"分栏")],-1),m.createElementVNode("i",{class:"w-iconfont icon-right !text-[10px]"},null,-1)])],2)]),_:1},8,["popup-visible"]))}}),xBe=m.defineComponent({__name:"code-block",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(iu,{ico:"code",text:"代码块",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().setCodeBlock().run())}))}}),_Be=m.defineComponent({__name:"web-page",setup(n){const e=m.inject("editor"),t=()=>{e.value?.chain().focus().setParagraph().run(),e.value?.chain().focus().setIframe({type:"",src:""}).run()};return(r,i)=>(m.openBlock(),m.createBlock(iu,{ico:"web-page",text:"网页",onMenuClick:i[0]||(i[0]=a=>t())}))}}),SBe=["disabled"],wBe={class:"w-[110px]"},Xz=m.defineComponent({__name:"insert-menu",props:{hideText:{type:Boolean,default:!1}},setup(n){const e=m.ref(!1),t=m.inject("editor");return(r,i)=>{const a=m.resolveDirective("tooltip");return m.openBlock(),m.createBlock(il,{ico:"add-circle",icoSize:16,text:"插入元素","hide-text":n.hideText,"popup-visible":e.value,"onUpdate:popupVisible":i[0]||(i[0]=o=>e.value=o),"popup-type":"select"},{content:m.withCtx(()=>[m.createElementVNode("div",wBe,[m.createVNode(iBe,{isInset:!0}),m.createVNode(aBe,{isInset:!0}),m.createVNode(oBe,{isInset:!0}),m.createVNode(lBe,{isInset:!0}),m.createVNode(sBe,{isInset:!0}),m.createVNode(uBe,{isInset:!0}),m.createVNode(cBe,{isInset:!0}),m.createVNode(vBe),m.createVNode(bBe),m.createVNode(xBe),m.createVNode(_Be)])]),default:m.withCtx(()=>[n.hideText?m.withDirectives((m.openBlock(),m.createElementBlock("button",{key:0,disabled:m.unref(t)?.isEditable===!1,class:m.normalizeClass(["white-editor-tool-item flex items-center justify-center gap-[6px] px-[7px]",{"is-disabled":m.unref(t)?.isEditable===!1}])},[...i[1]||(i[1]=[m.createElementVNode("i",{class:"w-iconfont icon-add-circle"},null,-1),m.createElementVNode("span",{class:"text-[14px]"},"插入",-1)])],10,SBe)),[[a,"插入元素"]]):m.createCommentVNode("",!0)]),_:1},8,["hide-text","popup-visible"])}}}),Zz=m.defineComponent({__name:"task-list",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"task-list",text:"任务列表",shortcut:"Ctrl+Shift+9","hide-text":"","menu-active":m.unref(e)?.isActive("taskList"),disabled:!m.unref(e)?.can().chain().focus().toggleTaskList().run(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().toggleTaskList().run())},null,8,["menu-active","disabled"]))}}),kBe={class:"flex w-full h-full"},TBe={key:0,class:"inline-flex items-center mx-auto"},CBe={class:"pr-[20px] flex-shrink-0"},EBe={class:"space-y-[6px] px-[20px] border-r border-l"},MBe={class:"space-x-[5px] flex"},ABe={class:"space-x-[5px] flex"},NBe={class:"space-y-[6px] px-[20px] border-r"},DBe={class:"space-x-[8px] flex"},OBe={class:"space-x-[5px] flex"},IBe={class:"space-y-[6px] px-[20px] border-r"},RBe={class:"space-x-[5px] flex"},LBe={class:"space-x-[5px] flex"},PBe={class:"px-[20px] border-r"},BBe={class:"space-x-[6px] pl-[20px] flex"},VBe={key:1,class:"inline-flex items-center gap-[10px] mx-auto"},zBe={class:"px-4 inline-flex items-center"},FBe=m.defineComponent({__name:"index",setup(n){const e=m.inject("page");return(t,r)=>(m.openBlock(),m.createElementBlock("div",kBe,[m.createVNode(kPe,{ref:"scrollableRef",class:"flex-1 h-full p-[10px]"},{default:m.withCtx(()=>[m.unref(e).toolbar==="double"?(m.openBlock(),m.createElementBlock("div",TBe,[m.createElementVNode("div",CBe,[m.createVNode(Xz)]),m.createElementVNode("div",EBe,[m.createElementVNode("div",MBe,[m.createVNode(Vz),m.createVNode(zz)]),m.createElementVNode("div",ABe,[m.createVNode(Fz),m.createVNode($z)])]),m.createElementVNode("div",NBe,[m.createElementVNode("div",DBe,[m.createVNode(jz),m.createVNode(Wz),m.createVNode(Y5e),m.createVNode(X5e)]),m.createElementVNode("div",OBe,[m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(Rz),m.createVNode(Iz),m.createVNode(Tz),m.createVNode(Cz)])]),m.createElementVNode("div",IBe,[m.createElementVNode("div",RBe,[m.createVNode(Nz),m.createVNode(Dz),m.createVNode(Oz),m.createVNode(Yz),m.createVNode(Bz),m.createVNode(Zz)]),m.createElementVNode("div",LBe,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(q5e),m.createVNode(K5e),m.createVNode(Lz),m.createVNode(Pz),m.createVNode(Hz)])]),m.createElementVNode("div",PBe,[m.createVNode(nBe)]),m.createElementVNode("div",BBe,[m.createVNode(Gz,{hideText:!1}),m.createVNode(QM,{hideText:!1}),m.createVNode(Uz,{hideText:!1})])])):(m.openBlock(),m.createElementBlock("div",VBe,[m.createVNode(Xz,{hideText:!0}),m.createVNode(Vz),m.createVNode(zz),m.createVNode(Fz),m.createVNode($z),m.createVNode(D5e),m.createVNode(jz),m.createVNode(Wz),m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(Tz),m.createVNode(Cz),m.createVNode(Nz),m.createVNode(Dz),m.createVNode(Zz),m.createVNode(Oz),m.createVNode(Yz),m.createVNode(XY),m.createVNode(Bz),m.createVNode(Rz),m.createVNode(Iz),m.createVNode(Hz),m.createVNode(Lz),m.createVNode(Pz),m.createVNode(QM),m.createVNode(Gz),m.createVNode(Uz)]))]),_:1},512),m.createElementVNode("div",zBe,[m.createVNode(CPe)])]))}}),$Be={class:"h-full flex items-center gap-[0.8rem]"},HBe={key:0,class:"min-w-[100px] flex items-center gap-[0.4rem] rounded hover:text-[#007aff] px-[0.4rem] py-[0.3rem] cursor-pointer select-none"},GBe=["onClick"],UBe={class:"text-[14px] font-[500]"},WBe={key:0,class:"text-[12px] ml-[0.4rem]"},jBe={key:0,class:"min-w-[100px] flex items-center gap-[0.4rem] rounded hover:text-[#007aff] px-[0.4rem] py-[0.3rem] cursor-pointer select-none"},qBe={class:"flex-1 text-center text-[14px]"},KBe={class:"w-[150px] flex flex-col gap-[0.8rem] text-[14px] px-[0.6rem]"},YBe={class:"flex justify-between"},XBe={class:"flex justify-between"},ZBe={class:"flex justify-between"},JBe={class:"flex justify-between"},QBe=m.defineComponent({__name:"FootLeft",setup(n){const e=m.ref(!1),t=m.ref(!1),r=m.inject("page"),i=m.inject("editor"),a=m.inject("options"),o=m.ref({characters:0,paragraphs:0,words:i.value.storage.characterCount?.words()||0,images:0,headings:0}),s=m.computed(()=>r.value.layout==="web"?"网页":r.value.size.key),l=c=>{if(r.value.layout=c.layout,c.layout&&c.layout==="web"){t.value=!1;return}const{label:f,width:d,height:h}=c;r.value.size={key:f,width:d,height:h},t.value=!1},u=()=>{if(!i.value)return;const{doc:c}=i.value.state;let f=0,d=0,h=0;c.descendants(v=>{v.type.name==="paragraph"&&f++,v.type.name==="image"&&d++,v.type.name==="heading"&&h++});const p=i.value.storage.characterCount?.characters()||0;o.value={characters:p,paragraphs:f,words:i.value.storage.characterCount?.words()||0,images:d,headings:h}};return m.watch(()=>i.value,(c,f)=>{f&&f.off("update",u),c&&(c.on("update",u),u())},{immediate:!0}),m.onBeforeUnmount(()=>{i.value&&i.value.off("update",u)}),(c,f)=>{const d=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock("div",$Be,[m.unref(a).layout.toc.show?m.withDirectives((m.openBlock(),m.createElementBlock("span",{key:0,class:m.normalizeClass(["cursor-pointer hover:bg-[#e8e8e8] p-[0.3rem] rounded",{"bg-[#e8e8e8]":m.unref(r).showToc}]),onClick:f[0]||(f[0]=h=>m.unref(r).showToc=!m.unref(r).showToc)},[...f[3]||(f[3]=[m.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},[m.createElementVNode("path",{d:"M369.0496 460.3392H184.32a81.92 81.92 0 0 1-81.92-81.92v-184.832a81.92 81.92 0 0 1 81.92-81.92h184.7296a81.92 81.92 0 0 1 81.92 81.92v184.832a81.92 81.92 0 0 1-81.92 81.92zM184.32 173.1072a20.48 20.48 0 0 0-20.48 20.48v184.832a20.48 20.48 0 0 0 20.48 20.48h184.7296a20.48 20.48 0 0 0 20.48-20.48v-184.832a20.48 20.48 0 0 0-20.48-20.48zM369.0496 914.688H184.32a81.92 81.92 0 0 1-81.92-81.92v-184.8832a81.92 81.92 0 0 1 81.92-81.92h184.7296a81.92 81.92 0 0 1 81.92 81.92v184.8832a81.92 81.92 0 0 1-81.92 81.92zM184.32 627.4048a20.48 20.48 0 0 0-20.48 20.48v184.8832a20.48 20.48 0 0 0 20.48 20.48h184.7296a20.48 20.48 0 0 0 20.48-20.48v-184.8832a20.48 20.48 0 0 0-20.48-20.48zM827.904 914.688h-184.8832a81.92 81.92 0 0 1-81.92-81.92v-184.8832a81.92 81.92 0 0 1 81.92-81.92h184.8832a81.92 81.92 0 0 1 81.92 81.92v184.8832a81.92 81.92 0 0 1-81.92 81.92z m-184.8832-287.2832a20.48 20.48 0 0 0-20.48 20.48v184.8832a20.48 20.48 0 0 0 20.48 20.48h184.8832a20.48 20.48 0 0 0 20.48-20.48v-184.8832a20.48 20.48 0 0 0-20.48-20.48z",fill:"#474A54","p-id":"15222"}),m.createElementVNode("path",{d:"M527.230586 280.884442m36.203867-36.203867l130.732164-130.732164q36.203867-36.203867 72.407735 0l130.732164 130.732164q36.203867 36.203867 0 72.407735l-130.732164 130.732164q-36.203867 36.203867-72.407735 0l-130.732164-130.732164q-36.203867-36.203867 0-72.407735Z",fill:"#FDA338","p-id":"15223"}),m.createElementVNode("path",{d:"M730.3168 493.4656a81.92 81.92 0 0 1-57.9072-23.9104L541.696 338.7904a81.92 81.92 0 0 1 0-115.8144L672.4096 92.16A81.92 81.92 0 0 1 788.48 92.16l130.7648 130.7136a81.92 81.92 0 0 1 0 115.8144L788.48 469.5552a81.92 81.92 0 0 1-58.1632 23.9104z m0-363.52a20.48 20.48 0 0 0-14.4896 5.9904L585.1136 266.24a20.48 20.48 0 0 0 0 28.9792l130.7136 130.7136a20.48 20.48 0 0 0 28.9792 0L875.52 295.3728a20.48 20.48 0 0 0 0-29.1328l-130.7136-130.56a20.48 20.48 0 0 0-14.4896-5.9904z",fill:"#474A54","p-id":"15224"})],-1)])],2)),[[d,m.unref(r).showToc?"关闭大纲":"打开大纲"]]):m.createCommentVNode("",!0),m.createVNode(js,{trigger:"click",placement:"top",value:t.value,"onUpdate:value":f[1]||(f[1]=h=>t.value=h),contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(a).dicts.pageSizeOption,(h,p)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["px-[12px] py-[7px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",s.value===h.label?"text-[#007aff]":""]),key:p,onClick:v=>l(h)},[m.createElementVNode("span",UBe,m.toDisplayString(h.label),1),h.width?(m.openBlock(),m.createElementBlock("span",WBe,m.toDisplayString(h.width)+" * "+m.toDisplayString(h.height)+"cm ",1)):m.createCommentVNode("",!0)],10,GBe))),128))]),default:m.withCtx(()=>[m.unref(a).layout.foot.pageSize?(m.openBlock(),m.createElementBlock("div",HBe,[f[4]||(f[4]=m.createElementVNode("span",{class:"flex-1 text-center text-[14px]"},"页面大小",-1)),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",t.value?"rotate-180":""])},null,2)])):m.createCommentVNode("",!0)]),_:1},8,["value"]),m.createVNode(js,{trigger:"click",value:e.value,"onUpdate:value":f[2]||(f[2]=h=>e.value=h),placement:"top"},{content:m.withCtx(()=>[m.createElementVNode("div",KBe,[m.createElementVNode("div",YBe,[f[5]||(f[5]=m.createElementVNode("span",{class:"w-[80px]"},"字符数:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.characters),1)]),m.createElementVNode("div",XBe,[f[6]||(f[6]=m.createElementVNode("span",{class:"w-[80px]"},"段落:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.paragraphs),1)]),m.createElementVNode("div",ZBe,[f[7]||(f[7]=m.createElementVNode("span",{class:"w-[80px]"},"图片:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.images),1)]),m.createElementVNode("div",JBe,[f[8]||(f[8]=m.createElementVNode("span",{class:"w-[80px]"},"标题:",-1)),m.createTextVNode(" "+m.toDisplayString(o.value.headings),1)])])]),default:m.withCtx(()=>[m.unref(a).layout.foot.character?(m.openBlock(),m.createElementBlock("div",jBe,[m.createElementVNode("span",qBe,m.toDisplayString(o.value.characters)+" 字符",1),m.createElementVNode("i",{class:m.normalizeClass(["w-iconfont icon-bottom !text-[8px] transition-transform duration-200",e.value?"rotate-180":""])},null,2)])):m.createCommentVNode("",!0)]),_:1},8,["value"])])}}});var V1={exports:{}},e8e=V1.exports,Jz;function t8e(){return Jz||(Jz=1,(function(n,e){(function(t,r){r()})(e8e,function(){function t(u,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,f){var d=new XMLHttpRequest;d.open("GET",u),d.responseType="blob",d.onload=function(){l(d.response,c,f)},d.onerror=function(){console.error("could not download file")},d.send()}function i(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function a(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Dy=="object"&&Dy.global===Dy?Dy:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,f){var d=o.URL||o.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?a(h):i(h.href)?r(u,c,f):a(h,h.target="_blank")):(h.href=d.createObjectURL(u),setTimeout(function(){d.revokeObjectURL(h.href)},4e4),setTimeout(function(){a(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,f){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(t(u,f),c);else if(i(u))r(u,c,f);else{var d=document.createElement("a");d.href=u,d.target="_blank",setTimeout(function(){a(d)})}}:function(u,c,f,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,f);var h=u.type==="application/octet-stream",p=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||h&&p||s)&&typeof FileReader<"u"){var g=new FileReader;g.onloadend=function(){var _=g.result;_=v?_:_.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=_:location=_,d=null},g.readAsDataURL(u)}else{var y=o.URL||o.webkitURL,b=y.createObjectURL(u);d?d.location=b:location.href=b,d=null,setTimeout(function(){y.revokeObjectURL(b)},4e4)}});o.saveAs=l.saveAs=l,n.exports=l})})(V1)),V1.exports}var n8e=t8e();const r8e=()=>{const n=document.createElement("iframe");return n.style.width="0",n.style.height="0",n.style.position="absolute",n.style.right="0",n.style.top="0",n.style.border="0",document.body.appendChild(n),n},i8e=async(n,e)=>{const t=r8e(),r=t.contentWindow;if(!t.contentDocument||!r)return;t.contentDocument.write(n),t.contentDocument.close();const i=()=>{console.log("handleLoadIframe"),r.focus(),r.print()},a=()=>{t.removeEventListener("load",i),r.removeEventListener("afterprint",a),document.body.removeChild(t),e()};t.addEventListener("load",i),r.addEventListener("afterprint",a)},a8e=m.defineComponent({__name:"print",setup(n){const e=m.inject("options"),t=m.inject("container"),r=m.inject("page"),i=m.computed(()=>e.value?.dicts?.lineHeights?.find(c=>c.default)?.value??1.7),a=()=>{const c=document.querySelector(`#${t.value} .white-editor-container`)?.outerHTML??"";return s(c)},o=()=>Array.from(document.querySelectorAll("link, style")).map(c=>c.outerHTML).join(""),s=c=>{const f=document.createElement("div");f.innerHTML=c;const d=f.querySelectorAll(".white-chart-node");for(const h of d){const p=dW(h);if(p){const v=p.getDataURL({type:"png",pixelRatio:2,backgroundColor:"#fff"}),g=document.createElement("img");g.src=v,g.style.width="100%",h?.parentNode?.replaceChild(g,h)}}return f.innerHTML},l=()=>{const{size:c,margin:f}=r.value;return`
|
|
314
314
|
<!DOCTYPE html>
|
|
315
315
|
<html lang="zh-CN">
|
|
316
316
|
<head>
|
|
@@ -368,6 +368,6 @@ echarts.use([`+F+"]);":"Unknown series "+V))}return}if(f==="tooltip"){if(_){proc
|
|
|
368
368
|
});
|
|
369
369
|
<\/script>
|
|
370
370
|
</body>
|
|
371
|
-
</html>`},u=async()=>{a8e(l(),()=>{console.log("打印完成")})};return(c,f)=>(m.openBlock(),m.createElementBlock("div",{class:"px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",onClick:f[0]||(f[0]=d=>u())},[...f[1]||(f[1]=[m.createElementVNode("i",{class:"w-iconfont icon-export-pdf"},null,-1),m.createTextVNode(" 导出为PDF ",-1)])]))}}),s8e={class:"flex items-center gap-[20px] text-[#333] foot-action"},l8e={key:0,class:"cursor-pointer flex items-center gap-[0.4rem] text-[14px] hover:text-[#007aff]"},u8e=m.defineComponent({__name:"FootRight",setup(n){const e=m.inject("editor"),t=m.inject("options"),r=async()=>{if(!e.value)return;const a=e.value.getHTML(),{toClipboard:o}=lN();await o(a)},i=()=>{if(!e.value)return;const a=new Blob([e.value.getText()],{type:"text/plain;charset=utf-8"}),{title:o}=t.value.document??{},s=o!==""?t.value?.document?.title:"无标题文档";r8e.saveAs(a,`${s}.txt`)};return(a,o)=>(m.openBlock(),m.createElementBlock("div",s8e,[m.unref(t).layout.foot.copy?(m.openBlock(),m.createElementBlock("span",{key:0,class:"cursor-pointer flex items-center gap-[0.4rem] text-[14px] hover:text-[#007aff]",onClick:o[0]||(o[0]=s=>r())},[...o[2]||(o[2]=[m.createElementVNode("i",{class:"w-iconfont icon-copy-content"},null,-1),m.createTextVNode(" 复制全文 ",-1)])])):m.createCommentVNode("",!0),m.createVNode(js,{trigger:"click",placement:"top",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",onClick:o[1]||(o[1]=s=>i())},[...o[4]||(o[4]=[m.createElementVNode("i",{class:"w-iconfont icon-text"},null,-1),m.createTextVNode(" 导出为文本 ",-1)])]),m.createVNode(o8e)]),default:m.withCtx(()=>[m.unref(t).layout.foot.download?(m.openBlock(),m.createElementBlock("span",l8e,[...o[3]||(o[3]=[m.createElementVNode("i",{class:"w-iconfont icon-down"},null,-1),m.createTextVNode(" 下载 ",-1)])])):m.createCommentVNode("",!0)]),_:1})]))}}),c8e={class:"w-full h-full flex items-center justify-between"},f8e=m.defineComponent({__name:"index",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",c8e,[m.createVNode(e8e),m.createVNode(u8e)]))}}),d8e=["width","height"],h8e={class:"text-[#666]"},p8e=m.defineComponent({__name:"Nodata",props:{size:{default:"1em"},top:{default:"30%"},title:{default:"暂无数据"}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",{class:"flex items-center justify-center flex-col gap-2",style:m.normalizeStyle({paddingTop:n.top})},[(m.openBlock(),m.createElementBlock("svg",{t:"1766712532477",class:"icon",viewBox:"0 0 1030 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:n.size,height:n.size},[...t[0]||(t[0]=[m.createStaticVNode('<path d="M927.053254 896q0 1.254249-0.496852 2.508497t-1.484497 2.508497q-0.993704 1.248189-2.48426 2.49032-1.478438 1.248189-3.453728 2.48426-1.969231 1.230012-4.429254 2.447905-2.453964 1.217893-5.392663 2.423669-2.938698 1.199716-6.343953 2.381254-3.405254 1.187598-7.277065 2.3449-3.87787 1.163361-8.198059 2.302485-4.320189 1.133065-9.088757 2.241893t-9.967338 2.181302q-5.210888 1.084592-10.82168 2.126769-5.616852 1.048237-11.645728 2.060119-6.022817 1.005822-12.439479 1.97529-6.422722 0.969467-13.208994 1.90258-6.792331 0.933112-13.948213 1.817751-7.149822 0.890698-14.645018 1.738982-7.495195 0.842225-15.311527 1.635977-7.822391 0.799811-15.94168 1.551148-8.125349 0.745278-16.541539 1.442082-8.404071 0.702864-17.086863 1.345137-8.670675 0.648331-17.589776 1.24213-8.919101 0.593799-18.068449 1.127006-9.14329 0.539266-18.480474 1.01794-9.349302 0.484734-18.874319 0.908876-9.518959 0.424142-19.201515 0.787693-9.676497 0.36355-19.492355 0.666508-9.809799 0.302959-19.728663 0.551385-9.918864 0.242367-19.928615 0.430201-9.997633 0.181775-20.067977 0.302959-10.064284 0.127243-20.170982 0.187834-10.100639 0.060592-20.213396 0.060592-10.118817 0-20.219456-0.060592-10.100639-0.060592-20.164923-0.181775-10.070343-0.121183-20.074035-0.302959-10.003692-0.187834-19.922557-0.43626-9.924923-0.242367-19.734722-0.545325-9.815858-0.309018-19.492355-0.672568-9.676497-0.36355-19.201514-0.787693-9.518959-0.424142-18.868261-0.908876-9.343243-0.478675-18.486532-1.01794-9.14329-0.533207-18.062391-1.127006t-17.595834-1.24213q-8.676734-0.642272-17.086864-1.345137-8.41013-0.696805-16.535479-1.442082-8.11929-0.751337-15.935622-1.551148-7.822391-0.793751-15.317585-1.635977-7.495195-0.848284-14.651077-1.732923-7.149822-0.890698-13.936095-1.817751-6.798391-0.933112-13.208994-1.908639-6.422722-0.969467-12.445539-1.981349-6.028876-1.005822-11.645727-2.05406-5.622911-1.042178-10.821681-2.12071t-9.967337-2.187361q-4.768568-1.108828-9.088757-2.241893-4.326249-1.139124-8.19806-2.302485-3.871811-1.157302-7.277065-2.3449-3.411314-1.181538-6.343952-2.387313-2.938698-1.199716-5.392663-2.423669-2.460024-1.211834-4.435314-2.447905-1.969231-1.230012-3.453728-2.478201-1.484497-1.24213-2.478201-2.49032-0.987645-1.254249-1.484497-2.508497-0.496852-1.254249-0.496852-2.508497 0-1.260308 0.496852-2.514556t1.484497-2.508497q0.993704-1.248189 2.478201-2.49032 1.484497-1.24213 3.453728-2.478201 1.97529-1.230012 4.435314-2.453964 2.453964-1.211834 5.392663-2.423669 2.932639-1.199716 6.343952-2.381255 3.405254-1.181538 7.271006-2.344899 3.87787-1.163361 8.198059-2.302485 4.326249-1.133065 9.094817-2.241894 4.768568-1.108828 9.967337-2.181301 5.198769-1.084592 10.821681-2.12677 5.616852-1.042178 11.645727-2.060118 6.022817-1.005822 12.43948-1.97529 6.422722-0.969467 13.208994-1.90258 6.792331-0.933112 13.942154-1.817751 7.149822-0.890698 14.651077-1.732923 7.495195-0.848284 15.311526-1.642036 7.816331-0.799811 15.941681-1.551148 8.125349-0.745278 16.535479-1.442083 8.41013-0.702864 17.086864-1.345136 8.676734-0.648331 17.595834-1.24213 8.919101-0.58774 18.062391-1.127006 9.149349-0.539266 18.486532-1.017941 9.349302-0.484734 18.868261-0.908875 9.525018-0.424142 19.207574-0.787693 9.676497-0.36355 19.486295-0.666509 9.815858-0.302959 19.734722-0.551384 9.918864-0.242367 19.922557-0.430201 10.003692-0.181775 20.074035-0.302959 10.058225-0.127243 20.164923-0.187834 10.100639-0.060592 20.219456-0.060592 10.118817 0 20.213396 0.060592 10.106698 0.060592 20.170982 0.181775 10.064284 0.121183 20.067977 0.309018 10.009751 0.181775 19.928615 0.424142 9.918864 0.248426 19.728663 0.557443 9.815858 0.302959 19.492355 0.666509 9.682556 0.36355 19.207574 0.787693 9.518959 0.424142 18.862201 0.908875 9.343243 0.484734 18.486533 1.017941 9.149349 0.539266 18.068449 1.127006 8.919101 0.593799 17.595835 1.24213 8.676734 0.642272 17.086864 1.345136 8.41013 0.696805 16.535479 1.442083 8.11929 0.751337 15.935621 1.551148 7.816331 0.793751 15.317586 1.635976 7.495195 0.848284 14.645018 1.738983 7.149822 0.884639 13.948213 1.817751 6.786272 0.933112 13.208994 1.90258 6.416663 0.969467 12.439479 1.981349 6.028876 1.011882 11.645728 2.054059 5.616852 1.042178 10.82168 2.12071 5.198769 1.078533 9.967338 2.187361t9.088757 2.241894q4.326249 1.139124 8.198059 2.302485t7.271006 2.344899q3.411314 1.181538 6.350012 2.387314 2.938698 1.199716 5.392663 2.423669 2.460024 1.211834 4.423195 2.447905 1.981349 1.236071 3.465846 2.478201 1.484497 1.24213 2.478201 2.49032 0.987645 1.254249 1.484497 2.508497 0.496852 1.254249 0.496852 2.514556z" fill="#007bff" opacity=".1"></path><path d="M117.426746 376.832c0 8.70703 6.695385 15.36 15.450887 15.36 8.755503 0 15.450888-6.65297 15.450888-15.36 0-8.70097-6.695385-15.36-15.450888-15.36-8.240473 0-15.450888 7.168-15.450887 15.36z m814.776804 455.16497c-19.571124 5.12-23.691361 9.222059-28.326627 28.16303-5.150296-19.449941-9.270533-23.552-28.326627-28.16303 19.056095-5.12 23.691361-9.209941 28.326627-28.15697 4.635266 18.94703 8.755503 23.552 28.326627 28.15697zM203.436686 323.07503c-25.23645 6.65297-30.386746 11.77297-37.08213 36.864-6.695385-25.08497-11.84568-30.21103-37.08213-36.864 25.23645-6.65903 30.386746-12.288 37.08213-36.864 6.180355 25.08497 11.84568 30.20497 37.08213 36.864z m618.035503-88.064c-15.450888 4.096-18.541065 7.168-22.661301 22.528-4.120237-15.36-7.210414-18.432-22.661302-22.528 15.450888-4.096 18.541065-7.168 22.661302-22.528 3.605207 15.36 7.210414 18.432 22.661301 22.528z m66.438817-78.848c-40.172308 10.24-48.412781 18.94097-59.228402 58.87697-10.300592-39.929941-19.056095-48.128-59.228403-58.87697 40.172308-10.24 48.412781-18.94703 59.228403-58.88303 10.300592 39.42703 19.056095 48.128 59.228402 58.88303z" fill="#007bff" opacity=".5"></path><path d="M422.32426 713.21297v4.096l33.991953 31.23503 130.302485-62.97903-117.941775 75.26703v36.864l19.056095-18.432v-0.51503 0.51503l19.056094 18.432 100.945799-122.88v-4.096l-185.410651 42.49297z" fill="#007bff" opacity=".2"></path><path d="M865.249704 551.936v-1.024c0-1.024-0.51503-1.53297-0.515029-2.55697v-0.51503L754.003314 260.61103c-15.965917-48.64303-61.288521-81.41103-112.79148-81.41103H389.362367c-51.502959 0-96.825562 32.768-112.791479 81.41103L165.839527 547.84v0.51503c-0.51503 1.024-0.51503 1.53297-0.51503 2.55697v206.848c0 65.02097 53.048047 117.76 118.456805 117.76h463.526627c65.408757 0 118.456805-52.73903 118.456805-117.76v-204.8c-0.51503-0.50897-0.51503-0.50897-0.51503-1.024zM305.412544 271.36q0-0.50897 0.51503-0.50897c11.330651-36.864 45.322604-60.93103 83.434793-60.93103h251.334438c38.112189 0 72.104142 24.06703 83.949822 60.416q0 0.51503 0.51503 0.51503l102.490887 266.24H592.284024c-8.755503 0-15.450888 6.65297-15.450888 15.36 0 33.792-27.811598 61.44-61.80355 61.44-33.991953 0-61.80355-27.648-61.80355-61.44 0-8.70703-6.695385-15.36-15.450888-15.36H202.921657l102.490887-265.73103zM834.347929 757.76c0 48.128-39.142249 87.04-87.55503 87.04h-463.526627c-48.412781 0-87.55503-38.912-87.555029-87.04V568.32h228.158106c7.210414 43.52303 45.322604 76.8 91.160237 76.8 45.837633 0 83.949822-33.27697 91.160236-76.8H834.347929v189.44z" fill="#007bff" opacity=".5"></path><path d="M515.029586 578.566059c-14.420828 0-25.751479-11.264-25.751479-25.6v-51.2H254.939645l84.464852-219.136 0.51503-1.024c7.210414-21.504 26.781538-35.84 49.44284-35.84h251.334438c22.661302 0 42.232426 14.336 49.44284 35.84l0.51503 1.024 84.464852 219.136H540.781065v51.2c0 14.336-11.330651 25.6-25.751479 25.6z" fill="#007bff" opacity=".2"></path>',5)])],8,d8e)),m.createElementVNode("p",h8e,m.toDisplayString(n.title),1)],4))}}),v8e={class:"w-[260px] h-full flex flex-col overflow-hidden"},g8e={key:0,class:"h-[50px] flex-none flex items-center px-4 text-[15px] text-[#666] hover:text-[#333]"},m8e={class:"overflow-y-auto min-h-0"},y8e={key:0,class:"flex-1 px-4 py-2 space-y-[0.3rem]"},b8e=["onClick"],x8e=m.defineComponent({__name:"EditorToc",setup(n){const e=m.inject("editor"),t=m.inject("page"),r=m.inject("options"),i=m.ref([]),a=m.ref(""),o=Oue(()=>{i.value=e.value.storage.tableOfContents.content},200);m.watch(()=>e.value?.storage.tableOfContents.content,()=>{o()},{immediate:!0});const s=l=>{if(!e.value)return;a.value=l.id;const u=e.value.view.dom.querySelector(`[data-toc-id="${l.id}"]`);if(!u)return;u.scrollIntoView({behavior:"smooth"});const c=e.value.view.posAtDOM(u,0),{tr:f}=e.value.view.state,d=f.doc.nodeAt(c);if(d){const h=c+d.nodeSize;f.setSelection(Ut.create(f.doc,h))}else f.setSelection(new Ut(f.doc.resolve(c)));e.value.view.dispatch(f),e.value.view.focus()};return(l,u)=>(m.openBlock(),m.createElementBlock("div",v8e,[m.unref(r).layout.foot.show?(m.openBlock(),m.createElementBlock("div",g8e,[m.createElementVNode("span",{class:"flex items-center gap-2 cursor-pointer",onClick:u[0]||(u[0]=c=>m.unref(t).showToc=!1)},[...u[1]||(u[1]=[m.createElementVNode("i",{class:"w-iconfont icon-left !text-[12px]"},null,-1),m.createTextVNode(" 收起大纲 ",-1)])])])):m.createCommentVNode("",!0),m.createElementVNode("div",m8e,[i.value?.length?(m.openBlock(),m.createElementBlock("ul",y8e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,c=>(m.openBlock(),m.createElementBlock("li",{key:c.id,class:m.normalizeClass(["cursor-pointer text-[#333] text-[14px] h-[34px] block leading-[34px] pr-2 hover:text-[#101219] rounded text-ellipsis overflow-hidden whitespace-nowrap",a.value===c.id?"font-bold bg-[#f5f5f5]":""]),style:m.normalizeStyle({textIndent:`${c.level}rem`}),onClick:f=>s(c)},m.toDisplayString(c.textContent),15,b8e))),128))])):(m.openBlock(),m.createBlock(p8e,{key:1,size:"120px"}))])]))}}),_8e=m.defineComponent({__name:"flip",setup(n){const e=m.inject("editor"),t=m.computed(()=>{const a=e.value?Fl(e.value):null;return a?.type?.name?e.value?.getAttributes(a?.type?.name)?.flipY:!1}),r=m.computed(()=>{const a=e.value?Fl(e.value):null;return a?.type?.name?e.value?.getAttributes(a?.type?.name)?.flipX:!1}),i=a=>{const o=e.value?Fl(e.value):null,{flipX:s,flipY:l}=o?.attrs??{};o&&a==="flipX"&&e.value?.commands.updateAttributes(o.type,{flipX:!s}),o&&a==="flipY"&&e.value?.commands.updateAttributes(o.type,{flipY:!l})};return(a,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"flip-x",text:"水平翻转","hide-text":"","menu-active":t.value,onMenuClick:o[0]||(o[0]=s=>i("flipY"))},null,8,["menu-active"]),m.createVNode(An,{ico:"flip-y",text:"垂直翻转","hide-text":"","menu-active":r.value,onMenuClick:o[1]||(o[1]=s=>i("flipX"))},null,8,["menu-active"])],64))}}),JY=m.defineComponent({__name:"open",setup(n){const e=m.inject("editor"),t=()=>{const r=e.value?Fl(e?.value):null;window.open(r?.attrs.src)};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"open",text:"新窗口打开",shortcut:"Backspace","hide-text":"",onMenuClick:t}))}}),S8e=m.defineComponent({__name:"covert",setup(n){const e=m.inject("editor"),t=m.computed(()=>(e.value?Fl(e.value):null)?.type?.name==="inlineImage"?"转为节点图片":"转为行内图片"),r=()=>{const i=e.value?Fl(e.value):null;if(i){const a=i?.type?.name==="inlineImage"?"inlineImage":"image",o=i.attrs??{};!o.error&&o.src&&(e.value?.chain().focus().deleteSelectionNode().run(),a==="inlineImage"?e.value?.chain().focus().setImage({...o,equalProportion:!1,inline:!1}).run():e.value?.chain().focus().setInlineImage({...o,inline:!0,equalProportion:!1}).run())}};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"huantu",text:t.value,"hide-text":"",onMenuClick:r},null,8,["text"]))}}),Rd=m.defineComponent({__name:"delete",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"remove",text:"删除",shortcut:"Backspace","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteSelectionNode().run())}))}}),w8e={class:"flex items-center gap-2"},k8e=m.defineComponent({__name:"image-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",w8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(_8e),m.createVNode(S8e),m.createVNode(JY),m.createVNode(Rd)]))}}),T8e=m.defineComponent({__name:"down",setup(n){const e=m.inject("editor"),t=()=>{const r=e.value?Fl(e.value):null,i=document.createElement("a");i.href=r?.attrs.url,i.download=r?.attrs.name,i&&(document.body.appendChild(i),i.click(),document.body.removeChild(i))};return(r,i)=>m.unref(e)?.getAttributes("file")?.uploaded?(m.openBlock(),m.createBlock(An,{key:0,ico:"down",text:"下载","hide-text":"",onMenuClick:i[0]||(i[0]=a=>t())})):m.createCommentVNode("",!0)}}),C8e={class:"flex items-center gap-2"},E8e=m.defineComponent({__name:"file-menu",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock("div",C8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.unref(e)?.isActive("file")||m.unref(e)?.isActive("video")||m.unref(e)?.isActive("audio")?(m.openBlock(),m.createBlock(T8e,{key:0})):m.createCommentVNode("",!0),m.createVNode(Rd)]))}}),M8e=m.defineComponent({__name:"cell-background",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#007bff"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1;const l=s===""?null:s;t.value?.chain().focus().setCellAttribute("background",l).run()},o=aA(s=>{i.value=s,r.value=!1;const l=s===""?null:s;t.value?.chain().focus().setCellAttribute("background",l).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"fill",text:"填充背景","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),disabled:!m.unref(t)?.can().setCellAttribute("background",""),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:i.value})},null,4)]),_:1},8,["popup-visible","disabled"]))}}),A8e=m.defineComponent({__name:"cell-insert",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"charutop",text:"上方插入一行","hide-text":n.hideText,disabled:!m.unref(e)?.can().addRowBefore(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().addRowBefore().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charubottom",text:"下方插入一行","hide-text":n.hideText,disabled:!m.unref(e)?.can().addRowAfter(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().addRowAfter().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charuleft",text:"左方插入一列","hide-text":n.hideText,disabled:!m.unref(e)?.can().addColumnBefore(),onMenuClick:r[2]||(r[2]=i=>m.unref(e)?.chain().focus().addColumnBefore().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charuright",text:"右方插入一列","hide-text":n.hideText,disabled:!m.unref(e)?.can().addColumnAfter(),onMenuClick:r[3]||(r[3]=i=>m.unref(e)?.chain().focus().addColumnAfter().run())},null,8,["hide-text","disabled"])],64))}}),N8e=m.defineComponent({__name:"cell-delete",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"removehang",text:"删除行","hide-text":n.hideText,disabled:!m.unref(e)?.can().deleteColumn(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteRow().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"removelie",text:"删除列","hide-text":n.hideText,disabled:!m.unref(e)?.can().deleteColumn(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().deleteColumn().run())},null,8,["hide-text","disabled"])],64))}}),D8e=m.defineComponent({__name:"cell-merge",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"merge-cell",text:"合并单元格","hide-text":n.hideText,disabled:!m.unref(e)?.can().mergeCells(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().mergeCells().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"split-cell",text:"拆分单元格","hide-text":n.hideText,disabled:!m.unref(e)?.can().splitCell(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().splitCell().run())},null,8,["hide-text","disabled"])],64))}}),O8e=m.defineComponent({__name:"table-delete",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"remove",text:"删除表格",shortcut:"Backspace","hide-text":"",disabled:!m.unref(e)?.can().deleteTable(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteTable().run())},null,8,["disabled"]))}}),I8e={class:"flex items-center gap-2"},R8e=m.defineComponent({__name:"table-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",I8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(M8e),m.createVNode(A8e),m.createVNode(N8e),m.createVNode(D8e),m.createVNode(O8e)]))}}),L8e=m.defineComponent({__name:"tag-input",setup(n){const e=m.ref(""),t=m.inject("editor"),r=()=>{if(e.value==="")return;t.value?.state?.selection?.$from?.node()&&t.value?.commands.updateAttributes("tag",{text:e.value})},i=()=>{const a=t.value?.getAttributes("tag");a?.text&&(e.value=a.text)};return m.onMounted(()=>{i(),t.value?.on("selectionUpdate",i)}),m.onBeforeUnmount(()=>{t.value?.off("selectionUpdate")}),(a,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(lm,{placeholder:"请输入标签",value:e.value,"onUpdate:value":o[0]||(o[0]=s=>e.value=s),size:"small"},null,8,["value"]),m.createVNode(Wo,{type:"primary",size:"small",onClick:o[1]||(o[1]=s=>r())},{default:m.withCtx(()=>[...o[2]||(o[2]=[m.createTextVNode("确认",-1)])]),_:1})],64))}}),P8e={class:"px-2"},B8e=["onClick"],V8e=m.defineComponent({__name:"tag-color",setup(n){const e=m.inject("editor"),t=m.ref("#007bff"),r=m.ref(!1),i=[{label:"蓝色",color:"#007bff",bgcolor:"rgb(217, 231, 255)"},{label:"红色",color:"rgba(200, 78, 67, 1)",bgcolor:"rgb(252, 223, 220)"},{label:"黄色",color:"rgba(240, 196, 23, 1)",bgcolor:"rgb(255, 245, 210)"},{label:"绿色",color:"rgba(5, 205, 153, 1)",bgcolor:"rgb(205, 245, 235)"},{label:"紫色",color:"#e6afff",bgcolor:"rgb(220, 223, 252)"}],a=s=>{e.value?.state?.selection?.$from?.node()&&e.value?.commands.updateAttributes("tag",{type:s.type,color:s.color,backgroundColor:s.bgcolor}),t.value=s?.bgcolor,r.value=!1},o=()=>{e.value?.state?.selection?.$from?.node()&&e.value?.commands.updateAttributes("tag",{type:"default",color:"#999",backgroundColor:"rgba(0, 0, 0, 0.05)"}),t.value="rgba(0, 0, 0, 0.05)",r.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(wS,{ico:"fill",text:"高亮填充","hide-text":"",onMenuClick:l[1]||(l[1]=u=>a()),maxHeight:!1,"popup-visible":r.value,"onUpdate:popupVisible":l[2]||(l[2]=u=>r.value=u)},{content:m.withCtx(()=>[m.createElementVNode("div",P8e,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(i,(u,c)=>m.createElementVNode("div",{key:c,onClick:f=>a(u),style:m.normalizeStyle({backgroundColor:u.bgcolor}),class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer"},[l[3]||(l[3]=m.createElementVNode("i",{class:"w-iconfont icon-tumo !text-[14px]"},null,-1)),m.createTextVNode(" "+m.toDisplayString(u.label),1)],12,B8e)),64)),m.createElementVNode("div",{class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer border",onClick:l[0]||(l[0]=u=>o())},[...l[4]||(l[4]=[m.createElementVNode("i",{class:"w-iconfont icon-clear-format !text-[14px]"},null,-1),m.createTextVNode(" 清除 ",-1)])])])]),_:1},8,["popup-visible"]))}}),z8e={class:"flex items-center gap-2"},F8e=m.defineComponent({__name:"tag-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",z8e,[m.createVNode(L8e),m.createVNode(V8e),m.createVNode(Rd)]))}}),$8e=m.defineComponent({__name:"ai-operation",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=()=>{t.value=!0,e.value?.commands.focus()};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"ai-assistant",text:"AI智能助手","hide-text":"",onMenuClick:r}))}}),H8e={class:"px-2"},G8e=["onClick"],U8e=m.defineComponent({__name:"high-background",setup(n){const e=m.inject("editor"),t=m.ref("#007bff"),r=m.ref(!1),i=[{label:"默认",bgcolor:"#007bff"},{label:"红色",bgcolor:"#ff8a8a"},{label:"黄色",bgcolor:"#ffff8a"},{label:"绿色",bgcolor:"#a7ffa7"},{label:"紫色",bgcolor:"#e6afff"},{label:"蓝色",bgcolor:"#83d3ff"}],a=s=>{if(!s){e.value?.chain().focus().setHighlight({color:i[0].bgcolor}).run();return}t.value=s?.bgcolor,e.value?.chain().focus().setHighlight({color:s.bgcolor}).run(),r.value=!1},o=()=>{e.value?.chain().focus().unsetHighlight().run(),t.value="#007bff",r.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(wS,{ico:"fill",text:"高亮填充","hide-text":"",onMenuClick:l[1]||(l[1]=u=>a()),maxHeight:!1,"popup-visible":r.value,"onUpdate:popupVisible":l[2]||(l[2]=u=>r.value=u)},{content:m.withCtx(()=>[m.createElementVNode("div",H8e,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(i,(u,c)=>m.createElementVNode("div",{key:c,onClick:f=>a(u),style:m.normalizeStyle({backgroundColor:u.bgcolor}),class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer"},[l[3]||(l[3]=m.createElementVNode("i",{class:"w-iconfont icon-tumo !text-[14px]"},null,-1)),m.createTextVNode(" "+m.toDisplayString(u.label),1)],12,G8e)),64)),m.createElementVNode("div",{class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer border",onClick:l[0]||(l[0]=u=>o())},[...l[4]||(l[4]=[m.createElementVNode("i",{class:"w-iconfont icon-clear-format !text-[14px]"},null,-1),m.createTextVNode(" 清除 ",-1)])])])]),_:1},8,["popup-visible"]))}}),W8e={class:"flex items-center gap-2"},j8e=m.defineComponent({__name:"text-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",W8e,[m.createVNode($8e),m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(XY),m.createVNode(U8e),m.createVNode(Rd)]))}}),q8e={class:"flex items-center gap-2"},K8e={key:0,class:"flex items-center gap-2 py-2 px-1"},Y8e={class:"flex-1 h-[90px] flex flex-col justify-between gap-1"},X8e={class:"mb-2"},Z8e={class:"flex items-center gap-2"},J8e=["innerHTML"],Q8e={key:1,class:"text-[12px] text-[#999]"},e6e=["onClick"],t6e=["innerHTML"],n6e={class:"flex items-center gap-2"},r6e=m.defineComponent({__name:"iframe-menu",setup(n){const e=m.inject("editor"),t=m.ref(),r=m.ref(""),i=m.ref(""),a=m.computed(()=>qv.find(l=>l.value===i.value)),o=l=>{i.value=l.value,t.value?.changePopoverVisible(!1)},s=()=>{const{validate:l,transformURL:u}=qv.find(c=>c.value===i.value);l&&!l(r.value)||e.value.chain().focus().setParagraph().setIframe({type:i.value,src:u?u(r.value):r.value}).run()};return(l,u)=>(m.openBlock(),m.createElementBlock("div",q8e,[m.unref(e)?.getAttributes("iframe").src==""?(m.openBlock(),m.createElementBlock("div",K8e,[u[3]||(u[3]=m.createElementVNode("div",{class:"flex flex-col items-center gap-1 h-[80px]"},[m.createElementVNode("span",{class:"w-[24px] h-[24px] text-center rounded-full bg-[#007bff] text-[12px] text-[#fff] font-500",style:{"line-height":"24px"}}," 1 "),m.createElementVNode("div",{class:"w-[1px] flex-1 bg-[#e5e5e5]"}),m.createElementVNode("span",{class:"w-[24px] h-[24px] text-center rounded-full bg-[#007bff] text-[12px] text-[#fff] font-500",style:{"line-height":"24px"}}," 2 ")],-1)),m.createElementVNode("div",Y8e,[m.createElementVNode("div",X8e,[m.createVNode(wg,{value:i.value,"onUpdate:value":u[0]||(u[0]=c=>i.value=c),options:m.unref(qv),placeholder:"选择网页类型",class:"w-full",ref_key:"selectRef",ref:t},{main:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(qv),(c,f)=>(m.openBlock(),m.createElementBlock("div",{key:c.value,class:m.normalizeClass(["flex items-center gap-2 h-[32px] px-2 cursor-pointer rounded-[4px] hover:bg-[rgb(242,243,245)]",{"bg-[rgb(242,243,245)]":i.value===c.value,"mb-1":f!==m.unref(qv).length-1}]),onClick:d=>o(c)},[m.createElementVNode("span",{innerHTML:c.icon},null,8,t6e),m.createTextVNode(" "+m.toDisplayString(c.label),1)],10,e6e))),128))]),default:m.withCtx(()=>[m.createElementVNode("div",Z8e,[a.value&&Object.keys(a.value).length?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.createElementVNode("span",{innerHTML:a.value.icon},null,8,J8e),m.createTextVNode(" "+m.toDisplayString(a.value.label),1)],64)):(m.openBlock(),m.createElementBlock("span",Q8e,"选择网页类型"))])]),_:1},8,["value","options"])]),m.createElementVNode("div",n6e,[m.createVNode(lm,{value:r.value,"onUpdate:value":u[1]||(u[1]=c=>r.value=c),placeholder:"打开网址复制链接,以http:// 或 https:// 开头",class:"w-[300px]"},null,8,["value"]),m.createVNode(Wo,{type:"primary",size:"small",disabled:!r.value,onClick:s},{default:m.withCtx(()=>[...u[2]||(u[2]=[m.createTextVNode("添加",-1)])]),_:1},8,["disabled"])])])])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(JY),m.createVNode(Rd)],64))]))}}),i6e={class:"flex items-center gap-2"},a6e=m.defineComponent({__name:"echarts-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",i6e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(QM,{icon:"setting",text:"图表配置",isEdit:!0}),m.createVNode(Rd)]))}}),o6e="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='14'%20cy='14'%20r='11.0833'%20fill='%23258AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.8581%2011.2155C11.9065%2011.1088%2012.058%2011.1088%2012.1064%2011.2155L14.6199%2016.7534C14.6609%2016.8437%2014.5948%2016.9461%2014.4957%2016.9461H11.6756C11.461%2016.9461%2011.2663%2017.072%2011.1782%2017.2677L10.7355%2018.2514C10.6273%2018.492%2010.8033%2018.7642%2011.0671%2018.7642H16.0477C16.7417%2018.7642%2017.2037%2018.0471%2016.9169%2017.4152L12.8512%208.45725C12.5122%207.71045%2011.4515%207.71057%2011.1127%208.45743L6.67056%2018.2504C6.56136%2018.4911%206.73737%2018.7642%207.00171%2018.7642H8.08241C8.29645%2018.7642%208.49072%2018.639%208.57914%2018.4441L11.8581%2011.2155ZM19.373%2018.4441C19.4614%2018.639%2019.6557%2018.7642%2019.8698%2018.7642H20.9504C21.2147%2018.7642%2021.3907%2018.4911%2021.2816%2018.2504L16.7334%208.22172C16.645%208.02677%2016.4508%207.90156%2016.2367%207.90156L15.156%207.90156C14.8917%207.90156%2014.7157%208.17464%2014.8249%208.41537L19.373%2018.4441Z'%20fill='white'/%3e%3c/svg%3e",s6e=["maxlength","disabled"],l6e=["disabled","loading"],u6e={key:0,class:"w-iconfont icon-send"},c6e={key:1,class:"w-iconfont icon-loading animate-spin"},f6e=["innerHTML"],d6e={class:"flex items-center gap-2 text-handle"},h6e=m.defineComponent({__name:"assistant",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=m.inject("options"),i=m.ref(null),a=m.ref(""),o=m.ref({prompt:"",content:"",error:!1}),s=m.ref(!1),l=m.ref(600),u=async()=>{s.value=!0,o.value.error=!1,o.value.prompt="",o.value.content="";const y={lang:"",input:e.value?QLe(e.value):"",command:a},b={html:e.value?.getHTML()??"",text:e.value?.getText()??"",json:e.value?.getJSON()??{}};try{const _=await r.value.ai?.sendMessage?.(y,b),x=()=>{o.value.content.startsWith("[ERROR]: ")&&(o.value.error=!0,o.value.content=o.value.content.replace("[ERROR]: ",""))};if(_ instanceof ReadableStream){const T=new WritableStream({write(k){x(),o.value.content+=k},close(){s.value=!1,o.value.command=a}});_.pipeTo(T);return}if(_X(_)){s.value=!1,o.value.command=a,x(),o.value.content=_;return}console.error('"ai.assistant.onMessage" method returns data in an incorrect format, it can be a ReadableStream or plain text.')}catch(_){console.error(_),t.value=!1}},c=()=>{t.value=!1,e.value?.commands.focus()},f=()=>{e.value?.chain().insertContent(o.value.content).run(),c()},d=()=>{const{to:y}=e.value?.state.selection??{};y&&e.value?.chain().insertContentAt(y,o.value.content).focus().run(),c()},h=()=>{e.value?.commands.selectParentNode();const{to:y}=e.value?.state.selection??{};y&&e.value?.chain().insertContentAt(y,o.value.content).focus().run(),c()},p=async()=>{const{toClipboard:y}=lN();await y(o.value.content)},v=()=>{const{command:y}=o.value;y&&(a.value=y),u()},g=()=>{a.value="",o.value.prompt="",o.value.content=""};return(y,b)=>{const _=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:"relative flex items-center gap-4 h-[50px] border-b px-3 white-ai-wrapper",style:m.normalizeStyle({width:`${l.value}px`})},[b[7]||(b[7]=m.createElementVNode("div",{class:"flex-shrink-0"},[m.createElementVNode("img",{src:o6e,alt:"ai",class:"w-8 h-8"})],-1)),m.withDirectives(m.createElementVNode("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":b[0]||(b[0]=x=>a.value=x),class:m.normalizeClass(["flex-1 outline-none h-full",{"input-disabled":s.value}]),maxlength:m.unref(r).ai?.maxlength,disabled:s.value,autocomplete:"false",placeholder:"告诉AI下一步怎么做"},null,10,s6e),[[m.vModelText,a.value]]),m.createElementVNode("button",{class:"ai-button",disabled:s.value,loading:s.value,onClick:u},[s.value?(m.openBlock(),m.createElementBlock("i",c6e)):(m.openBlock(),m.createElementBlock("i",u6e))],8,l6e)],4),o.value.content?(m.openBlock(),m.createElementBlock("div",{key:0,class:"w-full px-3 py-2",style:m.normalizeStyle({width:`${l.value}px`})},[m.createElementVNode("div",{class:m.normalizeClass(["w-full min-h-[50px] overflow-y-auto line-clamp-6 result-content",{error:o.value.error}]),innerHTML:o.value.content},null,10,f6e),m.createElementVNode("div",d6e,[m.createVNode(Wo,{type:"primary",size:"small",onClick:b[1]||(b[1]=x=>f())},{default:m.withCtx(()=>[...b[8]||(b[8]=[m.createTextVNode("替换所选",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[2]||(b[2]=x=>h())},{default:m.withCtx(()=>[...b[9]||(b[9]=[m.createTextVNode("插入下方",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[3]||(b[3]=x=>d())},{default:m.withCtx(()=>[...b[10]||(b[10]=[m.createTextVNode("插入后方",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[4]||(b[4]=x=>g())},{default:m.withCtx(()=>[...b[11]||(b[11]=[m.createTextVNode("放弃",-1)])]),_:1}),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-copy-text",onClick:b[5]||(b[5]=x=>p())},null,512),[[_,"复制"]]),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-refresh",onClick:b[6]||(b[6]=x=>v())},null,512),[[_,"重新生成"]])])],4)):m.createCommentVNode("",!0)],64)}}}),p6e=m.defineComponent({__name:"index",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=m.ref(null),i=m.ref({appendTo:"parent",maxWidth:600,zIndex:110,onShow(a){r.value=a},onHide(){t.value=!1},onDestroy(){r.value=null}});return m.watch(()=>[t.value],a=>{r.value&&r.value?.setProps({placement:a.includes(!0)?"bottom":"top"})}),m.onUnmounted(()=>{r.value&&(r.value.destroy(),r.value=null)}),(a,o)=>(m.openBlock(),m.createBlock(m.unref(Tae),{class:m.normalizeClass(["white-editor-bubble-menu rounded-md",{"px-3 py-2":!m.unref(t)}]),editor:m.unref(e),"tippy-options":i.value},{default:m.withCtx(()=>[m.unref(t)?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.unref(e)?.isActive("toc")||m.unref(e)?.isActive("pageBreak")||m.unref(e)?.isActive("horizontalRule")||m.unref(e)?.isActive("codeBlock")||m.unref(e)?.getAttributes("image").error?(m.openBlock(),m.createBlock(Rd,{key:0})):m.unref(e)?.isActive("image")&&!m.unref(e)?.getAttributes("image").error||m.unref(e)?.isActive("inlineImage")&&!m.unref(e)?.getAttributes("inlineImage").error?(m.openBlock(),m.createBlock(k8e,{key:1})):m.unref(e)?.isActive("video")||m.unref(e)?.isActive("audio")||m.unref(e)?.isActive("file")?(m.openBlock(),m.createBlock(E8e,{key:2})):m.unref(e)?.isActive("iframe")?(m.openBlock(),m.createBlock(r6e,{key:3})):m.unref(e)?.isActive("table")?(m.openBlock(),m.createBlock(R8e,{key:4})):m.unref(e)?.isActive("tag")?(m.openBlock(),m.createBlock(F8e,{key:5})):m.unref(e)?.isActive("echarts")?(m.openBlock(),m.createBlock(a6e,{key:6})):(m.openBlock(),m.createBlock(j8e,{key:7}))],64)),m.unref(t)?(m.openBlock(),m.createBlock(h6e,{key:1})):m.createCommentVNode("",!0)]),_:1},8,["class","editor","tippy-options"]))}}),v6e={key:0,class:"w-full h-[4rem]"},g6e={key:1,class:"w-full h-[4rem]"},m6e=m.defineComponent({__name:"index",setup(n){const e=m.inject("editor"),t=m.inject("page"),r=m.computed(()=>{const{width:a,height:o}=t.value.size??{width:0,height:0};return{width:a,height:o}}),i=m.computed(()=>t.value.layout==="web"?"100%":`calc(${r.value.width}cm * 1)`);return(a,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-editor-container min-h-full mx-auto overflow-hidden relative flex flex-col",m.unref(t).layout==="page"?"shadow-[0_0_10px_rgba(0,0,0,0.1)] bg-white":""]),style:m.normalizeStyle({width:i.value})},[m.unref(t).layout==="page"?(m.openBlock(),m.createElementBlock("div",v6e)):m.createCommentVNode("",!0),m.createVNode(m.unref(Eae),{editor:m.unref(e),class:m.normalizeClass(["white-editor-content flex-1 flex flex-col",{"is-empty":m.unref(e)?.isEmpty&&m.unref(e)?.state.doc.childCount<=1,"is-readonly":m.unref(e)?.editable,"format-painter":m.unref(e)?.view?.painter?.enabled}])},null,8,["editor","class"]),m.unref(t).layout==="page"?(m.openBlock(),m.createElementBlock("div",g6e)):m.createCommentVNode("",!0),m.unref(e)?(m.openBlock(),m.createBlock(p6e,{key:2})):m.createCommentVNode("",!0)],6))}}),y6e=n=>n&&typeof n=="string"&&!n.startsWith("<")?(console.log(n.split(`
|
|
371
|
+
</html>`},u=async()=>{i8e(l(),()=>{console.log("打印完成")})};return(c,f)=>(m.openBlock(),m.createElementBlock("div",{class:"px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",onClick:f[0]||(f[0]=d=>u())},[...f[1]||(f[1]=[m.createElementVNode("i",{class:"w-iconfont icon-export-pdf"},null,-1),m.createTextVNode(" 导出为PDF ",-1)])]))}}),o8e={class:"flex items-center gap-[20px] text-[#333] foot-action"},s8e={key:0,class:"cursor-pointer flex items-center gap-[0.4rem] text-[14px] hover:text-[#007aff]"},l8e=m.defineComponent({__name:"FootRight",setup(n){const e=m.inject("editor"),t=m.inject("options"),r=async()=>{if(!e.value)return;const a=e.value.getHTML(),{toClipboard:o}=lN();await o(a)},i=()=>{if(!e.value)return;const a=new Blob([e.value.getText()],{type:"text/plain;charset=utf-8"}),{title:o}=t.value.document??{},s=o!==""?t.value?.document?.title:"无标题文档";n8e.saveAs(a,`${s}.txt`)};return(a,o)=>(m.openBlock(),m.createElementBlock("div",o8e,[m.unref(t).layout.foot.copy?(m.openBlock(),m.createElementBlock("span",{key:0,class:"cursor-pointer flex items-center gap-[0.4rem] text-[14px] hover:text-[#007aff]",onClick:o[0]||(o[0]=s=>r())},[...o[2]||(o[2]=[m.createElementVNode("i",{class:"w-iconfont icon-copy-content"},null,-1),m.createTextVNode(" 复制全文 ",-1)])])):m.createCommentVNode("",!0),m.createVNode(js,{trigger:"click",placement:"top",contentStyle:{padding:"6px 0",boxShadow:"0 6px 16px 0 rgba(0, 0, 0, 0.08)"}},{content:m.withCtx(()=>[m.createElementVNode("div",{class:"px-[12px] py-[5px] flex items-center gap-[0.4rem] cursor-pointer hover:bg-[rgb(242,243,245)]",onClick:o[1]||(o[1]=s=>i())},[...o[4]||(o[4]=[m.createElementVNode("i",{class:"w-iconfont icon-text"},null,-1),m.createTextVNode(" 导出为文本 ",-1)])]),m.createVNode(a8e)]),default:m.withCtx(()=>[m.unref(t).layout.foot.download?(m.openBlock(),m.createElementBlock("span",s8e,[...o[3]||(o[3]=[m.createElementVNode("i",{class:"w-iconfont icon-down"},null,-1),m.createTextVNode(" 下载 ",-1)])])):m.createCommentVNode("",!0)]),_:1})]))}}),u8e={class:"w-full h-full flex items-center justify-between"},c8e=m.defineComponent({__name:"index",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",u8e,[m.createVNode(QBe),m.createVNode(l8e)]))}}),f8e=["width","height"],d8e={class:"text-[#666]"},h8e=m.defineComponent({__name:"Nodata",props:{size:{default:"1em"},top:{default:"30%"},title:{default:"暂无数据"}},setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",{class:"flex items-center justify-center flex-col gap-2",style:m.normalizeStyle({paddingTop:n.top})},[(m.openBlock(),m.createElementBlock("svg",{t:"1766712532477",class:"icon",viewBox:"0 0 1030 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:n.size,height:n.size},[...t[0]||(t[0]=[m.createStaticVNode('<path d="M927.053254 896q0 1.254249-0.496852 2.508497t-1.484497 2.508497q-0.993704 1.248189-2.48426 2.49032-1.478438 1.248189-3.453728 2.48426-1.969231 1.230012-4.429254 2.447905-2.453964 1.217893-5.392663 2.423669-2.938698 1.199716-6.343953 2.381254-3.405254 1.187598-7.277065 2.3449-3.87787 1.163361-8.198059 2.302485-4.320189 1.133065-9.088757 2.241893t-9.967338 2.181302q-5.210888 1.084592-10.82168 2.126769-5.616852 1.048237-11.645728 2.060119-6.022817 1.005822-12.439479 1.97529-6.422722 0.969467-13.208994 1.90258-6.792331 0.933112-13.948213 1.817751-7.149822 0.890698-14.645018 1.738982-7.495195 0.842225-15.311527 1.635977-7.822391 0.799811-15.94168 1.551148-8.125349 0.745278-16.541539 1.442082-8.404071 0.702864-17.086863 1.345137-8.670675 0.648331-17.589776 1.24213-8.919101 0.593799-18.068449 1.127006-9.14329 0.539266-18.480474 1.01794-9.349302 0.484734-18.874319 0.908876-9.518959 0.424142-19.201515 0.787693-9.676497 0.36355-19.492355 0.666508-9.809799 0.302959-19.728663 0.551385-9.918864 0.242367-19.928615 0.430201-9.997633 0.181775-20.067977 0.302959-10.064284 0.127243-20.170982 0.187834-10.100639 0.060592-20.213396 0.060592-10.118817 0-20.219456-0.060592-10.100639-0.060592-20.164923-0.181775-10.070343-0.121183-20.074035-0.302959-10.003692-0.187834-19.922557-0.43626-9.924923-0.242367-19.734722-0.545325-9.815858-0.309018-19.492355-0.672568-9.676497-0.36355-19.201514-0.787693-9.518959-0.424142-18.868261-0.908876-9.343243-0.478675-18.486532-1.01794-9.14329-0.533207-18.062391-1.127006t-17.595834-1.24213q-8.676734-0.642272-17.086864-1.345137-8.41013-0.696805-16.535479-1.442082-8.11929-0.751337-15.935622-1.551148-7.822391-0.793751-15.317585-1.635977-7.495195-0.848284-14.651077-1.732923-7.149822-0.890698-13.936095-1.817751-6.798391-0.933112-13.208994-1.908639-6.422722-0.969467-12.445539-1.981349-6.028876-1.005822-11.645727-2.05406-5.622911-1.042178-10.821681-2.12071t-9.967337-2.187361q-4.768568-1.108828-9.088757-2.241893-4.326249-1.139124-8.19806-2.302485-3.871811-1.157302-7.277065-2.3449-3.411314-1.181538-6.343952-2.387313-2.938698-1.199716-5.392663-2.423669-2.460024-1.211834-4.435314-2.447905-1.969231-1.230012-3.453728-2.478201-1.484497-1.24213-2.478201-2.49032-0.987645-1.254249-1.484497-2.508497-0.496852-1.254249-0.496852-2.508497 0-1.260308 0.496852-2.514556t1.484497-2.508497q0.993704-1.248189 2.478201-2.49032 1.484497-1.24213 3.453728-2.478201 1.97529-1.230012 4.435314-2.453964 2.453964-1.211834 5.392663-2.423669 2.932639-1.199716 6.343952-2.381255 3.405254-1.181538 7.271006-2.344899 3.87787-1.163361 8.198059-2.302485 4.326249-1.133065 9.094817-2.241894 4.768568-1.108828 9.967337-2.181301 5.198769-1.084592 10.821681-2.12677 5.616852-1.042178 11.645727-2.060118 6.022817-1.005822 12.43948-1.97529 6.422722-0.969467 13.208994-1.90258 6.792331-0.933112 13.942154-1.817751 7.149822-0.890698 14.651077-1.732923 7.495195-0.848284 15.311526-1.642036 7.816331-0.799811 15.941681-1.551148 8.125349-0.745278 16.535479-1.442083 8.41013-0.702864 17.086864-1.345136 8.676734-0.648331 17.595834-1.24213 8.919101-0.58774 18.062391-1.127006 9.149349-0.539266 18.486532-1.017941 9.349302-0.484734 18.868261-0.908875 9.525018-0.424142 19.207574-0.787693 9.676497-0.36355 19.486295-0.666509 9.815858-0.302959 19.734722-0.551384 9.918864-0.242367 19.922557-0.430201 10.003692-0.181775 20.074035-0.302959 10.058225-0.127243 20.164923-0.187834 10.100639-0.060592 20.219456-0.060592 10.118817 0 20.213396 0.060592 10.106698 0.060592 20.170982 0.181775 10.064284 0.121183 20.067977 0.309018 10.009751 0.181775 19.928615 0.424142 9.918864 0.248426 19.728663 0.557443 9.815858 0.302959 19.492355 0.666509 9.682556 0.36355 19.207574 0.787693 9.518959 0.424142 18.862201 0.908875 9.343243 0.484734 18.486533 1.017941 9.149349 0.539266 18.068449 1.127006 8.919101 0.593799 17.595835 1.24213 8.676734 0.642272 17.086864 1.345136 8.41013 0.696805 16.535479 1.442083 8.11929 0.751337 15.935621 1.551148 7.816331 0.793751 15.317586 1.635976 7.495195 0.848284 14.645018 1.738983 7.149822 0.884639 13.948213 1.817751 6.786272 0.933112 13.208994 1.90258 6.416663 0.969467 12.439479 1.981349 6.028876 1.011882 11.645728 2.054059 5.616852 1.042178 10.82168 2.12071 5.198769 1.078533 9.967338 2.187361t9.088757 2.241894q4.326249 1.139124 8.198059 2.302485t7.271006 2.344899q3.411314 1.181538 6.350012 2.387314 2.938698 1.199716 5.392663 2.423669 2.460024 1.211834 4.423195 2.447905 1.981349 1.236071 3.465846 2.478201 1.484497 1.24213 2.478201 2.49032 0.987645 1.254249 1.484497 2.508497 0.496852 1.254249 0.496852 2.514556z" fill="#007bff" opacity=".1"></path><path d="M117.426746 376.832c0 8.70703 6.695385 15.36 15.450887 15.36 8.755503 0 15.450888-6.65297 15.450888-15.36 0-8.70097-6.695385-15.36-15.450888-15.36-8.240473 0-15.450888 7.168-15.450887 15.36z m814.776804 455.16497c-19.571124 5.12-23.691361 9.222059-28.326627 28.16303-5.150296-19.449941-9.270533-23.552-28.326627-28.16303 19.056095-5.12 23.691361-9.209941 28.326627-28.15697 4.635266 18.94703 8.755503 23.552 28.326627 28.15697zM203.436686 323.07503c-25.23645 6.65297-30.386746 11.77297-37.08213 36.864-6.695385-25.08497-11.84568-30.21103-37.08213-36.864 25.23645-6.65903 30.386746-12.288 37.08213-36.864 6.180355 25.08497 11.84568 30.20497 37.08213 36.864z m618.035503-88.064c-15.450888 4.096-18.541065 7.168-22.661301 22.528-4.120237-15.36-7.210414-18.432-22.661302-22.528 15.450888-4.096 18.541065-7.168 22.661302-22.528 3.605207 15.36 7.210414 18.432 22.661301 22.528z m66.438817-78.848c-40.172308 10.24-48.412781 18.94097-59.228402 58.87697-10.300592-39.929941-19.056095-48.128-59.228403-58.87697 40.172308-10.24 48.412781-18.94703 59.228403-58.88303 10.300592 39.42703 19.056095 48.128 59.228402 58.88303z" fill="#007bff" opacity=".5"></path><path d="M422.32426 713.21297v4.096l33.991953 31.23503 130.302485-62.97903-117.941775 75.26703v36.864l19.056095-18.432v-0.51503 0.51503l19.056094 18.432 100.945799-122.88v-4.096l-185.410651 42.49297z" fill="#007bff" opacity=".2"></path><path d="M865.249704 551.936v-1.024c0-1.024-0.51503-1.53297-0.515029-2.55697v-0.51503L754.003314 260.61103c-15.965917-48.64303-61.288521-81.41103-112.79148-81.41103H389.362367c-51.502959 0-96.825562 32.768-112.791479 81.41103L165.839527 547.84v0.51503c-0.51503 1.024-0.51503 1.53297-0.51503 2.55697v206.848c0 65.02097 53.048047 117.76 118.456805 117.76h463.526627c65.408757 0 118.456805-52.73903 118.456805-117.76v-204.8c-0.51503-0.50897-0.51503-0.50897-0.51503-1.024zM305.412544 271.36q0-0.50897 0.51503-0.50897c11.330651-36.864 45.322604-60.93103 83.434793-60.93103h251.334438c38.112189 0 72.104142 24.06703 83.949822 60.416q0 0.51503 0.51503 0.51503l102.490887 266.24H592.284024c-8.755503 0-15.450888 6.65297-15.450888 15.36 0 33.792-27.811598 61.44-61.80355 61.44-33.991953 0-61.80355-27.648-61.80355-61.44 0-8.70703-6.695385-15.36-15.450888-15.36H202.921657l102.490887-265.73103zM834.347929 757.76c0 48.128-39.142249 87.04-87.55503 87.04h-463.526627c-48.412781 0-87.55503-38.912-87.555029-87.04V568.32h228.158106c7.210414 43.52303 45.322604 76.8 91.160237 76.8 45.837633 0 83.949822-33.27697 91.160236-76.8H834.347929v189.44z" fill="#007bff" opacity=".5"></path><path d="M515.029586 578.566059c-14.420828 0-25.751479-11.264-25.751479-25.6v-51.2H254.939645l84.464852-219.136 0.51503-1.024c7.210414-21.504 26.781538-35.84 49.44284-35.84h251.334438c22.661302 0 42.232426 14.336 49.44284 35.84l0.51503 1.024 84.464852 219.136H540.781065v51.2c0 14.336-11.330651 25.6-25.751479 25.6z" fill="#007bff" opacity=".2"></path>',5)])],8,f8e)),m.createElementVNode("p",d8e,m.toDisplayString(n.title),1)],4))}}),p8e={class:"w-[260px] h-full flex flex-col overflow-hidden"},v8e={key:0,class:"h-[50px] flex-none flex items-center px-4 text-[15px] text-[#666] hover:text-[#333]"},g8e={class:"overflow-y-auto min-h-0"},m8e={key:0,class:"flex-1 px-4 py-2 space-y-[0.3rem]"},y8e=["onClick"],b8e=m.defineComponent({__name:"EditorToc",setup(n){const e=m.inject("editor"),t=m.inject("page"),r=m.inject("options"),i=m.ref([]),a=m.ref(""),o=Oue(()=>{i.value=e.value.storage.tableOfContents.content},200);m.watch(()=>e.value?.storage.tableOfContents.content,()=>{o()},{immediate:!0});const s=l=>{if(!e.value)return;a.value=l.id;const u=e.value.view.dom.querySelector(`[data-toc-id="${l.id}"]`);if(!u)return;u.scrollIntoView({behavior:"smooth"});const c=e.value.view.posAtDOM(u,0),{tr:f}=e.value.view.state,d=f.doc.nodeAt(c);if(d){const h=c+d.nodeSize;f.setSelection(Ut.create(f.doc,h))}else f.setSelection(new Ut(f.doc.resolve(c)));e.value.view.dispatch(f),e.value.view.focus()};return(l,u)=>(m.openBlock(),m.createElementBlock("div",p8e,[m.unref(r).layout.foot.show?(m.openBlock(),m.createElementBlock("div",v8e,[m.createElementVNode("span",{class:"flex items-center gap-2 cursor-pointer",onClick:u[0]||(u[0]=c=>m.unref(t).showToc=!1)},[...u[1]||(u[1]=[m.createElementVNode("i",{class:"w-iconfont icon-left !text-[12px]"},null,-1),m.createTextVNode(" 收起大纲 ",-1)])])])):m.createCommentVNode("",!0),m.createElementVNode("div",g8e,[i.value?.length?(m.openBlock(),m.createElementBlock("ul",m8e,[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(i.value,c=>(m.openBlock(),m.createElementBlock("li",{key:c.id,class:m.normalizeClass(["cursor-pointer text-[#333] text-[14px] h-[34px] block leading-[34px] pr-2 hover:text-[#101219] rounded text-ellipsis overflow-hidden whitespace-nowrap",a.value===c.id?"font-bold bg-[#f5f5f5]":""]),style:m.normalizeStyle({textIndent:`${c.level}rem`}),onClick:f=>s(c)},m.toDisplayString(c.textContent),15,y8e))),128))])):(m.openBlock(),m.createBlock(h8e,{key:1,size:"120px"}))])]))}}),x8e=m.defineComponent({__name:"flip",setup(n){const e=m.inject("editor"),t=m.computed(()=>{const a=e.value?Fl(e.value):null;return a?.type?.name?e.value?.getAttributes(a?.type?.name)?.flipY:!1}),r=m.computed(()=>{const a=e.value?Fl(e.value):null;return a?.type?.name?e.value?.getAttributes(a?.type?.name)?.flipX:!1}),i=a=>{const o=e.value?Fl(e.value):null,{flipX:s,flipY:l}=o?.attrs??{};o&&a==="flipX"&&e.value?.commands.updateAttributes(o.type,{flipX:!s}),o&&a==="flipY"&&e.value?.commands.updateAttributes(o.type,{flipY:!l})};return(a,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"flip-x",text:"水平翻转","hide-text":"","menu-active":t.value,onMenuClick:o[0]||(o[0]=s=>i("flipY"))},null,8,["menu-active"]),m.createVNode(An,{ico:"flip-y",text:"垂直翻转","hide-text":"","menu-active":r.value,onMenuClick:o[1]||(o[1]=s=>i("flipX"))},null,8,["menu-active"])],64))}}),JY=m.defineComponent({__name:"open",setup(n){const e=m.inject("editor"),t=()=>{const r=e.value?Fl(e?.value):null;window.open(r?.attrs.src)};return(r,i)=>(m.openBlock(),m.createBlock(An,{ico:"open",text:"新窗口打开",shortcut:"Backspace","hide-text":"",onMenuClick:t}))}}),_8e=m.defineComponent({__name:"covert",setup(n){const e=m.inject("editor"),t=m.computed(()=>(e.value?Fl(e.value):null)?.type?.name==="inlineImage"?"转为节点图片":"转为行内图片"),r=()=>{const i=e.value?Fl(e.value):null;if(i){const a=i?.type?.name==="inlineImage"?"inlineImage":"image",o=i.attrs??{};!o.error&&o.src&&(e.value?.chain().focus().deleteSelectionNode().run(),a==="inlineImage"?e.value?.chain().focus().setImage({...o,equalProportion:!1,inline:!1}).run():e.value?.chain().focus().setInlineImage({...o,inline:!0,equalProportion:!1}).run())}};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"huantu",text:t.value,"hide-text":"",onMenuClick:r},null,8,["text"]))}}),Rd=m.defineComponent({__name:"delete",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"remove",text:"删除",shortcut:"Backspace","hide-text":"",onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteSelectionNode().run())}))}}),S8e={class:"flex items-center gap-2"},w8e=m.defineComponent({__name:"image-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",S8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(x8e),m.createVNode(_8e),m.createVNode(JY),m.createVNode(Rd)]))}}),k8e=m.defineComponent({__name:"down",setup(n){const e=m.inject("editor"),t=()=>{const r=e.value?Fl(e.value):null,i=document.createElement("a");i.href=r?.attrs.url,i.download=r?.attrs.name,i&&(document.body.appendChild(i),i.click(),document.body.removeChild(i))};return(r,i)=>m.unref(e)?.getAttributes("file")?.uploaded?(m.openBlock(),m.createBlock(An,{key:0,ico:"down",text:"下载","hide-text":"",onMenuClick:i[0]||(i[0]=a=>t())})):m.createCommentVNode("",!0)}}),T8e={class:"flex items-center gap-2"},C8e=m.defineComponent({__name:"file-menu",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock("div",T8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.unref(e)?.isActive("file")||m.unref(e)?.isActive("video")||m.unref(e)?.isActive("audio")?(m.openBlock(),m.createBlock(k8e,{key:0})):m.createCommentVNode("",!0),m.createVNode(Rd)]))}}),E8e=m.defineComponent({__name:"cell-background",props:{text:{type:String,default:""},defaultColor:{type:String,default:"#007bff"}},setup(n){const e=n,t=m.inject("editor"),r=m.ref(!1),i=m.ref(e.defaultColor),a=s=>{i.value=s,r.value=!1;const l=s===""?null:s;t.value?.chain().focus().setCellAttribute("background",l).run()},o=aA(s=>{i.value=s,r.value=!1;const l=s===""?null:s;t.value?.chain().focus().setCellAttribute("background",l).run()},200);return m.watch(()=>i.value,s=>{o(s)}),(s,l)=>(m.openBlock(),m.createBlock(il,{ico:"fill",text:"填充背景","hide-text":"","popup-visible":r.value,"onUpdate:popupVisible":l[1]||(l[1]=u=>r.value=u),disabled:!m.unref(t)?.can().setCellAttribute("background",""),"popup-type":"arrow",onMenuClick:l[2]||(l[2]=u=>a(i.value))},{content:m.withCtx(()=>[m.createVNode(m.unref(VO),{modelValue:i.value,"onUpdate:modelValue":l[0]||(l[0]=u=>i.value=u)},null,8,["modelValue"])]),default:m.withCtx(()=>[m.createElementVNode("div",{class:"w-[14px] h-[2px] mx-auto",style:m.normalizeStyle({backgroundColor:i.value})},null,4)]),_:1},8,["popup-visible","disabled"]))}}),M8e=m.defineComponent({__name:"cell-insert",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"charutop",text:"上方插入一行","hide-text":n.hideText,disabled:!m.unref(e)?.can().addRowBefore(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().addRowBefore().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charubottom",text:"下方插入一行","hide-text":n.hideText,disabled:!m.unref(e)?.can().addRowAfter(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().addRowAfter().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charuleft",text:"左方插入一列","hide-text":n.hideText,disabled:!m.unref(e)?.can().addColumnBefore(),onMenuClick:r[2]||(r[2]=i=>m.unref(e)?.chain().focus().addColumnBefore().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"charuright",text:"右方插入一列","hide-text":n.hideText,disabled:!m.unref(e)?.can().addColumnAfter(),onMenuClick:r[3]||(r[3]=i=>m.unref(e)?.chain().focus().addColumnAfter().run())},null,8,["hide-text","disabled"])],64))}}),A8e=m.defineComponent({__name:"cell-delete",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"removehang",text:"删除行","hide-text":n.hideText,disabled:!m.unref(e)?.can().deleteColumn(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteRow().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"removelie",text:"删除列","hide-text":n.hideText,disabled:!m.unref(e)?.can().deleteColumn(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().deleteColumn().run())},null,8,["hide-text","disabled"])],64))}}),N8e=m.defineComponent({__name:"cell-merge",props:{hideText:{type:Boolean,default:!0}},setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(An,{ico:"merge-cell",text:"合并单元格","hide-text":n.hideText,disabled:!m.unref(e)?.can().mergeCells(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().mergeCells().run())},null,8,["hide-text","disabled"]),m.createVNode(An,{ico:"split-cell",text:"拆分单元格","hide-text":n.hideText,disabled:!m.unref(e)?.can().splitCell(),onMenuClick:r[1]||(r[1]=i=>m.unref(e)?.chain().focus().splitCell().run())},null,8,["hide-text","disabled"])],64))}}),D8e=m.defineComponent({__name:"table-delete",setup(n){const e=m.inject("editor");return(t,r)=>(m.openBlock(),m.createBlock(An,{ico:"remove",text:"删除表格",shortcut:"Backspace","hide-text":"",disabled:!m.unref(e)?.can().deleteTable(),onMenuClick:r[0]||(r[0]=i=>m.unref(e)?.chain().focus().deleteTable().run())},null,8,["disabled"]))}}),O8e={class:"flex items-center gap-2"},I8e=m.defineComponent({__name:"table-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",O8e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(E8e),m.createVNode(M8e),m.createVNode(A8e),m.createVNode(N8e),m.createVNode(D8e)]))}}),R8e=m.defineComponent({__name:"tag-input",setup(n){const e=m.ref(""),t=m.inject("editor"),r=()=>{if(e.value==="")return;t.value?.state?.selection?.$from?.node()&&t.value?.commands.updateAttributes("tag",{text:e.value})},i=()=>{const a=t.value?.getAttributes("tag");a?.text&&(e.value=a.text)};return m.onMounted(()=>{i(),t.value?.on("selectionUpdate",i)}),m.onBeforeUnmount(()=>{t.value?.off("selectionUpdate")}),(a,o)=>(m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createVNode(lm,{placeholder:"请输入标签",value:e.value,"onUpdate:value":o[0]||(o[0]=s=>e.value=s),size:"small"},null,8,["value"]),m.createVNode(Wo,{type:"primary",size:"small",onClick:o[1]||(o[1]=s=>r())},{default:m.withCtx(()=>[...o[2]||(o[2]=[m.createTextVNode("确认",-1)])]),_:1})],64))}}),L8e={class:"px-2"},P8e=["onClick"],B8e=m.defineComponent({__name:"tag-color",setup(n){const e=m.inject("editor"),t=m.ref("#007bff"),r=m.ref(!1),i=[{label:"蓝色",color:"#007bff",bgcolor:"rgb(217, 231, 255)"},{label:"红色",color:"rgba(200, 78, 67, 1)",bgcolor:"rgb(252, 223, 220)"},{label:"黄色",color:"rgba(240, 196, 23, 1)",bgcolor:"rgb(255, 245, 210)"},{label:"绿色",color:"rgba(5, 205, 153, 1)",bgcolor:"rgb(205, 245, 235)"},{label:"紫色",color:"#e6afff",bgcolor:"rgb(220, 223, 252)"}],a=s=>{e.value?.state?.selection?.$from?.node()&&e.value?.commands.updateAttributes("tag",{type:s.type,color:s.color,backgroundColor:s.bgcolor}),t.value=s?.bgcolor,r.value=!1},o=()=>{e.value?.state?.selection?.$from?.node()&&e.value?.commands.updateAttributes("tag",{type:"default",color:"#999",backgroundColor:"rgba(0, 0, 0, 0.05)"}),t.value="rgba(0, 0, 0, 0.05)",r.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(wS,{ico:"fill",text:"高亮填充","hide-text":"",onMenuClick:l[1]||(l[1]=u=>a()),maxHeight:!1,"popup-visible":r.value,"onUpdate:popupVisible":l[2]||(l[2]=u=>r.value=u)},{content:m.withCtx(()=>[m.createElementVNode("div",L8e,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(i,(u,c)=>m.createElementVNode("div",{key:c,onClick:f=>a(u),style:m.normalizeStyle({backgroundColor:u.bgcolor}),class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer"},[l[3]||(l[3]=m.createElementVNode("i",{class:"w-iconfont icon-tumo !text-[14px]"},null,-1)),m.createTextVNode(" "+m.toDisplayString(u.label),1)],12,P8e)),64)),m.createElementVNode("div",{class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer border",onClick:l[0]||(l[0]=u=>o())},[...l[4]||(l[4]=[m.createElementVNode("i",{class:"w-iconfont icon-clear-format !text-[14px]"},null,-1),m.createTextVNode(" 清除 ",-1)])])])]),_:1},8,["popup-visible"]))}}),V8e={class:"flex items-center gap-2"},z8e=m.defineComponent({__name:"tag-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",V8e,[m.createVNode(R8e),m.createVNode(B8e),m.createVNode(Rd)]))}}),F8e=m.defineComponent({__name:"ai-operation",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=()=>{t.value=!0,e.value?.commands.focus()};return(i,a)=>(m.openBlock(),m.createBlock(An,{ico:"ai-assistant",text:"AI智能助手","hide-text":"",onMenuClick:r}))}}),$8e={class:"px-2"},H8e=["onClick"],G8e=m.defineComponent({__name:"high-background",setup(n){const e=m.inject("editor"),t=m.ref("#007bff"),r=m.ref(!1),i=[{label:"默认",bgcolor:"#007bff"},{label:"红色",bgcolor:"#ff8a8a"},{label:"黄色",bgcolor:"#ffff8a"},{label:"绿色",bgcolor:"#a7ffa7"},{label:"紫色",bgcolor:"#e6afff"},{label:"蓝色",bgcolor:"#83d3ff"}],a=s=>{if(!s){e.value?.chain().focus().setHighlight({color:i[0].bgcolor}).run();return}t.value=s?.bgcolor,e.value?.chain().focus().setHighlight({color:s.bgcolor}).run(),r.value=!1},o=()=>{e.value?.chain().focus().unsetHighlight().run(),t.value="#007bff",r.value=!1};return(s,l)=>(m.openBlock(),m.createBlock(wS,{ico:"fill",text:"高亮填充","hide-text":"",onMenuClick:l[1]||(l[1]=u=>a()),maxHeight:!1,"popup-visible":r.value,"onUpdate:popupVisible":l[2]||(l[2]=u=>r.value=u)},{content:m.withCtx(()=>[m.createElementVNode("div",$8e,[(m.openBlock(),m.createElementBlock(m.Fragment,null,m.renderList(i,(u,c)=>m.createElementVNode("div",{key:c,onClick:f=>a(u),style:m.normalizeStyle({backgroundColor:u.bgcolor}),class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer"},[l[3]||(l[3]=m.createElementVNode("i",{class:"w-iconfont icon-tumo !text-[14px]"},null,-1)),m.createTextVNode(" "+m.toDisplayString(u.label),1)],12,H8e)),64)),m.createElementVNode("div",{class:"h-[30px] w-[90px] flex items-center justify-center gap-2 mb-2 rounded-[3px] cursor-pointer border",onClick:l[0]||(l[0]=u=>o())},[...l[4]||(l[4]=[m.createElementVNode("i",{class:"w-iconfont icon-clear-format !text-[14px]"},null,-1),m.createTextVNode(" 清除 ",-1)])])])]),_:1},8,["popup-visible"]))}}),U8e={class:"flex items-center gap-2"},W8e=m.defineComponent({__name:"text-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",U8e,[m.createVNode(F8e),m.createVNode(WM),m.createVNode(jM),m.createVNode(qM),m.createVNode(KM),m.createVNode(XY),m.createVNode(G8e),m.createVNode(Rd)]))}}),j8e={class:"flex items-center gap-2"},q8e={key:0,class:"flex items-center gap-2 py-2 px-1"},K8e={class:"flex-1 h-[90px] flex flex-col justify-between gap-1"},Y8e={class:"mb-2"},X8e={class:"flex items-center gap-2"},Z8e=["innerHTML"],J8e={key:1,class:"text-[12px] text-[#999]"},Q8e=["onClick"],e6e=["innerHTML"],t6e={class:"flex items-center gap-2"},n6e=m.defineComponent({__name:"iframe-menu",setup(n){const e=m.inject("editor"),t=m.ref(),r=m.ref(""),i=m.ref(""),a=m.computed(()=>qv.find(l=>l.value===i.value)),o=l=>{i.value=l.value,t.value?.changePopoverVisible(!1)},s=()=>{const{validate:l,transformURL:u}=qv.find(c=>c.value===i.value);l&&!l(r.value)||e.value.chain().focus().setParagraph().setIframe({type:i.value,src:u?u(r.value):r.value}).run()};return(l,u)=>(m.openBlock(),m.createElementBlock("div",j8e,[m.unref(e)?.getAttributes("iframe").src==""?(m.openBlock(),m.createElementBlock("div",q8e,[u[3]||(u[3]=m.createElementVNode("div",{class:"flex flex-col items-center gap-1 h-[80px]"},[m.createElementVNode("span",{class:"w-[24px] h-[24px] text-center rounded-full bg-[#007bff] text-[12px] text-[#fff] font-500",style:{"line-height":"24px"}}," 1 "),m.createElementVNode("div",{class:"w-[1px] flex-1 bg-[#e5e5e5]"}),m.createElementVNode("span",{class:"w-[24px] h-[24px] text-center rounded-full bg-[#007bff] text-[12px] text-[#fff] font-500",style:{"line-height":"24px"}}," 2 ")],-1)),m.createElementVNode("div",K8e,[m.createElementVNode("div",Y8e,[m.createVNode(wg,{value:i.value,"onUpdate:value":u[0]||(u[0]=c=>i.value=c),options:m.unref(qv),placeholder:"选择网页类型",class:"w-full",ref_key:"selectRef",ref:t},{main:m.withCtx(()=>[(m.openBlock(!0),m.createElementBlock(m.Fragment,null,m.renderList(m.unref(qv),(c,f)=>(m.openBlock(),m.createElementBlock("div",{key:c.value,class:m.normalizeClass(["flex items-center gap-2 h-[32px] px-2 cursor-pointer rounded-[4px] hover:bg-[rgb(242,243,245)]",{"bg-[rgb(242,243,245)]":i.value===c.value,"mb-1":f!==m.unref(qv).length-1}]),onClick:d=>o(c)},[m.createElementVNode("span",{innerHTML:c.icon},null,8,e6e),m.createTextVNode(" "+m.toDisplayString(c.label),1)],10,Q8e))),128))]),default:m.withCtx(()=>[m.createElementVNode("div",X8e,[a.value&&Object.keys(a.value).length?(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.createElementVNode("span",{innerHTML:a.value.icon},null,8,Z8e),m.createTextVNode(" "+m.toDisplayString(a.value.label),1)],64)):(m.openBlock(),m.createElementBlock("span",J8e,"选择网页类型"))])]),_:1},8,["value","options"])]),m.createElementVNode("div",t6e,[m.createVNode(lm,{value:r.value,"onUpdate:value":u[1]||(u[1]=c=>r.value=c),placeholder:"打开网址复制链接,以http:// 或 https:// 开头",class:"w-[300px]"},null,8,["value"]),m.createVNode(Wo,{type:"primary",size:"small",disabled:!r.value,onClick:s},{default:m.withCtx(()=>[...u[2]||(u[2]=[m.createTextVNode("添加",-1)])]),_:1},8,["disabled"])])])])):(m.openBlock(),m.createElementBlock(m.Fragment,{key:1},[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(JY),m.createVNode(Rd)],64))]))}}),r6e={class:"flex items-center gap-2"},i6e=m.defineComponent({__name:"echarts-menu",setup(n){return(e,t)=>(m.openBlock(),m.createElementBlock("div",r6e,[m.createVNode(Xp),m.createVNode(Kp),m.createVNode(Yp),m.createVNode(QM,{icon:"setting",text:"图表配置",isEdit:!0}),m.createVNode(Rd)]))}}),a6e="data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='14'%20cy='14'%20r='11.0833'%20fill='%23258AFF'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M11.8581%2011.2155C11.9065%2011.1088%2012.058%2011.1088%2012.1064%2011.2155L14.6199%2016.7534C14.6609%2016.8437%2014.5948%2016.9461%2014.4957%2016.9461H11.6756C11.461%2016.9461%2011.2663%2017.072%2011.1782%2017.2677L10.7355%2018.2514C10.6273%2018.492%2010.8033%2018.7642%2011.0671%2018.7642H16.0477C16.7417%2018.7642%2017.2037%2018.0471%2016.9169%2017.4152L12.8512%208.45725C12.5122%207.71045%2011.4515%207.71057%2011.1127%208.45743L6.67056%2018.2504C6.56136%2018.4911%206.73737%2018.7642%207.00171%2018.7642H8.08241C8.29645%2018.7642%208.49072%2018.639%208.57914%2018.4441L11.8581%2011.2155ZM19.373%2018.4441C19.4614%2018.639%2019.6557%2018.7642%2019.8698%2018.7642H20.9504C21.2147%2018.7642%2021.3907%2018.4911%2021.2816%2018.2504L16.7334%208.22172C16.645%208.02677%2016.4508%207.90156%2016.2367%207.90156L15.156%207.90156C14.8917%207.90156%2014.7157%208.17464%2014.8249%208.41537L19.373%2018.4441Z'%20fill='white'/%3e%3c/svg%3e",o6e=["maxlength","disabled"],s6e=["disabled","loading"],l6e={key:0,class:"w-iconfont icon-send"},u6e={key:1,class:"w-iconfont icon-loading animate-spin"},c6e=["innerHTML"],f6e={class:"flex items-center gap-2 text-handle"},d6e=m.defineComponent({__name:"assistant",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=m.inject("options"),i=m.ref(null),a=m.ref(""),o=m.ref({prompt:"",content:"",error:!1}),s=m.ref(!1),l=m.ref(600),u=async()=>{s.value=!0,o.value.error=!1,o.value.prompt="",o.value.content="";const y={lang:"",input:e.value?QLe(e.value):"",command:a},b={html:e.value?.getHTML()??"",text:e.value?.getText()??"",json:e.value?.getJSON()??{}};try{const _=await r.value.ai?.sendMessage?.(y,b),x=()=>{o.value.content.startsWith("[ERROR]: ")&&(o.value.error=!0,o.value.content=o.value.content.replace("[ERROR]: ",""))};if(_ instanceof ReadableStream){const T=new WritableStream({write(k){x(),o.value.content+=k},close(){s.value=!1,o.value.command=a}});_.pipeTo(T);return}if(_X(_)){s.value=!1,o.value.command=a,x(),o.value.content=_;return}console.error('"ai.assistant.onMessage" method returns data in an incorrect format, it can be a ReadableStream or plain text.')}catch(_){console.error(_),t.value=!1}},c=()=>{t.value=!1,e.value?.commands.focus()},f=()=>{e.value?.chain().insertContent(o.value.content).run(),c()},d=()=>{const{to:y}=e.value?.state.selection??{};y&&e.value?.chain().insertContentAt(y,o.value.content).focus().run(),c()},h=()=>{e.value?.commands.selectParentNode();const{to:y}=e.value?.state.selection??{};y&&e.value?.chain().insertContentAt(y,o.value.content).focus().run(),c()},p=async()=>{const{toClipboard:y}=lN();await y(o.value.content)},v=()=>{const{command:y}=o.value;y&&(a.value=y),u()},g=()=>{a.value="",o.value.prompt="",o.value.content=""};return(y,b)=>{const _=m.resolveDirective("tooltip");return m.openBlock(),m.createElementBlock(m.Fragment,null,[m.createElementVNode("div",{class:"relative flex items-center gap-4 h-[50px] border-b px-3 white-ai-wrapper",style:m.normalizeStyle({width:`${l.value}px`})},[b[7]||(b[7]=m.createElementVNode("div",{class:"flex-shrink-0"},[m.createElementVNode("img",{src:a6e,alt:"ai",class:"w-8 h-8"})],-1)),m.withDirectives(m.createElementVNode("input",{ref_key:"inputRef",ref:i,"onUpdate:modelValue":b[0]||(b[0]=x=>a.value=x),class:m.normalizeClass(["flex-1 outline-none h-full",{"input-disabled":s.value}]),maxlength:m.unref(r).ai?.maxlength,disabled:s.value,autocomplete:"false",placeholder:"告诉AI下一步怎么做"},null,10,o6e),[[m.vModelText,a.value]]),m.createElementVNode("button",{class:"ai-button",disabled:s.value,loading:s.value,onClick:u},[s.value?(m.openBlock(),m.createElementBlock("i",u6e)):(m.openBlock(),m.createElementBlock("i",l6e))],8,s6e)],4),o.value.content?(m.openBlock(),m.createElementBlock("div",{key:0,class:"w-full px-3 py-2",style:m.normalizeStyle({width:`${l.value}px`})},[m.createElementVNode("div",{class:m.normalizeClass(["w-full min-h-[50px] overflow-y-auto line-clamp-6 result-content",{error:o.value.error}]),innerHTML:o.value.content},null,10,c6e),m.createElementVNode("div",f6e,[m.createVNode(Wo,{type:"primary",size:"small",onClick:b[1]||(b[1]=x=>f())},{default:m.withCtx(()=>[...b[8]||(b[8]=[m.createTextVNode("替换所选",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[2]||(b[2]=x=>h())},{default:m.withCtx(()=>[...b[9]||(b[9]=[m.createTextVNode("插入下方",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[3]||(b[3]=x=>d())},{default:m.withCtx(()=>[...b[10]||(b[10]=[m.createTextVNode("插入后方",-1)])]),_:1}),m.createVNode(Wo,{size:"small",onClick:b[4]||(b[4]=x=>g())},{default:m.withCtx(()=>[...b[11]||(b[11]=[m.createTextVNode("放弃",-1)])]),_:1}),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-copy-text",onClick:b[5]||(b[5]=x=>p())},null,512),[[_,"复制"]]),m.withDirectives(m.createElementVNode("i",{class:"w-iconfont icon-refresh",onClick:b[6]||(b[6]=x=>v())},null,512),[[_,"重新生成"]])])],4)):m.createCommentVNode("",!0)],64)}}}),h6e=m.defineComponent({__name:"index",setup(n){const e=m.inject("editor"),t=m.inject("assistant"),r=m.ref(null),i=m.ref({appendTo:"parent",maxWidth:600,zIndex:110,onShow(a){r.value=a},onHide(){t.value=!1},onDestroy(){r.value=null}});return m.watch(()=>[t.value],a=>{r.value&&r.value?.setProps({placement:a.includes(!0)?"bottom":"top"})}),m.onUnmounted(()=>{r.value&&(r.value.destroy(),r.value=null)}),(a,o)=>(m.openBlock(),m.createBlock(m.unref(Tae),{class:m.normalizeClass(["white-editor-bubble-menu rounded-md",{"px-3 py-2":!m.unref(t)}]),editor:m.unref(e),"tippy-options":i.value},{default:m.withCtx(()=>[m.unref(t)?m.createCommentVNode("",!0):(m.openBlock(),m.createElementBlock(m.Fragment,{key:0},[m.unref(e)?.isActive("toc")||m.unref(e)?.isActive("pageBreak")||m.unref(e)?.isActive("horizontalRule")||m.unref(e)?.isActive("codeBlock")||m.unref(e)?.getAttributes("image").error?(m.openBlock(),m.createBlock(Rd,{key:0})):m.unref(e)?.isActive("image")&&!m.unref(e)?.getAttributes("image").error||m.unref(e)?.isActive("inlineImage")&&!m.unref(e)?.getAttributes("inlineImage").error?(m.openBlock(),m.createBlock(w8e,{key:1})):m.unref(e)?.isActive("video")||m.unref(e)?.isActive("audio")||m.unref(e)?.isActive("file")?(m.openBlock(),m.createBlock(C8e,{key:2})):m.unref(e)?.isActive("iframe")?(m.openBlock(),m.createBlock(n6e,{key:3})):m.unref(e)?.isActive("table")?(m.openBlock(),m.createBlock(I8e,{key:4})):m.unref(e)?.isActive("tag")?(m.openBlock(),m.createBlock(z8e,{key:5})):m.unref(e)?.isActive("echarts")?(m.openBlock(),m.createBlock(i6e,{key:6})):(m.openBlock(),m.createBlock(W8e,{key:7}))],64)),m.unref(t)?(m.openBlock(),m.createBlock(d6e,{key:1})):m.createCommentVNode("",!0)]),_:1},8,["class","editor","tippy-options"]))}}),p6e={key:0,class:"w-full h-[4rem]"},v6e={key:1,class:"w-full h-[4rem]"},g6e=m.defineComponent({__name:"index",setup(n){const e=m.inject("editor"),t=m.inject("page"),r=m.computed(()=>{const{width:a,height:o}=t.value.size??{width:0,height:0};return{width:a,height:o}}),i=m.computed(()=>t.value.layout==="web"?"100%":`calc(${r.value.width}cm * 1)`);return(a,o)=>(m.openBlock(),m.createElementBlock("div",{class:m.normalizeClass(["white-editor-container min-h-full mx-auto overflow-hidden relative flex flex-col",m.unref(t).layout==="page"?"shadow-[0_0_10px_rgba(0,0,0,0.1)] bg-white":""]),style:m.normalizeStyle({width:i.value})},[m.unref(t).layout==="page"?(m.openBlock(),m.createElementBlock("div",p6e)):m.createCommentVNode("",!0),m.createVNode(m.unref(Eae),{editor:m.unref(e),class:m.normalizeClass(["white-editor-content flex-1 flex flex-col",{"is-empty":m.unref(e)?.isEmpty&&m.unref(e)?.state.doc.childCount<=1,"is-readonly":m.unref(e)?.editable,"format-painter":m.unref(e)?.view?.painter?.enabled}])},null,8,["editor","class"]),m.unref(t).layout==="page"?(m.openBlock(),m.createElementBlock("div",v6e)):m.createCommentVNode("",!0),m.unref(e)?(m.openBlock(),m.createBlock(h6e,{key:2})):m.createCommentVNode("",!0)],6))}}),m6e=n=>n&&typeof n=="string"&&!n.startsWith("<")?(console.log(n.split(`
|
|
372
372
|
`)),n.split(`
|
|
373
|
-
`).map(e=>`<p>${e}</p>`).join("")):n,
|
|
373
|
+
`).map(e=>`<p>${e}</p>`).join("")):n,y6e={class:"flex flex-col white-give-editor-wrapper white-editor-namespace"},b6e={key:0,class:"w-full flex-none border-b border-[#d9d9d9]"},x6e=["id"],_6e={key:1,class:"w-full h-[40px] flex-none border-t border-[#d9d9d9] px-[2rem]"},S6e=m.defineComponent({__name:"HomeView",setup(n){const e=m.inject("editor"),t=m.inject("container"),r=m.inject("options"),i=m.inject("uploadFileMap"),a=m.inject("page"),o=wPe({container:t,options:r,uploadFileMap:i}),s=new Cae({editable:!r.value?.editor?.readOnly,autofocus:r.value?.editor?.autofocus,content:m6e(r.value.document?.content),enableInputRules:gz(r),enablePasteRules:gz(r),editorProps:{attributes:{class:"white-editor"},...r.value?.editor?.editorProps},parseOptions:r.value?.editor?.parseOptions,extensions:o});return e.value=s,e.value.storage.container=t,e.value.storage.options=r.value,(l,u)=>(m.openBlock(),m.createElementBlock("div",y6e,[m.unref(r).layout.toolbar.show?(m.openBlock(),m.createElementBlock("div",b6e,[m.createVNode(FBe)])):m.createCommentVNode("",!0),m.createElementVNode("div",{class:"w-full flex-1 min-h-0 flex overflow-hidden",id:m.unref(t)},[m.unref(a).showToc&&m.unref(r).layout.toc.show?(m.openBlock(),m.createBlock(b8e,{key:0})):m.createCommentVNode("",!0),m.createElementVNode("div",{class:m.normalizeClass(["flex-1 h-full overflow-y-auto py-[20px]",m.unref(a).layout==="page"?"bg-[#f4f6fa]":""])},[m.createVNode(g6e)],2)],8,x6e),m.unref(r).layout.foot.show?(m.openBlock(),m.createElementBlock("div",_6e,[m.createVNode(c8e)])):m.createCommentVNode("",!0)]))}}),eA=m.defineComponent({__name:"index",emits:["beforeCreate","created","change","change:selection","change:transaction","change:menu","change:toolbar","change:pageLayout","change:pageSize","change:pageOrientation","change:pageMargin","change:pageBackground","change:pageShowToc","change:pagePreview","change:pageZoom","change:pageWatermark","change:locale","change:theme","contentError","print","focus","blur","saved","destroy","menuChange"],setup(n,{emit:e}){const t=e,r=m.inject("providedOptions",{}),i=m.ref(`white-editor-${ip()}`),a={document:{title:"无标题文档",content:""},editor:{readOnly:!1,autofocus:!1,parseOptions:{preserveWhitespace:"full"},editorProps:{},enableMarkdown:!0},layout:{toc:{show:!0},toolbar:{show:!0},foot:{show:!0,pageSize:!0,character:!0,copy:!0,download:!0}},dicts:{lineHeights:[{label:"单倍行距",value:1},{label:"1.5 倍行距",value:1.5},{label:"1.7 倍行距",value:1.7,default:!0},{label:"2 倍行距",value:2},{label:"2.5 倍行距",value:2.5},{label:"3 倍行距",value:3}],pageSizeOption:[{label:"网页",layout:"web"},{label:"A4",width:21,height:29.7,default:!0,layout:"page"},{label:"A3",width:29.7,height:42,layout:"page"},{label:"A5",width:14.8,height:21,layout:"page"},{label:"B5",width:17.6,height:25,layout:"page"},{label:"5号信纸",width:10.9,height:12.9,layout:"page"},{label:"6号信纸",width:11.9,height:22.9,layout:"page"},{label:"7号信纸",width:16.1,height:22.8,layout:"page"},{label:"9号信纸",width:22.8,height:32.3,layout:"page"},{label:"法律用纸",width:21.5,height:33.5,layout:"page"}]},file:{allowedMimeTypes:[],maxSize:1024*1024*100},ai:{enabled:!0,maxlength:100,async sendMessage(f){return new Promise(d=>{setTimeout(()=>{d(`这里是 AI 的回复。你发送了:${f.input}`)},1e3)})}},users:[{id:"Cassielxd",label:"Cassielxd"},{id:"Goldziher",label:"Na'aman Hirschfeld"},{id:"SerRashin",label:"SerRashin"},{id:"ChenErik",label:"ChenErik"},{id:"china-wangxu",label:"china-wangxu"},{id:"Sherman Xu",label:"xuzhenjun130"},{id:"testuser",label:"测试用户"}],echarts:{mode:1,renderImage:!1},page:{layouts:["page","web"],layout:"page",showToc:!1,toolbar:"double",watermark:{type:"测试",alpha:.2,fontColor:"#000",fontSize:16,fontFamily:"SimSun",fontWeight:"normal",text:""},size:{key:"A4",width:21,height:29.7},margin:{left:3.18,right:3.18,top:2.54,bottom:2.54}},async onFileUpload(f){if(!f)throw new Error("没有找到要上传的文件");return console.log("onUpload",f),await new Promise(d=>setTimeout(d,3e3)),{id:ip(),url:f.url??URL.createObjectURL(f),name:f.name,type:f.type,size:f.size}},onFileDelete(f,d){console.log(f,d)}},o=m.ref(null),s=m.ref(uQ(r,a)),l=m.ref(s.value?.page),u=m.ref(!1),c=m.ref(new Map);return m.provide("container",i),m.provide("options",s),m.provide("editor",o),m.provide("page",l),m.provide("assistant",u),m.provide("uploadFileMap",c),m.watch(()=>o.value,()=>{o.value&&(o.value.on("create",({editor:f})=>{t("created",{editor:f})}),o.value.on("update",({editor:f})=>{t("change",{editor:f})}),o.value.on("selectionUpdate",({editor:f})=>{t("change:selection",{editor:f})}),o.value.on("transaction",({editor:f,transaction:d})=>{t("change:transaction",{editor:f,transaction:d})}),o.value.on("focus",({editor:f,event:d})=>{t("focus",{editor:f,event:d})}),o.value.on("contentError",({editor:f,error:d,disableCollaboration:h})=>{t("contentError",{editor:f,error:d,disableCollaboration:h})}),o.value.on("blur",({editor:f,event:d})=>{t("blur",{editor:f,event:d})}),o.value.on("destroy",()=>{t("destroy")}))}),(f,d)=>(m.openBlock(),m.createBlock(S6e))}}),Kv="TOOLTIP_INSTANCE",w6e={mounted(n,e){let t="",r="top",i=[300,0];typeof e.value=="string"?t=e.value:(t=e.value.content,e.value.placement!==void 0&&(r=e.value.placement),e.value.delay!==void 0&&(i=e.value.delay)),n[Kv]=Zl(n,{content:t,theme:"tooltip",duration:100,animation:"scale",allowHTML:!0,placement:r,delay:i})},updated(n,e){let t="";typeof e.value=="string"?t=e.value:t=e.value.content,n[Kv]&&n[Kv].setContent(t)},unmounted(n){n[Kv]&&n[Kv].destroy()}},k6e={install(n){n.directive("tooltip",w6e)}},T6e={install:(n,e)=>{n.provide("providedOptions",e??{}),n.component(eA.name??"WhiteEditor",eA),n.use(k6e)}};exports.default=eA;exports.useWhiteEditor=T6e;
|