vdc-editor 0.1.290 → 0.1.291
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/lib/BulkSpellChecker-CZ8kB6L9.mjs +5 -0
- package/lib/BulkSpellChecker-CZ8kB6L9.mjs.map +1 -0
- package/lib/{index-Cg91oHgI.mjs → index-zUBhFmHH.mjs} +1917 -1899
- package/lib/{index-Cg91oHgI.mjs.map → index-zUBhFmHH.mjs.map} +1 -1
- package/lib/src/components/SuperTextView.vue.d.ts +2 -0
- package/lib/src/components/SuperTextViewComment.vue.d.ts +2 -0
- package/lib/src/components/editor/CoreEditorV2.vue.d.ts +3 -0
- package/lib/src/hooks/useMeasuredMinWidth.d.ts +1 -0
- package/lib/src/type.d.ts +8 -0
- package/lib/style.css +1 -1
- package/lib/vdc-editor.mjs +1 -1
- package/lib/vdc-editor.umd.js +17 -17
- package/lib/vdc-editor.umd.js.map +1 -1
- package/package.json +1 -1
- package/lib/BulkSpellChecker-DhRWdomi.mjs +0 -5
- package/lib/BulkSpellChecker-DhRWdomi.mjs.map +0 -1
package/lib/vdc-editor.umd.js
CHANGED
|
@@ -106,7 +106,7 @@ img.ProseMirror-separator {
|
|
|
106
106
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
107
107
|
|
|
108
108
|
`,`1) content: element.innerHTML
|
|
109
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=i.reduce(function(u,c){var f=c&&HI(c,r);return f&&u.push(f),u},[]);return zu(t)?l[0]:l}ea.defaultProps=Er,ea.setDefaultProps=PI,ea.currentInput=Po,Object.assign({},p4,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});var zI={name:"sticky",defaultValue:!1,fn:function(e){var n=e.reference,r=e.popper;function i(){return e.popperInstance?e.popperInstance.state.elements.reference:n}function s(c){return e.props.sticky===!0||e.props.sticky===c}var a=null,l=null;function u(){var c=s("reference")?i().getBoundingClientRect():null,f=s("popper")?r.getBoundingClientRect():null;(c&&J4(a,c)||f&&J4(l,f))&&e.popperInstance&&e.popperInstance.update(),a=c,l=f,e.state.isMounted&&requestAnimationFrame(u)}return{onMount:function(){e.props.sticky&&u()}}}};function J4(t,e){return t&&e?t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left:!0}ea.setDefaultProps({render:Y4});class UI{constructor({editor:e,element:n,view:r,tippyOptions:i={},updateDelay:s=250,shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:l,state:u,from:c,to:f})=>{const{doc:p,selection:m}=u,{empty:g}=m,b=!p.textBetween(c,f).length&&jd(u.selection),v=this.element.contains(document.activeElement);return!(!(l.hasFocus()||v)||g||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var u;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((u=this.element.parentNode)===null||u===void 0)&&u.contains(l.relatedTarget))||(l==null?void 0:l.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,u)=>{const c=!(u!=null&&u.selection.eq(l.state.selection)),f=!(u!=null&&u.doc.eq(l.state.doc));!c&&!f||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,c,f,u)},this.updateDelay))},this.updateHandler=(l,u,c,f)=>{var p,m,g;const{state:b,composing:v}=l,{selection:y}=b;if(v||!u&&!c)return;this.createTooltip();const{ranges:k}=y,E=Math.min(...k.map(T=>T.$from.pos)),C=Math.max(...k.map(T=>T.$to.pos));if(!((p=this.shouldShow)===null||p===void 0?void 0:p.call(this,{editor:this.editor,element:this.element,view:l,state:b,oldState:f,from:E,to:C}))){this.hide();return}(m=this.tippy)===null||m===void 0||m.setProps({getReferenceClientRect:((g=this.tippyOptions)===null||g===void 0?void 0:g.getReferenceClientRect)||(()=>{if(i4(b.selection)){let T=l.nodeDOM(E);if(T){const A=T.dataset.nodeViewWrapper?T:T.querySelector("[data-node-view-wrapper]");if(A&&(T=A.firstChild),T)return T.getBoundingClientRect()}}return s4(l,E,C)})}),this.show()},this.editor=e,this.element=n,this.view=r,this.updateDelay=s,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ea(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:r}=e,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,n);return}const s=!(n!=null&&n.selection.eq(e.state.selection)),a=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,s,a,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Z4=t=>new ot({key:typeof t.pluginKey=="string"?new kt(t.pluginKey):t.pluginKey,view:e=>new UI({view:e,...t})});tt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Z4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class WI{getTextContent(e){return r4(e,{textSerializers:I0(this.editor.schema)})}constructor({editor:e,element:n,view:r,tippyOptions:i={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l})=>{const{selection:u}=l,{$anchor:c,empty:f}=u,p=c.depth===1,m=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent&&c.parent.childCount===0&&!this.getTextContent(c.parent);return!(!a.hasFocus()||!f||!p||!m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.editor=e,this.element=n,this.view=r,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ea(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var r,i,s;const{state:a}=e,{doc:l,selection:u}=a,{from:c,to:f}=u;if(n&&n.doc.eq(l)&&n.selection.eq(u))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:a,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>s4(e,c,f))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Q4=t=>new ot({key:typeof t.pluginKey=="string"?new kt(t.pluginKey):t.pluginKey,view:e=>new WI({view:e,...t})});tt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Q4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const Wu=o.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{updateDelay:r,editor:i,pluginKey:s,shouldShow:a,tippyOptions:l}=t;i.registerPlugin(Z4({updateDelay:r,editor:i,element:n.value,pluginKey:s,shouldShow:a,tippyOptions:l}))}),o.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return o.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function N4(t){return o.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class Vo extends l4{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=N4(this.view.state),this.reactiveExtensionStorage=N4(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),o.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){const r=super.registerPlugin(e,n);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const n=super.unregisterPlugin(e);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const Nn=o.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=o.ref(),n=o.getCurrentInstance();return o.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&o.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const i=o.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),o.onBeforeUnmount(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return o.h("div",{ref:t=>{this.rootEl=t}})}});o.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{pluginKey:r,editor:i,tippyOptions:s,shouldShow:a}=t;i.registerPlugin(Q4({pluginKey:r,editor:i,element:n.value,tippyOptions:s,shouldShow:a}))}),o.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return o.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});const e6=o.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return o.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),ta=o.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return o.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))}}),jI=(t={})=>{const e=o.shallowRef();return o.onMounted(()=>{e.value=new Vo(t)}),o.onBeforeUnmount(()=>{var n,r,i;const s=(n=e.value)===null||n===void 0?void 0:n.options.element,a=s==null?void 0:s.cloneNode(!0);(r=s==null?void 0:s.parentNode)===null||r===void 0||r.replaceChild(a,s),(i=e.value)===null||i===void 0||i.destroy()}),e};class t6{constructor(e,{props:n={},editor:r}){this.editor=r,this.component=o.markRaw(e),this.el=document.createElement("div"),this.props=o.reactive(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,n,r,i;return!((n=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(i=(r=this.renderedComponent.vNode)===null||r===void 0?void 0:r.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=o.h(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&o.render(e,this.el),{vNode:e,destroy:()=>{this.el&&o.render(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([n,r])=>{this.props[n]=r}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const na={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}};class qI extends sB{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=o.ref(this.getDecorationClasses());const r=o.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:i=>{var s,a;return o.provide("onDragStart",n),o.provide("decorationClasses",this.decorationClasses),(a=(s=this.component).setup)===null||a===void 0?void 0:a.call(s,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new t6(r,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const i=s=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(s)};if(typeof this.options.update=="function"){const s=this.node,a=this.decorations,l=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:s,oldDecorations:a,newNode:e,newDecorations:n,oldInnerDecorations:l,innerDecorations:r,updateProps:()=>i({node:e,decorations:n,innerDecorations:r})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,i({node:e,decorations:n,innerDecorations:r})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(e=>e.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function ra(t,e){return n=>{if(!n.editor.contentComponent)return{};const r=typeof t=="function"&&"__vccOpts"in t?t.__vccOpts:t;return new qI(r,n,e)}}const KI={NOTHING_TO_CHANGE:"NOTHING_TO_CHANGE"},fo={LOADING:"loading",HAS_ERROR:"hasError",NO_ERROR:"noError",FAIL:"fail"},Fo={EDITOR_COMMENT:"editorComment",EDITOR_CONTENT:"editorContent"},s1={KEYBOARD_DID_SHOW:"keyboardDidShow",KEYBOARD_DID_HIDE:"keyboardDidHide",KEYBOARD_DISMISS:"keyboardDismiss"},a1={ANDROID:"android",IOS:"ios"},rf={SPACING:1,SPELLING:2},$o={SINGLE:"single",ERROR_TYPE:"error_type"},ts="#ff4d4f",n6={[rf.SPACING]:"text-blue-500 border-b-2 border-blue-500",[rf.SPELLING]:"text-red-500 border-b-2 border-red-500"},r6="text-green-500 border-b-2 border-green-500",GI="ko",Ho=200,XI=20,o6=1e5,i6=16,of=10,sf=10,af=2,YI="#262626",JI=["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],l1=["10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px"],hl="defaut";var lf=(t=>(t[t["size-small"]=480]="size-small",t[t["size-medium"]=640]="size-medium",t["size-large"]="100%",t))(lf||{});const s6="1",ZI={image:["divider","image-size-small","image-size-medium","image-size-large","divider","image-left","image-center","image-right","divider","image-aspect-ratio","remove"],text:["Ai","divider","text-bubble","divider","bold","italic","underline","strike","code","link","divider","color","highlight","textAlign"],video:["video-size-small","video-size-medium","video-size-large","divider","remove"]},ju={SAVE:"ctrl+s,command+s"};var Me=(t=>(t.COMPARE="compare",t.EDITOR="editor",t.STRAIGHT="straight",t.REPORT="report",t.PLAIN_TEXT="plainText",t.SUPER_VIEW_MOBILE="superViewMobile",t))(Me||{}),dr=(t=>(t.COMMENT="editor-comment-section",t.DISABLE_SUPER_INPUT="data-disable-super-input",t))(dr||{});const QI=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],it={ID:"data-id",TEXT:"data-text",POSITION:"data-position",ELEMENT_ID:"data-element-id"},NI=QI;function a6(t){return t.replace(/<\/?([a-zA-Z0-9-]+)([^>]*)>/g,(e,n)=>NI.includes(n.toLowerCase())?e:e.replace(/</g,"<").replace(/>/g,">"))}function eR(t){if(!t.includes("urn:schemas-microsoft-com:office:excel")&&!t.includes("mso-"))return t;const n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelectorAll("style"),i={};return r.forEach(s=>{const l=(s.textContent||"").match(/\.([a-zA-Z0-9_-]+)\s*\{([^}]+)\}/g);l&&l.forEach(u=>{const c=u.match(/\.([a-zA-Z0-9_-]+)\s*\{([^}]+)\}/);if(c){const f=c[1];let p=c[2].trim();p=p.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),i[f]=p}})}),n.querySelectorAll("[class]").forEach(s=>{var u;const a=((u=s.getAttribute("class"))==null?void 0:u.split(/\s+/))||[];let l=s.getAttribute("style")||"";l&&!l.endsWith(";")&&(l+=";"),a.forEach(c=>{i[c]&&(l+=i[c],l.endsWith(";")||(l+=";"))}),l&&s.setAttribute("style",l)}),n.querySelectorAll('[style*="background:"]').forEach(s=>{const a=s,l=a.getAttribute("style")||"",u=l.match(/background:\s*([^;]+)/i);u&&!l.includes("background-color:")&&(a.style.backgroundColor=u[1])}),n.querySelectorAll("td, th").forEach(s=>{const a=s,l=a.style.textAlign,u=a.style.color;if(l){const c=a.querySelectorAll("p");if(c.length>0)c.forEach(f=>{f.style.textAlign||(f.style.textAlign=l)});else{const f=a.innerHTML.trim();f&&!f.startsWith("<p")&&(a.innerHTML=`<p style="text-align: ${l}">${f}</p>`)}}if(u){const c=a.querySelectorAll("p");if(c.length>0)c.forEach(f=>{const p=f.innerHTML.trim();p&&!p.includes("color:")&&(f.innerHTML=`<span style="color: ${u}">${p}</span>`)});else{const f=a.innerHTML.trim();f&&!f.includes("color:")&&(a.innerHTML=`<span style="color: ${u}">${f}</span>`)}}}),n.documentElement.innerHTML}function oa(t){return typeof t=="string"&&/<html[\s>]/i.test(t)}function u1(t){const e=t.match(/<body[^>]*>([\s\S]*?)<\/body>/i);return e?e[1]:t}function tR(t){return t=t.replace(/\r/g,""),t=u1(t),t=t.replace(/<\/?o:[^>]*>/gi,""),t=t.replace(/\s+v:shapes="[^"]*"/gi,""),t=t.replace(/\s+lang=[A-Z-]*/gi,""),t=t.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),t=t.replace(/\s+style="\s*"/gi,""),t=t.replace(/<p[^>]*>\s*(<img\b[^>]*>)\s*<\/p>/gi,"$1"),t=t.replace(/<p[^>]*>\s*(<table\b[\s\S]*?<\/table>)\s*<\/p>/gi,"$1"),t=u6(t),t.trim()}function l6(t){const e=parseFloat(t);return isNaN(e)?0:t.includes("pt")?e*1.333:t.includes("cm")?e*37.8:t.includes("mm")?e*3.78:t.includes("in")?e*96:e}function u6(t){const e=document.createElement("div");e.innerHTML=t;const n=e.querySelectorAll("col");return n.length>0&&n.forEach(r=>{const i=r,s=i.style.width||i.getAttribute("width");if(s){const a=l6(s);a>0&&(i.style.width=`${Math.round(a)}px`)}}),e.querySelectorAll("td, th").forEach(r=>{const i=r,s=i.style.width,a=i.getAttribute("width"),l=s||a;if(!l)return;const u=Math.round(l6(l));if(u>0){const c=parseInt(i.getAttribute("colspan")||"1");if(c>1){const f=Math.round(u/c),p=Array(c).fill(f).join(",");i.setAttribute("colwidth",p)}else i.setAttribute("colwidth",String(u));i.style.width=""}}),e.innerHTML}function nR(t){t=eR(t),t=t.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),t=t.replace(/<\/?o:[^>]*>/gi,""),t=t.replace(/\s+v:shapes="[^"]*"/gi,""),t=t.replace(/\s+lang=[A-Z-]*/gi,""),t=t.replace(/\s+style="\s*"/gi,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,""),t=u6(t);const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/);let n=e?e[1]:t;if(/<tr[\s>]/.test(n)&&!/<table[\s>]/.test(n)){const r=t.match(/<table[^>]*>/i);r&&(n=`${r[0]}<tbody>${n}</tbody></table>`)}return n}const gn=(t,e,n)=>{if(typeof t=="object")return t;if(typeof t=="string"&&(oa(t)&&(t=tR(t)),t=a6(t),n===Me.PLAIN_TEXT&&!e))return t.replace(/\r?\n/g,"<br>");if(!e||n===Me.PLAIN_TEXT||n===Me.EDITOR)return t;const r=document.createElement("div");return r.innerHTML=t,rR(r),r.innerHTML};function rR(t){t.querySelectorAll("p").forEach(e=>{const n=Array.from(e.querySelectorAll("button.super-text"));if(n.length>0){const r=n.map(s=>`{${(s.getAttribute(it.TEXT)||"").replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p[^>]*>/g,"").trim()}}`),i=document.createElement("p");i.classList.add("text-red-500","super-text"),i.innerHTML=`${r.join("<br/>")}`,e.before(i),n.forEach(s=>s.remove())}e.innerHTML=e.innerHTML.trim()})}const c6=t=>{if(typeof t=="string"&&(t=a6(t)),typeof t=="object")return t;const e=document.createElement("div");return e.innerHTML=t,e.querySelectorAll("p").forEach(n=>{const r=n.querySelectorAll("button.super-text");if(r.length>0){const i=Array.from(r).map(s=>{const a=s.getAttribute(it.TEXT)||"";return String(a).replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p>/g,"")});n.innerHTML=i.join("<br/>")}else n.innerHTML=""}),e.innerHTML};class c1{isNativeWebViewAvailable(){return window.ReactNativeWebView!==void 0}getDevicePlatform(){var r;if(!this.isNativeWebViewAvailable())return;if(typeof window.webkit=="object"&&typeof((r=window.webkit)==null?void 0:r.messageHandlers)=="object")return a1.IOS;const n=navigator.userAgent.toLowerCase();if(n.includes("android"))return a1.ANDROID;if(n.includes("iphone")||n.includes("ipad")||n.includes("ipod"))return a1.IOS}sendToNative(e,n){if(window.ReactNativeWebView){const r={type:e,data:n};window.ReactNativeWebView.postMessage(JSON.stringify(r)),console.log(`Sent message to native: ${e}`)}else console.log("ReactNativeWebView not available")}receiveDataFromNative(e,n){const r=window.receiveDriverData;window.receiveDriverData=i=>{try{const s=JSON.parse(i);s.type===e&&(console.log(`Received data from native ${e}`),n(s.data)),r&&r(i)}catch(s){console.log("Error parsing data from native",s)}}}}var ml=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oR(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uf={exports:{}};/**
|
|
109
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var l=i.reduce(function(u,c){var f=c&&HI(c,r);return f&&u.push(f),u},[]);return zu(t)?l[0]:l}ea.defaultProps=Er,ea.setDefaultProps=PI,ea.currentInput=Po,Object.assign({},p4,{effect:function(e){var n=e.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});var zI={name:"sticky",defaultValue:!1,fn:function(e){var n=e.reference,r=e.popper;function i(){return e.popperInstance?e.popperInstance.state.elements.reference:n}function s(c){return e.props.sticky===!0||e.props.sticky===c}var a=null,l=null;function u(){var c=s("reference")?i().getBoundingClientRect():null,f=s("popper")?r.getBoundingClientRect():null;(c&&J4(a,c)||f&&J4(l,f))&&e.popperInstance&&e.popperInstance.update(),a=c,l=f,e.state.isMounted&&requestAnimationFrame(u)}return{onMount:function(){e.props.sticky&&u()}}}};function J4(t,e){return t&&e?t.top!==e.top||t.right!==e.right||t.bottom!==e.bottom||t.left!==e.left:!0}ea.setDefaultProps({render:Y4});class UI{constructor({editor:e,element:n,view:r,tippyOptions:i={},updateDelay:s=250,shouldShow:a}){this.preventHide=!1,this.shouldShow=({view:l,state:u,from:c,to:f})=>{const{doc:p,selection:m}=u,{empty:g}=m,b=!p.textBetween(c,f).length&&jd(u.selection),v=this.element.contains(document.activeElement);return!(!(l.hasFocus()||v)||g||b||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:l})=>{var u;if(this.preventHide){this.preventHide=!1;return}l!=null&&l.relatedTarget&&(!((u=this.element.parentNode)===null||u===void 0)&&u.contains(l.relatedTarget))||(l==null?void 0:l.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=l=>{this.blurHandler({event:l})},this.handleDebouncedUpdate=(l,u)=>{const c=!(u!=null&&u.selection.eq(l.state.selection)),f=!(u!=null&&u.doc.eq(l.state.doc));!c&&!f||(this.updateDebounceTimer&&clearTimeout(this.updateDebounceTimer),this.updateDebounceTimer=window.setTimeout(()=>{this.updateHandler(l,c,f,u)},this.updateDelay))},this.updateHandler=(l,u,c,f)=>{var p,m,g;const{state:b,composing:v}=l,{selection:y}=b;if(v||!u&&!c)return;this.createTooltip();const{ranges:k}=y,E=Math.min(...k.map(T=>T.$from.pos)),C=Math.max(...k.map(T=>T.$to.pos));if(!((p=this.shouldShow)===null||p===void 0?void 0:p.call(this,{editor:this.editor,element:this.element,view:l,state:b,oldState:f,from:E,to:C}))){this.hide();return}(m=this.tippy)===null||m===void 0||m.setProps({getReferenceClientRect:((g=this.tippyOptions)===null||g===void 0?void 0:g.getReferenceClientRect)||(()=>{if(i4(b.selection)){let T=l.nodeDOM(E);if(T){const A=T.dataset.nodeViewWrapper?T:T.querySelector("[data-node-view-wrapper]");if(A&&(T=A.firstChild),T)return T.getBoundingClientRect()}}return s4(l,E,C)})}),this.show()},this.editor=e,this.element=n,this.view=r,this.updateDelay=s,a&&(this.shouldShow=a),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ea(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){const{state:r}=e,i=r.selection.from!==r.selection.to;if(this.updateDelay>0&&i){this.handleDebouncedUpdate(e,n);return}const s=!(n!=null&&n.selection.eq(e.state.selection)),a=!(n!=null&&n.doc.eq(e.state.doc));this.updateHandler(e,s,a,n)}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Z4=t=>new ot({key:typeof t.pluginKey=="string"?new kt(t.pluginKey):t.pluginKey,view:e=>new UI({view:e,...t})});tt.create({name:"bubbleMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"bubbleMenu",updateDelay:void 0,shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Z4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,updateDelay:this.options.updateDelay,shouldShow:this.options.shouldShow})]:[]}});class WI{getTextContent(e){return r4(e,{textSerializers:I0(this.editor.schema)})}constructor({editor:e,element:n,view:r,tippyOptions:i={},shouldShow:s}){this.preventHide=!1,this.shouldShow=({view:a,state:l})=>{const{selection:u}=l,{$anchor:c,empty:f}=u,p=c.depth===1,m=c.parent.isTextblock&&!c.parent.type.spec.code&&!c.parent.textContent&&c.parent.childCount===0&&!this.getTextContent(c.parent);return!(!a.hasFocus()||!f||!p||!m||!this.editor.isEditable)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout(()=>this.update(this.editor.view))},this.blurHandler=({event:a})=>{var l;if(this.preventHide){this.preventHide=!1;return}a!=null&&a.relatedTarget&&(!((l=this.element.parentNode)===null||l===void 0)&&l.contains(a.relatedTarget))||(a==null?void 0:a.relatedTarget)!==this.editor.view.dom&&this.hide()},this.tippyBlurHandler=a=>{this.blurHandler({event:a})},this.editor=e,this.element=n,this.view=r,s&&(this.shouldShow=s),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=i,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,n=!!e.parentElement;this.tippy||!n||(this.tippy=ea(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",this.tippyBlurHandler))}update(e,n){var r,i,s;const{state:a}=e,{doc:l,selection:u}=a,{from:c,to:f}=u;if(n&&n.doc.eq(l)&&n.selection.eq(u))return;if(this.createTooltip(),!((r=this.shouldShow)===null||r===void 0?void 0:r.call(this,{editor:this.editor,view:e,state:a,oldState:n}))){this.hide();return}(i=this.tippy)===null||i===void 0||i.setProps({getReferenceClientRect:((s=this.tippyOptions)===null||s===void 0?void 0:s.getReferenceClientRect)||(()=>s4(e,c,f))}),this.show()}show(){var e;(e=this.tippy)===null||e===void 0||e.show()}hide(){var e;(e=this.tippy)===null||e===void 0||e.hide()}destroy(){var e,n;!((e=this.tippy)===null||e===void 0)&&e.popper.firstChild&&this.tippy.popper.firstChild.removeEventListener("blur",this.tippyBlurHandler),(n=this.tippy)===null||n===void 0||n.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}const Q4=t=>new ot({key:typeof t.pluginKey=="string"?new kt(t.pluginKey):t.pluginKey,view:e=>new WI({view:e,...t})});tt.create({name:"floatingMenu",addOptions(){return{element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}},addProseMirrorPlugins(){return this.options.element?[Q4({pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow})]:[]}});const Wu=o.defineComponent({name:"BubbleMenu",props:{pluginKey:{type:[String,Object],default:"bubbleMenu"},editor:{type:Object,required:!0},updateDelay:{type:Number,default:void 0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{updateDelay:r,editor:i,pluginKey:s,shouldShow:a,tippyOptions:l}=t;i.registerPlugin(Z4({updateDelay:r,editor:i,element:n.value,pluginKey:s,shouldShow:a,tippyOptions:l}))}),o.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return o.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});function N4(t){return o.customRef((e,n)=>({get(){return e(),t},set(r){t=r,requestAnimationFrame(()=>{requestAnimationFrame(()=>{n()})})}}))}class Vo extends l4{constructor(e={}){return super(e),this.contentComponent=null,this.appContext=null,this.reactiveState=N4(this.view.state),this.reactiveExtensionStorage=N4(this.extensionStorage),this.on("beforeTransaction",({nextState:n})=>{this.reactiveState.value=n,this.reactiveExtensionStorage.value=this.extensionStorage}),o.markRaw(this)}get state(){return this.reactiveState?this.reactiveState.value:this.view.state}get storage(){return this.reactiveExtensionStorage?this.reactiveExtensionStorage.value:super.storage}registerPlugin(e,n){const r=super.registerPlugin(e,n);return this.reactiveState&&(this.reactiveState.value=r),r}unregisterPlugin(e){const n=super.unregisterPlugin(e);return this.reactiveState&&n&&(this.reactiveState.value=n),n}}const Nn=o.defineComponent({name:"EditorContent",props:{editor:{default:null,type:Object}},setup(t){const e=o.ref(),n=o.getCurrentInstance();return o.watchEffect(()=>{const r=t.editor;r&&r.options.element&&e.value&&o.nextTick(()=>{if(!e.value||!r.options.element.firstChild)return;const i=o.unref(e.value);e.value.append(...r.options.element.childNodes),r.contentComponent=n.ctx._,n&&(r.appContext={...n.appContext,provides:n.provides}),r.setOptions({element:i}),r.createNodeViews()})}),o.onBeforeUnmount(()=>{const r=t.editor;r&&(r.contentComponent=null,r.appContext=null)}),{rootEl:e}},render(){return o.h("div",{ref:t=>{this.rootEl=t}})}});o.defineComponent({name:"FloatingMenu",props:{pluginKey:{type:null,default:"floatingMenu"},editor:{type:Object,required:!0},tippyOptions:{type:Object,default:()=>({})},shouldShow:{type:Function,default:null}},setup(t,{slots:e}){const n=o.ref(null);return o.onMounted(()=>{const{pluginKey:r,editor:i,tippyOptions:s,shouldShow:a}=t;i.registerPlugin(Q4({pluginKey:r,editor:i,element:n.value,tippyOptions:s,shouldShow:a}))}),o.onBeforeUnmount(()=>{const{pluginKey:r,editor:i}=t;i.unregisterPlugin(r)}),()=>{var r;return o.h("div",{ref:n},(r=e.default)===null||r===void 0?void 0:r.call(e))}}});const ex=o.defineComponent({name:"NodeViewContent",props:{as:{type:String,default:"div"}},render(){return o.h(this.as,{style:{whiteSpace:"pre-wrap"},"data-node-view-content":""})}}),ta=o.defineComponent({name:"NodeViewWrapper",props:{as:{type:String,default:"div"}},inject:["onDragStart","decorationClasses"],render(){var t,e;return o.h(this.as,{class:this.decorationClasses,style:{whiteSpace:"normal"},"data-node-view-wrapper":"",onDragstart:this.onDragStart},(e=(t=this.$slots).default)===null||e===void 0?void 0:e.call(t))}}),jI=(t={})=>{const e=o.shallowRef();return o.onMounted(()=>{e.value=new Vo(t)}),o.onBeforeUnmount(()=>{var n,r,i;const s=(n=e.value)===null||n===void 0?void 0:n.options.element,a=s==null?void 0:s.cloneNode(!0);(r=s==null?void 0:s.parentNode)===null||r===void 0||r.replaceChild(a,s),(i=e.value)===null||i===void 0||i.destroy()}),e};class tx{constructor(e,{props:n={},editor:r}){this.editor=r,this.component=o.markRaw(e),this.el=document.createElement("div"),this.props=o.reactive(n),this.renderedComponent=this.renderComponent()}get element(){return this.renderedComponent.el}get ref(){var e,n,r,i;return!((n=(e=this.renderedComponent.vNode)===null||e===void 0?void 0:e.component)===null||n===void 0)&&n.exposed?this.renderedComponent.vNode.component.exposed:(i=(r=this.renderedComponent.vNode)===null||r===void 0?void 0:r.component)===null||i===void 0?void 0:i.proxy}renderComponent(){let e=o.h(this.component,this.props);return this.editor.appContext&&(e.appContext=this.editor.appContext),typeof document<"u"&&this.el&&o.render(e,this.el),{vNode:e,destroy:()=>{this.el&&o.render(null,this.el),this.el=null,e=null},el:this.el?this.el.firstElementChild:null}}updateProps(e={}){Object.entries(e).forEach(([n,r])=>{this.props[n]=r}),this.renderComponent()}destroy(){this.renderedComponent.destroy()}}const na={editor:{type:Object,required:!0},node:{type:Object,required:!0},decorations:{type:Object,required:!0},selected:{type:Boolean,required:!0},extension:{type:Object,required:!0},getPos:{type:Function,required:!0},updateAttributes:{type:Function,required:!0},deleteNode:{type:Function,required:!0},view:{type:Object,required:!0},innerDecorations:{type:Object,required:!0},HTMLAttributes:{type:Object,required:!0}};class qI extends sB{mount(){const e={editor:this.editor,node:this.node,decorations:this.decorations,innerDecorations:this.innerDecorations,view:this.view,selected:!1,extension:this.extension,HTMLAttributes:this.HTMLAttributes,getPos:()=>this.getPos(),updateAttributes:(i={})=>this.updateAttributes(i),deleteNode:()=>this.deleteNode()},n=this.onDragStart.bind(this);this.decorationClasses=o.ref(this.getDecorationClasses());const r=o.defineComponent({extends:{...this.component},props:Object.keys(e),template:this.component.template,setup:i=>{var s,a;return o.provide("onDragStart",n),o.provide("decorationClasses",this.decorationClasses),(a=(s=this.component).setup)===null||a===void 0?void 0:a.call(s,i,{expose:()=>{}})},__scopeId:this.component.__scopeId,__cssModules:this.component.__cssModules,__name:this.component.__name,__file:this.component.__file});this.handleSelectionUpdate=this.handleSelectionUpdate.bind(this),this.editor.on("selectionUpdate",this.handleSelectionUpdate),this.renderer=new tx(r,{editor:this.editor,props:e})}get dom(){if(!this.renderer.element||!this.renderer.element.hasAttribute("data-node-view-wrapper"))throw Error("Please use the NodeViewWrapper component for your node view.");return this.renderer.element}get contentDOM(){return this.node.isLeaf?null:this.dom.querySelector("[data-node-view-content]")}handleSelectionUpdate(){const{from:e,to:n}=this.editor.state.selection,r=this.getPos();if(typeof r=="number")if(e<=r&&n>=r+this.node.nodeSize){if(this.renderer.props.selected)return;this.selectNode()}else{if(!this.renderer.props.selected)return;this.deselectNode()}}update(e,n,r){const i=s=>{this.decorationClasses.value=this.getDecorationClasses(),this.renderer.updateProps(s)};if(typeof this.options.update=="function"){const s=this.node,a=this.decorations,l=this.innerDecorations;return this.node=e,this.decorations=n,this.innerDecorations=r,this.options.update({oldNode:s,oldDecorations:a,newNode:e,newDecorations:n,oldInnerDecorations:l,innerDecorations:r,updateProps:()=>i({node:e,decorations:n,innerDecorations:r})})}return e.type!==this.node.type?!1:(e===this.node&&this.decorations===n&&this.innerDecorations===r||(this.node=e,this.decorations=n,this.innerDecorations=r,i({node:e,decorations:n,innerDecorations:r})),!0)}selectNode(){this.renderer.updateProps({selected:!0}),this.renderer.element&&this.renderer.element.classList.add("ProseMirror-selectednode")}deselectNode(){this.renderer.updateProps({selected:!1}),this.renderer.element&&this.renderer.element.classList.remove("ProseMirror-selectednode")}getDecorationClasses(){return this.decorations.map(e=>e.type.attrs.class).flat().join(" ")}destroy(){this.renderer.destroy(),this.editor.off("selectionUpdate",this.handleSelectionUpdate)}}function ra(t,e){return n=>{if(!n.editor.contentComponent)return{};const r=typeof t=="function"&&"__vccOpts"in t?t.__vccOpts:t;return new qI(r,n,e)}}const KI={NOTHING_TO_CHANGE:"NOTHING_TO_CHANGE"},fo={LOADING:"loading",HAS_ERROR:"hasError",NO_ERROR:"noError",FAIL:"fail"},Fo={EDITOR_COMMENT:"editorComment",EDITOR_CONTENT:"editorContent"},s1={KEYBOARD_DID_SHOW:"keyboardDidShow",KEYBOARD_DID_HIDE:"keyboardDidHide",KEYBOARD_DISMISS:"keyboardDismiss"},a1={ANDROID:"android",IOS:"ios"},rf={SPACING:1,SPELLING:2},$o={SINGLE:"single",ERROR_TYPE:"error_type"},ts="#ff4d4f",nx={[rf.SPACING]:"text-blue-500 border-b-2 border-blue-500",[rf.SPELLING]:"text-red-500 border-b-2 border-red-500"},rx="text-green-500 border-b-2 border-green-500",GI="ko",Ho=200,XI=20,ox=1e5,ix=16,of=10,sf=10,af=2,YI="#262626",JI=["#000000","#262626","#595959","#8C8C8C","#BFBFBF","#D9D9D9","#E9E9E9","#F5F5F5","#FAFAFA","#FFFFFF","#F5222D","#FA541C","#FA8C16","#FADB14","#52C41A","#13C2C2","#1890FF","#2F54EB","#722ED1","#EB2F96","#FFE8E6","#FFECE0","#FFEFD1","#FCFCCA","#E4F7D2","#D3F5F0","#D4EEFC","#DEE8FC","#EFE1FA","#FAE1EB","#FFA39E","#FFBB96","#FFD591","#FFFB8F","#B7EB8F","#87E8DE","#91D5FF","#ADC6FF","#D3ADF7","#FFADD2","#FF4D4F","#FF7A45","#FFA940","#FFEC3D","#73D13D","#36CFC9","#40A9FF","#597EF7","#9254DE","#F759AB","#CF1322","#D4380D","#D46B08","#D4B106","#389E0D","#08979C","#096DD9","#1D39C4","#531DAB","#C41D7F","#820014","#871400","#873800","#614700","#135200","#00474F","#003A8C","#061178","#22075E","#780650"],l1=["10px","11px","12px","14px","16px","18px","20px","22px","24px","26px","28px","36px","48px","72px"],hl="defaut";var lf=(t=>(t[t["size-small"]=480]="size-small",t[t["size-medium"]=640]="size-medium",t["size-large"]="100%",t))(lf||{});const sx="1",ZI={image:["divider","image-size-small","image-size-medium","image-size-large","divider","image-left","image-center","image-right","divider","image-aspect-ratio","remove"],text:["Ai","divider","text-bubble","divider","bold","italic","underline","strike","code","link","divider","color","highlight","textAlign"],video:["video-size-small","video-size-medium","video-size-large","divider","remove"]},ju={SAVE:"ctrl+s,command+s"};var Me=(t=>(t.COMPARE="compare",t.EDITOR="editor",t.STRAIGHT="straight",t.REPORT="report",t.PLAIN_TEXT="plainText",t.SUPER_VIEW_MOBILE="superViewMobile",t))(Me||{}),dr=(t=>(t.COMMENT="editor-comment-section",t.DISABLE_SUPER_INPUT="data-disable-super-input",t))(dr||{});const QI=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"],it={ID:"data-id",TEXT:"data-text",POSITION:"data-position",ELEMENT_ID:"data-element-id"},NI=QI;function ax(t){return t.replace(/<\/?([a-zA-Z0-9-]+)([^>]*)>/g,(e,n)=>NI.includes(n.toLowerCase())?e:e.replace(/</g,"<").replace(/>/g,">"))}function eR(t){if(!t.includes("urn:schemas-microsoft-com:office:excel")&&!t.includes("mso-"))return t;const n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelectorAll("style"),i={};return r.forEach(s=>{const l=(s.textContent||"").match(/\.([a-zA-Z0-9_-]+)\s*\{([^}]+)\}/g);l&&l.forEach(u=>{const c=u.match(/\.([a-zA-Z0-9_-]+)\s*\{([^}]+)\}/);if(c){const f=c[1];let p=c[2].trim();p=p.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),i[f]=p}})}),n.querySelectorAll("[class]").forEach(s=>{var u;const a=((u=s.getAttribute("class"))==null?void 0:u.split(/\s+/))||[];let l=s.getAttribute("style")||"";l&&!l.endsWith(";")&&(l+=";"),a.forEach(c=>{i[c]&&(l+=i[c],l.endsWith(";")||(l+=";"))}),l&&s.setAttribute("style",l)}),n.querySelectorAll('[style*="background:"]').forEach(s=>{const a=s,l=a.getAttribute("style")||"",u=l.match(/background:\s*([^;]+)/i);u&&!l.includes("background-color:")&&(a.style.backgroundColor=u[1])}),n.querySelectorAll("td, th").forEach(s=>{const a=s,l=a.style.textAlign,u=a.style.color;if(l){const c=a.querySelectorAll("p");if(c.length>0)c.forEach(f=>{f.style.textAlign||(f.style.textAlign=l)});else{const f=a.innerHTML.trim();f&&!f.startsWith("<p")&&(a.innerHTML=`<p style="text-align: ${l}">${f}</p>`)}}if(u){const c=a.querySelectorAll("p");if(c.length>0)c.forEach(f=>{const p=f.innerHTML.trim();p&&!p.includes("color:")&&(f.innerHTML=`<span style="color: ${u}">${p}</span>`)});else{const f=a.innerHTML.trim();f&&!f.includes("color:")&&(a.innerHTML=`<span style="color: ${u}">${f}</span>`)}}}),n.documentElement.innerHTML}function oa(t){return typeof t=="string"&&/<html[\s>]/i.test(t)}function u1(t){const e=t.match(/<body[^>]*>([\s\S]*?)<\/body>/i);return e?e[1]:t}function tR(t){return t=t.replace(/\r/g,""),t=u1(t),t=t.replace(/<\/?o:[^>]*>/gi,""),t=t.replace(/\s+v:shapes="[^"]*"/gi,""),t=t.replace(/\s+lang=[A-Z-]*/gi,""),t=t.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),t=t.replace(/\s+style="\s*"/gi,""),t=t.replace(/<p[^>]*>\s*(<img\b[^>]*>)\s*<\/p>/gi,"$1"),t=t.replace(/<p[^>]*>\s*(<table\b[\s\S]*?<\/table>)\s*<\/p>/gi,"$1"),t=ux(t),t.trim()}function lx(t){const e=parseFloat(t);return isNaN(e)?0:t.includes("pt")?e*1.333:t.includes("cm")?e*37.8:t.includes("mm")?e*3.78:t.includes("in")?e*96:e}function ux(t){const e=document.createElement("div");e.innerHTML=t;const n=e.querySelectorAll("col");return n.length>0&&n.forEach(r=>{const i=r,s=i.style.width||i.getAttribute("width");if(s){const a=lx(s);a>0&&(i.style.width=`${Math.round(a)}px`)}}),e.querySelectorAll("td, th").forEach(r=>{const i=r,s=i.style.width,a=i.getAttribute("width"),l=s||a;if(!l)return;const u=Math.round(lx(l));if(u>0){const c=parseInt(i.getAttribute("colspan")||"1");if(c>1){const f=Math.round(u/c),p=Array(c).fill(f).join(",");i.setAttribute("colwidth",p)}else i.setAttribute("colwidth",String(u));i.style.width=""}}),e.innerHTML}function nR(t){t=eR(t),t=t.replace(/mso-[^;:"]*:[^;"]*;?/gi,""),t=t.replace(/<\/?o:[^>]*>/gi,""),t=t.replace(/\s+v:shapes="[^"]*"/gi,""),t=t.replace(/\s+lang=[A-Z-]*/gi,""),t=t.replace(/\s+style="\s*"/gi,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,""),t=ux(t);const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/);let n=e?e[1]:t;if(/<tr[\s>]/.test(n)&&!/<table[\s>]/.test(n)){const r=t.match(/<table[^>]*>/i);r&&(n=`${r[0]}<tbody>${n}</tbody></table>`)}return n}const gn=(t,e,n)=>{if(typeof t=="object")return t;if(typeof t=="string"&&(oa(t)&&(t=tR(t)),t=ax(t),n===Me.PLAIN_TEXT&&!e))return t.replace(/\r?\n/g,"<br>");if(!e||n===Me.PLAIN_TEXT||n===Me.EDITOR)return t;const r=document.createElement("div");return r.innerHTML=t,rR(r),r.innerHTML};function rR(t){t.querySelectorAll("p").forEach(e=>{const n=Array.from(e.querySelectorAll("button.super-text"));if(n.length>0){const r=n.map(s=>`{${(s.getAttribute(it.TEXT)||"").replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p[^>]*>/g,"").trim()}}`),i=document.createElement("p");i.classList.add("text-red-500","super-text"),i.innerHTML=`${r.join("<br/>")}`,e.before(i),n.forEach(s=>s.remove())}e.innerHTML=e.innerHTML.trim()})}const cx=t=>{if(typeof t=="string"&&(t=ax(t)),typeof t=="object")return t;const e=document.createElement("div");return e.innerHTML=t,e.querySelectorAll("p").forEach(n=>{const r=n.querySelectorAll("button.super-text");if(r.length>0){const i=Array.from(r).map(s=>{const a=s.getAttribute(it.TEXT)||"";return String(a).replace(/<\/p>\s*<p>/g,"<br/>").replace(/<\/?p>/g,"")});n.innerHTML=i.join("<br/>")}else n.innerHTML=""}),e.innerHTML};class c1{isNativeWebViewAvailable(){return window.ReactNativeWebView!==void 0}getDevicePlatform(){var r;if(!this.isNativeWebViewAvailable())return;if(typeof window.webkit=="object"&&typeof((r=window.webkit)==null?void 0:r.messageHandlers)=="object")return a1.IOS;const n=navigator.userAgent.toLowerCase();if(n.includes("android"))return a1.ANDROID;if(n.includes("iphone")||n.includes("ipad")||n.includes("ipod"))return a1.IOS}sendToNative(e,n){if(window.ReactNativeWebView){const r={type:e,data:n};window.ReactNativeWebView.postMessage(JSON.stringify(r)),console.log(`Sent message to native: ${e}`)}else console.log("ReactNativeWebView not available")}receiveDataFromNative(e,n){const r=window.receiveDriverData;window.receiveDriverData=i=>{try{const s=JSON.parse(i);s.type===e&&(console.log(`Received data from native ${e}`),n(s.data)),r&&r(i)}catch(s){console.log("Error parsing data from native",s)}}}}var ml=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oR(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uf={exports:{}};/**
|
|
110
110
|
* @license
|
|
111
111
|
* Lodash <https://lodash.com/>
|
|
112
112
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -132,33 +132,33 @@ __p += '`),xt&&(we+=`' +
|
|
|
132
132
|
function print() { __p += __j.call(arguments, '') }
|
|
133
133
|
`:`;
|
|
134
134
|
`)+we+`return __p
|
|
135
|
-
}`;var gt=U9(function(){return Mt(P,ze+"return "+we).apply(n,W)});if(gt.source=we,K2(gt))throw gt;return gt}function aue(d){return It(d).toLowerCase()}function lue(d){return It(d).toUpperCase()}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=Ao(h),P=QS(S,M),W=NS(S,M)+1;return Vs(S,P,W).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=NS(S,Ao(h))+1;return Vs(S,0,M).join("")}function due(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=QS(S,Ao(h));return Vs(S,M).join("")}function fue(d,h){var w=B,S=$;if(rn(h)){var M="separator"in h?h.separator:M;w="length"in h?ft(h.length):w,S="omission"in h?Lr(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var W=Ao(d);P=W.length}if(w>=P)return d;var G=w-tu(S);if(G<1)return S;var N=W?Vs(W,0,G).join(""):d.slice(0,G);if(M===n)return N+S;if(W&&(G+=N.length-G),G2(M)){if(d.slice(G).search(M)){var ve,ye=N;for(M.global||(M=u2(M.source,It(yS.exec(M))+"g")),M.lastIndex=0;ve=M.exec(ye);)var we=ve.index;N=N.slice(0,we===n?G:we)}}else if(d.indexOf(Lr(M),G)!=G){var Ie=N.lastIndexOf(M);Ie>-1&&(N=N.slice(0,Ie))}return N+S}function pue(d){return d=It(d),d&&Ln.test(d)?d.replace(xn,Ure):d}var hue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Vre(d)?qre(d):Are(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Ir(d,n,h)}catch(w){return K2(w)?w:new at(w)}}),mue=Ri(function(d,h){return no(h,function(w){w=ri(w),Bi(d,w,j2(d[w],d))}),d});function gue(d){var h=d==null?0:d.length,w=Xe();return d=h?Nt(d,function(S){if(typeof S[1]!="function")throw new ro(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var M=-1;++M<h;){var P=d[M];if(Ir(P[0],this,S))return Ir(P[1],this,S)}})}function bue(d){return Uoe(io(d,p))}function Z2(d){return function(){return d}}function vue(d,h){return d==null||d!==d?h:d}var yue=q_(),wue=q_(!0);function wr(d){return d}function Q2(d){return x_(typeof d=="function"?d:io(d,p))}function xue(d){return k_(io(d,p))}function Cue(d,h){return E_(d,io(h,p))}var kue=bt(function(d,h){return function(w){return rd(w,d,h)}}),Eue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=An(h),M=lm(h,S);w==null&&!(rn(h)&&(M.length||!S.length))&&(w=h,h=d,d=this,M=lm(h,An(h)));var P=!(rn(w)&&"chain"in w)||!!w.chain,W=Di(d);return no(M,function(G){var N=h[G];d[G]=N,W&&(d.prototype[G]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),we=ye.__actions__=br(this.__actions__);return we.push({func:N,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return N.apply(d,Bs([this.value()],arguments))})}),d}function Sue(){return Pn._===this&&(Pn._=Zre),this}function ey(){}function _ue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var Tue=B2(Nt),Aue=B2(KS),Mue=B2(n2);function W9(d){return F2(d)?r2(ri(d)):iie(d)}function Oue(d){return function(h){return d==null?n:Ha(d,h)}}var Bue=G_(),Iue=G_(!0);function ty(){return[]}function ny(){return!1}function Rue(){return{}}function Lue(){return""}function Due(){return!0}function Pue(d,h){if(d=ft(d),d<1||d>F)return[];var w=Y,S=Xn(d,Y);h=Xe(h),d-=Y;for(var M=s2(S,h);++w<d;)h(w);return M}function Vue(d){return lt(d)?Nt(d,ri):Dr(d)?[d]:br(u9(It(d)))}function Fue(d){var h=++Yre;return It(d)+h}var $ue=hm(function(d,h){return d+h},0),Hue=I2("ceil"),zue=hm(function(d,h){return d/h},1),Uue=I2("floor");function Wue(d){return d&&d.length?am(d,wr,b2):n}function jue(d,h){return d&&d.length?am(d,Xe(h,2),b2):n}function que(d){return YS(d,wr)}function Kue(d,h){return YS(d,Xe(h,2))}function Gue(d){return d&&d.length?am(d,wr,x2):n}function Xue(d,h){return d&&d.length?am(d,Xe(h,2),x2):n}var Yue=hm(function(d,h){return d*h},1),Jue=I2("round"),Zue=hm(function(d,h){return d-h},0);function Que(d){return d&&d.length?i2(d,wr):0}function Nue(d,h){return d&&d.length?i2(d,Xe(h,2)):0}return I.after=xae,I.ary=w9,I.assign=lle,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=ule,I.at=cle,I.before=x9,I.bind=j2,I.bindAll=mue,I.bindKey=C9,I.castArray=Rae,I.chain=b9,I.chunk=Uie,I.compact=Wie,I.concat=jie,I.cond=gue,I.conforms=bue,I.constant=Z2,I.countBy=Qse,I.create=dle,I.curry=k9,I.curryRight=E9,I.debounce=S9,I.defaults=fle,I.defaultsDeep=ple,I.defer=Cae,I.delay=kae,I.difference=qie,I.differenceBy=Kie,I.differenceWith=Gie,I.drop=Xie,I.dropRight=Yie,I.dropRightWhile=Jie,I.dropWhile=Zie,I.fill=Qie,I.filter=eae,I.flatMap=rae,I.flatMapDeep=oae,I.flatMapDepth=iae,I.flatten=p9,I.flattenDeep=Nie,I.flattenDepth=ese,I.flip=Eae,I.flow=yue,I.flowRight=wue,I.fromPairs=tse,I.functions=wle,I.functionsIn=xle,I.groupBy=sae,I.initial=rse,I.intersection=ose,I.intersectionBy=ise,I.intersectionWith=sse,I.invert=kle,I.invertBy=Ele,I.invokeMap=lae,I.iteratee=Q2,I.keyBy=uae,I.keys=An,I.keysIn=yr,I.map=xm,I.mapKeys=_le,I.mapValues=Tle,I.matches=xue,I.matchesProperty=Cue,I.memoize=km,I.merge=Ale,I.mergeWith=D9,I.method=kue,I.methodOf=Eue,I.mixin=N2,I.negate=Em,I.nthArg=_ue,I.omit=Mle,I.omitBy=Ole,I.once=Sae,I.orderBy=cae,I.over=Tue,I.overArgs=_ae,I.overEvery=Aue,I.overSome=Mue,I.partial=q2,I.partialRight=_9,I.partition=dae,I.pick=Ble,I.pickBy=P9,I.property=W9,I.propertyOf=Oue,I.pull=cse,I.pullAll=m9,I.pullAllBy=dse,I.pullAllWith=fse,I.pullAt=pse,I.range=Bue,I.rangeRight=Iue,I.rearg=Tae,I.reject=hae,I.remove=hse,I.rest=Aae,I.reverse=U2,I.sampleSize=gae,I.set=Rle,I.setWith=Lle,I.shuffle=bae,I.slice=mse,I.sortBy=wae,I.sortedUniq=Cse,I.sortedUniqBy=kse,I.split=rue,I.spread=Mae,I.tail=Ese,I.take=Sse,I.takeRight=_se,I.takeRightWhile=Tse,I.takeWhile=Ase,I.tap=Wse,I.throttle=Oae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Vue,I.toPlainObject=R9,I.transform=Dle,I.unary=Bae,I.union=Mse,I.unionBy=Ose,I.unionWith=Bse,I.uniq=Ise,I.uniqBy=Rse,I.uniqWith=Lse,I.unset=Ple,I.unzip=W2,I.unzipWith=g9,I.update=Vle,I.updateWith=Fle,I.values=du,I.valuesIn=$le,I.without=Dse,I.words=z9,I.wrap=Iae,I.xor=Pse,I.xorBy=Vse,I.xorWith=Fse,I.zip=$se,I.zipObject=Hse,I.zipObjectDeep=zse,I.zipWith=Use,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=$ue,I.attempt=U9,I.camelCase=Wle,I.capitalize=$9,I.ceil=Hue,I.clamp=Hle,I.clone=Lae,I.cloneDeep=Pae,I.cloneDeepWith=Vae,I.cloneWith=Dae,I.conformsTo=Fae,I.deburr=H9,I.defaultTo=vue,I.divide=zue,I.endsWith=jle,I.eq=Oo,I.escape=qle,I.escapeRegExp=Kle,I.every=Nse,I.find=tae,I.findIndex=d9,I.findKey=hle,I.findLast=nae,I.findLastIndex=f9,I.findLastKey=mle,I.floor=Uue,I.forEach=v9,I.forEachRight=y9,I.forIn=gle,I.forInRight=ble,I.forOwn=vle,I.forOwnRight=yle,I.get=X2,I.gt=$ae,I.gte=Hae,I.has=Cle,I.hasIn=Y2,I.head=h9,I.identity=wr,I.includes=aae,I.indexOf=nse,I.inRange=zle,I.invoke=Sle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=zae,I.isArrayLike=vr,I.isArrayLikeObject=fn,I.isBoolean=Uae,I.isBuffer=Fs,I.isDate=Wae,I.isElement=jae,I.isEmpty=qae,I.isEqual=Kae,I.isEqualWith=Gae,I.isError=K2,I.isFinite=Xae,I.isFunction=Di,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Yae,I.isMatchWith=Jae,I.isNaN=Zae,I.isNative=Qae,I.isNil=ele,I.isNull=Nae,I.isNumber=M9,I.isObject=rn,I.isObjectLike=cn,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=tle,I.isSet=O9,I.isString=_m,I.isSymbol=Dr,I.isTypedArray=cu,I.isUndefined=nle,I.isWeakMap=rle,I.isWeakSet=ole,I.join=ase,I.kebabCase=Gle,I.last=ao,I.lastIndexOf=lse,I.lowerCase=Xle,I.lowerFirst=Yle,I.lt=ile,I.lte=sle,I.max=Wue,I.maxBy=jue,I.mean=que,I.meanBy=Kue,I.min=Gue,I.minBy=Xue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Rue,I.stubString=Lue,I.stubTrue=Due,I.multiply=Yue,I.nth=use,I.noConflict=Sue,I.noop=ey,I.now=Cm,I.pad=Jle,I.padEnd=Zle,I.padStart=Qle,I.parseInt=Nle,I.random=Ule,I.reduce=fae,I.reduceRight=pae,I.repeat=eue,I.replace=tue,I.result=Ile,I.round=Jue,I.runInContext=Z,I.sample=mae,I.size=vae,I.snakeCase=nue,I.some=yae,I.sortedIndex=gse,I.sortedIndexBy=bse,I.sortedIndexOf=vse,I.sortedLastIndex=yse,I.sortedLastIndexBy=wse,I.sortedLastIndexOf=xse,I.startCase=oue,I.startsWith=iue,I.subtract=Zue,I.sum=Que,I.sumBy=Nue,I.template=sue,I.times=Pue,I.toFinite=Pi,I.toInteger=ft,I.toLength=I9,I.toLower=aue,I.toNumber=lo,I.toSafeInteger=ale,I.toString=It,I.toUpper=lue,I.trim=uue,I.trimEnd=cue,I.trimStart=due,I.truncate=fue,I.unescape=pue,I.uniqueId=Fue,I.upperCase=hue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return ti(I,function(h,w){Lt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,no(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),no(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:kn(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Xn(w,S.__takeCount__):S.__views__.push({size:Xn(w,Y),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),no(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==L;wt.prototype[d]=function(M){var P=this.clone();return P.__iteratees__.push({iteratee:Xe(M,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),no(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),no(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(wr)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(Em(Xe(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(Y)},ti(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),M=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);M&&(I.prototype[h]=function(){var W=this.__wrapped__,G=S?[1]:arguments,N=W instanceof wt,ve=G[0],ye=N||lt(W),we=function(vt){var xt=M.apply(I,Bs([vt],G));return S&&Ie?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(N=ye=!1);var Ie=this.__chain__,ze=!!this.__actions__.length,Je=P&&!Ie,gt=N&&!ze;if(!P&&ye){W=gt?W:new wt(this);var Ze=d.apply(W,G);return Ze.__actions__.push({func:wm,args:[we],thisArg:n}),new oo(Ze,Ie)}return Je&>?d.apply(this,G):(Ze=this.thru(we),Je?S?Ze.value()[0]:Ze.value():Ze)})}),no(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var M=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],M)}return this[w](function(W){return h.apply(lt(W)?W:[],M)})}}),ti(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Lt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=poe,wt.prototype.reverse=hoe,wt.prototype.value=moe,I.prototype.at=jse,I.prototype.chain=qse,I.prototype.commit=Kse,I.prototype.next=Gse,I.prototype.plant=Yse,I.prototype.reverse=Jse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Zse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Xse),I},nu=Kre();Da?((Da.exports=nu)._=nu,Qv._=nu):Pn._=nu}).call(ml)}(uf,uf.exports);var Et=uf.exports;const on=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function d6(t){return/\s/.test(t)}function f6(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(d6(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&d6(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=$r.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let ns=null;function aR(){if(ns)return ns;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),ns=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=E=>parseFloat(E)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,k=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+k+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),t!=null&&t.fontSize&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),ns&&ns.parentNode&&(ns.parentNode.removeChild(ns),ns=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Dt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:o6,height:o6}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:V,flipY:O}=e.node.attrs,B=[];V&&B.push("rotateX(180deg)"),O&&B.push("rotateY(180deg)");const $=B.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=Et.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},i6);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const V=document.querySelector(".image-resizer");if(V&&(V.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:B}=o.unref(s),$=O/B;let H=Number(e.node.attrs.width)||O,X=Number(e.node.attrs.height)||Math.round(H/$);const ee=o.unref(i).width;H=Math.min(H>ee?ee:H,ee),X=Math.round(H/$),Object.assign(l.value,{x:T,y:A,w:H,h:X,dir:_}),a.value=!0,y()}const b=Et.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:V}=o.unref(l),O=(_-T)*(/l/.test(V)?-1:1),B=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:B})},i6),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const k=new ResizeObserver(m),E=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),k.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),k.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},E.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Ee)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),po=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=po(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),src:{default:null,parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e;return n==null?void 0:n.getAttribute("src")}},flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e,r=n&&(n.style.width||n.getAttribute("width"))||null;return r&&r.endsWith("%")?r:r==null?null:parseInt(r,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null||n==="auto"?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"},{tag:"p",priority:1001,getAttrs:t=>{var n,r;const e=t;return e.children.length===1&&((n=e.firstElementChild)==null?void 0:n.tagName)==="IMG"&&!!!((r=e.textContent)!=null&&r.trim())&&e.firstElementChild.hasAttribute("src")?null:!1}}]},addProseMirrorPlugins(){return[new ot({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Pe&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Pe&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=po(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var E;const k=((E=e.extensions)==null?void 0:E.filter(C=>C.name!=="spellchecker"))||[];return k.some(C=>C.name==="image")||k.push(qu.configure()),k}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(k){return u1(k).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(k){return new Vo({extensions:n.value,content:k,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(gn(e.comment,!0,e.mode))),i.value||(p.value=g(gn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(gn(e.content,!0,e.mode)));function b(k,E){if(!k)return;const C=gn(E,!0,e.mode);Et.isEqual(k.getHTML(),C)||k.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,k=>{r.value||b(f.value,k)}),o.watch(()=>e.commentCuesheet,k=>{i.value||b(p.value,k)}),o.watch(()=>e.content,k=>{s.value||b(m.value,k)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(k,E)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[k.comment&&!k.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=k.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameComment.label,"custom-class":k.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),k.commentCuesheet&&!k.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=k.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameCommentCuesheet.label,"custom-class":k.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),k.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=k.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameContent.label,"custom-class":k.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],rs=Math.min,Sr=Math.max,ff=Math.round,pf=Math.floor,zo=t=>({x:t,y:t}),kR={left:"right",right:"left",bottom:"top",top:"bottom"},ER={start:"end",end:"start"};function m1(t,e,n){return Sr(t,rs(e,n))}function hi(t,e){return typeof t=="function"?t(e):t}function mi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function is(t){return["top","bottom"].includes(mi(t))?"y":"x"}function v1(t){return g1(is(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>ER[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(mi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>kR[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function p6(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function h6(t,e,n){let{reference:r,floating:i}=t;const s=is(e),a=v1(e),l=b1(a),u=mi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=h6(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:k,y:E,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=k??f,p=E??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=h6(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=hi(e,t),b=p6(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),k=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:E,strategy:u}):k);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=hi(t,e)||{};if(c==null)return{};const p=p6(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",k=y?"bottom":"right",E=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[E]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[E]||s.floating[b]);const V=C/2-_/2,O=A/2-v[b]/2-1,B=rs(p[x],O),$=rs(p[k],O),H=B,X=A-v[b]-$,ee=A/2-v[b]/2+V,z=m1(H,ee,X),L=!u.arrow&&gl(i)!=null&&ee!==z&&s.reference[b]/2-(ee<H?B:$)-v[b]/2<0,D=L?ee<H?ee-H:ee-X:0;return{[g]:m[g]+D,data:{[g]:z,centerOffset:ee-z-D,...L&&{alignmentOffset:D}},reset:L}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=hi(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=mi(i),k=is(l),E=mi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(E||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],V=await Ku(e,y),O=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(V[x]),p){const ee=SR(i,a,C);O.push(V[ee[0]],V[ee[1]])}if(B=[...B,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,H;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,z=A[ee];if(z)return{data:{index:ee,overflows:B},reset:{placement:z}};let L=(H=B.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:H.placement;if(!L)switch(g){case"bestFit":{var X;const D=(X=B.filter(F=>{if(T){const R=is(F.placement);return R===k||R==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((F,R)=>F[1]-R[1])[0])==null?void 0:X[0];D&&(L=D);break}case"initialPlacement":L=l;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function m6(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function g6(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=hi(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=m6(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:g6(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=m6(s,n.floating);return{data:{escapedOffsets:a,escaped:g6(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=mi(n),l=gl(n),u=is(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=hi(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:k}=y;return{x,y:k}}},...u}=hi(t,e),c={x:n,y:r},f=await Ku(e,u),p=is(mi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",k=g+f[y],E=g-f[x];g=m1(k,g,E)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",k=b+f[y],E=b-f[x];b=m1(k,b,E)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=hi(t,e),f={x:n,y:r},p=is(i),m=g1(p);let g=f[m],b=f[p];const v=hi(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const E=m==="y"?"height":"width",C=s.reference[m]-s.floating[E]+y.mainAxis,_=s.reference[m]+s.reference[E]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,k;const E=m==="y"?"width":"height",C=["top","left"].includes(mi(i)),_=s.reference[p]-s.floating[E]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[E]+(C?0:((k=a.offset)==null?void 0:k[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=hi(t,e),f=await Ku(e,c),p=mi(i),m=gl(i),g=is(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const k=v-f.top-f.bottom,E=b-f.left-f.right,C=rs(v-f[y],k),_=rs(b-f[x],E),T=!e.middlewareData.shift;let A=C,V=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=k),T&&!m){const B=Sr(f.left,0),$=Sr(f.right,0),H=Sr(f.top,0),X=Sr(f.bottom,0);g?V=b-2*(B!==0||$!==0?B+$:Sr(f.left,f.right)):A=v-2*(H!==0||X!==0?H+X:Sr(f.top,f.bottom))}await u({...e,availableWidth:V,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function _r(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Uo(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof _r(t).Node:!1}function ho(t){return gf()?t instanceof Element||t instanceof _r(t).Element:!1}function Wo(t){return gf()?t instanceof HTMLElement||t instanceof _r(t).HTMLElement:!1}function b6(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _r(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=mo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=ho(t)?mo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ss(t);for(;Wo(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ss(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function mo(t){return _r(t).getComputedStyle(t)}function vf(t){return ho(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ss(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||b6(t)&&t.host||Uo(t);return b6(e)?e.host:e}function v6(t){const e=ss(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wo(e)&&Gu(e)?e:v6(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=v6(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=_r(i);if(s){const l=k1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function k1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function y6(t){const e=mo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Wo(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function E1(t){return ho(t)?t:t.contextElement}function vl(t){const e=E1(t);if(!Wo(e))return zo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=y6(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=zo(0);function w6(t){const e=_r(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_r(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=E1(t);let a=zo(1);e&&(r?ho(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?w6(s):zo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=_r(s),g=r&&ho(r)?_r(r):r;let b=m,v=k1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),k=mo(v),E=x.left+(v.clientLeft+parseFloat(k.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(k.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=E,c+=C,b=_r(v),v=k1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa(Uo(t)).left+n}function x6(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=Uo(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=zo(1);const f=zo(0),p=Wo(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Wo(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?x6(a,u,!0):zo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=Uo(t),n=vf(t),r=t.ownerDocument.body,i=Sr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Sr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return mo(r).direction==="rtl"&&(a+=Sr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=_r(t),r=Uo(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Wo(t)?vl(t):zo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function C6(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR(Uo(t));else if(ho(e))r=GR(e,n);else{const i=w6(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function k6(t,e){const n=ss(t);return n===e||!ho(n)||bl(n)?!1:mo(n).position==="fixed"||k6(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>ho(l)&&ia(l)!=="body"),i=null;const s=mo(t).position==="fixed";let a=s?ss(t):t;for(;ho(a)&&!bl(a);){const l=mo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&k6(t,a))?r=r.filter(f=>f!==a):i=l,a=ss(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=C6(e,f,i);return c.top=Sr(p.top,c.top),c.right=rs(p.right,c.right),c.bottom=rs(p.bottom,c.bottom),c.left=Sr(p.left,c.left),c},C6(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=y6(t);return{width:e,height:n}}function ZR(t,e,n){const r=Wo(e),i=Uo(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=zo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?x6(i,l):zo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return mo(t).position==="static"}function E6(t,e){if(!Wo(t)||mo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Uo(t)===n&&(n=n.ownerDocument.body),n}function S6(t,e){const n=_r(t);if(bf(t))return n;if(!Wo(t)){let i=ss(t);for(;i&&!bl(i);){if(ho(i)&&!_1(i))return i;i=ss(i)}return n}let r=E6(t,e);for(;r&&$R(r)&&_1(r);)r=E6(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||S6,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return mo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:Uo,getClippingRect:YR,getOffsetParent:S6,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:ho,isRTL:NR};function _6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=Uo(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),E={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Sr(0,rs(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_6(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,E)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=E1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[k]=x;k&&k.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_6(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(k=>{i&&k.removeEventListener("scroll",n),s&&k.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,T6=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function A6(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function M6(t,e){const n=A6(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const V=M6(f.value,p.value),O=M6(f.value,m.value);return u.value?{...A,transform:"translate("+V+"px, "+O+"px)",...A6(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:V+"px",top:O+"px"}});let k;function E(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(V=>{p.value=V.x,m.value=V.y,g.value=V.strategy,b.value=V.placement,v.value=V.middlewareData,y.value=A!==!1})}function C(){typeof k=="function"&&(k(),k=void 0)}function _(){if(C(),r===void 0){E();return}if(c.value!=null&&f.value!=null){k=r(c.value,f.value,E);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],E,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:E}}function zt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function O6(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function B6(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function jo(t){return typeof t=="function"?t():o.unref(t)}const gi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},I6=wL();function wL(){var t,e;return gi&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=jo(t),u=jo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function kL(t){return o.getCurrentInstance()}function R6(t,e=1e4){return o.customRef((n,r)=>{let i=jo(t),s;const a=()=>setTimeout(()=>{i=jo(t),r()},jo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function L6(t,e=200,n={}){return xL(CL(e,n),t)}function EL(t,e){kL()&&o.onBeforeUnmount(t,e)}function D6(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},jo(e))}return r&&(i.value=!0,gi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function go(t){var e;const n=jo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=gi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[go(e),jo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&jo(l)||u(c)&&n(c)},a)}function P6(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=P6();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>go(p)):[go(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function Tr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=E=>l?typeof l=="function"?l(E):ML(E):E,x=()=>bL(t[e])?y(t[e]):p,k=E=>{m?m(E)&&b(v,E):b(v,E)};if(u){const E=x(),C=o.ref(E);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&k(T)},{deep:f}),C}else return o.computed({get(){return x()},set(E){k(E)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Wn(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,k=p||m;if(!v&&!y&&(!x&&!k||i==="vertical"&&k||i==="horizontal"&&x))return null;const E=n?Array.from(n.querySelectorAll(s)):a;if(!E.length)return null;c&&t.preventDefault();let C=null;return k||x?C=V6(E,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=E.at(0)||null:y&&(C=E.at(-1)||null),f&&(C==null||C.focus()),C}function V6(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?V6(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,hce]=zt("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=B6(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",I6&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!gi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),I6&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return EL(()=>{n.value.delete(e)}),r}function F6(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:F6(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&F6(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=go(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!gi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$6()),document.body.insertAdjacentElement("beforeend",e[1]??$6()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $6(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return jo(t)?!!((e=go(t))!=null&&e.closest("form")):!0})}function er(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Pt(t,e){const n=er(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function Le(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:go(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=R6(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},kl=new WeakMap,kf=new WeakMap,Ef={},D1=0,H6=function(t){return t&&(t.host||H6(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=H6(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);Ef[n]||(Ef[n]=new WeakMap);var s=Ef[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(kl.get(m)||0)+1,y=(s.get(m)||0)+1;kl.set(m,v),s.set(m,y),a.push(m),v===1&&b&&kf.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=kl.get(p)-1,g=s.get(p)-1;kl.set(p,m),s.set(p,g),m||(kf.has(p)||p.removeAttribute(r),kf.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(kl=new WeakMap,kl=new WeakMap,kf=new WeakMap,Ef={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>go(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Kr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=go(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function z6(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=R6("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Wn(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Ye=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function U6(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:go(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=z6(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(gi){const k=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(k)}};o.watch(t,async(y,x)=>{var k;const E=x!==y;if(await o.nextTick(),E){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((k=r.value)==null?void 0:k.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),k=x.includes(y.animationName),E=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&k&&(p(`after-${E}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const Gr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
135
|
+
}`;var gt=U9(function(){return Mt(P,ze+"return "+we).apply(n,W)});if(gt.source=we,K2(gt))throw gt;return gt}function aue(d){return It(d).toLowerCase()}function lue(d){return It(d).toUpperCase()}function uue(d,h,w){if(d=It(d),d&&(w||h===n))return ZS(d);if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=Ao(h),P=QS(S,M),W=NS(S,M)+1;return Vs(S,P,W).join("")}function cue(d,h,w){if(d=It(d),d&&(w||h===n))return d.slice(0,t_(d)+1);if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=NS(S,Ao(h))+1;return Vs(S,0,M).join("")}function due(d,h,w){if(d=It(d),d&&(w||h===n))return d.replace(Kv,"");if(!d||!(h=Lr(h)))return d;var S=Ao(d),M=QS(S,Ao(h));return Vs(S,M).join("")}function fue(d,h){var w=B,S=$;if(rn(h)){var M="separator"in h?h.separator:M;w="length"in h?ft(h.length):w,S="omission"in h?Lr(h.omission):S}d=It(d);var P=d.length;if(eu(d)){var W=Ao(d);P=W.length}if(w>=P)return d;var G=w-tu(S);if(G<1)return S;var N=W?Vs(W,0,G).join(""):d.slice(0,G);if(M===n)return N+S;if(W&&(G+=N.length-G),G2(M)){if(d.slice(G).search(M)){var ve,ye=N;for(M.global||(M=u2(M.source,It(yS.exec(M))+"g")),M.lastIndex=0;ve=M.exec(ye);)var we=ve.index;N=N.slice(0,we===n?G:we)}}else if(d.indexOf(Lr(M),G)!=G){var Ie=N.lastIndexOf(M);Ie>-1&&(N=N.slice(0,Ie))}return N+S}function pue(d){return d=It(d),d&&Ln.test(d)?d.replace(xn,Ure):d}var hue=lu(function(d,h,w){return d+(w?" ":"")+h.toUpperCase()}),J2=W_("toUpperCase");function z9(d,h,w){return d=It(d),h=w?n:h,h===n?Vre(d)?qre(d):Are(d):d.match(h)||[]}var U9=bt(function(d,h){try{return Ir(d,n,h)}catch(w){return K2(w)?w:new at(w)}}),mue=Ri(function(d,h){return no(h,function(w){w=ri(w),Bi(d,w,j2(d[w],d))}),d});function gue(d){var h=d==null?0:d.length,w=Xe();return d=h?Nt(d,function(S){if(typeof S[1]!="function")throw new ro(a);return[w(S[0]),S[1]]}):[],bt(function(S){for(var M=-1;++M<h;){var P=d[M];if(Ir(P[0],this,S))return Ir(P[1],this,S)}})}function bue(d){return Uoe(io(d,p))}function Z2(d){return function(){return d}}function vue(d,h){return d==null||d!==d?h:d}var yue=q_(),wue=q_(!0);function wr(d){return d}function Q2(d){return x_(typeof d=="function"?d:io(d,p))}function xue(d){return k_(io(d,p))}function Cue(d,h){return E_(d,io(h,p))}var kue=bt(function(d,h){return function(w){return rd(w,d,h)}}),Eue=bt(function(d,h){return function(w){return rd(d,w,h)}});function N2(d,h,w){var S=An(h),M=lm(h,S);w==null&&!(rn(h)&&(M.length||!S.length))&&(w=h,h=d,d=this,M=lm(h,An(h)));var P=!(rn(w)&&"chain"in w)||!!w.chain,W=Di(d);return no(M,function(G){var N=h[G];d[G]=N,W&&(d.prototype[G]=function(){var ve=this.__chain__;if(P||ve){var ye=d(this.__wrapped__),we=ye.__actions__=br(this.__actions__);return we.push({func:N,args:arguments,thisArg:d}),ye.__chain__=ve,ye}return N.apply(d,Bs([this.value()],arguments))})}),d}function Sue(){return Pn._===this&&(Pn._=Zre),this}function ey(){}function _ue(d){return d=ft(d),bt(function(h){return S_(h,d)})}var Tue=B2(Nt),Aue=B2(KS),Mue=B2(n2);function W9(d){return F2(d)?r2(ri(d)):iie(d)}function Oue(d){return function(h){return d==null?n:Ha(d,h)}}var Bue=G_(),Iue=G_(!0);function ty(){return[]}function ny(){return!1}function Rue(){return{}}function Lue(){return""}function Due(){return!0}function Pue(d,h){if(d=ft(d),d<1||d>F)return[];var w=Y,S=Xn(d,Y);h=Xe(h),d-=Y;for(var M=s2(S,h);++w<d;)h(w);return M}function Vue(d){return lt(d)?Nt(d,ri):Dr(d)?[d]:br(u9(It(d)))}function Fue(d){var h=++Yre;return It(d)+h}var $ue=hm(function(d,h){return d+h},0),Hue=I2("ceil"),zue=hm(function(d,h){return d/h},1),Uue=I2("floor");function Wue(d){return d&&d.length?am(d,wr,b2):n}function jue(d,h){return d&&d.length?am(d,Xe(h,2),b2):n}function que(d){return YS(d,wr)}function Kue(d,h){return YS(d,Xe(h,2))}function Gue(d){return d&&d.length?am(d,wr,x2):n}function Xue(d,h){return d&&d.length?am(d,Xe(h,2),x2):n}var Yue=hm(function(d,h){return d*h},1),Jue=I2("round"),Zue=hm(function(d,h){return d-h},0);function Que(d){return d&&d.length?i2(d,wr):0}function Nue(d,h){return d&&d.length?i2(d,Xe(h,2)):0}return I.after=xae,I.ary=w9,I.assign=lle,I.assignIn=L9,I.assignInWith=Tm,I.assignWith=ule,I.at=cle,I.before=x9,I.bind=j2,I.bindAll=mue,I.bindKey=C9,I.castArray=Rae,I.chain=b9,I.chunk=Uie,I.compact=Wie,I.concat=jie,I.cond=gue,I.conforms=bue,I.constant=Z2,I.countBy=Qse,I.create=dle,I.curry=k9,I.curryRight=E9,I.debounce=S9,I.defaults=fle,I.defaultsDeep=ple,I.defer=Cae,I.delay=kae,I.difference=qie,I.differenceBy=Kie,I.differenceWith=Gie,I.drop=Xie,I.dropRight=Yie,I.dropRightWhile=Jie,I.dropWhile=Zie,I.fill=Qie,I.filter=eae,I.flatMap=rae,I.flatMapDeep=oae,I.flatMapDepth=iae,I.flatten=p9,I.flattenDeep=Nie,I.flattenDepth=ese,I.flip=Eae,I.flow=yue,I.flowRight=wue,I.fromPairs=tse,I.functions=wle,I.functionsIn=xle,I.groupBy=sae,I.initial=rse,I.intersection=ose,I.intersectionBy=ise,I.intersectionWith=sse,I.invert=kle,I.invertBy=Ele,I.invokeMap=lae,I.iteratee=Q2,I.keyBy=uae,I.keys=An,I.keysIn=yr,I.map=xm,I.mapKeys=_le,I.mapValues=Tle,I.matches=xue,I.matchesProperty=Cue,I.memoize=km,I.merge=Ale,I.mergeWith=D9,I.method=kue,I.methodOf=Eue,I.mixin=N2,I.negate=Em,I.nthArg=_ue,I.omit=Mle,I.omitBy=Ole,I.once=Sae,I.orderBy=cae,I.over=Tue,I.overArgs=_ae,I.overEvery=Aue,I.overSome=Mue,I.partial=q2,I.partialRight=_9,I.partition=dae,I.pick=Ble,I.pickBy=P9,I.property=W9,I.propertyOf=Oue,I.pull=cse,I.pullAll=m9,I.pullAllBy=dse,I.pullAllWith=fse,I.pullAt=pse,I.range=Bue,I.rangeRight=Iue,I.rearg=Tae,I.reject=hae,I.remove=hse,I.rest=Aae,I.reverse=U2,I.sampleSize=gae,I.set=Rle,I.setWith=Lle,I.shuffle=bae,I.slice=mse,I.sortBy=wae,I.sortedUniq=Cse,I.sortedUniqBy=kse,I.split=rue,I.spread=Mae,I.tail=Ese,I.take=Sse,I.takeRight=_se,I.takeRightWhile=Tse,I.takeWhile=Ase,I.tap=Wse,I.throttle=Oae,I.thru=wm,I.toArray=B9,I.toPairs=V9,I.toPairsIn=F9,I.toPath=Vue,I.toPlainObject=R9,I.transform=Dle,I.unary=Bae,I.union=Mse,I.unionBy=Ose,I.unionWith=Bse,I.uniq=Ise,I.uniqBy=Rse,I.uniqWith=Lse,I.unset=Ple,I.unzip=W2,I.unzipWith=g9,I.update=Vle,I.updateWith=Fle,I.values=du,I.valuesIn=$le,I.without=Dse,I.words=z9,I.wrap=Iae,I.xor=Pse,I.xorBy=Vse,I.xorWith=Fse,I.zip=$se,I.zipObject=Hse,I.zipObjectDeep=zse,I.zipWith=Use,I.entries=V9,I.entriesIn=F9,I.extend=L9,I.extendWith=Tm,N2(I,I),I.add=$ue,I.attempt=U9,I.camelCase=Wle,I.capitalize=$9,I.ceil=Hue,I.clamp=Hle,I.clone=Lae,I.cloneDeep=Pae,I.cloneDeepWith=Vae,I.cloneWith=Dae,I.conformsTo=Fae,I.deburr=H9,I.defaultTo=vue,I.divide=zue,I.endsWith=jle,I.eq=Oo,I.escape=qle,I.escapeRegExp=Kle,I.every=Nse,I.find=tae,I.findIndex=d9,I.findKey=hle,I.findLast=nae,I.findLastIndex=f9,I.findLastKey=mle,I.floor=Uue,I.forEach=v9,I.forEachRight=y9,I.forIn=gle,I.forInRight=ble,I.forOwn=vle,I.forOwnRight=yle,I.get=X2,I.gt=$ae,I.gte=Hae,I.has=Cle,I.hasIn=Y2,I.head=h9,I.identity=wr,I.includes=aae,I.indexOf=nse,I.inRange=zle,I.invoke=Sle,I.isArguments=Wa,I.isArray=lt,I.isArrayBuffer=zae,I.isArrayLike=vr,I.isArrayLikeObject=fn,I.isBoolean=Uae,I.isBuffer=Fs,I.isDate=Wae,I.isElement=jae,I.isEmpty=qae,I.isEqual=Kae,I.isEqualWith=Gae,I.isError=K2,I.isFinite=Xae,I.isFunction=Di,I.isInteger=T9,I.isLength=Sm,I.isMap=A9,I.isMatch=Yae,I.isMatchWith=Jae,I.isNaN=Zae,I.isNative=Qae,I.isNil=ele,I.isNull=Nae,I.isNumber=M9,I.isObject=rn,I.isObjectLike=cn,I.isPlainObject=ud,I.isRegExp=G2,I.isSafeInteger=tle,I.isSet=O9,I.isString=_m,I.isSymbol=Dr,I.isTypedArray=cu,I.isUndefined=nle,I.isWeakMap=rle,I.isWeakSet=ole,I.join=ase,I.kebabCase=Gle,I.last=ao,I.lastIndexOf=lse,I.lowerCase=Xle,I.lowerFirst=Yle,I.lt=ile,I.lte=sle,I.max=Wue,I.maxBy=jue,I.mean=que,I.meanBy=Kue,I.min=Gue,I.minBy=Xue,I.stubArray=ty,I.stubFalse=ny,I.stubObject=Rue,I.stubString=Lue,I.stubTrue=Due,I.multiply=Yue,I.nth=use,I.noConflict=Sue,I.noop=ey,I.now=Cm,I.pad=Jle,I.padEnd=Zle,I.padStart=Qle,I.parseInt=Nle,I.random=Ule,I.reduce=fae,I.reduceRight=pae,I.repeat=eue,I.replace=tue,I.result=Ile,I.round=Jue,I.runInContext=Z,I.sample=mae,I.size=vae,I.snakeCase=nue,I.some=yae,I.sortedIndex=gse,I.sortedIndexBy=bse,I.sortedIndexOf=vse,I.sortedLastIndex=yse,I.sortedLastIndexBy=wse,I.sortedLastIndexOf=xse,I.startCase=oue,I.startsWith=iue,I.subtract=Zue,I.sum=Que,I.sumBy=Nue,I.template=sue,I.times=Pue,I.toFinite=Pi,I.toInteger=ft,I.toLength=I9,I.toLower=aue,I.toNumber=lo,I.toSafeInteger=ale,I.toString=It,I.toUpper=lue,I.trim=uue,I.trimEnd=cue,I.trimStart=due,I.truncate=fue,I.unescape=pue,I.uniqueId=Fue,I.upperCase=hue,I.upperFirst=J2,I.each=v9,I.eachRight=y9,I.first=h9,N2(I,function(){var d={};return ti(I,function(h,w){Lt.call(I.prototype,w)||(d[w]=h)}),d}(),{chain:!1}),I.VERSION=r,no(["bind","bindKey","curry","curryRight","partial","partialRight"],function(d){I[d].placeholder=I}),no(["drop","take"],function(d,h){wt.prototype[d]=function(w){w=w===n?1:kn(ft(w),0);var S=this.__filtered__&&!h?new wt(this):this.clone();return S.__filtered__?S.__takeCount__=Xn(w,S.__takeCount__):S.__views__.push({size:Xn(w,Y),type:d+(S.__dir__<0?"Right":"")}),S},wt.prototype[d+"Right"]=function(w){return this.reverse()[d](w).reverse()}}),no(["filter","map","takeWhile"],function(d,h){var w=h+1,S=w==ee||w==L;wt.prototype[d]=function(M){var P=this.clone();return P.__iteratees__.push({iteratee:Xe(M,3),type:w}),P.__filtered__=P.__filtered__||S,P}}),no(["head","last"],function(d,h){var w="take"+(h?"Right":"");wt.prototype[d]=function(){return this[w](1).value()[0]}}),no(["initial","tail"],function(d,h){var w="drop"+(h?"":"Right");wt.prototype[d]=function(){return this.__filtered__?new wt(this):this[w](1)}}),wt.prototype.compact=function(){return this.filter(wr)},wt.prototype.find=function(d){return this.filter(d).head()},wt.prototype.findLast=function(d){return this.reverse().find(d)},wt.prototype.invokeMap=bt(function(d,h){return typeof d=="function"?new wt(this):this.map(function(w){return rd(w,d,h)})}),wt.prototype.reject=function(d){return this.filter(Em(Xe(d)))},wt.prototype.slice=function(d,h){d=ft(d);var w=this;return w.__filtered__&&(d>0||h<0)?new wt(w):(d<0?w=w.takeRight(-d):d&&(w=w.drop(d)),h!==n&&(h=ft(h),w=h<0?w.dropRight(-h):w.take(h-d)),w)},wt.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},wt.prototype.toArray=function(){return this.take(Y)},ti(wt.prototype,function(d,h){var w=/^(?:filter|find|map|reject)|While$/.test(h),S=/^(?:head|last)$/.test(h),M=I[S?"take"+(h=="last"?"Right":""):h],P=S||/^find/.test(h);M&&(I.prototype[h]=function(){var W=this.__wrapped__,G=S?[1]:arguments,N=W instanceof wt,ve=G[0],ye=N||lt(W),we=function(vt){var xt=M.apply(I,Bs([vt],G));return S&&Ie?xt[0]:xt};ye&&w&&typeof ve=="function"&&ve.length!=1&&(N=ye=!1);var Ie=this.__chain__,ze=!!this.__actions__.length,Je=P&&!Ie,gt=N&&!ze;if(!P&&ye){W=gt?W:new wt(this);var Ze=d.apply(W,G);return Ze.__actions__.push({func:wm,args:[we],thisArg:n}),new oo(Ze,Ie)}return Je&>?d.apply(this,G):(Ze=this.thru(we),Je?S?Ze.value()[0]:Ze.value():Ze)})}),no(["pop","push","shift","sort","splice","unshift"],function(d){var h=Kh[d],w=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",S=/^(?:pop|shift)$/.test(d);I.prototype[d]=function(){var M=arguments;if(S&&!this.__chain__){var P=this.value();return h.apply(lt(P)?P:[],M)}return this[w](function(W){return h.apply(lt(W)?W:[],M)})}}),ti(wt.prototype,function(d,h){var w=I[h];if(w){var S=w.name+"";Lt.call(iu,S)||(iu[S]=[]),iu[S].push({name:h,func:w})}}),iu[pm(n,x).name]=[{name:"wrapper",func:n}],wt.prototype.clone=poe,wt.prototype.reverse=hoe,wt.prototype.value=moe,I.prototype.at=jse,I.prototype.chain=qse,I.prototype.commit=Kse,I.prototype.next=Gse,I.prototype.plant=Yse,I.prototype.reverse=Jse,I.prototype.toJSON=I.prototype.valueOf=I.prototype.value=Zse,I.prototype.first=I.prototype.head,Jc&&(I.prototype[Jc]=Xse),I},nu=Kre();Da?((Da.exports=nu)._=nu,Qv._=nu):Pn._=nu}).call(ml)}(uf,uf.exports);var Et=uf.exports;const on=(t,e="px")=>{if(!t)return t;const n=d1(t)?String(t):t,r=parseFloat(n),i=n.match(/[a-zA-Z%]+$/),s=i?i[0]:e;return isNaN(r)?t:r+s};function iR(t,e,n){return t<e?e:t>n?n:t}const d1=t=>typeof t=="number",f1=t=>typeof t=="function";function p1(t,e){const{extensions:n=[]}=t.extensionManager??{};return!!n.find(i=>i.name===e)}function dx(t){return/\s/.test(t)}function fx(t,e){const n=[];let r=0;for(;r<t.length;){if(t.length-r<=e){n.push({text:t.substring(r),offset:r});break}let i=-1;for(let a=r+e;a>r;a--)if(dx(t[a])){i=a;break}let s;if(i>r)for(n.push({text:t.substring(r,i),offset:r}),s=i;s<t.length&&dx(t[s]);)s++;else s=r+e,n.push({text:t.substring(r,s),offset:r});r=s}return n.filter(i=>i.text.length>0)}const sR=t=>t?t.split(/\r?\n/).map(e=>`<p>${e.replace(/</g,"<").replace(/>/g,">")}</p>`).join(""):"";function h1(t,e={}){const{removeNodes:n=[]}=e,r=t.getJSON();function i(f=[]){const p=[];for(const m of f){if(n.includes(m.type))continue;const g={...m};m.content&&(g.content=i(m.content)),p.push(g)}return p}const s={...r,content:i(r.content)},a=t.schema.nodeFromJSON(s),u=$r.fromSchema(t.schema).serializeFragment(a.content),c=document.createElement("div");return c.appendChild(u),c.innerHTML}function cf(){const t=new c1;t.isNativeWebViewAvailable()&&t.sendToNative(s1.KEYBOARD_DISMISS)}let ns=null;function aR(){if(ns)return ns;if(typeof document>"u")return null;const t=document.createElement("span");return t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.whiteSpace="nowrap",t.style.visibility="hidden",document.body.appendChild(t),ns=t,t}function df(t){var a;const e=o.ref(null),n=o.ref(null),r=()=>{const l=(t==null?void 0:t.minChars)??0;return typeof l=="number"?l:o.unref(l)??0},i=()=>{const l=(t==null?void 0:t.fontSize)??"";return typeof l=="string"?l:o.unref(l)??""};function s(){t!=null&&t.fixed&&n.value!==null||o.nextTick(()=>{const l=e.value;if(!l||typeof window>"u"||!(l instanceof Element))return;const u=aR();if(!u)return;const c=getComputedStyle(l);u.style.fontFamily=c.fontFamily||"",u.style.fontSize=i()||c.fontSize||"",u.style.fontWeight=c.fontWeight||"",u.style.letterSpacing=c.letterSpacing||"";const f=Math.max(1,r());u.textContent="가".repeat(f);const p=Math.ceil(u.getBoundingClientRect().width),m=E=>parseFloat(E)||0,g=m(c.paddingLeft),b=m(c.paddingRight),v=m(c.borderLeftWidth),y=m(c.borderRightWidth),x=g+b+v+y,k=l.offsetWidth-l.clientWidth-(v+y);n.value=p+x+k+4})}return o.onMounted(()=>{s(),typeof window<"u"&&window.addEventListener("resize",s)}),t!=null&&t.minChars&&typeof t.minChars.value<"u"&&o.watch(t.minChars,()=>{s()}),!(t!=null&&t.fixed)&&(t!=null&&t.fontSize)&&typeof t.fontSize.value<"u"&&o.watch(t.fontSize,()=>{s()}),(a=t==null?void 0:t.editor)==null||a.on("transaction",()=>{setTimeout(s,150)}),o.onBeforeUnmount(()=>{typeof window<"u"&&window.removeEventListener("resize",s),ns&&ns.parentNode&&(ns.parentNode.removeChild(ns),ns=null)}),{contentInner:e,measuredMinWidth:n,measure:s}}const lR=/(?:^|\s)(!\[(.+|:?)]\((\S+)(?:(?:\s+)["'](\S+)["'])?\))$/,uR=Dt.create({name:"image",addOptions(){return{inline:!1,allowBase64:!1,HTMLAttributes:{}}},inline(){return this.options.inline},group(){return this.options.inline?"inline":"block"},draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},title:{default:null}}},parseHTML(){return[{tag:this.options.allowBase64?"img[src]":'img[src]:not([src^="data:"])'}]},renderHTML({HTMLAttributes:t}){return["img",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setImage:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t})}},addInputRules(){return[u4({find:lR,type:this.type,getAttributes:t=>{const[,,e,n,r]=t;return{src:n,alt:e,title:r}}})]}}),cR=["src","alt"],dR={key:0,class:"image-resizer"},fR=["onMousedown","onTouchstart"],pR=o.defineComponent({__name:"ImageView",props:{...na,selected:{type:Boolean,required:!0}},setup(t){const e=t,n={TOP_LEFT:"tl",TOP_RIGHT:"tr",BOTTOM_LEFT:"bl",BOTTOM_RIGHT:"br"},r=o.inject("isMobile",!1),i=o.ref({width:ox,height:ox}),s=o.ref({width:0,height:0}),a=o.ref(!1),l=o.ref({x:0,y:0,w:0,h:0,dir:""}),u=o.computed(()=>{const{src:C,alt:_,width:T,height:A,flipX:V,flipY:O}=e.node.attrs,B=[];V&&B.push("rotateX(180deg)"),O&&B.push("rotateY(180deg)");const $=B.join(" ");return{src:C||void 0,alt:_||void 0,style:{width:d1(T)?`${T}px`:T,height:d1(A)?`${A}px`:A,transform:$||"none"}}});o.computed(()=>({width:o.unref(u).style.width==="100%"?"100%":void 0}));const c=o.ref(null),f=new ResizeObserver(C=>{for(const _ of C){const{width:T,height:A}=_.contentRect;s.value={width:T,height:A},e.updateAttributes({originWidth:T,originHeight:A})}});function p(){const{editor:C,getPos:_}=e;C.commands.setNodeSelection(_())}const m=Et.throttle(()=>{const{editor:C}=e;i.value.width=parseInt(getComputedStyle(C.view.dom).width,10)},ix);function g(C,_){C.preventDefault(),C.stopPropagation();let T=0,A=0;const V=document.querySelector(".image-resizer");if(V&&(V.style.borderColor="#3b82f6"),"touches"in C&&C.touches.length>0)T=C.touches[0].clientX,A=C.touches[0].clientY;else if("clientX"in C)T=C.clientX,A=C.clientY;else return;const{width:O,height:B}=o.unref(s),$=O/B;let H=Number(e.node.attrs.width)||O,X=Number(e.node.attrs.height)||Math.round(H/$);const ee=o.unref(i).width;H=Math.min(H>ee?ee:H,ee),X=Math.round(H/$),Object.assign(l.value,{x:T,y:A,w:H,h:X,dir:_}),a.value=!0,y()}const b=Et.throttle(C=>{if(!o.unref(a))return;let _=0;if("touches"in C&&C.touches.length>0)_=C.touches[0].clientX;else if("clientX"in C)_=C.clientX;else return;const{x:T,w:A,dir:V}=o.unref(l),O=(_-T)*(/l/.test(V)?-1:1),B=iR(A+O,XI,o.unref(i).width);e.updateAttributes({width:B})},ix),v=C=>{C.preventDefault(),C.stopPropagation();const _=document.querySelector(".image-resizer");_&&(_.style.borderColor=""),o.unref(a)&&(a.value=!1,Object.assign(l.value,{x:0,y:0,w:0,h:0,dir:""}),x(),p())};function y(){document.addEventListener("mousemove",b,!0),document.addEventListener("mouseup",v,!0),document.addEventListener("touchmove",b,!0),document.addEventListener("touchend",v,!0)}function x(){document.removeEventListener("mousemove",b,!0),document.removeEventListener("mouseup",v,!0),document.removeEventListener("touchmove",b,!0),document.removeEventListener("touchend",v,!0)}const k=new ResizeObserver(m),E=o.computed(()=>{const{textAlign:C}=e.node.attrs;return{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[C]||""});return o.onMounted(()=>{c.value&&f.observe(c.value),k.observe(e.editor.view.dom)}),o.onBeforeUnmount(()=>{x(),f.disconnect(),k.disconnect()}),(C,_)=>(o.openBlock(),o.createBlock(o.unref(ta),{class:"node-image",style:o.normalizeStyle({"pointer-events":o.unref(r)&&t.selected?"none":"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"image-view",style:o.normalizeStyle([{width:u.value.style.width,height:u.value.style.height},E.value])},[o.createElementVNode("div",{draggable:"true","data-drag-handle":"",class:o.normalizeClass([{"image-view__body--focused":t.selected,"image-view__body--resizing":a.value},"image-view__body"])},[o.createElementVNode("img",{ref_key:"imageRef",ref:c,src:u.value.src,alt:u.value.alt,class:"block w-full image-view__body__image",style:o.normalizeStyle([{transform:u.value.style.transform}]),onClick:p,onMousedown:_[0]||(_[0]=(...T)=>o.unref(cf)&&o.unref(cf)(...T))},null,44,cR),C.editor.view.editable?o.withDirectives((o.openBlock(),o.createElementBlock("div",dR,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Object.values(n),T=>(o.openBlock(),o.createElementBlock("span",{key:T,class:o.normalizeClass(o.unref(Ee)(`image-resizer__handler--${T}`,"image-resizer__handler",o.unref(r)&&t.selected&&"pointer-events-auto")),onMousedown:A=>g(A,T),onTouchstart:o.withModifiers(A=>g(A,T),["prevent"])},null,42,fR))),128))],512)),[[o.vShow,t.selected||a.value]]):o.createCommentVNode("",!0)],2)],4)]),_:1},8,["style"]))}}),po=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n},hR=po(pR,[["__scopeId","data-v-db9342d0"]]),qu=uR.extend({group:"block",defining:!0,isolating:!0,addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),src:{default:null,parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e;return n==null?void 0:n.getAttribute("src")}},flipX:{default:!1},flipY:{default:!1},originWidth:{default:null},originHeight:{default:null},textAlign:{default:"left",parseHTML:e=>e.style.textAlign||e.getAttribute("textAlign")||null,renderHTML:e=>({textAlign:e.textAlign})},width:{default:"100%",parseHTML:e=>{const n=e.tagName==="P"?e.querySelector("img"):e,r=n&&(n.style.width||n.getAttribute("width"))||null;return r&&r.endsWith("%")?r:r==null?null:parseInt(r,10)},renderHTML:e=>({width:e.width})},height:{default:"auto",parseHTML:e=>{const n=e.style.height||e.getAttribute("height")||null;return n==null||n==="auto"?null:parseInt(n,10)},renderHTML:e=>({height:e.height})},class:{default:"",parseHTML:e=>e.getAttribute("class")||"",renderHTML:e=>({class:e.class})},"data-memo":{default:"",parseHTML:e=>e.getAttribute("data-memo")||"",renderHTML:e=>({"data-memo":e["data-memo"]})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this)}},addNodeView(){return ra(hR)},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),updateImage:e=>({commands:n,editor:r})=>n.updateAttributes(this.name,e)}},renderHTML({node:t,HTMLAttributes:e}){const{textAlign:n,flipX:r,flipY:i}=t.attrs,l=`${{left:"margin-right: auto;",right:"margin-left: auto;",center:"margin-left: auto; margin-right: auto;"}[n]||""} ${r||i?`transform: rotateX(${r?"180":"0"}deg) rotateY(${i?"180":"0"}deg);`:""}`;return["img",yt(this.options.HTMLAttributes,e,{style:l})]},parseHTML(){return[{tag:"img[src]"},{tag:"p",priority:1001,getAttrs:t=>{var n,r;const e=t;return e.children.length===1&&((n=e.firstElementChild)==null?void 0:n.tagName)==="IMG"&&!!!((r=e.textContent)!=null&&r.trim())&&e.firstElementChild.hasAttribute("src")?null:!1}}]},addProseMirrorPlugins(){return[new ot({props:{handleTextInput(t){const{selection:e}=t.state;return e instanceof Pe&&e.node.type.name==="image"},handlePaste(t){const{selection:e}=t.state;return e instanceof Pe&&e.node.type.name==="image"}}})]}}),mR={key:0,class:"p-2.5 space-y-1.5"},gR=["innerHTML"],bR={key:1,class:"p-2.5 space-y-1.5"},vR=["innerHTML"],yR={key:2,class:"p-2.5 space-y-1.5"},wR=["innerHTML"],xR=po(o.defineComponent({__name:"ArticleFullViewer",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},minChars:{},fontSize:{}},setup(t){const e=t,n=o.computed(()=>{var E;const k=((E=e.extensions)==null?void 0:E.filter(C=>C.name!=="spellchecker"))||[];return k.some(C=>C.name==="image")||k.push(qu.configure()),k}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(k){return u1(k).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(k){return new Vo({extensions:n.value,content:k,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(gn(e.comment,!0,e.mode))),i.value||(p.value=g(gn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(gn(e.content,!0,e.mode)));function b(k,E){if(!k)return;const C=gn(E,!0,e.mode);Et.isEqual(k.getHTML(),C)||k.commands.setContent(C,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,k=>{r.value||b(f.value,k)}),o.watch(()=>e.commentCuesheet,k=>{i.value||b(p.value,k)}),o.watch(()=>e.content,k=>{s.value||b(m.value,k)});const v=o.computed(()=>e.fontSize??""),{contentInner:y,measuredMinWidth:x}=df({minChars:e.minChars,fontSize:v});return(k,E)=>{var _,T,A;const C=AT;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:y,style:o.normalizeStyle({minWidth:`${Number(o.unref(x))+23}px`}),class:"flex-1 border border-[#999] rounded-[3px] divide-y divide-[#999] divide-dashed overflow-y-auto"},[k.comment&&!k.hideComment?(o.openBlock(),o.createElementBlock("div",mR,[(_=k.fieldNameComment)!=null&&_.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameComment.label,"custom-class":k.fieldNameComment.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,gR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),k.commentCuesheet&&!k.hideComment?(o.openBlock(),o.createElementBlock("div",bR,[(T=k.fieldNameCommentCuesheet)!=null&&T.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameCommentCuesheet.label,"custom-class":k.fieldNameCommentCuesheet.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,vR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),k.content?(o.openBlock(),o.createElementBlock("div",yR,[(A=k.fieldNameContent)!=null&&A.label?(o.openBlock(),o.createBlock(C,{key:0,label:k.fieldNameContent.label,"custom-class":k.fieldNameContent.customClass},null,8,["label","custom-class"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,wR)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])):o.createCommentVNode("",!0)],4)}}}),[["__scopeId","data-v-374d1603"]]),CR=["top","right","bottom","left"],rs=Math.min,Sr=Math.max,ff=Math.round,pf=Math.floor,zo=t=>({x:t,y:t}),kR={left:"right",right:"left",bottom:"top",top:"bottom"},ER={start:"end",end:"start"};function m1(t,e,n){return Sr(t,rs(e,n))}function hi(t,e){return typeof t=="function"?t(e):t}function mi(t){return t.split("-")[0]}function gl(t){return t.split("-")[1]}function g1(t){return t==="x"?"y":"x"}function b1(t){return t==="y"?"height":"width"}function is(t){return["top","bottom"].includes(mi(t))?"y":"x"}function v1(t){return g1(is(t))}function SR(t,e,n){n===void 0&&(n=!1);const r=gl(t),i=v1(t),s=b1(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=hf(a)),[a,hf(a)]}function _R(t){const e=hf(t);return[y1(t),e,y1(e)]}function y1(t){return t.replace(/start|end/g,e=>ER[e])}function TR(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function AR(t,e,n,r){const i=gl(t);let s=TR(mi(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(y1)))),s}function hf(t){return t.replace(/left|right|bottom|top/g,e=>kR[e])}function MR(t){return{top:0,right:0,bottom:0,left:0,...t}}function px(t){return typeof t!="number"?MR(t):{top:t,right:t,bottom:t,left:t}}function mf(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function hx(t,e,n){let{reference:r,floating:i}=t;const s=is(e),a=v1(e),l=b1(a),u=mi(e),c=s==="y",f=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[l]/2-i[l]/2;let g;switch(u){case"top":g={x:f,y:r.y-i.height};break;case"bottom":g={x:f,y:r.y+r.height};break;case"right":g={x:r.x+r.width,y:p};break;case"left":g={x:r.x-i.width,y:p};break;default:g={x:r.x,y:r.y}}switch(gl(e)){case"start":g[a]-=m*(n&&c?-1:1);break;case"end":g[a]+=m*(n&&c?-1:1);break}return g}const OR=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,l=s.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:p}=hx(c,r,u),m=r,g={},b=0;for(let v=0;v<l.length;v++){const{name:y,fn:x}=l[v],{x:k,y:E,data:C,reset:_}=await x({x:f,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:g,rects:c,platform:a,elements:{reference:t,floating:e}});f=k??f,p=E??p,g={...g,[y]:{...g[y],...C}},_&&b<=50&&(b++,typeof _=="object"&&(_.placement&&(m=_.placement),_.rects&&(c=_.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):_.rects),{x:f,y:p}=hx(c,m,u)),v=-1)}return{x:f,y:p,placement:m,strategy:i,middlewareData:g}};async function Ku(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:l,strategy:u}=t,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=hi(e,t),b=px(g),y=l[m?p==="floating"?"reference":"floating":p],x=mf(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:c,rootBoundary:f,strategy:u})),k=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,E=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),C=await(s.isElement==null?void 0:s.isElement(E))?await(s.getScale==null?void 0:s.getScale(E))||{x:1,y:1}:{x:1,y:1},_=mf(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:k,offsetParent:E,strategy:u}):k);return{top:(x.top-_.top+b.top)/C.y,bottom:(_.bottom-x.bottom+b.bottom)/C.y,left:(x.left-_.left+b.left)/C.x,right:(_.right-x.right+b.right)/C.x}}const BR=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:l,middlewareData:u}=e,{element:c,padding:f=0}=hi(t,e)||{};if(c==null)return{};const p=px(f),m={x:n,y:r},g=v1(i),b=b1(g),v=await a.getDimensions(c),y=g==="y",x=y?"top":"left",k=y?"bottom":"right",E=y?"clientHeight":"clientWidth",C=s.reference[b]+s.reference[g]-m[g]-s.floating[b],_=m[g]-s.reference[g],T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=T?T[E]:0;(!A||!await(a.isElement==null?void 0:a.isElement(T)))&&(A=l.floating[E]||s.floating[b]);const V=C/2-_/2,O=A/2-v[b]/2-1,B=rs(p[x],O),$=rs(p[k],O),H=B,X=A-v[b]-$,ee=A/2-v[b]/2+V,z=m1(H,ee,X),L=!u.arrow&&gl(i)!=null&&ee!==z&&s.reference[b]/2-(ee<H?B:$)-v[b]/2<0,D=L?ee<H?ee-H:ee-X:0;return{[g]:m[g]+D,data:{[g]:z,centerOffset:ee-z-D,...L&&{alignmentOffset:D}},reset:L}}}),IR=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:l,platform:u,elements:c}=e,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=hi(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=mi(i),k=is(l),E=mi(l)===l,C=await(u.isRTL==null?void 0:u.isRTL(c.floating)),_=m||(E||!v?[hf(l)]:_R(l)),T=b!=="none";!m&&T&&_.push(...AR(l,v,b,C));const A=[l,..._],V=await Ku(e,y),O=[];let B=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&O.push(V[x]),p){const ee=SR(i,a,C);O.push(V[ee[0]],V[ee[1]])}if(B=[...B,{placement:i,overflows:O}],!O.every(ee=>ee<=0)){var $,H;const ee=((($=s.flip)==null?void 0:$.index)||0)+1,z=A[ee];if(z)return{data:{index:ee,overflows:B},reset:{placement:z}};let L=(H=B.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:H.placement;if(!L)switch(g){case"bestFit":{var X;const D=(X=B.filter(F=>{if(T){const R=is(F.placement);return R===k||R==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((F,R)=>F[1]-R[1])[0])==null?void 0:X[0];D&&(L=D);break}case"initialPlacement":L=l;break}if(i!==L)return{reset:{placement:L}}}return{}}}};function mx(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function gx(t){return CR.some(e=>t[e]>=0)}const RR=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=hi(t,e);switch(r){case"referenceHidden":{const s=await Ku(e,{...i,elementContext:"reference"}),a=mx(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:gx(a)}}}case"escaped":{const s=await Ku(e,{...i,altBoundary:!0}),a=mx(s,n.floating);return{data:{escapedOffsets:a,escaped:gx(a)}}}default:return{}}}}};async function LR(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=mi(n),l=gl(n),u=is(n)==="y",c=["left","top"].includes(a)?-1:1,f=s&&u?-1:1,p=hi(e,t);let{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),u?{x:g*f,y:m*c}:{x:m*c,y:g*f}}const DR=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:l}=e,u=await LR(e,t);return a===((n=l.offset)==null?void 0:n.placement)&&(r=l.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:s+u.y,data:{...u,placement:a}}}}},PR=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:l={fn:y=>{let{x,y:k}=y;return{x,y:k}}},...u}=hi(t,e),c={x:n,y:r},f=await Ku(e,u),p=is(mi(i)),m=g1(p);let g=c[m],b=c[p];if(s){const y=m==="y"?"top":"left",x=m==="y"?"bottom":"right",k=g+f[y],E=g-f[x];g=m1(k,g,E)}if(a){const y=p==="y"?"top":"left",x=p==="y"?"bottom":"right",k=b+f[y],E=b-f[x];b=m1(k,b,E)}const v=l.fn({...e,[m]:g,[p]:b});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[m]:s,[p]:a}}}}}},VR=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:l=0,mainAxis:u=!0,crossAxis:c=!0}=hi(t,e),f={x:n,y:r},p=is(i),m=g1(p);let g=f[m],b=f[p];const v=hi(l,e),y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const E=m==="y"?"height":"width",C=s.reference[m]-s.floating[E]+y.mainAxis,_=s.reference[m]+s.reference[E]-y.mainAxis;g<C?g=C:g>_&&(g=_)}if(c){var x,k;const E=m==="y"?"width":"height",C=["top","left"].includes(mi(i)),_=s.reference[p]-s.floating[E]+(C&&((x=a.offset)==null?void 0:x[p])||0)+(C?0:y.crossAxis),T=s.reference[p]+s.reference[E]+(C?0:((k=a.offset)==null?void 0:k[p])||0)-(C?y.crossAxis:0);b<_?b=_:b>T&&(b=T)}return{[m]:g,[p]:b}}}},FR=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:l}=e,{apply:u=()=>{},...c}=hi(t,e),f=await Ku(e,c),p=mi(i),m=gl(i),g=is(i)==="y",{width:b,height:v}=s.floating;let y,x;p==="top"||p==="bottom"?(y=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(l.floating))?"start":"end")?"left":"right"):(x=p,y=m==="end"?"top":"bottom");const k=v-f.top-f.bottom,E=b-f.left-f.right,C=rs(v-f[y],k),_=rs(b-f[x],E),T=!e.middlewareData.shift;let A=C,V=_;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(V=E),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(A=k),T&&!m){const B=Sr(f.left,0),$=Sr(f.right,0),H=Sr(f.top,0),X=Sr(f.bottom,0);g?V=b-2*(B!==0||$!==0?B+$:Sr(f.left,f.right)):A=v-2*(H!==0||X!==0?H+X:Sr(f.top,f.bottom))}await u({...e,availableWidth:V,availableHeight:A});const O=await a.getDimensions(l.floating);return b!==O.width||v!==O.height?{reset:{rects:!0}}:{}}}};function gf(){return typeof window<"u"}function ia(t){return w1(t)?(t.nodeName||"").toLowerCase():"#document"}function _r(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Uo(t){var e;return(e=(w1(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function w1(t){return gf()?t instanceof Node||t instanceof _r(t).Node:!1}function ho(t){return gf()?t instanceof Element||t instanceof _r(t).Element:!1}function Wo(t){return gf()?t instanceof HTMLElement||t instanceof _r(t).HTMLElement:!1}function bx(t){return!gf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof _r(t).ShadowRoot}function Gu(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=mo(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function $R(t){return["table","td","th"].includes(ia(t))}function bf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function x1(t){const e=C1(),n=ho(t)?mo(t):t;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function HR(t){let e=ss(t);for(;Wo(e)&&!bl(e);){if(x1(e))return e;if(bf(e))return null;e=ss(e)}return null}function C1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bl(t){return["html","body","#document"].includes(ia(t))}function mo(t){return _r(t).getComputedStyle(t)}function vf(t){return ho(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ss(t){if(ia(t)==="html")return t;const e=t.assignedSlot||t.parentNode||bx(t)&&t.host||Uo(t);return bx(e)?e.host:e}function vx(t){const e=ss(t);return bl(e)?t.ownerDocument?t.ownerDocument.body:t.body:Wo(e)&&Gu(e)?e:vx(e)}function Xu(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=vx(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=_r(i);if(s){const l=k1(a);return e.concat(a,a.visualViewport||[],Gu(i)?i:[],l&&n?Xu(l):[])}return e.concat(i,Xu(i,[],n))}function k1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function yx(t){const e=mo(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=Wo(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,l=ff(n)!==s||ff(r)!==a;return l&&(n=s,r=a),{width:n,height:r,$:l}}function E1(t){return ho(t)?t:t.contextElement}function vl(t){const e=E1(t);if(!Wo(e))return zo(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=yx(e);let a=(s?ff(n.width):n.width)/r,l=(s?ff(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!l||!Number.isFinite(l))&&(l=1),{x:a,y:l}}const zR=zo(0);function wx(t){const e=_r(t);return!C1()||!e.visualViewport?zR:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function UR(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==_r(t)?!1:e}function sa(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=E1(t);let a=zo(1);e&&(r?ho(r)&&(a=vl(r)):a=vl(t));const l=UR(s,n,r)?wx(s):zo(0);let u=(i.left+l.x)/a.x,c=(i.top+l.y)/a.y,f=i.width/a.x,p=i.height/a.y;if(s){const m=_r(s),g=r&&ho(r)?_r(r):r;let b=m,v=k1(b);for(;v&&r&&g!==b;){const y=vl(v),x=v.getBoundingClientRect(),k=mo(v),E=x.left+(v.clientLeft+parseFloat(k.paddingLeft))*y.x,C=x.top+(v.clientTop+parseFloat(k.paddingTop))*y.y;u*=y.x,c*=y.y,f*=y.x,p*=y.y,u+=E,c+=C,b=_r(v),v=k1(b)}}return mf({width:f,height:p,x:u,y:c})}function S1(t,e){const n=vf(t).scrollLeft;return e?e.left+n:sa(Uo(t)).left+n}function xx(t,e,n){n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=r.left+e.scrollLeft-(n?0:S1(t,r)),s=r.top+e.scrollTop;return{x:i,y:s}}function WR(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=Uo(r),l=e?bf(e.floating):!1;if(r===a||l&&s)return n;let u={scrollLeft:0,scrollTop:0},c=zo(1);const f=zo(0),p=Wo(r);if((p||!p&&!s)&&((ia(r)!=="body"||Gu(a))&&(u=vf(r)),Wo(r))){const g=sa(r);c=vl(r),f.x=g.x+r.clientLeft,f.y=g.y+r.clientTop}const m=a&&!p&&!s?xx(a,u,!0):zo(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-u.scrollLeft*c.x+f.x+m.x,y:n.y*c.y-u.scrollTop*c.y+f.y+m.y}}function jR(t){return Array.from(t.getClientRects())}function qR(t){const e=Uo(t),n=vf(t),r=t.ownerDocument.body,i=Sr(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Sr(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+S1(t);const l=-n.scrollTop;return mo(r).direction==="rtl"&&(a+=Sr(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:l}}function KR(t,e){const n=_r(t),r=Uo(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,l=0,u=0;if(i){s=i.width,a=i.height;const c=C1();(!c||c&&e==="fixed")&&(l=i.offsetLeft,u=i.offsetTop)}return{width:s,height:a,x:l,y:u}}function GR(t,e){const n=sa(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=Wo(t)?vl(t):zo(1),a=t.clientWidth*s.x,l=t.clientHeight*s.y,u=i*s.x,c=r*s.y;return{width:a,height:l,x:u,y:c}}function Cx(t,e,n){let r;if(e==="viewport")r=KR(t,n);else if(e==="document")r=qR(Uo(t));else if(ho(e))r=GR(e,n);else{const i=wx(t);r={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return mf(r)}function kx(t,e){const n=ss(t);return n===e||!ho(n)||bl(n)?!1:mo(n).position==="fixed"||kx(n,e)}function XR(t,e){const n=e.get(t);if(n)return n;let r=Xu(t,[],!1).filter(l=>ho(l)&&ia(l)!=="body"),i=null;const s=mo(t).position==="fixed";let a=s?ss(t):t;for(;ho(a)&&!bl(a);){const l=mo(a),u=x1(a);!u&&l.position==="fixed"&&(i=null),(s?!u&&!i:!u&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Gu(a)&&!u&&kx(t,a))?r=r.filter(f=>f!==a):i=l,a=ss(a)}return e.set(t,r),r}function YR(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?bf(e)?[]:XR(e,this._c):[].concat(n),r],l=a[0],u=a.reduce((c,f)=>{const p=Cx(e,f,i);return c.top=Sr(p.top,c.top),c.right=rs(p.right,c.right),c.bottom=rs(p.bottom,c.bottom),c.left=Sr(p.left,c.left),c},Cx(e,l,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function JR(t){const{width:e,height:n}=yx(t);return{width:e,height:n}}function ZR(t,e,n){const r=Wo(e),i=Uo(e),s=n==="fixed",a=sa(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const u=zo(0);if(r||!r&&!s)if((ia(e)!=="body"||Gu(i))&&(l=vf(e)),r){const m=sa(e,!0,s,e);u.x=m.x+e.clientLeft,u.y=m.y+e.clientTop}else i&&(u.x=S1(i));const c=i&&!r&&!s?xx(i,l):zo(0),f=a.left+l.scrollLeft-u.x-c.x,p=a.top+l.scrollTop-u.y-c.y;return{x:f,y:p,width:a.width,height:a.height}}function _1(t){return mo(t).position==="static"}function Ex(t,e){if(!Wo(t)||mo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Uo(t)===n&&(n=n.ownerDocument.body),n}function Sx(t,e){const n=_r(t);if(bf(t))return n;if(!Wo(t)){let i=ss(t);for(;i&&!bl(i);){if(ho(i)&&!_1(i))return i;i=ss(i)}return n}let r=Ex(t,e);for(;r&&$R(r)&&_1(r);)r=Ex(r,e);return r&&bl(r)&&_1(r)&&!x1(r)?n:r||HR(t)||n}const QR=async function(t){const e=this.getOffsetParent||Sx,n=this.getDimensions,r=await n(t.floating);return{reference:ZR(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function NR(t){return mo(t).direction==="rtl"}const eL={convertOffsetParentRelativeRectToViewportRelativeRect:WR,getDocumentElement:Uo,getClippingRect:YR,getOffsetParent:Sx,getElementRects:QR,getClientRects:jR,getDimensions:JR,getScale:vl,isElement:ho,isRTL:NR};function _x(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tL(t,e){let n=null,r;const i=Uo(t);function s(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function a(l,u){l===void 0&&(l=!1),u===void 0&&(u=1),s();const c=t.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=c;if(l||e(),!m||!g)return;const b=pf(p),v=pf(i.clientWidth-(f+m)),y=pf(i.clientHeight-(p+g)),x=pf(f),E={rootMargin:-b+"px "+-v+"px "+-y+"px "+-x+"px",threshold:Sr(0,rs(1,u))||1};let C=!0;function _(T){const A=T[0].intersectionRatio;if(A!==u){if(!C)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!_x(c,t.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(_,{...E,root:i.ownerDocument})}catch{n=new IntersectionObserver(_,E)}n.observe(t)}return a(!0),s}function nL(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,c=E1(t),f=i||s?[...c?Xu(c):[],...Xu(e)]:[];f.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=c&&l?tL(c,n):null;let m=-1,g=null;a&&(g=new ResizeObserver(x=>{let[k]=x;k&&k.target===c&&g&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var E;(E=g)==null||E.observe(e)})),n()}),c&&!u&&g.observe(c),g.observe(e));let b,v=u?sa(t):null;u&&y();function y(){const x=sa(t);v&&!_x(v,x)&&n(),v=x,b=requestAnimationFrame(y)}return n(),()=>{var x;f.forEach(k=>{i&&k.removeEventListener("scroll",n),s&&k.removeEventListener("resize",n)}),p==null||p(),(x=g)==null||x.disconnect(),g=null,u&&cancelAnimationFrame(b)}}const rL=DR,oL=PR,Tx=IR,iL=FR,sL=RR,aL=BR,lL=VR,uL=(t,e,n)=>{const r=new Map,i={platform:eL,...n},s={...i.platform,_c:r};return OR(t,e,{...i,platform:s})};function cL(t){return t!=null&&typeof t=="object"&&"$el"in t}function T1(t){if(cL(t)){const e=t.$el;return w1(e)&&ia(e)==="#comment"?null:e}return t}function yl(t){return typeof t=="function"?t():o.unref(t)}function dL(t){return{name:"arrow",options:t,fn(e){const n=T1(yl(t.element));return n==null?{}:aL({element:n,padding:t.padding}).fn(e)}}}function Ax(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Mx(t,e){const n=Ax(t);return Math.round(e*n)/n}function fL(t,e,n){n===void 0&&(n={});const r=n.whileElementsMounted,i=o.computed(()=>{var A;return(A=yl(n.open))!=null?A:!0}),s=o.computed(()=>yl(n.middleware)),a=o.computed(()=>{var A;return(A=yl(n.placement))!=null?A:"bottom"}),l=o.computed(()=>{var A;return(A=yl(n.strategy))!=null?A:"absolute"}),u=o.computed(()=>{var A;return(A=yl(n.transform))!=null?A:!0}),c=o.computed(()=>T1(t.value)),f=o.computed(()=>T1(e.value)),p=o.ref(0),m=o.ref(0),g=o.ref(l.value),b=o.ref(a.value),v=o.shallowRef({}),y=o.ref(!1),x=o.computed(()=>{const A={position:g.value,left:"0",top:"0"};if(!f.value)return A;const V=Mx(f.value,p.value),O=Mx(f.value,m.value);return u.value?{...A,transform:"translate("+V+"px, "+O+"px)",...Ax(f.value)>=1.5&&{willChange:"transform"}}:{position:g.value,left:V+"px",top:O+"px"}});let k;function E(){if(c.value==null||f.value==null)return;const A=i.value;uL(c.value,f.value,{middleware:s.value,placement:a.value,strategy:l.value}).then(V=>{p.value=V.x,m.value=V.y,g.value=V.strategy,b.value=V.placement,v.value=V.middlewareData,y.value=A!==!1})}function C(){typeof k=="function"&&(k(),k=void 0)}function _(){if(C(),r===void 0){E();return}if(c.value!=null&&f.value!=null){k=r(c.value,f.value,E);return}}function T(){i.value||(y.value=!1)}return o.watch([s,a,l,i],E,{flush:"sync"}),o.watch([c,f],_,{flush:"sync"}),o.watch(i,T,{flush:"sync"}),o.getCurrentScope()&&o.onScopeDispose(C),{x:o.shallowReadonly(p),y:o.shallowReadonly(m),strategy:o.shallowReadonly(g),placement:o.shallowReadonly(b),middlewareData:o.shallowReadonly(v),isPositioned:o.shallowReadonly(y),floatingStyles:x,update:E}}function zt(t,e){const n=typeof t=="string"&&!e?`${t}Context`:e,r=Symbol(n);return[i=>{const s=o.inject(r,i);if(s||s===null)return s;throw new Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(t)?`one of the following components: ${t.join(", ")}`:`\`${t}\``}`)},i=>(o.provide(r,i),i)]}function Ox(t,e,n){const r=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),r.dispatchEvent(i)}function A1(t,e=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY){return Math.min(n,Math.max(e,t))}function pL(t){return t==null}function hL(t,e){var n;const r=o.shallowRef();return o.watchEffect(()=>{r.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),o.readonly(r)}function wl(t){return o.getCurrentScope()?(o.onScopeDispose(t),!0):!1}function mL(){const t=new Set,e=n=>{t.delete(n)};return{on:n=>{t.add(n);const r=()=>e(n);return wl(r),{off:r}},off:e,trigger:(...n)=>Promise.all(Array.from(t).map(r=>r(...n)))}}function gL(t){let e=!1,n;const r=o.effectScope(!0);return(...i)=>(e||(n=r.run(()=>t(...i)),e=!0),n)}function Bx(t){let e=0,n,r;const i=()=>{e-=1,r&&e<=0&&(r.stop(),n=void 0,r=void 0)};return(...s)=>(e+=1,n||(r=o.effectScope(!0),n=r.run(()=>t(...s))),wl(i),n)}function jo(t){return typeof t=="function"?t():o.unref(t)}const gi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const bL=t=>typeof t<"u",vL=Object.prototype.toString,yL=t=>vL.call(t)==="[object Object]",M1=()=>{},Ix=wL();function wL(){var t,e;return gi&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function xL(t,e){function n(...r){return new Promise((i,s)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(s)})}return n}function CL(t,e={}){let n,r,i=M1;const s=a=>{clearTimeout(a),i(),i=M1};return a=>{const l=jo(t),u=jo(e.maxWait);return n&&s(n),l<=0||u!==void 0&&u<=0?(r&&(s(r),r=null),Promise.resolve(a())):new Promise((c,f)=>{i=e.rejectOnCancel?f:c,u&&!r&&(r=setTimeout(()=>{n&&s(n),r=null,c(a())},u)),n=setTimeout(()=>{r&&s(r),r=null,c(a())},l)})}}function kL(t){return o.getCurrentInstance()}function Rx(t,e=1e4){return o.customRef((n,r)=>{let i=jo(t),s;const a=()=>setTimeout(()=>{i=jo(t),r()},jo(e));return wl(()=>{clearTimeout(s)}),{get(){return n(),i},set(l){i=l,r(),clearTimeout(s),s=a()}}})}function Lx(t,e=200,n={}){return xL(CL(e,n),t)}function EL(t,e){kL()&&o.onBeforeUnmount(t,e)}function Dx(t,e,n={}){const{immediate:r=!0}=n,i=o.ref(!1);let s=null;function a(){s&&(clearTimeout(s),s=null)}function l(){i.value=!1,a()}function u(...c){a(),i.value=!0,s=setTimeout(()=>{i.value=!1,s=null,t(...c)},jo(e))}return r&&(i.value=!0,gi&&u()),wl(l),{isPending:o.readonly(i),start:u,stop:l}}function SL(t,e,n){const r=o.watch(t,(...i)=>(o.nextTick(()=>r()),e(...i)),n);return r}function go(t){var e;const n=jo(t);return(e=n==null?void 0:n.$el)!=null?e:n}const yf=gi?window:void 0;function xl(...t){let e,n,r,i;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,r,i]=t,e=yf):[e,n,r,i]=t,!e)return M1;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const s=[],a=()=>{s.forEach(f=>f()),s.length=0},l=(f,p,m,g)=>(f.addEventListener(p,m,g),()=>f.removeEventListener(p,m,g)),u=o.watch(()=>[go(e),jo(i)],([f,p])=>{if(a(),!f)return;const m=yL(p)?{...p}:p;s.push(...n.flatMap(g=>r.map(b=>l(f,g,b,m))))},{immediate:!0,flush:"post"}),c=()=>{u(),a()};return wl(c),c}function _L(t){return typeof t=="function"?t:typeof t=="string"?e=>e.key===t:Array.isArray(t)?e=>t.includes(e.key):()=>!0}function TL(...t){let e,n,r={};t.length===3?(e=t[0],n=t[1],r=t[2]):t.length===2?typeof t[1]=="object"?(e=!0,n=t[0],r=t[1]):(e=t[0],n=t[1]):(e=!0,n=t[0]);const{target:i=yf,eventName:s="keydown",passive:a=!1,dedupe:l=!1}=r,u=_L(e);return xl(i,s,c=>{c.repeat&&jo(l)||u(c)&&n(c)},a)}function Px(){const t=o.ref(!1),e=o.getCurrentInstance();return e&&o.onMounted(()=>{t.value=!0},e),t}function AL(t){const e=Px();return o.computed(()=>(e.value,!!t()))}function ML(t){return JSON.parse(JSON.stringify(t))}function Cl(t,e,n={}){const{window:r=yf,...i}=n;let s;const a=AL(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},u=o.computed(()=>Array.isArray(t)?t.map(p=>go(p)):[go(t)]),c=o.watch(u,p=>{if(l(),a.value&&r){s=new ResizeObserver(e);for(const m of p)m&&s.observe(m,i)}},{immediate:!0,flush:"post"}),f=()=>{l(),c()};return wl(f),{isSupported:a,stop:f}}function Tr(t,e,n,r={}){var i,s,a;const{clone:l=!1,passive:u=!1,eventName:c,deep:f=!1,defaultValue:p,shouldEmit:m}=r,g=o.getCurrentInstance(),b=n||(g==null?void 0:g.emit)||((i=g==null?void 0:g.$emit)==null?void 0:i.bind(g))||((a=(s=g==null?void 0:g.proxy)==null?void 0:s.$emit)==null?void 0:a.bind(g==null?void 0:g.proxy));let v=c;e||(e="modelValue"),v=v||`update:${e.toString()}`;const y=E=>l?typeof l=="function"?l(E):ML(E):E,x=()=>bL(t[e])?y(t[e]):p,k=E=>{m?m(E)&&b(v,E):b(v,E)};if(u){const E=x(),C=o.ref(E);let _=!1;return o.watch(()=>t[e],T=>{_||(_=!0,C.value=y(T),o.nextTick(()=>_=!1))}),o.watch(C,T=>{!_&&(T!==t[e]||f)&&k(T)},{deep:f}),C}else return o.computed({get(){return x()},set(E){k(E)}})}function wf(t){return t?t.flatMap(e=>e.type===o.Fragment?wf(e.children):[e]):[]}function Wn(){let t=document.activeElement;if(t==null)return null;for(;t!=null&&t.shadowRoot!=null&&t.shadowRoot.activeElement!=null;)t=t.shadowRoot.activeElement;return t}const OL=["INPUT","TEXTAREA"];function BL(t,e,n,r={}){if(!e||r.enableIgnoredElement&&OL.includes(e.nodeName))return null;const{arrowKeyOptions:i="both",attributeName:s="[data-radix-vue-collection-item]",itemsArray:a=[],loop:l=!0,dir:u="ltr",preventScroll:c=!0,focus:f=!1}=r,[p,m,g,b,v,y]=[t.key==="ArrowRight",t.key==="ArrowLeft",t.key==="ArrowUp",t.key==="ArrowDown",t.key==="Home",t.key==="End"],x=g||b,k=p||m;if(!v&&!y&&(!x&&!k||i==="vertical"&&k||i==="horizontal"&&x))return null;const E=n?Array.from(n.querySelectorAll(s)):a;if(!E.length)return null;c&&t.preventDefault();let C=null;return k||x?C=Vx(E,e,{goForward:x?b:u==="ltr"?p:m,loop:l}):v?C=E.at(0)||null:y&&(C=E.at(-1)||null),f&&(C==null||C.focus()),C}function Vx(t,e,n,r=t.length){if(--r===0)return null;const i=t.indexOf(e),s=n.goForward?i+1:i-1;if(!n.loop&&(s<0||s>=t.length))return null;const a=(s+t.length)%t.length,l=t[a];return l?l.hasAttribute("disabled")&&l.getAttribute("disabled")!=="false"?Vx(t,l,n,r):l:null}function O1(t){if(t===null||typeof t!="object")return!1;const e=Object.getPrototypeOf(t);return e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null||Symbol.iterator in t?!1:Symbol.toStringTag in t?Object.prototype.toString.call(t)==="[object Module]":!0}function B1(t,e,n=".",r){if(!O1(e))return B1(t,{},n);const i=Object.assign({},e);for(const s in t){if(s==="__proto__"||s==="constructor")continue;const a=t[s];a!=null&&(Array.isArray(a)&&Array.isArray(i[s])?i[s]=[...a,...i[s]]:O1(a)&&O1(i[s])?i[s]=B1(a,i[s],(n?`${n}.`:"")+s.toString()):i[s]=a)}return i}function IL(t){return(...e)=>e.reduce((n,r)=>B1(n,r,""),{})}const RL=IL(),[xf,hce]=zt("ConfigProvider");let LL="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",DL=(t=21)=>{let e="",n=t;for(;n--;)e+=LL[Math.random()*64|0];return e};const PL=Bx(()=>{const t=o.ref(new Map),e=o.ref(),n=o.computed(()=>{for(const a of t.value.values())if(a)return!0;return!1}),r=xf({scrollBody:o.ref(!0)});let i=null;const s=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.body.style.removeProperty("--scrollbar-width"),document.body.style.overflow=e.value??"",Ix&&(i==null||i()),e.value=void 0};return o.watch(n,(a,l)=>{var u;if(!gi)return;if(!a){l&&s();return}e.value===void 0&&(e.value=document.body.style.overflow);const c=window.innerWidth-document.documentElement.clientWidth,f={padding:c,margin:0},p=(u=r.scrollBody)!=null&&u.value?typeof r.scrollBody.value=="object"?RL({padding:r.scrollBody.value.padding===!0?c:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?c:r.scrollBody.value.margin},f):f:{padding:0,margin:0};c>0&&(document.body.style.paddingRight=typeof p.padding=="number"?`${p.padding}px`:String(p.padding),document.body.style.marginRight=typeof p.margin=="number"?`${p.margin}px`:String(p.margin),document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),Ix&&(i=xl(document,"touchmove",m=>VL(m),{passive:!1})),o.nextTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),t});function Cf(t){const e=DL(6),n=PL();n.value.set(e,t??!1);const r=o.computed({get:()=>n.value.get(e)??!1,set:i=>n.value.set(e,i)});return EL(()=>{n.value.delete(e)}),r}function Fx(t){const e=window.getComputedStyle(t);if(e.overflowX==="scroll"||e.overflowY==="scroll"||e.overflowX==="auto"&&t.clientWidth<t.scrollWidth||e.overflowY==="auto"&&t.clientHeight<t.scrollHeight)return!0;{const n=t.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:Fx(n)}}function VL(t){const e=t||window.event,n=e.target;return n instanceof Element&&Fx(n)?!1:e.touches.length>1?!0:(e.preventDefault&&e.cancelable&&e.preventDefault(),!1)}const FL="data-radix-vue-collection-item";function Yu(t,e=FL){const n=Symbol();return{createCollection:r=>{const i=o.ref([]);function s(){const a=go(r);return a?i.value=Array.from(a.querySelectorAll(`[${e}]:not([data-disabled])`)):i.value=[]}return o.onBeforeUpdate(()=>{i.value=[]}),o.onMounted(s),o.onUpdated(s),o.watch(()=>r==null?void 0:r.value,s,{immediate:!0}),o.provide(n,i),i},injectCollection:()=>o.inject(n,o.ref([]))}}function aa(t){const e=xf({dir:o.ref("ltr")});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.dir)==null?void 0:n.value)||"ltr"})}function la(t){const e=o.getCurrentInstance(),n=e==null?void 0:e.type.emits,r={};return n!=null&&n.length||console.warn(`No emitted event found. Please check component: ${e==null?void 0:e.type.__name}`),n==null||n.forEach(i=>{r[o.toHandlerKey(o.camelize(i))]=(...s)=>t(i,...s)}),r}let I1=0;function R1(){o.watchEffect(t=>{if(!gi)return;const e=document.querySelectorAll("[data-radix-focus-guard]");document.body.insertAdjacentElement("afterbegin",e[0]??$x()),document.body.insertAdjacentElement("beforeend",e[1]??$x()),I1++,t(()=>{I1===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),I1--})})}function $x(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}function L1(t){return o.computed(()=>{var e;return jo(t)?!!((e=go(t))!=null&&e.closest("form")):!0})}function er(t){const e=o.getCurrentInstance(),n=Object.keys((e==null?void 0:e.type.props)??{}).reduce((i,s)=>{const a=(e==null?void 0:e.type.props[s]).default;return a!==void 0&&(i[s]=a),i},{}),r=o.toRef(t);return o.computed(()=>{const i={},s=(e==null?void 0:e.vnode.props)??{};return Object.keys(s).forEach(a=>{i[o.camelize(a)]=s[a]}),Object.keys({...n,...i}).reduce((a,l)=>(r.value[l]!==void 0&&(a[l]=r.value[l]),a),{})})}function Pt(t,e){const n=er(t),r=e?la(e):{};return o.computed(()=>({...n.value,...r}))}function Le(){const t=o.getCurrentInstance(),e=o.ref(),n=o.computed(()=>{var a,l;return["#text","#comment"].includes((a=e.value)==null?void 0:a.$el.nodeName)?(l=e.value)==null?void 0:l.$el.nextElementSibling:go(e)}),r=Object.assign({},t.exposed),i={};for(const a in t.props)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>t.props[a]});if(Object.keys(r).length>0)for(const a in r)Object.defineProperty(i,a,{enumerable:!0,configurable:!0,get:()=>r[a]});Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>t.vnode.el}),t.exposed=i;function s(a){e.value=a,a&&(Object.defineProperty(i,"$el",{enumerable:!0,configurable:!0,get:()=>a instanceof Element?a:a.$el}),t.exposed=i)}return{forwardRef:s,currentRef:e,currentElement:n}}function $L(t,e){const n=Rx(!1,300),r=o.ref(null),i=mL();function s(){r.value=null,n.value=!1}function a(l,u){const c=l.currentTarget,f={x:l.clientX,y:l.clientY},p=HL(f,c.getBoundingClientRect()),m=zL(f,p),g=UL(u.getBoundingClientRect()),b=jL([...m,...g]);r.value=b,n.value=!0}return o.watchEffect(l=>{if(t.value&&e.value){const u=f=>a(f,e.value),c=f=>a(f,t.value);t.value.addEventListener("pointerleave",u),e.value.addEventListener("pointerleave",c),l(()=>{var f,p;(f=t.value)==null||f.removeEventListener("pointerleave",u),(p=e.value)==null||p.removeEventListener("pointerleave",c)})}}),o.watchEffect(l=>{var u;if(r.value){const c=f=>{var p,m;if(!r.value)return;const g=f.target,b={x:f.clientX,y:f.clientY},v=((p=t.value)==null?void 0:p.contains(g))||((m=e.value)==null?void 0:m.contains(g)),y=!WL(b,r.value),x=!!g.closest("[data-grace-area-trigger]");v?s():(y||x)&&(s(),i.trigger())};(u=t.value)==null||u.ownerDocument.addEventListener("pointermove",c),l(()=>{var f;return(f=t.value)==null?void 0:f.ownerDocument.removeEventListener("pointermove",c)})}}),{isPointerInTransit:n,onPointerExit:i.on}}function HL(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function zL(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UL(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function WL(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function jL(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),qL(e)}function qL(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KL=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},kl=new WeakMap,kf=new WeakMap,Ef={},D1=0,Hx=function(t){return t&&(t.host||Hx(t.parentNode))},GL=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=Hx(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},XL=function(t,e,n,r){var i=GL(e,Array.isArray(t)?t:[t]);Ef[n]||(Ef[n]=new WeakMap);var s=Ef[n],a=[],l=new Set,u=new Set(i),c=function(p){!p||l.has(p)||(l.add(p),c(p.parentNode))};i.forEach(c);var f=function(p){!p||u.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))f(m);else try{var g=m.getAttribute(r),b=g!==null&&g!=="false",v=(kl.get(m)||0)+1,y=(s.get(m)||0)+1;kl.set(m,v),s.set(m,y),a.push(m),v===1&&b&&kf.set(m,!0),y===1&&m.setAttribute(n,"true"),b||m.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",m,x)}})};return f(e),l.clear(),D1++,function(){a.forEach(function(p){var m=kl.get(p)-1,g=s.get(p)-1;kl.set(p,m),s.set(p,g),m||(kf.has(p)||p.removeAttribute(r),kf.delete(p)),g||p.removeAttribute(n)}),D1--,D1||(kl=new WeakMap,kl=new WeakMap,kf=new WeakMap,Ef={})}},YL=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=KL(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),XL(r,i,n,"aria-hidden")):function(){return null}};function Sf(t){let e;o.watch(()=>go(t),n=>{n?e=YL(n):e&&e()}),o.onUnmounted(()=>{e&&e()})}let JL=0;function Kr(t,e="radix"){const n=xf({useId:void 0});return ay.useId?`${e}-${ay.useId()}`:n.useId?`${e}-${n.useId()}`:`${e}-${++JL}`}function ZL(t){const e=o.ref(),n=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.width)??0}),r=o.computed(()=>{var i;return((i=e.value)==null?void 0:i.height)??0});return o.onMounted(()=>{const i=go(t);if(i){e.value={width:i.offsetWidth,height:i.offsetHeight};const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const l=a[0];let u,c;if("borderBoxSize"in l){const f=l.borderBoxSize,p=Array.isArray(f)?f[0]:f;u=p.inlineSize,c=p.blockSize}else u=i.offsetWidth,c=i.offsetHeight;e.value={width:u,height:c}});return s.observe(i,{box:"border-box"}),()=>s.unobserve(i)}else e.value=void 0}),{width:n,height:r}}function zx(t,e){const n=o.ref(t);function r(i){return e[n.value][i]??n.value}return{state:n,dispatch:i=>{n.value=r(i)}}}const QL="data-item-text";function P1(t){const e=Rx("",1e3);return{search:e,handleTypeaheadSearch:(n,r)=>{if(!(t!=null&&t.value)&&!r)return;e.value=e.value+n;const i=(t==null?void 0:t.value)??r,s=Wn(),a=i.map(p=>{var m;return{ref:p,textValue:((m=(p.querySelector(`[${QL}]`)??p).textContent)==null?void 0:m.trim())??""}}),l=a.find(p=>p.ref===s),u=a.map(p=>p.textValue),c=eD(u,e.value,l==null?void 0:l.textValue),f=a.find(p=>p.textValue===c);return f&&f.ref.focus(),f==null?void 0:f.ref},resetTypeahead:()=>{e.value=""}}}function NL(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function eD(t,e,n){const r=e.length>1&&Array.from(e).every(l=>l===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let s=NL(t,Math.max(i,0));r.length===1&&(s=s.filter(l=>l!==n));const a=s.find(l=>l.toLowerCase().startsWith(r.toLowerCase()));return a!==n?a:void 0}const V1=o.defineComponent({name:"PrimitiveSlot",inheritAttrs:!1,setup(t,{attrs:e,slots:n}){return()=>{var r,i;if(!n.default)return null;const s=wf(n.default()),a=s.findIndex(f=>f.type!==o.Comment);if(a===-1)return s;const l=s[a];(r=l.props)==null||delete r.ref;const u=l.props?o.mergeProps(e,l.props):e;e.class&&(i=l.props)!=null&&i.class&&delete l.props.class;const c=o.cloneVNode(l,u);for(const f in u)f.startsWith("on")&&(c.props||(c.props={}),c.props[f]=u[f]);return s.length===1?c:(s[a]=c,s)}}}),Ye=o.defineComponent({name:"Primitive",inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:"div"}},setup(t,{attrs:e,slots:n}){const r=t.asChild?"template":t.as;return typeof r=="string"&&["area","img","input"].includes(r)?()=>o.h(r,e):r!=="template"?()=>o.h(t.as,e,{default:n.default}):()=>o.h(V1,e,{default:n.default})}});function Ux(){const t=o.ref(),e=o.computed(()=>{var n,r;return["#text","#comment"].includes((n=t.value)==null?void 0:n.$el.nodeName)?(r=t.value)==null?void 0:r.$el.nextElementSibling:go(t)});return{primitiveElement:t,currentElement:e}}function tD(t,e){var n;const r=o.ref({}),i=o.ref("none"),s=o.ref(t),a=t.value?"mounted":"unmounted";let l;const u=((n=e.value)==null?void 0:n.ownerDocument.defaultView)??yf,{state:c,dispatch:f}=zx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),p=y=>{var x;if(gi){const k=new CustomEvent(y,{bubbles:!1,cancelable:!1});(x=e.value)==null||x.dispatchEvent(k)}};o.watch(t,async(y,x)=>{var k;const E=x!==y;if(await o.nextTick(),E){const C=i.value,_=_f(e.value);y?(f("MOUNT"),p("enter"),_==="none"&&p("after-enter")):_==="none"||((k=r.value)==null?void 0:k.display)==="none"?(f("UNMOUNT"),p("leave"),p("after-leave")):x&&C!==_?(f("ANIMATION_OUT"),p("leave")):(f("UNMOUNT"),p("after-leave"))}},{immediate:!0});const m=y=>{const x=_f(e.value),k=x.includes(y.animationName),E=c.value==="mounted"?"enter":"leave";if(y.target===e.value&&k&&(p(`after-${E}`),f("ANIMATION_END"),!s.value)){const C=e.value.style.animationFillMode;e.value.style.animationFillMode="forwards",l=u==null?void 0:u.setTimeout(()=>{var _;((_=e.value)==null?void 0:_.style.animationFillMode)==="forwards"&&(e.value.style.animationFillMode=C)})}y.target===e.value&&x==="none"&&f("ANIMATION_END")},g=y=>{y.target===e.value&&(i.value=_f(e.value))},b=o.watch(e,(y,x)=>{y?(r.value=getComputedStyle(y),y.addEventListener("animationstart",g),y.addEventListener("animationcancel",m),y.addEventListener("animationend",m)):(f("ANIMATION_END"),l!==void 0&&(u==null||u.clearTimeout(l)),x==null||x.removeEventListener("animationstart",g),x==null||x.removeEventListener("animationcancel",m),x==null||x.removeEventListener("animationend",m))},{immediate:!0}),v=o.watch(c,()=>{const y=_f(e.value);i.value=c.value==="mounted"?y:"none"});return o.onUnmounted(()=>{b(),v()}),{isPresent:o.computed(()=>["mounted","unmountSuspended"].includes(c.value))}}function _f(t){return t&&getComputedStyle(t).animationName||"none"}const Gr=o.defineComponent({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(t,{slots:e,expose:n}){var r;const{present:i,forceMount:s}=o.toRefs(t),a=o.ref(),{isPresent:l}=tD(i,a);n({present:l});let u=e.default({present:l});u=wf(u||[]);const c=o.getCurrentInstance();if(u&&(u==null?void 0:u.length)>1){const f=(r=c==null?void 0:c.parent)!=null&&r.type.name?`<${c.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${f}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(p=>` - ${p}`).join(`
|
|
136
136
|
`)].join(`
|
|
137
|
-
`))}return()=>s.value||i.value||l.value?o.h(e.default({present:l})[0],{ref:f=>{const p=go(f);return typeof(p==null?void 0:p.hasAttribute)>"u"||(p!=null&&p.hasAttribute("data-radix-popper-content-wrapper")?a.value=p.firstElementChild:a.value=p),p}}):null}}),[qo,nD]=zt("DialogRoot"),rD=o.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=Tr(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=o.ref(),s=o.ref(),{modal:a}=o.toRefs(n);return nD({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:s}),(l,u)=>o.renderSlot(l.$slots,"default",{open:o.unref(r)})}}),oD=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=qo(),{forwardRef:r,currentElement:i}=Le();return n.contentId||(n.contentId=Kr(void 0,"radix-vue-dialog-content")),o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value||!1,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).open.value?"open":"closed",onClick:o.unref(n).onOpenToggle}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Ju=o.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=P6();return(n,r)=>o.unref(e)||n.forceMount?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:n.to,disabled:n.disabled},[o.renderSlot(n.$slots,"default")],8,["to","disabled"])):o.createCommentVNode("",!0)}}),F1=o.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),iD="dismissableLayer.pointerDownOutside",sD="dismissableLayer.focusOutside";function W6(t,e){const n=e.closest("[data-dismissable-layer]"),r=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),i=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||i.indexOf(r)<i.indexOf(n))}function aD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1),s=o.ref(()=>{});return o.watchEffect(a=>{if(!gi)return;const l=async c=>{const f=c.target;if(e!=null&&e.value){if(W6(e.value,f)){i.value=!1;return}if(c.target&&!i.value){let p=function(){O6(iD,t,m)};const m={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=p,r.addEventListener("click",s.value,{once:!0})):p()}else r.removeEventListener("click",s.value);i.value=!1}},u=window.setTimeout(()=>{r.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(u),r.removeEventListener("pointerdown",l),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>i.value=!0}}function lD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1);return o.watchEffect(s=>{if(!gi)return;const a=async l=>{e!=null&&e.value&&(await o.nextTick(),!(!e.value||W6(e.value,l.target))&&l.target&&!i.value&&O6(sD,t,{originalEvent:l}))};r.addEventListener("focusin",a),s(()=>r.removeEventListener("focusin",a))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const bi=o.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zu=o.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Le(),a=o.computed(()=>{var b;return((b=s.value)==null?void 0:b.ownerDocument)??globalThis.document}),l=o.computed(()=>bi.layersRoot),u=o.computed(()=>s.value?Array.from(l.value).indexOf(s.value):-1),c=o.computed(()=>bi.layersWithOutsidePointerEventsDisabled.size>0),f=o.computed(()=>{const b=Array.from(l.value),[v]=[...bi.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v);return u.value>=y}),p=aD(async b=>{const v=[...bi.branches].some(y=>y==null?void 0:y.contains(b.target));!f.value||v||(r("pointerDownOutside",b),r("interactOutside",b),await o.nextTick(),b.defaultPrevented||r("dismiss"))},s),m=lD(b=>{[...bi.branches].some(v=>v==null?void 0:v.contains(b.target))||(r("focusOutside",b),r("interactOutside",b),b.defaultPrevented||r("dismiss"))},s);TL("Escape",b=>{u.value===l.value.size-1&&(r("escapeKeyDown",b),b.defaultPrevented||r("dismiss"))});let g;return o.watchEffect(b=>{s.value&&(n.disableOutsidePointerEvents&&(bi.layersWithOutsidePointerEventsDisabled.size===0&&(g=a.value.body.style.pointerEvents,a.value.body.style.pointerEvents="none"),bi.layersWithOutsidePointerEventsDisabled.add(s.value)),l.value.add(s.value),b(()=>{n.disableOutsidePointerEvents&&bi.layersWithOutsidePointerEventsDisabled.size===1&&(a.value.body.style.pointerEvents=g)}))}),o.watchEffect(b=>{b(()=>{s.value&&(l.value.delete(s.value),bi.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(b,v)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(i),"as-child":b.asChild,as:b.as,"data-dismissable-layer":"",style:o.normalizeStyle({pointerEvents:c.value?f.value?"auto":"none":void 0}),onFocusCapture:o.unref(m).onFocusCapture,onBlurCapture:o.unref(m).onBlurCapture,onPointerdownCapture:o.unref(p).onPointerDownCapture},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$1="focusScope.autoFocusOnMount",H1="focusScope.autoFocusOnUnmount",j6={bubbles:!1,cancelable:!0};function uD(t,{select:e=!1}={}){const n=Wn();for(const r of t)if(as(r,{select:e}),Wn()!==n)return!0}function cD(t){const e=q6(t),n=K6(e,t),r=K6(e.reverse(),t);return[n,r]}function q6(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function K6(t,e){for(const n of t)if(!dD(n,{upTo:e}))return n}function dD(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fD(t){return t instanceof HTMLInputElement&&"select"in t}function as(t,{select:e=!1}={}){if(t&&t.focus){const n=Wn();t.focus({preventScroll:!0}),t!==n&&fD(t)&&e&&t.select()}}const pD=gL(()=>o.ref([]));function hD(){const t=pD();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=G6(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=G6(t.value,e),(n=t.value[0])==null||n.resume()}}}function G6(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function mD(t){return t.filter(e=>e.tagName!=="A")}const Tf=o.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,r=e,{currentRef:i,currentElement:s}=Le(),a=o.ref(null),l=hD(),u=o.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});o.watchEffect(f=>{if(!gi)return;const p=s.value;if(!n.trapped)return;function m(y){if(u.paused||!p)return;const x=y.target;p.contains(x)?a.value=x:as(a.value,{select:!0})}function g(y){if(u.paused||!p)return;const x=y.relatedTarget;x!==null&&(p.contains(x)||as(a.value,{select:!0}))}function b(y){p.contains(a.value)||as(p)}document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(b);p&&v.observe(p,{childList:!0,subtree:!0}),f(()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()})}),o.watchEffect(async f=>{const p=s.value;if(await o.nextTick(),!p)return;l.add(u);const m=Wn();if(!p.contains(m)){const g=new CustomEvent($1,j6);p.addEventListener($1,b=>r("mountAutoFocus",b)),p.dispatchEvent(g),g.defaultPrevented||(uD(mD(q6(p)),{select:!0}),Wn()===m&&as(p))}f(()=>{p.removeEventListener($1,v=>r("mountAutoFocus",v));const g=new CustomEvent(H1,j6),b=v=>{r("unmountAutoFocus",v)};p.addEventListener(H1,b),p.dispatchEvent(g),setTimeout(()=>{g.defaultPrevented||as(m??document.body,{select:!0}),p.removeEventListener(H1,b),l.remove(u)},0)})});function c(f){if(!n.loop&&!n.trapped||u.paused)return;const p=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=Wn();if(p&&m){const g=f.currentTarget,[b,v]=cD(g);b&&v?!f.shiftKey&&m===v?(f.preventDefault(),n.loop&&as(b,{select:!0})):f.shiftKey&&m===b&&(f.preventDefault(),n.loop&&as(v,{select:!0})):m===g&&f.preventDefault()}}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":f.asChild,as:f.as,onKeydown:c},{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},8,["as-child","as"]))}}),gD="menu.itemSelect",z1=["Enter"," "],bD=["ArrowDown","PageUp","Home"],X6=["ArrowUp","PageDown","End"],vD=[...bD,...X6];[...z1],[...z1];function Y6(t){return t?"open":"closed"}function Af(t){return t==="indeterminate"}function J6(t){return Af(t)?"indeterminate":t?"checked":"unchecked"}function U1(t){const e=Wn();for(const n of t)if(n===e||(n.focus(),Wn()!==e))return}function yD(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function wD(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return yD(n,e)}function W1(t){return t.pointerType==="mouse"}const xD="DialogTitle",CD="DialogContent";function kD({titleName:t=xD,contentName:e=CD,componentLink:n="dialog.html#title",titleId:r,descriptionId:i,contentElement:s}){const a=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users.
|
|
137
|
+
`))}return()=>s.value||i.value||l.value?o.h(e.default({present:l})[0],{ref:f=>{const p=go(f);return typeof(p==null?void 0:p.hasAttribute)>"u"||(p!=null&&p.hasAttribute("data-radix-popper-content-wrapper")?a.value=p.firstElementChild:a.value=p),p}}):null}}),[qo,nD]=zt("DialogRoot"),rD=o.defineComponent({inheritAttrs:!1,__name:"DialogRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=Tr(n,"open",e,{defaultValue:n.defaultOpen,passive:n.open===void 0}),i=o.ref(),s=o.ref(),{modal:a}=o.toRefs(n);return nD({open:r,modal:a,openModal:()=>{r.value=!0},onOpenChange:l=>{r.value=l},onOpenToggle:()=>{r.value=!r.value},contentId:"",titleId:"",descriptionId:"",triggerElement:i,contentElement:s}),(l,u)=>o.renderSlot(l.$slots,"default",{open:o.unref(r)})}}),oD=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=qo(),{forwardRef:r,currentElement:i}=Le();return n.contentId||(n.contentId=Kr(void 0,"radix-vue-dialog-content")),o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value||!1,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).open.value?"open":"closed",onClick:o.unref(n).onOpenToggle}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16,["type","aria-expanded","aria-controls","data-state","onClick"]))}}),Ju=o.defineComponent({__name:"Teleport",props:{to:{default:"body"},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=Px();return(n,r)=>o.unref(e)||n.forceMount?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:n.to,disabled:n.disabled},[o.renderSlot(n.$slots,"default")],8,["to","disabled"])):o.createCommentVNode("",!0)}}),F1=o.defineComponent({__name:"DialogPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),iD="dismissableLayer.pointerDownOutside",sD="dismissableLayer.focusOutside";function Wx(t,e){const n=e.closest("[data-dismissable-layer]"),r=t.dataset.dismissableLayer===""?t:t.querySelector("[data-dismissable-layer]"),i=Array.from(t.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&r===n||i.indexOf(r)<i.indexOf(n))}function aD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1),s=o.ref(()=>{});return o.watchEffect(a=>{if(!gi)return;const l=async c=>{const f=c.target;if(e!=null&&e.value){if(Wx(e.value,f)){i.value=!1;return}if(c.target&&!i.value){let p=function(){Ox(iD,t,m)};const m={originalEvent:c};c.pointerType==="touch"?(r.removeEventListener("click",s.value),s.value=p,r.addEventListener("click",s.value,{once:!0})):p()}else r.removeEventListener("click",s.value);i.value=!1}},u=window.setTimeout(()=>{r.addEventListener("pointerdown",l)},0);a(()=>{window.clearTimeout(u),r.removeEventListener("pointerdown",l),r.removeEventListener("click",s.value)})}),{onPointerDownCapture:()=>i.value=!0}}function lD(t,e){var n;const r=((n=e==null?void 0:e.value)==null?void 0:n.ownerDocument)??(globalThis==null?void 0:globalThis.document),i=o.ref(!1);return o.watchEffect(s=>{if(!gi)return;const a=async l=>{e!=null&&e.value&&(await o.nextTick(),!(!e.value||Wx(e.value,l.target))&&l.target&&!i.value&&Ox(sD,t,{originalEvent:l}))};r.addEventListener("focusin",a),s(()=>r.removeEventListener("focusin",a))}),{onFocusCapture:()=>i.value=!0,onBlurCapture:()=>i.value=!1}}const bi=o.reactive({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Zu=o.defineComponent({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Le(),a=o.computed(()=>{var b;return((b=s.value)==null?void 0:b.ownerDocument)??globalThis.document}),l=o.computed(()=>bi.layersRoot),u=o.computed(()=>s.value?Array.from(l.value).indexOf(s.value):-1),c=o.computed(()=>bi.layersWithOutsidePointerEventsDisabled.size>0),f=o.computed(()=>{const b=Array.from(l.value),[v]=[...bi.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(v);return u.value>=y}),p=aD(async b=>{const v=[...bi.branches].some(y=>y==null?void 0:y.contains(b.target));!f.value||v||(r("pointerDownOutside",b),r("interactOutside",b),await o.nextTick(),b.defaultPrevented||r("dismiss"))},s),m=lD(b=>{[...bi.branches].some(v=>v==null?void 0:v.contains(b.target))||(r("focusOutside",b),r("interactOutside",b),b.defaultPrevented||r("dismiss"))},s);TL("Escape",b=>{u.value===l.value.size-1&&(r("escapeKeyDown",b),b.defaultPrevented||r("dismiss"))});let g;return o.watchEffect(b=>{s.value&&(n.disableOutsidePointerEvents&&(bi.layersWithOutsidePointerEventsDisabled.size===0&&(g=a.value.body.style.pointerEvents,a.value.body.style.pointerEvents="none"),bi.layersWithOutsidePointerEventsDisabled.add(s.value)),l.value.add(s.value),b(()=>{n.disableOutsidePointerEvents&&bi.layersWithOutsidePointerEventsDisabled.size===1&&(a.value.body.style.pointerEvents=g)}))}),o.watchEffect(b=>{b(()=>{s.value&&(l.value.delete(s.value),bi.layersWithOutsidePointerEventsDisabled.delete(s.value))})}),(b,v)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(i),"as-child":b.asChild,as:b.as,"data-dismissable-layer":"",style:o.normalizeStyle({pointerEvents:c.value?f.value?"auto":"none":void 0}),onFocusCapture:o.unref(m).onFocusCapture,onBlurCapture:o.unref(m).onBlurCapture,onPointerdownCapture:o.unref(p).onPointerDownCapture},{default:o.withCtx(()=>[o.renderSlot(b.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),$1="focusScope.autoFocusOnMount",H1="focusScope.autoFocusOnUnmount",jx={bubbles:!1,cancelable:!0};function uD(t,{select:e=!1}={}){const n=Wn();for(const r of t)if(as(r,{select:e}),Wn()!==n)return!0}function cD(t){const e=qx(t),n=Kx(e,t),r=Kx(e.reverse(),t);return[n,r]}function qx(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Kx(t,e){for(const n of t)if(!dD(n,{upTo:e}))return n}function dD(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function fD(t){return t instanceof HTMLInputElement&&"select"in t}function as(t,{select:e=!1}={}){if(t&&t.focus){const n=Wn();t.focus({preventScroll:!0}),t!==n&&fD(t)&&e&&t.select()}}const pD=gL(()=>o.ref([]));function hD(){const t=pD();return{add(e){const n=t.value[0];e!==n&&(n==null||n.pause()),t.value=Gx(t.value,e),t.value.unshift(e)},remove(e){var n;t.value=Gx(t.value,e),(n=t.value[0])==null||n.resume()}}}function Gx(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function mD(t){return t.filter(e=>e.tagName!=="A")}const Tf=o.defineComponent({__name:"FocusScope",props:{loop:{type:Boolean,default:!1},trapped:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["mountAutoFocus","unmountAutoFocus"],setup(t,{emit:e}){const n=t,r=e,{currentRef:i,currentElement:s}=Le(),a=o.ref(null),l=hD(),u=o.reactive({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});o.watchEffect(f=>{if(!gi)return;const p=s.value;if(!n.trapped)return;function m(y){if(u.paused||!p)return;const x=y.target;p.contains(x)?a.value=x:as(a.value,{select:!0})}function g(y){if(u.paused||!p)return;const x=y.relatedTarget;x!==null&&(p.contains(x)||as(a.value,{select:!0}))}function b(y){p.contains(a.value)||as(p)}document.addEventListener("focusin",m),document.addEventListener("focusout",g);const v=new MutationObserver(b);p&&v.observe(p,{childList:!0,subtree:!0}),f(()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",g),v.disconnect()})}),o.watchEffect(async f=>{const p=s.value;if(await o.nextTick(),!p)return;l.add(u);const m=Wn();if(!p.contains(m)){const g=new CustomEvent($1,jx);p.addEventListener($1,b=>r("mountAutoFocus",b)),p.dispatchEvent(g),g.defaultPrevented||(uD(mD(qx(p)),{select:!0}),Wn()===m&&as(p))}f(()=>{p.removeEventListener($1,v=>r("mountAutoFocus",v));const g=new CustomEvent(H1,jx),b=v=>{r("unmountAutoFocus",v)};p.addEventListener(H1,b),p.dispatchEvent(g),setTimeout(()=>{g.defaultPrevented||as(m??document.body,{select:!0}),p.removeEventListener(H1,b),l.remove(u)},0)})});function c(f){if(!n.loop&&!n.trapped||u.paused)return;const p=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=Wn();if(p&&m){const g=f.currentTarget,[b,v]=cD(g);b&&v?!f.shiftKey&&m===v?(f.preventDefault(),n.loop&&as(b,{select:!0})):f.shiftKey&&m===b&&(f.preventDefault(),n.loop&&as(v,{select:!0})):m===g&&f.preventDefault()}}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":f.asChild,as:f.as,onKeydown:c},{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},8,["as-child","as"]))}}),gD="menu.itemSelect",z1=["Enter"," "],bD=["ArrowDown","PageUp","Home"],Xx=["ArrowUp","PageDown","End"],vD=[...bD,...Xx];[...z1],[...z1];function Yx(t){return t?"open":"closed"}function Af(t){return t==="indeterminate"}function Jx(t){return Af(t)?"indeterminate":t?"checked":"unchecked"}function U1(t){const e=Wn();for(const n of t)if(n===e||(n.focus(),Wn()!==e))return}function yD(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const l=e[s].x,u=e[s].y,c=e[a].x,f=e[a].y;u>r!=f>r&&n<(c-l)*(r-u)/(f-u)+l&&(i=!i)}return i}function wD(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return yD(n,e)}function W1(t){return t.pointerType==="mouse"}const xD="DialogTitle",CD="DialogContent";function kD({titleName:t=xD,contentName:e=CD,componentLink:n="dialog.html#title",titleId:r,descriptionId:i,contentElement:s}){const a=`Warning: \`${e}\` requires a \`${t}\` for the component to be accessible for screen reader users.
|
|
138
138
|
|
|
139
139
|
If you want to hide the \`${t}\`, you can wrap it with our VisuallyHidden component.
|
|
140
140
|
|
|
141
|
-
For more information, see https://www.radix-vue.com/components/${n}`,l=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;o.onMounted(()=>{var u;document.getElementById(r)||console.warn(a);const c=(u=s.value)==null?void 0:u.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(l))})}const Z6=o.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),{forwardRef:s,currentElement:a}=Le();return i.titleId||(i.titleId=Kr(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=Kr(void 0,"radix-vue-dialog-description")),o.onMounted(()=>{i.contentElement=a,Wn()!==document.body&&(i.triggerElement.value=Wn())}),process.env.NODE_ENV!=="production"&&kD({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:i.titleId,descriptionId:i.descriptionId,contentElement:a}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),o.mergeProps({id:o.unref(i).contentId,ref:o.unref(s),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":o.unref(i).descriptionId,"aria-labelledby":o.unref(i).titleId,"data-state":o.unref(Y6)(o.unref(i).open.value)},l.$attrs,{onDismiss:u[0]||(u[0]=c=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=c=>r("escapeKeyDown",c)),onFocusOutside:u[2]||(u[2]=c=>r("focusOutside",c)),onInteractOutside:u[3]||(u[3]=c=>r("interactOutside",c)),onPointerDownOutside:u[4]||(u[4]=c=>r("pointerDownOutside",c))}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),ED=o.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),s=la(r),{forwardRef:a,currentElement:l}=Le();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(s)},{ref:o.unref(a),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;f.defaultPrevented||(f.preventDefault(),(p=o.unref(i).triggerElement.value)==null||p.focus())}),onPointerDownOutside:c[1]||(c[1]=f=>{const p=f.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&f.preventDefault()}),onFocusOutside:c[2]||(c[2]=f=>{f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),SD=o.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=la(e);Le();const i=qo(),s=o.ref(!1),a=o.ref(!1);return(l,u)=>(o.openBlock(),o.createBlock(Z6,o.mergeProps({...n,...o.unref(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(s.value||(f=o.unref(i).triggerElement.value)==null||f.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var f;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(f=o.unref(i).triggerElement.value)!=null&&f.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))}}),_D=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),s=la(r),{forwardRef:a}=Le();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(ED,o.mergeProps({key:0,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(SD,o.mergeProps({key:1,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),TD=o.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=qo();return Cf(!0),Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),{as:n.as,"as-child":n.asChild,"data-state":o.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),j1=o.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=qo(),{forwardRef:n}=Le();return(r,i)=>{var s;return(s=o.unref(e))!=null&&s.modal.value?(o.openBlock(),o.createBlock(o.unref(Gr),{key:0,present:r.forceMount||o.unref(e).open.value},{default:o.withCtx(()=>[o.createVNode(TD,o.mergeProps(r.$attrs,{ref:o.unref(n),as:r.as,"as-child":r.asChild}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):o.createCommentVNode("",!0)}}}),AD=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;Le();const n=qo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{type:r.as==="button"?"button":void 0,onClick:i[0]||(i[0]=s=>o.unref(n).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["type"]))}}),MD=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=qo();return Le(),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{id:o.unref(n).titleId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}}),OD=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;Le();const n=qo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{id:o.unref(n).descriptionId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}});function Mf(t){return t==="indeterminate"}function Q6(t){return Mf(t)?"indeterminate":t?"checked":"unchecked"}const BD=["value","checked","name","disabled","required"],[ID,RD]=zt("CheckboxRoot"),LD=o.defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=Tr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0}),{forwardRef:a,currentElement:l}=Le(),u=L1(l),c=o.computed(()=>{var f;return n.id&&l.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return RD({disabled:i,state:s}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps(f.$attrs,{id:f.id,ref:o.unref(a),role:"checkbox","as-child":n.asChild,as:f.as,type:f.as==="button"?"button":void 0,"aria-checked":o.unref(Mf)(o.unref(s))?"mixed":o.unref(s),"aria-required":n.required,"aria-label":f.$attrs["aria-label"]||c.value,"data-state":o.unref(Q6)(o.unref(s)),"data-disabled":o.unref(i)?"":void 0,disabled:o.unref(i),onKeydown:o.withKeys(o.withModifiers(()=>{},["prevent"]),["enter"]),onClick:p[0]||(p[0]=m=>s.value=o.unref(Mf)(o.unref(s))?!0:!o.unref(s))}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),o.unref(u)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:f.value,checked:!!o.unref(s),name:n.name,disabled:n.disabled,required:n.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,BD)):o.createCommentVNode("",!0)],64))}}),DD=o.defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=Le(),n=ID();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:r.forceMount||o.unref(Mf)(o.unref(n).state.value)||o.unref(n).state.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(e),"data-state":o.unref(Q6)(o.unref(n).state.value),"data-disabled":o.unref(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[N6,PD]=zt("PopperRoot"),Of=o.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=o.ref();return PD({anchor:e,onAnchorChange:n=>e.value=n}),(n,r)=>o.renderSlot(n.$slots,"default")}}),Qu=o.defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:r}=Le(),i=N6();return o.watchEffect(()=>{i.onAnchorChange(e.element??r.value)}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(n),as:s.as,"as-child":s.asChild},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["as","as-child"]))}});function VD(t){return t!==null}function FD(t){return{name:"transformOrigin",options:t,fn(e){var n,r,i;const{placement:s,rects:a,middlewareData:l}=e,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=u?0:t.arrowWidth,f=u?0:t.arrowHeight,[p,m]=q1(s),g={start:"0%",center:"50%",end:"100%"}[m],b=(((r=l.arrow)==null?void 0:r.x)??0)+c/2,v=(((i=l.arrow)==null?void 0:i.y)??0)+f/2;let y="",x="";return p==="bottom"?(y=u?g:`${b}px`,x=`${-f}px`):p==="top"?(y=u?g:`${b}px`,x=`${a.floating.height+f}px`):p==="right"?(y=`${-f}px`,x=u?g:`${v}px`):p==="left"&&(y=`${a.floating.width+f}px`,x=u?g:`${v}px`),{data:{x:y,y:x}}}}}function q1(t){const[e,n="center"]=t.split("-");return[e,n]}const ex={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[mce,$D]=zt("PopperContent"),Bf=o.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:o.mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["placed"],setup(t,{emit:e}){const n=t,r=e,i=N6(),{forwardRef:s,currentElement:a}=Le(),l=o.ref(),u=o.ref(),{width:c,height:f}=ZL(u),p=o.computed(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),m=o.computed(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),g=o.computed(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),b=o.computed(()=>({padding:m.value,boundary:g.value.filter(VD),altBoundary:g.value.length>0})),v=hL(()=>[rL({mainAxis:n.sideOffset+f.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),n.avoidCollisions&&oL({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?lL():void 0,...b.value}),!n.prioritizePosition&&n.avoidCollisions&&T6({...b.value}),iL({...b.value,apply:({elements:B,rects:$,availableWidth:H,availableHeight:X})=>{const{width:ee,height:z}=$.reference,L=B.floating.style;L.setProperty("--radix-popper-available-width",`${H}px`),L.setProperty("--radix-popper-available-height",`${X}px`),L.setProperty("--radix-popper-anchor-width",`${ee}px`),L.setProperty("--radix-popper-anchor-height",`${z}px`)}}),u.value&&dL({element:u.value,padding:n.arrowPadding}),FD({arrowWidth:c.value,arrowHeight:f.value}),n.hideWhenDetached&&sL({strategy:"referenceHidden",...b.value})]),{floatingStyles:y,placement:x,isPositioned:k,middlewareData:E}=fL(i.anchor,l,{strategy:"fixed",placement:p,whileElementsMounted:(...B)=>nL(...B,{animationFrame:n.updatePositionStrategy==="always"}),middleware:v}),C=o.computed(()=>q1(x.value)[0]),_=o.computed(()=>q1(x.value)[1]);o.watchPostEffect(()=>{k.value&&r("placed")});const T=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.centerOffset)!==0}),A=o.ref("");o.watchEffect(()=>{a.value&&(A.value=window.getComputedStyle(a.value).zIndex)});const V=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.x)??0}),O=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.y)??0});return $D({placedSide:C,onArrowChange:B=>u.value=B,arrowX:V,arrowY:O,shouldHideArrow:T}),(B,$)=>{var H,X,ee;return o.openBlock(),o.createElementBlock("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:o.normalizeStyle({...o.unref(y),transform:o.unref(k)?o.unref(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A.value,"--radix-popper-transform-origin":[(H=o.unref(E).transformOrigin)==null?void 0:H.x,(X=o.unref(E).transformOrigin)==null?void 0:X.y].join(" "),...((ee=o.unref(E).hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(s)},B.$attrs,{"as-child":n.asChild,as:B.as,"data-side":C.value,"data-align":_.value,style:{animation:o.unref(k)?void 0:"none"}}),{default:o.withCtx(()=>[o.renderSlot(B.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),tx=o.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return Le(),(e,n)=>(o.openBlock(),o.createBlock(o.unref(Ye),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),HD="data-radix-vue-collection-item",[K1,zD]=zt("CollectionProvider");function UD(t=HD){const e=o.ref(new Map),n=o.ref(),r=zD({collectionRef:n,itemMap:e,attrName:t}),{getItems:i}=rx(r),s=o.computed(()=>Array.from(r.itemMap.value.values())),a=o.computed(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:a}}const WD=o.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const n=K1(),{primitiveElement:r,currentElement:i}=U6();return o.watch(i,()=>{n.collectionRef.value=i.value}),()=>o.h(V1,{ref:r},e)}}),nx=o.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:n}){const r=K1(),{primitiveElement:i,currentElement:s}=U6();return o.watchEffect(a=>{if(s.value){const l=o.markRaw(s.value);r.itemMap.value.set(l,{ref:s.value,value:t.value}),a(()=>r.itemMap.value.delete(l))}}),()=>o.h(V1,{...n,[r.attrName]:"",ref:i},e)}});function rx(t){const e=t??K1();return{getItems:()=>{const n=e.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${e.attrName}]`));return Array.from(e.itemMap.value.values()).sort((i,s)=>r.indexOf(i.ref)-r.indexOf(s.ref))}}}function ox(t){const e=xf({nonce:o.ref()});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const ix=o.defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function jD(){const t=o.ref(!1);return o.onMounted(()=>{xl("keydown",()=>{t.value=!0},{capture:!0,passive:!0}),xl(["pointerdown","pointermove"],()=>{t.value=!1},{capture:!0,passive:!0})}),t}const qD=B6(jD),[If,KD]=zt(["MenuRoot","MenuSub"],"MenuContext"),[G1,GD]=zt("MenuRoot"),sx=o.defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i,dir:s}=o.toRefs(n),a=aa(s),l=Tr(n,"open",r),u=o.ref(),c=qD();return KD({open:l,onOpenChange:f=>{l.value=f},content:u,onContentChange:f=>{u.value=f}}),GD({onClose:()=>{l.value=!1},isUsingKeyboardRef:c,dir:a,modal:i}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3}))}}),XD="rovingFocusGroup.onEntryFocus",YD={bubbles:!1,cancelable:!0},JD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZD(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function QD(t,e,n){const r=ZD(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return JD[r]}function ax(t,e=!1){const n=Wn();for(const r of t)if(r===n||(r.focus({preventScroll:e}),Wn()!==n))return}function ND(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const[eP,tP]=zt("RovingFocusGroup"),lx=o.defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const r=t,i=n,{loop:s,orientation:a,dir:l}=o.toRefs(r),u=aa(l),c=Tr(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),f=o.ref(!1),p=o.ref(!1),m=o.ref(0),{getItems:g}=UD();function b(y){const x=!p.value;if(y.currentTarget&&y.target===y.currentTarget&&x&&!f.value){const k=new CustomEvent(XD,YD);if(y.currentTarget.dispatchEvent(k),i("entryFocus",k),!k.defaultPrevented){const E=g().map(A=>A.ref).filter(A=>A.dataset.disabled!==""),C=E.find(A=>A.getAttribute("data-active")==="true"),_=E.find(A=>A.id===c.value),T=[C,_,...E].filter(Boolean);ax(T,r.preventScrollOnEntryFocus)}}p.value=!1}function v(){setTimeout(()=>{p.value=!1},1)}return e({getItems:g}),tP({loop:s,dir:u,orientation:a,currentTabStopId:c,onItemFocus:y=>{c.value=y},onItemShiftTab:()=>{f.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(y,x)=>(o.openBlock(),o.createBlock(o.unref(WD),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{tabindex:f.value||m.value===0?-1:0,"data-orientation":o.unref(a),as:y.as,"as-child":y.asChild,dir:o.unref(u),style:{outline:"none"},onMousedown:x[0]||(x[0]=k=>p.value=!0),onMouseup:v,onFocus:b,onBlur:x[1]||(x[1]=k=>f.value=!1)},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),nP=o.defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=eP(),r=o.computed(()=>e.tabStopId||Kr()),i=o.computed(()=>n.currentTabStopId.value===r.value),{getItems:s}=rx();o.onMounted(()=>{e.focusable&&n.onFocusableItemAdd()}),o.onUnmounted(()=>{e.focusable&&n.onFocusableItemRemove()});function a(l){if(l.key==="Tab"&&l.shiftKey){n.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const u=QD(l,n.orientation.value,n.dir.value);if(u!==void 0){if(l.metaKey||l.ctrlKey||l.altKey||!e.allowShiftKey&&l.shiftKey)return;l.preventDefault();let c=[...s().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")c.reverse();else if(u==="prev"||u==="next"){u==="prev"&&c.reverse();const f=c.indexOf(l.currentTarget);c=n.loop.value?ND(c,f+1):c.slice(f+1)}o.nextTick(()=>ax(c))}}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{tabindex:i.value?0:-1,"data-orientation":o.unref(n).orientation.value,"data-active":l.active,"data-disabled":l.focusable?void 0:"",as:l.as,"as-child":l.asChild,onMousedown:u[0]||(u[0]=c=>{l.focusable?o.unref(n).onItemFocus(r.value):c.preventDefault()}),onFocus:u[1]||(u[1]=c=>o.unref(n).onItemFocus(r.value)),onKeydown:a},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[ux,rP]=zt("MenuContent"),cx=o.defineComponent({__name:"MenuContentImpl",props:o.mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...ex}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(t,{emit:e}){const n=t,r=e,i=If(),s=G1(),{trapFocus:a,disableOutsidePointerEvents:l,loop:u}=o.toRefs(n);R1(),Cf(l.value);const c=o.ref(""),f=o.ref(0),p=o.ref(0),m=o.ref(null),g=o.ref("right"),b=o.ref(0),v=o.ref(null),{createCollection:y}=Yu(),{forwardRef:x,currentElement:k}=Le(),E=y(k);o.watch(k,B=>{i.onContentChange(B)});const{handleTypeaheadSearch:C}=P1(E);o.onUnmounted(()=>{window.clearTimeout(f.value)});function _(B){var $,H;return g.value===(($=m.value)==null?void 0:$.side)&&wD(B,(H=m.value)==null?void 0:H.area)}async function T(B){var $;r("openAutoFocus",B),!B.defaultPrevented&&(B.preventDefault(),($=k.value)==null||$.focus({preventScroll:!0}))}function A(B){if(B.defaultPrevented)return;const $=B.target.closest("[data-radix-menu-content]")===B.currentTarget,H=B.ctrlKey||B.altKey||B.metaKey,X=B.key.length===1,ee=BL(B,Wn(),k.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(ee)return ee==null?void 0:ee.focus();if(B.code==="Space"||($&&(B.key==="Tab"&&B.preventDefault(),!H&&X&&C(B.key)),B.target!==k.value)||!vD.includes(B.key))return;B.preventDefault();const z=E.value;X6.includes(B.key)&&z.reverse(),U1(z)}function V(B){var $,H;(H=($=B==null?void 0:B.currentTarget)==null?void 0:$.contains)!=null&&H.call($,B.target)||(window.clearTimeout(f.value),c.value="")}function O(B){var $;if(!W1(B))return;const H=B.target,X=b.value!==B.clientX;if(($=B==null?void 0:B.currentTarget)!=null&&$.contains(H)&&X){const ee=B.clientX>b.value?"right":"left";g.value=ee,b.value=B.clientX}}return rP({onItemEnter:B=>!!_(B),onItemLeave:B=>{var $;_(B)||(($=k.value)==null||$.focus(),v.value=null)},onTriggerLeave:B=>!!_(B),searchRef:c,pointerGraceTimerRef:p,onPointerGraceIntentChange:B=>{m.value=B}}),(B,$)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",trapped:o.unref(a),onMountAutoFocus:T,onUnmountAutoFocus:$[7]||($[7]=H=>r("closeAutoFocus",H))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":o.unref(l),onEscapeKeyDown:$[2]||($[2]=H=>r("escapeKeyDown",H)),onPointerDownOutside:$[3]||($[3]=H=>r("pointerDownOutside",H)),onFocusOutside:$[4]||($[4]=H=>r("focusOutside",H)),onInteractOutside:$[5]||($[5]=H=>r("interactOutside",H)),onDismiss:$[6]||($[6]=H=>r("dismiss"))},{default:o.withCtx(()=>[o.createVNode(o.unref(lx),{"current-tab-stop-id":v.value,"onUpdate:currentTabStopId":$[0]||($[0]=H=>v.value=H),"as-child":"",orientation:"vertical",dir:o.unref(s).dir.value,loop:o.unref(u),onEntryFocus:$[1]||($[1]=H=>{r("entryFocus",H),o.unref(s).isUsingKeyboardRef.value||H.preventDefault()})},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),{ref:o.unref(x),role:"menu",as:B.as,"as-child":B.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":o.unref(Y6)(o.unref(i).open.value),dir:o.unref(s).dir.value,side:B.side,"side-offset":B.sideOffset,align:B.align,"align-offset":B.alignOffset,"avoid-collisions":B.avoidCollisions,"collision-boundary":B.collisionBoundary,"collision-padding":B.collisionPadding,"arrow-padding":B.arrowPadding,"prioritize-position":B.prioritizePosition,sticky:B.sticky,"hide-when-detached":B.hideWhenDetached,onKeydown:A,onBlur:V,onPointermove:O},{default:o.withCtx(()=>[o.renderSlot(B.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),oP=o.defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=ux(),{forwardRef:r}=Le(),i=o.ref(!1);async function s(l){if(!l.defaultPrevented&&W1(l)){if(e.disabled)n.onItemLeave(l);else if(!n.onItemEnter(l)){const u=l.currentTarget;u==null||u.focus({preventScroll:!0})}}}async function a(l){await o.nextTick(),!l.defaultPrevented&&W1(l)&&n.onItemLeave(l)}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nx),{value:{textValue:l.textValue}},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(r),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"data-radix-vue-collection-item":"","aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:s,onPointerleave:a,onFocus:u[0]||(u[0]=async c=>{await o.nextTick(),!(c.defaultPrevented||l.disabled)&&(i.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await o.nextTick(),!c.defaultPrevented&&(i.value=!1)})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),X1=o.defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Le(),a=G1(),l=ux(),u=o.ref(!1);async function c(){const f=s.value;if(!n.disabled&&f){const p=new CustomEvent(gD,{bubbles:!0,cancelable:!0});r("select",p),await o.nextTick(),p.defaultPrevented?u.value=!1:a.onClose()}}return(f,p)=>(o.openBlock(),o.createBlock(oP,o.mergeProps(n,{ref:o.unref(i),onClick:c,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async m=>{var g;await o.nextTick(),!m.defaultPrevented&&(u.value||(g=m.currentTarget)==null||g.click())}),onKeydown:p[2]||(p[2]=async m=>{const g=o.unref(l).searchRef.value!=="";f.disabled||g&&m.key===" "||o.unref(z1).includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16))}}),[iP,sP]=zt(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),aP=o.defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=iP({checked:o.ref(!1)});return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:n.forceMount||o.unref(Af)(o.unref(e).checked.value)||o.unref(e).checked.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{as:n.as,"as-child":n.asChild,"data-state":o.unref(J6)(o.unref(e).checked.value)},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),lP=o.defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=Tr(n,"checked",r);return sP({checked:i}),(s,a)=>(o.openBlock(),o.createBlock(X1,o.mergeProps({role:"menuitemcheckbox"},n,{"aria-checked":o.unref(Af)(o.unref(i))?"mixed":o.unref(i),"data-state":o.unref(J6)(o.unref(i)),onSelect:a[0]||(a[0]=async l=>{r("select",l),o.unref(Af)(o.unref(i))?i.value=!0:i.value=!o.unref(i)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{checked:o.unref(i)})]),_:3},16,["aria-checked","data-state"]))}}),uP=o.defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Pt(n,r),s=If(),{forwardRef:a,currentElement:l}=Le();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(i),{ref:o.unref(a),"trap-focus":o.unref(s).open.value,"disable-outside-pointer-events":o.unref(s).open.value,"disable-outside-scroll":!0,onDismiss:c[0]||(c[0]=f=>o.unref(s).onOpenChange(!1)),onFocusOutside:c[1]||(c[1]=o.withModifiers(f=>r("focusOutside",f),["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),cP=o.defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e),r=If();return(i,s)=>(o.openBlock(),o.createBlock(cx,o.mergeProps(o.unref(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:s[0]||(s[0]=a=>o.unref(r).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),dx=o.defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e),r=If(),i=G1();return(s,a)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:s.forceMount||o.unref(r).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(uP,o.normalizeProps(o.mergeProps({key:0},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(cP,o.normalizeProps(o.mergeProps({key:1},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),fx=o.defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dP=o.defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{role:"separator","aria-orientation":"horizontal"}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[px,fP]=zt("ContextMenuRoot"),pP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{dir:i,modal:s}=o.toRefs(n);Le();const a=aa(i),l=o.ref(!1);return fP({open:l,onOpenChange:u=>{l.value=u},dir:a,modal:s}),o.watch(l,u=>{r("update:open",u)}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:l.value,"onUpdate:open":c[0]||(c[0]=f=>l.value=f),dir:o.unref(a),modal:o.unref(s)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function hx(t){return t.pointerType!=="mouse"}const hP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{disabled:n}=o.toRefs(e),{forwardRef:r}=Le(),i=px(),s=o.ref({x:0,y:0}),a=o.computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:s.value.x,right:s.value.x,top:s.value.y,bottom:s.value.y,...s.value})})),l=o.ref(0);function u(){window.clearTimeout(l.value)}function c(g){s.value={x:g.clientX,y:g.clientY},i.onOpenChange(!0)}async function f(g){n.value||(await o.nextTick(),g.defaultPrevented||(u(),c(g),g.preventDefault()))}async function p(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&(u(),l.value=window.setTimeout(()=>c(g),700)))}async function m(g){n.value||(await o.nextTick(),hx(g)&&!g.defaultPrevented&&u())}return(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(ix),{as:"template",element:a.value},null,8,["element"]),o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(r),as:g.as,"as-child":g.asChild,"data-state":o.unref(i).open.value?"open":"closed","data-disabled":o.unref(n)?"":void 0,style:{WebkitTouchCallout:"none"}},g.$attrs,{onContextmenu:f,onPointerdown:p,onPointermove:m,onPointercancel:m,onPointerup:m}),{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),mP=o.defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gP=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e);Le();const r=px(),i=o.ref(!1);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:a[0]||(a[0]=l=>{!l.defaultPrevented&&i.value&&l.preventDefault(),i.value=!1}),onInteractOutside:a[1]||(a[1]=l=>{!l.defaultPrevented&&!o.unref(r).modal.value&&(i.value=!0)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),bP=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),[mx,vP]=zt("DropdownMenuRoot"),yP=o.defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=o.ref(),{modal:a,dir:l}=o.toRefs(n),u=aa(l);return vP({open:i,onOpenChange:c=>{i.value=c},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(sx),{open:o.unref(i),"onUpdate:open":f[0]||(f[0]=p=>o.isRef(i)?i.value=p:null),dir:o.unref(u),modal:o.unref(a)},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{open:o.unref(i)})]),_:3},8,["open","dir","modal"]))}}),wP=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=mx(),{forwardRef:r,currentElement:i}=Le();return o.onMounted(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=Kr(void 0,"radix-vue-dropdown-menu-trigger")),(s,a)=>(o.openBlock(),o.createBlock(o.unref(ix),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{id:o.unref(n).triggerId,ref:o.unref(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":o.unref(n).open.value?"open":"closed",onClick:a[0]||(a[0]=async l=>{var u;!s.disabled&&l.button===0&&l.ctrlKey===!1&&((u=o.unref(n))==null||u.onOpenToggle(),await o.nextTick(),o.unref(n).open.value&&l.preventDefault())}),onKeydown:a[1]||(a[1]=o.withKeys(l=>{s.disabled||(["Enter"," "].includes(l.key)&&o.unref(n).onOpenToggle(),l.key==="ArrowDown"&&o.unref(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())},["enter","space","arrow-down"]))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),xP=o.defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(fx),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),CP=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e);Le();const r=mx(),i=o.ref(!1);function s(a){a.defaultPrevented||(i.value||setTimeout(()=>{var l;(l=r.triggerElement.value)==null||l.focus()},0),i.value=!1,a.preventDefault())}return r.contentId||(r.contentId=Kr(void 0,"radix-vue-dropdown-menu-content")),(a,l)=>{var u;return o.openBlock(),o.createBlock(o.unref(dx),o.mergeProps(o.unref(n),{id:o.unref(r).contentId,"aria-labelledby":(u=o.unref(r))==null?void 0:u.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:s,onInteractOutside:l[0]||(l[0]=c=>{var f;if(c.defaultPrevented)return;const p=c.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,g=p.button===2||m;(!o.unref(r).modal.value||g)&&(i.value=!0),(f=o.unref(r).triggerElement.value)!=null&&f.contains(c.target)&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),kP=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),EP=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(dP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),SP=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(lP),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),_P=o.defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(aP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),TP=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{onMousedown:r[0]||(r[0]=i=>{!i.defaultPrevented&&i.detail>1&&i.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[El,AP]=zt("PopoverRoot"),MP=o.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i}=o.toRefs(n),s=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(!1);return AP({contentId:"",modal:i,open:s,onOpenChange:u=>{s.value=u},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:l}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default",{open:o.unref(s)})]),_:3}))}}),OP=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=El(),{forwardRef:r,currentElement:i}=Le();return o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(n).hasCustomAnchor.value?o.unref(Ye):o.unref(Qu)),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).contentId,"data-state":o.unref(n).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:o.unref(n).onOpenToggle},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),BP=o.defineComponent({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gx=o.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=er(n),{forwardRef:s}=Le(),a=El();return R1(),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=c=>r("pointerDownOutside",c)),onInteractOutside:u[1]||(u[1]=c=>r("interactOutside",c)),onEscapeKeyDown:u[2]||(u[2]=c=>r("escapeKeyDown",c)),onFocusOutside:u[3]||(u[3]=c=>r("focusOutside",c)),onDismiss:u[4]||(u[4]=c=>o.unref(a).onOpenChange(!1))},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps(o.unref(i),{id:o.unref(a).contentId,ref:o.unref(s),"data-state":o.unref(a).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","data-state"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),IP=o.defineComponent({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=o.ref(!1);Cf(!0);const a=Pt(n,r),{forwardRef:l,currentElement:u}=Le();return Sf(u),(c,f)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(a),{ref:o.unref(l),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:f[0]||(f[0]=o.withModifiers(p=>{var m;r("closeAutoFocus",p),s.value||(m=o.unref(i).triggerElement.value)==null||m.focus()},["prevent"])),onPointerDownOutside:f[1]||(f[1]=p=>{r("pointerDownOutside",p);const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,b=m.button===2||g;s.value=b}),onFocusOutside:f[2]||(f[2]=o.withModifiers(()=>{},["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),RP=o.defineComponent({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=o.ref(!1),a=o.ref(!1),l=Pt(n,r);return(u,c)=>(o.openBlock(),o.createBlock(gx,o.mergeProps(o.unref(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;r("closeAutoFocus",f),f.defaultPrevented||(s.value||(p=o.unref(i).triggerElement.value)==null||p.focus(),f.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=async f=>{var p;r("interactOutside",f),f.defaultPrevented||(s.value=!0,f.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const m=f.target;(p=o.unref(i).triggerElement.value)!=null&&p.contains(m)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a.value&&f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16))}}),LP=o.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=Pt(n,r),{forwardRef:a}=Le();return i.contentId||(i.contentId=Kr(void 0,"radix-vue-popover-content")),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(IP,o.mergeProps({key:0},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(RP,o.mergeProps({key:1},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),DP=o.defineComponent({__name:"PopoverAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;Le();const n=El();return o.onBeforeMount(()=>{n.hasCustomAnchor.value=!0}),o.onUnmounted(()=>{n.hasCustomAnchor.value=!1}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),[Xr,PP]=zt("ScrollAreaRoot"),VP=o.defineComponent({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,r=o.ref(0),i=o.ref(0),s=o.ref(),a=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(!1),f=o.ref(!1),{type:p,dir:m,scrollHideDelay:g}=o.toRefs(n),b=aa(m);function v(){var E;(E=s.value)==null||E.scrollTo({top:0})}function y(){var E;(E=s.value)==null||E.scrollTo({top:0,left:0})}e({viewport:s,scrollTop:v,scrollTopLeft:y});const{forwardRef:x,currentElement:k}=Le();return PP({type:p,dir:b,scrollHideDelay:g,scrollArea:k,viewport:s,onViewportChange:E=>{s.value=E||void 0},content:a,onContentChange:E=>{a.value=E},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:f,onScrollbarXChange:E=>{l.value=E||void 0},onScrollbarYChange:E=>{u.value=E||void 0},onScrollbarXEnabledChange:E=>{c.value=E},onScrollbarYEnabledChange:E=>{f.value=E},onCornerWidthChange:E=>{r.value=E},onCornerHeightChange:E=>{i.value=E}}),(E,C)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(x),"as-child":n.asChild,as:E.as,dir:o.unref(b),style:o.normalizeStyle({position:"relative","--radix-scroll-area-corner-width":`${r.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),FP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,{nonce:r}=o.toRefs(n),i=ox(r),s=Xr(),a=o.ref();o.onMounted(()=>{s.onViewportChange(a.value),s.onContentChange(u.value)}),e({viewportElement:a});const{forwardRef:l,currentElement:u}=Le();return(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",o.mergeProps({ref_key:"viewportElement",ref:a,"data-radix-scroll-area-viewport":"",style:{overflowX:o.unref(s).scrollbarXEnabled.value?"scroll":"hidden",overflowY:o.unref(s).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[o.createVNode(o.unref(Ye),{ref:o.unref(l),style:o.normalizeStyle({minWidth:o.unref(s).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),o.createVNode(o.unref(Ye),{as:"style",nonce:o.unref(i)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1},8,["nonce"])],64))}});function bx(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Rf(t){const e=vx(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function vx(t,e){const n=t/e;return Number.isNaN(n)?0:n}function $P(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}function yx(t,e,n="ltr"){const r=Rf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,a=e.content-e.viewport,l=s-r,u=n==="ltr"?[0,a]:[a*-1,0],c=A1(t,u[0],u[1]);return bx([0,a],[0,l])(c)}function Lf(t){return t?Number.parseInt(t,10):0}function HP(t,e,n,r="ltr"){const i=Rf(n),s=i/2,a=e||s,l=i-a,u=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return bx([u,c],p)(t)}function wx(t,e){return t>0&&t<e}const xx=o.defineComponent({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(t,{emit:e}){const n=t,r=e,i=Xr(),s=Df(),a=Pf(),{forwardRef:l,currentElement:u}=Le(),c=o.ref(""),f=o.ref();function p(x){var k,E;if(f.value){const C=x.clientX-((k=f.value)==null?void 0:k.left),_=x.clientY-((E=f.value)==null?void 0:E.top);r("onDragScroll",{x:C,y:_})}}function m(x){x.button===0&&(x.target.setPointerCapture(x.pointerId),f.value=u.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",i.viewport&&(i.viewport.value.style.scrollBehavior="auto"),p(x))}function g(x){p(x)}function b(x){const k=x.target;k.hasPointerCapture(x.pointerId)&&k.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=c.value,i.viewport&&(i.viewport.value.style.scrollBehavior=""),f.value=void 0}function v(x){var k;const E=x.target,C=(k=u.value)==null?void 0:k.contains(E),_=s.sizes.value.content-s.sizes.value.viewport;C&&s.handleWheelScroll(x,_)}o.onMounted(()=>{document.addEventListener("wheel",v,{passive:!1})}),o.onUnmounted(()=>{document.removeEventListener("wheel",v)});function y(){var x,k,E,C,_;u.value&&(n.isHorizontal?s.handleSizeChange({content:((x=i.viewport.value)==null?void 0:x.scrollWidth)??0,viewport:((k=i.viewport.value)==null?void 0:k.offsetWidth)??0,scrollbar:{size:u.value.clientWidth??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}):s.handleSizeChange({content:((E=i.viewport.value)==null?void 0:E.scrollHeight)??0,viewport:((C=i.viewport.value)==null?void 0:C.offsetHeight)??0,scrollbar:{size:((_=u.value)==null?void 0:_.clientHeight)??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}))}return Cl(u,y),Cl(i.content,y),(x,k)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(l),style:{position:"absolute"},"data-scrollbarimpl":"",as:o.unref(a).as.value,"as-child":o.unref(a).asChild.value,onPointerdown:m,onPointermove:g,onPointerup:b},{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},8,["as","as-child"]))}}),zP=o.defineComponent({__name:"ScrollAreaScrollbarX",setup(t){const e=Xr(),n=Df(),{forwardRef:r,currentElement:i}=Le();o.onMounted(()=>{i.value&&e.onScrollbarXChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!0,"data-orientation":"horizontal",style:o.normalizeStyle({bottom:0,left:o.unref(e).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.unref(e).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.x))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),UP=o.defineComponent({__name:"ScrollAreaScrollbarY",setup(t){const e=Xr(),n=Df(),{forwardRef:r,currentElement:i}=Le();o.onMounted(()=>{i.value&&e.onScrollbarYChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(xx,{ref:o.unref(r),"is-horizontal":!1,"data-orientation":"vertical",style:o.normalizeStyle({top:0,right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.y))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),[Df,WP]=zt("ScrollAreaScrollbarVisible"),Y1=o.defineComponent({__name:"ScrollAreaScrollbarVisible",setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),i=o.ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s=o.computed(()=>{const x=vx(i.value.viewport,i.value.content);return x>0&&x<1}),a=o.ref(),l=o.ref(0);function u(x,k){if(g.value){const E=e.viewport.value.scrollLeft+x.deltaY;e.viewport.value.scrollLeft=E,wx(E,k)&&x.preventDefault()}else{const E=e.viewport.value.scrollTop+x.deltaY;e.viewport.value.scrollTop=E,wx(E,k)&&x.preventDefault()}}function c(x,k){g.value?l.value=k.x:l.value=k.y}function f(x){l.value=0}function p(x){i.value=x}function m(x,k){return HP(x,l.value,i.value,k)}const g=o.computed(()=>n.isHorizontal.value);function b(x){g.value?e.viewport.value.scrollLeft=m(x,e.dir.value):e.viewport.value.scrollTop=m(x)}function v(){if(g.value){if(e.viewport.value&&a.value){const x=e.viewport.value.scrollLeft,k=yx(x,i.value,e.dir.value);a.value.style.transform=`translate3d(${k}px, 0, 0)`}}else if(e.viewport.value&&a.value){const x=e.viewport.value.scrollTop,k=yx(x,i.value);a.value.style.transform=`translate3d(0, ${k}px, 0)`}}function y(x){a.value=x}return WP({sizes:i,hasThumb:s,handleWheelScroll:u,handleThumbDown:c,handleThumbUp:f,handleSizeChange:p,onThumbPositionChange:v,onThumbChange:y,onDragScroll:b}),(x,k)=>g.value?(o.openBlock(),o.createBlock(zP,o.mergeProps({key:0},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(UP,o.mergeProps({key:1},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16))}}),Cx=o.defineComponent({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),i=o.ref(!1),s=L6(()=>{if(e.viewport.value){const a=e.viewport.value.offsetWidth<e.viewport.value.scrollWidth,l=e.viewport.value.offsetHeight<e.viewport.value.scrollHeight;i.value=n.isHorizontal.value?a:l}},10);return o.onMounted(()=>s()),Cl(e.viewport,s),Cl(e.content,s),(a,l)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:a.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(a.$attrs,{ref:o.unref(r),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),jP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),{forwardRef:n}=Le();let r;const i=o.ref(!1);function s(){window.clearTimeout(r),i.value=!0}function a(){r=window.setTimeout(()=>{i.value=!1},e.scrollHideDelay.value)}return o.onMounted(()=>{const l=e.scrollArea.value;l&&(l.addEventListener("pointerenter",s),l.addEventListener("pointerleave",a))}),o.onUnmounted(()=>{const l=e.scrollArea.value;l&&(window.clearTimeout(r),l.removeEventListener("pointerenter",s),l.removeEventListener("pointerleave",a))}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Cx,o.mergeProps(l.$attrs,{ref:o.unref(n),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),qP=o.defineComponent({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),{state:i,dispatch:s}=z6("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});o.watchEffect(l=>{if(i.value==="idle"){const u=window.setTimeout(()=>s("HIDE"),e.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=L6(()=>s("SCROLL_END"),100);return o.watchEffect(l=>{const u=e.viewport.value,c=n.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let f=u[c];const p=()=>{const m=u[c];f!==m&&(s("SCROLL"),a()),f=m};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i)!=="hidden"},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(l.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Pf,KP]=zt("ScrollAreaScrollbar"),GP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(t){const e=t,{forwardRef:n}=Le(),r=Xr(),i=o.computed(()=>e.orientation==="horizontal");o.watch(i,()=>{i.value?r.onScrollbarXEnabledChange(!0):r.onScrollbarYEnabledChange(!0)},{immediate:!0}),o.onUnmounted(()=>{r.onScrollbarXEnabledChange(!1),r.onScrollbarYEnabledChange(!1)});const{orientation:s,forceMount:a,asChild:l,as:u}=o.toRefs(e);return KP({orientation:s,forceMount:a,isHorizontal:i,as:u,asChild:l}),(c,f)=>o.unref(r).type.value==="hover"?(o.openBlock(),o.createBlock(jP,o.mergeProps({key:0},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="scroll"?(o.openBlock(),o.createBlock(qP,o.mergeProps({key:1},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="auto"?(o.openBlock(),o.createBlock(Cx,o.mergeProps({key:2},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="always"?(o.openBlock(),o.createBlock(Y1,o.mergeProps({key:3},c.$attrs,{ref:o.unref(n),"data-state":"visible"}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),XP=o.defineComponent({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Xr(),r=Df();function i(m){const g=m.target.getBoundingClientRect(),b=m.clientX-g.left,v=m.clientY-g.top;r.handleThumbDown(m,{x:b,y:v})}function s(m){r.handleThumbUp(m)}const{forwardRef:a,currentElement:l}=Le(),u=o.ref(),c=o.computed(()=>n.viewport.value);function f(){if(!u.value){const m=$P(c.value,r.onThumbPositionChange);u.value=m,r.onThumbPositionChange()}}const p=o.computed(()=>r.sizes.value);return SL(p,()=>{r.onThumbChange(l.value),c.value&&(r.onThumbPositionChange(),c.value.addEventListener("scroll",f))}),o.onUnmounted(()=>{var m;c.value.removeEventListener("scroll",f),(m=n.viewport.value)==null||m.removeEventListener("scroll",f)}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(a),"data-state":o.unref(r).hasThumb?"visible":"hidden",style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"},"as-child":e.asChild,as:m.as,onPointerdown:i,onPointerup:s},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),YP=o.defineComponent({__name:"ScrollAreaCornerImpl",setup(t){const e=Xr(),n=o.ref(0),r=o.ref(0),i=o.computed(()=>!!n.value&&!!r.value);function s(){var l;const u=((l=e.scrollbarX.value)==null?void 0:l.offsetHeight)||0;e.onCornerHeightChange(u),r.value=u}function a(){var l;const u=((l=e.scrollbarY.value)==null?void 0:l.offsetWidth)||0;e.onCornerWidthChange(u),n.value=u}return Cl(e.scrollbarX.value,s),Cl(e.scrollbarY.value,a),o.watch(()=>e.scrollbarX.value,s),o.watch(()=>e.scrollbarY.value,a),(l,u)=>{var c;return i.value?(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:0}},(c=l.$parent)==null?void 0:c.$props),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["style"])):o.createCommentVNode("",!0)}}}),JP=o.defineComponent({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Le(),r=Xr(),i=o.computed(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),s=o.computed(()=>r.type.value!=="scroll"&&i.value);return(a,l)=>s.value?(o.openBlock(),o.createBlock(YP,o.mergeProps({key:0},e,{ref:o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),ZP=["default-value"],QP=o.defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,{value:n}=o.toRefs(e),r=o.ref();return(i,s)=>(o.openBlock(),o.createBlock(o.unref(tx),{"as-child":""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",o.mergeProps({ref_key:"selectElement",ref:r},e,{"onUpdate:modelValue":s[0]||(s[0]=a=>o.isRef(n)?n.value=a:null),"default-value":o.unref(n)}),[o.renderSlot(i.$slots,"default")],16,ZP),[[o.vModelSelect,o.unref(n)]])]),_:3}))}}),NP={key:0,value:""},[ua,kx]=zt("SelectRoot"),[eV,tV]=zt("SelectRoot"),nV=o.defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,r=e,i=Tr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),s=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(),u=o.ref({x:0,y:0}),c=o.ref(!1),{required:f,disabled:p,dir:m}=o.toRefs(n),g=aa(m);kx({triggerElement:a,onTriggerChange:x=>{a.value=x},valueElement:l,onValueElementChange:x=>{l.value=x},valueElementHasChildren:c,onValueElementHasChildrenChange:x=>{c.value=x},contentId:"",modelValue:i,onValueChange:x=>{i.value=x},open:s,required:f,onOpenChange:x=>{s.value=x},dir:g,triggerPointerDownPosRef:u,disabled:p});const b=L1(a),v=o.ref(new Set),y=o.computed(()=>Array.from(v.value).map(x=>{var k;return(k=x.props)==null?void 0:k.value}).join(";"));return tV({onNativeOptionAdd:x=>{v.value.add(x)},onNativeOptionRemove:x=>{v.value.delete(x)}}),(x,k)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default",{modelValue:o.unref(i),open:o.unref(s)}),o.unref(b)?(o.openBlock(),o.createBlock(QP,o.mergeProps({key:y.value},x.$attrs,{"aria-hidden":"true",tabindex:"-1",required:o.unref(f),name:x.name,autocomplete:x.autocomplete,disabled:o.unref(p),value:o.unref(i),onChange:k[0]||(k[0]=E=>i.value=E.target.value)}),{default:o.withCtx(()=>[o.unref(i)===void 0?(o.openBlock(),o.createElementBlock("option",NP)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Array.from(v.value),E=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(E),o.mergeProps({ref_for:!0},E.props,{key:E.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):o.createCommentVNode("",!0)]),_:3}))}}),rV=[" ","Enter","ArrowUp","ArrowDown"],oV=[" ","Enter"],bo=10;function Ex(t){return t===""||pL(t)}const iV=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=ua(),r=o.computed(()=>{var g;return((g=n.disabled)==null?void 0:g.value)||e.disabled}),{forwardRef:i,currentElement:s}=Le();n.contentId||(n.contentId=Kr(void 0,"radix-vue-select-content")),o.onMounted(()=>{n.triggerElement=s});const{injectCollection:a}=Yu(),l=a(),{search:u,handleTypeaheadSearch:c,resetTypeahead:f}=P1(l);function p(){r.value||(n.onOpenChange(!0),f())}function m(g){p(),n.triggerPointerDownPosRef.value={x:Math.round(g.pageX),y:Math.round(g.pageY)}}return(g,b)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>{var v,y,x,k;return[o.createVNode(o.unref(Ye),{ref:o.unref(i),role:"combobox",type:g.as==="button"?"button":void 0,"aria-controls":o.unref(n).contentId,"aria-expanded":o.unref(n).open.value||!1,"aria-required":(v=o.unref(n).required)==null?void 0:v.value,"aria-autocomplete":"none",disabled:r.value,dir:(y=o.unref(n))==null?void 0:y.dir.value,"data-state":(x=o.unref(n))!=null&&x.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":o.unref(Ex)((k=o.unref(n).modelValue)==null?void 0:k.value)?"":void 0,"as-child":g.asChild,as:g.as,onClick:b[0]||(b[0]=E=>{var C;(C=E==null?void 0:E.currentTarget)==null||C.focus()}),onPointerdown:b[1]||(b[1]=E=>{if(E.pointerType==="touch")return E.preventDefault();const C=E.target;C.hasPointerCapture(E.pointerId)&&C.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&(m(E),E.preventDefault())}),onPointerup:b[2]||(b[2]=o.withModifiers(E=>{E.pointerType==="touch"&&m(E)},["prevent"])),onKeydown:b[3]||(b[3]=E=>{const C=o.unref(u)!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&C&&E.key===" "||(o.unref(c)(E.key),o.unref(rV).includes(E.key)&&(p(),E.preventDefault()))})},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),sV=o.defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[J1,aV]=zt("SelectItemAlignedPosition"),lV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,r=e,{injectCollection:i}=Yu(),s=ua(),a=ca(),l=i(),u=o.ref(!1),c=o.ref(!0),f=o.ref(),{forwardRef:p,currentElement:m}=Le(),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=a;function x(){if(s.triggerElement.value&&s.valueElement.value&&f.value&&m.value&&g!=null&&g.value&&b!=null&&b.value&&v!=null&&v.value){const C=s.triggerElement.value.getBoundingClientRect(),_=m.value.getBoundingClientRect(),T=s.valueElement.value.getBoundingClientRect(),A=v.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const J=A.left-_.left,te=T.left-J,ne=C.left-te,se=C.width+ne,ce=Math.max(se,_.width),_e=window.innerWidth-bo,Te=A1(te,bo,Math.max(bo,_e-ce));f.value.style.minWidth=`${se}px`,f.value.style.left=`${Te}px`}else{const J=_.right-A.right,te=window.innerWidth-T.right-J,ne=window.innerWidth-C.right-te,se=C.width+ne,ce=Math.max(se,_.width),_e=window.innerWidth-bo,Te=A1(te,bo,Math.max(bo,_e-ce));f.value.style.minWidth=`${se}px`,f.value.style.right=`${Te}px`}const V=l.value,O=window.innerHeight-bo*2,B=g.value.scrollHeight,$=window.getComputedStyle(m.value),H=Number.parseInt($.borderTopWidth,10),X=Number.parseInt($.paddingTop,10),ee=Number.parseInt($.borderBottomWidth,10),z=Number.parseInt($.paddingBottom,10),L=H+X+B+z+ee,D=Math.min(b.value.offsetHeight*5,L),F=window.getComputedStyle(g.value),R=Number.parseInt(F.paddingTop,10),K=Number.parseInt(F.paddingBottom,10),Y=C.top+C.height/2-bo,ie=O-Y,fe=b.value.offsetHeight/2,ke=b.value.offsetTop+fe,re=H+X+ke,me=L-re;if(re<=Y){const J=b.value===V[V.length-1];f.value.style.bottom="0px";const te=m.value.clientHeight-g.value.offsetTop-g.value.offsetHeight,ne=Math.max(ie,fe+(J?K:0)+te+ee),se=re+ne;f.value.style.height=`${se}px`}else{const J=b.value===V[0];f.value.style.top="0px";const te=Math.max(Y,H+g.value.offsetTop+(J?R:0)+fe)+me;f.value.style.height=`${te}px`,g.value.scrollTop=re-Y+g.value.offsetTop}f.value.style.margin=`${bo}px 0`,f.value.style.minHeight=`${D}px`,f.value.style.maxHeight=`${O}px`,r("placed"),requestAnimationFrame(()=>u.value=!0)}}const k=o.ref("");o.onMounted(async()=>{await o.nextTick(),x(),m.value&&(k.value=window.getComputedStyle(m.value).zIndex)});function E(C){C&&c.value===!0&&(x(),y==null||y(),c.value=!1)}return aV({contentWrapper:f,shouldExpandOnScrollRef:u,onScrollButtonChange:E}),(C,_)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentWrapperElement",ref:f,style:o.normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:k.value})},[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:o.withCtx(()=>[o.renderSlot(C.$slots,"default")]),_:3},16)],4))}}),uV=o.defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:bo},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=er(t);return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Bf),o.mergeProps(o.unref(e),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),Sl={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ca,cV]=zt("SelectContent"),dV=o.defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=ua();R1(),Cf(n.bodyLock);const{createCollection:s}=Yu(),a=o.ref();Sf(a);const l=s(a),{search:u,handleTypeaheadSearch:c}=P1(l),f=o.ref(),p=o.ref(),m=o.ref(),g=o.ref(!1),b=o.ref(!1);function v(){p.value&&a.value&&U1([p.value,a.value])}o.watch(g,()=>{v()});const{onOpenChange:y,triggerPointerDownPosRef:x}=i;o.watchEffect(_=>{if(!a.value)return;let T={x:0,y:0};const A=O=>{var B,$;T={x:Math.abs(Math.round(O.pageX)-(((B=x.value)==null?void 0:B.x)??0)),y:Math.abs(Math.round(O.pageY)-((($=x.value)==null?void 0:$.y)??0))}},V=O=>{var B;O.pointerType!=="touch"&&(T.x<=10&&T.y<=10?O.preventDefault():(B=a.value)!=null&&B.contains(O.target)||y(!1),document.removeEventListener("pointermove",A),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",V,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",V,{capture:!0})})});function k(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&c(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let A=l.value;if(["ArrowUp","End"].includes(_.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const V=_.target,O=A.indexOf(V);A=A.slice(O+1)}setTimeout(()=>U1(A)),_.preventDefault()}}const E=o.computed(()=>n.position==="popper"?n:{}),C=er(E.value);return cV({content:a,viewport:f,onViewportChange:_=>{f.value=_},itemRefCallback:(_,T,A)=>{var V,O;const B=!b.value&&!A;(((V=i.modelValue)==null?void 0:V.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||B)&&(p.value=_,B&&(b.value=!0))},selectedItem:p,selectedItemText:m,onItemLeave:()=>{var _;(_=a.value)==null||_.focus()},itemTextRefCallback:(_,T,A)=>{var V,O;const B=!b.value&&!A;(((V=i.modelValue)==null?void 0:V.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||B)&&(m.value=_)},focusSelectedItem:v,position:n.position,isPositioned:g,searchRef:u}),(_,T)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=o.withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=A=>{var V;r("closeAutoFocus",A),!A.defaultPrevented&&((V=o.unref(i).triggerElement.value)==null||V.focus({preventScroll:!0}),A.preventDefault())})},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:T[2]||(T[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=A=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=A=>r("escapeKeyDown",A)),onPointerDownOutside:T[5]||(T[5]=A=>r("pointerDownOutside",A))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.position==="popper"?uV:lV),o.mergeProps({..._.$attrs,...o.unref(C)},{id:o.unref(i).contentId,ref:A=>{a.value=o.unref(go)(A)},role:"listbox","data-state":o.unref(i).open.value?"open":"closed",dir:o.unref(i).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=o.withModifiers(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=A=>g.value=!0),onKeydown:k}),{default:o.withCtx(()=>[o.renderSlot(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),fV=o.defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return kx(t.context),(e,n)=>o.renderSlot(e.$slots,"default")}}),pV={key:1},hV=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Pt(n,e),i=ua(),s=o.ref();o.onMounted(()=>{s.value=new DocumentFragment});const a=o.ref(),l=o.computed(()=>n.forceMount||i.open.value);return(u,c)=>{var f;return l.value?(o.openBlock(),o.createBlock(o.unref(Gr),{key:0,ref_key:"presenceRef",ref:a,present:!0},{default:o.withCtx(()=>[o.createVNode(dV,o.normalizeProps(o.guardReactiveProps({...o.unref(r),...u.$attrs})),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16)]),_:3},512)):!((f=a.value)!=null&&f.present)&&s.value?(o.openBlock(),o.createElementBlock("div",pV,[(o.openBlock(),o.createBlock(o.Teleport,{to:s.value},[o.createVNode(fV,{context:o.unref(i)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):o.createCommentVNode("",!0)}}}),mV=o.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[Sx,gV]=zt("SelectItem"),bV=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{disabled:n}=o.toRefs(e),r=ua(),i=ca(Sl),{forwardRef:s,currentElement:a}=Le(),l=o.computed(()=>{var v;return((v=r.modelValue)==null?void 0:v.value)===e.value}),u=o.ref(!1),c=o.ref(e.textValue??""),f=Kr(void 0,"radix-vue-select-item-text");async function p(v){await o.nextTick(),!(v!=null&&v.defaultPrevented)&&(n.value||(r.onValueChange(e.value),r.onOpenChange(!1)))}async function m(v){var y;await o.nextTick(),!v.defaultPrevented&&(n.value?(y=i.onItemLeave)==null||y.call(i):v.currentTarget.focus({preventScroll:!0}))}async function g(v){var y;await o.nextTick(),!v.defaultPrevented&&v.currentTarget===Wn()&&((y=i.onItemLeave)==null||y.call(i))}async function b(v){var y;await o.nextTick(),!(v.defaultPrevented||((y=i.searchRef)==null?void 0:y.value)!==""&&v.key===" ")&&(oV.includes(v.key)&&p(),v.key===" "&&v.preventDefault())}if(e.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.onMounted(()=>{a.value&&i.itemRefCallback(a.value,e.value,e.disabled)}),gV({value:e.value,disabled:n,textId:f,isSelected:l,onItemTextChange:v=>{c.value=((c.value||(v==null?void 0:v.textContent))??"").trim()}}),(v,y)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(s),role:"option","data-radix-vue-collection-item":"","aria-labelledby":o.unref(f),"data-highlighted":u.value?"":void 0,"aria-selected":l.value,"data-state":l.value?"checked":"unchecked","aria-disabled":o.unref(n)||void 0,"data-disabled":o.unref(n)?"":void 0,tabindex:o.unref(n)?void 0:-1,as:v.as,"as-child":v.asChild,onFocus:y[0]||(y[0]=x=>u.value=!0),onBlur:y[1]||(y[1]=x=>u.value=!1),onPointerup:p,onPointerdown:y[2]||(y[2]=x=>{x.currentTarget.focus({preventScroll:!0})}),onTouchend:y[3]||(y[3]=o.withModifiers(()=>{},["prevent","stop"])),onPointermove:m,onPointerleave:g,onKeydown:b},{default:o.withCtx(()=>[o.renderSlot(v.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),vV=o.defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=Sx();return(r,i)=>o.unref(n).isSelected.value?(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({key:0,"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),[gce,yV]=zt("SelectGroup"),wV=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Kr(void 0,"radix-vue-select-group");return yV({id:n}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({role:"group"},e,{"aria-labelledby":o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),xV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=ua(),r=ca(Sl),i=eV(),s=Sx(),{forwardRef:a,currentElement:l}=Le(),u=o.computed(()=>{var c;return o.h("option",{key:s.value,value:s.value,disabled:s.disabled.value,textContent:(c=l.value)==null?void 0:c.textContent})});return o.onMounted(()=>{l.value&&(s.onItemTextChange(l.value),r.itemTextRefCallback(l.value,s.value,s.disabled.value),i.onNativeOptionAdd(u.value))}),o.onBeforeUnmount(()=>{i.onNativeOptionRemove(u.value)}),(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps({id:o.unref(s).textId,ref:o.unref(a)},{...e,...c.$attrs},{"data-item-text":""}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["id"]),o.unref(s).isSelected.value&&o.unref(n).valueElement.value&&!o.unref(n).valueElementHasChildren.value?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:o.unref(n).valueElement.value},[o.renderSlot(c.$slots,"default")],8,["to"])):o.createCommentVNode("",!0)],64))}}),CV=o.defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=o.toRefs(e),r=ox(n),i=ca(Sl),s=i.position==="item-aligned"?J1():void 0,{forwardRef:a,currentElement:l}=Le();o.onMounted(()=>{i==null||i.onViewportChange(l.value)});const u=o.ref(0);function c(f){const p=f.currentTarget,{shouldExpandOnScrollRef:m,contentWrapper:g}=s??{};if(m!=null&&m.value&&g!=null&&g.value){const b=Math.abs(u.value-p.scrollTop);if(b>0){const v=window.innerHeight-bo*2,y=Number.parseFloat(g.value.style.minHeight),x=Number.parseFloat(g.value.style.height),k=Math.max(y,x);if(k<v){const E=k+b,C=Math.min(v,E),_=E-C;g.value.style.height=`${C}px`,g.value.style.bottom==="0px"&&(p.scrollTop=_>0?_:0,g.value.style.justifyContent="flex-end")}}}u.value=p.scrollTop}return(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(a),"data-radix-select-viewport":"",role:"presentation"},{...f.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16),o.createVNode(o.unref(Ye),{as:"style",nonce:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),_x=o.defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{injectCollection:r}=Yu(),i=r(),s=ca(Sl),a=o.ref(null);function l(){a.value!==null&&(window.clearInterval(a.value),a.value=null)}o.watchEffect(()=>{const f=i.value.find(p=>p===Wn());f==null||f.scrollIntoView({block:"nearest"})});function u(){a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}function c(){var f;(f=s.onItemLeave)==null||f.call(s),a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}return o.onBeforeUnmount(()=>l()),(f,p)=>{var m;return o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(m=f.$parent)==null?void 0:m.$props,{onPointerdown:u,onPointermove:c,onPointerleave:p[0]||(p[0]=()=>{l()})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16)}}}),kV=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=Le(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){s.value=f.scrollTop>0};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop-c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),EV=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=Le(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){const p=f.scrollHeight-f.clientHeight;s.value=Math.ceil(f.scrollTop)<p};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_x,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop+c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),SV=o.defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e,currentElement:n}=Le(),r=ua(),i=o.useSlots();return o.onBeforeMount(()=>{var s;const a=!!wf((s=i==null?void 0:i.default)==null?void 0:s.call(i)).length;r.onValueElementHasChildrenChange(a)}),o.onMounted(()=>{r.valueElement=n}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(e),as:s.as,"as-child":s.asChild,style:{pointerEvents:"none"}},{default:o.withCtx(()=>{var l;return[o.unref(Ex)((l=o.unref(r).modelValue)==null?void 0:l.value)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(s.placeholder),1)],64)):o.renderSlot(s.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),_V=o.defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(o.openBlock(),o.createBlock(o.unref(Ye),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),TV=o.defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=["horizontal","vertical"];function r(l){return n.includes(l)}const i=o.computed(()=>r(e.orientation)?e.orientation:"horizontal"),s=o.computed(()=>i.value==="vertical"?e.orientation:void 0),a=o.computed(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({as:l.as,"as-child":l.asChild,"data-orientation":i.value},a.value),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),AV=o.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(TV,o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function MV(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}MV();const OV=["name","disabled","required","value","checked","data-state","data-disabled"],[BV,IV]=zt("SwitchRoot"),RV=o.defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=Tr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0});function a(){i.value||(s.value=!s.value)}const{forwardRef:l,currentElement:u}=Le(),c=L1(u),f=o.computed(()=>{var p;return n.id&&u.value?(p=document.querySelector(`[for="${n.id}"]`))==null?void 0:p.innerText:void 0});return IV({checked:s,toggleCheck:a,disabled:i}),(p,m)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps(p.$attrs,{id:p.id,ref:o.unref(l),role:"switch",type:p.as==="button"?"button":void 0,value:p.value,"aria-label":p.$attrs["aria-label"]||f.value,"aria-checked":o.unref(s),"aria-required":p.required,"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,"as-child":p.asChild,as:p.as,disabled:o.unref(i),onClick:a,onKeydown:o.withKeys(o.withModifiers(a,["prevent"]),["enter"])}),{default:o.withCtx(()=>[o.renderSlot(p.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),o.unref(c)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",name:p.name,tabindex:"-1","aria-hidden":"true",disabled:o.unref(i),required:p.required,value:p.value,checked:!!o.unref(s),"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,OV)):o.createCommentVNode("",!0)],64))}}),LV=o.defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=BV();return Le(),(n,r)=>{var i;return o.openBlock(),o.createBlock(o.unref(Ye),{"data-state":(i=o.unref(e).checked)!=null&&i.value?"checked":"unchecked","data-disabled":o.unref(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[Z1,DV]=zt("TabsRoot"),PV=o.defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{orientation:i,dir:s}=o.toRefs(n),a=aa(s);Le();const l=Tr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),u=o.ref();return DV({modelValue:l,changeModelValue:c=>{l.value=c},orientation:i,dir:a,activationMode:n.activationMode,baseId:Kr(void 0,"radix-vue-tabs"),tabsList:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(Ye),{dir:o.unref(a),"data-orientation":o.unref(i),"as-child":c.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{modelValue:o.unref(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),VV=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=o.toRefs(e),{forwardRef:r,currentElement:i}=Le(),s=Z1();return s.tabsList=i,(a,l)=>(o.openBlock(),o.createBlock(o.unref(lx),{"as-child":"",orientation:o.unref(s).orientation.value,dir:o.unref(s).dir.value,loop:o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{ref:o.unref(r),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":o.unref(s).orientation.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function Tx(t,e){return`${t}-trigger-${e}`}function Ax(t,e){return`${t}-content-${e}`}const FV=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Le(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value),l=o.ref(a.value);return o.onMounted(()=>{requestAnimationFrame(()=>{l.value=!1})}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:a.value,"force-mount":""},{default:o.withCtx(({present:f})=>[o.createVNode(o.unref(Ye),{id:s.value,ref:o.unref(n),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":o.unref(r).orientation.value,"aria-labelledby":i.value,hidden:!f.value,tabindex:"0",style:o.normalizeStyle({animationDuration:l.value?"0s":void 0})},{default:o.withCtx(()=>[u.forceMount||a.value?o.renderSlot(u.$slots,"default",{key:0}):o.createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),$V=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=Le(),r=Z1(),i=o.computed(()=>Tx(r.baseId,e.value)),s=o.computed(()=>Ax(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value);return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nP),{"as-child":"",focusable:!l.disabled,active:a.value},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{id:i.value,ref:o.unref(n),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":o.unref(r).orientation.value,onMousedown:u[0]||(u[0]=o.withModifiers(c=>{!l.disabled&&c.ctrlKey===!1?o.unref(r).changeModelValue(l.value):c.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=o.withKeys(c=>o.unref(r).changeModelValue(l.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const c=o.unref(r).activationMode!=="manual";!a.value&&!l.disabled&&c&&o.unref(r).changeModelValue(l.value)})},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),HV=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Tr(n,"pressed",r,{defaultValue:n.defaultValue,passive:n.pressed===void 0});function s(){i.value=!i.value}const a=o.computed(()=>i.value?"on":"off");return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Ye),{type:l.as==="button"?"button":void 0,"as-child":n.asChild,as:l.as,"aria-pressed":o.unref(i),"data-state":a.value,"data-disabled":l.disabled?"":void 0,disabled:l.disabled,onClick:s},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default",{pressed:o.unref(i)})]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),Mx="tooltip.open",[Q1,zV]=zt("TooltipProvider"),UV=o.defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(t){const e=t,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,disableClosingTrigger:s,ignoreNonKeyboardFocus:a,disabled:l}=o.toRefs(e);Le();const u=o.ref(!0),c=o.ref(!1),{start:f,stop:p}=D6(()=>{u.value=!0},r,{immediate:!1});return zV({isOpenDelayed:u,delayDuration:n,onOpen(){p(),u.value=!1},onClose(){f()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:a}),(m,g)=>o.renderSlot(m.$slots,"default")}}),[Vf,WV]=zt("TooltipRoot"),jV=o.defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Q1(),s=o.computed(()=>n.disableHoverableContent??i.disableHoverableContent.value),a=o.computed(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=o.computed(()=>n.disabled??i.disabled.value),u=o.computed(()=>n.delayDuration??i.delayDuration.value),c=o.computed(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),f=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});o.watch(f,E=>{i.onClose&&(E?(i.onOpen(),document.dispatchEvent(new CustomEvent(Mx))):i.onClose())});const p=o.ref(!1),m=o.ref(),g=o.computed(()=>f.value?p.value?"delayed-open":"instant-open":"closed"),{start:b,stop:v}=D6(()=>{p.value=!0,f.value=!0},u,{immediate:!1});function y(){v(),p.value=!1,f.value=!0}function x(){v(),f.value=!1}function k(){b()}return WV({contentId:"",open:f,stateAttribute:g,trigger:m,onTriggerChange(E){m.value=E},onTriggerEnter(){i.isOpenDelayed.value?k():y()},onTriggerLeave(){s.value?x():v()},onOpen:y,onClose:x,disableHoverableContent:s,disableClosingTrigger:a,disabled:l,ignoreNonKeyboardFocus:c}),(E,C)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default",{open:o.unref(f)})]),_:3}))}}),qV=o.defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Vf(),r=Q1();n.contentId||(n.contentId=Kr(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:s}=Le(),a=o.ref(!1),l=o.ref(!1),u=o.computed(()=>n.disabled.value?{}:{click:v,focus:g,pointermove:p,pointerleave:m,pointerdown:f,blur:b});o.onMounted(()=>{n.onTriggerChange(s.value)});function c(){setTimeout(()=>{a.value=!1},1)}function f(){a.value=!0,document.addEventListener("pointerup",c,{once:!0})}function p(y){y.pointerType!=="touch"&&!l.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function m(){n.onTriggerLeave(),l.value=!1}function g(y){var x,k;a.value||n.ignoreNonKeyboardFocus.value&&!((k=(x=y.target).matches)!=null&&k.call(x,":focus-visible"))||n.onOpen()}function b(){n.onClose()}function v(){n.disableClosingTrigger.value||n.onClose()}return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(i),"aria-describedby":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},o.toHandlers(u.value)),{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),Ox=o.defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),{forwardRef:s}=Le(),a=o.useSlots(),l=o.computed(()=>{var f;return(f=a.default)==null?void 0:f.call(a)}),u=o.computed(()=>{var f;if(n.ariaLabel)return n.ariaLabel;let p="";function m(g){typeof g.children=="string"&&g.type!==o.Comment?p+=g.children:Array.isArray(g.children)&&g.children.forEach(b=>m(b))}return(f=l.value)==null||f.forEach(g=>m(g)),p}),c=o.computed(()=>{const{ariaLabel:f,...p}=n;return p});return o.onMounted(()=>{xl(window,"scroll",f=>{const p=f.target;p!=null&&p.contains(i.trigger.value)&&i.onClose()}),xl(window,Mx,i.onClose)}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[0]||(p[0]=m=>r("escapeKeyDown",m)),onPointerDownOutside:p[1]||(p[1]=m=>{var g;o.unref(i).disableClosingTrigger.value&&(g=o.unref(i).trigger.value)!=null&&g.contains(m.target)&&m.preventDefault(),r("pointerDownOutside",m)}),onFocusOutside:p[2]||(p[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:p[3]||(p[3]=m=>o.unref(i).onClose())},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps({ref:o.unref(s),"data-state":o.unref(i).stateAttribute.value},{...f.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default"),o.createVNode(o.unref(tx),{id:o.unref(i).contentId,role:"tooltip"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),KV=o.defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(t){const e=er(t),{forwardRef:n,currentElement:r}=Le(),{trigger:i,onClose:s}=Vf(),a=Q1(),{isPointerInTransit:l,onPointerExit:u}=$L(i,r);return a.isPointerInTransitRef=l,u(()=>{s()}),(c,f)=>(o.openBlock(),o.createBlock(Ox,o.mergeProps({ref:o.unref(n)},o.unref(e)),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16))}}),GV=o.defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),s=Pt(n,r),{forwardRef:a}=Le();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).disableHoverableContent.value?Ox:KV),o.mergeProps({ref:o.unref(a)},o.unref(s)),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XV=o.defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),vo=o.defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(AV),o.mergeProps(n.value,{class:o.unref(Ee)("shrink-0 bg-ed-separator",e.orientation==="vertical"?"w-px h-full":"h-px w-full",e.class)}),null,16,["class"]))}});/*!
|
|
141
|
+
For more information, see https://www.radix-vue.com/components/${n}`,l=`Warning: Missing \`Description\` or \`aria-describedby="undefined"\` for ${e}.`;o.onMounted(()=>{var u;document.getElementById(r)||console.warn(a);const c=(u=s.value)==null?void 0:u.getAttribute("aria-describedby");i&&c&&(document.getElementById(i)||console.warn(l))})}const Zx=o.defineComponent({__name:"DialogContentImpl",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),{forwardRef:s,currentElement:a}=Le();return i.titleId||(i.titleId=Kr(void 0,"radix-vue-dialog-title")),i.descriptionId||(i.descriptionId=Kr(void 0,"radix-vue-dialog-description")),o.onMounted(()=>{i.contentElement=a,Wn()!==document.body&&(i.triggerElement.value=Wn())}),process.env.NODE_ENV!=="production"&&kD({titleName:"DialogTitle",contentName:"DialogContent",componentLink:"dialog.html#title",titleId:i.titleId,descriptionId:i.descriptionId,contentElement:a}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:n.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),o.mergeProps({id:o.unref(i).contentId,ref:o.unref(s),as:l.as,"as-child":l.asChild,"disable-outside-pointer-events":l.disableOutsidePointerEvents,role:"dialog","aria-describedby":o.unref(i).descriptionId,"aria-labelledby":o.unref(i).titleId,"data-state":o.unref(Yx)(o.unref(i).open.value)},l.$attrs,{onDismiss:u[0]||(u[0]=c=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:u[1]||(u[1]=c=>r("escapeKeyDown",c)),onFocusOutside:u[2]||(u[2]=c=>r("focusOutside",c)),onInteractOutside:u[3]||(u[3]=c=>r("interactOutside",c)),onPointerDownOutside:u[4]||(u[4]=c=>r("pointerDownOutside",c))}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","as","as-child","disable-outside-pointer-events","aria-describedby","aria-labelledby","data-state"])]),_:3},8,["trapped"]))}}),ED=o.defineComponent({__name:"DialogContentModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),s=la(r),{forwardRef:a,currentElement:l}=Le();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(Zx,o.mergeProps({...n,...o.unref(s)},{ref:o.unref(a),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":!0,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;f.defaultPrevented||(f.preventDefault(),(p=o.unref(i).triggerElement.value)==null||p.focus())}),onPointerDownOutside:c[1]||(c[1]=f=>{const p=f.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0;(p.button===2||m)&&f.preventDefault()}),onFocusOutside:c[2]||(c[2]=f=>{f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus"]))}}),SD=o.defineComponent({__name:"DialogContentNonModal",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=la(e);Le();const i=qo(),s=o.ref(!1),a=o.ref(!1);return(l,u)=>(o.openBlock(),o.createBlock(Zx,o.mergeProps({...n,...o.unref(r)},{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:u[0]||(u[0]=c=>{var f;c.defaultPrevented||(s.value||(f=o.unref(i).triggerElement.value)==null||f.focus(),c.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:u[1]||(u[1]=c=>{var f;c.defaultPrevented||(s.value=!0,c.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const p=c.target;(f=o.unref(i).triggerElement.value)!=null&&f.contains(p)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&a.value&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))}}),_D=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=qo(),s=la(r),{forwardRef:a}=Le();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(ED,o.mergeProps({key:0,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(SD,o.mergeProps({key:1,ref:o.unref(a)},{...n,...o.unref(s),...l.$attrs}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),TD=o.defineComponent({__name:"DialogOverlayImpl",props:{asChild:{type:Boolean},as:{}},setup(t){const e=qo();return Cf(!0),Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),{as:n.as,"as-child":n.asChild,"data-state":o.unref(e).open.value?"open":"closed",style:{"pointer-events":"auto"}},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"]))}}),j1=o.defineComponent({__name:"DialogOverlay",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=qo(),{forwardRef:n}=Le();return(r,i)=>{var s;return(s=o.unref(e))!=null&&s.modal.value?(o.openBlock(),o.createBlock(o.unref(Gr),{key:0,present:r.forceMount||o.unref(e).open.value},{default:o.withCtx(()=>[o.createVNode(TD,o.mergeProps(r.$attrs,{ref:o.unref(n),as:r.as,"as-child":r.asChild}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["as","as-child"])]),_:3},8,["present"])):o.createCommentVNode("",!0)}}}),AD=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t;Le();const n=qo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{type:r.as==="button"?"button":void 0,onClick:i[0]||(i[0]=s=>o.unref(n).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["type"]))}}),MD=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{default:"h2"}},setup(t){const e=t,n=qo();return Le(),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{id:o.unref(n).titleId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}}),OD=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{default:"p"}},setup(t){const e=t;Le();const n=qo();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{id:o.unref(n).descriptionId}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["id"]))}});function Mf(t){return t==="indeterminate"}function Qx(t){return Mf(t)?"indeterminate":t?"checked":"unchecked"}const BD=["value","checked","name","disabled","required"],[ID,RD]=zt("CheckboxRoot"),LD=o.defineComponent({inheritAttrs:!1,__name:"CheckboxRoot",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String],default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{default:"on"},id:{},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=Tr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0}),{forwardRef:a,currentElement:l}=Le(),u=L1(l),c=o.computed(()=>{var f;return n.id&&l.value?(f=document.querySelector(`[for="${n.id}"]`))==null?void 0:f.innerText:void 0});return RD({disabled:i,state:s}),(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps(f.$attrs,{id:f.id,ref:o.unref(a),role:"checkbox","as-child":n.asChild,as:f.as,type:f.as==="button"?"button":void 0,"aria-checked":o.unref(Mf)(o.unref(s))?"mixed":o.unref(s),"aria-required":n.required,"aria-label":f.$attrs["aria-label"]||c.value,"data-state":o.unref(Qx)(o.unref(s)),"data-disabled":o.unref(i)?"":void 0,disabled:o.unref(i),onKeydown:o.withKeys(o.withModifiers(()=>{},["prevent"]),["enter"]),onClick:p[0]||(p[0]=m=>s.value=o.unref(Mf)(o.unref(s))?!0:!o.unref(s))}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","as-child","as","type","aria-checked","aria-required","aria-label","data-state","data-disabled","disabled","onKeydown"]),o.unref(u)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",tabindex:"-1","aria-hidden":"true",value:f.value,checked:!!o.unref(s),name:n.name,disabled:n.disabled,required:n.required,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,BD)):o.createCommentVNode("",!0)],64))}}),DD=o.defineComponent({__name:"CheckboxIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e}=Le(),n=ID();return(r,i)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:r.forceMount||o.unref(Mf)(o.unref(n).state.value)||o.unref(n).state.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(e),"data-state":o.unref(Qx)(o.unref(n).state.value),"data-disabled":o.unref(n).disabled.value?"":void 0,style:{pointerEvents:"none"},"as-child":r.asChild,as:r.as},r.$attrs),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["data-state","data-disabled","as-child","as"])]),_:3},8,["present"]))}}),[Nx,PD]=zt("PopperRoot"),Of=o.defineComponent({inheritAttrs:!1,__name:"PopperRoot",setup(t){const e=o.ref();return PD({anchor:e,onAnchorChange:n=>e.value=n}),(n,r)=>o.renderSlot(n.$slots,"default")}}),Qu=o.defineComponent({__name:"PopperAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n,currentElement:r}=Le(),i=Nx();return o.watchEffect(()=>{i.onAnchorChange(e.element??r.value)}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(n),as:s.as,"as-child":s.asChild},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["as","as-child"]))}});function VD(t){return t!==null}function FD(t){return{name:"transformOrigin",options:t,fn(e){var n,r,i;const{placement:s,rects:a,middlewareData:l}=e,u=((n=l.arrow)==null?void 0:n.centerOffset)!==0,c=u?0:t.arrowWidth,f=u?0:t.arrowHeight,[p,m]=q1(s),g={start:"0%",center:"50%",end:"100%"}[m],b=(((r=l.arrow)==null?void 0:r.x)??0)+c/2,v=(((i=l.arrow)==null?void 0:i.y)??0)+f/2;let y="",x="";return p==="bottom"?(y=u?g:`${b}px`,x=`${-f}px`):p==="top"?(y=u?g:`${b}px`,x=`${a.floating.height+f}px`):p==="right"?(y=`${-f}px`,x=u?g:`${v}px`):p==="left"&&(y=`${a.floating.width+f}px`,x=u?g:`${v}px`),{data:{x:y,y:x}}}}}function q1(t){const[e,n="center"]=t.split("-");return[e,n]}const e6={side:"bottom",sideOffset:0,align:"center",alignOffset:0,arrowPadding:0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:"partial",hideWhenDetached:!1,updatePositionStrategy:"optimized",prioritizePosition:!1},[mce,$D]=zt("PopperContent"),Bf=o.defineComponent({inheritAttrs:!1,__name:"PopperContent",props:o.mergeDefaults({side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...e6}),emits:["placed"],setup(t,{emit:e}){const n=t,r=e,i=Nx(),{forwardRef:s,currentElement:a}=Le(),l=o.ref(),u=o.ref(),{width:c,height:f}=ZL(u),p=o.computed(()=>n.side+(n.align!=="center"?`-${n.align}`:"")),m=o.computed(()=>typeof n.collisionPadding=="number"?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),g=o.computed(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),b=o.computed(()=>({padding:m.value,boundary:g.value.filter(VD),altBoundary:g.value.length>0})),v=hL(()=>[rL({mainAxis:n.sideOffset+f.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&Tx({...b.value}),n.avoidCollisions&&oL({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky==="partial"?lL():void 0,...b.value}),!n.prioritizePosition&&n.avoidCollisions&&Tx({...b.value}),iL({...b.value,apply:({elements:B,rects:$,availableWidth:H,availableHeight:X})=>{const{width:ee,height:z}=$.reference,L=B.floating.style;L.setProperty("--radix-popper-available-width",`${H}px`),L.setProperty("--radix-popper-available-height",`${X}px`),L.setProperty("--radix-popper-anchor-width",`${ee}px`),L.setProperty("--radix-popper-anchor-height",`${z}px`)}}),u.value&&dL({element:u.value,padding:n.arrowPadding}),FD({arrowWidth:c.value,arrowHeight:f.value}),n.hideWhenDetached&&sL({strategy:"referenceHidden",...b.value})]),{floatingStyles:y,placement:x,isPositioned:k,middlewareData:E}=fL(i.anchor,l,{strategy:"fixed",placement:p,whileElementsMounted:(...B)=>nL(...B,{animationFrame:n.updatePositionStrategy==="always"}),middleware:v}),C=o.computed(()=>q1(x.value)[0]),_=o.computed(()=>q1(x.value)[1]);o.watchPostEffect(()=>{k.value&&r("placed")});const T=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.centerOffset)!==0}),A=o.ref("");o.watchEffect(()=>{a.value&&(A.value=window.getComputedStyle(a.value).zIndex)});const V=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.x)??0}),O=o.computed(()=>{var B;return((B=E.value.arrow)==null?void 0:B.y)??0});return $D({placedSide:C,onArrowChange:B=>u.value=B,arrowX:V,arrowY:O,shouldHideArrow:T}),(B,$)=>{var H,X,ee;return o.openBlock(),o.createElementBlock("div",{ref_key:"floatingRef",ref:l,"data-radix-popper-content-wrapper":"",style:o.normalizeStyle({...o.unref(y),transform:o.unref(k)?o.unref(y).transform:"translate(0, -200%)",minWidth:"max-content",zIndex:A.value,"--radix-popper-transform-origin":[(H=o.unref(E).transformOrigin)==null?void 0:H.x,(X=o.unref(E).transformOrigin)==null?void 0:X.y].join(" "),...((ee=o.unref(E).hide)==null?void 0:ee.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}})},[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(s)},B.$attrs,{"as-child":n.asChild,as:B.as,"data-side":C.value,"data-align":_.value,style:{animation:o.unref(k)?void 0:"none"}}),{default:o.withCtx(()=>[o.renderSlot(B.$slots,"default")]),_:3},16,["as-child","as","data-side","data-align","style"])],4)}}}),t6=o.defineComponent({__name:"VisuallyHidden",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return Le(),(e,n)=>(o.openBlock(),o.createBlock(o.unref(Ye),{as:e.as,"as-child":e.asChild,style:{position:"absolute",border:0,width:"1px",display:"inline-block",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},8,["as","as-child"]))}}),HD="data-radix-vue-collection-item",[K1,zD]=zt("CollectionProvider");function UD(t=HD){const e=o.ref(new Map),n=o.ref(),r=zD({collectionRef:n,itemMap:e,attrName:t}),{getItems:i}=r6(r),s=o.computed(()=>Array.from(r.itemMap.value.values())),a=o.computed(()=>r.itemMap.value.size);return{getItems:i,reactiveItems:s,itemMapSize:a}}const WD=o.defineComponent({name:"CollectionSlot",setup(t,{slots:e}){const n=K1(),{primitiveElement:r,currentElement:i}=Ux();return o.watch(i,()=>{n.collectionRef.value=i.value}),()=>o.h(V1,{ref:r},e)}}),n6=o.defineComponent({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(t,{slots:e,attrs:n}){const r=K1(),{primitiveElement:i,currentElement:s}=Ux();return o.watchEffect(a=>{if(s.value){const l=o.markRaw(s.value);r.itemMap.value.set(l,{ref:s.value,value:t.value}),a(()=>r.itemMap.value.delete(l))}}),()=>o.h(V1,{...n,[r.attrName]:"",ref:i},e)}});function r6(t){const e=t??K1();return{getItems:()=>{const n=e.collectionRef.value;if(!n)return[];const r=Array.from(n.querySelectorAll(`[${e.attrName}]`));return Array.from(e.itemMap.value.values()).sort((i,s)=>r.indexOf(i.ref)-r.indexOf(s.ref))}}}function o6(t){const e=xf({nonce:o.ref()});return o.computed(()=>{var n;return(t==null?void 0:t.value)||((n=e.nonce)==null?void 0:n.value)})}const i6=o.defineComponent({__name:"MenuAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function jD(){const t=o.ref(!1);return o.onMounted(()=>{xl("keydown",()=>{t.value=!0},{capture:!0,passive:!0}),xl(["pointerdown","pointermove"],()=>{t.value=!1},{capture:!0,passive:!0})}),t}const qD=Bx(jD),[If,KD]=zt(["MenuRoot","MenuSub"],"MenuContext"),[G1,GD]=zt("MenuRoot"),s6=o.defineComponent({__name:"MenuRoot",props:{open:{type:Boolean,default:!1},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i,dir:s}=o.toRefs(n),a=aa(s),l=Tr(n,"open",r),u=o.ref(),c=qD();return KD({open:l,onOpenChange:f=>{l.value=f},content:u,onContentChange:f=>{u.value=f}}),GD({onClose:()=>{l.value=!1},isUsingKeyboardRef:c,dir:a,modal:i}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3}))}}),XD="rovingFocusGroup.onEntryFocus",YD={bubbles:!1,cancelable:!0},JD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZD(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function QD(t,e,n){const r=ZD(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return JD[r]}function a6(t,e=!1){const n=Wn();for(const r of t)if(r===n||(r.focus({preventScroll:e}),Wn()!==n))return}function ND(t,e){return t.map((n,r)=>t[(e+r)%t.length])}const[eP,tP]=zt("RovingFocusGroup"),l6=o.defineComponent({__name:"RovingFocusGroup",props:{orientation:{default:void 0},dir:{},loop:{type:Boolean,default:!1},currentTabStopId:{},defaultCurrentTabStopId:{},preventScrollOnEntryFocus:{type:Boolean,default:!1},asChild:{type:Boolean},as:{}},emits:["entryFocus","update:currentTabStopId"],setup(t,{expose:e,emit:n}){const r=t,i=n,{loop:s,orientation:a,dir:l}=o.toRefs(r),u=aa(l),c=Tr(r,"currentTabStopId",i,{defaultValue:r.defaultCurrentTabStopId,passive:r.currentTabStopId===void 0}),f=o.ref(!1),p=o.ref(!1),m=o.ref(0),{getItems:g}=UD();function b(y){const x=!p.value;if(y.currentTarget&&y.target===y.currentTarget&&x&&!f.value){const k=new CustomEvent(XD,YD);if(y.currentTarget.dispatchEvent(k),i("entryFocus",k),!k.defaultPrevented){const E=g().map(A=>A.ref).filter(A=>A.dataset.disabled!==""),C=E.find(A=>A.getAttribute("data-active")==="true"),_=E.find(A=>A.id===c.value),T=[C,_,...E].filter(Boolean);a6(T,r.preventScrollOnEntryFocus)}}p.value=!1}function v(){setTimeout(()=>{p.value=!1},1)}return e({getItems:g}),tP({loop:s,dir:u,orientation:a,currentTabStopId:c,onItemFocus:y=>{c.value=y},onItemShiftTab:()=>{f.value=!0},onFocusableItemAdd:()=>{m.value++},onFocusableItemRemove:()=>{m.value--}}),(y,x)=>(o.openBlock(),o.createBlock(o.unref(WD),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{tabindex:f.value||m.value===0?-1:0,"data-orientation":o.unref(a),as:y.as,"as-child":y.asChild,dir:o.unref(u),style:{outline:"none"},onMousedown:x[0]||(x[0]=k=>p.value=!0),onMouseup:v,onFocus:b,onBlur:x[1]||(x[1]=k=>f.value=!1)},{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},8,["tabindex","data-orientation","as","as-child","dir"])]),_:3}))}}),nP=o.defineComponent({__name:"RovingFocusItem",props:{tabStopId:{},focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!0},allowShiftKey:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=eP(),r=o.computed(()=>e.tabStopId||Kr()),i=o.computed(()=>n.currentTabStopId.value===r.value),{getItems:s}=r6();o.onMounted(()=>{e.focusable&&n.onFocusableItemAdd()}),o.onUnmounted(()=>{e.focusable&&n.onFocusableItemRemove()});function a(l){if(l.key==="Tab"&&l.shiftKey){n.onItemShiftTab();return}if(l.target!==l.currentTarget)return;const u=QD(l,n.orientation.value,n.dir.value);if(u!==void 0){if(l.metaKey||l.ctrlKey||l.altKey||!e.allowShiftKey&&l.shiftKey)return;l.preventDefault();let c=[...s().map(f=>f.ref).filter(f=>f.dataset.disabled!=="")];if(u==="last")c.reverse();else if(u==="prev"||u==="next"){u==="prev"&&c.reverse();const f=c.indexOf(l.currentTarget);c=n.loop.value?ND(c,f+1):c.slice(f+1)}o.nextTick(()=>a6(c))}}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(n6),null,{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{tabindex:i.value?0:-1,"data-orientation":o.unref(n).orientation.value,"data-active":l.active,"data-disabled":l.focusable?void 0:"",as:l.as,"as-child":l.asChild,onMousedown:u[0]||(u[0]=c=>{l.focusable?o.unref(n).onItemFocus(r.value):c.preventDefault()}),onFocus:u[1]||(u[1]=c=>o.unref(n).onItemFocus(r.value)),onKeydown:a},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["tabindex","data-orientation","data-active","data-disabled","as","as-child"])]),_:3}))}}),[u6,rP]=zt("MenuContent"),c6=o.defineComponent({__name:"MenuContentImpl",props:o.mergeDefaults({loop:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},disableOutsideScroll:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},{...e6}),emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus","dismiss"],setup(t,{emit:e}){const n=t,r=e,i=If(),s=G1(),{trapFocus:a,disableOutsidePointerEvents:l,loop:u}=o.toRefs(n);R1(),Cf(l.value);const c=o.ref(""),f=o.ref(0),p=o.ref(0),m=o.ref(null),g=o.ref("right"),b=o.ref(0),v=o.ref(null),{createCollection:y}=Yu(),{forwardRef:x,currentElement:k}=Le(),E=y(k);o.watch(k,B=>{i.onContentChange(B)});const{handleTypeaheadSearch:C}=P1(E);o.onUnmounted(()=>{window.clearTimeout(f.value)});function _(B){var $,H;return g.value===(($=m.value)==null?void 0:$.side)&&wD(B,(H=m.value)==null?void 0:H.area)}async function T(B){var $;r("openAutoFocus",B),!B.defaultPrevented&&(B.preventDefault(),($=k.value)==null||$.focus({preventScroll:!0}))}function A(B){if(B.defaultPrevented)return;const $=B.target.closest("[data-radix-menu-content]")===B.currentTarget,H=B.ctrlKey||B.altKey||B.metaKey,X=B.key.length===1,ee=BL(B,Wn(),k.value,{loop:u.value,arrowKeyOptions:"vertical",dir:s==null?void 0:s.dir.value,focus:!0,attributeName:"[data-radix-vue-collection-item]:not([data-disabled])"});if(ee)return ee==null?void 0:ee.focus();if(B.code==="Space"||($&&(B.key==="Tab"&&B.preventDefault(),!H&&X&&C(B.key)),B.target!==k.value)||!vD.includes(B.key))return;B.preventDefault();const z=E.value;Xx.includes(B.key)&&z.reverse(),U1(z)}function V(B){var $,H;(H=($=B==null?void 0:B.currentTarget)==null?void 0:$.contains)!=null&&H.call($,B.target)||(window.clearTimeout(f.value),c.value="")}function O(B){var $;if(!W1(B))return;const H=B.target,X=b.value!==B.clientX;if(($=B==null?void 0:B.currentTarget)!=null&&$.contains(H)&&X){const ee=B.clientX>b.value?"right":"left";g.value=ee,b.value=B.clientX}}return rP({onItemEnter:B=>!!_(B),onItemLeave:B=>{var $;_(B)||(($=k.value)==null||$.focus(),v.value=null)},onTriggerLeave:B=>!!_(B),searchRef:c,pointerGraceTimerRef:p,onPointerGraceIntentChange:B=>{m.value=B}}),(B,$)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",trapped:o.unref(a),onMountAutoFocus:T,onUnmountAutoFocus:$[7]||($[7]=H=>r("closeAutoFocus",H))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":o.unref(l),onEscapeKeyDown:$[2]||($[2]=H=>r("escapeKeyDown",H)),onPointerDownOutside:$[3]||($[3]=H=>r("pointerDownOutside",H)),onFocusOutside:$[4]||($[4]=H=>r("focusOutside",H)),onInteractOutside:$[5]||($[5]=H=>r("interactOutside",H)),onDismiss:$[6]||($[6]=H=>r("dismiss"))},{default:o.withCtx(()=>[o.createVNode(o.unref(l6),{"current-tab-stop-id":v.value,"onUpdate:currentTabStopId":$[0]||($[0]=H=>v.value=H),"as-child":"",orientation:"vertical",dir:o.unref(s).dir.value,loop:o.unref(u),onEntryFocus:$[1]||($[1]=H=>{r("entryFocus",H),o.unref(s).isUsingKeyboardRef.value||H.preventDefault()})},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),{ref:o.unref(x),role:"menu",as:B.as,"as-child":B.asChild,"aria-orientation":"vertical","data-radix-menu-content":"","data-state":o.unref(Yx)(o.unref(i).open.value),dir:o.unref(s).dir.value,side:B.side,"side-offset":B.sideOffset,align:B.align,"align-offset":B.alignOffset,"avoid-collisions":B.avoidCollisions,"collision-boundary":B.collisionBoundary,"collision-padding":B.collisionPadding,"arrow-padding":B.arrowPadding,"prioritize-position":B.prioritizePosition,sticky:B.sticky,"hide-when-detached":B.hideWhenDetached,onKeydown:A,onBlur:V,onPointermove:O},{default:o.withCtx(()=>[o.renderSlot(B.$slots,"default")]),_:3},8,["as","as-child","data-state","dir","side","side-offset","align","align-offset","avoid-collisions","collision-boundary","collision-padding","arrow-padding","prioritize-position","sticky","hide-when-detached"])]),_:3},8,["current-tab-stop-id","dir","loop"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),oP=o.defineComponent({inheritAttrs:!1,__name:"MenuItemImpl",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=u6(),{forwardRef:r}=Le(),i=o.ref(!1);async function s(l){if(!l.defaultPrevented&&W1(l)){if(e.disabled)n.onItemLeave(l);else if(!n.onItemEnter(l)){const u=l.currentTarget;u==null||u.focus({preventScroll:!0})}}}async function a(l){await o.nextTick(),!l.defaultPrevented&&W1(l)&&n.onItemLeave(l)}return(l,u)=>(o.openBlock(),o.createBlock(o.unref(n6),{value:{textValue:l.textValue}},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(r),role:"menuitem",tabindex:"-1"},l.$attrs,{as:l.as,"as-child":l.asChild,"data-radix-vue-collection-item":"","aria-disabled":l.disabled||void 0,"data-disabled":l.disabled?"":void 0,"data-highlighted":i.value?"":void 0,onPointermove:s,onPointerleave:a,onFocus:u[0]||(u[0]=async c=>{await o.nextTick(),!(c.defaultPrevented||l.disabled)&&(i.value=!0)}),onBlur:u[1]||(u[1]=async c=>{await o.nextTick(),!c.defaultPrevented&&(i.value=!1)})}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","aria-disabled","data-disabled","data-highlighted"])]),_:3},8,["value"]))}}),X1=o.defineComponent({__name:"MenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,{forwardRef:i,currentElement:s}=Le(),a=G1(),l=u6(),u=o.ref(!1);async function c(){const f=s.value;if(!n.disabled&&f){const p=new CustomEvent(gD,{bubbles:!0,cancelable:!0});r("select",p),await o.nextTick(),p.defaultPrevented?u.value=!1:a.onClose()}}return(f,p)=>(o.openBlock(),o.createBlock(oP,o.mergeProps(n,{ref:o.unref(i),onClick:c,onPointerdown:p[0]||(p[0]=()=>{u.value=!0}),onPointerup:p[1]||(p[1]=async m=>{var g;await o.nextTick(),!m.defaultPrevented&&(u.value||(g=m.currentTarget)==null||g.click())}),onKeydown:p[2]||(p[2]=async m=>{const g=o.unref(l).searchRef.value!=="";f.disabled||g&&m.key===" "||o.unref(z1).includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16))}}),[iP,sP]=zt(["MenuCheckboxItem","MenuRadioItem"],"MenuItemIndicatorContext"),aP=o.defineComponent({__name:"MenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=iP({checked:o.ref(!1)});return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:n.forceMount||o.unref(Af)(o.unref(e).checked.value)||o.unref(e).checked.value===!0},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{as:n.as,"as-child":n.asChild,"data-state":o.unref(Jx)(o.unref(e).checked.value)},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["as","as-child","data-state"])]),_:3},8,["present"]))}}),lP=o.defineComponent({__name:"MenuCheckboxItem",props:{checked:{type:[Boolean,String],default:!1},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=Tr(n,"checked",r);return sP({checked:i}),(s,a)=>(o.openBlock(),o.createBlock(X1,o.mergeProps({role:"menuitemcheckbox"},n,{"aria-checked":o.unref(Af)(o.unref(i))?"mixed":o.unref(i),"data-state":o.unref(Jx)(o.unref(i)),onSelect:a[0]||(a[0]=async l=>{r("select",l),o.unref(Af)(o.unref(i))?i.value=!0:i.value=!o.unref(i)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default",{checked:o.unref(i)})]),_:3},16,["aria-checked","data-state"]))}}),uP=o.defineComponent({__name:"MenuRootContentModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=Pt(n,r),s=If(),{forwardRef:a,currentElement:l}=Le();return Sf(l),(u,c)=>(o.openBlock(),o.createBlock(c6,o.mergeProps(o.unref(i),{ref:o.unref(a),"trap-focus":o.unref(s).open.value,"disable-outside-pointer-events":o.unref(s).open.value,"disable-outside-scroll":!0,onDismiss:c[0]||(c[0]=f=>o.unref(s).onOpenChange(!1)),onFocusOutside:c[1]||(c[1]=o.withModifiers(f=>r("focusOutside",f),["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16,["trap-focus","disable-outside-pointer-events"]))}}),cP=o.defineComponent({__name:"MenuRootContentNonModal",props:{loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e),r=If();return(i,s)=>(o.openBlock(),o.createBlock(c6,o.mergeProps(o.unref(n),{"trap-focus":!1,"disable-outside-pointer-events":!1,"disable-outside-scroll":!1,onDismiss:s[0]||(s[0]=a=>o.unref(r).onOpenChange(!1))}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),d6=o.defineComponent({__name:"MenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","entryFocus","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e),r=If(),i=G1();return(s,a)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:s.forceMount||o.unref(r).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(uP,o.normalizeProps(o.mergeProps({key:0},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(cP,o.normalizeProps(o.mergeProps({key:1},{...s.$attrs,...o.unref(n)})),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),f6=o.defineComponent({__name:"MenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dP=o.defineComponent({__name:"MenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{role:"separator","aria-orientation":"horizontal"}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[p6,fP]=zt("ContextMenuRoot"),pP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuRoot",props:{dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{dir:i,modal:s}=o.toRefs(n);Le();const a=aa(i),l=o.ref(!1);return fP({open:l,onOpenChange:u=>{l.value=u},dir:a,modal:s}),o.watch(l,u=>{r("update:open",u)}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(s6),{open:l.value,"onUpdate:open":c[0]||(c[0]=f=>l.value=f),dir:o.unref(a),modal:o.unref(s)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["open","dir","modal"]))}});function h6(t){return t.pointerType!=="mouse"}const hP=o.defineComponent({inheritAttrs:!1,__name:"ContextMenuTrigger",props:{disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,{disabled:n}=o.toRefs(e),{forwardRef:r}=Le(),i=p6(),s=o.ref({x:0,y:0}),a=o.computed(()=>({getBoundingClientRect:()=>({width:0,height:0,left:s.value.x,right:s.value.x,top:s.value.y,bottom:s.value.y,...s.value})})),l=o.ref(0);function u(){window.clearTimeout(l.value)}function c(g){s.value={x:g.clientX,y:g.clientY},i.onOpenChange(!0)}async function f(g){n.value||(await o.nextTick(),g.defaultPrevented||(u(),c(g),g.preventDefault()))}async function p(g){n.value||(await o.nextTick(),h6(g)&&!g.defaultPrevented&&(u(),l.value=window.setTimeout(()=>c(g),700)))}async function m(g){n.value||(await o.nextTick(),h6(g)&&!g.defaultPrevented&&u())}return(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(i6),{as:"template",element:a.value},null,8,["element"]),o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(r),as:g.as,"as-child":g.asChild,"data-state":o.unref(i).open.value?"open":"closed","data-disabled":o.unref(n)?"":void 0,style:{WebkitTouchCallout:"none"}},g.$attrs,{onContextmenu:f,onPointerdown:p,onPointermove:m,onPointercancel:m,onPointerup:m}),{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},16,["as","as-child","data-state","data-disabled"])],64))}}),mP=o.defineComponent({__name:"ContextMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(f6),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),gP=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{default:0},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e);Le();const r=p6(),i=o.ref(!1);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(d6),o.mergeProps(o.unref(n),{side:"right","side-offset":2,align:"start",style:{"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:a[0]||(a[0]=l=>{!l.defaultPrevented&&i.value&&l.preventDefault(),i.value=!1}),onInteractOutside:a[1]||(a[1]=l=>{!l.defaultPrevented&&!o.unref(r).modal.value&&(i.value=!0)})}),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),bP=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),[m6,vP]=zt("DropdownMenuRoot"),yP=o.defineComponent({__name:"DropdownMenuRoot",props:{defaultOpen:{type:Boolean},open:{type:Boolean,default:void 0},dir:{},modal:{type:Boolean,default:!0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),s=o.ref(),{modal:a,dir:l}=o.toRefs(n),u=aa(l);return vP({open:i,onOpenChange:c=>{i.value=c},onOpenToggle:()=>{i.value=!i.value},triggerId:"",triggerElement:s,contentId:"",modal:a,dir:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(s6),{open:o.unref(i),"onUpdate:open":f[0]||(f[0]=p=>o.isRef(i)?i.value=p:null),dir:o.unref(u),modal:o.unref(a)},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{open:o.unref(i)})]),_:3},8,["open","dir","modal"]))}}),wP=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=m6(),{forwardRef:r,currentElement:i}=Le();return o.onMounted(()=>{n.triggerElement=i}),n.triggerId||(n.triggerId=Kr(void 0,"radix-vue-dropdown-menu-trigger")),(s,a)=>(o.openBlock(),o.createBlock(o.unref(i6),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{id:o.unref(n).triggerId,ref:o.unref(r),type:s.as==="button"?"button":void 0,"as-child":e.asChild,as:s.as,"aria-haspopup":"menu","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-disabled":s.disabled?"":void 0,disabled:s.disabled,"data-state":o.unref(n).open.value?"open":"closed",onClick:a[0]||(a[0]=async l=>{var u;!s.disabled&&l.button===0&&l.ctrlKey===!1&&((u=o.unref(n))==null||u.onOpenToggle(),await o.nextTick(),o.unref(n).open.value&&l.preventDefault())}),onKeydown:a[1]||(a[1]=o.withKeys(l=>{s.disabled||(["Enter"," "].includes(l.key)&&o.unref(n).onOpenToggle(),l.key==="ArrowDown"&&o.unref(n).onOpenChange(!0),["Enter"," ","ArrowDown"].includes(l.key)&&l.preventDefault())},["enter","space","arrow-down"]))},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["id","type","as-child","as","aria-expanded","aria-controls","data-disabled","disabled","data-state"])]),_:3}))}}),xP=o.defineComponent({__name:"DropdownMenuPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(f6),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),CP=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=Pt(t,e);Le();const r=m6(),i=o.ref(!1);function s(a){a.defaultPrevented||(i.value||setTimeout(()=>{var l;(l=r.triggerElement.value)==null||l.focus()},0),i.value=!1,a.preventDefault())}return r.contentId||(r.contentId=Kr(void 0,"radix-vue-dropdown-menu-content")),(a,l)=>{var u;return o.openBlock(),o.createBlock(o.unref(d6),o.mergeProps(o.unref(n),{id:o.unref(r).contentId,"aria-labelledby":(u=o.unref(r))==null?void 0:u.triggerId,style:{"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"},onCloseAutoFocus:s,onInteractOutside:l[0]||(l[0]=c=>{var f;if(c.defaultPrevented)return;const p=c.detail.originalEvent,m=p.button===0&&p.ctrlKey===!0,g=p.button===2||m;(!o.unref(r).modal.value||g)&&(i.value=!0),(f=o.unref(r).triggerElement.value)!=null&&f.contains(c.target)&&c.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["id","aria-labelledby"])}}}),kP=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(X1),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),EP=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(dP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),SP=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=la(e);return Le(),(i,s)=>(o.openBlock(),o.createBlock(o.unref(lP),o.normalizeProps(o.guardReactiveProps({...n,...o.unref(r)})),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16))}}),_P=o.defineComponent({__name:"DropdownMenuItemIndicator",props:{forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(aP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),TP=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{default:"label"}},setup(t){const e=t;return Le(),(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps(e,{onMousedown:r[0]||(r[0]=i=>{!i.defaultPrevented&&i.detail>1&&i.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[El,AP]=zt("PopoverRoot"),MP=o.defineComponent({__name:"PopoverRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},modal:{type:Boolean,default:!1}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e,{modal:i}=o.toRefs(n),s=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(!1);return AP({contentId:"",modal:i,open:s,onOpenChange:u=>{s.value=u},onOpenToggle:()=>{s.value=!s.value},triggerElement:a,hasCustomAnchor:l}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default",{open:o.unref(s)})]),_:3}))}}),OP=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=El(),{forwardRef:r,currentElement:i}=Le();return o.onMounted(()=>{n.triggerElement.value=i.value}),(s,a)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(n).hasCustomAnchor.value?o.unref(Ye):o.unref(Qu)),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{ref:o.unref(r),type:s.as==="button"?"button":void 0,"aria-haspopup":"dialog","aria-expanded":o.unref(n).open.value,"aria-controls":o.unref(n).contentId,"data-state":o.unref(n).open.value?"open":"closed",as:s.as,"as-child":e.asChild,onClick:o.unref(n).onOpenToggle},{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},8,["type","aria-expanded","aria-controls","data-state","as","as-child","onClick"])]),_:3}))}}),BP=o.defineComponent({__name:"PopoverPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),g6=o.defineComponent({__name:"PopoverContentImpl",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=er(n),{forwardRef:s}=Le(),a=El();return R1(),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",loop:"",trapped:l.trapFocus,onMountAutoFocus:u[5]||(u[5]=c=>r("openAutoFocus",c)),onUnmountAutoFocus:u[6]||(u[6]=c=>r("closeAutoFocus",c))},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":l.disableOutsidePointerEvents,onPointerDownOutside:u[0]||(u[0]=c=>r("pointerDownOutside",c)),onInteractOutside:u[1]||(u[1]=c=>r("interactOutside",c)),onEscapeKeyDown:u[2]||(u[2]=c=>r("escapeKeyDown",c)),onFocusOutside:u[3]||(u[3]=c=>r("focusOutside",c)),onDismiss:u[4]||(u[4]=c=>o.unref(a).onOpenChange(!1))},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps(o.unref(i),{id:o.unref(a).contentId,ref:o.unref(s),"data-state":o.unref(a).open.value?"open":"closed",role:"dialog",style:{"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["id","data-state"])]),_:3},8,["disable-outside-pointer-events"])]),_:3},8,["trapped"]))}}),IP=o.defineComponent({__name:"PopoverContentModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=o.ref(!1);Cf(!0);const a=Pt(n,r),{forwardRef:l,currentElement:u}=Le();return Sf(u),(c,f)=>(o.openBlock(),o.createBlock(g6,o.mergeProps(o.unref(a),{ref:o.unref(l),"trap-focus":o.unref(i).open.value,"disable-outside-pointer-events":"",onCloseAutoFocus:f[0]||(f[0]=o.withModifiers(p=>{var m;r("closeAutoFocus",p),s.value||(m=o.unref(i).triggerElement.value)==null||m.focus()},["prevent"])),onPointerDownOutside:f[1]||(f[1]=p=>{r("pointerDownOutside",p);const m=p.detail.originalEvent,g=m.button===0&&m.ctrlKey===!0,b=m.button===2||g;s.value=b}),onFocusOutside:f[2]||(f[2]=o.withModifiers(()=>{},["prevent"]))}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["trap-focus"]))}}),RP=o.defineComponent({__name:"PopoverContentNonModal",props:{trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=o.ref(!1),a=o.ref(!1),l=Pt(n,r);return(u,c)=>(o.openBlock(),o.createBlock(g6,o.mergeProps(o.unref(l),{"trap-focus":!1,"disable-outside-pointer-events":!1,onCloseAutoFocus:c[0]||(c[0]=f=>{var p;r("closeAutoFocus",f),f.defaultPrevented||(s.value||(p=o.unref(i).triggerElement.value)==null||p.focus(),f.preventDefault()),s.value=!1,a.value=!1}),onInteractOutside:c[1]||(c[1]=async f=>{var p;r("interactOutside",f),f.defaultPrevented||(s.value=!0,f.detail.originalEvent.type==="pointerdown"&&(a.value=!0));const m=f.target;(p=o.unref(i).triggerElement.value)!=null&&p.contains(m)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a.value&&f.preventDefault()})}),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16))}}),LP=o.defineComponent({__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=El(),s=Pt(n,r),{forwardRef:a}=Le();return i.contentId||(i.contentId=Kr(void 0,"radix-vue-popover-content")),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[o.unref(i).modal.value?(o.openBlock(),o.createBlock(IP,o.mergeProps({key:0},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(RP,o.mergeProps({key:1},o.unref(s),{ref:o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),DP=o.defineComponent({__name:"PopoverAnchor",props:{element:{},asChild:{type:Boolean},as:{}},setup(t){const e=t;Le();const n=El();return o.onBeforeMount(()=>{n.hasCustomAnchor.value=!0}),o.onUnmounted(()=>{n.hasCustomAnchor.value=!1}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Qu),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),[Xr,PP]=zt("ScrollAreaRoot"),VP=o.defineComponent({__name:"ScrollAreaRoot",props:{type:{default:"hover"},dir:{},scrollHideDelay:{default:600},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,r=o.ref(0),i=o.ref(0),s=o.ref(),a=o.ref(),l=o.ref(),u=o.ref(),c=o.ref(!1),f=o.ref(!1),{type:p,dir:m,scrollHideDelay:g}=o.toRefs(n),b=aa(m);function v(){var E;(E=s.value)==null||E.scrollTo({top:0})}function y(){var E;(E=s.value)==null||E.scrollTo({top:0,left:0})}e({viewport:s,scrollTop:v,scrollTopLeft:y});const{forwardRef:x,currentElement:k}=Le();return PP({type:p,dir:b,scrollHideDelay:g,scrollArea:k,viewport:s,onViewportChange:E=>{s.value=E||void 0},content:a,onContentChange:E=>{a.value=E},scrollbarX:l,scrollbarXEnabled:c,scrollbarY:u,scrollbarYEnabled:f,onScrollbarXChange:E=>{l.value=E||void 0},onScrollbarYChange:E=>{u.value=E||void 0},onScrollbarXEnabledChange:E=>{c.value=E},onScrollbarYEnabledChange:E=>{f.value=E},onCornerWidthChange:E=>{r.value=E},onCornerHeightChange:E=>{i.value=E}}),(E,C)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(x),"as-child":n.asChild,as:E.as,dir:o.unref(b),style:o.normalizeStyle({position:"relative","--radix-scroll-area-corner-width":`${r.value}px`,"--radix-scroll-area-corner-height":`${i.value}px`})},{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default")]),_:3},8,["as-child","as","dir","style"]))}}),FP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t,{expose:e}){const n=t,{nonce:r}=o.toRefs(n),i=o6(r),s=Xr(),a=o.ref();o.onMounted(()=>{s.onViewportChange(a.value),s.onContentChange(u.value)}),e({viewportElement:a});const{forwardRef:l,currentElement:u}=Le();return(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",o.mergeProps({ref_key:"viewportElement",ref:a,"data-radix-scroll-area-viewport":"",style:{overflowX:o.unref(s).scrollbarXEnabled.value?"scroll":"hidden",overflowY:o.unref(s).scrollbarYEnabled.value?"scroll":"hidden"}},c.$attrs,{tabindex:0}),[o.createVNode(o.unref(Ye),{ref:o.unref(l),style:o.normalizeStyle({minWidth:o.unref(s).scrollbarXEnabled.value?"fit-content":void 0}),"as-child":n.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},8,["style","as-child","as"])],16),o.createVNode(o.unref(Ye),{as:"style",nonce:o.unref(i)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-radix-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")]),_:1},8,["nonce"])],64))}});function b6(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function Rf(t){const e=v6(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function v6(t,e){const n=t/e;return Number.isNaN(n)?0:n}function $P(t,e=()=>{}){let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function i(){const s={left:t.scrollLeft,top:t.scrollTop},a=n.left!==s.left,l=n.top!==s.top;(a||l)&&e(),n=s,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)}function y6(t,e,n="ltr"){const r=Rf(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,s=e.scrollbar.size-i,a=e.content-e.viewport,l=s-r,u=n==="ltr"?[0,a]:[a*-1,0],c=A1(t,u[0],u[1]);return b6([0,a],[0,l])(c)}function Lf(t){return t?Number.parseInt(t,10):0}function HP(t,e,n,r="ltr"){const i=Rf(n),s=i/2,a=e||s,l=i-a,u=n.scrollbar.paddingStart+a,c=n.scrollbar.size-n.scrollbar.paddingEnd-l,f=n.content-n.viewport,p=r==="ltr"?[0,f]:[f*-1,0];return b6([u,c],p)(t)}function w6(t,e){return t>0&&t<e}const x6=o.defineComponent({__name:"ScrollAreaScrollbarImpl",props:{isHorizontal:{type:Boolean}},emits:["onDragScroll","onWheelScroll","onThumbPointerDown"],setup(t,{emit:e}){const n=t,r=e,i=Xr(),s=Df(),a=Pf(),{forwardRef:l,currentElement:u}=Le(),c=o.ref(""),f=o.ref();function p(x){var k,E;if(f.value){const C=x.clientX-((k=f.value)==null?void 0:k.left),_=x.clientY-((E=f.value)==null?void 0:E.top);r("onDragScroll",{x:C,y:_})}}function m(x){x.button===0&&(x.target.setPointerCapture(x.pointerId),f.value=u.value.getBoundingClientRect(),c.value=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",i.viewport&&(i.viewport.value.style.scrollBehavior="auto"),p(x))}function g(x){p(x)}function b(x){const k=x.target;k.hasPointerCapture(x.pointerId)&&k.releasePointerCapture(x.pointerId),document.body.style.webkitUserSelect=c.value,i.viewport&&(i.viewport.value.style.scrollBehavior=""),f.value=void 0}function v(x){var k;const E=x.target,C=(k=u.value)==null?void 0:k.contains(E),_=s.sizes.value.content-s.sizes.value.viewport;C&&s.handleWheelScroll(x,_)}o.onMounted(()=>{document.addEventListener("wheel",v,{passive:!1})}),o.onUnmounted(()=>{document.removeEventListener("wheel",v)});function y(){var x,k,E,C,_;u.value&&(n.isHorizontal?s.handleSizeChange({content:((x=i.viewport.value)==null?void 0:x.scrollWidth)??0,viewport:((k=i.viewport.value)==null?void 0:k.offsetWidth)??0,scrollbar:{size:u.value.clientWidth??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}):s.handleSizeChange({content:((E=i.viewport.value)==null?void 0:E.scrollHeight)??0,viewport:((C=i.viewport.value)==null?void 0:C.offsetHeight)??0,scrollbar:{size:((_=u.value)==null?void 0:_.clientHeight)??0,paddingStart:Lf(getComputedStyle(u.value).paddingLeft),paddingEnd:Lf(getComputedStyle(u.value).paddingRight)}}))}return Cl(u,y),Cl(i.content,y),(x,k)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(l),style:{position:"absolute"},"data-scrollbarimpl":"",as:o.unref(a).as.value,"as-child":o.unref(a).asChild.value,onPointerdown:m,onPointermove:g,onPointerup:b},{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},8,["as","as-child"]))}}),zP=o.defineComponent({__name:"ScrollAreaScrollbarX",setup(t){const e=Xr(),n=Df(),{forwardRef:r,currentElement:i}=Le();o.onMounted(()=>{i.value&&e.onScrollbarXChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(x6,{ref:o.unref(r),"is-horizontal":!0,"data-orientation":"horizontal",style:o.normalizeStyle({bottom:0,left:o.unref(e).dir.value==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.unref(e).dir.value==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.x))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),UP=o.defineComponent({__name:"ScrollAreaScrollbarY",setup(t){const e=Xr(),n=Df(),{forwardRef:r,currentElement:i}=Le();o.onMounted(()=>{i.value&&e.onScrollbarYChange(i.value)});const s=o.computed(()=>n.sizes.value);return(a,l)=>(o.openBlock(),o.createBlock(x6,{ref:o.unref(r),"is-horizontal":!1,"data-orientation":"vertical",style:o.normalizeStyle({top:0,right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":s.value?`${o.unref(Rf)(s.value)}px`:void 0}),onOnDragScroll:l[0]||(l[0]=u=>o.unref(n).onDragScroll(u.y))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["style"]))}}),[Df,WP]=zt("ScrollAreaScrollbarVisible"),Y1=o.defineComponent({__name:"ScrollAreaScrollbarVisible",setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),i=o.ref({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),s=o.computed(()=>{const x=v6(i.value.viewport,i.value.content);return x>0&&x<1}),a=o.ref(),l=o.ref(0);function u(x,k){if(g.value){const E=e.viewport.value.scrollLeft+x.deltaY;e.viewport.value.scrollLeft=E,w6(E,k)&&x.preventDefault()}else{const E=e.viewport.value.scrollTop+x.deltaY;e.viewport.value.scrollTop=E,w6(E,k)&&x.preventDefault()}}function c(x,k){g.value?l.value=k.x:l.value=k.y}function f(x){l.value=0}function p(x){i.value=x}function m(x,k){return HP(x,l.value,i.value,k)}const g=o.computed(()=>n.isHorizontal.value);function b(x){g.value?e.viewport.value.scrollLeft=m(x,e.dir.value):e.viewport.value.scrollTop=m(x)}function v(){if(g.value){if(e.viewport.value&&a.value){const x=e.viewport.value.scrollLeft,k=y6(x,i.value,e.dir.value);a.value.style.transform=`translate3d(${k}px, 0, 0)`}}else if(e.viewport.value&&a.value){const x=e.viewport.value.scrollTop,k=y6(x,i.value);a.value.style.transform=`translate3d(0, ${k}px, 0)`}}function y(x){a.value=x}return WP({sizes:i,hasThumb:s,handleWheelScroll:u,handleThumbDown:c,handleThumbUp:f,handleSizeChange:p,onThumbPositionChange:v,onThumbChange:y,onDragScroll:b}),(x,k)=>g.value?(o.openBlock(),o.createBlock(zP,o.mergeProps({key:0},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16)):(o.openBlock(),o.createBlock(UP,o.mergeProps({key:1},x.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default")]),_:3},16))}}),C6=o.defineComponent({__name:"ScrollAreaScrollbarAuto",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),i=o.ref(!1),s=Lx(()=>{if(e.viewport.value){const a=e.viewport.value.offsetWidth<e.viewport.value.scrollWidth,l=e.viewport.value.offsetHeight<e.viewport.value.scrollHeight;i.value=n.isHorizontal.value?a:l}},10);return o.onMounted(()=>s()),Cl(e.viewport,s),Cl(e.content,s),(a,l)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:a.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(a.$attrs,{ref:o.unref(r),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),jP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbarHover",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),{forwardRef:n}=Le();let r;const i=o.ref(!1);function s(){window.clearTimeout(r),i.value=!0}function a(){r=window.setTimeout(()=>{i.value=!1},e.scrollHideDelay.value)}return o.onMounted(()=>{const l=e.scrollArea.value;l&&(l.addEventListener("pointerenter",s),l.addEventListener("pointerleave",a))}),o.onUnmounted(()=>{const l=e.scrollArea.value;l&&(window.clearTimeout(r),l.removeEventListener("pointerenter",s),l.removeEventListener("pointerleave",a))}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||i.value},{default:o.withCtx(()=>[o.createVNode(C6,o.mergeProps(l.$attrs,{ref:o.unref(n),"data-state":i.value?"visible":"hidden"}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["data-state"])]),_:3},8,["present"]))}}),qP=o.defineComponent({__name:"ScrollAreaScrollbarScroll",props:{forceMount:{type:Boolean}},setup(t){const e=Xr(),n=Pf(),{forwardRef:r}=Le(),{state:i,dispatch:s}=zx("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});o.watchEffect(l=>{if(i.value==="idle"){const u=window.setTimeout(()=>s("HIDE"),e.scrollHideDelay.value);l(()=>{window.clearTimeout(u)})}});const a=Lx(()=>s("SCROLL_END"),100);return o.watchEffect(l=>{const u=e.viewport.value,c=n.isHorizontal.value?"scrollLeft":"scrollTop";if(u){let f=u[c];const p=()=>{const m=u[c];f!==m&&(s("SCROLL"),a()),f=m};u.addEventListener("scroll",p),l(()=>{u.removeEventListener("scroll",p)})}}),(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i)!=="hidden"},{default:o.withCtx(()=>[o.createVNode(Y1,o.mergeProps(l.$attrs,{ref:o.unref(r)}),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16)]),_:3},8,["present"]))}}),[Pf,KP]=zt("ScrollAreaScrollbar"),GP=o.defineComponent({inheritAttrs:!1,__name:"ScrollAreaScrollbar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:"div"}},setup(t){const e=t,{forwardRef:n}=Le(),r=Xr(),i=o.computed(()=>e.orientation==="horizontal");o.watch(i,()=>{i.value?r.onScrollbarXEnabledChange(!0):r.onScrollbarYEnabledChange(!0)},{immediate:!0}),o.onUnmounted(()=>{r.onScrollbarXEnabledChange(!1),r.onScrollbarYEnabledChange(!1)});const{orientation:s,forceMount:a,asChild:l,as:u}=o.toRefs(e);return KP({orientation:s,forceMount:a,isHorizontal:i,as:u,asChild:l}),(c,f)=>o.unref(r).type.value==="hover"?(o.openBlock(),o.createBlock(jP,o.mergeProps({key:0},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="scroll"?(o.openBlock(),o.createBlock(qP,o.mergeProps({key:1},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="auto"?(o.openBlock(),o.createBlock(C6,o.mergeProps({key:2},c.$attrs,{ref:o.unref(n),"force-mount":o.unref(a)}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["force-mount"])):o.unref(r).type.value==="always"?(o.openBlock(),o.createBlock(Y1,o.mergeProps({key:3},c.$attrs,{ref:o.unref(n),"data-state":"visible"}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),XP=o.defineComponent({__name:"ScrollAreaThumb",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Xr(),r=Df();function i(m){const g=m.target.getBoundingClientRect(),b=m.clientX-g.left,v=m.clientY-g.top;r.handleThumbDown(m,{x:b,y:v})}function s(m){r.handleThumbUp(m)}const{forwardRef:a,currentElement:l}=Le(),u=o.ref(),c=o.computed(()=>n.viewport.value);function f(){if(!u.value){const m=$P(c.value,r.onThumbPositionChange);u.value=m,r.onThumbPositionChange()}}const p=o.computed(()=>r.sizes.value);return SL(p,()=>{r.onThumbChange(l.value),c.value&&(r.onThumbPositionChange(),c.value.addEventListener("scroll",f))}),o.onUnmounted(()=>{var m;c.value.removeEventListener("scroll",f),(m=n.viewport.value)==null||m.removeEventListener("scroll",f)}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(a),"data-state":o.unref(r).hasThumb?"visible":"hidden",style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)"},"as-child":e.asChild,as:m.as,onPointerdown:i,onPointerup:s},{default:o.withCtx(()=>[o.renderSlot(m.$slots,"default")]),_:3},8,["data-state","as-child","as"]))}}),YP=o.defineComponent({__name:"ScrollAreaCornerImpl",setup(t){const e=Xr(),n=o.ref(0),r=o.ref(0),i=o.computed(()=>!!n.value&&!!r.value);function s(){var l;const u=((l=e.scrollbarX.value)==null?void 0:l.offsetHeight)||0;e.onCornerHeightChange(u),r.value=u}function a(){var l;const u=((l=e.scrollbarY.value)==null?void 0:l.offsetWidth)||0;e.onCornerWidthChange(u),n.value=u}return Cl(e.scrollbarX.value,s),Cl(e.scrollbarY.value,a),o.watch(()=>e.scrollbarX.value,s),o.watch(()=>e.scrollbarY.value,a),(l,u)=>{var c;return i.value?(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({key:0,style:{width:`${n.value}px`,height:`${r.value}px`,position:"absolute",right:o.unref(e).dir.value==="ltr"?0:void 0,left:o.unref(e).dir.value==="rtl"?0:void 0,bottom:0}},(c=l.$parent)==null?void 0:c.$props),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["style"])):o.createCommentVNode("",!0)}}}),JP=o.defineComponent({__name:"ScrollAreaCorner",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Le(),r=Xr(),i=o.computed(()=>!!r.scrollbarX.value&&!!r.scrollbarY.value),s=o.computed(()=>r.type.value!=="scroll"&&i.value);return(a,l)=>s.value?(o.openBlock(),o.createBlock(YP,o.mergeProps({key:0},e,{ref:o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),ZP=["default-value"],QP=o.defineComponent({__name:"BubbleSelect",props:{autocomplete:{},autofocus:{type:Boolean},disabled:{type:Boolean},form:{},multiple:{type:Boolean},name:{},required:{type:Boolean},size:{},value:{}},setup(t){const e=t,{value:n}=o.toRefs(e),r=o.ref();return(i,s)=>(o.openBlock(),o.createBlock(o.unref(t6),{"as-child":""},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("select",o.mergeProps({ref_key:"selectElement",ref:r},e,{"onUpdate:modelValue":s[0]||(s[0]=a=>o.isRef(n)?n.value=a:null),"default-value":o.unref(n)}),[o.renderSlot(i.$slots,"default")],16,ZP),[[o.vModelSelect,o.unref(n)]])]),_:3}))}}),NP={key:0,value:""},[ua,k6]=zt("SelectRoot"),[eV,tV]=zt("SelectRoot"),nV=o.defineComponent({__name:"SelectRoot",props:{open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},defaultValue:{default:""},modelValue:{default:void 0},dir:{},name:{},autocomplete:{},disabled:{type:Boolean},required:{type:Boolean}},emits:["update:modelValue","update:open"],setup(t,{emit:e}){const n=t,r=e,i=Tr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),s=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0}),a=o.ref(),l=o.ref(),u=o.ref({x:0,y:0}),c=o.ref(!1),{required:f,disabled:p,dir:m}=o.toRefs(n),g=aa(m);k6({triggerElement:a,onTriggerChange:x=>{a.value=x},valueElement:l,onValueElementChange:x=>{l.value=x},valueElementHasChildren:c,onValueElementHasChildrenChange:x=>{c.value=x},contentId:"",modelValue:i,onValueChange:x=>{i.value=x},open:s,required:f,onOpenChange:x=>{s.value=x},dir:g,triggerPointerDownPosRef:u,disabled:p});const b=L1(a),v=o.ref(new Set),y=o.computed(()=>Array.from(v.value).map(x=>{var k;return(k=x.props)==null?void 0:k.value}).join(";"));return tV({onNativeOptionAdd:x=>{v.value.add(x)},onNativeOptionRemove:x=>{v.value.delete(x)}}),(x,k)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(x.$slots,"default",{modelValue:o.unref(i),open:o.unref(s)}),o.unref(b)?(o.openBlock(),o.createBlock(QP,o.mergeProps({key:y.value},x.$attrs,{"aria-hidden":"true",tabindex:"-1",required:o.unref(f),name:x.name,autocomplete:x.autocomplete,disabled:o.unref(p),value:o.unref(i),onChange:k[0]||(k[0]=E=>i.value=E.target.value)}),{default:o.withCtx(()=>[o.unref(i)===void 0?(o.openBlock(),o.createElementBlock("option",NP)):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(Array.from(v.value),E=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(E),o.mergeProps({ref_for:!0},E.props,{key:E.key??""}),null,16))),128))]),_:1},16,["required","name","autocomplete","disabled","value"])):o.createCommentVNode("",!0)]),_:3}))}}),rV=[" ","Enter","ArrowUp","ArrowDown"],oV=[" ","Enter"],bo=10;function E6(t){return t===""||pL(t)}const iV=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=ua(),r=o.computed(()=>{var g;return((g=n.disabled)==null?void 0:g.value)||e.disabled}),{forwardRef:i,currentElement:s}=Le();n.contentId||(n.contentId=Kr(void 0,"radix-vue-select-content")),o.onMounted(()=>{n.triggerElement=s});const{injectCollection:a}=Yu(),l=a(),{search:u,handleTypeaheadSearch:c,resetTypeahead:f}=P1(l);function p(){r.value||(n.onOpenChange(!0),f())}function m(g){p(),n.triggerPointerDownPosRef.value={x:Math.round(g.pageX),y:Math.round(g.pageY)}}return(g,b)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>{var v,y,x,k;return[o.createVNode(o.unref(Ye),{ref:o.unref(i),role:"combobox",type:g.as==="button"?"button":void 0,"aria-controls":o.unref(n).contentId,"aria-expanded":o.unref(n).open.value||!1,"aria-required":(v=o.unref(n).required)==null?void 0:v.value,"aria-autocomplete":"none",disabled:r.value,dir:(y=o.unref(n))==null?void 0:y.dir.value,"data-state":(x=o.unref(n))!=null&&x.open.value?"open":"closed","data-disabled":r.value?"":void 0,"data-placeholder":o.unref(E6)((k=o.unref(n).modelValue)==null?void 0:k.value)?"":void 0,"as-child":g.asChild,as:g.as,onClick:b[0]||(b[0]=E=>{var C;(C=E==null?void 0:E.currentTarget)==null||C.focus()}),onPointerdown:b[1]||(b[1]=E=>{if(E.pointerType==="touch")return E.preventDefault();const C=E.target;C.hasPointerCapture(E.pointerId)&&C.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&(m(E),E.preventDefault())}),onPointerup:b[2]||(b[2]=o.withModifiers(E=>{E.pointerType==="touch"&&m(E)},["prevent"])),onKeydown:b[3]||(b[3]=E=>{const C=o.unref(u)!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&C&&E.key===" "||(o.unref(c)(E.key),o.unref(rV).includes(E.key)&&(p(),E.preventDefault()))})},{default:o.withCtx(()=>[o.renderSlot(g.$slots,"default")]),_:3},8,["type","aria-controls","aria-expanded","aria-required","disabled","dir","data-state","data-disabled","data-placeholder","as-child","as"])]}),_:3}))}}),sV=o.defineComponent({__name:"SelectPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[J1,aV]=zt("SelectItemAlignedPosition"),lV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemAlignedPosition",props:{asChild:{type:Boolean},as:{}},emits:["placed"],setup(t,{emit:e}){const n=t,r=e,{injectCollection:i}=Yu(),s=ua(),a=ca(),l=i(),u=o.ref(!1),c=o.ref(!0),f=o.ref(),{forwardRef:p,currentElement:m}=Le(),{viewport:g,selectedItem:b,selectedItemText:v,focusSelectedItem:y}=a;function x(){if(s.triggerElement.value&&s.valueElement.value&&f.value&&m.value&&g!=null&&g.value&&b!=null&&b.value&&v!=null&&v.value){const C=s.triggerElement.value.getBoundingClientRect(),_=m.value.getBoundingClientRect(),T=s.valueElement.value.getBoundingClientRect(),A=v.value.getBoundingClientRect();if(s.dir.value!=="rtl"){const J=A.left-_.left,te=T.left-J,ne=C.left-te,se=C.width+ne,ce=Math.max(se,_.width),_e=window.innerWidth-bo,Te=A1(te,bo,Math.max(bo,_e-ce));f.value.style.minWidth=`${se}px`,f.value.style.left=`${Te}px`}else{const J=_.right-A.right,te=window.innerWidth-T.right-J,ne=window.innerWidth-C.right-te,se=C.width+ne,ce=Math.max(se,_.width),_e=window.innerWidth-bo,Te=A1(te,bo,Math.max(bo,_e-ce));f.value.style.minWidth=`${se}px`,f.value.style.right=`${Te}px`}const V=l.value,O=window.innerHeight-bo*2,B=g.value.scrollHeight,$=window.getComputedStyle(m.value),H=Number.parseInt($.borderTopWidth,10),X=Number.parseInt($.paddingTop,10),ee=Number.parseInt($.borderBottomWidth,10),z=Number.parseInt($.paddingBottom,10),L=H+X+B+z+ee,D=Math.min(b.value.offsetHeight*5,L),F=window.getComputedStyle(g.value),R=Number.parseInt(F.paddingTop,10),K=Number.parseInt(F.paddingBottom,10),Y=C.top+C.height/2-bo,ie=O-Y,fe=b.value.offsetHeight/2,ke=b.value.offsetTop+fe,re=H+X+ke,me=L-re;if(re<=Y){const J=b.value===V[V.length-1];f.value.style.bottom="0px";const te=m.value.clientHeight-g.value.offsetTop-g.value.offsetHeight,ne=Math.max(ie,fe+(J?K:0)+te+ee),se=re+ne;f.value.style.height=`${se}px`}else{const J=b.value===V[0];f.value.style.top="0px";const te=Math.max(Y,H+g.value.offsetTop+(J?R:0)+fe)+me;f.value.style.height=`${te}px`,g.value.scrollTop=re-Y+g.value.offsetTop}f.value.style.margin=`${bo}px 0`,f.value.style.minHeight=`${D}px`,f.value.style.maxHeight=`${O}px`,r("placed"),requestAnimationFrame(()=>u.value=!0)}}const k=o.ref("");o.onMounted(async()=>{await o.nextTick(),x(),m.value&&(k.value=window.getComputedStyle(m.value).zIndex)});function E(C){C&&c.value===!0&&(x(),y==null||y(),c.value=!1)}return aV({contentWrapper:f,shouldExpandOnScrollRef:u,onScrollButtonChange:E}),(C,_)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentWrapperElement",ref:f,style:o.normalizeStyle({display:"flex",flexDirection:"column",position:"fixed",zIndex:k.value})},[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(p),style:{boxSizing:"border-box",maxHeight:"100%"}},{...C.$attrs,...n}),{default:o.withCtx(()=>[o.renderSlot(C.$slots,"default")]),_:3},16)],4))}}),uV=o.defineComponent({__name:"SelectPopperPosition",props:{side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{default:bo},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=er(t);return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Bf),o.mergeProps(o.unref(e),{style:{boxSizing:"border-box","--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),Sl={onViewportChange:()=>{},itemTextRefCallback:()=>{},itemRefCallback:()=>{}},[ca,cV]=zt("SelectContent"),dV=o.defineComponent({__name:"SelectContentImpl",props:{position:{default:"item-aligned"},bodyLock:{type:Boolean,default:!0},side:{},sideOffset:{},align:{default:"start"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=ua();R1(),Cf(n.bodyLock);const{createCollection:s}=Yu(),a=o.ref();Sf(a);const l=s(a),{search:u,handleTypeaheadSearch:c}=P1(l),f=o.ref(),p=o.ref(),m=o.ref(),g=o.ref(!1),b=o.ref(!1);function v(){p.value&&a.value&&U1([p.value,a.value])}o.watch(g,()=>{v()});const{onOpenChange:y,triggerPointerDownPosRef:x}=i;o.watchEffect(_=>{if(!a.value)return;let T={x:0,y:0};const A=O=>{var B,$;T={x:Math.abs(Math.round(O.pageX)-(((B=x.value)==null?void 0:B.x)??0)),y:Math.abs(Math.round(O.pageY)-((($=x.value)==null?void 0:$.y)??0))}},V=O=>{var B;O.pointerType!=="touch"&&(T.x<=10&&T.y<=10?O.preventDefault():(B=a.value)!=null&&B.contains(O.target)||y(!1),document.removeEventListener("pointermove",A),x.value=null)};x.value!==null&&(document.addEventListener("pointermove",A),document.addEventListener("pointerup",V,{capture:!0,once:!0})),_(()=>{document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",V,{capture:!0})})});function k(_){const T=_.ctrlKey||_.altKey||_.metaKey;if(_.key==="Tab"&&_.preventDefault(),!T&&_.key.length===1&&c(_.key),["ArrowUp","ArrowDown","Home","End"].includes(_.key)){let A=l.value;if(["ArrowUp","End"].includes(_.key)&&(A=A.slice().reverse()),["ArrowUp","ArrowDown"].includes(_.key)){const V=_.target,O=A.indexOf(V);A=A.slice(O+1)}setTimeout(()=>U1(A)),_.preventDefault()}}const E=o.computed(()=>n.position==="popper"?n:{}),C=er(E.value);return cV({content:a,viewport:f,onViewportChange:_=>{f.value=_},itemRefCallback:(_,T,A)=>{var V,O;const B=!b.value&&!A;(((V=i.modelValue)==null?void 0:V.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||B)&&(p.value=_,B&&(b.value=!0))},selectedItem:p,selectedItemText:m,onItemLeave:()=>{var _;(_=a.value)==null||_.focus()},itemTextRefCallback:(_,T,A)=>{var V,O;const B=!b.value&&!A;(((V=i.modelValue)==null?void 0:V.value)!==void 0&&((O=i.modelValue)==null?void 0:O.value)===T||B)&&(m.value=_)},focusSelectedItem:v,position:n.position,isPositioned:g,searchRef:u}),(_,T)=>(o.openBlock(),o.createBlock(o.unref(Tf),{"as-child":"",onMountAutoFocus:T[6]||(T[6]=o.withModifiers(()=>{},["prevent"])),onUnmountAutoFocus:T[7]||(T[7]=A=>{var V;r("closeAutoFocus",A),!A.defaultPrevented&&((V=o.unref(i).triggerElement.value)==null||V.focus({preventScroll:!0}),A.preventDefault())})},{default:o.withCtx(()=>[o.createVNode(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":"",onFocusOutside:T[2]||(T[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:T[3]||(T[3]=A=>o.unref(i).onOpenChange(!1)),onEscapeKeyDown:T[4]||(T[4]=A=>r("escapeKeyDown",A)),onPointerDownOutside:T[5]||(T[5]=A=>r("pointerDownOutside",A))},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(_.position==="popper"?uV:lV),o.mergeProps({..._.$attrs,...o.unref(C)},{id:o.unref(i).contentId,ref:A=>{a.value=o.unref(go)(A)},role:"listbox","data-state":o.unref(i).open.value?"open":"closed",dir:o.unref(i).dir.value,style:{display:"flex",flexDirection:"column",outline:"none"},onContextmenu:T[0]||(T[0]=o.withModifiers(()=>{},["prevent"])),onPlaced:T[1]||(T[1]=A=>g.value=!0),onKeydown:k}),{default:o.withCtx(()=>[o.renderSlot(_.$slots,"default")]),_:3},16,["id","data-state","dir","onKeydown"]))]),_:3})]),_:3}))}}),fV=o.defineComponent({inheritAttrs:!1,__name:"SelectProvider",props:{context:{}},setup(t){return k6(t.context),(e,n)=>o.renderSlot(e.$slots,"default")}}),pV={key:1},hV=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=Pt(n,e),i=ua(),s=o.ref();o.onMounted(()=>{s.value=new DocumentFragment});const a=o.ref(),l=o.computed(()=>n.forceMount||i.open.value);return(u,c)=>{var f;return l.value?(o.openBlock(),o.createBlock(o.unref(Gr),{key:0,ref_key:"presenceRef",ref:a,present:!0},{default:o.withCtx(()=>[o.createVNode(dV,o.normalizeProps(o.guardReactiveProps({...o.unref(r),...u.$attrs})),{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},16)]),_:3},512)):!((f=a.value)!=null&&f.present)&&s.value?(o.openBlock(),o.createElementBlock("div",pV,[(o.openBlock(),o.createBlock(o.Teleport,{to:s.value},[o.createVNode(fV,{context:o.unref(i)},{default:o.withCtx(()=>[o.renderSlot(u.$slots,"default")]),_:3},8,["context"])],8,["to"]))])):o.createCommentVNode("",!0)}}}),mV=o.defineComponent({__name:"SelectSeparator",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),[S6,gV]=zt("SelectItem"),bV=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{disabled:n}=o.toRefs(e),r=ua(),i=ca(Sl),{forwardRef:s,currentElement:a}=Le(),l=o.computed(()=>{var v;return((v=r.modelValue)==null?void 0:v.value)===e.value}),u=o.ref(!1),c=o.ref(e.textValue??""),f=Kr(void 0,"radix-vue-select-item-text");async function p(v){await o.nextTick(),!(v!=null&&v.defaultPrevented)&&(n.value||(r.onValueChange(e.value),r.onOpenChange(!1)))}async function m(v){var y;await o.nextTick(),!v.defaultPrevented&&(n.value?(y=i.onItemLeave)==null||y.call(i):v.currentTarget.focus({preventScroll:!0}))}async function g(v){var y;await o.nextTick(),!v.defaultPrevented&&v.currentTarget===Wn()&&((y=i.onItemLeave)==null||y.call(i))}async function b(v){var y;await o.nextTick(),!(v.defaultPrevented||((y=i.searchRef)==null?void 0:y.value)!==""&&v.key===" ")&&(oV.includes(v.key)&&p(),v.key===" "&&v.preventDefault())}if(e.value==="")throw new Error("A <SelectItem /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return o.onMounted(()=>{a.value&&i.itemRefCallback(a.value,e.value,e.disabled)}),gV({value:e.value,disabled:n,textId:f,isSelected:l,onItemTextChange:v=>{c.value=((c.value||(v==null?void 0:v.textContent))??"").trim()}}),(v,y)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(s),role:"option","data-radix-vue-collection-item":"","aria-labelledby":o.unref(f),"data-highlighted":u.value?"":void 0,"aria-selected":l.value,"data-state":l.value?"checked":"unchecked","aria-disabled":o.unref(n)||void 0,"data-disabled":o.unref(n)?"":void 0,tabindex:o.unref(n)?void 0:-1,as:v.as,"as-child":v.asChild,onFocus:y[0]||(y[0]=x=>u.value=!0),onBlur:y[1]||(y[1]=x=>u.value=!1),onPointerup:p,onPointerdown:y[2]||(y[2]=x=>{x.currentTarget.focus({preventScroll:!0})}),onTouchend:y[3]||(y[3]=o.withModifiers(()=>{},["prevent","stop"])),onPointermove:m,onPointerleave:g,onKeydown:b},{default:o.withCtx(()=>[o.renderSlot(v.$slots,"default")]),_:3},8,["aria-labelledby","data-highlighted","aria-selected","data-state","aria-disabled","data-disabled","tabindex","as","as-child"]))}}),vV=o.defineComponent({__name:"SelectItemIndicator",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=S6();return(r,i)=>o.unref(n).isSelected.value?(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({key:0,"aria-hidden":"true"},e),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16)):o.createCommentVNode("",!0)}}),[gce,yV]=zt("SelectGroup"),wV=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t,n=Kr(void 0,"radix-vue-select-group");return yV({id:n}),(r,i)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({role:"group"},e,{"aria-labelledby":o.unref(n)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["aria-labelledby"]))}}),xV=o.defineComponent({inheritAttrs:!1,__name:"SelectItemText",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=t,n=ua(),r=ca(Sl),i=eV(),s=S6(),{forwardRef:a,currentElement:l}=Le(),u=o.computed(()=>{var c;return o.h("option",{key:s.value,value:s.value,disabled:s.disabled.value,textContent:(c=l.value)==null?void 0:c.textContent})});return o.onMounted(()=>{l.value&&(s.onItemTextChange(l.value),r.itemTextRefCallback(l.value,s.value,s.disabled.value),i.onNativeOptionAdd(u.value))}),o.onBeforeUnmount(()=>{i.onNativeOptionRemove(u.value)}),(c,f)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps({id:o.unref(s).textId,ref:o.unref(a)},{...e,...c.$attrs},{"data-item-text":""}),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16,["id"]),o.unref(s).isSelected.value&&o.unref(n).valueElement.value&&!o.unref(n).valueElementHasChildren.value?(o.openBlock(),o.createBlock(o.Teleport,{key:0,to:o.unref(n).valueElement.value},[o.renderSlot(c.$slots,"default")],8,["to"])):o.createCommentVNode("",!0)],64))}}),CV=o.defineComponent({__name:"SelectViewport",props:{nonce:{},asChild:{type:Boolean},as:{}},setup(t){const e=t,{nonce:n}=o.toRefs(e),r=o6(n),i=ca(Sl),s=i.position==="item-aligned"?J1():void 0,{forwardRef:a,currentElement:l}=Le();o.onMounted(()=>{i==null||i.onViewportChange(l.value)});const u=o.ref(0);function c(f){const p=f.currentTarget,{shouldExpandOnScrollRef:m,contentWrapper:g}=s??{};if(m!=null&&m.value&&g!=null&&g.value){const b=Math.abs(u.value-p.scrollTop);if(b>0){const v=window.innerHeight-bo*2,y=Number.parseFloat(g.value.style.minHeight),x=Number.parseFloat(g.value.style.height),k=Math.max(y,x);if(k<v){const E=k+b,C=Math.min(v,E),_=E-C;g.value.style.height=`${C}px`,g.value.style.bottom==="0px"&&(p.scrollTop=_>0?_:0,g.value.style.justifyContent="flex-end")}}}u.value=p.scrollTop}return(f,p)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(a),"data-radix-select-viewport":"",role:"presentation"},{...f.$attrs,...e},{style:{position:"relative",flex:1,overflow:"hidden auto"},onScroll:c}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16),o.createVNode(o.unref(Ye),{as:"style",nonce:o.unref(r)},{default:o.withCtx(()=>[o.createTextVNode(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-radix-select-viewport] { scrollbar-width:none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } [data-radix-select-viewport]::-webkit-scrollbar { display: none; } ")]),_:1},8,["nonce"])],64))}}),_6=o.defineComponent({__name:"SelectScrollButtonImpl",emits:["autoScroll"],setup(t,{emit:e}){const n=e,{injectCollection:r}=Yu(),i=r(),s=ca(Sl),a=o.ref(null);function l(){a.value!==null&&(window.clearInterval(a.value),a.value=null)}o.watchEffect(()=>{const f=i.value.find(p=>p===Wn());f==null||f.scrollIntoView({block:"nearest"})});function u(){a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}function c(){var f;(f=s.onItemLeave)==null||f.call(s),a.value===null&&(a.value=window.setInterval(()=>{n("autoScroll")},50))}return o.onBeforeUnmount(()=>l()),(f,p)=>{var m;return o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({"aria-hidden":"true",style:{flexShrink:0}},(m=f.$parent)==null?void 0:m.$props,{onPointerdown:u,onPointermove:c,onPointerleave:p[0]||(p[0]=()=>{l()})}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default")]),_:3},16)}}}),kV=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=Le(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){s.value=f.scrollTop>0};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_6,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop-c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),EV=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{}},setup(t){const e=ca(Sl),n=e.position==="item-aligned"?J1():void 0,{forwardRef:r,currentElement:i}=Le(),s=o.ref(!1);return o.watchEffect(a=>{var l,u;if((l=e.viewport)!=null&&l.value&&(u=e.isPositioned)!=null&&u.value){let c=function(){const p=f.scrollHeight-f.clientHeight;s.value=Math.ceil(f.scrollTop)<p};const f=e.viewport.value;c(),f.addEventListener("scroll",c),a(()=>f.removeEventListener("scroll",c))}}),o.watch(i,()=>{i.value&&(n==null||n.onScrollButtonChange(i.value))}),(a,l)=>s.value?(o.openBlock(),o.createBlock(_6,{key:0,ref:o.unref(r),onAutoScroll:l[0]||(l[0]=()=>{const{viewport:u,selectedItem:c}=o.unref(e);u!=null&&u.value&&c!=null&&c.value&&(u.value.scrollTop=u.value.scrollTop+c.value.offsetHeight)})},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},512)):o.createCommentVNode("",!0)}}),SV=o.defineComponent({__name:"SelectValue",props:{placeholder:{default:""},asChild:{type:Boolean},as:{default:"span"}},setup(t){const{forwardRef:e,currentElement:n}=Le(),r=ua(),i=o.useSlots();return o.onBeforeMount(()=>{var s;const a=!!wf((s=i==null?void 0:i.default)==null?void 0:s.call(i)).length;r.onValueElementHasChildrenChange(a)}),o.onMounted(()=>{r.valueElement=n}),(s,a)=>(o.openBlock(),o.createBlock(o.unref(Ye),{ref:o.unref(e),as:s.as,"as-child":s.asChild,style:{pointerEvents:"none"}},{default:o.withCtx(()=>{var l;return[o.unref(E6)((l=o.unref(r).modelValue)==null?void 0:l.value)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createTextVNode(o.toDisplayString(s.placeholder),1)],64)):o.renderSlot(s.$slots,"default",{key:1})]}),_:3},8,["as","as-child"]))}}),_V=o.defineComponent({__name:"SelectIcon",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){return(e,n)=>(o.openBlock(),o.createBlock(o.unref(Ye),{"aria-hidden":"true",as:e.as,"as-child":e.asChild},{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default",{},()=>[o.createTextVNode("▼")])]),_:3},8,["as","as-child"]))}}),TV=o.defineComponent({__name:"BaseSeparator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,n=["horizontal","vertical"];function r(l){return n.includes(l)}const i=o.computed(()=>r(e.orientation)?e.orientation:"horizontal"),s=o.computed(()=>i.value==="vertical"?e.orientation:void 0),a=o.computed(()=>e.decorative?{role:"none"}:{"aria-orientation":s.value,role:"separator"});return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Ye),o.mergeProps({as:l.as,"as-child":l.asChild,"data-orientation":i.value},a.value),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16,["as","as-child","data-orientation"]))}}),AV=o.defineComponent({__name:"Separator",props:{orientation:{default:"horizontal"},decorative:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(TV,o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});function MV(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}MV();const OV=["name","disabled","required","value","checked","data-state","data-disabled"],[BV,IV]=zt("SwitchRoot"),RV=o.defineComponent({__name:"SwitchRoot",props:{defaultChecked:{type:Boolean},checked:{type:Boolean,default:void 0},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{default:"on"},asChild:{type:Boolean},as:{default:"button"}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,{disabled:i}=o.toRefs(n),s=Tr(n,"checked",r,{defaultValue:n.defaultChecked,passive:n.checked===void 0});function a(){i.value||(s.value=!s.value)}const{forwardRef:l,currentElement:u}=Le(),c=L1(u),f=o.computed(()=>{var p;return n.id&&u.value?(p=document.querySelector(`[for="${n.id}"]`))==null?void 0:p.innerText:void 0});return IV({checked:s,toggleCheck:a,disabled:i}),(p,m)=>(o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(o.unref(Ye),o.mergeProps(p.$attrs,{id:p.id,ref:o.unref(l),role:"switch",type:p.as==="button"?"button":void 0,value:p.value,"aria-label":p.$attrs["aria-label"]||f.value,"aria-checked":o.unref(s),"aria-required":p.required,"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,"as-child":p.asChild,as:p.as,disabled:o.unref(i),onClick:a,onKeydown:o.withKeys(o.withModifiers(a,["prevent"]),["enter"])}),{default:o.withCtx(()=>[o.renderSlot(p.$slots,"default",{checked:o.unref(s)})]),_:3},16,["id","type","value","aria-label","aria-checked","aria-required","data-state","data-disabled","as-child","as","disabled","onKeydown"]),o.unref(c)?(o.openBlock(),o.createElementBlock("input",{key:0,type:"checkbox",name:p.name,tabindex:"-1","aria-hidden":"true",disabled:o.unref(i),required:p.required,value:p.value,checked:!!o.unref(s),"data-state":o.unref(s)?"checked":"unchecked","data-disabled":o.unref(i)?"":void 0,style:{transform:"translateX(-100%)",position:"absolute",pointerEvents:"none",opacity:0,margin:0}},null,8,OV)):o.createCommentVNode("",!0)],64))}}),LV=o.defineComponent({__name:"SwitchThumb",props:{asChild:{type:Boolean},as:{default:"span"}},setup(t){const e=BV();return Le(),(n,r)=>{var i;return o.openBlock(),o.createBlock(o.unref(Ye),{"data-state":(i=o.unref(e).checked)!=null&&i.value?"checked":"unchecked","data-disabled":o.unref(e).disabled.value?"":void 0,"as-child":n.asChild,as:n.as},{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},8,["data-state","data-disabled","as-child","as"])}}}),[Z1,DV]=zt("TabsRoot"),PV=o.defineComponent({__name:"TabsRoot",props:{defaultValue:{},orientation:{default:"horizontal"},dir:{},activationMode:{default:"automatic"},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,{orientation:i,dir:s}=o.toRefs(n),a=aa(s);Le();const l=Tr(n,"modelValue",r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),u=o.ref();return DV({modelValue:l,changeModelValue:c=>{l.value=c},orientation:i,dir:a,activationMode:n.activationMode,baseId:Kr(void 0,"radix-vue-tabs"),tabsList:u}),(c,f)=>(o.openBlock(),o.createBlock(o.unref(Ye),{dir:o.unref(a),"data-orientation":o.unref(i),"as-child":c.asChild,as:c.as},{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default",{modelValue:o.unref(l)})]),_:3},8,["dir","data-orientation","as-child","as"]))}}),VV=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean,default:!0},asChild:{type:Boolean},as:{}},setup(t){const e=t,{loop:n}=o.toRefs(e),{forwardRef:r,currentElement:i}=Le(),s=Z1();return s.tabsList=i,(a,l)=>(o.openBlock(),o.createBlock(o.unref(l6),{"as-child":"",orientation:o.unref(s).orientation.value,dir:o.unref(s).dir.value,loop:o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{ref:o.unref(r),role:"tablist","as-child":a.asChild,as:a.as,"aria-orientation":o.unref(s).orientation.value},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["as-child","as","aria-orientation"])]),_:3},8,["orientation","dir","loop"]))}});function T6(t,e){return`${t}-trigger-${e}`}function A6(t,e){return`${t}-content-${e}`}const FV=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const e=t,{forwardRef:n}=Le(),r=Z1(),i=o.computed(()=>T6(r.baseId,e.value)),s=o.computed(()=>A6(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value),l=o.ref(a.value);return o.onMounted(()=>{requestAnimationFrame(()=>{l.value=!1})}),(u,c)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:a.value,"force-mount":""},{default:o.withCtx(({present:f})=>[o.createVNode(o.unref(Ye),{id:s.value,ref:o.unref(n),"as-child":u.asChild,as:u.as,role:"tabpanel","data-state":a.value?"active":"inactive","data-orientation":o.unref(r).orientation.value,"aria-labelledby":i.value,hidden:!f.value,tabindex:"0",style:o.normalizeStyle({animationDuration:l.value?"0s":void 0})},{default:o.withCtx(()=>[u.forceMount||a.value?o.renderSlot(u.$slots,"default",{key:0}):o.createCommentVNode("",!0)]),_:2},1032,["id","as-child","as","data-state","data-orientation","aria-labelledby","hidden","style"])]),_:3},8,["present"]))}}),$V=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,{forwardRef:n}=Le(),r=Z1(),i=o.computed(()=>T6(r.baseId,e.value)),s=o.computed(()=>A6(r.baseId,e.value)),a=o.computed(()=>e.value===r.modelValue.value);return(l,u)=>(o.openBlock(),o.createBlock(o.unref(nP),{"as-child":"",focusable:!l.disabled,active:a.value},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),{id:i.value,ref:o.unref(n),role:"tab",type:l.as==="button"?"button":void 0,as:l.as,"as-child":l.asChild,"aria-selected":a.value?"true":"false","aria-controls":s.value,"data-state":a.value?"active":"inactive",disabled:l.disabled,"data-disabled":l.disabled?"":void 0,"data-orientation":o.unref(r).orientation.value,onMousedown:u[0]||(u[0]=o.withModifiers(c=>{!l.disabled&&c.ctrlKey===!1?o.unref(r).changeModelValue(l.value):c.preventDefault()},["left"])),onKeydown:u[1]||(u[1]=o.withKeys(c=>o.unref(r).changeModelValue(l.value),["enter","space"])),onFocus:u[2]||(u[2]=()=>{const c=o.unref(r).activationMode!=="manual";!a.value&&!l.disabled&&c&&o.unref(r).changeModelValue(l.value)})},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},8,["id","type","as","as-child","aria-selected","aria-controls","data-state","disabled","data-disabled","data-orientation"])]),_:3},8,["focusable","active"]))}}),HV=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{default:"button"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Tr(n,"pressed",r,{defaultValue:n.defaultValue,passive:n.pressed===void 0});function s(){i.value=!i.value}const a=o.computed(()=>i.value?"on":"off");return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Ye),{type:l.as==="button"?"button":void 0,"as-child":n.asChild,as:l.as,"aria-pressed":o.unref(i),"data-state":a.value,"data-disabled":l.disabled?"":void 0,disabled:l.disabled,onClick:s},{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default",{pressed:o.unref(i)})]),_:3},8,["type","as-child","as","aria-pressed","data-state","data-disabled","disabled"]))}}),M6="tooltip.open",[Q1,zV]=zt("TooltipProvider"),UV=o.defineComponent({inheritAttrs:!1,__name:"TooltipProvider",props:{delayDuration:{default:700},skipDelayDuration:{default:300},disableHoverableContent:{type:Boolean,default:!1},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean,default:!1}},setup(t){const e=t,{delayDuration:n,skipDelayDuration:r,disableHoverableContent:i,disableClosingTrigger:s,ignoreNonKeyboardFocus:a,disabled:l}=o.toRefs(e);Le();const u=o.ref(!0),c=o.ref(!1),{start:f,stop:p}=Dx(()=>{u.value=!0},r,{immediate:!1});return zV({isOpenDelayed:u,delayDuration:n,onOpen(){p(),u.value=!1},onClose(){f()},isPointerInTransitRef:c,disableHoverableContent:i,disableClosingTrigger:s,disabled:l,ignoreNonKeyboardFocus:a}),(m,g)=>o.renderSlot(m.$slots,"default")}}),[Vf,WV]=zt("TooltipRoot"),jV=o.defineComponent({__name:"TooltipRoot",props:{defaultOpen:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},delayDuration:{default:void 0},disableHoverableContent:{type:Boolean,default:void 0},disableClosingTrigger:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},ignoreNonKeyboardFocus:{type:Boolean,default:void 0}},emits:["update:open"],setup(t,{emit:e}){const n=t,r=e;Le();const i=Q1(),s=o.computed(()=>n.disableHoverableContent??i.disableHoverableContent.value),a=o.computed(()=>n.disableClosingTrigger??i.disableClosingTrigger.value),l=o.computed(()=>n.disabled??i.disabled.value),u=o.computed(()=>n.delayDuration??i.delayDuration.value),c=o.computed(()=>n.ignoreNonKeyboardFocus??i.ignoreNonKeyboardFocus.value),f=Tr(n,"open",r,{defaultValue:n.defaultOpen,passive:n.open===void 0});o.watch(f,E=>{i.onClose&&(E?(i.onOpen(),document.dispatchEvent(new CustomEvent(M6))):i.onClose())});const p=o.ref(!1),m=o.ref(),g=o.computed(()=>f.value?p.value?"delayed-open":"instant-open":"closed"),{start:b,stop:v}=Dx(()=>{p.value=!0,f.value=!0},u,{immediate:!1});function y(){v(),p.value=!1,f.value=!0}function x(){v(),f.value=!1}function k(){b()}return WV({contentId:"",open:f,stateAttribute:g,trigger:m,onTriggerChange(E){m.value=E},onTriggerEnter(){i.isOpenDelayed.value?k():y()},onTriggerLeave(){s.value?x():v()},onOpen:y,onClose:x,disableHoverableContent:s,disableClosingTrigger:a,disabled:l,ignoreNonKeyboardFocus:c}),(E,C)=>(o.openBlock(),o.createBlock(o.unref(Of),null,{default:o.withCtx(()=>[o.renderSlot(E.$slots,"default",{open:o.unref(f)})]),_:3}))}}),qV=o.defineComponent({__name:"TooltipTrigger",props:{asChild:{type:Boolean},as:{default:"button"}},setup(t){const e=t,n=Vf(),r=Q1();n.contentId||(n.contentId=Kr(void 0,"radix-vue-tooltip-content"));const{forwardRef:i,currentElement:s}=Le(),a=o.ref(!1),l=o.ref(!1),u=o.computed(()=>n.disabled.value?{}:{click:v,focus:g,pointermove:p,pointerleave:m,pointerdown:f,blur:b});o.onMounted(()=>{n.onTriggerChange(s.value)});function c(){setTimeout(()=>{a.value=!1},1)}function f(){a.value=!0,document.addEventListener("pointerup",c,{once:!0})}function p(y){y.pointerType!=="touch"&&!l.value&&!r.isPointerInTransitRef.value&&(n.onTriggerEnter(),l.value=!0)}function m(){n.onTriggerLeave(),l.value=!1}function g(y){var x,k;a.value||n.ignoreNonKeyboardFocus.value&&!((k=(x=y.target).matches)!=null&&k.call(x,":focus-visible"))||n.onOpen()}function b(){n.onClose()}function v(){n.disableClosingTrigger.value||n.onClose()}return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Qu),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(Ye),o.mergeProps({ref:o.unref(i),"aria-describedby":o.unref(n).open.value?o.unref(n).contentId:void 0,"data-state":o.unref(n).stateAttribute.value,as:y.as,"as-child":e.asChild,"data-grace-area-trigger":""},o.toHandlers(u.value)),{default:o.withCtx(()=>[o.renderSlot(y.$slots,"default")]),_:3},16,["aria-describedby","data-state","as","as-child"])]),_:3}))}}),O6=o.defineComponent({__name:"TooltipContentImpl",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{default:0},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean,default:!0},collisionBoundary:{default:()=>[]},collisionPadding:{default:0},arrowPadding:{default:0},sticky:{default:"partial"},hideWhenDetached:{type:Boolean,default:!1}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),{forwardRef:s}=Le(),a=o.useSlots(),l=o.computed(()=>{var f;return(f=a.default)==null?void 0:f.call(a)}),u=o.computed(()=>{var f;if(n.ariaLabel)return n.ariaLabel;let p="";function m(g){typeof g.children=="string"&&g.type!==o.Comment?p+=g.children:Array.isArray(g.children)&&g.children.forEach(b=>m(b))}return(f=l.value)==null||f.forEach(g=>m(g)),p}),c=o.computed(()=>{const{ariaLabel:f,...p}=n;return p});return o.onMounted(()=>{xl(window,"scroll",f=>{const p=f.target;p!=null&&p.contains(i.trigger.value)&&i.onClose()}),xl(window,M6,i.onClose)}),(f,p)=>(o.openBlock(),o.createBlock(o.unref(Zu),{"as-child":"","disable-outside-pointer-events":!1,onEscapeKeyDown:p[0]||(p[0]=m=>r("escapeKeyDown",m)),onPointerDownOutside:p[1]||(p[1]=m=>{var g;o.unref(i).disableClosingTrigger.value&&(g=o.unref(i).trigger.value)!=null&&g.contains(m.target)&&m.preventDefault(),r("pointerDownOutside",m)}),onFocusOutside:p[2]||(p[2]=o.withModifiers(()=>{},["prevent"])),onDismiss:p[3]||(p[3]=m=>o.unref(i).onClose())},{default:o.withCtx(()=>[o.createVNode(o.unref(Bf),o.mergeProps({ref:o.unref(s),"data-state":o.unref(i).stateAttribute.value},{...f.$attrs,...c.value},{style:{"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),{default:o.withCtx(()=>[o.renderSlot(f.$slots,"default"),o.createVNode(o.unref(t6),{id:o.unref(i).contentId,role:"tooltip"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(u.value),1)]),_:1},8,["id"])]),_:3},16,["data-state"])]),_:3}))}}),KV=o.defineComponent({__name:"TooltipContentHoverable",props:{ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},setup(t){const e=er(t),{forwardRef:n,currentElement:r}=Le(),{trigger:i,onClose:s}=Vf(),a=Q1(),{isPointerInTransit:l,onPointerExit:u}=$L(i,r);return a.isPointerInTransitRef=l,u(()=>{s()}),(c,f)=>(o.openBlock(),o.createBlock(O6,o.mergeProps({ref:o.unref(n)},o.unref(e)),{default:o.withCtx(()=>[o.renderSlot(c.$slots,"default")]),_:3},16))}}),GV=o.defineComponent({__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{default:"top"},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=Vf(),s=Pt(n,r),{forwardRef:a}=Le();return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Gr),{present:l.forceMount||o.unref(i).open.value},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).disableHoverableContent.value?O6:KV),o.mergeProps({ref:o.unref(a)},o.unref(s)),{default:o.withCtx(()=>[o.renderSlot(l.$slots,"default")]),_:3},16))]),_:3},8,["present"]))}}),XV=o.defineComponent({__name:"TooltipPortal",props:{to:{},disabled:{type:Boolean},forceMount:{type:Boolean}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(Ju),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),vo=o.defineComponent({__name:"Separator",props:{orientation:{},decorative:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(AV),o.mergeProps(n.value,{class:o.unref(Ee)("shrink-0 bg-ed-separator",e.orientation==="vertical"?"w-px h-full":"h-px w-full",e.class)}),null,16,["class"]))}});/*!
|
|
142
142
|
* shared v10.0.6
|
|
143
143
|
* (c) 2025 kazuya kawaguchi
|
|
144
144
|
* Released under the MIT License.
|
|
145
|
-
*/const yo=typeof window<"u";let Ar,da;if(process.env.NODE_ENV!=="production"){const t=yo&&window.performance;t&&t.mark&&t.measure&&t.clearMarks&&t.clearMeasures&&(Ar=e=>{t.mark(e)},da=(e,n,r)=>{t.measure(e,n,r),t.clearMarks(n),t.clearMarks(r)})}const YV=/\{([0-9a-zA-Z]+)\}/g;function Ff(t,...e){return e.length===1&&Ct(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),t.replace(YV,(n,r)=>e.hasOwnProperty(r)?e[r]:"")}const Ko=(t,e=!1)=>e?Symbol.for(t):Symbol(t),JV=(t,e,n)=>ZV({l:t,k:e,s:n}),ZV=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),dn=t=>typeof t=="number"&&isFinite(t),QV=t=>N1(t)==="[object Date]",_l=t=>N1(t)==="[object RegExp]",$f=t=>ht(t)&&Object.keys(t).length===0,yn=Object.assign,NV=Object.create,Vt=(t=null)=>NV(t);let
|
|
146
|
-
`)}function ls(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const
|
|
145
|
+
*/const yo=typeof window<"u";let Ar,da;if(process.env.NODE_ENV!=="production"){const t=yo&&window.performance;t&&t.mark&&t.measure&&t.clearMarks&&t.clearMeasures&&(Ar=e=>{t.mark(e)},da=(e,n,r)=>{t.measure(e,n,r),t.clearMarks(n),t.clearMarks(r)})}const YV=/\{([0-9a-zA-Z]+)\}/g;function Ff(t,...e){return e.length===1&&Ct(e[0])&&(e=e[0]),(!e||!e.hasOwnProperty)&&(e={}),t.replace(YV,(n,r)=>e.hasOwnProperty(r)?e[r]:"")}const Ko=(t,e=!1)=>e?Symbol.for(t):Symbol(t),JV=(t,e,n)=>ZV({l:t,k:e,s:n}),ZV=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),dn=t=>typeof t=="number"&&isFinite(t),QV=t=>N1(t)==="[object Date]",_l=t=>N1(t)==="[object RegExp]",$f=t=>ht(t)&&Object.keys(t).length===0,yn=Object.assign,NV=Object.create,Vt=(t=null)=>NV(t);let B6;const fa=()=>B6||(B6=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Vt());function I6(t){return t.replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const eF=Object.prototype.hasOwnProperty;function wo(t,e){return eF.call(t,e)}const en=Array.isArray,Ut=t=>typeof t=="function",Oe=t=>typeof t=="string",St=t=>typeof t=="boolean",Ct=t=>t!==null&&typeof t=="object",tF=t=>Ct(t)&&Ut(t.then)&&Ut(t.catch),R6=Object.prototype.toString,N1=t=>R6.call(t),ht=t=>N1(t)==="[object Object]",nF=t=>t==null?"":en(t)||ht(t)&&t.toString===R6?JSON.stringify(t,null,2):String(t);function eg(t,e=""){return t.reduce((n,r,i)=>i===0?n+r:n+e+r,"")}const L6=2;function rF(t,e=0,n=t.length){const r=t.split(/\r?\n/);let i=0;const s=[];for(let a=0;a<r.length;a++)if(i+=r[a].length+1,i>=e){for(let l=a-L6;l<=a+L6||n>i;l++){if(l<0||l>=r.length)continue;const u=l+1;s.push(`${u}${" ".repeat(3-String(u).length)}| ${r[l]}`);const c=r[l].length;if(l===a){const f=e-(i-c)+1,p=Math.max(1,n>i?c-f:n-e);s.push(" | "+" ".repeat(f)+"^".repeat(p))}else if(l>a){if(n>i){const f=Math.max(Math.min(n-i,c),1);s.push(" | "+"^".repeat(f))}i+=c+1}}break}return s.join(`
|
|
146
|
+
`)}function ls(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const D6={};function P6(t){D6[t]||(D6[t]=!0,ls(t))}function tg(){const t=new Map;return{events:t,on(n,r){const i=t.get(n);i&&i.push(r)||t.set(n,[r])},off(n,r){const i=t.get(n);i&&i.splice(i.indexOf(r)>>>0,1)},emit(n,r){(t.get(n)||[]).slice().map(i=>i(r)),(t.get("*")||[]).slice().map(i=>i(n,r))}}}const Hf=t=>!Ct(t)||en(t);function zf(t,e){if(Hf(t)||Hf(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:r,des:i}=n.pop();Object.keys(r).forEach(s=>{s!=="__proto__"&&(Ct(r[s])&&!Ct(i[s])&&(i[s]=Array.isArray(r[s])?[]:Vt()),Hf(i[s])||Hf(r[s])?i[s]=r[s]:n.push({src:r[s],des:i[s]}))})}}/*!
|
|
147
147
|
* message-compiler v10.0.6
|
|
148
148
|
* (c) 2025 kazuya kawaguchi
|
|
149
149
|
* Released under the MIT License.
|
|
150
150
|
*/function oF(t,e,n){return{line:t,column:e,offset:n}}function ng(t,e,n){return{start:t,end:e}}const nt={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14,UNHANDLED_CODEGEN_NODE_TYPE:15,UNHANDLED_MINIFIER_NODE_TYPE:16},iF=17,sF={[nt.EXPECTED_TOKEN]:"Expected token: '{0}'",[nt.INVALID_TOKEN_IN_PLACEHOLDER]:"Invalid token in placeholder: '{0}'",[nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]:"Unterminated single quote in placeholder",[nt.UNKNOWN_ESCAPE_SEQUENCE]:"Unknown escape sequence: \\{0}",[nt.INVALID_UNICODE_ESCAPE_SEQUENCE]:"Invalid unicode escape sequence: {0}",[nt.UNBALANCED_CLOSING_BRACE]:"Unbalanced closing brace",[nt.UNTERMINATED_CLOSING_BRACE]:"Unterminated closing brace",[nt.EMPTY_PLACEHOLDER]:"Empty placeholder",[nt.NOT_ALLOW_NEST_PLACEHOLDER]:"Not allowed nest placeholder",[nt.INVALID_LINKED_FORMAT]:"Invalid linked format",[nt.MUST_HAVE_MESSAGES_IN_PLURAL]:"Plural must have messages",[nt.UNEXPECTED_EMPTY_LINKED_MODIFIER]:"Unexpected empty linked modifier",[nt.UNEXPECTED_EMPTY_LINKED_KEY]:"Unexpected empty linked key",[nt.UNEXPECTED_LEXICAL_ANALYSIS]:"Unexpected lexical analysis in token: '{0}'",[nt.UNHANDLED_CODEGEN_NODE_TYPE]:"unhandled codegen node type: '{0}'",[nt.UNHANDLED_MINIFIER_NODE_TYPE]:"unhandled mimifier node type: '{0}'"};function Tl(t,e,n={}){const{domain:r,messages:i,args:s}=n,a=process.env.NODE_ENV!=="production"?Ff((i||sF)[t]||"",...s||[]):t,l=new SyntaxError(String(a));return l.code=t,e&&(l.location=e),l.domain=r,l}function aF(t){throw t}const lF=/<\/?[\w\s="/.':;#-\/]+>/,uF=t=>lF.test(t),vi=" ",cF="\r",tr=`
|
|
151
|
-
`,dF="\u2028",fF="\u2029";function pF(t){const e=t;let n=0,r=1,i=1,s=0;const a=A=>e[A]===cF&&e[A+1]===tr,l=A=>e[A]===tr,u=A=>e[A]===fF,c=A=>e[A]===dF,f=A=>a(A)||l(A)||u(A)||c(A),p=()=>n,m=()=>r,g=()=>i,b=()=>s,v=A=>a(A)||u(A)||c(A)?tr:e[A],y=()=>v(n),x=()=>v(n+s);function k(){return s=0,f(n)&&(r++,i=0),a(n)&&n++,n++,i++,e[n]}function E(){return a(n+s)&&s++,s++,e[n+s]}function C(){n=0,r=1,i=1,s=0}function _(A=0){s=A}function T(){const A=n+s;for(;A!==n;)k();s=0}return{index:p,line:m,column:g,peekOffset:b,charAt:v,currentChar:y,currentPeek:x,next:k,peek:E,reset:C,resetPeek:_,skipToPeek:T}}const us=void 0,hF=".",Vx="'",mF="tokenizer";function gF(t,e={}){const n=e.location!==!1,r=pF(t),i=()=>r.index(),s=()=>oF(r.line(),r.column(),r.index()),a=s(),l=i(),u={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>u,{onError:f}=e;function p(q,U,ge,...xe){const Fe=c();if(U.column+=ge,U.offset+=ge,f){const st=n?ng(Fe.startLoc,U):null,qe=Tl(q,st,{domain:mF,args:xe});f(qe)}}function m(q,U,ge){q.endLoc=s(),q.currentType=U;const xe={type:U};return n&&(xe.loc=ng(q.startLoc,q.endLoc)),ge!=null&&(xe.value=ge),xe}const g=q=>m(q,13);function b(q,U){return q.currentChar()===U?(q.next(),U):(p(nt.EXPECTED_TOKEN,s(),0,U),"")}function v(q){let U="";for(;q.currentPeek()===vi||q.currentPeek()===tr;)U+=q.currentPeek(),q.peek();return U}function y(q){const U=v(q);return q.skipToPeek(),U}function x(q){if(q===us)return!1;const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U===95}function k(q){if(q===us)return!1;const U=q.charCodeAt(0);return U>=48&&U<=57}function E(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=x(q.currentPeek());return q.resetPeek(),xe}function C(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=q.currentPeek()==="-"?q.peek():q.currentPeek(),Fe=k(xe);return q.resetPeek(),Fe}function _(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=q.currentPeek()===Vx;return q.resetPeek(),xe}function T(q,U){const{currentType:ge}=U;if(ge!==7)return!1;v(q);const xe=q.currentPeek()===".";return q.resetPeek(),xe}function A(q,U){const{currentType:ge}=U;if(ge!==8)return!1;v(q);const xe=x(q.currentPeek());return q.resetPeek(),xe}function V(q,U){const{currentType:ge}=U;if(!(ge===7||ge===11))return!1;v(q);const xe=q.currentPeek()===":";return q.resetPeek(),xe}function O(q,U){const{currentType:ge}=U;if(ge!==9)return!1;const xe=()=>{const st=q.currentPeek();return st==="{"?x(q.peek()):st==="@"||st==="|"||st===":"||st==="."||st===vi||!st?!1:st===tr?(q.peek(),xe()):$(q,!1)},Fe=xe();return q.resetPeek(),Fe}function B(q){v(q);const U=q.currentPeek()==="|";return q.resetPeek(),U}function $(q,U=!0){const ge=(Fe=!1,st="")=>{const qe=q.currentPeek();return qe==="{"||qe==="@"||!qe?Fe:qe==="|"?!(st===vi||st===tr):qe===vi?(q.peek(),ge(!0,vi)):qe===tr?(q.peek(),ge(!0,tr)):!0},xe=ge();return U&&q.resetPeek(),xe}function H(q,U){const ge=q.currentChar();return ge===us?us:U(ge)?(q.next(),ge):null}function X(q){const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===95||U===36}function ee(q){return H(q,X)}function z(q){const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===95||U===36||U===45}function L(q){return H(q,z)}function D(q){const U=q.charCodeAt(0);return U>=48&&U<=57}function F(q){return H(q,D)}function R(q){const U=q.charCodeAt(0);return U>=48&&U<=57||U>=65&&U<=70||U>=97&&U<=102}function K(q){return H(q,R)}function Y(q){let U="",ge="";for(;U=F(q);)ge+=U;return ge}function ie(q){let U="";for(;;){const ge=q.currentChar();if(ge==="{"||ge==="}"||ge==="@"||ge==="|"||!ge)break;if(ge===vi||ge===tr)if($(q))U+=ge,q.next();else{if(B(q))break;U+=ge,q.next()}else U+=ge,q.next()}return U}function fe(q){y(q);let U="",ge="";for(;U=L(q);)ge+=U;return q.currentChar()===us&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge}function ke(q){y(q);let U="";return q.currentChar()==="-"?(q.next(),U+=`-${Y(q)}`):U+=Y(q),q.currentChar()===us&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),U}function re(q){return q!==Vx&&q!==tr}function me(q){y(q),b(q,"'");let U="",ge="";for(;U=H(q,re);)U==="\\"?ge+=J(q):ge+=U;const xe=q.currentChar();return xe===tr||xe===us?(p(nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),xe===tr&&(q.next(),b(q,"'")),ge):(b(q,"'"),ge)}function J(q){const U=q.currentChar();switch(U){case"\\":case"'":return q.next(),`\\${U}`;case"u":return te(q,U,4);case"U":return te(q,U,6);default:return p(nt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,U),""}}function te(q,U,ge){b(q,U);let xe="";for(let Fe=0;Fe<ge;Fe++){const st=K(q);if(!st){p(nt.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${U}${xe}${q.currentChar()}`);break}xe+=st}return`\\${U}${xe}`}function ne(q){return q!=="{"&&q!=="}"&&q!==vi&&q!==tr}function se(q){y(q);let U="",ge="";for(;U=H(q,ne);)ge+=U;return ge}function ce(q){let U="",ge="";for(;U=ee(q);)ge+=U;return ge}function _e(q){const U=ge=>{const xe=q.currentChar();return xe==="{"||xe==="@"||xe==="|"||xe==="("||xe===")"||!xe||xe===vi?ge:(ge+=xe,q.next(),U(ge))};return U("")}function Te(q){y(q);const U=b(q,"|");return y(q),U}function Ue(q,U){let ge=null;switch(q.currentChar()){case"{":return U.braceNest>=1&&p(nt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),q.next(),ge=m(U,2,"{"),y(q),U.braceNest++,ge;case"}":return U.braceNest>0&&U.currentType===2&&p(nt.EMPTY_PLACEHOLDER,s(),0),q.next(),ge=m(U,3,"}"),U.braceNest--,U.braceNest>0&&y(q),U.inLinked&&U.braceNest===0&&(U.inLinked=!1),ge;case"@":return U.braceNest>0&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge=Ke(q,U)||g(U),U.braceNest=0,ge;default:{let Fe=!0,st=!0,qe=!0;if(B(q))return U.braceNest>0&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,ge;if(U.braceNest>0&&(U.currentType===4||U.currentType===5||U.currentType===6))return p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),U.braceNest=0,je(q,U);if(Fe=E(q,U))return ge=m(U,4,fe(q)),y(q),ge;if(st=C(q,U))return ge=m(U,5,ke(q)),y(q),ge;if(qe=_(q,U))return ge=m(U,6,me(q)),y(q),ge;if(!Fe&&!st&&!qe)return ge=m(U,12,se(q)),p(nt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,ge.value),y(q),ge;break}}return ge}function Ke(q,U){const{currentType:ge}=U;let xe=null;const Fe=q.currentChar();switch((ge===7||ge===8||ge===11||ge===9)&&(Fe===tr||Fe===vi)&&p(nt.INVALID_LINKED_FORMAT,s(),0),Fe){case"@":return q.next(),xe=m(U,7,"@"),U.inLinked=!0,xe;case".":return y(q),q.next(),m(U,8,".");case":":return y(q),q.next(),m(U,9,":");default:return B(q)?(xe=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,xe):T(q,U)||V(q,U)?(y(q),Ke(q,U)):A(q,U)?(y(q),m(U,11,ce(q))):O(q,U)?(y(q),Fe==="{"?Ue(q,U)||xe:m(U,10,_e(q))):(ge===7&&p(nt.INVALID_LINKED_FORMAT,s(),0),U.braceNest=0,U.inLinked=!1,je(q,U))}}function je(q,U){let ge={type:13};if(U.braceNest>0)return Ue(q,U)||g(U);if(U.inLinked)return Ke(q,U)||g(U);switch(q.currentChar()){case"{":return Ue(q,U)||g(U);case"}":return p(nt.UNBALANCED_CLOSING_BRACE,s(),0),q.next(),m(U,3,"}");case"@":return Ke(q,U)||g(U);default:{if(B(q))return ge=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,ge;if($(q))return m(U,0,ie(q));break}}return ge}function Rt(){const{currentType:q,offset:U,startLoc:ge,endLoc:xe}=u;return u.lastType=q,u.lastOffset=U,u.lastStartLoc=ge,u.lastEndLoc=xe,u.offset=i(),u.startLoc=s(),r.currentChar()===us?m(u,13):je(r,u)}return{nextToken:Rt,currentOffset:i,currentPosition:s,context:c}}const bF="parser",vF=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function yF(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function wF(t={}){const e=t.location!==!1,{onError:n}=t;function r(x,k,E,C,..._){const T=x.currentPosition();if(T.offset+=C,T.column+=C,n){const A=e?ng(E,T):null,V=Tl(k,A,{domain:bF,args:_});n(V)}}function i(x,k,E){const C={type:x};return e&&(C.start=k,C.end=k,C.loc={start:E,end:E}),C}function s(x,k,E,C){e&&(x.end=k,x.loc&&(x.loc.end=E))}function a(x,k){const E=x.context(),C=i(3,E.offset,E.startLoc);return C.value=k,s(C,x.currentOffset(),x.currentPosition()),C}function l(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(5,C,_);return T.index=parseInt(k,10),x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function u(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(4,C,_);return T.key=k,x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function c(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(9,C,_);return T.value=k.replace(vF,yF),x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function f(x){const k=x.nextToken(),E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(8,C,_);return k.type!==11?(r(x,nt.UNEXPECTED_EMPTY_LINKED_MODIFIER,E.lastStartLoc,0),T.value="",s(T,C,_),{nextConsumeToken:k,node:T}):(k.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Go(k)),T.value=k.value||"",s(T,x.currentOffset(),x.currentPosition()),{node:T})}function p(x,k){const E=x.context(),C=i(7,E.offset,E.startLoc);return C.value=k,s(C,x.currentOffset(),x.currentPosition()),C}function m(x){const k=x.context(),E=i(6,k.offset,k.startLoc);let C=x.nextToken();if(C.type===8){const _=f(x);E.modifier=_.node,C=_.nextConsumeToken||x.nextToken()}switch(C.type!==9&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),C=x.nextToken(),C.type===2&&(C=x.nextToken()),C.type){case 10:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=p(x,C.value||"");break;case 4:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=u(x,C.value||"");break;case 5:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=l(x,C.value||"");break;case 6:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=c(x,C.value||"");break;default:{r(x,nt.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const _=x.context(),T=i(7,_.offset,_.startLoc);return T.value="",s(T,_.offset,_.startLoc),E.key=T,s(E,_.offset,_.startLoc),{nextConsumeToken:C,node:E}}}return s(E,x.currentOffset(),x.currentPosition()),{node:E}}function g(x){const k=x.context(),E=k.currentType===1?x.currentOffset():k.offset,C=k.currentType===1?k.endLoc:k.startLoc,_=i(2,E,C);_.items=[];let T=null;do{const O=T||x.nextToken();switch(T=null,O.type){case 0:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(a(x,O.value||""));break;case 5:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(l(x,O.value||""));break;case 4:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(u(x,O.value||""));break;case 6:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(c(x,O.value||""));break;case 7:{const B=m(x);_.items.push(B.node),T=B.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const A=k.currentType===1?k.lastOffset:x.currentOffset(),V=k.currentType===1?k.lastEndLoc:x.currentPosition();return s(_,A,V),_}function b(x,k,E,C){const _=x.context();let T=C.items.length===0;const A=i(1,k,E);A.cases=[],A.cases.push(C);do{const V=g(x);T||(T=V.items.length===0),A.cases.push(V)}while(_.currentType!==13);return T&&r(x,nt.MUST_HAVE_MESSAGES_IN_PLURAL,E,0),s(A,x.currentOffset(),x.currentPosition()),A}function v(x){const k=x.context(),{offset:E,startLoc:C}=k,_=g(x);return k.currentType===13?_:b(x,E,C,_)}function y(x){const k=gF(x,yn({},t)),E=k.context(),C=i(0,E.offset,E.startLoc);return e&&C.loc&&(C.loc.source=x),C.body=v(k),t.onCacheKey&&(C.cacheKey=t.onCacheKey(x)),E.currentType!==13&&r(k,nt.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,x[E.offset]||""),s(C,k.currentOffset(),k.currentPosition()),C}return{parse:y}}function Go(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function xF(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function Fx(t,e){for(let n=0;n<t.length;n++)rg(t[n],e)}function rg(t,e){switch(t.type){case 1:Fx(t.cases,e),e.helper("plural");break;case 2:Fx(t.items,e);break;case 6:{rg(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function CF(t,e={}){const n=xF(t);n.helper("normalize"),t.body&&rg(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function kF(t){const e=t.body;return e.type===2?$x(e):e.cases.forEach(n=>$x(n)),t}function $x(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const r=t.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===t.items.length){t.static=eg(e);for(let n=0;n<t.items.length;n++){const r=t.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const EF="minifier";function Al(t){switch(t.t=t.type,t.type){case 0:{const e=t;Al(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,n=e.cases;for(let r=0;r<n.length;r++)Al(n[r]);e.c=n,delete e.cases;break}case 2:{const e=t,n=e.items;for(let r=0;r<n.length;r++)Al(n[r]);e.i=n,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;Al(e.key),e.k=e.key,delete e.key,e.modifier&&(Al(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Tl(nt.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:EF,args:[t.type]})}delete t.type}const SF="parser";function _F(t,e){const{filename:n,breakLineCode:r,needIndent:i}=e,s=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};s&&t.loc&&(a.source=t.loc.source);const l=()=>a;function u(v,y){a.code+=v}function c(v,y=!0){const x=y?r:"";u(i?x+" ".repeat(v):x)}function f(v=!0){const y=++a.indentLevel;v&&c(y)}function p(v=!0){const y=--a.indentLevel;v&&c(y)}function m(){c(a.indentLevel)}return{context:l,push:u,indent:f,deindent:p,newline:m,helper:v=>`_${v}`,needIndent:()=>a.needIndent}}function TF(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Ml(t,e.key),e.modifier?(t.push(", "),Ml(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function AF(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const i=e.items.length;for(let s=0;s<i&&(Ml(t,e.items[s]),s!==i-1);s++)t.push(", ");t.deindent(r()),t.push("])")}function MF(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const i=e.cases.length;for(let s=0;s<i&&(Ml(t,e.cases[s]),s!==i-1);s++)t.push(", ");t.deindent(r()),t.push("])")}}function OF(t,e){e.body?Ml(t,e.body):t.push("null")}function Ml(t,e){const{helper:n}=t;switch(e.type){case 0:OF(t,e);break;case 1:MF(t,e);break;case 2:AF(t,e);break;case 6:TF(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Tl(nt.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:SF,args:[e.type]})}}const BF=(t,e={})=>{const n=Oe(e.mode)?e.mode:"normal",r=Oe(e.filename)?e.filename:"message.intl";e.sourceMap;const i=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
|
|
151
|
+
`,dF="\u2028",fF="\u2029";function pF(t){const e=t;let n=0,r=1,i=1,s=0;const a=A=>e[A]===cF&&e[A+1]===tr,l=A=>e[A]===tr,u=A=>e[A]===fF,c=A=>e[A]===dF,f=A=>a(A)||l(A)||u(A)||c(A),p=()=>n,m=()=>r,g=()=>i,b=()=>s,v=A=>a(A)||u(A)||c(A)?tr:e[A],y=()=>v(n),x=()=>v(n+s);function k(){return s=0,f(n)&&(r++,i=0),a(n)&&n++,n++,i++,e[n]}function E(){return a(n+s)&&s++,s++,e[n+s]}function C(){n=0,r=1,i=1,s=0}function _(A=0){s=A}function T(){const A=n+s;for(;A!==n;)k();s=0}return{index:p,line:m,column:g,peekOffset:b,charAt:v,currentChar:y,currentPeek:x,next:k,peek:E,reset:C,resetPeek:_,skipToPeek:T}}const us=void 0,hF=".",V6="'",mF="tokenizer";function gF(t,e={}){const n=e.location!==!1,r=pF(t),i=()=>r.index(),s=()=>oF(r.line(),r.column(),r.index()),a=s(),l=i(),u={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>u,{onError:f}=e;function p(q,U,ge,...xe){const Fe=c();if(U.column+=ge,U.offset+=ge,f){const st=n?ng(Fe.startLoc,U):null,qe=Tl(q,st,{domain:mF,args:xe});f(qe)}}function m(q,U,ge){q.endLoc=s(),q.currentType=U;const xe={type:U};return n&&(xe.loc=ng(q.startLoc,q.endLoc)),ge!=null&&(xe.value=ge),xe}const g=q=>m(q,13);function b(q,U){return q.currentChar()===U?(q.next(),U):(p(nt.EXPECTED_TOKEN,s(),0,U),"")}function v(q){let U="";for(;q.currentPeek()===vi||q.currentPeek()===tr;)U+=q.currentPeek(),q.peek();return U}function y(q){const U=v(q);return q.skipToPeek(),U}function x(q){if(q===us)return!1;const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U===95}function k(q){if(q===us)return!1;const U=q.charCodeAt(0);return U>=48&&U<=57}function E(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=x(q.currentPeek());return q.resetPeek(),xe}function C(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=q.currentPeek()==="-"?q.peek():q.currentPeek(),Fe=k(xe);return q.resetPeek(),Fe}function _(q,U){const{currentType:ge}=U;if(ge!==2)return!1;v(q);const xe=q.currentPeek()===V6;return q.resetPeek(),xe}function T(q,U){const{currentType:ge}=U;if(ge!==7)return!1;v(q);const xe=q.currentPeek()===".";return q.resetPeek(),xe}function A(q,U){const{currentType:ge}=U;if(ge!==8)return!1;v(q);const xe=x(q.currentPeek());return q.resetPeek(),xe}function V(q,U){const{currentType:ge}=U;if(!(ge===7||ge===11))return!1;v(q);const xe=q.currentPeek()===":";return q.resetPeek(),xe}function O(q,U){const{currentType:ge}=U;if(ge!==9)return!1;const xe=()=>{const st=q.currentPeek();return st==="{"?x(q.peek()):st==="@"||st==="|"||st===":"||st==="."||st===vi||!st?!1:st===tr?(q.peek(),xe()):$(q,!1)},Fe=xe();return q.resetPeek(),Fe}function B(q){v(q);const U=q.currentPeek()==="|";return q.resetPeek(),U}function $(q,U=!0){const ge=(Fe=!1,st="")=>{const qe=q.currentPeek();return qe==="{"||qe==="@"||!qe?Fe:qe==="|"?!(st===vi||st===tr):qe===vi?(q.peek(),ge(!0,vi)):qe===tr?(q.peek(),ge(!0,tr)):!0},xe=ge();return U&&q.resetPeek(),xe}function H(q,U){const ge=q.currentChar();return ge===us?us:U(ge)?(q.next(),ge):null}function X(q){const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===95||U===36}function ee(q){return H(q,X)}function z(q){const U=q.charCodeAt(0);return U>=97&&U<=122||U>=65&&U<=90||U>=48&&U<=57||U===95||U===36||U===45}function L(q){return H(q,z)}function D(q){const U=q.charCodeAt(0);return U>=48&&U<=57}function F(q){return H(q,D)}function R(q){const U=q.charCodeAt(0);return U>=48&&U<=57||U>=65&&U<=70||U>=97&&U<=102}function K(q){return H(q,R)}function Y(q){let U="",ge="";for(;U=F(q);)ge+=U;return ge}function ie(q){let U="";for(;;){const ge=q.currentChar();if(ge==="{"||ge==="}"||ge==="@"||ge==="|"||!ge)break;if(ge===vi||ge===tr)if($(q))U+=ge,q.next();else{if(B(q))break;U+=ge,q.next()}else U+=ge,q.next()}return U}function fe(q){y(q);let U="",ge="";for(;U=L(q);)ge+=U;return q.currentChar()===us&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge}function ke(q){y(q);let U="";return q.currentChar()==="-"?(q.next(),U+=`-${Y(q)}`):U+=Y(q),q.currentChar()===us&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),U}function re(q){return q!==V6&&q!==tr}function me(q){y(q),b(q,"'");let U="",ge="";for(;U=H(q,re);)U==="\\"?ge+=J(q):ge+=U;const xe=q.currentChar();return xe===tr||xe===us?(p(nt.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),xe===tr&&(q.next(),b(q,"'")),ge):(b(q,"'"),ge)}function J(q){const U=q.currentChar();switch(U){case"\\":case"'":return q.next(),`\\${U}`;case"u":return te(q,U,4);case"U":return te(q,U,6);default:return p(nt.UNKNOWN_ESCAPE_SEQUENCE,s(),0,U),""}}function te(q,U,ge){b(q,U);let xe="";for(let Fe=0;Fe<ge;Fe++){const st=K(q);if(!st){p(nt.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${U}${xe}${q.currentChar()}`);break}xe+=st}return`\\${U}${xe}`}function ne(q){return q!=="{"&&q!=="}"&&q!==vi&&q!==tr}function se(q){y(q);let U="",ge="";for(;U=H(q,ne);)ge+=U;return ge}function ce(q){let U="",ge="";for(;U=ee(q);)ge+=U;return ge}function _e(q){const U=ge=>{const xe=q.currentChar();return xe==="{"||xe==="@"||xe==="|"||xe==="("||xe===")"||!xe||xe===vi?ge:(ge+=xe,q.next(),U(ge))};return U("")}function Te(q){y(q);const U=b(q,"|");return y(q),U}function Ue(q,U){let ge=null;switch(q.currentChar()){case"{":return U.braceNest>=1&&p(nt.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),q.next(),ge=m(U,2,"{"),y(q),U.braceNest++,ge;case"}":return U.braceNest>0&&U.currentType===2&&p(nt.EMPTY_PLACEHOLDER,s(),0),q.next(),ge=m(U,3,"}"),U.braceNest--,U.braceNest>0&&y(q),U.inLinked&&U.braceNest===0&&(U.inLinked=!1),ge;case"@":return U.braceNest>0&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge=Ke(q,U)||g(U),U.braceNest=0,ge;default:{let Fe=!0,st=!0,qe=!0;if(B(q))return U.braceNest>0&&p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),ge=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,ge;if(U.braceNest>0&&(U.currentType===4||U.currentType===5||U.currentType===6))return p(nt.UNTERMINATED_CLOSING_BRACE,s(),0),U.braceNest=0,je(q,U);if(Fe=E(q,U))return ge=m(U,4,fe(q)),y(q),ge;if(st=C(q,U))return ge=m(U,5,ke(q)),y(q),ge;if(qe=_(q,U))return ge=m(U,6,me(q)),y(q),ge;if(!Fe&&!st&&!qe)return ge=m(U,12,se(q)),p(nt.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,ge.value),y(q),ge;break}}return ge}function Ke(q,U){const{currentType:ge}=U;let xe=null;const Fe=q.currentChar();switch((ge===7||ge===8||ge===11||ge===9)&&(Fe===tr||Fe===vi)&&p(nt.INVALID_LINKED_FORMAT,s(),0),Fe){case"@":return q.next(),xe=m(U,7,"@"),U.inLinked=!0,xe;case".":return y(q),q.next(),m(U,8,".");case":":return y(q),q.next(),m(U,9,":");default:return B(q)?(xe=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,xe):T(q,U)||V(q,U)?(y(q),Ke(q,U)):A(q,U)?(y(q),m(U,11,ce(q))):O(q,U)?(y(q),Fe==="{"?Ue(q,U)||xe:m(U,10,_e(q))):(ge===7&&p(nt.INVALID_LINKED_FORMAT,s(),0),U.braceNest=0,U.inLinked=!1,je(q,U))}}function je(q,U){let ge={type:13};if(U.braceNest>0)return Ue(q,U)||g(U);if(U.inLinked)return Ke(q,U)||g(U);switch(q.currentChar()){case"{":return Ue(q,U)||g(U);case"}":return p(nt.UNBALANCED_CLOSING_BRACE,s(),0),q.next(),m(U,3,"}");case"@":return Ke(q,U)||g(U);default:{if(B(q))return ge=m(U,1,Te(q)),U.braceNest=0,U.inLinked=!1,ge;if($(q))return m(U,0,ie(q));break}}return ge}function Rt(){const{currentType:q,offset:U,startLoc:ge,endLoc:xe}=u;return u.lastType=q,u.lastOffset=U,u.lastStartLoc=ge,u.lastEndLoc=xe,u.offset=i(),u.startLoc=s(),r.currentChar()===us?m(u,13):je(r,u)}return{nextToken:Rt,currentOffset:i,currentPosition:s,context:c}}const bF="parser",vF=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function yF(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(e||n,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function wF(t={}){const e=t.location!==!1,{onError:n}=t;function r(x,k,E,C,..._){const T=x.currentPosition();if(T.offset+=C,T.column+=C,n){const A=e?ng(E,T):null,V=Tl(k,A,{domain:bF,args:_});n(V)}}function i(x,k,E){const C={type:x};return e&&(C.start=k,C.end=k,C.loc={start:E,end:E}),C}function s(x,k,E,C){e&&(x.end=k,x.loc&&(x.loc.end=E))}function a(x,k){const E=x.context(),C=i(3,E.offset,E.startLoc);return C.value=k,s(C,x.currentOffset(),x.currentPosition()),C}function l(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(5,C,_);return T.index=parseInt(k,10),x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function u(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(4,C,_);return T.key=k,x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function c(x,k){const E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(9,C,_);return T.value=k.replace(vF,yF),x.nextToken(),s(T,x.currentOffset(),x.currentPosition()),T}function f(x){const k=x.nextToken(),E=x.context(),{lastOffset:C,lastStartLoc:_}=E,T=i(8,C,_);return k.type!==11?(r(x,nt.UNEXPECTED_EMPTY_LINKED_MODIFIER,E.lastStartLoc,0),T.value="",s(T,C,_),{nextConsumeToken:k,node:T}):(k.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,Go(k)),T.value=k.value||"",s(T,x.currentOffset(),x.currentPosition()),{node:T})}function p(x,k){const E=x.context(),C=i(7,E.offset,E.startLoc);return C.value=k,s(C,x.currentOffset(),x.currentPosition()),C}function m(x){const k=x.context(),E=i(6,k.offset,k.startLoc);let C=x.nextToken();if(C.type===8){const _=f(x);E.modifier=_.node,C=_.nextConsumeToken||x.nextToken()}switch(C.type!==9&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),C=x.nextToken(),C.type===2&&(C=x.nextToken()),C.type){case 10:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=p(x,C.value||"");break;case 4:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=u(x,C.value||"");break;case 5:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=l(x,C.value||"");break;case 6:C.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(C)),E.key=c(x,C.value||"");break;default:{r(x,nt.UNEXPECTED_EMPTY_LINKED_KEY,k.lastStartLoc,0);const _=x.context(),T=i(7,_.offset,_.startLoc);return T.value="",s(T,_.offset,_.startLoc),E.key=T,s(E,_.offset,_.startLoc),{nextConsumeToken:C,node:E}}}return s(E,x.currentOffset(),x.currentPosition()),{node:E}}function g(x){const k=x.context(),E=k.currentType===1?x.currentOffset():k.offset,C=k.currentType===1?k.endLoc:k.startLoc,_=i(2,E,C);_.items=[];let T=null;do{const O=T||x.nextToken();switch(T=null,O.type){case 0:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(a(x,O.value||""));break;case 5:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(l(x,O.value||""));break;case 4:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(u(x,O.value||""));break;case 6:O.value==null&&r(x,nt.UNEXPECTED_LEXICAL_ANALYSIS,k.lastStartLoc,0,Go(O)),_.items.push(c(x,O.value||""));break;case 7:{const B=m(x);_.items.push(B.node),T=B.nextConsumeToken||null;break}}}while(k.currentType!==13&&k.currentType!==1);const A=k.currentType===1?k.lastOffset:x.currentOffset(),V=k.currentType===1?k.lastEndLoc:x.currentPosition();return s(_,A,V),_}function b(x,k,E,C){const _=x.context();let T=C.items.length===0;const A=i(1,k,E);A.cases=[],A.cases.push(C);do{const V=g(x);T||(T=V.items.length===0),A.cases.push(V)}while(_.currentType!==13);return T&&r(x,nt.MUST_HAVE_MESSAGES_IN_PLURAL,E,0),s(A,x.currentOffset(),x.currentPosition()),A}function v(x){const k=x.context(),{offset:E,startLoc:C}=k,_=g(x);return k.currentType===13?_:b(x,E,C,_)}function y(x){const k=gF(x,yn({},t)),E=k.context(),C=i(0,E.offset,E.startLoc);return e&&C.loc&&(C.loc.source=x),C.body=v(k),t.onCacheKey&&(C.cacheKey=t.onCacheKey(x)),E.currentType!==13&&r(k,nt.UNEXPECTED_LEXICAL_ANALYSIS,E.lastStartLoc,0,x[E.offset]||""),s(C,k.currentOffset(),k.currentPosition()),C}return{parse:y}}function Go(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function xF(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:s=>(n.helpers.add(s),s)}}function F6(t,e){for(let n=0;n<t.length;n++)rg(t[n],e)}function rg(t,e){switch(t.type){case 1:F6(t.cases,e),e.helper("plural");break;case 2:F6(t.items,e);break;case 6:{rg(t.key,e),e.helper("linked"),e.helper("type");break}case 5:e.helper("interpolate"),e.helper("list");break;case 4:e.helper("interpolate"),e.helper("named");break}}function CF(t,e={}){const n=xF(t);n.helper("normalize"),t.body&&rg(t.body,n);const r=n.context();t.helpers=Array.from(r.helpers)}function kF(t){const e=t.body;return e.type===2?$6(e):e.cases.forEach(n=>$6(n)),t}function $6(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;n<t.items.length;n++){const r=t.items[n];if(!(r.type===3||r.type===9)||r.value==null)break;e.push(r.value)}if(e.length===t.items.length){t.static=eg(e);for(let n=0;n<t.items.length;n++){const r=t.items[n];(r.type===3||r.type===9)&&delete r.value}}}}const EF="minifier";function Al(t){switch(t.t=t.type,t.type){case 0:{const e=t;Al(e.body),e.b=e.body,delete e.body;break}case 1:{const e=t,n=e.cases;for(let r=0;r<n.length;r++)Al(n[r]);e.c=n,delete e.cases;break}case 2:{const e=t,n=e.items;for(let r=0;r<n.length;r++)Al(n[r]);e.i=n,delete e.items,e.static&&(e.s=e.static,delete e.static);break}case 3:case 9:case 8:case 7:{const e=t;e.value&&(e.v=e.value,delete e.value);break}case 6:{const e=t;Al(e.key),e.k=e.key,delete e.key,e.modifier&&(Al(e.modifier),e.m=e.modifier,delete e.modifier);break}case 5:{const e=t;e.i=e.index,delete e.index;break}case 4:{const e=t;e.k=e.key,delete e.key;break}default:if(process.env.NODE_ENV!=="production")throw Tl(nt.UNHANDLED_MINIFIER_NODE_TYPE,null,{domain:EF,args:[t.type]})}delete t.type}const SF="parser";function _F(t,e){const{filename:n,breakLineCode:r,needIndent:i}=e,s=e.location!==!1,a={filename:n,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:i,indentLevel:0};s&&t.loc&&(a.source=t.loc.source);const l=()=>a;function u(v,y){a.code+=v}function c(v,y=!0){const x=y?r:"";u(i?x+" ".repeat(v):x)}function f(v=!0){const y=++a.indentLevel;v&&c(y)}function p(v=!0){const y=--a.indentLevel;v&&c(y)}function m(){c(a.indentLevel)}return{context:l,push:u,indent:f,deindent:p,newline:m,helper:v=>`_${v}`,needIndent:()=>a.needIndent}}function TF(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Ml(t,e.key),e.modifier?(t.push(", "),Ml(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function AF(t,e){const{helper:n,needIndent:r}=t;t.push(`${n("normalize")}([`),t.indent(r());const i=e.items.length;for(let s=0;s<i&&(Ml(t,e.items[s]),s!==i-1);s++)t.push(", ");t.deindent(r()),t.push("])")}function MF(t,e){const{helper:n,needIndent:r}=t;if(e.cases.length>1){t.push(`${n("plural")}([`),t.indent(r());const i=e.cases.length;for(let s=0;s<i&&(Ml(t,e.cases[s]),s!==i-1);s++)t.push(", ");t.deindent(r()),t.push("])")}}function OF(t,e){e.body?Ml(t,e.body):t.push("null")}function Ml(t,e){const{helper:n}=t;switch(e.type){case 0:OF(t,e);break;case 1:MF(t,e);break;case 2:AF(t,e);break;case 6:TF(t,e);break;case 8:t.push(JSON.stringify(e.value),e);break;case 7:t.push(JSON.stringify(e.value),e);break;case 5:t.push(`${n("interpolate")}(${n("list")}(${e.index}))`,e);break;case 4:t.push(`${n("interpolate")}(${n("named")}(${JSON.stringify(e.key)}))`,e);break;case 9:t.push(JSON.stringify(e.value),e);break;case 3:t.push(JSON.stringify(e.value),e);break;default:if(process.env.NODE_ENV!=="production")throw Tl(nt.UNHANDLED_CODEGEN_NODE_TYPE,null,{domain:SF,args:[e.type]})}}const BF=(t,e={})=>{const n=Oe(e.mode)?e.mode:"normal",r=Oe(e.filename)?e.filename:"message.intl";e.sourceMap;const i=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":`
|
|
152
152
|
`,s=e.needIndent?e.needIndent:n!=="arrow",a=t.helpers||[],l=_F(t,{filename:r,breakLineCode:i,needIndent:s});l.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${eg(a.map(f=>`${f}: _${f}`),", ")} } = ctx`),l.newline()),l.push("return "),Ml(l,t),l.deindent(s),l.push("}"),delete t.helpers;const{code:u,map:c}=l.context();return{ast:t,code:u,map:c?c.toJSON():void 0}};function IF(t,e={}){const n=yn({},e),r=!!n.jit,i=!!n.minify,s=n.optimize==null?!0:n.optimize,l=wF(n).parse(t);return r?(s&&kF(l),i&&Al(l),{ast:l,code:""}):(CF(l,n),BF(l,n))}/*!
|
|
153
153
|
* core-base v10.0.6
|
|
154
154
|
* (c) 2025 kazuya kawaguchi
|
|
155
155
|
* Released under the MIT License.
|
|
156
|
-
*/function RF(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function og(t){return n=>LF(n,t)}function LF(t,e){const n=PF(e);if(n==null)throw Nu(0);if(sg(n)===1){const s=FF(n);return t.plural(s.reduce((a,l)=>[...a,Hx(t,l)],[]))}else return Hx(t,n)}const DF=["b","body"];function PF(t){return cs(t,DF)}const VF=["c","cases"];function FF(t){return cs(t,VF,[])}function Hx(t,e){const n=HF(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=UF(e).reduce((i,s)=>[...i,ig(t,s)],[]);return t.normalize(r)}}const $F=["s","static"];function HF(t){return cs(t,$F)}const zF=["i","items"];function UF(t){return cs(t,zF,[])}function ig(t,e){const n=sg(e);switch(n){case 3:return Uf(e,n);case 9:return Uf(e,n);case 4:{const r=e;if(wo(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(wo(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw Nu(n)}case 5:{const r=e;if(wo(r,"i")&&dn(r.i))return t.interpolate(t.list(r.i));if(wo(r,"index")&&dn(r.index))return t.interpolate(t.list(r.index));throw Nu(n)}case 6:{const r=e,i=KF(r),s=XF(r);return t.linked(ig(t,s),i?ig(t,i):void 0,t.type)}case 7:return Uf(e,n);case 8:return Uf(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const WF=["t","type"];function sg(t){return cs(t,WF)}const jF=["v","value"];function Uf(t,e){const n=cs(t,jF);if(n)return n;throw Nu(e)}const qF=["m","modifier"];function KF(t){return cs(t,qF)}const GF=["k","key"];function XF(t){const e=cs(t,GF);if(e)return e;throw Nu(6)}function cs(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(wo(t,i)&&t[i]!=null)return t[i]}return n}function Nu(t){return new Error(`unhandled node type: ${t}`)}const YF="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function JF(t,e){e&&uF(t)&&ls(Ff(YF,{source:t}))}const ZF=t=>t;let Wf=Vt();function ds(t){return Ct(t)&&sg(t)===0&&(wo(t,"b")||wo(t,"body"))}function QF(t,e={}){let n=!1;const r=e.onError||aF;return e.onError=i=>{n=!0,r(i)},{...IF(t,e),detectError:n}}function NF(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Oe(t)){const n=St(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&JF(t,n);const i=(e.onCacheKey||ZF)(t),s=Wf[i];if(s)return s;const{ast:a,detectError:l}=QF(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),u=og(a);return l?u:Wf[i]=u}else{if(process.env.NODE_ENV!=="production"&&!ds(t))return ls(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>t;const n=t.cacheKey;if(n){const r=Wf[n];return r||(Wf[n]=og(t))}else return og(t)}}let ec=null;function e$(t){ec=t}function t$(t,e,n){ec&&ec.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const n$=r$("function:translate");function r$(t){return e=>ec&&ec.emit(t,e)}const jn={INVALID_ARGUMENT:iF,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},o$=24;function yi(t){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:i$}:void 0)}const i$={[jn.INVALID_ARGUMENT]:"Invalid arguments",[jn.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[jn.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[jn.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[jn.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[jn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[jn.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function ag(t,e){return e.locale!=null?zx(e.locale):zx(t.locale)}let lg;function zx(t){if(Oe(t))return t;if(Ut(t)){if(t.resolvedOnce&&lg!=null)return lg;if(t.constructor.name==="Function"){const e=t();if(tF(e))throw yi(jn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return lg=e}else throw yi(jn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw yi(jn.NOT_SUPPORT_LOCALE_TYPE)}function s$(t,e,n){return[...new Set([n,...en(e)?e:Ct(e)?Object.keys(e):Oe(e)?[e]:[n]])]}function Ux(t,e,n){const r=Oe(n)?n:tc,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let s=i.__localeChainCache.get(r);if(!s){s=[];let a=[n];for(;en(a);)a=Wx(s,a,e);const l=en(e)||!ht(e)?e:e.default?e.default:null;a=Oe(l)?[l]:l,en(a)&&Wx(s,a,!1),i.__localeChainCache.set(r,s)}return s}function Wx(t,e,n){let r=!0;for(let i=0;i<e.length&&St(r);i++){const s=e[i];Oe(s)&&(r=a$(t,e[i],n))}return r}function a$(t,e,n){let r;const i=e.split("-");do{const s=i.join("-");r=l$(t,s,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function l$(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(en(n)||ht(n))&&n[i]&&(r=n[i])}return r}const fs=[];fs[0]={w:[0],i:[3,0],"[":[4],o:[7]},fs[1]={w:[1],".":[2],"[":[4],o:[7]},fs[2]={w:[2],i:[3,0],0:[3,0]},fs[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},fs[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},fs[5]={"'":[4,0],o:8,l:[5,0]},fs[6]={'"':[4,0],o:8,l:[6,0]};const u$=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function c$(t){return u$.test(t)}function d$(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function f$(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function p$(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:c$(e)?d$(e):"*"+e}function h$(t){const e=[];let n=-1,r=0,i=0,s,a,l,u,c,f,p;const m=[];m[0]=()=>{a===void 0?a=l:a+=l},m[1]=()=>{a!==void 0&&(e.push(a),a=void 0)},m[2]=()=>{m[0](),i++},m[3]=()=>{if(i>0)i--,r=4,m[0]();else{if(i=0,a===void 0||(a=p$(a),a===!1))return!1;m[1]()}};function g(){const b=t[n+1];if(r===5&&b==="'"||r===6&&b==='"')return n++,l="\\"+b,m[0](),!0}for(;r!==null;)if(n++,s=t[n],!(s==="\\"&&g())){if(u=f$(s),p=fs[r],c=p[u]||p.l||8,c===8||(r=c[0],c[1]!==void 0&&(f=m[c[1]],f&&(l=s,f()===!1))))return;if(r===7)return e}}const jx=new Map;function m$(t,e){return Ct(t)?t[e]:null}function g$(t,e){if(!Ct(t))return null;let n=jx.get(e);if(n||(n=h$(e),n&&jx.set(e,n)),!n)return null;const r=n.length;let i=t,s=0;for(;s<r;){const a=i[n[s]];if(a===void 0||Ut(i))return null;i=a,s++}return i}const fr={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},b$=8,v$={[fr.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[fr.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[fr.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[fr.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[fr.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[fr.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[fr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function pa(t,...e){return Ff(v$[t],...e)}const y$="10.0.6",jf=-1,tc="en-US",qf="",qx=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function w$(){return{upper:(t,e)=>e==="text"&&Oe(t)?t.toUpperCase():e==="vnode"&&Ct(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Oe(t)?t.toLowerCase():e==="vnode"&&Ct(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Oe(t)?qx(t):e==="vnode"&&Ct(t)&&"__v_isVNode"in t?qx(t.children):t}}let Kx;function x$(t){Kx=t}let Gx;function C$(t){Gx=t}let Xx;function k$(t){Xx=t}let Yx=null;const E$=t=>{Yx=t},S$=()=>Yx;let Jx=null;const Zx=t=>{Jx=t},_$=()=>Jx;let Qx=0;function T$(t={}){const e=Ut(t.onWarn)?t.onWarn:ls,n=Oe(t.version)?t.version:y$,r=Oe(t.locale)||Ut(t.locale)?t.locale:tc,i=Ut(r)?tc:r,s=en(t.fallbackLocale)||ht(t.fallbackLocale)||Oe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i,a=ht(t.messages)?t.messages:ug(i),l=ht(t.datetimeFormats)?t.datetimeFormats:ug(i),u=ht(t.numberFormats)?t.numberFormats:ug(i),c=yn(Vt(),t.modifiers,w$()),f=t.pluralRules||Vt(),p=Ut(t.missing)?t.missing:null,m=St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=!!t.fallbackFormat,v=!!t.unresolving,y=Ut(t.postTranslation)?t.postTranslation:null,x=ht(t.processor)?t.processor:null,k=St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,E=!!t.escapeParameter,C=Ut(t.messageCompiler)?t.messageCompiler:Kx;process.env.NODE_ENV!=="production"&&Ut(t.messageCompiler)&&Px(pa(fr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const _=Ut(t.messageResolver)?t.messageResolver:Gx||m$,T=Ut(t.localeFallbacker)?t.localeFallbacker:Xx||s$,A=Ct(t.fallbackContext)?t.fallbackContext:void 0,V=t,O=Ct(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,B=Ct(V.__numberFormatters)?V.__numberFormatters:new Map,$=Ct(V.__meta)?V.__meta:{};Qx++;const H={version:n,cid:Qx,locale:r,fallbackLocale:s,messages:a,modifiers:c,pluralRules:f,missing:p,missingWarn:m,fallbackWarn:g,fallbackFormat:b,unresolving:v,postTranslation:y,processor:x,warnHtmlMessage:k,escapeParameter:E,messageCompiler:C,messageResolver:_,localeFallbacker:T,fallbackContext:A,onWarn:e,__meta:$};return H.datetimeFormats=l,H.numberFormats=u,H.__datetimeFormatters=O,H.__numberFormatters=B,process.env.NODE_ENV!=="production"&&(H.__v_emitter=V.__v_emitter!=null?V.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&t$(H,n,$),H}const ug=t=>({[t]:Vt()});function Kf(t,e){return t instanceof RegExp?t.test(e):t}function Nx(t,e){return t instanceof RegExp?t.test(e):t}function cg(t,e,n,r,i){const{missing:s,onWarn:a}=t;if(process.env.NODE_ENV!=="production"){const l=t.__v_emitter;l&&l.emit("missing",{locale:n,key:e,type:i,groupId:`${i}:${e}`})}if(s!==null){const l=s(t,n,e,i);return Oe(l)?l:e}else return process.env.NODE_ENV!=="production"&&Nx(r,e)&&a(pa(fr.NOT_FOUND_KEY,{key:e,locale:n})),e}function nc(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function eC(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function A$(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(eC(t,e[r]))return!0;return!1}const tC=typeof Intl<"u",nC={dateTimeFormat:tC&&typeof Intl.DateTimeFormat<"u",numberFormat:tC&&typeof Intl.NumberFormat<"u"};function rC(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:a}=t,{__datetimeFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!nC.dateTimeFormat)return s(pa(fr.CANNOT_FORMAT_DATE)),qf;const[u,c,f,p]=dg(...e),m=St(f.missingWarn)?f.missingWarn:t.missingWarn,g=St(f.fallbackWarn)?f.fallbackWarn:t.fallbackWarn,b=!!f.part,v=ag(t,f),y=a(t,i,v);if(!Oe(u)||u==="")return new Intl.DateTimeFormat(v,p).format(c);let x={},k,E=null,C=v,_=null;const T="datetime format";for(let O=0;O<y.length;O++){if(k=_=y[O],process.env.NODE_ENV!=="production"&&v!==k&&Kf(g,u)&&s(pa(fr.FALLBACK_TO_DATE_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&v!==k){const B=t.__v_emitter;B&&B.emit("fallback",{type:T,key:u,from:C,to:_,groupId:`${T}:${u}`})}if(x=n[k]||{},E=x[u],ht(E))break;cg(t,u,k,m,T),C=_}if(!ht(E)||!Oe(k))return r?jf:u;let A=`${k}__${u}`;$f(p)||(A=`${A}__${JSON.stringify(p)}`);let V=l.get(A);return V||(V=new Intl.DateTimeFormat(k,yn({},E,p)),l.set(A,V)),b?V.formatToParts(c):V.format(c)}const oC=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function dg(...t){const[e,n,r,i]=t,s=Vt();let a=Vt(),l;if(Oe(e)){const u=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw yi(jn.INVALID_ISO_DATE_ARGUMENT);const c=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();l=new Date(c);try{l.toISOString()}catch{throw yi(jn.INVALID_ISO_DATE_ARGUMENT)}}else if(QV(e)){if(isNaN(e.getTime()))throw yi(jn.INVALID_DATE_ARGUMENT);l=e}else if(dn(e))l=e;else throw yi(jn.INVALID_ARGUMENT);return Oe(n)?s.key=n:ht(n)&&Object.keys(n).forEach(u=>{oC.includes(u)?a[u]=n[u]:s[u]=n[u]}),Oe(r)?s.locale=r:ht(r)&&(a=r),ht(i)&&(a=i),[s.key||"",l,s,a]}function iC(t,e,n){const r=t;for(const i in n){const s=`${e}__${i}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function sC(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:a}=t,{__numberFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!nC.numberFormat)return s(pa(fr.CANNOT_FORMAT_NUMBER)),qf;const[u,c,f,p]=fg(...e),m=St(f.missingWarn)?f.missingWarn:t.missingWarn,g=St(f.fallbackWarn)?f.fallbackWarn:t.fallbackWarn,b=!!f.part,v=ag(t,f),y=a(t,i,v);if(!Oe(u)||u==="")return new Intl.NumberFormat(v,p).format(c);let x={},k,E=null,C=v,_=null;const T="number format";for(let O=0;O<y.length;O++){if(k=_=y[O],process.env.NODE_ENV!=="production"&&v!==k&&Kf(g,u)&&s(pa(fr.FALLBACK_TO_NUMBER_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&v!==k){const B=t.__v_emitter;B&&B.emit("fallback",{type:T,key:u,from:C,to:_,groupId:`${T}:${u}`})}if(x=n[k]||{},E=x[u],ht(E))break;cg(t,u,k,m,T),C=_}if(!ht(E)||!Oe(k))return r?jf:u;let A=`${k}__${u}`;$f(p)||(A=`${A}__${JSON.stringify(p)}`);let V=l.get(A);return V||(V=new Intl.NumberFormat(k,yn({},E,p)),l.set(A,V)),b?V.formatToParts(c):V.format(c)}const aC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function fg(...t){const[e,n,r,i]=t,s=Vt();let a=Vt();if(!dn(e))throw yi(jn.INVALID_ARGUMENT);const l=e;return Oe(n)?s.key=n:ht(n)&&Object.keys(n).forEach(u=>{aC.includes(u)?a[u]=n[u]:s[u]=n[u]}),Oe(r)?s.locale=r:ht(r)&&(a=r),ht(i)&&(a=i),[s.key||"",l,s,a]}function lC(t,e,n){const r=t;for(const i in n){const s=`${e}__${i}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}const M$=t=>t,O$=t=>"",B$="text",I$=t=>t.length===0?"":eg(t),R$=nF;function uC(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function L$(t){const e=dn(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(dn(t.named.count)||dn(t.named.n))?dn(t.named.count)?t.named.count:dn(t.named.n)?t.named.n:e:e}function D$(t,e){e.count||(e.count=t),e.n||(e.n=t)}function P$(t={}){const e=t.locale,n=L$(t),r=Ct(t.pluralRules)&&Oe(e)&&Ut(t.pluralRules[e])?t.pluralRules[e]:uC,i=Ct(t.pluralRules)&&Oe(e)&&Ut(t.pluralRules[e])?uC:void 0,s=x=>x[r(n,x.length,i)],a=t.list||[],l=x=>a[x],u=t.named||Vt();dn(t.pluralIndex)&&D$(n,u);const c=x=>u[x];function f(x,k){const E=Ut(t.messages)?t.messages(x,!!k):Ct(t.messages)?t.messages[x]:!1;return E||(t.parent?t.parent.message(x):O$)}const p=x=>t.modifiers?t.modifiers[x]:M$,m=ht(t.processor)&&Ut(t.processor.normalize)?t.processor.normalize:I$,g=ht(t.processor)&&Ut(t.processor.interpolate)?t.processor.interpolate:R$,b=ht(t.processor)&&Oe(t.processor.type)?t.processor.type:B$,y={list:l,named:c,plural:s,linked:(x,...k)=>{const[E,C]=k;let _="text",T="";k.length===1?Ct(E)?(T=E.modifier||T,_=E.type||_):Oe(E)&&(T=E||T):k.length===2&&(Oe(E)&&(T=E||T),Oe(C)&&(_=C||_));const A=f(x,!0)(y),V=_==="vnode"&&en(A)&&T?A[0]:A;return T?p(T)(V,_):V},message:f,type:b,interpolate:g,normalize:m,values:yn(Vt(),a,u)};return y}const cC=()=>"",Yr=t=>Ut(t);function dC(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:s,fallbackLocale:a,messages:l}=t,[u,c]=pg(...e),f=St(c.missingWarn)?c.missingWarn:t.missingWarn,p=St(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,m=St(c.escapeParameter)?c.escapeParameter:t.escapeParameter,g=!!c.resolvedMessage,b=Oe(c.default)||St(c.default)?St(c.default)?s?u:()=>u:c.default:n?s?u:()=>u:null,v=n||b!=null&&(Oe(b)||Ut(b)),y=ag(t,c);m&&V$(c);let[x,k,E]=g?[u,y,l[y]||Vt()]:fC(t,u,y,a,p,f),C=x,_=u;if(!g&&!(Oe(C)||ds(C)||Yr(C))&&v&&(C=b,_=C),!g&&(!(Oe(C)||ds(C)||Yr(C))||!Oe(k)))return i?jf:u;if(process.env.NODE_ENV!=="production"&&Oe(C)&&t.messageCompiler==null)return ls(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`),u;let T=!1;const A=()=>{T=!0},V=Yr(C)?C:pC(t,u,k,C,_,A);if(T)return C;const O=z$(t,k,E,c),B=P$(O),$=F$(t,V,B),H=r?r($,u):$;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const X={timestamp:Date.now(),key:Oe(u)?u:Yr(C)?C.key:"",locale:k||(Yr(C)?C.locale:""),format:Oe(C)?C:Yr(C)?C.source:"",message:H};X.meta=yn({},t.__meta,S$()||{}),n$(X)}return H}function V$(t){en(t.list)?t.list=t.list.map(e=>Oe(e)?Ix(e):e):Ct(t.named)&&Object.keys(t.named).forEach(e=>{Oe(t.named[e])&&(t.named[e]=Ix(t.named[e]))})}function fC(t,e,n,r,i,s){const{messages:a,onWarn:l,messageResolver:u,localeFallbacker:c}=t,f=c(t,r,n);let p=Vt(),m,g=null,b=n,v=null;const y="translate";for(let x=0;x<f.length;x++){if(m=v=f[x],process.env.NODE_ENV!=="production"&&n!==m&&!eC(n,m)&&Kf(i,e)&&l(pa(fr.FALLBACK_TO_TRANSLATE,{key:e,target:m})),process.env.NODE_ENV!=="production"&&n!==m){const _=t.__v_emitter;_&&_.emit("fallback",{type:y,key:e,from:b,to:v,groupId:`${y}:${e}`})}p=a[m]||Vt();let k=null,E,C;if(process.env.NODE_ENV!=="production"&&yo&&(k=window.performance.now(),E="intlify-message-resolve-start",C="intlify-message-resolve-end",Ar&&Ar(E)),(g=u(p,e))===null&&(g=p[e]),process.env.NODE_ENV!=="production"&&yo){const _=window.performance.now(),T=t.__v_emitter;T&&k&&g&&T.emit("message-resolve",{type:"message-resolve",key:e,message:g,time:_-k,groupId:`${y}:${e}`}),E&&C&&Ar&&da&&(Ar(C),da("intlify message resolve",E,C))}if(Oe(g)||ds(g)||Yr(g))break;if(!A$(m,f)){const _=cg(t,e,m,s,y);_!==e&&(g=_)}b=v}return[g,m,p]}function pC(t,e,n,r,i,s){const{messageCompiler:a,warnHtmlMessage:l}=t;if(Yr(r)){const m=r;return m.locale=m.locale||n,m.key=m.key||e,m}if(a==null){const m=()=>r;return m.locale=n,m.key=e,m}let u=null,c,f;process.env.NODE_ENV!=="production"&&yo&&(u=window.performance.now(),c="intlify-message-compilation-start",f="intlify-message-compilation-end",Ar&&Ar(c));const p=a(r,$$(t,n,i,r,l,s));if(process.env.NODE_ENV!=="production"&&yo){const m=window.performance.now(),g=t.__v_emitter;g&&u&&g.emit("message-compilation",{type:"message-compilation",message:r,time:m-u,groupId:`translate:${e}`}),c&&f&&Ar&&da&&(Ar(f),da("intlify message compilation",c,f))}return p.locale=n,p.key=e,p.source=r,p}function F$(t,e,n){let r=null,i,s;process.env.NODE_ENV!=="production"&&yo&&(r=window.performance.now(),i="intlify-message-evaluation-start",s="intlify-message-evaluation-end",Ar&&Ar(i));const a=e(n);if(process.env.NODE_ENV!=="production"&&yo){const l=window.performance.now(),u=t.__v_emitter;u&&r&&u.emit("message-evaluation",{type:"message-evaluation",value:a,time:l-r,groupId:`translate:${e.key}`}),i&&s&&Ar&&da&&(Ar(s),da("intlify message evaluation",i,s))}return a}function pg(...t){const[e,n,r]=t,i=Vt();if(!Oe(e)&&!dn(e)&&!Yr(e)&&!ds(e))throw yi(jn.INVALID_ARGUMENT);const s=dn(e)?String(e):(Yr(e),e);return dn(n)?i.plural=n:Oe(n)?i.default=n:ht(n)&&!$f(n)?i.named=n:en(n)&&(i.list=n),dn(r)?i.plural=r:Oe(r)?i.default=r:ht(r)&&yn(i,r),[s,i]}function $$(t,e,n,r,i,s){return{locale:e,key:n,warnHtmlMessage:i,onError:a=>{if(s&&s(a),process.env.NODE_ENV!=="production"){const l=H$(r),u=`Message compilation error: ${a.message}`,c=a.location&&l&&rF(l,a.location.start.offset,a.location.end.offset),f=t.__v_emitter;f&&l&&f.emit("compile-error",{message:l,error:a.message,start:a.location&&a.location.start.offset,end:a.location&&a.location.end.offset,groupId:`translate:${n}`}),console.error(c?`${u}
|
|
156
|
+
*/function RF(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function og(t){return n=>LF(n,t)}function LF(t,e){const n=PF(e);if(n==null)throw Nu(0);if(sg(n)===1){const s=FF(n);return t.plural(s.reduce((a,l)=>[...a,H6(t,l)],[]))}else return H6(t,n)}const DF=["b","body"];function PF(t){return cs(t,DF)}const VF=["c","cases"];function FF(t){return cs(t,VF,[])}function H6(t,e){const n=HF(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const r=UF(e).reduce((i,s)=>[...i,ig(t,s)],[]);return t.normalize(r)}}const $F=["s","static"];function HF(t){return cs(t,$F)}const zF=["i","items"];function UF(t){return cs(t,zF,[])}function ig(t,e){const n=sg(e);switch(n){case 3:return Uf(e,n);case 9:return Uf(e,n);case 4:{const r=e;if(wo(r,"k")&&r.k)return t.interpolate(t.named(r.k));if(wo(r,"key")&&r.key)return t.interpolate(t.named(r.key));throw Nu(n)}case 5:{const r=e;if(wo(r,"i")&&dn(r.i))return t.interpolate(t.list(r.i));if(wo(r,"index")&&dn(r.index))return t.interpolate(t.list(r.index));throw Nu(n)}case 6:{const r=e,i=KF(r),s=XF(r);return t.linked(ig(t,s),i?ig(t,i):void 0,t.type)}case 7:return Uf(e,n);case 8:return Uf(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const WF=["t","type"];function sg(t){return cs(t,WF)}const jF=["v","value"];function Uf(t,e){const n=cs(t,jF);if(n)return n;throw Nu(e)}const qF=["m","modifier"];function KF(t){return cs(t,qF)}const GF=["k","key"];function XF(t){const e=cs(t,GF);if(e)return e;throw Nu(6)}function cs(t,e,n){for(let r=0;r<e.length;r++){const i=e[r];if(wo(t,i)&&t[i]!=null)return t[i]}return n}function Nu(t){return new Error(`unhandled node type: ${t}`)}const YF="Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS.";function JF(t,e){e&&uF(t)&&ls(Ff(YF,{source:t}))}const ZF=t=>t;let Wf=Vt();function ds(t){return Ct(t)&&sg(t)===0&&(wo(t,"b")||wo(t,"body"))}function QF(t,e={}){let n=!1;const r=e.onError||aF;return e.onError=i=>{n=!0,r(i)},{...IF(t,e),detectError:n}}function NF(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Oe(t)){const n=St(e.warnHtmlMessage)?e.warnHtmlMessage:!0;process.env.NODE_ENV!=="production"&&JF(t,n);const i=(e.onCacheKey||ZF)(t),s=Wf[i];if(s)return s;const{ast:a,detectError:l}=QF(t,{...e,location:process.env.NODE_ENV!=="production",jit:!0}),u=og(a);return l?u:Wf[i]=u}else{if(process.env.NODE_ENV!=="production"&&!ds(t))return ls(`the message that is resolve with key '${e.key}' is not supported for jit compilation`),()=>t;const n=t.cacheKey;if(n){const r=Wf[n];return r||(Wf[n]=og(t))}else return og(t)}}let ec=null;function e$(t){ec=t}function t$(t,e,n){ec&&ec.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const n$=r$("function:translate");function r$(t){return e=>ec&&ec.emit(t,e)}const jn={INVALID_ARGUMENT:iF,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_NON_STRING_MESSAGE:20,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},o$=24;function yi(t){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:i$}:void 0)}const i$={[jn.INVALID_ARGUMENT]:"Invalid arguments",[jn.INVALID_DATE_ARGUMENT]:"The date provided is an invalid Date object.Make sure your Date represents a valid date.",[jn.INVALID_ISO_DATE_ARGUMENT]:"The argument provided is not a valid ISO date string",[jn.NOT_SUPPORT_NON_STRING_MESSAGE]:"Not support non-string message",[jn.NOT_SUPPORT_LOCALE_PROMISE_VALUE]:"cannot support promise value",[jn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]:"cannot support async function",[jn.NOT_SUPPORT_LOCALE_TYPE]:"cannot support locale type"};function ag(t,e){return e.locale!=null?z6(e.locale):z6(t.locale)}let lg;function z6(t){if(Oe(t))return t;if(Ut(t)){if(t.resolvedOnce&&lg!=null)return lg;if(t.constructor.name==="Function"){const e=t();if(tF(e))throw yi(jn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return lg=e}else throw yi(jn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw yi(jn.NOT_SUPPORT_LOCALE_TYPE)}function s$(t,e,n){return[...new Set([n,...en(e)?e:Ct(e)?Object.keys(e):Oe(e)?[e]:[n]])]}function U6(t,e,n){const r=Oe(n)?n:tc,i=t;i.__localeChainCache||(i.__localeChainCache=new Map);let s=i.__localeChainCache.get(r);if(!s){s=[];let a=[n];for(;en(a);)a=W6(s,a,e);const l=en(e)||!ht(e)?e:e.default?e.default:null;a=Oe(l)?[l]:l,en(a)&&W6(s,a,!1),i.__localeChainCache.set(r,s)}return s}function W6(t,e,n){let r=!0;for(let i=0;i<e.length&&St(r);i++){const s=e[i];Oe(s)&&(r=a$(t,e[i],n))}return r}function a$(t,e,n){let r;const i=e.split("-");do{const s=i.join("-");r=l$(t,s,n),i.splice(-1,1)}while(i.length&&r===!0);return r}function l$(t,e,n){let r=!1;if(!t.includes(e)&&(r=!0,e)){r=e[e.length-1]!=="!";const i=e.replace(/!/g,"");t.push(i),(en(n)||ht(n))&&n[i]&&(r=n[i])}return r}const fs=[];fs[0]={w:[0],i:[3,0],"[":[4],o:[7]},fs[1]={w:[1],".":[2],"[":[4],o:[7]},fs[2]={w:[2],i:[3,0],0:[3,0]},fs[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},fs[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},fs[5]={"'":[4,0],o:8,l:[5,0]},fs[6]={'"':[4,0],o:8,l:[6,0]};const u$=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function c$(t){return u$.test(t)}function d$(t){const e=t.charCodeAt(0),n=t.charCodeAt(t.length-1);return e===n&&(e===34||e===39)?t.slice(1,-1):t}function f$(t){if(t==null)return"o";switch(t.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return t;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function p$(t){const e=t.trim();return t.charAt(0)==="0"&&isNaN(parseInt(t))?!1:c$(e)?d$(e):"*"+e}function h$(t){const e=[];let n=-1,r=0,i=0,s,a,l,u,c,f,p;const m=[];m[0]=()=>{a===void 0?a=l:a+=l},m[1]=()=>{a!==void 0&&(e.push(a),a=void 0)},m[2]=()=>{m[0](),i++},m[3]=()=>{if(i>0)i--,r=4,m[0]();else{if(i=0,a===void 0||(a=p$(a),a===!1))return!1;m[1]()}};function g(){const b=t[n+1];if(r===5&&b==="'"||r===6&&b==='"')return n++,l="\\"+b,m[0](),!0}for(;r!==null;)if(n++,s=t[n],!(s==="\\"&&g())){if(u=f$(s),p=fs[r],c=p[u]||p.l||8,c===8||(r=c[0],c[1]!==void 0&&(f=m[c[1]],f&&(l=s,f()===!1))))return;if(r===7)return e}}const j6=new Map;function m$(t,e){return Ct(t)?t[e]:null}function g$(t,e){if(!Ct(t))return null;let n=j6.get(e);if(n||(n=h$(e),n&&j6.set(e,n)),!n)return null;const r=n.length;let i=t,s=0;for(;s<r;){const a=i[n[s]];if(a===void 0||Ut(i))return null;i=a,s++}return i}const fr={NOT_FOUND_KEY:1,FALLBACK_TO_TRANSLATE:2,CANNOT_FORMAT_NUMBER:3,FALLBACK_TO_NUMBER_FORMAT:4,CANNOT_FORMAT_DATE:5,FALLBACK_TO_DATE_FORMAT:6,EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER:7},b$=8,v$={[fr.NOT_FOUND_KEY]:"Not found '{key}' key in '{locale}' locale messages.",[fr.FALLBACK_TO_TRANSLATE]:"Fall back to translate '{key}' key with '{target}' locale.",[fr.CANNOT_FORMAT_NUMBER]:"Cannot format a number value due to not supported Intl.NumberFormat.",[fr.FALLBACK_TO_NUMBER_FORMAT]:"Fall back to number format '{key}' key with '{target}' locale.",[fr.CANNOT_FORMAT_DATE]:"Cannot format a date value due to not supported Intl.DateTimeFormat.",[fr.FALLBACK_TO_DATE_FORMAT]:"Fall back to datetime format '{key}' key with '{target}' locale.",[fr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER]:"This project is using Custom Message Compiler, which is an experimental feature. It may receive breaking changes or be removed in the future."};function pa(t,...e){return Ff(v$[t],...e)}const y$="10.0.6",jf=-1,tc="en-US",qf="",q6=t=>`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function w$(){return{upper:(t,e)=>e==="text"&&Oe(t)?t.toUpperCase():e==="vnode"&&Ct(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Oe(t)?t.toLowerCase():e==="vnode"&&Ct(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Oe(t)?q6(t):e==="vnode"&&Ct(t)&&"__v_isVNode"in t?q6(t.children):t}}let K6;function x$(t){K6=t}let G6;function C$(t){G6=t}let X6;function k$(t){X6=t}let Y6=null;const E$=t=>{Y6=t},S$=()=>Y6;let J6=null;const Z6=t=>{J6=t},_$=()=>J6;let Q6=0;function T$(t={}){const e=Ut(t.onWarn)?t.onWarn:ls,n=Oe(t.version)?t.version:y$,r=Oe(t.locale)||Ut(t.locale)?t.locale:tc,i=Ut(r)?tc:r,s=en(t.fallbackLocale)||ht(t.fallbackLocale)||Oe(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:i,a=ht(t.messages)?t.messages:ug(i),l=ht(t.datetimeFormats)?t.datetimeFormats:ug(i),u=ht(t.numberFormats)?t.numberFormats:ug(i),c=yn(Vt(),t.modifiers,w$()),f=t.pluralRules||Vt(),p=Ut(t.missing)?t.missing:null,m=St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=!!t.fallbackFormat,v=!!t.unresolving,y=Ut(t.postTranslation)?t.postTranslation:null,x=ht(t.processor)?t.processor:null,k=St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,E=!!t.escapeParameter,C=Ut(t.messageCompiler)?t.messageCompiler:K6;process.env.NODE_ENV!=="production"&&Ut(t.messageCompiler)&&P6(pa(fr.EXPERIMENTAL_CUSTOM_MESSAGE_COMPILER));const _=Ut(t.messageResolver)?t.messageResolver:G6||m$,T=Ut(t.localeFallbacker)?t.localeFallbacker:X6||s$,A=Ct(t.fallbackContext)?t.fallbackContext:void 0,V=t,O=Ct(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,B=Ct(V.__numberFormatters)?V.__numberFormatters:new Map,$=Ct(V.__meta)?V.__meta:{};Q6++;const H={version:n,cid:Q6,locale:r,fallbackLocale:s,messages:a,modifiers:c,pluralRules:f,missing:p,missingWarn:m,fallbackWarn:g,fallbackFormat:b,unresolving:v,postTranslation:y,processor:x,warnHtmlMessage:k,escapeParameter:E,messageCompiler:C,messageResolver:_,localeFallbacker:T,fallbackContext:A,onWarn:e,__meta:$};return H.datetimeFormats=l,H.numberFormats=u,H.__datetimeFormatters=O,H.__numberFormatters=B,process.env.NODE_ENV!=="production"&&(H.__v_emitter=V.__v_emitter!=null?V.__v_emitter:void 0),(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__)&&t$(H,n,$),H}const ug=t=>({[t]:Vt()});function Kf(t,e){return t instanceof RegExp?t.test(e):t}function N6(t,e){return t instanceof RegExp?t.test(e):t}function cg(t,e,n,r,i){const{missing:s,onWarn:a}=t;if(process.env.NODE_ENV!=="production"){const l=t.__v_emitter;l&&l.emit("missing",{locale:n,key:e,type:i,groupId:`${i}:${e}`})}if(s!==null){const l=s(t,n,e,i);return Oe(l)?l:e}else return process.env.NODE_ENV!=="production"&&N6(r,e)&&a(pa(fr.NOT_FOUND_KEY,{key:e,locale:n})),e}function nc(t,e,n){const r=t;r.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function eC(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function A$(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let r=n+1;r<e.length;r++)if(eC(t,e[r]))return!0;return!1}const tC=typeof Intl<"u",nC={dateTimeFormat:tC&&typeof Intl.DateTimeFormat<"u",numberFormat:tC&&typeof Intl.NumberFormat<"u"};function rC(t,...e){const{datetimeFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:a}=t,{__datetimeFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!nC.dateTimeFormat)return s(pa(fr.CANNOT_FORMAT_DATE)),qf;const[u,c,f,p]=dg(...e),m=St(f.missingWarn)?f.missingWarn:t.missingWarn,g=St(f.fallbackWarn)?f.fallbackWarn:t.fallbackWarn,b=!!f.part,v=ag(t,f),y=a(t,i,v);if(!Oe(u)||u==="")return new Intl.DateTimeFormat(v,p).format(c);let x={},k,E=null,C=v,_=null;const T="datetime format";for(let O=0;O<y.length;O++){if(k=_=y[O],process.env.NODE_ENV!=="production"&&v!==k&&Kf(g,u)&&s(pa(fr.FALLBACK_TO_DATE_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&v!==k){const B=t.__v_emitter;B&&B.emit("fallback",{type:T,key:u,from:C,to:_,groupId:`${T}:${u}`})}if(x=n[k]||{},E=x[u],ht(E))break;cg(t,u,k,m,T),C=_}if(!ht(E)||!Oe(k))return r?jf:u;let A=`${k}__${u}`;$f(p)||(A=`${A}__${JSON.stringify(p)}`);let V=l.get(A);return V||(V=new Intl.DateTimeFormat(k,yn({},E,p)),l.set(A,V)),b?V.formatToParts(c):V.format(c)}const oC=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function dg(...t){const[e,n,r,i]=t,s=Vt();let a=Vt(),l;if(Oe(e)){const u=e.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!u)throw yi(jn.INVALID_ISO_DATE_ARGUMENT);const c=u[3]?u[3].trim().startsWith("T")?`${u[1].trim()}${u[3].trim()}`:`${u[1].trim()}T${u[3].trim()}`:u[1].trim();l=new Date(c);try{l.toISOString()}catch{throw yi(jn.INVALID_ISO_DATE_ARGUMENT)}}else if(QV(e)){if(isNaN(e.getTime()))throw yi(jn.INVALID_DATE_ARGUMENT);l=e}else if(dn(e))l=e;else throw yi(jn.INVALID_ARGUMENT);return Oe(n)?s.key=n:ht(n)&&Object.keys(n).forEach(u=>{oC.includes(u)?a[u]=n[u]:s[u]=n[u]}),Oe(r)?s.locale=r:ht(r)&&(a=r),ht(i)&&(a=i),[s.key||"",l,s,a]}function iC(t,e,n){const r=t;for(const i in n){const s=`${e}__${i}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function sC(t,...e){const{numberFormats:n,unresolving:r,fallbackLocale:i,onWarn:s,localeFallbacker:a}=t,{__numberFormatters:l}=t;if(process.env.NODE_ENV!=="production"&&!nC.numberFormat)return s(pa(fr.CANNOT_FORMAT_NUMBER)),qf;const[u,c,f,p]=fg(...e),m=St(f.missingWarn)?f.missingWarn:t.missingWarn,g=St(f.fallbackWarn)?f.fallbackWarn:t.fallbackWarn,b=!!f.part,v=ag(t,f),y=a(t,i,v);if(!Oe(u)||u==="")return new Intl.NumberFormat(v,p).format(c);let x={},k,E=null,C=v,_=null;const T="number format";for(let O=0;O<y.length;O++){if(k=_=y[O],process.env.NODE_ENV!=="production"&&v!==k&&Kf(g,u)&&s(pa(fr.FALLBACK_TO_NUMBER_FORMAT,{key:u,target:k})),process.env.NODE_ENV!=="production"&&v!==k){const B=t.__v_emitter;B&&B.emit("fallback",{type:T,key:u,from:C,to:_,groupId:`${T}:${u}`})}if(x=n[k]||{},E=x[u],ht(E))break;cg(t,u,k,m,T),C=_}if(!ht(E)||!Oe(k))return r?jf:u;let A=`${k}__${u}`;$f(p)||(A=`${A}__${JSON.stringify(p)}`);let V=l.get(A);return V||(V=new Intl.NumberFormat(k,yn({},E,p)),l.set(A,V)),b?V.formatToParts(c):V.format(c)}const aC=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function fg(...t){const[e,n,r,i]=t,s=Vt();let a=Vt();if(!dn(e))throw yi(jn.INVALID_ARGUMENT);const l=e;return Oe(n)?s.key=n:ht(n)&&Object.keys(n).forEach(u=>{aC.includes(u)?a[u]=n[u]:s[u]=n[u]}),Oe(r)?s.locale=r:ht(r)&&(a=r),ht(i)&&(a=i),[s.key||"",l,s,a]}function lC(t,e,n){const r=t;for(const i in n){const s=`${e}__${i}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}const M$=t=>t,O$=t=>"",B$="text",I$=t=>t.length===0?"":eg(t),R$=nF;function uC(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function L$(t){const e=dn(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(dn(t.named.count)||dn(t.named.n))?dn(t.named.count)?t.named.count:dn(t.named.n)?t.named.n:e:e}function D$(t,e){e.count||(e.count=t),e.n||(e.n=t)}function P$(t={}){const e=t.locale,n=L$(t),r=Ct(t.pluralRules)&&Oe(e)&&Ut(t.pluralRules[e])?t.pluralRules[e]:uC,i=Ct(t.pluralRules)&&Oe(e)&&Ut(t.pluralRules[e])?uC:void 0,s=x=>x[r(n,x.length,i)],a=t.list||[],l=x=>a[x],u=t.named||Vt();dn(t.pluralIndex)&&D$(n,u);const c=x=>u[x];function f(x,k){const E=Ut(t.messages)?t.messages(x,!!k):Ct(t.messages)?t.messages[x]:!1;return E||(t.parent?t.parent.message(x):O$)}const p=x=>t.modifiers?t.modifiers[x]:M$,m=ht(t.processor)&&Ut(t.processor.normalize)?t.processor.normalize:I$,g=ht(t.processor)&&Ut(t.processor.interpolate)?t.processor.interpolate:R$,b=ht(t.processor)&&Oe(t.processor.type)?t.processor.type:B$,y={list:l,named:c,plural:s,linked:(x,...k)=>{const[E,C]=k;let _="text",T="";k.length===1?Ct(E)?(T=E.modifier||T,_=E.type||_):Oe(E)&&(T=E||T):k.length===2&&(Oe(E)&&(T=E||T),Oe(C)&&(_=C||_));const A=f(x,!0)(y),V=_==="vnode"&&en(A)&&T?A[0]:A;return T?p(T)(V,_):V},message:f,type:b,interpolate:g,normalize:m,values:yn(Vt(),a,u)};return y}const cC=()=>"",Yr=t=>Ut(t);function dC(t,...e){const{fallbackFormat:n,postTranslation:r,unresolving:i,messageCompiler:s,fallbackLocale:a,messages:l}=t,[u,c]=pg(...e),f=St(c.missingWarn)?c.missingWarn:t.missingWarn,p=St(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,m=St(c.escapeParameter)?c.escapeParameter:t.escapeParameter,g=!!c.resolvedMessage,b=Oe(c.default)||St(c.default)?St(c.default)?s?u:()=>u:c.default:n?s?u:()=>u:null,v=n||b!=null&&(Oe(b)||Ut(b)),y=ag(t,c);m&&V$(c);let[x,k,E]=g?[u,y,l[y]||Vt()]:fC(t,u,y,a,p,f),C=x,_=u;if(!g&&!(Oe(C)||ds(C)||Yr(C))&&v&&(C=b,_=C),!g&&(!(Oe(C)||ds(C)||Yr(C))||!Oe(k)))return i?jf:u;if(process.env.NODE_ENV!=="production"&&Oe(C)&&t.messageCompiler==null)return ls(`The message format compilation is not supported in this build. Because message compiler isn't included. You need to pre-compilation all message format. So translate function return '${u}'.`),u;let T=!1;const A=()=>{T=!0},V=Yr(C)?C:pC(t,u,k,C,_,A);if(T)return C;const O=z$(t,k,E,c),B=P$(O),$=F$(t,V,B),H=r?r($,u):$;if(process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const X={timestamp:Date.now(),key:Oe(u)?u:Yr(C)?C.key:"",locale:k||(Yr(C)?C.locale:""),format:Oe(C)?C:Yr(C)?C.source:"",message:H};X.meta=yn({},t.__meta,S$()||{}),n$(X)}return H}function V$(t){en(t.list)?t.list=t.list.map(e=>Oe(e)?I6(e):e):Ct(t.named)&&Object.keys(t.named).forEach(e=>{Oe(t.named[e])&&(t.named[e]=I6(t.named[e]))})}function fC(t,e,n,r,i,s){const{messages:a,onWarn:l,messageResolver:u,localeFallbacker:c}=t,f=c(t,r,n);let p=Vt(),m,g=null,b=n,v=null;const y="translate";for(let x=0;x<f.length;x++){if(m=v=f[x],process.env.NODE_ENV!=="production"&&n!==m&&!eC(n,m)&&Kf(i,e)&&l(pa(fr.FALLBACK_TO_TRANSLATE,{key:e,target:m})),process.env.NODE_ENV!=="production"&&n!==m){const _=t.__v_emitter;_&&_.emit("fallback",{type:y,key:e,from:b,to:v,groupId:`${y}:${e}`})}p=a[m]||Vt();let k=null,E,C;if(process.env.NODE_ENV!=="production"&&yo&&(k=window.performance.now(),E="intlify-message-resolve-start",C="intlify-message-resolve-end",Ar&&Ar(E)),(g=u(p,e))===null&&(g=p[e]),process.env.NODE_ENV!=="production"&&yo){const _=window.performance.now(),T=t.__v_emitter;T&&k&&g&&T.emit("message-resolve",{type:"message-resolve",key:e,message:g,time:_-k,groupId:`${y}:${e}`}),E&&C&&Ar&&da&&(Ar(C),da("intlify message resolve",E,C))}if(Oe(g)||ds(g)||Yr(g))break;if(!A$(m,f)){const _=cg(t,e,m,s,y);_!==e&&(g=_)}b=v}return[g,m,p]}function pC(t,e,n,r,i,s){const{messageCompiler:a,warnHtmlMessage:l}=t;if(Yr(r)){const m=r;return m.locale=m.locale||n,m.key=m.key||e,m}if(a==null){const m=()=>r;return m.locale=n,m.key=e,m}let u=null,c,f;process.env.NODE_ENV!=="production"&&yo&&(u=window.performance.now(),c="intlify-message-compilation-start",f="intlify-message-compilation-end",Ar&&Ar(c));const p=a(r,$$(t,n,i,r,l,s));if(process.env.NODE_ENV!=="production"&&yo){const m=window.performance.now(),g=t.__v_emitter;g&&u&&g.emit("message-compilation",{type:"message-compilation",message:r,time:m-u,groupId:`translate:${e}`}),c&&f&&Ar&&da&&(Ar(f),da("intlify message compilation",c,f))}return p.locale=n,p.key=e,p.source=r,p}function F$(t,e,n){let r=null,i,s;process.env.NODE_ENV!=="production"&&yo&&(r=window.performance.now(),i="intlify-message-evaluation-start",s="intlify-message-evaluation-end",Ar&&Ar(i));const a=e(n);if(process.env.NODE_ENV!=="production"&&yo){const l=window.performance.now(),u=t.__v_emitter;u&&r&&u.emit("message-evaluation",{type:"message-evaluation",value:a,time:l-r,groupId:`translate:${e.key}`}),i&&s&&Ar&&da&&(Ar(s),da("intlify message evaluation",i,s))}return a}function pg(...t){const[e,n,r]=t,i=Vt();if(!Oe(e)&&!dn(e)&&!Yr(e)&&!ds(e))throw yi(jn.INVALID_ARGUMENT);const s=dn(e)?String(e):(Yr(e),e);return dn(n)?i.plural=n:Oe(n)?i.default=n:ht(n)&&!$f(n)?i.named=n:en(n)&&(i.list=n),dn(r)?i.plural=r:Oe(r)?i.default=r:ht(r)&&yn(i,r),[s,i]}function $$(t,e,n,r,i,s){return{locale:e,key:n,warnHtmlMessage:i,onError:a=>{if(s&&s(a),process.env.NODE_ENV!=="production"){const l=H$(r),u=`Message compilation error: ${a.message}`,c=a.location&&l&&rF(l,a.location.start.offset,a.location.end.offset),f=t.__v_emitter;f&&l&&f.emit("compile-error",{message:l,error:a.message,start:a.location&&a.location.start.offset,end:a.location&&a.location.end.offset,groupId:`translate:${n}`}),console.error(c?`${u}
|
|
157
157
|
${c}`:u)}else throw a},onCacheKey:a=>JV(e,n,a)}}function H$(t){if(Oe(t))return t;if(t.loc&&t.loc.source)return t.loc.source}function z$(t,e,n,r){const{modifiers:i,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:u,missingWarn:c,fallbackContext:f}=t,m={locale:e,modifiers:i,pluralRules:s,messages:(g,b)=>{let v=a(n,g);if(v==null&&(f||b)){const[,,y]=fC(f||t,g,e,l,u,c);v=a(y,g)}if(Oe(v)||ds(v)){let y=!1;const k=pC(t,g,e,v,g,()=>{y=!0});return y?cC:k}else return Yr(v)?v:cC}};return t.processor&&(m.processor=t.processor),r.list&&(m.list=r.list),r.named&&(m.named=r.named),dn(r.plural)&&(m.pluralIndex=r.plural),m}RF();function U$(){return hC().__VUE_DEVTOOLS_GLOBAL_HOOK__}function hC(){return typeof navigator<"u"&&typeof window<"u"?window:typeof globalThis<"u"?globalThis:{}}const W$=typeof Proxy=="function",j$="devtools-plugin:setup",q$="plugin:settings:set";let Ol,hg;function K$(){var t;return Ol!==void 0||(typeof window<"u"&&window.performance?(Ol=!0,hg=window.performance):typeof globalThis<"u"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(Ol=!0,hg=globalThis.perf_hooks.performance):Ol=!1),Ol}function G$(){return K$()?hg.now():Date.now()}class X${constructor(e,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=e,this.hook=n;const r={};if(e.settings)for(const a in e.settings){const l=e.settings[a];r[a]=l.defaultValue}const i=`__vue-devtools-plugin-settings__${e.id}`;let s=Object.assign({},r);try{const a=localStorage.getItem(i),l=JSON.parse(a);Object.assign(s,l)}catch{}this.fallbacks={getSettings(){return s},setSettings(a){try{localStorage.setItem(i,JSON.stringify(a))}catch{}s=a},now(){return G$()}},n&&n.on(q$,(a,l)=>{a===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(a,l)=>this.target?this.target.on[l]:(...u)=>{this.onQueue.push({method:l,args:u})}}),this.proxiedTarget=new Proxy({},{get:(a,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...u)=>(this.targetQueue.push({method:l,args:u,resolve:()=>{}}),this.fallbacks[l](...u)):(...u)=>new Promise(c=>{this.targetQueue.push({method:l,args:u,resolve:c})})})}async setRealTarget(e){this.target=e;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Y$(t,e){const n=t,r=hC(),i=U$(),s=W$&&n.enableEarlyProxy;if(i&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))i.emit(j$,t,e);else{const a=s?new X$(n,i):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:e,proxy:a}),a&&e(a.proxiedTarget)}}/*!
|
|
158
158
|
* vue-i18n v10.0.6
|
|
159
159
|
* (c) 2025 kazuya kawaguchi
|
|
160
160
|
* Released under the MIT License.
|
|
161
|
-
*/const J$="10.0.6";function Z$(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(fa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(fa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1)}const ps={FALLBACK_TO_ROOT:b$,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},Q$={[ps.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[ps.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[ps.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[ps.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function Gf(t,...e){return Ff(Q$[t],...e)}const Wt={UNEXPECTED_RETURN_TYPE:o$,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function nr(t,...e){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:N$,args:e}:void 0)}const N$={[Wt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Wt.INVALID_ARGUMENT]:"Invalid argument",[Wt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Wt.NOT_INSTALLED]:"Need to install with `app.use` function",[Wt.UNEXPECTED_ERROR]:"Unexpected error",[Wt.REQUIRED_VALUE]:"Required in value: {0}",[Wt.INVALID_VALUE]:"Invalid value",[Wt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Wt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Wt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Wt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},mg=Ko("__translateVNode"),gg=Ko("__datetimeParts"),bg=Ko("__numberParts"),ha=Ko("__enableEmitter"),rc=Ko("__disableEmitter"),mC=Ko("__setPluralRules"),gC=Ko("__injectWithOption"),vg=Ko("__dispose");function oc(t){if(!Ct(t))return t;for(const e in t)if(wo(t,e))if(!e.includes("."))Ct(t[e])&&oc(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,s=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=Vt()),!Ct(i[n[a]])){process.env.NODE_ENV!=="production"&&ls(Gf(ps.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}i=i[n[a]]}s||(i[n[r]]=t[e],delete t[e]),Ct(i[n[r]])&&oc(i[n[r]])}return t}function yg(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:s}=e,a=ht(n)?n:en(r)?Vt():{[t]:Vt()};if(en(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||Vt(),zf(c,a[u])):zf(c,a)}else Oe(l)&&zf(JSON.parse(l),a)}),i==null&&s)for(const l in a)wo(a,l)&&oc(a[l]);return a}function bC(t){return t.type}function vC(t,e,n){let r=Ct(e.messages)?e.messages:Vt();"__i18nGlobal"in n&&(r=yg(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(Ct(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(Ct(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function yC(t){return o.createVNode(o.Text,null,t,0)}const wC="__INTLIFY_META__",xC=()=>[],eH=()=>!1;let CC=0;function kC(t){return(e,n,r,i)=>t(n,r,o.getCurrentInstance()||void 0,i)}const tH=()=>{const t=o.getCurrentInstance();let e=null;return t&&(e=bC(t)[wC])?{[wC]:e}:null};function wg(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,i=t.flatJson,s=yo?o.ref:o.shallowRef;let a=St(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:Oe(t.locale)?t.locale:tc),u=s(e&&a?e.fallbackLocale.value:Oe(t.fallbackLocale)||en(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(yg(l.value,t)),f=s(ht(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(ht(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:St(t.fallbackRoot)?t.fallbackRoot:!0,v=!!t.fallbackFormat,y=Ut(t.missing)?t.missing:null,x=Ut(t.missing)?kC(t.missing):null,k=Ut(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const _=e?e.modifiers:ht(t.modifiers)?t.modifiers:{};let T=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Zx(null);const ue={version:J$,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:_,pluralRules:T,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};ue.datetimeFormats=f.value,ue.numberFormats=p.value,ue.__datetimeFormatters=ht(A)?A.__datetimeFormatters:void 0,ue.__numberFormatters=ht(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(ue.__v_emitter=ht(A)?A.__v_emitter:void 0);const j=T$(ue);return r&&Zx(j),j})(),nc(A,l.value,u.value);function O(){return[l.value,u.value,c.value,f.value,p.value]}const B=o.computed({get:()=>l.value,set:ue=>{l.value=ue,A.locale=l.value}}),$=o.computed({get:()=>u.value,set:ue=>{u.value=ue,A.fallbackLocale=u.value,nc(A,l.value,ue)}}),H=o.computed(()=>c.value),X=o.computed(()=>f.value),ee=o.computed(()=>p.value);function z(){return Ut(k)?k:null}function L(ue){k=ue,A.postTranslation=ue}function D(){return y}function F(ue){ue!==null&&(x=kC(ue)),y=ue,A.missing=x}function R(ue,j){return ue!=="translate"||!j.resolvedMessage}const K=(ue,j,Q,pe,Re,et)=>{O();let ae;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?_$():void 0),ae=ue(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(Q!=="translate exists"&&dn(ae)&&ae===jf||Q==="translate exists"&&!ae){const[Be,_t]=j();if(process.env.NODE_ENV!=="production"&&e&&Oe(Be)&&R(Q,_t)&&(b&&(Kf(g,Be)||Nx(m,Be))&&ls(Gf(ps.FALLBACK_TO_ROOT,{key:Be,type:Q})),process.env.NODE_ENV!=="production")){const{__v_emitter:oe}=A;oe&&b&&oe.emit("fallback",{type:Q,key:Be,to:"global",groupId:`${Q}:${Be}`})}return e&&b?pe(e):Re(Be)}else{if(et(ae))return ae;throw nr(Wt.UNEXPECTED_RETURN_TYPE)}};function Y(...ue){return K(j=>Reflect.apply(dC,null,[j,...ue]),()=>pg(...ue),"translate",j=>Reflect.apply(j.t,j,[...ue]),j=>j,j=>Oe(j))}function ie(...ue){const[j,Q,pe]=ue;if(pe&&!Ct(pe))throw nr(Wt.INVALID_ARGUMENT);return Y(j,Q,yn({resolvedMessage:!0},pe||{}))}function fe(...ue){return K(j=>Reflect.apply(rC,null,[j,...ue]),()=>dg(...ue),"datetime format",j=>Reflect.apply(j.d,j,[...ue]),()=>qf,j=>Oe(j))}function ke(...ue){return K(j=>Reflect.apply(sC,null,[j,...ue]),()=>fg(...ue),"number format",j=>Reflect.apply(j.n,j,[...ue]),()=>qf,j=>Oe(j))}function re(ue){return ue.map(j=>Oe(j)||dn(j)||St(j)?yC(String(j)):j)}const J={normalize:re,interpolate:ue=>ue,type:"vnode"};function te(...ue){return K(j=>{let Q;const pe=j;try{pe.processor=J,Q=Reflect.apply(dC,null,[pe,...ue])}finally{pe.processor=null}return Q},()=>pg(...ue),"translate",j=>j[mg](...ue),j=>[yC(j)],j=>en(j))}function ne(...ue){return K(j=>Reflect.apply(sC,null,[j,...ue]),()=>fg(...ue),"number format",j=>j[bg](...ue),xC,j=>Oe(j)||en(j))}function se(...ue){return K(j=>Reflect.apply(rC,null,[j,...ue]),()=>dg(...ue),"datetime format",j=>j[gg](...ue),xC,j=>Oe(j)||en(j))}function ce(ue){T=ue,A.pluralRules=T}function _e(ue,j){return K(()=>{if(!ue)return!1;const Q=Oe(j)?j:l.value,pe=Ke(Q),Re=A.messageResolver(pe,ue);return ds(Re)||Yr(Re)||Oe(Re)},()=>[ue],"translate exists",Q=>Reflect.apply(Q.te,Q,[ue,j]),eH,Q=>St(Q))}function Te(ue){let j=null;const Q=Ux(A,u.value,l.value);for(let pe=0;pe<Q.length;pe++){const Re=c.value[Q[pe]]||{},et=A.messageResolver(Re,ue);if(et!=null){j=et;break}}return j}function Ue(ue){const j=Te(ue);return j??(e?e.tm(ue)||{}:{})}function Ke(ue){return c.value[ue]||{}}function je(ue,j){if(i){const Q={[ue]:j};for(const pe in Q)wo(Q,pe)&&oc(Q[pe]);j=Q[ue]}c.value[ue]=j,A.messages=c.value}function Rt(ue,j){c.value[ue]=c.value[ue]||{};const Q={[ue]:j};if(i)for(const pe in Q)wo(Q,pe)&&oc(Q[pe]);j=Q[ue],zf(j,c.value[ue]),A.messages=c.value}function q(ue){return f.value[ue]||{}}function U(ue,j){f.value[ue]=j,A.datetimeFormats=f.value,iC(A,ue,j)}function ge(ue,j){f.value[ue]=yn(f.value[ue]||{},j),A.datetimeFormats=f.value,iC(A,ue,j)}function xe(ue){return p.value[ue]||{}}function Fe(ue,j){p.value[ue]=j,A.numberFormats=p.value,lC(A,ue,j)}function st(ue,j){p.value[ue]=yn(p.value[ue]||{},j),A.numberFormats=p.value,lC(A,ue,j)}CC++,e&&yo&&(o.watch(e.locale,ue=>{a&&(l.value=ue,A.locale=ue,nc(A,l.value,u.value))}),o.watch(e.fallbackLocale,ue=>{a&&(u.value=ue,A.fallbackLocale=ue,nc(A,l.value,u.value))}));const qe={id:CC,locale:B,fallbackLocale:$,get inheritLocale(){return a},set inheritLocale(ue){a=ue,ue&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,nc(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:H,get modifiers(){return _},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(ue){m=ue,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(ue){g=ue,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(ue){b=ue},get fallbackFormat(){return v},set fallbackFormat(ue){v=ue,A.fallbackFormat=v},get warnHtmlMessage(){return E},set warnHtmlMessage(ue){E=ue,A.warnHtmlMessage=ue},get escapeParameter(){return C},set escapeParameter(ue){C=ue,A.escapeParameter=ue},t:Y,getLocaleMessage:Ke,setLocaleMessage:je,mergeLocaleMessage:Rt,getPostTranslationHandler:z,setPostTranslationHandler:L,getMissingHandler:D,setMissingHandler:F,[mC]:ce};return qe.datetimeFormats=X,qe.numberFormats=ee,qe.rt=ie,qe.te=_e,qe.tm=Ue,qe.d=fe,qe.n=ke,qe.getDateTimeFormat=q,qe.setDateTimeFormat=U,qe.mergeDateTimeFormat=ge,qe.getNumberFormat=xe,qe.setNumberFormat=Fe,qe.mergeNumberFormat=st,qe[gC]=n,qe[mg]=te,qe[gg]=se,qe[bg]=ne,process.env.NODE_ENV!=="production"&&(qe[ha]=ue=>{A.__v_emitter=ue},qe[rc]=()=>{A.__v_emitter=void 0}),qe}const EC="vue-i18n: composer properties",xg={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},nH={"vue-i18n-resource-inspector":"Search for scopes ..."},rH={"vue-i18n-timeline":16764185};let Cg;async function oH(t,e){return new Promise((n,r)=>{try{Y$({id:"vue-devtools-plugin-vue-i18n",label:xg["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[EC],app:t},i=>{Cg=i,i.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{iH(a,l,e)}),i.on.inspectComponent(({componentInstance:a,instanceData:l})=>{a.vnode.el&&a.vnode.el.__VUE_I18N__&&l&&(e.mode==="legacy"?a.vnode.el.__VUE_I18N__!==e.global.__composer&&_C(l,a.vnode.el.__VUE_I18N__):_C(l,a.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:xg["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:nH["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&cH(a,e)});const s=new Map;i.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),fH(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await i.getComponentInstances(a.app);s.set(a.app,l)}i.highlightElement(s.get(a.app))}else{const l=dH(a.nodeId,e);l&&i.highlightElement(l)}}),i.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&hH(a,e)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:xg["vue-i18n-timeline"],color:rH["vue-i18n-timeline"]}),n(!0)})}catch(i){console.error(i),r(!1)}})}function SC(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function iH(t,e,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(t&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&t.vnode.el.__VUE_I18N__!==r){const i={label:`i18n (${SC(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(i)}}function _C(t,e){const n=EC;t.state.push({type:n,key:"locale",editable:!0,value:e.locale.value}),t.state.push({type:n,key:"availableLocales",editable:!1,value:e.availableLocales}),t.state.push({type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),t.state.push({type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}),t.state.push({type:n,key:"messages",editable:!1,value:kg(e.messages.value)}),t.state.push({type:n,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),t.state.push({type:n,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function kg(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Ut(r)&&"source"in r?e[n]=uH(r):ds(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:Ct(r)?e[n]=kg(r):e[n]=r}),e}const sH={"<":"<",">":">",'"':""","&":"&"};function aH(t){return t.replace(/[<>"&]/g,lH)}function lH(t){return sH[t]||t}function uH(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${aH(t.source)}")`:"(?)"}`}}}function cH(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,i]of e.__instances){const s=e.mode==="composition"?i:i.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${SC(r)} Scope`})}}function dH(t,e){let n=null;if(t!=="global"){for(const[r,i]of e.__instances.entries())if(i.id.toString()===t){n=r;break}}return n}function TC(t,e){if(t==="global")return e.mode==="composition"?e.global:e.global.__composer;{const n=Array.from(e.__instances.values()).find(r=>r.id.toString()===t);return n?e.mode==="composition"?n:n.__composer:null}}function fH(t,e){const n=TC(t.nodeId,e);return n&&(t.state=pH(n)),null}function pH(t){const e={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:t.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:t.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}];e[n]=r;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:kg(t.messages.value)}];e[i]=s;{const a="Datetime formats info",l=[{type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}];e[a]=l;const u="Datetime formats info",c=[{type:u,key:"numberFormats",editable:!1,value:t.numberFormats.value}];e[u]=c}return e}function ic(t,e){if(Cg){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),Cg.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:t,groupId:n,time:Date.now(),meta:{},data:e||{},logType:t==="compile-error"?"error":t==="fallback"||t==="missing"?"warning":"default"}})}}function hH(t,e){const n=TC(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&Oe(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(Oe(t.state.value)||en(t.state.value)||Ct(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&St(t.state.value)&&(n.inheritLocale=t.state.value)}}function mH(t){const e=Oe(t.locale)?t.locale:tc,n=Oe(t.fallbackLocale)||en(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=Ut(t.missing)?t.missing:void 0,i=St(t.silentTranslationWarn)||_l(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=St(t.silentFallbackWarn)||_l(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=St(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=ht(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=Ut(t.postTranslation)?t.postTranslation:void 0,p=Oe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=St(t.sync)?t.sync:!0;let b=t.messages;if(ht(t.sharedMessages)){const _=t.sharedMessages;b=Object.keys(_).reduce((A,V)=>{const O=A[V]||(A[V]={});return yn(O,_[V]),A},b||{})}const{__i18n:v,__root:y,__injectWithOption:x}=t,k=t.datetimeFormats,E=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:k,numberFormats:E,missing:r,missingWarn:i,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:v,__root:y,__injectWithOption:x}}function Eg(t={}){const e=wg(mH(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(i){e.locale.value=i},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(i){e.fallbackLocale.value=i},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(i){e.setMissingHandler(i)},get silentTranslationWarn(){return St(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(i){e.missingWarn=St(i)?!i:i},get silentFallbackWarn(){return St(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(i){e.fallbackWarn=St(i)?!i:i},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(i){e.fallbackFormat=i},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(i){e.setPostTranslationHandler(i)},get sync(){return e.inheritLocale},set sync(i){e.inheritLocale=i},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){e.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(i){e.escapeParameter=i},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...i){return Reflect.apply(e.t,e,[...i])},rt(...i){return Reflect.apply(e.rt,e,[...i])},tc(...i){const[s,a,l]=i,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&Px(Gf(ps.DEPRECATE_TC)),!Oe(s))throw nr(Wt.INVALID_ARGUMENT);const p=s;return Oe(a)?u.locale=a:dn(a)?u.plural=a:en(a)?c=a:ht(a)&&(f=a),Oe(l)?u.locale=l:en(l)?c=l:ht(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(i,s){return e.te(i,s)},tm(i){return e.tm(i)},getLocaleMessage(i){return e.getLocaleMessage(i)},setLocaleMessage(i,s){e.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){e.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(e.d,e,[...i])},getDateTimeFormat(i){return e.getDateTimeFormat(i)},setDateTimeFormat(i,s){e.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){e.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(e.n,e,[...i])},getNumberFormat(i){return e.getNumberFormat(i)},setNumberFormat(i,s){e.setNumberFormat(i,s)},mergeNumberFormat(i,s){e.mergeNumberFormat(i,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=i=>{const s=e;s[ha]&&s[ha](i)},r.__disableEmitter=()=>{const i=e;i[rc]&&i[rc]()}),r}function gH(t,e,n){return{beforeCreate(){const r=o.getCurrentInstance();if(!r)throw nr(Wt.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=e,this===this.$root)this.$i18n=AC(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Eg(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=AC(t,i);else{this.$i18n=Eg({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;i.__i18nGlobal&&vC(e,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const i=this.__v_emitter=tg();r.__enableEmitter&&r.__enableEmitter(i),i.on("*",ic)}},unmounted(){const r=o.getCurrentInstance();if(!r)throw nr(Wt.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ic),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n}}}function AC(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[mC](e.pluralizationRules||t.pluralizationRules);const n=yg(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(r=>t.mergeLocaleMessage(r,n[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>t.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>t.mergeNumberFormat(r,e.numberFormats[r])),t}const Sg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function bH({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===o.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Vt())}function MC(){return o.Fragment}const OC=o.defineComponent({name:"i18n-t",props:yn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>dn(t)||!isNaN(t)}},Sg),setup(t,e){const{slots:n,attrs:r}=e,i=t.i18n||At({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=Vt();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=Oe(t.plural)?+t.plural:t.plural);const l=bH(e,s),u=i[mg](t.keypath,l,a),c=yn(Vt(),r),f=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(f,c,u)}}});function vH(t){return en(t)&&!Oe(t[0])}function BC(t,e,n,r){const{slots:i,attrs:s}=e;return()=>{const a={part:!0};let l=Vt();t.locale&&(a.locale=t.locale),Oe(t.format)?a.key=t.format:Ct(t.format)&&(Oe(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?yn(Vt(),m,{[g]:t.format[g]}):m,Vt()));const u=r(t.value,a,l);let c=[a.key];en(u)?c=u.map((m,g)=>{const b=i[m.type],v=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return vH(v)&&(v[0].key=`${m.type}-${g}`),v}):Oe(u)&&(c=[u]);const f=yn(Vt(),s),p=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(p,f,c)}}const IC=o.defineComponent({name:"i18n-n",props:yn({value:{type:Number,required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||At({useScope:t.scope,__useComponent:!0});return BC(t,e,aC,(...r)=>n[bg](...r))}}),RC=o.defineComponent({name:"i18n-d",props:yn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||At({useScope:t.scope,__useComponent:!0});return BC(t,e,oC,(...r)=>n[gg](...r))}});function yH(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const r=n.__getInstance(e);return r!=null?r.__composer:t.global.__composer}}function wH(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw nr(Wt.UNEXPECTED_ERROR);const c=yH(t,l.$),f=LC(u);return[Reflect.apply(c.t,c,[...DC(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);yo&&t.global===c&&(a.__i18nWatcher=o.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{yo&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const u=a.__composer,c=LC(l);a.textContent=Reflect.apply(u.t,u,[...DC(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function LC(t){if(Oe(t))return{path:t};if(ht(t)){if(!("path"in t))throw nr(Wt.REQUIRED_VALUE,"path");return t}else throw nr(Wt.INVALID_VALUE)}function DC(t){const{path:e,locale:n,args:r,choice:i,plural:s}=t,a={},l=r||{};return Oe(n)&&(a.locale=n),dn(i)&&(a.plural=i),dn(s)&&(a.plural=s),[e,l,a]}function xH(t,e,...n){const r=ht(n[0])?n[0]:{};(St(r.globalInstall)?r.globalInstall:!0)&&([OC.name,"I18nT"].forEach(s=>t.component(s,OC)),[IC.name,"I18nN"].forEach(s=>t.component(s,IC)),[RC.name,"I18nD"].forEach(s=>t.component(s,RC))),t.directive("t",wH(e))}const CH=Ko("global-vue-i18n");function kH(t={},e){const n=__VUE_I18N_LEGACY_API__&&St(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=St(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,a]=EH(t,n),l=Ko(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return i.get(m)||null}function c(m,g){i.set(m,g)}function f(m){i.delete(m)}const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(m,...g){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=p),m.__VUE_I18N_SYMBOL__=l,m.provide(m.__VUE_I18N_SYMBOL__,p),ht(g[0])){const y=g[0];p.__composerExtend=y.__composerExtend,p.__vueI18nExtend=y.__vueI18nExtend}let b=null;!n&&r&&(b=IH(m,p.global)),__VUE_I18N_FULL_INSTALL__&&xH(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(gH(a,a.__composer,p));const v=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),v()},process.env.NODE_ENV!=="production"){if(!await oH(m,p))throw nr(Wt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=tg();if(n){const k=a;k.__enableEmitter&&k.__enableEmitter(x)}else{const k=a;k[ha]&&k[ha](x)}x.on("*",ic)}},get global(){return a},dispose(){s.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function At(t={}){const e=o.getCurrentInstance();if(e==null)throw nr(Wt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw nr(Wt.NOT_INSTALLED);const n=SH(e),r=TH(n),i=bC(e),s=_H(t,i);if(s==="global")return vC(r,t,i),r;if(s==="parent"){let u=AH(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&ls(Gf(ps.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=yn({},t);"__i18n"in i&&(u.__i18n=i.__i18n),r&&(u.__root=r),l=wg(u),a.__composerExtend&&(l[vg]=a.__composerExtend(l)),OH(a,e,l),a.__setInstance(e,l)}return l}function EH(t,e,n){const r=o.effectScope(),i=__VUE_I18N_LEGACY_API__&&e?r.run(()=>Eg(t)):r.run(()=>wg(t));if(i==null)throw nr(Wt.UNEXPECTED_ERROR);return[r,i]}function SH(t){const e=o.inject(t.isCE?CH:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw nr(t.isCE?Wt.NOT_INSTALLED_WITH_PROVIDE:Wt.UNEXPECTED_ERROR);return e}function _H(t,e){return $f(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function TH(t){return t.mode==="composition"?t.global:t.global.__composer}function AH(t,e,n=!1){let r=null;const i=e.root;let s=MH(e,n);for(;s!=null;){const a=t;if(t.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[gC]&&(r=null))}if(r!=null||i===s)break;s=s.parent}return r}function MH(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function OH(t,e,n){let r=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=tg();const i=n;i[ha]&&i[ha](r),r.on("*",ic)}},e),o.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",ic),i[rc]&&i[rc](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=i[vg];s&&(s(),delete i[vg])},e)}const BH=["locale","fallbackLocale","availableLocales"],PC=["t","rt","d","n","tm","te"];function IH(t,e){const n=Object.create(null);return BH.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s)throw nr(Wt.UNEXPECTED_ERROR);const a=o.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,a)}),t.config.globalProperties.$i18n=n,PC.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!s.value)throw nr(Wt.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${i}`,s)}),()=>{delete t.config.globalProperties.$i18n,PC.forEach(i=>{delete t.config.globalProperties[`$${i}`]})}}if(Z$(),x$(NF),C$(g$),k$(Ux),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=fa();t.__INTLIFY__=!0,e$(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xf="paragraph",Jr="page",VC="Extend",Bl="Node",RH=Bl+VC,LH="CC",Yf="heading",Jf="bulletList",_g="listItem",FC="taskList",DH="taskItem",Zf="orderedList",hs="table",Tg="tableHeader",Ag="tableRow",PH="tableCell",Mg="column",ma="columns",Og="textBox",Il="image",wi="imageUpload",sc="videoUpload",VH="iframe",FH="file",Bg="codeBlock",Ig="blockquote",$H="audio",HH="toc",$C="video",zH="horizontalrule",Rg="pagination",UH=[hs,Zf,Jf,FC],WH=[$C,Il],ac="link",jH="placeholder",qH="focus",KH="text",GH="text-bubble",XH="gapCursor",YH="dropCursor",JH="characterCount",ZH="hardBreak",QH="textStyle",NH="selection",lc="superText",Lg="configPlan",Qf="fontSize",uc="fontFamily",HC="fontWeight",ez="bold",tz="italic",nz="underline",rz="strike",oz="color",iz="highlight",sz="moreMark",az="textAlign",lz="indent",uz="lineHeight",cz="painter",dz="clear",xi="spellchecker",Nf="fontSizeIncreaseDecrease",ep="time-highlighter",tp="specialCharacter",zC="history",fz=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:$H,BLOCKQUOTE:Ig,BOLD:ez,BULLETLIST:Jf,CASSIE_BLOCK:Bl,CASSIE_BLOCK_EXTEND:RH,CC:LH,CHARACTER_COUNT:JH,CLEAR:dz,CODE_BLOCK:Bg,COLOR:oz,COLUMN:Mg,COLUMNS:ma,CONFIG_PLAN:Lg,DROP_CURSOR:YH,EXTEND:VC,FILE:FH,FOCUS:qH,FONTSIZE_INCREASEDECREASE:Nf,FONT_FAMILY:uc,FONT_SIZE:Qf,FONT_WEIGHT:HC,GAP_CURSOR:XH,HARD_BREAK:ZH,HEADING:Yf,HIGHLIGHT:iz,HISTORY:zC,HORIZONTALRULE:zH,IFRAME:VH,IMAGE:Il,IMAGE_UPLOAD:wi,INDENT:lz,ITALIC:tz,LINE_HEIGHT:uz,LINK:ac,LISTITEM:_g,LIST_MEDIA:WH,LIST_TYPE:UH,MORE_MARK:sz,ORDEREDLIST:Zf,PAGE:Jr,PAGEBREAK:Rg,PAINTER:cz,PARAGRAPH:Xf,PLACEHOLDER:jH,SELECTION:NH,SPECIAL_CHARACTER:tp,SPELLCHECKER:xi,STRIKE:rz,SUPER_TEXT:lc,TABLE:hs,TABLEHEADER:Tg,TABLE_CELL:PH,TABLE_ROW:Ag,TASKITEM:DH,TASKLIST:FC,TEXT:KH,TEXT_ALIGN:az,TEXT_BOX:Og,TEXT_BUBBLE:GH,TEXT_STYLE:QH,TIME_HIGH_LIGHTER:ep,TOC:HH,UNDERLINE:nz,VIDEO:$C,VIDEO_UPLOAD:sc},Symbol.toStringTag,{value:"Module"})),UC=t=>{if(!t)return-1;const{from:e}=t.state.selection;let n=0;return t.state.doc.descendants((r,i)=>{r.type.name===Xf&&i<e&&n++}),n},WC=t=>{var r,i;const e=(r=t.view)==null?void 0:r.dom;if(!e)return!1;const n=(i=window.getSelection)==null?void 0:i.call(window);if(n&&n.rangeCount){const s=n.anchorNode;if(s&&e.contains(s))return!0}return!1},jC=(t,e)=>t.map((r,i)=>({ext:r,name:r.name,originalIndex:i,order:e[r.name]})).sort((r,i)=>{const s=r.order===-1,a=i.order===-1;if(s&&!a)return 1;if(!s&&a)return-1;if(s&&a)return r.originalIndex-i.originalIndex;const l=typeof r.order=="number",u=typeof i.order=="number";return l&&u?r.order-i.order:l?-1:u?1:r.originalIndex-i.originalIndex}).map(r=>r.ext),np=(t,e)=>t?!!t.extensionManager.extensions.find(n=>n.name===e):!1;function qC(t,e){return e.characterCountLimit===void 0?t:t.map(n=>n.name==="base-kit"?n.configure({...n.options,characterCount:{...n.options.characterCount,limit:e.characterCountLimit}}):n)}const pz={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},hz={class:"flex-1 flex justify-end items-center gap-x-3"},mz=o.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{},class:{},customClassToolbar:{},toolbarExtensionOrder:{}},setup(t){const e=o.defineAsyncComponent(()=>Promise.resolve().then(()=>qJ)),{t:n}=At(),r=t,i=o.inject("isEditable",o.ref(!0)),s=[Qf,uc,tp,Nf,xi,lc],a=o.computed(()=>{const f=[...r.editor.extensionManager.extensions],p={[xi]:-1},m={[Qf]:1,[uc]:2,[tp]:3,[Nf]:4,[xi]:5,[lc]:6},g=r.toolbarExtensionOrder??(r.mode===Me.EDITOR?p:m),b=jC(f,g);let v=[];for(const y of b){const{button:x,divider:k=!1,spacer:E=!1,toolbar:C=!0}=y.options;if(!x||!f1(x)||!C)continue;const _=x({editor:r.editor,extension:y,t:o.unref(n)});if(Array.isArray(_)){const T=_.map((A,V)=>({id:`${y.name}`,button:A,divider:V===_.length-1?k:!1,spacer:V===0?E:!1}));v=[...v,...T];continue}v.push({button:_,divider:k,spacer:E,id:`${y.name}`})}if(r.mode!==Me.EDITOR)return v.filter(y=>y.id&&s.includes(y.id));if(v=v.filter(y=>y.id!=="superText"),!i.value){v=v.map(x=>(x.button.componentProps.disabled=!0,x));const y=v.find(x=>x.id==="spellchecker");y&&(y.button.componentProps.disabled=!1)}return v}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 dark:!text-white hover:!bg-gray-200 dark:hover:!bg-gray-700 rounded-none [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] p-0 w-[26px] h-[26px]":f.button.componentProps.customClass,u=f=>f.id==="spellchecker"?"Spellchecker":f.button.componentProps.icon,c=o.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Ee)(r.class,f.customClassToolbar))},[o.createElementVNode("div",pz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>{var v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[g.spacer&&b!==0?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.button.component),o.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((v=g.button.componentProps)==null?void 0:v.disabled),"custom-class":l(g),icon:u(g)}),o.createSlots({_:2},[o.renderList(g.button.componentSlots,(y,x,k)=>({name:`${x}`,fn:o.withCtx(E=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},E==null?void 0:E.props,{id:g.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),g.divider?(o.openBlock(),o.createBlock(o.unref(vo),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128)),o.createElementVNode("div",hz,[p[0]||(p[0]=o.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(o.openBlock(),o.createBlock(o.unref(e),{key:0,editor:f.editor,"editor-comment":f.editorComment,isEnableSpellCheckRealTime:(m=f.editor)==null?void 0:m.extensionStorage.spellchecker.spellchecker.proofreader.enabled},null,8,["editor","editor-comment","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])])],2)}}}),ms=o.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(MP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(({open:l})=>[o.renderSlot(s.$slots,"default",{open:l})]),_:3},16))}}),gs=o.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(BP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(LP),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)("z-50 w-72 rounded-md border bg-ed-popover p-4 text-ed-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rp=o.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(PV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),op=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VV),o.mergeProps(n.value,{class:o.unref(Ee)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),gz={class:"truncate"},Rl=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref($V),o.mergeProps(o.unref(r),{class:o.unref(Ee)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-ed-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-ed-background data-[state=active]:text-ed-foreground data-[state=active]:shadow-sm",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",gz,[o.renderSlot(i.$slots,"default")])]),_:3},16,["class"]))}}),bs=o.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=Ne.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.isRef(i)?i.value=l:null),class:o.normalizeClass(o.unref(Ee)("flex h-9 w-full rounded-md border border-ed-input bg-transparent px-3 py-1 box-border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[o.vModelText,o.unref(i)]])}}),cc=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(TP),o.mergeProps(n.value,{class:o.unref(Ee)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),ga=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(OP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});let Dg;function Pg(){return Dg===void 0&&(Dg=navigator.platform.includes("Mac")),Dg}function ip(t){return t.toLowerCase()==="mod"?Pg()?"⌘":"Ctrl":t.toLowerCase()==="alt"?Pg()?"⌥":"Alt":t.toLowerCase()==="shift"?Pg()?"⇧":"Shift":t}function KC(t){return t.map(ip).join(" ")}const GC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,XC=Om,Vg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return XC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=GC(f)||GC(p);return i[c][m]}),l=n&&Object.entries(n).reduce((c,f)=>{let[p,m]=f;return m===void 0||(c[p]=m),c},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:p,className:m,...g}=f;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...l}[v]):{...s,...l}[v]===y})?[...c,p,m]:c},[]);return XC(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},YC=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(HV),o.mergeProps(o.unref(s),{class:o.unref(Ee)(o.unref(bz)({variant:a.variant,size:a.size}),n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),bz=Vg("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-ed-muted hover:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-ed-accent data-[state=on]:text-ed-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-ed-input bg-transparent shadow-sm hover:bg-ed-accent hover:text-ed-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),ba=o.defineComponent({name:"ToolTip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),vs=o.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(XV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(GV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)(`z-50 overflow-hidden rounded-md bg-ed-primary px-3 py-1.5 text-xs text-ed-primary-foreground
|
|
161
|
+
*/const J$="10.0.6";function Z$(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(fa().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(fa().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(fa().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(fa().__INTLIFY_PROD_DEVTOOLS__=!1)}const ps={FALLBACK_TO_ROOT:b$,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_TC:11},Q$={[ps.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[ps.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[ps.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[ps.DEPRECATE_TC]:"'tc' and '$tc' has been deprecated in v10. Use 't' or '$t' instead. 'tc' and '$tc’ are going to remove in v11."};function Gf(t,...e){return Ff(Q$[t],...e)}const Wt={UNEXPECTED_RETURN_TYPE:o$,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function nr(t,...e){return Tl(t,null,process.env.NODE_ENV!=="production"?{messages:N$,args:e}:void 0)}const N$={[Wt.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[Wt.INVALID_ARGUMENT]:"Invalid argument",[Wt.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[Wt.NOT_INSTALLED]:"Need to install with `app.use` function",[Wt.UNEXPECTED_ERROR]:"Unexpected error",[Wt.REQUIRED_VALUE]:"Required in value: {0}",[Wt.INVALID_VALUE]:"Invalid value",[Wt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[Wt.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[Wt.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[Wt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},mg=Ko("__translateVNode"),gg=Ko("__datetimeParts"),bg=Ko("__numberParts"),ha=Ko("__enableEmitter"),rc=Ko("__disableEmitter"),mC=Ko("__setPluralRules"),gC=Ko("__injectWithOption"),vg=Ko("__dispose");function oc(t){if(!Ct(t))return t;for(const e in t)if(wo(t,e))if(!e.includes("."))Ct(t[e])&&oc(t[e]);else{const n=e.split("."),r=n.length-1;let i=t,s=!1;for(let a=0;a<r;a++){if(n[a]==="__proto__")throw new Error(`unsafe key: ${n[a]}`);if(n[a]in i||(i[n[a]]=Vt()),!Ct(i[n[a]])){process.env.NODE_ENV!=="production"&&ls(Gf(ps.IGNORE_OBJ_FLATTEN,{key:n[a]})),s=!0;break}i=i[n[a]]}s||(i[n[r]]=t[e],delete t[e]),Ct(i[n[r]])&&oc(i[n[r]])}return t}function yg(t,e){const{messages:n,__i18n:r,messageResolver:i,flatJson:s}=e,a=ht(n)?n:en(r)?Vt():{[t]:Vt()};if(en(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:u,resource:c}=l;u?(a[u]=a[u]||Vt(),zf(c,a[u])):zf(c,a)}else Oe(l)&&zf(JSON.parse(l),a)}),i==null&&s)for(const l in a)wo(a,l)&&oc(a[l]);return a}function bC(t){return t.type}function vC(t,e,n){let r=Ct(e.messages)?e.messages:Vt();"__i18nGlobal"in n&&(r=yg(t.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const i=Object.keys(r);i.length&&i.forEach(s=>{t.mergeLocaleMessage(s,r[s])});{if(Ct(e.datetimeFormats)){const s=Object.keys(e.datetimeFormats);s.length&&s.forEach(a=>{t.mergeDateTimeFormat(a,e.datetimeFormats[a])})}if(Ct(e.numberFormats)){const s=Object.keys(e.numberFormats);s.length&&s.forEach(a=>{t.mergeNumberFormat(a,e.numberFormats[a])})}}}function yC(t){return o.createVNode(o.Text,null,t,0)}const wC="__INTLIFY_META__",xC=()=>[],eH=()=>!1;let CC=0;function kC(t){return(e,n,r,i)=>t(n,r,o.getCurrentInstance()||void 0,i)}const tH=()=>{const t=o.getCurrentInstance();let e=null;return t&&(e=bC(t)[wC])?{[wC]:e}:null};function wg(t={}){const{__root:e,__injectWithOption:n}=t,r=e===void 0,i=t.flatJson,s=yo?o.ref:o.shallowRef;let a=St(t.inheritLocale)?t.inheritLocale:!0;const l=s(e&&a?e.locale.value:Oe(t.locale)?t.locale:tc),u=s(e&&a?e.fallbackLocale.value:Oe(t.fallbackLocale)||en(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:l.value),c=s(yg(l.value,t)),f=s(ht(t.datetimeFormats)?t.datetimeFormats:{[l.value]:{}}),p=s(ht(t.numberFormats)?t.numberFormats:{[l.value]:{}});let m=e?e.missingWarn:St(t.missingWarn)||_l(t.missingWarn)?t.missingWarn:!0,g=e?e.fallbackWarn:St(t.fallbackWarn)||_l(t.fallbackWarn)?t.fallbackWarn:!0,b=e?e.fallbackRoot:St(t.fallbackRoot)?t.fallbackRoot:!0,v=!!t.fallbackFormat,y=Ut(t.missing)?t.missing:null,x=Ut(t.missing)?kC(t.missing):null,k=Ut(t.postTranslation)?t.postTranslation:null,E=e?e.warnHtmlMessage:St(t.warnHtmlMessage)?t.warnHtmlMessage:!0,C=!!t.escapeParameter;const _=e?e.modifiers:ht(t.modifiers)?t.modifiers:{};let T=t.pluralRules||e&&e.pluralRules,A;A=(()=>{r&&Z6(null);const ue={version:J$,locale:l.value,fallbackLocale:u.value,messages:c.value,modifiers:_,pluralRules:T,missing:x===null?void 0:x,missingWarn:m,fallbackWarn:g,fallbackFormat:v,unresolving:!0,postTranslation:k===null?void 0:k,warnHtmlMessage:E,escapeParameter:C,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};ue.datetimeFormats=f.value,ue.numberFormats=p.value,ue.__datetimeFormatters=ht(A)?A.__datetimeFormatters:void 0,ue.__numberFormatters=ht(A)?A.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(ue.__v_emitter=ht(A)?A.__v_emitter:void 0);const j=T$(ue);return r&&Z6(j),j})(),nc(A,l.value,u.value);function O(){return[l.value,u.value,c.value,f.value,p.value]}const B=o.computed({get:()=>l.value,set:ue=>{l.value=ue,A.locale=l.value}}),$=o.computed({get:()=>u.value,set:ue=>{u.value=ue,A.fallbackLocale=u.value,nc(A,l.value,ue)}}),H=o.computed(()=>c.value),X=o.computed(()=>f.value),ee=o.computed(()=>p.value);function z(){return Ut(k)?k:null}function L(ue){k=ue,A.postTranslation=ue}function D(){return y}function F(ue){ue!==null&&(x=kC(ue)),y=ue,A.missing=x}function R(ue,j){return ue!=="translate"||!j.resolvedMessage}const K=(ue,j,Q,pe,Re,et)=>{O();let ae;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=e?_$():void 0),ae=ue(A)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(A.fallbackContext=void 0)}if(Q!=="translate exists"&&dn(ae)&&ae===jf||Q==="translate exists"&&!ae){const[Be,_t]=j();if(process.env.NODE_ENV!=="production"&&e&&Oe(Be)&&R(Q,_t)&&(b&&(Kf(g,Be)||N6(m,Be))&&ls(Gf(ps.FALLBACK_TO_ROOT,{key:Be,type:Q})),process.env.NODE_ENV!=="production")){const{__v_emitter:oe}=A;oe&&b&&oe.emit("fallback",{type:Q,key:Be,to:"global",groupId:`${Q}:${Be}`})}return e&&b?pe(e):Re(Be)}else{if(et(ae))return ae;throw nr(Wt.UNEXPECTED_RETURN_TYPE)}};function Y(...ue){return K(j=>Reflect.apply(dC,null,[j,...ue]),()=>pg(...ue),"translate",j=>Reflect.apply(j.t,j,[...ue]),j=>j,j=>Oe(j))}function ie(...ue){const[j,Q,pe]=ue;if(pe&&!Ct(pe))throw nr(Wt.INVALID_ARGUMENT);return Y(j,Q,yn({resolvedMessage:!0},pe||{}))}function fe(...ue){return K(j=>Reflect.apply(rC,null,[j,...ue]),()=>dg(...ue),"datetime format",j=>Reflect.apply(j.d,j,[...ue]),()=>qf,j=>Oe(j))}function ke(...ue){return K(j=>Reflect.apply(sC,null,[j,...ue]),()=>fg(...ue),"number format",j=>Reflect.apply(j.n,j,[...ue]),()=>qf,j=>Oe(j))}function re(ue){return ue.map(j=>Oe(j)||dn(j)||St(j)?yC(String(j)):j)}const J={normalize:re,interpolate:ue=>ue,type:"vnode"};function te(...ue){return K(j=>{let Q;const pe=j;try{pe.processor=J,Q=Reflect.apply(dC,null,[pe,...ue])}finally{pe.processor=null}return Q},()=>pg(...ue),"translate",j=>j[mg](...ue),j=>[yC(j)],j=>en(j))}function ne(...ue){return K(j=>Reflect.apply(sC,null,[j,...ue]),()=>fg(...ue),"number format",j=>j[bg](...ue),xC,j=>Oe(j)||en(j))}function se(...ue){return K(j=>Reflect.apply(rC,null,[j,...ue]),()=>dg(...ue),"datetime format",j=>j[gg](...ue),xC,j=>Oe(j)||en(j))}function ce(ue){T=ue,A.pluralRules=T}function _e(ue,j){return K(()=>{if(!ue)return!1;const Q=Oe(j)?j:l.value,pe=Ke(Q),Re=A.messageResolver(pe,ue);return ds(Re)||Yr(Re)||Oe(Re)},()=>[ue],"translate exists",Q=>Reflect.apply(Q.te,Q,[ue,j]),eH,Q=>St(Q))}function Te(ue){let j=null;const Q=U6(A,u.value,l.value);for(let pe=0;pe<Q.length;pe++){const Re=c.value[Q[pe]]||{},et=A.messageResolver(Re,ue);if(et!=null){j=et;break}}return j}function Ue(ue){const j=Te(ue);return j??(e?e.tm(ue)||{}:{})}function Ke(ue){return c.value[ue]||{}}function je(ue,j){if(i){const Q={[ue]:j};for(const pe in Q)wo(Q,pe)&&oc(Q[pe]);j=Q[ue]}c.value[ue]=j,A.messages=c.value}function Rt(ue,j){c.value[ue]=c.value[ue]||{};const Q={[ue]:j};if(i)for(const pe in Q)wo(Q,pe)&&oc(Q[pe]);j=Q[ue],zf(j,c.value[ue]),A.messages=c.value}function q(ue){return f.value[ue]||{}}function U(ue,j){f.value[ue]=j,A.datetimeFormats=f.value,iC(A,ue,j)}function ge(ue,j){f.value[ue]=yn(f.value[ue]||{},j),A.datetimeFormats=f.value,iC(A,ue,j)}function xe(ue){return p.value[ue]||{}}function Fe(ue,j){p.value[ue]=j,A.numberFormats=p.value,lC(A,ue,j)}function st(ue,j){p.value[ue]=yn(p.value[ue]||{},j),A.numberFormats=p.value,lC(A,ue,j)}CC++,e&&yo&&(o.watch(e.locale,ue=>{a&&(l.value=ue,A.locale=ue,nc(A,l.value,u.value))}),o.watch(e.fallbackLocale,ue=>{a&&(u.value=ue,A.fallbackLocale=ue,nc(A,l.value,u.value))}));const qe={id:CC,locale:B,fallbackLocale:$,get inheritLocale(){return a},set inheritLocale(ue){a=ue,ue&&e&&(l.value=e.locale.value,u.value=e.fallbackLocale.value,nc(A,l.value,u.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:H,get modifiers(){return _},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return m},set missingWarn(ue){m=ue,A.missingWarn=m},get fallbackWarn(){return g},set fallbackWarn(ue){g=ue,A.fallbackWarn=g},get fallbackRoot(){return b},set fallbackRoot(ue){b=ue},get fallbackFormat(){return v},set fallbackFormat(ue){v=ue,A.fallbackFormat=v},get warnHtmlMessage(){return E},set warnHtmlMessage(ue){E=ue,A.warnHtmlMessage=ue},get escapeParameter(){return C},set escapeParameter(ue){C=ue,A.escapeParameter=ue},t:Y,getLocaleMessage:Ke,setLocaleMessage:je,mergeLocaleMessage:Rt,getPostTranslationHandler:z,setPostTranslationHandler:L,getMissingHandler:D,setMissingHandler:F,[mC]:ce};return qe.datetimeFormats=X,qe.numberFormats=ee,qe.rt=ie,qe.te=_e,qe.tm=Ue,qe.d=fe,qe.n=ke,qe.getDateTimeFormat=q,qe.setDateTimeFormat=U,qe.mergeDateTimeFormat=ge,qe.getNumberFormat=xe,qe.setNumberFormat=Fe,qe.mergeNumberFormat=st,qe[gC]=n,qe[mg]=te,qe[gg]=se,qe[bg]=ne,process.env.NODE_ENV!=="production"&&(qe[ha]=ue=>{A.__v_emitter=ue},qe[rc]=()=>{A.__v_emitter=void 0}),qe}const EC="vue-i18n: composer properties",xg={"vue-devtools-plugin-vue-i18n":"Vue I18n DevTools","vue-i18n-resource-inspector":"Vue I18n DevTools","vue-i18n-timeline":"Vue I18n"},nH={"vue-i18n-resource-inspector":"Search for scopes ..."},rH={"vue-i18n-timeline":16764185};let Cg;async function oH(t,e){return new Promise((n,r)=>{try{Y$({id:"vue-devtools-plugin-vue-i18n",label:xg["vue-devtools-plugin-vue-i18n"],packageName:"vue-i18n",homepage:"https://vue-i18n.intlify.dev",logo:"https://vue-i18n.intlify.dev/vue-i18n-devtools-logo.png",componentStateTypes:[EC],app:t},i=>{Cg=i,i.on.visitComponentTree(({componentInstance:a,treeNode:l})=>{iH(a,l,e)}),i.on.inspectComponent(({componentInstance:a,instanceData:l})=>{a.vnode.el&&a.vnode.el.__VUE_I18N__&&l&&(e.mode==="legacy"?a.vnode.el.__VUE_I18N__!==e.global.__composer&&_C(l,a.vnode.el.__VUE_I18N__):_C(l,a.vnode.el.__VUE_I18N__))}),i.addInspector({id:"vue-i18n-resource-inspector",label:xg["vue-i18n-resource-inspector"],icon:"language",treeFilterPlaceholder:nH["vue-i18n-resource-inspector"]}),i.on.getInspectorTree(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&cH(a,e)});const s=new Map;i.on.getInspectorState(async a=>{if(a.app===t&&a.inspectorId==="vue-i18n-resource-inspector")if(i.unhighlightElement(),fH(a,e),a.nodeId==="global"){if(!s.has(a.app)){const[l]=await i.getComponentInstances(a.app);s.set(a.app,l)}i.highlightElement(s.get(a.app))}else{const l=dH(a.nodeId,e);l&&i.highlightElement(l)}}),i.on.editInspectorState(a=>{a.app===t&&a.inspectorId==="vue-i18n-resource-inspector"&&hH(a,e)}),i.addTimelineLayer({id:"vue-i18n-timeline",label:xg["vue-i18n-timeline"],color:rH["vue-i18n-timeline"]}),n(!0)})}catch(i){console.error(i),r(!1)}})}function SC(t){return t.type.name||t.type.displayName||t.type.__file||"Anonymous"}function iH(t,e,n){const r=n.mode==="composition"?n.global:n.global.__composer;if(t&&t.vnode.el&&t.vnode.el.__VUE_I18N__&&t.vnode.el.__VUE_I18N__!==r){const i={label:`i18n (${SC(t)} Scope)`,textColor:0,backgroundColor:16764185};e.tags.push(i)}}function _C(t,e){const n=EC;t.state.push({type:n,key:"locale",editable:!0,value:e.locale.value}),t.state.push({type:n,key:"availableLocales",editable:!1,value:e.availableLocales}),t.state.push({type:n,key:"fallbackLocale",editable:!0,value:e.fallbackLocale.value}),t.state.push({type:n,key:"inheritLocale",editable:!0,value:e.inheritLocale}),t.state.push({type:n,key:"messages",editable:!1,value:kg(e.messages.value)}),t.state.push({type:n,key:"datetimeFormats",editable:!1,value:e.datetimeFormats.value}),t.state.push({type:n,key:"numberFormats",editable:!1,value:e.numberFormats.value})}function kg(t){const e={};return Object.keys(t).forEach(n=>{const r=t[n];Ut(r)&&"source"in r?e[n]=uH(r):ds(r)&&r.loc&&r.loc.source?e[n]=r.loc.source:Ct(r)?e[n]=kg(r):e[n]=r}),e}const sH={"<":"<",">":">",'"':""","&":"&"};function aH(t){return t.replace(/[<>"&]/g,lH)}function lH(t){return sH[t]||t}function uH(t){return{_custom:{type:"function",display:`<span>ƒ</span> ${t.source?`("${aH(t.source)}")`:"(?)"}`}}}function cH(t,e){t.rootNodes.push({id:"global",label:"Global Scope"});const n=e.mode==="composition"?e.global:e.global.__composer;for(const[r,i]of e.__instances){const s=e.mode==="composition"?i:i.__composer;n!==s&&t.rootNodes.push({id:s.id.toString(),label:`${SC(r)} Scope`})}}function dH(t,e){let n=null;if(t!=="global"){for(const[r,i]of e.__instances.entries())if(i.id.toString()===t){n=r;break}}return n}function TC(t,e){if(t==="global")return e.mode==="composition"?e.global:e.global.__composer;{const n=Array.from(e.__instances.values()).find(r=>r.id.toString()===t);return n?e.mode==="composition"?n:n.__composer:null}}function fH(t,e){const n=TC(t.nodeId,e);return n&&(t.state=pH(n)),null}function pH(t){const e={},n="Locale related info",r=[{type:n,key:"locale",editable:!0,value:t.locale.value},{type:n,key:"fallbackLocale",editable:!0,value:t.fallbackLocale.value},{type:n,key:"availableLocales",editable:!1,value:t.availableLocales},{type:n,key:"inheritLocale",editable:!0,value:t.inheritLocale}];e[n]=r;const i="Locale messages info",s=[{type:i,key:"messages",editable:!1,value:kg(t.messages.value)}];e[i]=s;{const a="Datetime formats info",l=[{type:a,key:"datetimeFormats",editable:!1,value:t.datetimeFormats.value}];e[a]=l;const u="Datetime formats info",c=[{type:u,key:"numberFormats",editable:!1,value:t.numberFormats.value}];e[u]=c}return e}function ic(t,e){if(Cg){let n;e&&"groupId"in e&&(n=e.groupId,delete e.groupId),Cg.addTimelineEvent({layerId:"vue-i18n-timeline",event:{title:t,groupId:n,time:Date.now(),meta:{},data:e||{},logType:t==="compile-error"?"error":t==="fallback"||t==="missing"?"warning":"default"}})}}function hH(t,e){const n=TC(t.nodeId,e);if(n){const[r]=t.path;r==="locale"&&Oe(t.state.value)?n.locale.value=t.state.value:r==="fallbackLocale"&&(Oe(t.state.value)||en(t.state.value)||Ct(t.state.value))?n.fallbackLocale.value=t.state.value:r==="inheritLocale"&&St(t.state.value)&&(n.inheritLocale=t.state.value)}}function mH(t){const e=Oe(t.locale)?t.locale:tc,n=Oe(t.fallbackLocale)||en(t.fallbackLocale)||ht(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,r=Ut(t.missing)?t.missing:void 0,i=St(t.silentTranslationWarn)||_l(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,s=St(t.silentFallbackWarn)||_l(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,a=St(t.fallbackRoot)?t.fallbackRoot:!0,l=!!t.formatFallbackMessages,u=ht(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,f=Ut(t.postTranslation)?t.postTranslation:void 0,p=Oe(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,m=!!t.escapeParameterHtml,g=St(t.sync)?t.sync:!0;let b=t.messages;if(ht(t.sharedMessages)){const _=t.sharedMessages;b=Object.keys(_).reduce((A,V)=>{const O=A[V]||(A[V]={});return yn(O,_[V]),A},b||{})}const{__i18n:v,__root:y,__injectWithOption:x}=t,k=t.datetimeFormats,E=t.numberFormats,C=t.flatJson;return{locale:e,fallbackLocale:n,messages:b,flatJson:C,datetimeFormats:k,numberFormats:E,missing:r,missingWarn:i,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:u,pluralRules:c,postTranslation:f,warnHtmlMessage:p,escapeParameter:m,messageResolver:t.messageResolver,inheritLocale:g,__i18n:v,__root:y,__injectWithOption:x}}function Eg(t={}){const e=wg(mH(t)),{__extender:n}=t,r={id:e.id,get locale(){return e.locale.value},set locale(i){e.locale.value=i},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(i){e.fallbackLocale.value=i},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(i){e.setMissingHandler(i)},get silentTranslationWarn(){return St(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(i){e.missingWarn=St(i)?!i:i},get silentFallbackWarn(){return St(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(i){e.fallbackWarn=St(i)?!i:i},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(i){e.fallbackFormat=i},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(i){e.setPostTranslationHandler(i)},get sync(){return e.inheritLocale},set sync(i){e.inheritLocale=i},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(i){e.warnHtmlMessage=i!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(i){e.escapeParameter=i},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...i){return Reflect.apply(e.t,e,[...i])},rt(...i){return Reflect.apply(e.rt,e,[...i])},tc(...i){const[s,a,l]=i,u={plural:1};let c=null,f=null;if(process.env.NODE_ENV!=="production"&&P6(Gf(ps.DEPRECATE_TC)),!Oe(s))throw nr(Wt.INVALID_ARGUMENT);const p=s;return Oe(a)?u.locale=a:dn(a)?u.plural=a:en(a)?c=a:ht(a)&&(f=a),Oe(l)?u.locale=l:en(l)?c=l:ht(l)&&(f=l),Reflect.apply(e.t,e,[p,c||f||{},u])},te(i,s){return e.te(i,s)},tm(i){return e.tm(i)},getLocaleMessage(i){return e.getLocaleMessage(i)},setLocaleMessage(i,s){e.setLocaleMessage(i,s)},mergeLocaleMessage(i,s){e.mergeLocaleMessage(i,s)},d(...i){return Reflect.apply(e.d,e,[...i])},getDateTimeFormat(i){return e.getDateTimeFormat(i)},setDateTimeFormat(i,s){e.setDateTimeFormat(i,s)},mergeDateTimeFormat(i,s){e.mergeDateTimeFormat(i,s)},n(...i){return Reflect.apply(e.n,e,[...i])},getNumberFormat(i){return e.getNumberFormat(i)},setNumberFormat(i,s){e.setNumberFormat(i,s)},mergeNumberFormat(i,s){e.mergeNumberFormat(i,s)}};return r.__extender=n,process.env.NODE_ENV!=="production"&&(r.__enableEmitter=i=>{const s=e;s[ha]&&s[ha](i)},r.__disableEmitter=()=>{const i=e;i[rc]&&i[rc]()}),r}function gH(t,e,n){return{beforeCreate(){const r=o.getCurrentInstance();if(!r)throw nr(Wt.UNEXPECTED_ERROR);const i=this.$options;if(i.i18n){const s=i.i18n;if(i.__i18n&&(s.__i18n=i.__i18n),s.__root=e,this===this.$root)this.$i18n=AC(t,s);else{s.__injectWithOption=!0,s.__extender=n.__vueI18nExtend,this.$i18n=Eg(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(i.__i18n)if(this===this.$root)this.$i18n=AC(t,i);else{this.$i18n=Eg({__i18n:i.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=t;i.__i18nGlobal&&vC(e,i,i),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$tc=(...s)=>this.$i18n.tc(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),n.__setInstance(r,this.$i18n)},mounted(){if(process.env.NODE_ENV!=="production"&&this.$el&&this.$i18n){const r=this.$i18n;this.$el.__VUE_I18N__=r.__composer;const i=this.__v_emitter=tg();r.__enableEmitter&&r.__enableEmitter(i),i.on("*",ic)}},unmounted(){const r=o.getCurrentInstance();if(!r)throw nr(Wt.UNEXPECTED_ERROR);const i=this.$i18n;process.env.NODE_ENV!=="production"&&this.$el&&this.$el.__VUE_I18N__&&(this.__v_emitter&&(this.__v_emitter.off("*",ic),delete this.__v_emitter),this.$i18n&&(i.__disableEmitter&&i.__disableEmitter(),delete this.$el.__VUE_I18N__)),delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,i.__disposer&&(i.__disposer(),delete i.__disposer,delete i.__extender),n.__deleteInstance(r),delete this.$i18n}}}function AC(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[mC](e.pluralizationRules||t.pluralizationRules);const n=yg(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(r=>t.mergeLocaleMessage(r,n[r])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(r=>t.mergeDateTimeFormat(r,e.datetimeFormats[r])),e.numberFormats&&Object.keys(e.numberFormats).forEach(r=>t.mergeNumberFormat(r,e.numberFormats[r])),t}const Sg={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function bH({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((r,i)=>[...r,...i.type===o.Fragment?i.children:[i]],[]):e.reduce((n,r)=>{const i=t[r];return i&&(n[r]=i()),n},Vt())}function MC(){return o.Fragment}const OC=o.defineComponent({name:"i18n-t",props:yn({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>dn(t)||!isNaN(t)}},Sg),setup(t,e){const{slots:n,attrs:r}=e,i=t.i18n||At({useScope:t.scope,__useComponent:!0});return()=>{const s=Object.keys(n).filter(p=>p!=="_"),a=Vt();t.locale&&(a.locale=t.locale),t.plural!==void 0&&(a.plural=Oe(t.plural)?+t.plural:t.plural);const l=bH(e,s),u=i[mg](t.keypath,l,a),c=yn(Vt(),r),f=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(f,c,u)}}});function vH(t){return en(t)&&!Oe(t[0])}function BC(t,e,n,r){const{slots:i,attrs:s}=e;return()=>{const a={part:!0};let l=Vt();t.locale&&(a.locale=t.locale),Oe(t.format)?a.key=t.format:Ct(t.format)&&(Oe(t.format.key)&&(a.key=t.format.key),l=Object.keys(t.format).reduce((m,g)=>n.includes(g)?yn(Vt(),m,{[g]:t.format[g]}):m,Vt()));const u=r(t.value,a,l);let c=[a.key];en(u)?c=u.map((m,g)=>{const b=i[m.type],v=b?b({[m.type]:m.value,index:g,parts:u}):[m.value];return vH(v)&&(v[0].key=`${m.type}-${g}`),v}):Oe(u)&&(c=[u]);const f=yn(Vt(),s),p=Oe(t.tag)||Ct(t.tag)?t.tag:MC();return o.h(p,f,c)}}const IC=o.defineComponent({name:"i18n-n",props:yn({value:{type:Number,required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||At({useScope:t.scope,__useComponent:!0});return BC(t,e,aC,(...r)=>n[bg](...r))}}),RC=o.defineComponent({name:"i18n-d",props:yn({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Sg),setup(t,e){const n=t.i18n||At({useScope:t.scope,__useComponent:!0});return BC(t,e,oC,(...r)=>n[gg](...r))}});function yH(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const r=n.__getInstance(e);return r!=null?r.__composer:t.global.__composer}}function wH(t){const e=a=>{const{instance:l,value:u}=a;if(!l||!l.$)throw nr(Wt.UNEXPECTED_ERROR);const c=yH(t,l.$),f=LC(u);return[Reflect.apply(c.t,c,[...DC(f)]),c]};return{created:(a,l)=>{const[u,c]=e(l);yo&&t.global===c&&(a.__i18nWatcher=o.watch(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=u},unmounted:a=>{yo&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const u=a.__composer,c=LC(l);a.textContent=Reflect.apply(u.t,u,[...DC(c)])}},getSSRProps:a=>{const[l]=e(a);return{textContent:l}}}}function LC(t){if(Oe(t))return{path:t};if(ht(t)){if(!("path"in t))throw nr(Wt.REQUIRED_VALUE,"path");return t}else throw nr(Wt.INVALID_VALUE)}function DC(t){const{path:e,locale:n,args:r,choice:i,plural:s}=t,a={},l=r||{};return Oe(n)&&(a.locale=n),dn(i)&&(a.plural=i),dn(s)&&(a.plural=s),[e,l,a]}function xH(t,e,...n){const r=ht(n[0])?n[0]:{};(St(r.globalInstall)?r.globalInstall:!0)&&([OC.name,"I18nT"].forEach(s=>t.component(s,OC)),[IC.name,"I18nN"].forEach(s=>t.component(s,IC)),[RC.name,"I18nD"].forEach(s=>t.component(s,RC))),t.directive("t",wH(e))}const CH=Ko("global-vue-i18n");function kH(t={},e){const n=__VUE_I18N_LEGACY_API__&&St(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,r=St(t.globalInjection)?t.globalInjection:!0,i=new Map,[s,a]=EH(t,n),l=Ko(process.env.NODE_ENV!=="production"?"vue-i18n":"");function u(m){return i.get(m)||null}function c(m,g){i.set(m,g)}function f(m){i.delete(m)}const p={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(m,...g){if(process.env.NODE_ENV!=="production"&&(m.__VUE_I18N__=p),m.__VUE_I18N_SYMBOL__=l,m.provide(m.__VUE_I18N_SYMBOL__,p),ht(g[0])){const y=g[0];p.__composerExtend=y.__composerExtend,p.__vueI18nExtend=y.__vueI18nExtend}let b=null;!n&&r&&(b=IH(m,p.global)),__VUE_I18N_FULL_INSTALL__&&xH(m,p,...g),__VUE_I18N_LEGACY_API__&&n&&m.mixin(gH(a,a.__composer,p));const v=m.unmount;if(m.unmount=()=>{b&&b(),p.dispose(),v()},process.env.NODE_ENV!=="production"){if(!await oH(m,p))throw nr(Wt.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN);const x=tg();if(n){const k=a;k.__enableEmitter&&k.__enableEmitter(x)}else{const k=a;k[ha]&&k[ha](x)}x.on("*",ic)}},get global(){return a},dispose(){s.stop()},__instances:i,__getInstance:u,__setInstance:c,__deleteInstance:f};return p}function At(t={}){const e=o.getCurrentInstance();if(e==null)throw nr(Wt.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw nr(Wt.NOT_INSTALLED);const n=SH(e),r=TH(n),i=bC(e),s=_H(t,i);if(s==="global")return vC(r,t,i),r;if(s==="parent"){let u=AH(n,e,t.__useComponent);return u==null&&(process.env.NODE_ENV!=="production"&&ls(Gf(ps.NOT_FOUND_PARENT_SCOPE)),u=r),u}const a=n;let l=a.__getInstance(e);if(l==null){const u=yn({},t);"__i18n"in i&&(u.__i18n=i.__i18n),r&&(u.__root=r),l=wg(u),a.__composerExtend&&(l[vg]=a.__composerExtend(l)),OH(a,e,l),a.__setInstance(e,l)}return l}function EH(t,e,n){const r=o.effectScope(),i=__VUE_I18N_LEGACY_API__&&e?r.run(()=>Eg(t)):r.run(()=>wg(t));if(i==null)throw nr(Wt.UNEXPECTED_ERROR);return[r,i]}function SH(t){const e=o.inject(t.isCE?CH:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw nr(t.isCE?Wt.NOT_INSTALLED_WITH_PROVIDE:Wt.UNEXPECTED_ERROR);return e}function _H(t,e){return $f(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function TH(t){return t.mode==="composition"?t.global:t.global.__composer}function AH(t,e,n=!1){let r=null;const i=e.root;let s=MH(e,n);for(;s!=null;){const a=t;if(t.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(r=l.__composer,n&&r&&!r[gC]&&(r=null))}if(r!=null||i===s)break;s=s.parent}return r}function MH(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function OH(t,e,n){let r=null;o.onMounted(()=>{if(process.env.NODE_ENV!=="production"&&e.vnode.el){e.vnode.el.__VUE_I18N__=n,r=tg();const i=n;i[ha]&&i[ha](r),r.on("*",ic)}},e),o.onUnmounted(()=>{const i=n;process.env.NODE_ENV!=="production"&&e.vnode.el&&e.vnode.el.__VUE_I18N__&&(r&&r.off("*",ic),i[rc]&&i[rc](),delete e.vnode.el.__VUE_I18N__),t.__deleteInstance(e);const s=i[vg];s&&(s(),delete i[vg])},e)}const BH=["locale","fallbackLocale","availableLocales"],PC=["t","rt","d","n","tm","te"];function IH(t,e){const n=Object.create(null);return BH.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s)throw nr(Wt.UNEXPECTED_ERROR);const a=o.isRef(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(n,i,a)}),t.config.globalProperties.$i18n=n,PC.forEach(i=>{const s=Object.getOwnPropertyDescriptor(e,i);if(!s||!s.value)throw nr(Wt.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${i}`,s)}),()=>{delete t.config.globalProperties.$i18n,PC.forEach(i=>{delete t.config.globalProperties[`$${i}`]})}}if(Z$(),x$(NF),C$(g$),k$(U6),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const t=fa();t.__INTLIFY__=!0,e$(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;const Xf="paragraph",Jr="page",VC="Extend",Bl="Node",RH=Bl+VC,LH="CC",Yf="heading",Jf="bulletList",_g="listItem",FC="taskList",DH="taskItem",Zf="orderedList",hs="table",Tg="tableHeader",Ag="tableRow",PH="tableCell",Mg="column",ma="columns",Og="textBox",Il="image",wi="imageUpload",sc="videoUpload",VH="iframe",FH="file",Bg="codeBlock",Ig="blockquote",$H="audio",HH="toc",$C="video",zH="horizontalrule",Rg="pagination",UH=[hs,Zf,Jf,FC],WH=[$C,Il],ac="link",jH="placeholder",qH="focus",KH="text",GH="text-bubble",XH="gapCursor",YH="dropCursor",JH="characterCount",ZH="hardBreak",QH="textStyle",NH="selection",lc="superText",Lg="configPlan",Qf="fontSize",uc="fontFamily",HC="fontWeight",ez="bold",tz="italic",nz="underline",rz="strike",oz="color",iz="highlight",sz="moreMark",az="textAlign",lz="indent",uz="lineHeight",cz="painter",dz="clear",xi="spellchecker",Nf="fontSizeIncreaseDecrease",ep="time-highlighter",tp="specialCharacter",zC="history",fz=Object.freeze(Object.defineProperty({__proto__:null,AUDIO:$H,BLOCKQUOTE:Ig,BOLD:ez,BULLETLIST:Jf,CASSIE_BLOCK:Bl,CASSIE_BLOCK_EXTEND:RH,CC:LH,CHARACTER_COUNT:JH,CLEAR:dz,CODE_BLOCK:Bg,COLOR:oz,COLUMN:Mg,COLUMNS:ma,CONFIG_PLAN:Lg,DROP_CURSOR:YH,EXTEND:VC,FILE:FH,FOCUS:qH,FONTSIZE_INCREASEDECREASE:Nf,FONT_FAMILY:uc,FONT_SIZE:Qf,FONT_WEIGHT:HC,GAP_CURSOR:XH,HARD_BREAK:ZH,HEADING:Yf,HIGHLIGHT:iz,HISTORY:zC,HORIZONTALRULE:zH,IFRAME:VH,IMAGE:Il,IMAGE_UPLOAD:wi,INDENT:lz,ITALIC:tz,LINE_HEIGHT:uz,LINK:ac,LISTITEM:_g,LIST_MEDIA:WH,LIST_TYPE:UH,MORE_MARK:sz,ORDEREDLIST:Zf,PAGE:Jr,PAGEBREAK:Rg,PAINTER:cz,PARAGRAPH:Xf,PLACEHOLDER:jH,SELECTION:NH,SPECIAL_CHARACTER:tp,SPELLCHECKER:xi,STRIKE:rz,SUPER_TEXT:lc,TABLE:hs,TABLEHEADER:Tg,TABLE_CELL:PH,TABLE_ROW:Ag,TASKITEM:DH,TASKLIST:FC,TEXT:KH,TEXT_ALIGN:az,TEXT_BOX:Og,TEXT_BUBBLE:GH,TEXT_STYLE:QH,TIME_HIGH_LIGHTER:ep,TOC:HH,UNDERLINE:nz,VIDEO:$C,VIDEO_UPLOAD:sc},Symbol.toStringTag,{value:"Module"})),UC=t=>{if(!t)return-1;const{from:e}=t.state.selection;let n=0;return t.state.doc.descendants((r,i)=>{r.type.name===Xf&&i<e&&n++}),n},WC=t=>{var r,i;const e=(r=t.view)==null?void 0:r.dom;if(!e)return!1;const n=(i=window.getSelection)==null?void 0:i.call(window);if(n&&n.rangeCount){const s=n.anchorNode;if(s&&e.contains(s))return!0}return!1},jC=(t,e)=>t.map((r,i)=>({ext:r,name:r.name,originalIndex:i,order:e[r.name]})).sort((r,i)=>{const s=r.order===-1,a=i.order===-1;if(s&&!a)return 1;if(!s&&a)return-1;if(s&&a)return r.originalIndex-i.originalIndex;const l=typeof r.order=="number",u=typeof i.order=="number";return l&&u?r.order-i.order:l?-1:u?1:r.originalIndex-i.originalIndex}).map(r=>r.ext),np=(t,e)=>t?!!t.extensionManager.extensions.find(n=>n.name===e):!1;function qC(t,e){return e.characterCountLimit===void 0?t:t.map(n=>n.name==="base-kit"?n.configure({...n.options,characterCount:{...n.options.characterCount,limit:e.characterCountLimit}}):n)}const pz={class:"flex gap-2 items-center overflow-x-auto overflow-y-hidden [&::-webkit-scrollbar]:h-1.5"},hz={class:"flex-1 flex justify-end items-center gap-x-3"},mz=o.defineComponent({__name:"Toolbar",props:{editor:{},editorComment:{},disabled:{type:Boolean,default:!1},mode:{},class:{},customClassToolbar:{},toolbarExtensionOrder:{}},setup(t){const e=o.defineAsyncComponent(()=>Promise.resolve().then(()=>qJ)),{t:n}=At(),r=t,i=o.inject("isEditable",o.ref(!0)),s=[Qf,uc,tp,Nf,xi,lc],a=o.computed(()=>{const f=[...r.editor.extensionManager.extensions],p={[xi]:-1},m={[Qf]:1,[uc]:2,[tp]:3,[Nf]:4,[xi]:5,[lc]:6},g=r.toolbarExtensionOrder??(r.mode===Me.EDITOR?p:m),b=jC(f,g);let v=[];for(const y of b){const{button:x,divider:k=!1,spacer:E=!1,toolbar:C=!0}=y.options;if(!x||!f1(x)||!C)continue;const _=x({editor:r.editor,extension:y,t:o.unref(n)});if(Array.isArray(_)){const T=_.map((A,V)=>({id:`${y.name}`,button:A,divider:V===_.length-1?k:!1,spacer:V===0?E:!1}));v=[...v,...T];continue}v.push({button:_,divider:k,spacer:E,id:`${y.name}`})}if(r.mode!==Me.EDITOR)return v.filter(y=>y.id&&s.includes(y.id));if(v=v.filter(y=>y.id!=="superText"),!i.value){v=v.map(x=>(x.button.componentProps.disabled=!0,x));const y=v.find(x=>x.id==="spellchecker");y&&(y.button.componentProps.disabled=!1)}return v}),l=f=>f.id==="spellchecker"?"!text-[#2977D9] border border-gray-300 dark:!text-white hover:!bg-gray-200 dark:hover:!bg-gray-700 rounded-none [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] p-0 w-[26px] h-[26px]":f.button.componentProps.customClass,u=f=>f.id==="spellchecker"?"Spellchecker":f.button.componentProps.icon,c=o.computed(()=>{var f;return(f=r.editor)==null?void 0:f.extensionManager.extensions.find(p=>p.name==="spellchecker")});return(f,p)=>{var m;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Ee)(r.class,f.customClassToolbar))},[o.createElementVNode("div",pz,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>{var v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[g.spacer&&b!==0?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(g.button.component),o.mergeProps({id:g.id,ref_for:!0},g.button.componentProps,{editor:f.editor,disabled:f.disabled||((v=g.button.componentProps)==null?void 0:v.disabled),"custom-class":l(g),icon:u(g)}),o.createSlots({_:2},[o.renderList(g.button.componentSlots,(y,x,k)=>({name:`${x}`,fn:o.withCtx(E=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},E==null?void 0:E.props,{id:g.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),g.divider?(o.openBlock(),o.createBlock(o.unref(vo),{key:1,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128)),o.createElementVNode("div",hz,[p[0]||(p[0]=o.createElementVNode("div",{id:"tool-bar-auto-save"},null,-1)),c.value?(o.openBlock(),o.createBlock(o.unref(e),{key:0,editor:f.editor,"editor-comment":f.editorComment,isEnableSpellCheckRealTime:(m=f.editor)==null?void 0:m.extensionStorage.spellchecker.spellchecker.proofreader.enabled},null,8,["editor","editor-comment","isEnableSpellCheckRealTime"])):o.createCommentVNode("",!0)])])],2)}}}),ms=o.defineComponent({__name:"Popover",props:{defaultOpen:{type:Boolean},open:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(MP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(({open:l})=>[o.renderSlot(s.$slots,"default",{open:l})]),_:3},16))}}),gs=o.defineComponent({inheritAttrs:!1,__name:"PopoverContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},side:{},sideOffset:{default:4},align:{default:"center"},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},disableOutsidePointerEvents:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(BP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(LP),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)("z-50 w-72 rounded-md border bg-ed-popover p-4 text-ed-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rp=o.defineComponent({__name:"Tabs",props:{defaultValue:{},orientation:{},dir:{},activationMode:{},modelValue:{},asChild:{type:Boolean},as:{}},emits:["update:modelValue"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(PV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),op=o.defineComponent({__name:"TabsList",props:{loop:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VV),o.mergeProps(n.value,{class:o.unref(Ee)("inline-flex items-center justify-center rounded-md bg-ed-muted p-1 text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),gz={class:"truncate"},Rl=o.defineComponent({__name:"TabsTrigger",props:{value:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref($V),o.mergeProps(o.unref(r),{class:o.unref(Ee)("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-ed-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-ed-background data-[state=active]:text-ed-foreground data-[state=active]:shadow-sm",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",gz,[o.renderSlot(i.$slots,"default")])]),_:3},16,["class"]))}}),bs=o.defineComponent({__name:"Input",props:{defaultValue:{},modelValue:{},class:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,r=e,i=Ne.useVModel(n,"modelValue",r,{passive:!0,defaultValue:n.defaultValue});return(s,a)=>o.withDirectives((o.openBlock(),o.createElementBlock("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.isRef(i)?i.value=l:null),class:o.normalizeClass(o.unref(Ee)("flex h-9 w-full rounded-md border border-ed-input bg-transparent px-3 py-1 box-border text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50",n.class))},null,2)),[[o.vModelText,o.unref(i)]])}}),cc=o.defineComponent({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(TP),o.mergeProps(n.value,{class:o.unref(Ee)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e.class)}),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),ga=o.defineComponent({__name:"PopoverTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(OP),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}});let Dg;function Pg(){return Dg===void 0&&(Dg=navigator.platform.includes("Mac")),Dg}function ip(t){return t.toLowerCase()==="mod"?Pg()?"⌘":"Ctrl":t.toLowerCase()==="alt"?Pg()?"⌥":"Alt":t.toLowerCase()==="shift"?Pg()?"⇧":"Shift":t}function KC(t){return t.map(ip).join(" ")}const GC=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,XC=Om,Vg=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return XC(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],p=s==null?void 0:s[c];if(f===null)return null;const m=GC(f)||GC(p);return i[c][m]}),l=n&&Object.entries(n).reduce((c,f)=>{let[p,m]=f;return m===void 0||(c[p]=m),c},{}),u=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:p,className:m,...g}=f;return Object.entries(g).every(b=>{let[v,y]=b;return Array.isArray(y)?y.includes({...s,...l}[v]):{...s,...l}[v]===y})?[...c,p,m]:c},[]);return XC(t,a,u,n==null?void 0:n.class,n==null?void 0:n.className)},YC=o.defineComponent({__name:"Toggle",props:{defaultValue:{type:Boolean},pressed:{type:Boolean},disabled:{type:Boolean,default:!1},asChild:{type:Boolean},as:{},class:{},variant:{default:"default"},size:{default:"default"}},emits:["update:pressed"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,size:l,variant:u,...c}=n;return c}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(HV),o.mergeProps(o.unref(s),{class:o.unref(Ee)(o.unref(bz)({variant:a.variant,size:a.size}),n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),bz=Vg("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-ed-muted hover:text-ed-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-ed-accent data-[state=on]:text-ed-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-ed-input bg-transparent shadow-sm hover:bg-ed-accent hover:text-ed-accent-foreground"},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-3"}},defaultVariants:{variant:"default",size:"default"}}),ba=o.defineComponent({name:"ToolTip",__name:"Tooltip",props:{defaultOpen:{type:Boolean},open:{type:Boolean},delayDuration:{},disableHoverableContent:{type:Boolean},disableClosingTrigger:{type:Boolean},disabled:{type:Boolean},ignoreNonKeyboardFocus:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(jV),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),vs=o.defineComponent({inheritAttrs:!1,__name:"TooltipContent",props:{forceMount:{type:Boolean},ariaLabel:{},asChild:{type:Boolean},as:{},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},class:{}},emits:["escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(XV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(GV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)(`z-50 overflow-hidden rounded-md bg-ed-primary px-3 py-1.5 text-xs text-ed-primary-foreground
|
|
162
162
|
data-[state=delayed-open]:animate-in
|
|
163
163
|
data-[state=delayed-open]:fade-in-0
|
|
164
164
|
data-[state=delayed-open]:zoom-in-95
|
|
@@ -320,12 +320,12 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Y=D,K=F),R===void 0&&(
|
|
|
320
320
|
*
|
|
321
321
|
* This source code is licensed under the ISC license.
|
|
322
322
|
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/const Ec=ka("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Vq=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(iV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex h-10 w-full items-center justify-between rounded-md border border-ed-input bg-ed-background px-3 py-2 text-sm ring-offset-ed-background data-[placeholder]:text-ed-muted-foreground focus:outline-none focus:ring-2 focus:ring-ed-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default"),o.createVNode(o.unref(_V),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),Fq=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(sV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(hV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-ed-popover text-ed-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(zq)),o.createVNode(o.unref(CV),{class:o.normalizeClass(o.unref(Ee)("p-1",a.position==="popper"&&"h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]"))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["class"]),o.createVNode(o.unref(Uq))]),_:3},16,["class"])]),_:3}))}}),$q=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(wV),o.mergeProps({class:o.unref(Ee)("p-1 w-full",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),Hq={class:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},l5=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(bV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",Hq,[o.createVNode(o.unref(vV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"h-4 w-4"})]),_:1})]),o.createVNode(o.unref(xV),null,{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),zq=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(kV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex cursor-default items-center justify-center py-1",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default",{},()=>[o.createVNode(o.unref(db),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),Uq=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(EV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex cursor-default items-center justify-center py-1",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default",{},()=>[o.createVNode(o.unref(kc),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),Wq=o.defineComponent({__name:"CodeBlockView",props:na,setup(t){const e=t,n=o.ref(e.extension.options.lowlight.listLanguages()),r=o.computed({get(){return e.node.attrs.language||"auto"},set(i){e.updateAttributes({language:i})}});return(i,s)=>{const a=Mq;return o.openBlock(),o.createBlock(o.unref(ta),{class:"code-block relative"},{default:o.withCtx(()=>[o.createVNode(o.unref(Oq),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l)},{default:o.withCtx(()=>[o.createVNode(o.unref(Vq),{class:"w-[160px] h-8 absolute right-2 top-2 bg-ed-background"},{default:o.withCtx(()=>[o.createVNode(o.unref(Bq),{placeholder:"Select Language"})]),_:1}),o.createVNode(o.unref(Fq),null,{default:o.withCtx(()=>[o.createVNode(o.unref($q),null,{default:o.withCtx(()=>[o.createVNode(o.unref(l5),{value:"auto"},{default:o.withCtx(()=>s[1]||(s[1]=[o.createTextVNode(" Auto ")])),_:1}),o.createVNode(a),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(l,u)=>(o.openBlock(),o.createBlock(o.unref(l5),{key:u,value:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),o.createElementVNode("pre",null,[o.createElementVNode("code",null,[o.createVNode(o.unref(e6))])])]),_:1})}}}),jq=Aq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),language:"auto",button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleCodeBlock(),isActive:()=>e.isActive("codeBlock")||!1,disabled:!e.can().toggleCodeBlock(),icon:"Code2",tooltip:n("editor.codeblock.tooltip")}})}},addNodeView(){return ra(Wq)}}),qq=Dt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,yt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>U0({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),u5=o.defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(yP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),c5=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=er(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(wP),o.mergeProps({class:"outline-none"},o.unref(n)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),d5=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(xP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(CP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("z-50 min-w-32 overflow-hidden rounded-md border dark:border-ed-muted bg-ed-popover text-ed-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),fb=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(kP),o.mergeProps(o.unref(r),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i.inset&&"pl-8",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),Kq={key:0,class:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},$l=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},isShowCheckIcon:{type:Boolean}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(SP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm body-medium py-2.5 pl-2.5 pr-2.5 outline-none transition-colors focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.checked&&"bg-blue-100 text-blue-500 dark:bg-ed-blue-light",n.isShowCheckIcon&&"pl-8",n.class)}),{default:o.withCtx(()=>[n.isShowCheckIcon?(o.openBlock(),o.createElementBlock("span",Kq,[o.createVNode(o.unref(_P),null,{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-4 h-4"})]),_:1})])):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),f5=o.defineComponent({__name:"DropdownMenuShortcut",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(o.unref(Ee)("ml-auto text-xs tracking-widest opacity-60",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),pb=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(EP),o.mergeProps(n.value,{class:o.unref(Ee)("-mx-1 my-1 h-px bg-ed-muted",e.class)}),null,16,["class"]))}}),Gq={class:"flex items-center justify-between w-full h-full font-normal"},Xq={key:0,class:"flex-grow text-sm text-left truncate"},Yq={class:"flex flex-col items-center text-center max-w-24"},Jq={key:0,class:"flex"},Zq=o.defineComponent({__name:"ActionMenuButton",props:{icon:{default:void 0},class:{default:""},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(ya),null,{default:o.withCtx(()=>[o.createVNode(o.unref(ba),{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{id:`action-menu-${n.id}`,class:o.normalizeClass(o.unref(Ee)("h-[32px] px-1.5 py-0",e.class)),variant:"ghost",disabled:n.disabled},{default:o.withCtx(()=>[o.createElementVNode("div",Gq,[n.title?(o.openBlock(),o.createElementBlock("div",Xq,o.toDisplayString(n.title),1)):o.createCommentVNode("",!0),n.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,class:"w-[16px] h-[16px]",name:n.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Ot),{class:"flex-shrink-0 w-1.5 h-1.5 ml-1",name:"ChevronDown"})])]),_:1},8,["id","class","disabled"])]),_:1}),n.tooltip||n.shortcutKeys&&n.shortcutKeys.length?(o.openBlock(),o.createBlock(o.unref(vs),{key:0},{default:o.withCtx(()=>[o.createElementVNode("div",Yq,[o.createElementVNode("div",null,o.toDisplayString(n.tooltip),1),n.shortcutKeys&&n.shortcutKeys.length?(o.openBlock(),o.createElementBlock("div",Jq,[o.createElementVNode("span",null,o.toDisplayString(o.unref(KC)(n.shortcutKeys)),1)])):o.createCommentVNode("",!0)])]),_:1})):o.createCommentVNode("",!0)]),_:1})]),_:1}))}}),Ea=o.defineComponent({__name:"ActionDropdownButton",props:{icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},class:{default:""},btn_class:{default:""},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""},customClass:{default:""},side:{default:"bottom"},align:{default:"start"}},setup(t){const e=t,n=o.inject("isMobile",!1),r=`dropdown-trigger-${Zr(10)}`,{isOpen:i}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:`[data-radix-menu-content], .${r}`}),s=o.computed(()=>n?{modal:!1,open:i.value,"onUpdate:open":a=>i.value=a}:{});return(a,l)=>(o.openBlock(),o.createBlock(o.unref(u5),o.normalizeProps(o.guardReactiveProps(o.unref(s))),{default:o.withCtx(()=>[o.createVNode(o.unref(c5),{disabled:a.disabled,class:o.normalizeClass(r)},{default:o.withCtx(()=>[o.createVNode(Zq,{id:a.id,class:o.normalizeClass(o.unref(Ee)(a.btn_class,a.customClass)),title:a.title,icon:a.icon,tooltip:a.tooltip,disabled:a.disabled,"is-active":a.isActive},null,8,["id","class","title","icon","tooltip","disabled","is-active"])]),_:1},8,["disabled"]),o.createVNode(o.unref(d5),o.mergeProps({class:o.unref(Ee)("min-w-24",e.class),align:a.align,side:a.side},a.$attrs),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class","align","side"])]),_:3},16))}}),Qq=o.defineComponent({__name:"HeadingButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r}:{title:e.tooltip,level:0,isActive:()=>!1}});return(r,i)=>{var s;return o.openBlock(),o.createBlock(Ea,{id:"heading",disabled:r.disabled,tooltip:r.tooltip,title:(s=n.value)==null?void 0:s.title,btn_class:"min-w-16 max-w-32"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(a,l)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:l},[o.createVNode(o.unref($l),{checked:n.value.title===a.title,onClick:a.action},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass("heading-"+a.level)},o.toDisplayString(a.title),3),r.editor.storage.deviceEnv.isMobile?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(f5),{key:0,class:"pl-4"},{default:o.withCtx(()=>{var u;return[o.createTextVNode(o.toDisplayString((u=a.shortcutKeys)==null?void 0:u.map(c=>o.unref(ip)(c)).join(" ")),1)]}),_:2},1024))]),_:2},1032,["checked","onClick"]),r.showDefaultDivider&&a.level===0?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title"])}}}),p5=qq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),levels:[1,2,3,4,5,6],button({editor:e,extension:n,t:r}){var c;const{extensions:i=[]}=e.extensionManager??[],s=((c=n.options)==null?void 0:c.levels)||[],a=i.find(f=>f.name==="base-kit"),l=s.map(f=>({action:()=>e.commands.toggleHeading({level:f}),isActive:()=>e.isActive("heading",{level:f})||!1,disabled:!e.can().toggleHeading({level:f}),title:r(`editor.heading.h${f}.tooltip`),level:f,shortcutKeys:["alt","mod",`${f}`]}));a&&a.options.paragraph!==!1&&l.unshift({action:()=>e.commands.setParagraph(),isActive:()=>e.isActive("paragraph")||!1,disabled:!e.can().setParagraph(),level:0,title:r("editor.paragraph.tooltip"),shortcutKeys:["alt","mod","0"]});const u=l.filter(f=>f.disabled).length===l.length;return{component:Qq,componentProps:{tooltip:r("editor.heading.tooltip"),disabled:u,items:l}}}}}}),Nq=tt.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:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.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")}}}),eK=o.defineComponent({__name:"TextAlignMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(Ea,{icon:n.value.icon,tooltip:r.tooltip,disabled:r.disabled,side:"top",class:"min-w-4 w-full flex flex-row gap-1 inside-toolbar"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref(ba),{key:a},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:s.action},{default:o.withCtx(()=>[o.createVNode(o.unref(YC),{size:"sm",class:"w-7 h-7 p-1",pressed:n.value.title===s.title},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon,class:"w-3.5 h-3"},null,8,["name"])):o.createCommentVNode("",!0)]),_:2},1032,["pressed"])]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{class:"flex flex-col items-center"},{default:o.withCtx(()=>{var l;return[o.createElementVNode("span",null,o.toDisplayString(s.title),1),o.createElementVNode("span",null,o.toDisplayString((l=s.shortcutKeys)==null?void 0:l.map(u=>o.unref(ip)(u)).join(" ")),1)]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["icon","tooltip","disabled"]))}}),h5=Nq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button:e=>{var f;const{editor:n,extension:r,t:i}=e,s=((f=r.options)==null?void 0:f.alignments)||[],a={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},l={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},u=s.map(p=>({title:i(`editor.textalign.${p}.tooltip`),icon:l[p],shortcutKeys:a[p],isActive:()=>n.isActive({textAlign:p})||!1,action:()=>n.chain().focus().setTextAlign(p).run(),disabled:!n.can().setTextAlign(p)})),c=u.filter(p=>p.disabled).length===u.length;return{component:eK,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:c,items:u}}}}}}),tK=o.defineComponent({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(GP),o.mergeProps(n.value,{class:o.unref(Ee)("flex touch-none select-none transition-colors",r.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",r.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(XP),{class:"relative flex-1 rounded-full bg-ed-border"})]),_:1},16,["class"]))}}),nK=o.defineComponent({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VP),o.mergeProps(n.value,{class:o.unref(Ee)("relative overflow-hidden",e.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(FP),{class:"h-full w-full rounded-[inherit]"},{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3}),o.createVNode(tK),o.createVNode(o.unref(JP))]),_:3},16,["class"]))}}),rK={class:"ml-1 h-full"},oK=o.defineComponent({__name:"FontSizeMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,{t:n}=At(),r=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),i=o.inject("fontSize"),s=o.computed(()=>{const c={title:n("editor.fontSize.default.tooltip"),isActive:()=>!1};if(r.value)return e.items.find(m=>m.isActive()&&m.title)||c;const f=e.items.find(p=>p.title===i.value);return f||(i.value?{title:i.value}:c)}),a=Ne.useEventBus("fontFamily"),l=(c,f)=>{c===n("editor.fontSize.default.tooltip")?(e.editor.commands.unsetFontSize(),i.value=null):(i.value=c,e.editor.commands.setFontSize(c),a.emit()),f(),e.editor.commands.setForceCloseBubble(!0)};e.editor.on("selectionUpdate",({editor:c})=>{c.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const u=c=>c===n("editor.fontSize.default.tooltip")?c:c.replace("px","");return(c,f)=>{const p=pb;return o.openBlock(),o.createBlock(Ea,{disabled:c.disabled,tooltip:c.tooltip,title:s.value.title,btn_class:`min-w-20 ${c.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[o.createVNode(o.unref(nK),{class:"h-72"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(m,g)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:g},[o.createVNode(o.unref($l),{checked:s.value.title===m.title,onClick:()=>l(m.title,m.action)},{default:o.withCtx(()=>[o.createElementVNode("div",rK,o.toDisplayString(u(m.title)),1)]),_:2},1032,["checked","onClick"]),m.title===o.unref(n)("editor.fontSize.default.tooltip")&&c.showDefaultDivider?(o.openBlock(),o.createBlock(p,{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["disabled","tooltip","title","btn_class"])}}}),m5=tt.create({name:"fontSize",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontSizes:[...l1],button({editor:e,extension:n,t:r}){var l;const i=((l=n.options)==null?void 0:l.fontSizes)||[],s=[hl,...i].map(u=>({title:u===hl?r("editor.fontSize.default.tooltip"):String(u),isActive:()=>{const{fontSize:c}=e.getAttributes("textStyle");return u===hl&&c===void 0?!0:e.isActive({fontSize:String(u)})||!1},action:()=>{if(u===hl){e.chain().focus().unsetFontSize().run();return}e.chain().focus().setFontSize(String(u)).run()},disabled:!e.can().setFontSize(String(u)),divider:u===hl||!1,default:u===hl||!1})),a=s.filter(u=>u.disabled).length===s.length;return{component:oK,componentProps:{editor:e,tooltip:r("editor.fontSize.tooltip"),disabled:a,items:s}}}}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontSize}}),iK=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,i;const s=n.getAttribute("style"),a=(i=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");n.setAttribute("style",`${a};${s}`)})},sK=Un.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&iK(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(s=>!!s))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),aK=tt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),lK={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},uK={class:"flex items-center justify-center text-sm"},cK={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dK=["fill"],fK=o.defineComponent({__name:"ColorActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=o.ref(void 0);function r(s){var a;(a=e.action)==null||a.call(e,s)}function i(s){var a;(a=e.action)==null||a.call(e,n.value)}return(s,a)=>(o.openBlock(),o.createElementBlock("div",lK,[o.createVNode(Ge,{id:"color",tooltip:s.tooltip,disabled:s.disabled,action:i},{icon:o.withCtx(()=>[o.createElementVNode("span",uK,[(o.openBlock(),o.createElementBlock("svg",cK,[a[1]||(a[1]=o.createElementVNode("path",{d:"M7.25033 8.93724H12.7503M5.41699 12.5L9.33272 4.12953C9.54481 3.67616 9.65086 3.44947 9.79781 3.37915C9.9255 3.31804 10.0752 3.31804 10.2028 3.37915C10.3498 3.44947 10.4558 3.67616 10.6679 4.12953L14.5837 12.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),o.createElementVNode("path",{d:"M3.33301 15H16.6663V16.6667H3.33301V15Z",fill:n.value||"hsl(var(--ed-foreground))"},null,8,dK)]))])]),_:1},8,["tooltip","disabled"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),disabled:s.disabled,onChange:r},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{variant:"ghost",size:"icon",class:"h-[32px] w-3 rounded-l-none hover:bg-ed-muted-foreground/20",disabled:s.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"flex-shrink-0 w-1.5 h-1.5",name:"ChevronDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),g5=aK.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:n}){return{component:fK,componentProps:{action:r=>{typeof r>"u"&&e.chain().focus().unsetColor().run(),typeof r=="string"&&e.chain().focus().setColor(r).run()},isActive:()=>{const{color:r}=e.getAttributes("textStyle");return r&&e.isActive({color:r})||!1},editor:e,disabled:!e.can().setColor(""),tooltip:n("editor.color.tooltip")}}}}}}),pK=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,hK=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,b5=Un.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Js({find:pK,type:this.type})]},addPasteRules(){return[Ni({find:hK,type:this.type})]}}),mK=b5.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:e,t:n})=>({component:eS,componentProps:{action:r=>{typeof r=="string"&&e.chain().focus().setHighlight({color:r}).run(),typeof r>"u"&&e.chain().focus().unsetHighlight().run()},editor:e,isActive:()=>e.isActive("highlight")||!1,disabled:!e.can().setHighlight(),shortcutKeys:["⇧","mod","H"],tooltip:n("editor.highlight.tooltip")}})}}}),gK="listItem",v5="textStyle",y5=/^\s*([-+*])\s$/,bK=Dt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(gK,this.editor.getAttributes(v5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=al({find:y5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=al({find:y5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(v5),editor:this.editor})),[t]}}),vK=["id"],w5=o.defineComponent({__name:"ActionDropdownButtonSplit",props:{icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},class:{default:""},shortcutKeys:{default:void 0},btnClass:{default:""},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""}},setup(t){const e=t;return(n,r)=>{var i;return o.openBlock(),o.createElementBlock("div",{id:`dropdown-btn-${n.id}`,class:o.normalizeClass(["flex items-center h-[32px] hover:bg-ed-muted rounded-md",[((i=n.isActive)==null?void 0:i.call(n))&&"bg-ed-muted"]])},[o.createVNode(Ge,{class:o.normalizeClass(n.btnClass),action:n.action,title:n.title,icon:n.icon,tooltip:n.tooltip,disabled:n.disabled,"shortcut-keys":n.shortcutKeys},null,8,["class","action","title","icon","tooltip","disabled","shortcut-keys"]),o.createVNode(o.unref(u5),null,{default:o.withCtx(()=>[o.createVNode(o.unref(c5),{disabled:n.disabled},{default:o.withCtx(()=>[o.createVNode(bn,{variant:"ghost",size:"icon",class:"h-[32px] w-3 rounded-l-none hover:bg-ed-muted-foreground/20",disabled:n.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["disabled"]),o.createVNode(o.unref(d5),o.mergeProps({class:o.unref(Ee)("min-w-24",e.class),align:"start",side:"bottom"},n.$attrs),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16,["class"])]),_:3})],10,vK)}}}),yK=o.defineComponent({__name:"BulletListMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},tooltip:{default:""}},setup(t){const e=t,{t:n}=At(),r=[{label:"editor.bulletlist.disc.tooltip",value:"disc"},{label:"editor.bulletlist.circle.tooltip",value:"circle"},{label:"editor.bulletlist.square.tooltip",value:"square"}],i=o.computed(()=>{var a;return(a=e.editor)!=null&&a.isActive("bulletList")?e.editor.getAttributes("bulletList").listStyleType:"disc"});function s(a){e.editor.isActive("bulletList")?e.editor.getAttributes("bulletList").listStyleType===a.value?e.editor.chain().focus().toggleBulletList().run():e.editor.chain().focus().updateAttributes("bulletList",{listStyleType:a.value}).run():e.editor.chain().focus().toggleBulletList().updateAttributes("bulletList",{listStyleType:a.value}).run()}return(a,l)=>(o.openBlock(),o.createBlock(w5,{id:"bullet-list",action:()=>s,disabled:a.disabled,tooltip:a.tooltip,class:"grid w-full grid-cols-3 gap-1 min-w-4"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,u=>o.createVNode(o.unref(ba),{key:u.value,"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),null,{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:c=>s(u)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([[i.value===u.value?"bg-ed-accent border border-ed-accent-foreground":""],"h-[48px] flex flex-col w-[48px] box-border rounded-sm border"])},[o.createElementVNode("ol",{style:o.normalizeStyle({listStyleType:u.value,lineHeight:1}),class:"text-[10px] pl-3 flex-1 list-outside flex flex-col items-center justify-center"},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,c=>o.createElementVNode("li",{key:c},l[0]||(l[0]=[o.createElementVNode("hr",{class:"border-0 bg-gray-200 h-[3px] w-6 my-1"},null,-1)]))),64))],4)],2)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{side:"bottom"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)(u.label)),1)]),_:2},1024)]),_:2},1024)),64))]),_:1})]),_:1},8,["action","disabled","tooltip"]))}}),wK=bK.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),listStyleType:{default:"disc",parseHTML:e=>({listStyleType:e.style["list-style-type"]??"disc"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(e==null?void 0:e.listStyleType)||e}`})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:yK,componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList")||!1,disabled:!e.can().toggleBulletList(),shortcutKeys:["shift","mod","8"],icon:"List",tooltip:n("editor.bulletlist.tooltip")}})}}}),hb=Dt.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:n("editor.clear.tooltip")}})}}}),xK="listItem",x5="textStyle",C5=/^(\d+)\.\s$/,CK=Dt.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",yt(this.options.HTMLAttributes,n),0]:["ol",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xK,this.editor.getAttributes(x5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=al({find:C5,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=al({find:C5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(x5)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),kK=o.defineComponent({__name:"OrderedListMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},tooltip:{default:""},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,{t:n}=At(),r=[{label:"editor.orderedlist.decimal.tooltip",value:"decimal"},{label:"editor.orderedlist.decimalLeadingZero.tooltip",value:"decimal-leading-zero"},{label:"editor.orderedlist.lowerRoman.tooltip",value:"lower-roman"},{label:"editor.orderedlist.upperRoman.tooltip",value:"upper-roman"},{label:"editor.orderedlist.lowerLatin.tooltip",value:"lower-latin"},{label:"editor.orderedlist.upperLatin.tooltip",value:"upper-latin"},{label:"editor.orderedlist.tradChineseInformal.tooltip",value:"trad-chinese-informal"},{label:"editor.orderedlist.simpChineseFormal.tooltip",value:"simp-chinese-formal"}],i=o.computed(()=>{var a;return(a=e.editor)!=null&&a.isActive("orderedList")?e.editor.getAttributes("orderedList").listType:"decimal"});function s(a){var l,u;e.editor.isActive("orderedList")?e.editor.getAttributes("orderedList").listType===a.value?(l=e.editor.chain())==null||l.toggleOrderedList().run():(u=e.editor.chain())==null||u.updateAttributes("orderedList",{listType:a.value}).run():e.editor.chain().focus().toggleOrderedList().updateAttributes("orderedList",{listType:a.value}).run()}return(a,l)=>(o.openBlock(),o.createBlock(w5,{action:()=>s,disabled:a.disabled,tooltip:a.tooltip,"is-active":a.isActive,"shortcut-keys":a.shortcutKeys,class:"min-w-4 w-full grid grid-cols-3 gap-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,u=>o.createVNode(o.unref(ba),{key:u.value,"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:c=>s(u)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([[i.value===u.value?"bg-ed-accent border border-ed-accent-foreground":""],"h-[72px] flex flex-col w-[72px] box-border rounded-sm border"])},[o.createElementVNode("ol",{style:o.normalizeStyle({listStyleType:u.value,lineHeight:1}),class:"text-[12px] pl-3 flex-1 list-outside flex flex-col items-center justify-center"},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,c=>o.createElementVNode("li",{key:c},l[0]||(l[0]=[o.createElementVNode("hr",{class:"border-0 bg-gray-200 h-[3px] w-6 my-1"},null,-1)]))),64))],4)],2)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{side:"bottom"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)(u.label)),1)]),_:2},1024)]),_:2},1024)),64))]),_:1})]),_:1},8,["action","disabled","tooltip","is-active","shortcut-keys"]))}}),EK=CK.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),listType:{default:"decimal",parseHTML:e=>{e.style.getPropertyValue("list-style-type")},renderHTML:({listType:e})=>({style:`list-style-type: ${e}`})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:kK,componentProps:{action:()=>e.commands.toggleOrderedList(),isActive:()=>e.isActive("orderedList")||!1,disabled:!e.can().toggleOrderedList(),icon:"ListOrdered",shortcutKeys:["mod","shift","7"],tooltip:n("editor.orderedlist.tooltip")}})}}}),SK=/^\s*(\[([( |x])?\])\s$/,_K=Dt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",yt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),u=document.createElement("div");return s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:f}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const m=n();if(typeof m!="number")return!1;const g=p.doc.nodeAt(m);return p.setNodeMarkup(m,void 0,{...g==null?void 0:g.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,f])=>{i.setAttribute(c,f)}),i.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,s.append(l,a),i.append(s,u),Object.entries(e).forEach(([c,f])=>{i.setAttribute(c,f)}),{dom:i,contentDOM:u,update:c=>c.type!==this.type?!1:(i.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,!0)}}},addInputRules(){return[al({find:SK,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),TK=Dt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",yt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}).extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleTaskList(),isActive:()=>e.isActive("taskList")||!1,disabled:!e.can().toggleTaskList(),icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:n("editor.tasklist.tooltip")}})}},addExtensions(){return[_K.configure(this.options.taskItem)]}}),AK=/^\s*>\s$/,MK=Dt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[al({find:AK,type:this.type})]}}).extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleBlockquote(),isActive:()=>e.isActive("blockquote")||!1,disabled:!e.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:["shift","mod","B"],tooltip:n("editor.blockquote.tooltip")}})}}}),OK="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",BK="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Hl=(t,e)=>{for(const n in e)t[n]=e[n];return t},mb="numeric",gb="ascii",bb="alpha",Sc="asciinumeric",_c="alphanumeric",vb="domain",k5="emoji",IK="scheme",RK="slashscheme",yb="whitespace";function LK(t,e){return t in e||(e[t]=[]),e[t]}function Sa(t,e,n){e[mb]&&(e[Sc]=!0,e[_c]=!0),e[gb]&&(e[Sc]=!0,e[bb]=!0),e[Sc]&&(e[_c]=!0),e[bb]&&(e[_c]=!0),e[_c]&&(e[vb]=!0),e[k5]&&(e[vb]=!0);for(const r in e){const i=LK(r,n);i.indexOf(t)<0&&i.push(t)}}function DK(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function pr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}pr.groups={},pr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||pr.groups;let i;return e&&e.j?i=e:(i=new pr(e),n&&r&&Sa(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let a=0;a<s-1;a++)i=i.tt(t[a]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||pr.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let a,l=i.go(t);if(l?(a=new pr,Hl(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new pr,s){if(r)if(a.t&&typeof a.t=="string"){const u=Hl(DK(a.t,r),n);Sa(s,u,r)}else n&&Sa(s,n,r);a.t=s}return i.j[t]=a,a}};const mt=(t,e,n,r,i)=>t.ta(e,n,r,i),sn=(t,e,n,r,i)=>t.tr(e,n,r,i),E5=(t,e,n,r,i)=>t.ts(e,n,r,i),Ce=(t,e,n,r,i)=>t.tt(e,n,r,i),Ei="WORD",wb="UWORD",S5="ASCIINUMERICAL",_5="ALPHANUMERICAL",Tc="LOCALHOST",xb="TLD",Cb="UTLD",_p="SCHEME",zl="SLASH_SCHEME",kb="NUM",Eb="WS",Sb="NL",Ac="OPENBRACE",Mc="CLOSEBRACE",Tp="OPENBRACKET",Ap="CLOSEBRACKET",Mp="OPENPAREN",Op="CLOSEPAREN",Bp="OPENANGLEBRACKET",Ip="CLOSEANGLEBRACKET",Rp="FULLWIDTHLEFTPAREN",Lp="FULLWIDTHRIGHTPAREN",Dp="LEFTCORNERBRACKET",Pp="RIGHTCORNERBRACKET",Vp="LEFTWHITECORNERBRACKET",Fp="RIGHTWHITECORNERBRACKET",$p="FULLWIDTHLESSTHAN",Hp="FULLWIDTHGREATERTHAN",zp="AMPERSAND",_b="APOSTROPHE",Up="ASTERISK",Cs="AT",Wp="BACKSLASH",jp="BACKTICK",qp="CARET",ks="COLON",Tb="COMMA",Kp="DOLLAR",Yo="DOT",Gp="EQUALS",Ab="EXCLAMATION",Qr="HYPHEN",Oc="PERCENT",Xp="PIPE",Yp="PLUS",Jp="POUND",Bc="QUERY",Mb="QUOTE",T5="FULLWIDTHMIDDLEDOT",Ob="SEMI",Jo="SLASH",Ic="TILDE",Zp="UNDERSCORE",A5="EMOJI",Qp="SYM";var M5=Object.freeze({__proto__:null,WORD:Ei,UWORD:wb,ASCIINUMERICAL:S5,ALPHANUMERICAL:_5,LOCALHOST:Tc,TLD:xb,UTLD:Cb,SCHEME:_p,SLASH_SCHEME:zl,NUM:kb,WS:Eb,NL:Sb,OPENBRACE:Ac,CLOSEBRACE:Mc,OPENBRACKET:Tp,CLOSEBRACKET:Ap,OPENPAREN:Mp,CLOSEPAREN:Op,OPENANGLEBRACKET:Bp,CLOSEANGLEBRACKET:Ip,FULLWIDTHLEFTPAREN:Rp,FULLWIDTHRIGHTPAREN:Lp,LEFTCORNERBRACKET:Dp,RIGHTCORNERBRACKET:Pp,LEFTWHITECORNERBRACKET:Vp,RIGHTWHITECORNERBRACKET:Fp,FULLWIDTHLESSTHAN:$p,FULLWIDTHGREATERTHAN:Hp,AMPERSAND:zp,APOSTROPHE:_b,ASTERISK:Up,AT:Cs,BACKSLASH:Wp,BACKTICK:jp,CARET:qp,COLON:ks,COMMA:Tb,DOLLAR:Kp,DOT:Yo,EQUALS:Gp,EXCLAMATION:Ab,HYPHEN:Qr,PERCENT:Oc,PIPE:Xp,PLUS:Yp,POUND:Jp,QUERY:Bc,QUOTE:Mb,FULLWIDTHMIDDLEDOT:T5,SEMI:Ob,SLASH:Jo,TILDE:Ic,UNDERSCORE:Zp,EMOJI:A5,SYM:Qp});const Si=/[a-z]/,Rc=new RegExp("\\p{L}","u"),Bb=new RegExp("\\p{Emoji}","u"),_i=/\d/,Ib=/\s/,O5="\r",Rb=`
|
|
323
|
+
*/const Ec=ka("XIcon",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Vq=o.defineComponent({__name:"SelectTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(iV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex h-10 w-full items-center justify-between rounded-md border border-ed-input bg-ed-background px-3 py-2 text-sm ring-offset-ed-background data-[placeholder]:text-ed-muted-foreground focus:outline-none focus:ring-2 focus:ring-ed-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:truncate text-start",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default"),o.createVNode(o.unref(_V),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(kc),{class:"w-4 h-4 opacity-50 shrink-0"})]),_:1})]),_:3},16,["class"]))}}),Fq=o.defineComponent({inheritAttrs:!1,__name:"SelectContent",props:{forceMount:{type:Boolean},position:{default:"popper"},bodyLock:{type:Boolean},side:{},sideOffset:{},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["closeAutoFocus","escapeKeyDown","pointerDownOutside"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(sV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(hV),o.mergeProps({...o.unref(s),...a.$attrs},{class:o.unref(Ee)("relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border bg-ed-popover text-ed-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a.position==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(zq)),o.createVNode(o.unref(CV),{class:o.normalizeClass(o.unref(Ee)("p-1",a.position==="popper"&&"h-[--radix-select-trigger-height] w-full min-w-[--radix-select-trigger-width]"))},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},8,["class"]),o.createVNode(o.unref(Uq))]),_:3},16,["class"])]),_:3}))}}),$q=o.defineComponent({__name:"SelectGroup",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(wV),o.mergeProps({class:o.unref(Ee)("p-1 w-full",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),Hq={class:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},l5=o.defineComponent({__name:"SelectItem",props:{value:{},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(bV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e.class)}),{default:o.withCtx(()=>[o.createElementVNode("span",Hq,[o.createVNode(o.unref(vV),null,{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"h-4 w-4"})]),_:1})]),o.createVNode(o.unref(xV),null,{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3})]),_:3},16,["class"]))}}),zq=o.defineComponent({__name:"SelectScrollUpButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(kV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex cursor-default items-center justify-center py-1",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default",{},()=>[o.createVNode(o.unref(db),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),Uq=o.defineComponent({__name:"SelectScrollDownButton",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(EV),o.mergeProps(o.unref(r),{class:o.unref(Ee)("flex cursor-default items-center justify-center py-1",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default",{},()=>[o.createVNode(o.unref(kc),{class:"h-4 w-4"})])]),_:3},16,["class"]))}}),Wq=o.defineComponent({__name:"CodeBlockView",props:na,setup(t){const e=t,n=o.ref(e.extension.options.lowlight.listLanguages()),r=o.computed({get(){return e.node.attrs.language||"auto"},set(i){e.updateAttributes({language:i})}});return(i,s)=>{const a=Mq;return o.openBlock(),o.createBlock(o.unref(ta),{class:"code-block relative"},{default:o.withCtx(()=>[o.createVNode(o.unref(Oq),{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=l=>r.value=l)},{default:o.withCtx(()=>[o.createVNode(o.unref(Vq),{class:"w-[160px] h-8 absolute right-2 top-2 bg-ed-background"},{default:o.withCtx(()=>[o.createVNode(o.unref(Bq),{placeholder:"Select Language"})]),_:1}),o.createVNode(o.unref(Fq),null,{default:o.withCtx(()=>[o.createVNode(o.unref($q),null,{default:o.withCtx(()=>[o.createVNode(o.unref(l5),{value:"auto"},{default:o.withCtx(()=>s[1]||(s[1]=[o.createTextVNode(" Auto ")])),_:1}),o.createVNode(a),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(l,u)=>(o.openBlock(),o.createBlock(o.unref(l5),{key:u,value:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l),1)]),_:2},1032,["value"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue"]),o.createElementVNode("pre",null,[o.createElementVNode("code",null,[o.createVNode(o.unref(ex))])])]),_:1})}}}),jq=Aq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),language:"auto",button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleCodeBlock(),isActive:()=>e.isActive("codeBlock")||!1,disabled:!e.can().toggleCodeBlock(),icon:"Code2",tooltip:n("editor.codeblock.tooltip")}})}},addNodeView(){return ra(Wq)}}),qq=Dt.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(t=>({tag:`h${t}`,attrs:{level:t}}))},renderHTML({node:t,HTMLAttributes:e}){return[`h${this.options.levels.includes(t.attrs.level)?t.attrs.level:this.options.levels[0]}`,yt(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.setNode(this.name,t):!1,toggleHeading:t=>({commands:e})=>this.options.levels.includes(t.level)?e.toggleNode(this.name,"paragraph",t):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((t,e)=>({...t,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(t=>U0({find:new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),type:this.type,getAttributes:{level:t}}))}}),u5=o.defineComponent({__name:"DropdownMenu",props:{defaultOpen:{type:Boolean},open:{type:Boolean},dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(yP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),c5=o.defineComponent({__name:"DropdownMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=er(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(wP),o.mergeProps({class:"outline-none"},o.unref(n)),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),d5=o.defineComponent({__name:"DropdownMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},side:{},sideOffset:{default:4},align:{},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},arrowPadding:{},sticky:{},hideWhenDetached:{type:Boolean},updatePositionStrategy:{},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(xP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(CP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("z-50 min-w-32 overflow-hidden rounded-md border dark:border-ed-muted bg-ed-popover text-ed-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),fb=o.defineComponent({__name:"DropdownMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(kP),o.mergeProps(o.unref(r),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",i.inset&&"pl-8",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),Kq={key:0,class:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center"},$l=o.defineComponent({__name:"DropdownMenuCheckboxItem",props:{checked:{type:[Boolean,String]},disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},isShowCheckIcon:{type:Boolean}},emits:["select","update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(SP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm body-medium py-2.5 pl-2.5 pr-2.5 outline-none transition-colors focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.checked&&"bg-blue-100 text-blue-500 dark:bg-ed-blue-light",n.isShowCheckIcon&&"pl-8",n.class)}),{default:o.withCtx(()=>[n.isShowCheckIcon?(o.openBlock(),o.createElementBlock("span",Kq,[o.createVNode(o.unref(_P),null,{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-4 h-4"})]),_:1})])):o.createCommentVNode("",!0),o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),f5=o.defineComponent({__name:"DropdownMenuShortcut",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("span",{class:o.normalizeClass(o.unref(Ee)("ml-auto text-xs tracking-widest opacity-60",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),pb=o.defineComponent({__name:"DropdownMenuSeparator",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(EP),o.mergeProps(n.value,{class:o.unref(Ee)("-mx-1 my-1 h-px bg-ed-muted",e.class)}),null,16,["class"]))}}),Gq={class:"flex items-center justify-between w-full h-full font-normal"},Xq={key:0,class:"flex-grow text-sm text-left truncate"},Yq={class:"flex flex-col items-center text-center max-w-24"},Jq={key:0,class:"flex"},Zq=o.defineComponent({__name:"ActionMenuButton",props:{icon:{default:void 0},class:{default:""},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(ya),null,{default:o.withCtx(()=>[o.createVNode(o.unref(ba),{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{id:`action-menu-${n.id}`,class:o.normalizeClass(o.unref(Ee)("h-[32px] px-1.5 py-0",e.class)),variant:"ghost",disabled:n.disabled},{default:o.withCtx(()=>[o.createElementVNode("div",Gq,[n.title?(o.openBlock(),o.createElementBlock("div",Xq,o.toDisplayString(n.title),1)):o.createCommentVNode("",!0),n.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,class:"w-[16px] h-[16px]",name:n.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Ot),{class:"flex-shrink-0 w-1.5 h-1.5 ml-1",name:"ChevronDown"})])]),_:1},8,["id","class","disabled"])]),_:1}),n.tooltip||n.shortcutKeys&&n.shortcutKeys.length?(o.openBlock(),o.createBlock(o.unref(vs),{key:0},{default:o.withCtx(()=>[o.createElementVNode("div",Yq,[o.createElementVNode("div",null,o.toDisplayString(n.tooltip),1),n.shortcutKeys&&n.shortcutKeys.length?(o.openBlock(),o.createElementBlock("div",Jq,[o.createElementVNode("span",null,o.toDisplayString(o.unref(KC)(n.shortcutKeys)),1)])):o.createCommentVNode("",!0)])]),_:1})):o.createCommentVNode("",!0)]),_:1})]),_:1}))}}),Ea=o.defineComponent({__name:"ActionDropdownButton",props:{icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},class:{default:""},btn_class:{default:""},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""},customClass:{default:""},side:{default:"bottom"},align:{default:"start"}},setup(t){const e=t,n=o.inject("isMobile",!1),r=`dropdown-trigger-${Zr(10)}`,{isOpen:i}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:`[data-radix-menu-content], .${r}`}),s=o.computed(()=>n?{modal:!1,open:i.value,"onUpdate:open":a=>i.value=a}:{});return(a,l)=>(o.openBlock(),o.createBlock(o.unref(u5),o.normalizeProps(o.guardReactiveProps(o.unref(s))),{default:o.withCtx(()=>[o.createVNode(o.unref(c5),{disabled:a.disabled,class:o.normalizeClass(r)},{default:o.withCtx(()=>[o.createVNode(Zq,{id:a.id,class:o.normalizeClass(o.unref(Ee)(a.btn_class,a.customClass)),title:a.title,icon:a.icon,tooltip:a.tooltip,disabled:a.disabled,"is-active":a.isActive},null,8,["id","class","title","icon","tooltip","disabled","is-active"])]),_:1},8,["disabled"]),o.createVNode(o.unref(d5),o.mergeProps({class:o.unref(Ee)("min-w-24",e.class),align:a.align,side:a.side},a.$attrs),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class","align","side"])]),_:3},16))}}),Qq=o.defineComponent({__name:"HeadingButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r}:{title:e.tooltip,level:0,isActive:()=>!1}});return(r,i)=>{var s;return o.openBlock(),o.createBlock(Ea,{id:"heading",disabled:r.disabled,tooltip:r.tooltip,title:(s=n.value)==null?void 0:s.title,btn_class:"min-w-16 max-w-32"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(a,l)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:l},[o.createVNode(o.unref($l),{checked:n.value.title===a.title,onClick:a.action},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass("heading-"+a.level)},o.toDisplayString(a.title),3),r.editor.storage.deviceEnv.isMobile?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(o.unref(f5),{key:0,class:"pl-4"},{default:o.withCtx(()=>{var u;return[o.createTextVNode(o.toDisplayString((u=a.shortcutKeys)==null?void 0:u.map(c=>o.unref(ip)(c)).join(" ")),1)]}),_:2},1024))]),_:2},1032,["checked","onClick"]),r.showDefaultDivider&&a.level===0?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title"])}}}),p5=qq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),levels:[1,2,3,4,5,6],button({editor:e,extension:n,t:r}){var c;const{extensions:i=[]}=e.extensionManager??[],s=((c=n.options)==null?void 0:c.levels)||[],a=i.find(f=>f.name==="base-kit"),l=s.map(f=>({action:()=>e.commands.toggleHeading({level:f}),isActive:()=>e.isActive("heading",{level:f})||!1,disabled:!e.can().toggleHeading({level:f}),title:r(`editor.heading.h${f}.tooltip`),level:f,shortcutKeys:["alt","mod",`${f}`]}));a&&a.options.paragraph!==!1&&l.unshift({action:()=>e.commands.setParagraph(),isActive:()=>e.isActive("paragraph")||!1,disabled:!e.can().setParagraph(),level:0,title:r("editor.paragraph.tooltip"),shortcutKeys:["alt","mod","0"]});const u=l.filter(f=>f.disabled).length===l.length;return{component:Qq,componentProps:{tooltip:r("editor.heading.tooltip"),disabled:u,items:l}}}}}}),Nq=tt.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:t=>{const e=t.style.textAlign;return this.options.alignments.includes(e)?e:this.options.defaultAlignment},renderHTML:t=>t.textAlign?{style:`text-align: ${t.textAlign}`}:{}}}}]},addCommands(){return{setTextAlign:t=>({commands:e})=>this.options.alignments.includes(t)?this.options.types.map(n=>e.updateAttributes(n,{textAlign:t})).every(n=>n):!1,unsetTextAlign:()=>({commands:t})=>this.options.types.map(e=>t.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")}}}),eK=o.defineComponent({__name:"TextAlignMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(Ea,{icon:n.value.icon,tooltip:r.tooltip,disabled:r.disabled,side:"top",class:"min-w-4 w-full flex flex-row gap-1 inside-toolbar"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref(ba),{key:a},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:s.action},{default:o.withCtx(()=>[o.createVNode(o.unref(YC),{size:"sm",class:"w-7 h-7 p-1",pressed:n.value.title===s.title},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon,class:"w-3.5 h-3"},null,8,["name"])):o.createCommentVNode("",!0)]),_:2},1032,["pressed"])]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{class:"flex flex-col items-center"},{default:o.withCtx(()=>{var l;return[o.createElementVNode("span",null,o.toDisplayString(s.title),1),o.createElementVNode("span",null,o.toDisplayString((l=s.shortcutKeys)==null?void 0:l.map(u=>o.unref(ip)(u)).join(" ")),1)]}),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["icon","tooltip","disabled"]))}}),h5=Nq.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph","list_item","title"],button:e=>{var f;const{editor:n,extension:r,t:i}=e,s=((f=r.options)==null?void 0:f.alignments)||[],a={left:["mod","Shift","L"],center:["mod","Shift","E"],right:["mod","Shift","R"],justify:["mod","Shift","J"]},l={left:"AlignLeft",center:"AlignCenter",right:"AlignRight",justify:"AlignJustify"},u=s.map(p=>({title:i(`editor.textalign.${p}.tooltip`),icon:l[p],shortcutKeys:a[p],isActive:()=>n.isActive({textAlign:p})||!1,action:()=>n.chain().focus().setTextAlign(p).run(),disabled:!n.can().setTextAlign(p)})),c=u.filter(p=>p.disabled).length===u.length;return{component:eK,componentProps:{icon:"AlignJustify",tooltip:i("editor.textalign.tooltip"),disabled:c,items:u}}}}}}),tK=o.defineComponent({__name:"ScrollBar",props:{orientation:{default:"vertical"},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(GP),o.mergeProps(n.value,{class:o.unref(Ee)("flex touch-none select-none transition-colors",r.orientation==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",r.orientation==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(XP),{class:"relative flex-1 rounded-full bg-ed-border"})]),_:1},16,["class"]))}}),nK=o.defineComponent({__name:"ScrollArea",props:{type:{},dir:{},scrollHideDelay:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(VP),o.mergeProps(n.value,{class:o.unref(Ee)("relative overflow-hidden",e.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(FP),{class:"h-full w-full rounded-[inherit]"},{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3}),o.createVNode(tK),o.createVNode(o.unref(JP))]),_:3},16,["class"]))}}),rK={class:"ml-1 h-full"},oK=o.defineComponent({__name:"FontSizeMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,{t:n}=At(),r=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),i=o.inject("fontSize"),s=o.computed(()=>{const c={title:n("editor.fontSize.default.tooltip"),isActive:()=>!1};if(r.value)return e.items.find(m=>m.isActive()&&m.title)||c;const f=e.items.find(p=>p.title===i.value);return f||(i.value?{title:i.value}:c)}),a=Ne.useEventBus("fontFamily"),l=(c,f)=>{c===n("editor.fontSize.default.tooltip")?(e.editor.commands.unsetFontSize(),i.value=null):(i.value=c,e.editor.commands.setFontSize(c),a.emit()),f(),e.editor.commands.setForceCloseBubble(!0)};e.editor.on("selectionUpdate",({editor:c})=>{c.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const u=c=>c===n("editor.fontSize.default.tooltip")?c:c.replace("px","");return(c,f)=>{const p=pb;return o.openBlock(),o.createBlock(Ea,{disabled:c.disabled,tooltip:c.tooltip,title:s.value.title,btn_class:`min-w-20 ${c.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[o.createVNode(o.unref(nK),{class:"h-72"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(m,g)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:g},[o.createVNode(o.unref($l),{checked:s.value.title===m.title,onClick:()=>l(m.title,m.action)},{default:o.withCtx(()=>[o.createElementVNode("div",rK,o.toDisplayString(u(m.title)),1)]),_:2},1032,["checked","onClick"]),m.title===o.unref(n)("editor.fontSize.default.tooltip")&&c.showDefaultDivider?(o.openBlock(),o.createBlock(p,{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1})]),_:1},8,["disabled","tooltip","title","btn_class"])}}}),m5=tt.create({name:"fontSize",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontSizes:[...l1],button({editor:e,extension:n,t:r}){var l;const i=((l=n.options)==null?void 0:l.fontSizes)||[],s=[hl,...i].map(u=>({title:u===hl?r("editor.fontSize.default.tooltip"):String(u),isActive:()=>{const{fontSize:c}=e.getAttributes("textStyle");return u===hl&&c===void 0?!0:e.isActive({fontSize:String(u)})||!1},action:()=>{if(u===hl){e.chain().focus().unsetFontSize().run();return}e.chain().focus().setFontSize(String(u)).run()},disabled:!e.can().setFontSize(String(u)),divider:u===hl||!1,default:u===hl||!1})),a=s.filter(u=>u.disabled).length===s.length;return{component:oK,componentProps:{editor:e,tooltip:r("editor.fontSize.tooltip"),disabled:a,items:s}}}}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontSize:{default:null,parseHTML:t=>t.style.fontSize.replace(/['"]+/g,""),renderHTML:t=>t.fontSize?{style:`font-size: ${t.fontSize}`}:{}}}}]},addCommands(){return{setFontSize:t=>({chain:e})=>e().setMark("textStyle",{fontSize:t}).run(),unsetFontSize:()=>({chain:t})=>t().setMark("textStyle",{fontSize:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontSize}}),iK=t=>{if(!t.children.length)return;const e=t.querySelectorAll("span");e&&e.forEach(n=>{var r,i;const s=n.getAttribute("style"),a=(i=(r=n.parentElement)===null||r===void 0?void 0:r.closest("span"))===null||i===void 0?void 0:i.getAttribute("style");n.setAttribute("style",`${a};${s}`)})},sK=Un.create({name:"textStyle",priority:101,addOptions(){return{HTMLAttributes:{},mergeNestedSpanStyles:!1}},parseHTML(){return[{tag:"span",getAttrs:t=>t.hasAttribute("style")?(this.options.mergeNestedSpanStyles&&iK(t),{}):!1}]},renderHTML({HTMLAttributes:t}){return["span",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{removeEmptyTextStyle:()=>({tr:t})=>{const{selection:e}=t;return t.doc.nodesBetween(e.from,e.to,(n,r)=>{if(n.isTextblock)return!0;n.marks.filter(i=>i.type===this.type).some(i=>Object.values(i.attrs).some(s=>!!s))||t.removeMark(r,r+n.nodeSize,this.type)}),!0}}}}),aK=tt.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:t=>{var e;return(e=t.style.color)===null||e===void 0?void 0:e.replace(/['"]+/g,"")},renderHTML:t=>t.color?{style:`color: ${t.color}`}:{}}}}]},addCommands(){return{setColor:t=>({chain:e})=>e().setMark("textStyle",{color:t}).run(),unsetColor:()=>({chain:t})=>t().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}}),lK={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},uK={class:"flex items-center justify-center text-sm"},cK={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dK=["fill"],fK=o.defineComponent({__name:"ColorActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=o.ref(void 0);function r(s){var a;(a=e.action)==null||a.call(e,s)}function i(s){var a;(a=e.action)==null||a.call(e,n.value)}return(s,a)=>(o.openBlock(),o.createElementBlock("div",lK,[o.createVNode(Ge,{id:"color",tooltip:s.tooltip,disabled:s.disabled,action:i},{icon:o.withCtx(()=>[o.createElementVNode("span",uK,[(o.openBlock(),o.createElementBlock("svg",cK,[a[1]||(a[1]=o.createElementVNode("path",{d:"M7.25033 8.93724H12.7503M5.41699 12.5L9.33272 4.12953C9.54481 3.67616 9.65086 3.44947 9.79781 3.37915C9.9255 3.31804 10.0752 3.31804 10.2028 3.37915C10.3498 3.44947 10.4558 3.67616 10.6679 4.12953L14.5837 12.5",stroke:"currentColor","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)),o.createElementVNode("path",{d:"M3.33301 15H16.6663V16.6667H3.33301V15Z",fill:n.value||"hsl(var(--ed-foreground))"},null,8,dK)]))])]),_:1},8,["tooltip","disabled"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=l=>n.value=l),disabled:s.disabled,onChange:r},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{variant:"ghost",size:"icon",class:"h-[32px] w-3 rounded-l-none hover:bg-ed-muted-foreground/20",disabled:s.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"flex-shrink-0 w-1.5 h-1.5",name:"ChevronDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),g5=aK.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:n}){return{component:fK,componentProps:{action:r=>{typeof r>"u"&&e.chain().focus().unsetColor().run(),typeof r=="string"&&e.chain().focus().setColor(r).run()},isActive:()=>{const{color:r}=e.getAttributes("textStyle");return r&&e.isActive({color:r})||!1},editor:e,disabled:!e.can().setColor(""),tooltip:n("editor.color.tooltip")}}}}}}),pK=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))$/,hK=/(?:^|\s)(==(?!\s+==)((?:[^=]+))==(?!\s+==))/g,b5=Un.create({name:"highlight",addOptions(){return{multicolor:!1,HTMLAttributes:{}}},addAttributes(){return this.options.multicolor?{color:{default:null,parseHTML:t=>t.getAttribute("data-color")||t.style.backgroundColor,renderHTML:t=>t.color?{"data-color":t.color,style:`background-color: ${t.color}; color: inherit`}:{}}}:{}},parseHTML(){return[{tag:"mark"}]},renderHTML({HTMLAttributes:t}){return["mark",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setHighlight:t=>({commands:e})=>e.setMark(this.name,t),toggleHighlight:t=>({commands:e})=>e.toggleMark(this.name,t),unsetHighlight:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-h":()=>this.editor.commands.toggleHighlight()}},addInputRules(){return[Js({find:pK,type:this.type})]},addPasteRules(){return[Ni({find:hK,type:this.type})]}}),mK=b5.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),multicolor:!0,button:({editor:e,t:n})=>({component:eS,componentProps:{action:r=>{typeof r=="string"&&e.chain().focus().setHighlight({color:r}).run(),typeof r>"u"&&e.chain().focus().unsetHighlight().run()},editor:e,isActive:()=>e.isActive("highlight")||!1,disabled:!e.can().setHighlight(),shortcutKeys:["⇧","mod","H"],tooltip:n("editor.highlight.tooltip")}})}}}),gK="listItem",v5="textStyle",y5=/^\s*([-+*])\s$/,bK=Dt.create({name:"bulletList",addOptions(){return{itemTypeName:"listItem",HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:"ul"}]},renderHTML({HTMLAttributes:t}){return["ul",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleBulletList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(gK,this.editor.getAttributes(v5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let t=al({find:y5,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(t=al({find:y5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(v5),editor:this.editor})),[t]}}),vK=["id"],w5=o.defineComponent({__name:"ActionDropdownButtonSplit",props:{icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},class:{default:""},shortcutKeys:{default:void 0},btnClass:{default:""},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},id:{default:""}},setup(t){const e=t;return(n,r)=>{var i;return o.openBlock(),o.createElementBlock("div",{id:`dropdown-btn-${n.id}`,class:o.normalizeClass(["flex items-center h-[32px] hover:bg-ed-muted rounded-md",[((i=n.isActive)==null?void 0:i.call(n))&&"bg-ed-muted"]])},[o.createVNode(Ge,{class:o.normalizeClass(n.btnClass),action:n.action,title:n.title,icon:n.icon,tooltip:n.tooltip,disabled:n.disabled,"shortcut-keys":n.shortcutKeys},null,8,["class","action","title","icon","tooltip","disabled","shortcut-keys"]),o.createVNode(o.unref(u5),null,{default:o.withCtx(()=>[o.createVNode(o.unref(c5),{disabled:n.disabled},{default:o.withCtx(()=>[o.createVNode(bn,{variant:"ghost",size:"icon",class:"h-[32px] w-3 rounded-l-none hover:bg-ed-muted-foreground/20",disabled:n.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["disabled"]),o.createVNode(o.unref(d5),o.mergeProps({class:o.unref(Ee)("min-w-24",e.class),align:"start",side:"bottom"},n.$attrs),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16,["class"])]),_:3})],10,vK)}}}),yK=o.defineComponent({__name:"BulletListMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},tooltip:{default:""}},setup(t){const e=t,{t:n}=At(),r=[{label:"editor.bulletlist.disc.tooltip",value:"disc"},{label:"editor.bulletlist.circle.tooltip",value:"circle"},{label:"editor.bulletlist.square.tooltip",value:"square"}],i=o.computed(()=>{var a;return(a=e.editor)!=null&&a.isActive("bulletList")?e.editor.getAttributes("bulletList").listStyleType:"disc"});function s(a){e.editor.isActive("bulletList")?e.editor.getAttributes("bulletList").listStyleType===a.value?e.editor.chain().focus().toggleBulletList().run():e.editor.chain().focus().updateAttributes("bulletList",{listStyleType:a.value}).run():e.editor.chain().focus().toggleBulletList().updateAttributes("bulletList",{listStyleType:a.value}).run()}return(a,l)=>(o.openBlock(),o.createBlock(w5,{id:"bullet-list",action:()=>s,disabled:a.disabled,tooltip:a.tooltip,class:"grid w-full grid-cols-3 gap-1 min-w-4"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,u=>o.createVNode(o.unref(ba),{key:u.value,"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),null,{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:c=>s(u)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([[i.value===u.value?"bg-ed-accent border border-ed-accent-foreground":""],"h-[48px] flex flex-col w-[48px] box-border rounded-sm border"])},[o.createElementVNode("ol",{style:o.normalizeStyle({listStyleType:u.value,lineHeight:1}),class:"text-[10px] pl-3 flex-1 list-outside flex flex-col items-center justify-center"},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,c=>o.createElementVNode("li",{key:c},l[0]||(l[0]=[o.createElementVNode("hr",{class:"border-0 bg-gray-200 h-[3px] w-6 my-1"},null,-1)]))),64))],4)],2)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{side:"bottom"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)(u.label)),1)]),_:2},1024)]),_:2},1024)),64))]),_:1})]),_:1},8,["action","disabled","tooltip"]))}}),wK=bK.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),listStyleType:{default:"disc",parseHTML:e=>({listStyleType:e.style["list-style-type"]??"disc"}),renderHTML:({listStyleType:e})=>({style:`list-style-type: ${(e==null?void 0:e.listStyleType)||e}`})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:yK,componentProps:{action:()=>e.commands.toggleBulletList(),isActive:()=>e.isActive("bulletList")||!1,disabled:!e.can().toggleBulletList(),shortcutKeys:["shift","mod","8"],icon:"List",tooltip:n("editor.bulletlist.tooltip")}})}}}),hb=Dt.create({name:"clear",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.chain().focus().clearNodes().unsetAllMarks().run(),disabled:!e.can().chain().focus().clearNodes().unsetAllMarks().run(),icon:"Eraser",tooltip:n("editor.clear.tooltip")}})}}}),xK="listItem",x5="textStyle",C5=/^(\d+)\.\s$/,CK=Dt.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:t=>t.hasAttribute("start")?parseInt(t.getAttribute("start")||"",10):1},type:{default:void 0,parseHTML:t=>t.getAttribute("type")}}},parseHTML(){return[{tag:"ol"}]},renderHTML({HTMLAttributes:t}){const{start:e,...n}=t;return e===1?["ol",yt(this.options.HTMLAttributes,n),0]:["ol",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{toggleOrderedList:()=>({commands:t,chain:e})=>this.options.keepAttributes?e().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(xK,this.editor.getAttributes(x5)).run():t.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addInputRules(){let t=al({find:C5,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1]});return(this.options.keepMarks||this.options.keepAttributes)&&(t=al({find:C5,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(x5)}),joinPredicate:(e,n)=>n.childCount+n.attrs.start===+e[1],editor:this.editor})),[t]}}),kK=o.defineComponent({__name:"OrderedListMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},tooltip:{default:""},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,{t:n}=At(),r=[{label:"editor.orderedlist.decimal.tooltip",value:"decimal"},{label:"editor.orderedlist.decimalLeadingZero.tooltip",value:"decimal-leading-zero"},{label:"editor.orderedlist.lowerRoman.tooltip",value:"lower-roman"},{label:"editor.orderedlist.upperRoman.tooltip",value:"upper-roman"},{label:"editor.orderedlist.lowerLatin.tooltip",value:"lower-latin"},{label:"editor.orderedlist.upperLatin.tooltip",value:"upper-latin"},{label:"editor.orderedlist.tradChineseInformal.tooltip",value:"trad-chinese-informal"},{label:"editor.orderedlist.simpChineseFormal.tooltip",value:"simp-chinese-formal"}],i=o.computed(()=>{var a;return(a=e.editor)!=null&&a.isActive("orderedList")?e.editor.getAttributes("orderedList").listType:"decimal"});function s(a){var l,u;e.editor.isActive("orderedList")?e.editor.getAttributes("orderedList").listType===a.value?(l=e.editor.chain())==null||l.toggleOrderedList().run():(u=e.editor.chain())==null||u.updateAttributes("orderedList",{listType:a.value}).run():e.editor.chain().focus().toggleOrderedList().updateAttributes("orderedList",{listType:a.value}).run()}return(a,l)=>(o.openBlock(),o.createBlock(w5,{action:()=>s,disabled:a.disabled,tooltip:a.tooltip,"is-active":a.isActive,"shortcut-keys":a.shortcutKeys,class:"min-w-4 w-full grid grid-cols-3 gap-1"},{default:o.withCtx(()=>[o.createVNode(o.unref(ya),null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,u=>o.createVNode(o.unref(ba),{key:u.value,"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(o.unref(va),{"as-child":""},{default:o.withCtx(()=>[o.createVNode(o.unref(fb),{class:"p-0",onClick:c=>s(u)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass([[i.value===u.value?"bg-ed-accent border border-ed-accent-foreground":""],"h-[72px] flex flex-col w-[72px] box-border rounded-sm border"])},[o.createElementVNode("ol",{style:o.normalizeStyle({listStyleType:u.value,lineHeight:1}),class:"text-[12px] pl-3 flex-1 list-outside flex flex-col items-center justify-center"},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(3,c=>o.createElementVNode("li",{key:c},l[0]||(l[0]=[o.createElementVNode("hr",{class:"border-0 bg-gray-200 h-[3px] w-6 my-1"},null,-1)]))),64))],4)],2)]),_:2},1032,["onClick"])]),_:2},1024),o.createVNode(o.unref(vs),{side:"bottom"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)(u.label)),1)]),_:2},1024)]),_:2},1024)),64))]),_:1})]),_:1},8,["action","disabled","tooltip","is-active","shortcut-keys"]))}}),EK=CK.extend({addAttributes(){var t;return{...(t=this.parent)==null?void 0:t.call(this),listType:{default:"decimal",parseHTML:e=>{e.style.getPropertyValue("list-style-type")},renderHTML:({listType:e})=>({style:`list-style-type: ${e}`})}}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:kK,componentProps:{action:()=>e.commands.toggleOrderedList(),isActive:()=>e.isActive("orderedList")||!1,disabled:!e.can().toggleOrderedList(),icon:"ListOrdered",shortcutKeys:["mod","shift","7"],tooltip:n("editor.orderedlist.tooltip")}})}}}),SK=/^\s*(\[([( |x])?\])\s$/,_K=Dt.create({name:"taskItem",addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:"taskList"}},content(){return this.options.nested?"paragraph block*":"paragraph+"},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:t=>{const e=t.getAttribute("data-checked");return e===""||e==="true"},renderHTML:t=>({"data-checked":t.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51}]},renderHTML({node:t,HTMLAttributes:e}){return["li",yt(this.options.HTMLAttributes,e,{"data-type":this.name}),["label",["input",{type:"checkbox",checked:t.attrs.checked?"checked":null}],["span"]],["div",0]]},addKeyboardShortcuts(){const t={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...t,Tab:()=>this.editor.commands.sinkListItem(this.name)}:t},addNodeView(){return({node:t,HTMLAttributes:e,getPos:n,editor:r})=>{const i=document.createElement("li"),s=document.createElement("label"),a=document.createElement("span"),l=document.createElement("input"),u=document.createElement("div");return s.contentEditable="false",l.type="checkbox",l.addEventListener("mousedown",c=>c.preventDefault()),l.addEventListener("change",c=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){l.checked=!l.checked;return}const{checked:f}=c.target;r.isEditable&&typeof n=="function"&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:p})=>{const m=n();if(typeof m!="number")return!1;const g=p.doc.nodeAt(m);return p.setNodeMarkup(m,void 0,{...g==null?void 0:g.attrs,checked:f}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(t,f)||(l.checked=!l.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([c,f])=>{i.setAttribute(c,f)}),i.dataset.checked=t.attrs.checked,l.checked=t.attrs.checked,s.append(l,a),i.append(s,u),Object.entries(e).forEach(([c,f])=>{i.setAttribute(c,f)}),{dom:i,contentDOM:u,update:c=>c.type!==this.type?!1:(i.dataset.checked=c.attrs.checked,l.checked=c.attrs.checked,!0)}}},addInputRules(){return[al({find:SK,type:this.type,getAttributes:t=>({checked:t[t.length-1]==="x"})})]}}),TK=Dt.create({name:"taskList",addOptions(){return{itemTypeName:"taskItem",HTMLAttributes:{}}},group:"block list",content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:t}){return["ul",yt(this.options.HTMLAttributes,t,{"data-type":this.name}),0]},addCommands(){return{toggleTaskList:()=>({commands:t})=>t.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}).extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"task-list"},taskItem:{HTMLAttributes:{class:"task-list-item"}},button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleTaskList(),isActive:()=>e.isActive("taskList")||!1,disabled:!e.can().toggleTaskList(),icon:"ListTodo",shortcutKeys:["shift","mod","9"],tooltip:n("editor.tasklist.tooltip")}})}},addExtensions(){return[_K.configure(this.options.taskItem)]}}),AK=/^\s*>\s$/,MK=Dt.create({name:"blockquote",addOptions(){return{HTMLAttributes:{}}},content:"block+",group:"block",defining:!0,parseHTML(){return[{tag:"blockquote"}]},renderHTML({HTMLAttributes:t}){return["blockquote",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setBlockquote:()=>({commands:t})=>t.wrapIn(this.name),toggleBlockquote:()=>({commands:t})=>t.toggleWrap(this.name),unsetBlockquote:()=>({commands:t})=>t.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote()}},addInputRules(){return[al({find:AK,type:this.type})]}}).extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),HTMLAttributes:{class:"blockquote"},button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.toggleBlockquote(),isActive:()=>e.isActive("blockquote")||!1,disabled:!e.can().toggleBlockquote(),icon:"TextQuote",shortcutKeys:["shift","mod","B"],tooltip:n("editor.blockquote.tooltip")}})}}}),OK="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",BK="ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2",Hl=(t,e)=>{for(const n in e)t[n]=e[n];return t},mb="numeric",gb="ascii",bb="alpha",Sc="asciinumeric",_c="alphanumeric",vb="domain",k5="emoji",IK="scheme",RK="slashscheme",yb="whitespace";function LK(t,e){return t in e||(e[t]=[]),e[t]}function Sa(t,e,n){e[mb]&&(e[Sc]=!0,e[_c]=!0),e[gb]&&(e[Sc]=!0,e[bb]=!0),e[Sc]&&(e[_c]=!0),e[bb]&&(e[_c]=!0),e[_c]&&(e[vb]=!0),e[k5]&&(e[vb]=!0);for(const r in e){const i=LK(r,n);i.indexOf(t)<0&&i.push(t)}}function DK(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function pr(t=null){this.j={},this.jr=[],this.jd=null,this.t=t}pr.groups={},pr.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;r<e.jr.length;r++){const i=e.jr[r][0],s=e.jr[r][1];if(s&&i.test(t))return s}return e.jd},has(t,e=!1){return e?t in this.j:!!this.go(t)},ta(t,e,n,r){for(let i=0;i<t.length;i++)this.tt(t[i],e,n,r)},tr(t,e,n,r){r=r||pr.groups;let i;return e&&e.j?i=e:(i=new pr(e),n&&r&&Sa(e,n,r)),this.jr.push([t,i]),i},ts(t,e,n,r){let i=this;const s=t.length;if(!s)return i;for(let a=0;a<s-1;a++)i=i.tt(t[a]);return i.tt(t[s-1],e,n,r)},tt(t,e,n,r){r=r||pr.groups;const i=this;if(e&&e.j)return i.j[t]=e,e;const s=e;let a,l=i.go(t);if(l?(a=new pr,Hl(a.j,l.j),a.jr.push.apply(a.jr,l.jr),a.jd=l.jd,a.t=l.t):a=new pr,s){if(r)if(a.t&&typeof a.t=="string"){const u=Hl(DK(a.t,r),n);Sa(s,u,r)}else n&&Sa(s,n,r);a.t=s}return i.j[t]=a,a}};const mt=(t,e,n,r,i)=>t.ta(e,n,r,i),sn=(t,e,n,r,i)=>t.tr(e,n,r,i),E5=(t,e,n,r,i)=>t.ts(e,n,r,i),Ce=(t,e,n,r,i)=>t.tt(e,n,r,i),Ei="WORD",wb="UWORD",S5="ASCIINUMERICAL",_5="ALPHANUMERICAL",Tc="LOCALHOST",xb="TLD",Cb="UTLD",_p="SCHEME",zl="SLASH_SCHEME",kb="NUM",Eb="WS",Sb="NL",Ac="OPENBRACE",Mc="CLOSEBRACE",Tp="OPENBRACKET",Ap="CLOSEBRACKET",Mp="OPENPAREN",Op="CLOSEPAREN",Bp="OPENANGLEBRACKET",Ip="CLOSEANGLEBRACKET",Rp="FULLWIDTHLEFTPAREN",Lp="FULLWIDTHRIGHTPAREN",Dp="LEFTCORNERBRACKET",Pp="RIGHTCORNERBRACKET",Vp="LEFTWHITECORNERBRACKET",Fp="RIGHTWHITECORNERBRACKET",$p="FULLWIDTHLESSTHAN",Hp="FULLWIDTHGREATERTHAN",zp="AMPERSAND",_b="APOSTROPHE",Up="ASTERISK",Cs="AT",Wp="BACKSLASH",jp="BACKTICK",qp="CARET",ks="COLON",Tb="COMMA",Kp="DOLLAR",Yo="DOT",Gp="EQUALS",Ab="EXCLAMATION",Qr="HYPHEN",Oc="PERCENT",Xp="PIPE",Yp="PLUS",Jp="POUND",Bc="QUERY",Mb="QUOTE",T5="FULLWIDTHMIDDLEDOT",Ob="SEMI",Jo="SLASH",Ic="TILDE",Zp="UNDERSCORE",A5="EMOJI",Qp="SYM";var M5=Object.freeze({__proto__:null,WORD:Ei,UWORD:wb,ASCIINUMERICAL:S5,ALPHANUMERICAL:_5,LOCALHOST:Tc,TLD:xb,UTLD:Cb,SCHEME:_p,SLASH_SCHEME:zl,NUM:kb,WS:Eb,NL:Sb,OPENBRACE:Ac,CLOSEBRACE:Mc,OPENBRACKET:Tp,CLOSEBRACKET:Ap,OPENPAREN:Mp,CLOSEPAREN:Op,OPENANGLEBRACKET:Bp,CLOSEANGLEBRACKET:Ip,FULLWIDTHLEFTPAREN:Rp,FULLWIDTHRIGHTPAREN:Lp,LEFTCORNERBRACKET:Dp,RIGHTCORNERBRACKET:Pp,LEFTWHITECORNERBRACKET:Vp,RIGHTWHITECORNERBRACKET:Fp,FULLWIDTHLESSTHAN:$p,FULLWIDTHGREATERTHAN:Hp,AMPERSAND:zp,APOSTROPHE:_b,ASTERISK:Up,AT:Cs,BACKSLASH:Wp,BACKTICK:jp,CARET:qp,COLON:ks,COMMA:Tb,DOLLAR:Kp,DOT:Yo,EQUALS:Gp,EXCLAMATION:Ab,HYPHEN:Qr,PERCENT:Oc,PIPE:Xp,PLUS:Yp,POUND:Jp,QUERY:Bc,QUOTE:Mb,FULLWIDTHMIDDLEDOT:T5,SEMI:Ob,SLASH:Jo,TILDE:Ic,UNDERSCORE:Zp,EMOJI:A5,SYM:Qp});const Si=/[a-z]/,Rc=new RegExp("\\p{L}","u"),Bb=new RegExp("\\p{Emoji}","u"),_i=/\d/,Ib=/\s/,O5="\r",Rb=`
|
|
324
324
|
`,PK="️",VK="",Lb="";let Np=null,eh=null;function FK(t=[]){const e={};pr.groups=e;const n=new pr;Np==null&&(Np=I5(OK)),eh==null&&(eh=I5(BK)),Ce(n,"'",_b),Ce(n,"{",Ac),Ce(n,"}",Mc),Ce(n,"[",Tp),Ce(n,"]",Ap),Ce(n,"(",Mp),Ce(n,")",Op),Ce(n,"<",Bp),Ce(n,">",Ip),Ce(n,"(",Rp),Ce(n,")",Lp),Ce(n,"「",Dp),Ce(n,"」",Pp),Ce(n,"『",Vp),Ce(n,"』",Fp),Ce(n,"<",$p),Ce(n,">",Hp),Ce(n,"&",zp),Ce(n,"*",Up),Ce(n,"@",Cs),Ce(n,"`",jp),Ce(n,"^",qp),Ce(n,":",ks),Ce(n,",",Tb),Ce(n,"$",Kp),Ce(n,".",Yo),Ce(n,"=",Gp),Ce(n,"!",Ab),Ce(n,"-",Qr),Ce(n,"%",Oc),Ce(n,"|",Xp),Ce(n,"+",Yp),Ce(n,"#",Jp),Ce(n,"?",Bc),Ce(n,'"',Mb),Ce(n,"/",Jo),Ce(n,";",Ob),Ce(n,"~",Ic),Ce(n,"_",Zp),Ce(n,"\\",Wp),Ce(n,"・",T5);const r=sn(n,_i,kb,{[mb]:!0});sn(r,_i,r);const i=sn(r,Si,S5,{[Sc]:!0}),s=sn(r,Rc,_5,{[_c]:!0}),a=sn(n,Si,Ei,{[gb]:!0});sn(a,_i,i),sn(a,Si,a),sn(i,_i,i),sn(i,Si,i);const l=sn(n,Rc,wb,{[bb]:!0});sn(l,Si),sn(l,_i,s),sn(l,Rc,l),sn(s,_i,s),sn(s,Si),sn(s,Rc,s);const u=Ce(n,Rb,Sb,{[yb]:!0}),c=Ce(n,O5,Eb,{[yb]:!0}),f=sn(n,Ib,Eb,{[yb]:!0});Ce(n,Lb,f),Ce(c,Rb,u),Ce(c,Lb,f),sn(c,Ib,f),Ce(f,O5),Ce(f,Rb),sn(f,Ib,f),Ce(f,Lb,f);const p=sn(n,Bb,A5,{[k5]:!0});Ce(p,"#"),sn(p,Bb,p),Ce(p,PK,p);const m=Ce(p,VK);Ce(m,"#"),sn(m,Bb,p);const g=[[Si,a],[_i,i]],b=[[Si,null],[Rc,l],[_i,s]];for(let v=0;v<Np.length;v++)Es(n,Np[v],xb,Ei,g);for(let v=0;v<eh.length;v++)Es(n,eh[v],Cb,wb,b);Sa(xb,{tld:!0,ascii:!0},e),Sa(Cb,{utld:!0,alpha:!0},e),Es(n,"file",_p,Ei,g),Es(n,"mailto",_p,Ei,g),Es(n,"http",zl,Ei,g),Es(n,"https",zl,Ei,g),Es(n,"ftp",zl,Ei,g),Es(n,"ftps",zl,Ei,g),Sa(_p,{scheme:!0,ascii:!0},e),Sa(zl,{slashscheme:!0,ascii:!0},e),t=t.sort((v,y)=>v[0]>y[0]?1:-1);for(let v=0;v<t.length;v++){const y=t[v][0],k=t[v][1]?{[IK]:!0}:{[RK]:!0};y.indexOf("-")>=0?k[vb]=!0:Si.test(y)?_i.test(y)?k[Sc]=!0:k[gb]=!0:k[mb]=!0,E5(n,y,y,k)}return E5(n,"localhost",Tc,{ascii:!0}),n.jd=new pr(Qp),{start:n,tokens:Hl({groups:e},M5)}}function B5(t,e){const n=$K(e.replace(/[A-Z]/g,l=>l.toLowerCase())),r=n.length,i=[];let s=0,a=0;for(;a<r;){let l=t,u=null,c=0,f=null,p=-1,m=-1;for(;a<r&&(u=l.go(n[a]));)l=u,l.accepts()?(p=0,m=0,f=l):p>=0&&(p+=n[a].length,m++),c+=n[a].length,s+=n[a].length,a++;s-=p,a-=m,c-=p,i.push({t:f.t,v:e.slice(s-c,s),s:s-c,e:s})}return i}function $K(t){const e=[],n=t.length;let r=0;for(;r<n;){let i=t.charCodeAt(r),s,a=i<55296||i>56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(a),r+=a.length}return e}function Es(t,e,n,r,i){let s;const a=e.length;for(let l=0;l<a-1;l++){const u=e[l];t.j[u]?s=t.j[u]:(s=new pr(r),s.jr=i.slice(),t.j[u]=s),t=s}return s=new pr(n),s.jr=i.slice(),t.j[e[a-1]]=s,s}function I5(t){const e=[],n=[];let r=0,i="0123456789";for(;r<t.length;){let s=0;for(;i.indexOf(t[r+s])>=0;)s++;if(s>0){e.push(n.join(""));for(let a=parseInt(t.substring(r,r+s),10);a>0;a--)n.pop();r+=s}else n.push(t[r]),r++}return e}const Lc={defaultProtocol:"http",events:null,format:R5,formatHref:R5,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Db(t,e=null){let n=Hl({},Lc);t&&(n=Hl(n,t instanceof Db?t.o:t));const r=n.ignoreTags,i=[];for(let s=0;s<r.length;s++)i.push(r[s].toUpperCase());this.o=n,e&&(this.defaultRender=e),this.ignoreTags=i}Db.prototype={o:Lc,ignoreTags:[],defaultRender(t){return t},check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=e!=null;let i=this.o[t];return i&&(typeof i=="object"?(i=n.t in i?i[n.t]:Lc[t],typeof i=="function"&&r&&(i=i(e,n))):typeof i=="function"&&r&&(i=i(e,n.t,n)),i)},getObj(t,e,n){let r=this.o[t];return typeof r=="function"&&e!=null&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};function R5(t){return t}function L5(t,e){this.t="token",this.v=t,this.tk=e}L5.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"…":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t=Lc.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),i=t.get("tagName",n,e),s=this.toFormattedString(t),a={},l=t.get("className",n,e),u=t.get("target",n,e),c=t.get("rel",n,e),f=t.getObj("attributes",n,e),p=t.getObj("events",n,e);return a.href=r,l&&(a.class=l),u&&(a.target=u),c&&(a.rel=c),f&&Hl(a,f),{tagName:i,attributes:a,content:s,eventListeners:p}}};function th(t,e){class n extends L5{constructor(i,s){super(i,s),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}const D5=th("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),P5=th("text"),HK=th("nl"),nh=th("url",{isLink:!0,toHref(t=Lc.defaultProtocol){return this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==Tc&&t[1].t===ks}}),Nr=t=>new pr(t);function zK({groups:t}){const e=t.domain.concat([zp,Up,Cs,Wp,jp,qp,Kp,Gp,Qr,kb,Oc,Xp,Yp,Jp,Jo,Qp,Ic,Zp]),n=[ks,Tb,Yo,Ab,Oc,Bc,Mb,Ob,Bp,Ip,Ac,Mc,Ap,Tp,Mp,Op,Rp,Lp,Dp,Pp,Vp,Fp,$p,Hp],r=[zp,_b,Up,Wp,jp,qp,Kp,Gp,Qr,Ac,Mc,Oc,Xp,Yp,Jp,Bc,Jo,Qp,Ic,Zp],i=Nr(),s=Ce(i,Ic);mt(s,r,s),mt(s,t.domain,s);const a=Nr(),l=Nr(),u=Nr();mt(i,t.domain,a),mt(i,t.scheme,l),mt(i,t.slashscheme,u),mt(a,r,s),mt(a,t.domain,a);const c=Ce(a,Cs);Ce(s,Cs,c),Ce(l,Cs,c),Ce(u,Cs,c);const f=Ce(s,Yo);mt(f,r,s),mt(f,t.domain,s);const p=Nr();mt(c,t.domain,p),mt(p,t.domain,p);const m=Ce(p,Yo);mt(m,t.domain,p);const g=Nr(D5);mt(m,t.tld,g),mt(m,t.utld,g),Ce(c,Tc,g);const b=Ce(p,Qr);Ce(b,Qr,b),mt(b,t.domain,p),mt(g,t.domain,p),Ce(g,Yo,m),Ce(g,Qr,b);const v=Ce(g,ks);mt(v,t.numeric,D5);const y=Ce(a,Qr),x=Ce(a,Yo);Ce(y,Qr,y),mt(y,t.domain,a),mt(x,r,s),mt(x,t.domain,a);const k=Nr(nh);mt(x,t.tld,k),mt(x,t.utld,k),mt(k,t.domain,a),mt(k,r,s),Ce(k,Yo,x),Ce(k,Qr,y),Ce(k,Cs,c);const E=Ce(k,ks),C=Nr(nh);mt(E,t.numeric,C);const _=Nr(nh),T=Nr();mt(_,e,_),mt(_,n,T),mt(T,e,_),mt(T,n,T),Ce(k,Jo,_),Ce(C,Jo,_);const A=Ce(l,ks),V=Ce(u,ks),O=Ce(V,Jo),B=Ce(O,Jo);mt(l,t.domain,a),Ce(l,Yo,x),Ce(l,Qr,y),mt(u,t.domain,a),Ce(u,Yo,x),Ce(u,Qr,y),mt(A,t.domain,_),Ce(A,Jo,_),Ce(A,Bc,_),mt(B,t.domain,_),mt(B,e,_),Ce(B,Jo,_);const $=[[Ac,Mc],[Tp,Ap],[Mp,Op],[Bp,Ip],[Rp,Lp],[Dp,Pp],[Vp,Fp],[$p,Hp]];for(let H=0;H<$.length;H++){const[X,ee]=$[H],z=Ce(_,X);Ce(T,X,z),Ce(z,ee,_);const L=Nr(nh);mt(z,e,L);const D=Nr();mt(z,n),mt(L,e,L),mt(L,n,D),mt(D,e,L),mt(D,n,D),Ce(L,ee,_),Ce(D,ee,_)}return Ce(i,Tc,k),Ce(i,Sb,HK),{start:i,tokens:M5}}function UK(t,e,n){let r=n.length,i=0,s=[],a=[];for(;i<r;){let l=t,u=null,c=null,f=0,p=null,m=-1;for(;i<r&&!(u=l.go(n[i].t));)a.push(n[i++]);for(;i<r&&(c=u||l.go(n[i].t));)u=null,l=c,l.accepts()?(m=0,p=l):m>=0&&m++,i++,f++;if(m<0)i-=f,i<r&&(a.push(n[i]),i++);else{a.length>0&&(s.push(Pb(P5,e,a)),a=[]),i-=m,f-=m;const g=p.t,b=n.slice(i-f,i);s.push(Pb(g,e,b))}}return a.length>0&&s.push(Pb(P5,e,a)),s}function Pb(t,e,n){const r=n[0].s,i=n[n.length-1].e,s=e.slice(r,i);return new t(s,n)}const WK=typeof console<"u"&&console&&console.warn||(()=>{}),jK="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",Jt={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function qK(){return pr.groups={},Jt.scanner=null,Jt.parser=null,Jt.tokenQueue=[],Jt.pluginQueue=[],Jt.customSchemes=[],Jt.initialized=!1,Jt}function V5(t,e=!1){if(Jt.initialized&&WK(`linkifyjs: already initialized - will not register custom scheme "${t}" ${jK}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(t))throw new Error(`linkifyjs: incorrect scheme format.
|
|
325
325
|
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
326
326
|
2. Cannot start or end with "-"
|
|
327
327
|
3. "-" cannot repeat`);Jt.customSchemes.push([t,e])}function KK(){Jt.scanner=FK(Jt.customSchemes);for(let t=0;t<Jt.tokenQueue.length;t++)Jt.tokenQueue[t][1]({scanner:Jt.scanner});Jt.parser=zK(Jt.scanner.tokens);for(let t=0;t<Jt.pluginQueue.length;t++)Jt.pluginQueue[t][1]({scanner:Jt.scanner,parser:Jt.parser});return Jt.initialized=!0,Jt}function Vb(t){return Jt.initialized||KK(),UK(Jt.parser.start,t,B5(Jt.scanner.start,t))}Vb.scan=B5;function F5(t,e=null,n=null){if(e&&typeof e=="object"){if(n)throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);n=e,e=null}const r=new Db(n),i=Vb(t),s=[];for(let a=0;a<i.length;a++){const l=i[a];l.isLink&&(!e||l.t===e)&&r.check(l)&&s.push(l.toFormattedObject(r))}return s}function GK(t){return t.length===1?t[0].isLink:t.length===3&&t[1].isLink?["()","[]"].includes(t[0].value+t[2].value):!1}function XK(t){return new ot({key:new kt("autolink"),appendTransaction:(e,n,r)=>{const i=e.some(c=>c.docChanged)&&!n.doc.eq(r.doc),s=e.some(c=>c.getMeta("preventAutolink"));if(!i||s)return;const{tr:a}=r,l=PO(n.doc,[...e]);if(HO(l).forEach(({newRange:c})=>{const f=t4(r.doc,c,g=>g.isTextblock);let p,m;if(f.length>1?(p=f[0],m=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):f.length&&r.doc.textBetween(c.from,c.to," "," ").endsWith(" ")&&(p=f[0],m=r.doc.textBetween(p.pos,c.to,void 0," ")),p&&m){const g=m.split(" ").filter(x=>x!=="");if(g.length<=0)return!1;const b=g[g.length-1],v=p.pos+m.lastIndexOf(b);if(!b)return!1;const y=Vb(b).map(x=>x.toObject(t.defaultProtocol));if(!GK(y))return!1;y.filter(x=>x.isLink).map(x=>({...x,from:v+x.start+1,to:v+x.end+1})).filter(x=>r.schema.marks.code?!r.doc.rangeHasMark(x.from,x.to,r.schema.marks.code):!0).filter(x=>t.validate(x.value)).filter(x=>t.shouldAutoLink(x.value)).forEach(x=>{P0(x.from,x.to,r.doc).some(k=>k.mark.type===t.type)||a.addMark(x.from,x.to,t.type.create({href:x.href}))})}}),!!a.steps.length)return a}})}function YK(t){return new ot({key:new kt("handleClickLink"),props:{handleClick:(e,n,r)=>{var i,s;if(r.button!==0||!e.editable)return!1;let a=r.target;const l=[];for(;a.nodeName!=="DIV";)l.push(a),a=a.parentNode;if(!l.find(m=>m.nodeName==="A"))return!1;const u=o4(e.state,t.type.name),c=r.target,f=(i=c==null?void 0:c.href)!==null&&i!==void 0?i:u.href,p=(s=c==null?void 0:c.target)!==null&&s!==void 0?s:u.target;return c&&f?(window.open(f,p),!0):!1}}})}function JK(t){return new ot({key:new kt("handlePasteLink"),props:{handlePaste:(e,n,r)=>{const{state:i}=e,{selection:s}=i,{empty:a}=s;if(a)return!1;let l="";r.content.forEach(c=>{l+=c.textContent});const u=F5(l,{defaultProtocol:t.defaultProtocol}).find(c=>c.isLink&&c.value===l);return!l||!u?!1:t.editor.commands.setMark(t.type,{href:u.href})}}})}const ZK=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g;function _a(t,e){const n=["http","https","ftp","ftps","mailto","tel","callto","sms","cid","xmpp"];return e&&e.forEach(r=>{const i=typeof r=="string"?r:r.scheme;i&&n.push(i)}),!t||t.replace(ZK,"").match(new RegExp(`^(?:(?:${n.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,"i"))}const QK=Un.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(t=>{if(typeof t=="string"){V5(t);return}V5(t.scheme,t.optionalSlashes)})},onDestroy(){qK()},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:(t,e)=>!!_a(t,e.protocols),validate:t=>!!t,shouldAutoLink:t=>!!t}},addAttributes(){return{href:{default:null,parseHTML(t){return t.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:t=>{const e=t.getAttribute("href");return!e||!this.options.isAllowedUri(e,{defaultValidate:n=>!!_a(n,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:t}){return this.options.isAllowedUri(t.href,{defaultValidate:e=>!!_a(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?["a",yt(this.options.HTMLAttributes,t),0]:["a",yt(this.options.HTMLAttributes,{...t,href:""}),0]},addCommands(){return{setLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_a(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().setMark(this.name,t).setMeta("preventAutolink",!0).run():!1},toggleLink:t=>({chain:e})=>{const{href:n}=t;return this.options.isAllowedUri(n,{defaultValidate:r=>!!_a(r,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?e().toggleMark(this.name,t,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run():!1},unsetLink:()=>({chain:t})=>t().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Ni({find:t=>{const e=[];if(t){const{protocols:n,defaultProtocol:r}=this.options,i=F5(t).filter(s=>s.isLink&&this.options.isAllowedUri(s.value,{defaultValidate:a=>!!_a(a,n),protocols:n,defaultProtocol:r}));i.length&&i.forEach(s=>e.push({text:s.value,data:{href:s.href},index:s.start}))}return e},type:this.type,getAttributes:t=>{var e;return{href:(e=t.data)===null||e===void 0?void 0:e.href}}})]},addProseMirrorPlugins(){const t=[],{protocols:e,defaultProtocol:n}=this.options;return this.options.autolink&&t.push(XK({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:r=>this.options.isAllowedUri(r,{defaultValidate:i=>!!_a(i,e),protocols:e,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),this.options.openOnClick===!0&&t.push(YK({type:this.type})),this.options.linkOnPaste&&t.push(JK({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type})),t}}),NK={class:"flex w-full max-w-sm items-center gap-1.5"},eG={class:"relative w-full max-w-sm items-center"},tG={class:"flex w-full max-w-sm items-center gap-1.5"},nG={class:"relative w-full max-w-sm items-center"},rG={class:"absolute start-0 inset-y-0 flex items-center justify-center px-2"},$5=o.defineComponent({__name:"LinkEditBlock",props:{editor:{}},emits:["onSetLink","onClickOutside"],setup(t,{emit:e}){const n=t,r=e,{t:i}=At();let s=o.reactive({text:"",link:""});const a=o.ref(null),{focused:l}=Ne.useFocus(a),u=o.ref(!0),c=o.ref(null);Ne.onClickOutside(c,m=>r("onClickOutside",m)),o.watchEffect(()=>{const{href:m,target:g}=n.editor.getAttributes("link"),{from:b,to:v}=n.editor.state.selection,y=n.editor.state.doc.textBetween(b,v," ");s={link:m,text:y}});function f(){const m=p(s.link);r("onSetLink",m,s.text,u.value)}function p(m){if(!m)return m;const g=m.trim();return/^https?:\/\//i.test(g)||/^[a-zA-Z][a-zA-Z0-9+.\-]*:/i.test(g)?g:"http://"+g}return o.onMounted(()=>{l.value=!0}),(m,g)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"target",ref:c,class:"p-2 bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 inside-toolbar"},[o.createElementVNode("form",{class:"flex flex-col gap-2",onSubmit:o.withModifiers(f,["prevent"])},[o.createVNode(o.unref(cc),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.text")),1)]),_:1}),o.createElementVNode("div",NK,[o.createElementVNode("div",eG,[o.createVNode(o.unref(bs),{modelValue:o.unref(s).text,"onUpdate:modelValue":g[0]||(g[0]=b=>o.unref(s).text=b),type:"text",required:"",placeholder:"텍스트"},null,8,["modelValue"])])]),o.createVNode(o.unref(cc),null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.link")),1)]),_:1}),o.createElementVNode("div",tG,[o.createElementVNode("div",nG,[o.createVNode(o.unref(bs),{ref_key:"inputRef",ref:a,modelValue:o.unref(s).link,"onUpdate:modelValue":g[1]||(g[1]=b=>o.unref(s).link=b),type:"text",required:"",class:"pl-10"},null,8,["modelValue"]),o.createElementVNode("span",rG,[o.createVNode(o.unref(Ot),{class:"size-5 text-ed-muted-foreground",name:"Link"})])])]),o.createVNode(o.unref(bn),{class:"mt-2 self-end"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.link.dialog.button.apply")),1)]),_:1})],32)],512))}}),oG=o.defineComponent({__name:"LinkEditPopover",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},isActive:{type:Function,default:void 0},action:{type:Function,default:void 0}},setup(t){const e=t;function n(r,i,s){e.action&&e.action({link:r,text:i,openInNewTab:s})}return(r,i)=>(o.openBlock(),o.createBlock(o.unref(ms),null,{default:o.withCtx(({open:s})=>[o.createVNode(o.unref(ga),{disabled:r.disabled},{default:o.withCtx(()=>[o.createVNode(Ge,{icon:r.icon,tooltip:r.tooltip,"is-active":r.isActive,"is-pressed":s,disabled:r.disabled},null,8,["icon","tooltip","is-active","is-pressed","disabled"])]),_:2},1032,["disabled"]),o.createVNode(o.unref(gs),{"as-child":"",class:"w-80",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{editor:r.editor,onOnSetLink:n},null,8,["editor"])]),_:1})]),_:1}))}}),Fb=QK.extend({inclusive:!1,parseHTML(){return[{tag:'a[href]:not([data-type="button"]):not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:t}){return["a",yt(this.options.HTMLAttributes,t,{class:"link"}),0]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),openOnClick:!0,button:({editor:e,t:n})=>({component:oG,componentProps:{action:r=>{const{link:i,text:s,openInNewTab:a}=r;e.chain().extendMarkRange("link").insertContent({type:"text",text:s,marks:[{type:"link",attrs:{href:i,target:a?"_blank":""}}]}).setLink({href:i}).focus().run()},isActive:()=>e.isActive("link")||!1,disabled:!e.can().setLink({href:""}),icon:"Link",tooltip:n("editor.link.tooltip")}})}},addProseMirrorPlugins(){return[new ot({props:{handleClick:(t,e)=>{const{schema:n,doc:r,tr:i}=t.state,s=Wd(r.resolve(e),n.marks.link);if(!s)return!1;const a=r.resolve(s.from),l=r.resolve(s.to),u=i.setSelection(new De(a,l));return t.dispatch(u),!0}}})]}}),iG=Dt.create({name:"horizontalRule",addOptions(){return{HTMLAttributes:{}}},group:"block",parseHTML(){return[{tag:"hr"}]},renderHTML({HTMLAttributes:t}){return["hr",yt(this.options.HTMLAttributes,t)]},addCommands(){return{setHorizontalRule:()=>({chain:t,state:e})=>{const{selection:n}=e,{$from:r,$to:i}=n,s=t();return r.parentOffset===0?s.insertContentAt({from:Math.max(r.pos-1,0),to:i.pos},{type:this.name}):i4(n)?s.insertContentAt(i.pos,{type:this.name}):s.insertContent({type:this.name}),s.command(({tr:a,dispatch:l})=>{var u;if(l){const{$to:c}=a.selection,f=c.end();if(c.nodeAfter)c.nodeAfter.isTextblock?a.setSelection(De.create(a.doc,c.pos+1)):c.nodeAfter.isBlock?a.setSelection(Pe.create(a.doc,c.pos)):a.setSelection(De.create(a.doc,c.pos));else{const p=(u=c.parent.type.contentMatch.defaultType)===null||u===void 0?void 0:u.create();p&&(a.insert(f,p),a.setSelection(De.create(a.doc,f+1)))}a.scrollIntoView()}return!0}).run()}}},addInputRules(){return[u4({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}).extend({renderHTML(){return["div",yt(this.options.HTMLAttributes,{"data-type":this.name}),["hr"]]},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,t:n})=>({component:Ge,componentProps:{action:()=>e.commands.setHorizontalRule(),disabled:!e.can().setHorizontalRule(),icon:"Minus",shortcutKeys:["mod","alt","S"],tooltip:n("editor.horizontalrule.tooltip")}})}},addKeyboardShortcuts(){return{"Mod-Alt-s":()=>this.editor.commands.setHorizontalRule()}}});var rh=200,Sn=function(){};Sn.prototype.append=function(e){return e.length?(e=Sn.from(e),!this.length&&e||e.length<rh&&this.leafAppend(e)||this.length<rh&&e.leafPrepend(this)||this.appendInner(e)):this},Sn.prototype.prepend=function(e){return e.length?Sn.from(e).append(this):this},Sn.prototype.appendInner=function(e){return new sG(this,e)},Sn.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Sn.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))},Sn.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Sn.prototype.forEach=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length),n<=r?this.forEachInner(e,n,r,0):this.forEachInvertedInner(e,n,r,0)},Sn.prototype.map=function(e,n,r){n===void 0&&(n=0),r===void 0&&(r=this.length);var i=[];return this.forEach(function(s,a){return i.push(e(s,a))},n,r),i},Sn.from=function(e){return e instanceof Sn?e:e&&e.length?new H5(e):Sn.empty};var H5=function(t){function e(r){t.call(this),this.values=r}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(i,s){return i==0&&s==this.length?this:new e(this.values.slice(i,s))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,s,a,l){for(var u=s;u<a;u++)if(i(this.values[u],l+u)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,a,l){for(var u=s-1;u>=a;u--)if(i(this.values[u],l+u)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=rh)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=rh)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Sn);Sn.empty=new H5([]);var sG=function(t){function e(n,r){t.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(r){return r<this.left.length?this.left.get(r):this.right.get(r-this.left.length)},e.prototype.forEachInner=function(r,i,s,a){var l=this.left.length;if(i<l&&this.left.forEachInner(r,i,Math.min(s,l),a)===!1||s>l&&this.right.forEachInner(r,Math.max(i-l,0),Math.min(this.length,s)-l,a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(r,i,s,a){var l=this.left.length;if(i>l&&this.right.forEachInvertedInner(r,i-l,Math.max(s,l)-l,a+l)===!1||s<l&&this.left.forEachInvertedInner(r,Math.min(i,l),s,a)===!1)return!1},e.prototype.sliceInner=function(r,i){if(r==0&&i==this.length)return this;var s=this.left.length;return i<=s?this.left.slice(r,i):r>=s?this.right.slice(r-s,i-s):this.left.slice(r,s).append(this.right.slice(0,i-s))},e.prototype.leafAppend=function(r){var i=this.right.leafAppend(r);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(r){var i=this.left.leafPrepend(r);if(i)return new e(i,this.right)},e.prototype.appendInner=function(r){return this.left.depth>=Math.max(this.right.depth,r.depth)+1?new e(this.left,new e(this.right,r)):new e(this,r)},e}(Sn);const aG=500;class ko{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,s;n&&(i=this.remapping(r,this.items.length),s=i.maps.length);let a=e.tr,l,u,c=[],f=[];return this.items.forEach((p,m)=>{if(!p.step){i||(i=this.remapping(r,m+1),s=i.maps.length),s--,f.push(p);return}if(i){f.push(new Zo(p.map));let g=p.step.map(i.slice(s)),b;g&&a.maybeStep(g).doc&&(b=a.mapping.maps[a.mapping.maps.length-1],c.push(new Zo(b,void 0,void 0,c.length+f.length))),s--,b&&i.appendMap(b,s)}else a.maybeStep(p.step);if(p.selection)return l=i?p.selection.map(i.slice(s)):p.selection,u=new ko(this.items.slice(0,r).append(f.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:u,transform:a,selection:l}}addTransform(e,n,r,i){let s=[],a=this.eventCount,l=this.items,u=!i&&l.length?l.get(l.length-1):null;for(let f=0;f<e.steps.length;f++){let p=e.steps[f].invert(e.docs[f]),m=new Zo(e.mapping.maps[f],p,n),g;(g=u&&u.merge(m))&&(m=g,f?s.pop():l=l.slice(0,l.length-1)),s.push(m),n&&(a++,n=void 0),i||(u=m)}let c=a-r.depth;return c>uG&&(l=lG(l,c),a-=c),new ko(l.append(s),a)}remapping(e,n){let r=new vu;return this.items.forEach((i,s)=>{let a=i.mirrorOffset!=null&&s-i.mirrorOffset>=e?r.maps.length-i.mirrorOffset:void 0;r.appendMap(i.map,a)},e,n),r}addMaps(e){return this.eventCount==0?this:new ko(this.items.append(e.map(n=>new Zo(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),s=e.mapping,a=e.steps.length,l=this.eventCount;this.items.forEach(m=>{m.selection&&l--},i);let u=n;this.items.forEach(m=>{let g=s.getMirror(--u);if(g==null)return;a=Math.min(a,g);let b=s.maps[g];if(m.step){let v=e.steps[g].invert(e.docs[g]),y=m.selection&&m.selection.map(s.slice(u+1,g));y&&l++,r.push(new Zo(b,v,y))}else r.push(new Zo(b))},i);let c=[];for(let m=n;m<a;m++)c.push(new Zo(s.maps[m]));let f=this.items.slice(0,i).append(c).append(r),p=new ko(f,l);return p.emptyItemCount()>aG&&(p=p.compress(this.items.length-r.length)),p}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),r=n.maps.length,i=[],s=0;return this.items.forEach((a,l)=>{if(l>=e)i.push(a),a.selection&&s++;else if(a.step){let u=a.step.map(n.slice(r)),c=u&&u.getMap();if(r--,c&&n.appendMap(c,r),u){let f=a.selection&&a.selection.map(n.slice(r));f&&s++;let p=new Zo(c.invert(),u,f),m,g=i.length-1;(m=i.length&&i[g].merge(p))?i[g]=m:i.push(p)}}else a.map&&r--},this.items.length,0),new ko(Sn.from(i.reverse()),s)}}ko.empty=new ko(Sn.empty,0);function lG(t,e){let n;return t.forEach((r,i)=>{if(r.selection&&e--==0)return n=i,!1}),t.slice(n)}class Zo{constructor(e,n,r,i){this.map=e,this.step=n,this.selection=r,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new Zo(n.getMap().invert(),n,this.selection)}}}class Ss{constructor(e,n,r,i,s){this.done=e,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=s}}const uG=20;function cG(t,e,n,r){let i=n.getMeta(Ta),s;if(i)return i.historyState;n.getMeta(pG)&&(t=new Ss(t.done,t.undone,null,0,-1));let a=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(a&&a.getMeta(Ta))return a.getMeta(Ta).redo?new Ss(t.done.addTransform(n,void 0,r,oh(e)),t.undone,z5(n.mapping.maps),t.prevTime,t.prevComposition):new Ss(t.done,t.undone.addTransform(n,void 0,r,oh(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(a&&a.getMeta("addToHistory")===!1)){let l=n.getMeta("composition"),u=t.prevTime==0||!a&&t.prevComposition!=l&&(t.prevTime<(n.time||0)-r.newGroupDelay||!dG(n,t.prevRanges)),c=a?$b(t.prevRanges,n.mapping):z5(n.mapping.maps);return new Ss(t.done.addTransform(n,u?e.selection.getBookmark():void 0,r,oh(e)),ko.empty,c,n.time,l??t.prevComposition)}else return(s=n.getMeta("rebased"))?new Ss(t.done.rebased(n,s),t.undone.rebased(n,s),$b(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new Ss(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),$b(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function dG(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((r,i)=>{for(let s=0;s<e.length;s+=2)r<=e[s+1]&&i>=e[s]&&(n=!0)}),n}function z5(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((r,i,s,a)=>e.push(s,a));return e}function $b(t,e){if(!t)return null;let n=[];for(let r=0;r<t.length;r+=2){let i=e.map(t[r],1),s=e.map(t[r+1],-1);i<=s&&n.push(i,s)}return n}function fG(t,e,n){let r=oh(e),i=Ta.get(e).spec.config,s=(n?t.undone:t.done).popEvent(e,r);if(!s)return null;let a=s.selection.resolve(s.transform.doc),l=(n?t.done:t.undone).addTransform(s.transform,e.selection.getBookmark(),i,r),u=new Ss(n?l:s.remaining,n?s.remaining:l,null,0,-1);return s.transform.setSelection(a).setMeta(Ta,{redo:n,historyState:u})}let Hb=!1,U5=null;function oh(t){let e=t.plugins;if(U5!=e){Hb=!1,U5=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Hb=!0;break}}return Hb}const Ta=new kt("history"),pG=new kt("closeHistory");function hG(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ot({key:Ta,state:{init(){return new Ss(ko.empty,ko.empty,null,0,-1)},apply(e,n,r){return cG(n,r,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let r=n.inputType,i=r=="historyUndo"?j5:r=="historyRedo"?q5:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function W5(t,e){return(n,r)=>{let i=Ta.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(r){let s=fG(i,n,t);s&&r(e?s.scrollIntoView():s)}return!0}}const j5=W5(!1,!0),q5=W5(!0,!0),mG=tt.create({name:"history",addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:t,dispatch:e})=>j5(t,e),redo:()=>({state:t,dispatch:e})=>q5(t,e)}},addProseMirrorPlugins(){return[hG(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),K5={HISTORY_TRANSACTION:"history$",ADD_TO_HISTORY_TRANSACTION:"addToHistory"},zb=mG.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),depth:10,button:({editor:e,t:n})=>["undo","redo"].map(i=>({component:Ge,componentProps:{action:()=>{i==="undo"&&e.commands.undo(),i==="redo"&&e.commands.redo()},shortcutKeys:i==="undo"?["mod","Z"]:["shift","mod","Z"],disabled:!e.can()[i](),icon:i==="undo"?"Undo2":"Redo2",tooltip:n(`editor.${i}.tooltip`)},buttonName:i}))}}}),{isFullscreen:Ub,toggleFullscreen:Wb}=wn(),gG=tt.create({name:"fullscreen",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{tooltip:Ub.value?r("editor.fullscreen.tooltip.exit"):r("editor.fullscreen.tooltip.fullscreen"),action:()=>Wb(),icon:Ub.value?"Minimize":"Maximize",isActive:()=>Ub.value}})}},addKeyboardShortcuts(){return{F11:()=>(Wb(),!0),"Mod-F11":()=>(Wb(),!0)}}}),bG=tt.create({name:"characterCount",addOptions(){return{limit:null,mode:"textSize",textCounter:t=>t.length,wordCounter:t=>t.split(" ").filter(e=>e!=="").length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc;if(((t==null?void 0:t.mode)||this.options.mode)==="textSize"){const r=e.textBetween(0,e.content.size,void 0," ");return this.options.textCounter(r)}return e.nodeSize},this.storage.words=t=>{const e=(t==null?void 0:t.node)||this.editor.state.doc,n=e.textBetween(0,e.content.size," "," ");return this.options.wordCounter(n)}},addProseMirrorPlugins(){let t=!1;return[new ot({key:new kt("characterCount"),appendTransaction:(e,n,r)=>{if(t)return;const i=this.options.limit;if(i==null||i===0){t=!0;return}const s=this.storage.characters({node:r.doc});if(s>i){const a=s-i,l=0,u=a;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);const c=r.tr.deleteRange(l,u);return t=!0,c}t=!0},filterTransaction:(e,n)=>{const r=this.options.limit;if(!e.docChanged||r===0||r===null||r===void 0)return!0;const i=this.storage.characters({node:n.doc}),s=this.storage.characters({node:e.doc});if(s<=r||i>r&&s>r&&s<=i)return!0;if(i>r&&s>r&&s>i||!e.getMeta("paste"))return!1;const l=e.selection.$head.pos,u=s-r,c=l-u,f=l;return e.deleteRange(c,f),!(this.storage.characters({node:e.doc})>r)}})]}});function vG(t={}){return new ot({view(e){return new yG(e,t)}})}class yG{constructor(e,n){var r;this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.width=(r=n.width)!==null&&r!==void 0?r:1,this.color=n.color===!1?void 0:n.color||"black",this.class=n.class,this.handlers=["dragover","dragend","drop","dragleave"].map(i=>{let s=a=>{this[i](a)};return e.dom.addEventListener(i,s),{name:i,handler:s}})}destroy(){this.handlers.forEach(({name:e,handler:n})=>this.editorView.dom.removeEventListener(e,n))}update(e,n){this.cursorPos!=null&&n.doc!=e.state.doc&&(this.cursorPos>e.state.doc.content.size?this.setCursor(null):this.updateOverlay())}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),n=!e.parent.inlineContent,r;if(n){let l=e.nodeBefore,u=e.nodeAfter;if(l||u){let c=this.editorView.nodeDOM(this.cursorPos-(l?l.nodeSize:0));if(c){let f=c.getBoundingClientRect(),p=l?f.bottom:f.top;l&&u&&(p=(p+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2),r={left:f.left,right:f.right,top:p-this.width/2,bottom:p+this.width/2}}}}if(!r){let l=this.editorView.coordsAtPos(this.cursorPos);r={left:l.left-this.width/2,right:l.left+this.width/2,top:l.top,bottom:l.bottom}}let i=this.editorView.dom.offsetParent;this.element||(this.element=i.appendChild(document.createElement("div")),this.class&&(this.element.className=this.class),this.element.style.cssText="position: absolute; z-index: 50; pointer-events: none;",this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle("prosemirror-dropcursor-block",n),this.element.classList.toggle("prosemirror-dropcursor-inline",!n);let s,a;if(!i||i==document.body&&getComputedStyle(i).position=="static")s=-pageXOffset,a=-pageYOffset;else{let l=i.getBoundingClientRect();s=l.left-i.scrollLeft,a=l.top-i.scrollTop}this.element.style.left=r.left-s+"px",this.element.style.top=r.top-a+"px",this.element.style.width=r.right-r.left+"px",this.element.style.height=r.bottom-r.top+"px"}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}dragover(e){if(!this.editorView.editable)return;let n=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),r=n&&n.inside>=0&&this.editorView.state.doc.nodeAt(n.inside),i=r&&r.type.spec.disableDropCursor,s=typeof i=="function"?i(this.editorView,n,e):i;if(n&&!s){let a=n.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let l=t3(this.editorView.state.doc,a,this.editorView.dragging.slice);l!=null&&(a=l)}this.setCursor(a),this.scheduleRemoval(5e3)}}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){(e.target==this.editorView.dom||!this.editorView.dom.contains(e.relatedTarget))&&this.setCursor(null)}}const wG=tt.create({name:"dropCursor",addOptions(){return{color:"currentColor",width:1,class:void 0}},addProseMirrorPlugins(){return[vG(this.options)]}}),xG=tt.create({name:"focus",addOptions(){return{className:"has-focus",mode:"all"}},addProseMirrorPlugins(){return[new ot({key:new kt("focus"),props:{decorations:({doc:t,selection:e})=>{const{isEditable:n,isFocused:r}=this.editor,{anchor:i}=e,s=[];if(!n||!r)return ut.create(t,[]);let a=0;this.options.mode==="deepest"&&t.descendants((u,c)=>{if(u.isText)return;if(!(i>=c&&i<=c+u.nodeSize-1))return!1;a+=1});let l=0;return t.descendants((u,c)=>{if(u.isText||!(i>=c&&i<=c+u.nodeSize-1))return!1;if(l+=1,this.options.mode==="deepest"&&a-l>0||this.options.mode==="shallowest"&&l>1)return this.options.mode==="deepest";s.push(Gt.node(c,c+u.nodeSize,{class:this.options.className}))}),ut.create(t,s)}}})]}});class an extends We{constructor(e){super(e,e)}map(e,n){let r=e.resolve(n.map(this.head));return an.valid(r)?new an(r):We.near(r)}content(){return Se.empty}eq(e){return e instanceof an&&e.head==this.head}toJSON(){return{type:"gapcursor",pos:this.head}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for GapCursor.fromJSON");return new an(e.resolve(n.pos))}getBookmark(){return new jb(this.anchor)}static valid(e){let n=e.parent;if(n.isTextblock||!CG(e)||!kG(e))return!1;let r=n.type.spec.allowGapCursor;if(r!=null)return r;let i=n.contentMatchAt(e.index()).defaultType;return i&&i.isTextblock}static findGapCursorFrom(e,n,r=!1){e:for(;;){if(!r&&an.valid(e))return e;let i=e.pos,s=null;for(let a=e.depth;;a--){let l=e.node(a);if(n>0?e.indexAfter(a)<l.childCount:e.index(a)>0){s=l.child(n>0?e.indexAfter(a):e.index(a)-1);break}else if(a==0)return null;i+=n;let u=e.doc.resolve(i);if(an.valid(u))return u}for(;;){let a=n>0?s.firstChild:s.lastChild;if(!a){if(s.isAtom&&!s.isText&&!Pe.isSelectable(s)){e=e.doc.resolve(i+s.nodeSize*n),r=!1;continue e}break}s=a,i+=n;let l=e.doc.resolve(i);if(an.valid(l))return l}return null}}}an.prototype.visible=!1,an.findFrom=an.findGapCursorFrom,We.jsonID("gapcursor",an);class jb{constructor(e){this.pos=e}map(e){return new jb(e.map(this.pos))}resolve(e){let n=e.resolve(this.pos);return an.valid(n)?new an(n):We.near(n)}}function CG(t){for(let e=t.depth;e>=0;e--){let n=t.index(e),r=t.node(e);if(n==0){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n-1);;i=i.lastChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function kG(t){for(let e=t.depth;e>=0;e--){let n=t.indexAfter(e),r=t.node(e);if(n==r.childCount){if(r.type.spec.isolating)return!0;continue}for(let i=r.child(n);;i=i.firstChild){if(i.childCount==0&&!i.inlineContent||i.isAtom||i.type.spec.isolating)return!0;if(i.inlineContent)return!1}}return!0}function EG(){return new ot({props:{decorations:AG,createSelectionBetween(t,e,n){return e.pos==n.pos&&an.valid(n)?new an(n):null},handleClick:_G,handleKeyDown:SG,handleDOMEvents:{beforeinput:TG}}})}const SG=k0({ArrowLeft:ih("horiz",-1),ArrowRight:ih("horiz",1),ArrowUp:ih("vert",-1),ArrowDown:ih("vert",1)});function ih(t,e){const n=t=="vert"?e>0?"down":"up":e>0?"right":"left";return function(r,i,s){let a=r.selection,l=e>0?a.$to:a.$from,u=a.empty;if(a instanceof De){if(!s.endOfTextblock(n)||l.depth==0)return!1;u=!1,l=r.doc.resolve(e>0?l.after():l.before())}let c=an.findGapCursorFrom(l,e,u);return c?(i&&i(r.tr.setSelection(new an(c))),!0):!1}}function _G(t,e,n){if(!t||!t.editable)return!1;let r=t.state.doc.resolve(e);if(!an.valid(r))return!1;let i=t.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&Pe.isSelectable(t.state.doc.nodeAt(i.inside))?!1:(t.dispatch(t.state.tr.setSelection(new an(r))),!0)}function TG(t,e){if(e.inputType!="insertCompositionText"||!(t.state.selection instanceof an))return!1;let{$from:n}=t.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(t.state.schema.nodes.text);if(!r)return!1;let i=be.empty;for(let a=r.length-1;a>=0;a--)i=be.from(r[a].createAndFill(null,i));let s=t.state.tr.replace(n.pos,n.pos,new Se(i,0,0));return s.setSelection(De.near(s.doc.resolve(n.pos+1))),t.dispatch(s),!1}function AG(t){if(!(t.selection instanceof an))return null;let e=document.createElement("div");return e.className="ProseMirror-gapcursor",ut.create(t.doc,[Gt.widget(t.selection.head,e,{key:"gapcursor"})])}const MG=tt.create({name:"gapCursor",addProseMirrorPlugins(){return[EG()]},extendNodeSchema(t){var e;const n={name:t.name,options:t.options,storage:t.storage};return{allowGapCursor:(e=pt($e(t,"allowGapCursor",n)))!==null&&e!==void 0?e:null}}}),G5=Dt.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:t}){return["br",yt(this.options.HTMLAttributes,t)]},renderText(){return`
|
|
328
|
-
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:f})=>{if(f&&u&&a){const p=u.filter(m=>l.includes(m.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),OG=Dt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),X5=Dt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Y5=tt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ot({key:new kt("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&Jd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=Gt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),ut.create(t,i)}}})]}}),J5=Dt.create({name:"text",group:"inline"}),BG=sK.extend({addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),removeEmptyTextStyle:()=>({tr:e})=>{const{selection:n}=e;return e.doc.nodesBetween(n.from,n.to,(r,i)=>{r.isInline&&(r.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(a=>!!a))||e.removeMark(i,i+r.nodeSize,this.type))}),!0}}}}),Z5=Dt.create({name:"doc",topNode:!0,content:"block+"}),Q5=Z5.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),N5=tt.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new ot({key:new kt("selection"),props:{decorations(e){return e.selection.empty?null:ut.create(e.doc,[Gt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),IG=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,i)=>({type:`video-${r}`,component:Ge,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[i],action:()=>t.commands.updateVideo({width:lf[r]}),isActive:()=>t.isActive("video",{width:lf[r]})}}))},RG=t=>[...IG(t),{type:"remove",component:Ge,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;ol(e,n)}}}],LG=(t,e,{editor:n,extension:r,t:i})=>{const{extensions:s=[]}=n.extensionManager,a={};for(const l of Object.keys(t)){const u=t[l];if(!u)continue;const c=[];for(const m of u){if(m==="divider"){const v=c[c.length-1];if((v==null?void 0:v.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(v=>v.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?i(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(v=>v.name===m);if(b){const{button:v}=b.options,y=v({editor:n,extension:b,t:i});c.push({type:m,component:y.component,componentProps:y.componentProps,componentSlots:y.componentSlots});continue}}const f=c[c.length-1],p=c[0];(f==null?void 0:f.type)==="divider"&&c.pop(),(p==null?void 0:p.type)==="divider"&&c.shift(),a[l]=c}return a},DG=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),PG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var qb;const VG=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),FG=(qb=String.fromCodePoint)!==null&&qb!==void 0?qb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function $G(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=VG.get(t))!==null&&e!==void 0?e:t}var _n;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(_n||(_n={}));const HG=32;var _s;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(_s||(_s={}));function Kb(t){return t>=_n.ZERO&&t<=_n.NINE}function zG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_F||t>=_n.LOWER_A&&t<=_n.LOWER_F}function UG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_Z||t>=_n.LOWER_A&&t<=_n.LOWER_Z||Kb(t)}function WG(t){return t===_n.EQUALS||UG(t)}var Tn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Tn||(Tn={}));var Ts;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Ts||(Ts={}));class jG{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ts.Strict}startEntity(e){this.decodeMode=e,this.state=Tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Tn.EntityStart:return e.charCodeAt(n)===_n.NUM?(this.state=Tn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Tn.NamedEntity,this.stateNamedEntity(e,n));case Tn.NumericStart:return this.stateNumericStart(e,n);case Tn.NumericDecimal:return this.stateNumericDecimal(e,n);case Tn.NumericHex:return this.stateNumericHex(e,n);case Tn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|HG)===_n.LOWER_X?(this.state=Tn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Tn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i)||zG(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_n.SEMI)this.consumed+=1;else if(this.decodeMode===Ts.Strict)return 0;return this.emitCodePoint($G(this.result),this.consumed),this.errors&&(e!==_n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&_s.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=qG(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Ts.Attribute&&(s===0||WG(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&_s.VALUE_LENGTH)>>14,s!==0){if(a===_n.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ts.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&_s.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~_s.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Tn.NamedEntity:return this.result!==0&&(this.decodeMode!==Ts.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Tn.NumericDecimal:return this.emitNumericEntity(0,2);case Tn.NumericHex:return this.emitNumericEntity(0,3);case Tn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Tn.EntityStart:return 0}}}function ek(t){let e="";const n=new jG(t,r=>e+=FG(r));return function(i,s){let a=0,l=0;for(;(l=i.indexOf("&",l))>=0;){e+=i.slice(a,l),n.startEntity(s);const c=n.write(i,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+i.slice(a);return e="",u}}function qG(t,e,n,r){const i=(e&_s.BRANCH_LENGTH)>>7,s=e&_s.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:t[n+u]-1}let a=n,l=a+i-1;for(;a<=l;){const u=a+l>>>1,c=t[u];if(c<r)a=u+1;else if(c>r)l=u-1;else return t[u+i]}return-1}const KG=ek(DG);ek(PG);function GG(t,e=Ts.Legacy){return KG(t,e)}var nn;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(nn||(nn={}));var eo;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(eo||(eo={}));const tk=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,XG=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,YG=new Map([[126,eo.Element],[94,eo.Start],[36,eo.End],[42,eo.Any],[33,eo.Not],[124,eo.Hyphen]]),JG=new Set(["has","not","matches","is","where","host","host-context"]);function ZG(t){switch(t.type){case nn.Adjacent:case nn.Child:case nn.Descendant:case nn.Parent:case nn.Sibling:case nn.ColumnCombinator:return!0;default:return!1}}const QG=new Set(["contains","icontains"]);function NG(t,e,n){const r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Dc(t){return t.replace(XG,NG)}function Gb(t){return t===39||t===34}function nk(t){return t===32||t===9||t===10||t===12||t===13}function eX(t){const e=[],n=rk(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function rk(t,e,n){let r=[];function i(m){const g=e.slice(n+m).match(tk);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,Dc(b)}function s(m){for(n+=m;n<e.length&&nk(e.charCodeAt(n));)n++}function a(){n+=1;const m=n;let g=1;for(;g>0&&n<e.length;n++)e.charCodeAt(n)===40&&!l(n)?g++:e.charCodeAt(n)===41&&!l(n)&&g--;if(g)throw new Error("Parenthesis not matched");return Dc(e.slice(m,n-1))}function l(m){let g=0;for(;e.charCodeAt(--m)===92;)g++;return(g&1)===1}function u(){if(r.length>0&&ZG(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===nn.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:nn.Attribute,name:m,action:g,value:i(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===nn.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(s(0),e.length===n)return n;e:for(;n<e.length;){const m=e.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==nn.Descendant)&&(u(),r.push({type:nn.Descendant})),s(1);break}case 62:{c(nn.Child),s(1);break}case 60:{c(nn.Parent),s(1);break}case 126:{c(nn.Sibling),s(1);break}case 43:{c(nn.Adjacent),s(1);break}case 46:{f("class",eo.Element);break}case 35:{f("id",eo.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=i(1):e.startsWith("*|",n)?(b="*",g=i(2)):(g=i(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=i(1))),s(0);let v=eo.Exists;const y=YG.get(e.charCodeAt(n));if(y){if(v=y,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(v=eo.Equals,s(1));let x="",k=null;if(v!=="exists"){if(Gb(e.charCodeAt(n))){const _=e.charCodeAt(n);let T=n+1;for(;T<e.length&&(e.charCodeAt(T)!==_||l(T));)T+=1;if(e.charCodeAt(T)!==_)throw new Error("Attribute value didn't end");x=Dc(e.slice(n+1,T)),n=T+1}else{const _=n;for(;n<e.length&&(!nk(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=Dc(e.slice(_,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(k=!1,s(1)):C===105&&(k=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const E={type:nn.Attribute,name:g,action:v,value:x,namespace:b,ignoreCase:k};r.push(E);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:nn.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=i(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(JG.has(g)){if(Gb(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=rk(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),QG.has(g)){const v=b.charCodeAt(0);v===b.charCodeAt(b.length-1)&&Gb(v)&&(b=b.slice(1,-1))}b=Dc(b)}r.push({type:nn.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const v=e.indexOf("*/",n+2);if(v<0)throw new Error("Comment was not terminated");n=v+2,r.length===0&&s(0);break}let g=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",e.charCodeAt(n+1)===124){c(nn.ColumnCombinator),s(2);break}}else if(tk.test(e.slice(n)))b=i(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=i(1)),r.push(b==="*"?{type:nn.Universal,namespace:g}:{type:nn.Tag,name:b,namespace:g})}}}return p(),n}function Xb(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var ok=t=>GG(t);function tX(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let i=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),i=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&i){const a=s;for(let[l,u]of Object.entries(n)){l=l.toString();const c=l.toLowerCase();c==="classname"?a.className=u:c==="on"?Object.entries(u).forEach(([f,p])=>{a.setAttribute(`on${f}`,String(p))}):u!==!1&&u!=null&&(u===!0?a.setAttribute(l,l):a.setAttribute(l,u.toString()))}}if(r)for(const a of r){const l=Array.isArray(a)?[...a]:[a];for(const u of l)u&&u!==!1&&u!=null&&(typeof u!="object"?s.appendChild(t.document.createTextNode(u.toString())):s.appendChild(u))}return s}}function ik(t,e,...n){return typeof t=="object"&&(t="fragment",n=t.children,e=t.attrs),Array.isArray(e)?(n=[e],e={}):e?e.attrs&&(e={...e.attrs,...e},delete e.attrs):e={},{tag:t,attrs:e,children:typeof n[0]=="string"?n:n.flat(Number.POSITIVE_INFINITY)}}function nX(t){return t.h=function(n,r,...i){const{tag:s,attrs:a,children:l}=ik(n,r,i);return tX(t,s,a,l)},t.h}var sk={};function rX(t){let e=sk[t];return e==null&&(e=eX(t),sk[t]=e),e}function oX(t,e,{debug:n=!1}={}){for(const r of rX(t)){const i=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:v,value:y,_ignoreCase:x=!0,data:k}=m;if(g==="attribute")v==="equals"?l=s.getAttribute(b)===y:v==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(y)):v==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(y)):v==="element"?b==="class"?l=s.classList.contains(y):l=!!((f=s.getAttribute(b))!=null&&f.includes(y)):v==="exists"?l=s.hasAttribute(b):v==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(y)):console.warn("Unknown CSS selector action",v);else if(g==="tag")l=s.tagName===b.toUpperCase();else if(g==="universal")l=!0;else if(g==="pseudo"){if(b==="not"){let E=!0;k.forEach(C=>{i(s,C)||(E=!1)}),l=!E}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(i(e,r))return!0}return!1}var iX=Symbol.for("nodejs.util.inspect.custom"),ak={fontWeight:"bold"},lk={fontStyle:"italic"},uk={backgroundColor:"rgb(255, 250, 165)"},ck={textDecorations:"underline"},Yb={textDecorations:"line-through"},sX={b:ak,strong:ak,em:lk,i:lk,mark:uk,u:ck,a:ck,s:Yb,del:Yb,ins:uk,strike:Yb};function dk(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var Ti=class Am{constructor(){this.append=this.appendChild,this._parentNode=null,this._childNodes=[]}get nodeType(){return console.error("Subclasses should define nodeType!"),0}get nodeName(){return console.error("Subclasses should define nodeName!"),""}get nodeValue(){return null}cloneNode(e=!1){const n=new this.constructor;return e&&(n._childNodes=this._childNodes.map(r=>r.cloneNode(!0)),n._fixChildNodesParent()),n}_fixChildNodesParent(){this._childNodes.forEach(e=>e._parentNode=this)}insertBefore(e,n){if(e!==n){let r=n?this._childNodes.indexOf(n):0;r<0&&(r=0),this._childNodes.splice(r,0,e),this._fixChildNodesParent()}}appendChild(e){if(e!=null){if(e===this){console.warn("Cannot appendChild to self");return}if(e instanceof Zb&&console.warn("No defined how to append a document to a node!",e),e instanceof Jb)for(const n of[...e._childNodes])this.appendChild(n);else if(Array.isArray(e))for(const n of[...e])this.appendChild(n);else if(e instanceof Am)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new Ul(n))}catch(n){console.error(`The data ${e} to be added to ${this.render()} is problematic: ${n}`)}this._fixChildNodesParent()}}removeChild(e){const n=this._childNodes.indexOf(e);n>=0&&(e._parentNode=null,this._childNodes.splice(n,1),this._fixChildNodesParent())}remove(){var e;return(e=this==null?void 0:this.parentNode)==null||e.removeChild(this),this}replaceChildren(...e){this._childNodes=e.map(n=>typeof n=="string"?new Ul(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(i=>typeof i=="string"?new Ul(i):i.remove()),n._childNodes.splice(r,1,...e),this._parentNode=null,n._fixChildNodesParent())}}_indexInParent(){return this._parentNode?this._parentNode.childNodes.indexOf(this):-1}get parentNode(){return this._parentNode}get childNodes(){return this._childNodes||[]}get children(){return this._childNodes||[]}get firstChild(){return this._childNodes[0]}get lastChild(){return this._childNodes[this._childNodes.length-1]}get nextSibling(){const e=this._indexInParent();return e!=null&&this.parentNode.childNodes[e+1]||null}get previousSibling(){const e=this._indexInParent();return e>0&&this.parentNode.childNodes[e-1]||null}flatten(){const e=[];this instanceof Eo&&e.push(this);for(const n of this._childNodes)e.push(...n.flatten());return e}flattenNodes(){const e=[];e.push(this);for(const n of this._childNodes)e.push(...n.flattenNodes());return e}render(){return""}get textContent(){return this._childNodes.map(e=>e.textContent).join("")}set textContent(e){this._childNodes=[],e&&this.appendChild(new Ul(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===Am.DOCUMENT_NODE||this.nodeType===Am.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[iX](){return`${this.constructor.name} "${this.render()}"`}};Ti.ELEMENT_NODE=1,Ti.TEXT_NODE=3,Ti.CDATA_SECTION_NODE=4,Ti.PROCESSING_INSTRUCTION_NODE=7,Ti.COMMENT_NODE=8,Ti.DOCUMENT_NODE=9,Ti.DOCUMENT_TYPE_NODE=10,Ti.DOCUMENT_FRAGMENT_NODE=11;var As=Ti,Ul=class extends As{get nodeType(){return As.TEXT_NODE}get nodeName(){return"#text"}get nodeValue(){return this._text||""}get textContent(){return this.nodeValue}constructor(t=""){super(),this._text=t}render(){var e;const t=(e=this.parentNode)==null?void 0:e.tagName;return t==="SCRIPT"||t==="STYLE"?this._text:Xb(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},fk=class extends As{getElementById(t){return this.flatten().find(e=>e._attributes.id===t)}getElementsByClassName(t){return this.flatten().filter(e=>e.classList.contains(t))}matches(t){return oX(t,this)}querySelectorAll(t){return this.flatten().filter(e=>e.matches(t))}querySelector(t){return this.flatten().find(e=>e.matches(t))}parent(t){var e;return this.matches(t)?this:this.parentNode==null?null:(e=this.parentNode)==null?void 0:e.parent(t)}handle(t,e){let n=0;for(const r of this.querySelectorAll(t))e(r,n++)}},Eo=class extends fk{get nodeType(){return As.ELEMENT_NODE}get nodeName(){return this._nodeName}constructor(t="div",e={}){super(),this._originalTagName=t,this._nodeName=(t||"").toUpperCase(),this._attributes=e||{}}cloneNode(t=!1){const e=super.cloneNode(t);return e._originalTagName=this._originalTagName,e._nodeName=this._nodeName,e._attributes=Object.assign({},this._attributes),e}get attributes(){return Object.entries(this._attributes).map(([t,e])=>({name:t,value:e}))}get attributesObject(){return{...this._attributes}}_findAttributeName(t){const e=t.toLowerCase();return Object.keys(this._attributes).find(n=>e===n.toLowerCase())||null}setAttribute(t,e){this.removeAttribute(t),this._attributes[t]=e,this._styles=void 0,this._dataset=void 0}getAttribute(t){const e=this._findAttributeName(t),n=e?this._attributes[e]:null;return n==null?null:typeof n=="string"?n:""}removeAttribute(t){this._findAttributeName(String(t))&&delete this._attributes[t]}hasAttribute(t){const e=this._findAttributeName(t);return e?this._attributes[e]!=null:!1}get style(){if(this._styles==null){const t={};let e=0;const n=this.getAttribute("style");if(n){let r;const i=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=i.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[dk(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...sX[this.tagName.toLowerCase()],...t}}return this._styles}get dataset(){if(this._dataset==null){const t={};for(const[e,n]of Object.entries(this._attributes))e.startsWith("data-")&&(t[e.slice(5)]=n,t[dk(e.slice(5))]=n);this._dataset=t}return this._dataset}get tagName(){return this._nodeName}setTagName(t){this._nodeName=t.toUpperCase()}get id(){return this._attributes.id||null}set id(t){t==null?delete this._attributes.id:this._attributes.id=t}get src(){return this._attributes.src}set src(t){t==null?delete this._attributes.src:this._attributes.src=t}getElementsByTagName(t){t=t.toUpperCase();const e=this.flatten();return t!=="*"?e.filter(n=>n.tagName===t):e}setInnerHTML(t){}get innerHTML(){return this._childNodes.map(t=>t.render(sh)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(ah)}get className(){return this._attributes.class||""}set className(t){Array.isArray(t)?t=t.filter(e=>!!e).join(" "):typeof t=="object"&&(t=Object.entries(t).filter(([e,n])=>!!n).map(([e,n])=>e).join(" ")),this._attributes.class=t}get classList(){const t=String(this.className??"").trim().split(/\s+/g)||[];return{contains(e){return t.includes(e)},add:e=>{t.includes(e)||(t.push(e),this.className=t)},remove:e=>{const n=t.indexOf(e);n>=0&&(t.splice(n,1),this.className=t)}}}render(t=ah){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},pk=class K9 extends As{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return K9.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Jb=class G9 extends fk{get nodeType(){return As.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=ah){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(sh)).join("")}createElement(e,n={}){return new Eo(e,n)}createDocumentFragment(){return new G9}createTextNode(e){return new Ul(e)}},Zb=class extends Jb{get nodeType(){return As.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=ah){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},hk=class extends Zb{constructor(t=!1){if(super(),this.docType=new pk,!t){const e=new Eo("html"),n=new Eo("body"),r=new Eo("head"),i=new Eo("title");e.appendChild(r),r.appendChild(i),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new Eo("html"),this.appendChild(e)),t=new Eo("body"),e.appendChild(e)}return t}get title(){var t;return((t=this.querySelector("title"))==null?void 0:t.textContent)||""}set title(t){const e=this.querySelector("title");e&&(e.textContent=t)}get head(){let t=this.querySelector("head");if(!t){let e=this.querySelector("html");e||(e=new Eo("html"),this.appendChild(e)),t=new Eo("head"),e.insertBefore(e)}return t}};function aX(){return new Zb}function lX(){return new hk}var mk=aX();nX({document:mk});var uX={},cX=uX.hasOwnProperty;function gk(t,e){return cX.call(t,e)}var bk=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function vk(t,e,n={},r){const i=!(typeof r=="string"&&r===""||Array.isArray(r)&&(r.length===0||r.length===1&&r[0]==="")||r==null),s=[];if(e=e.replace(/__/g,":"),e!=="noop"&&e!==""){e!=="cdata"?s.push(`<${e}`):s.push("<![CDATA[");for(let a in n)if(a&&gk(n,a)){const l=n[a];if(a==="html")continue;a.toLowerCase()==="classname"&&(a="class"),a=a.replace(/__/g,":"),l===!0?s.push(` ${a}`):a==="style"&&typeof l=="object"?s.push(` ${a}="${Object.keys(l).filter(u=>l[u]!=null).map(u=>{let c=l[u];return c=typeof c=="number"?`${c}px`:c,`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${c}`}).join(";")}"`):l!==!1&&l!=null&&s.push(` ${a}="${Xb(l.toString())}"`)}if(e!=="cdata"){if(t&&!i)return s.push(" />"),s.join("");s.push(">")}if(!t&&bk.includes(e))return s.join("")}if(i){if(typeof r=="string")s.push(r);else if(r&&r.length>0){for(let a of r)if(a!=null&&a!==!1){Array.isArray(a)||(a=[a]);for(const l of a)l.startsWith("<")&&l.endsWith(">")||e==="script"||e==="style"?s.push(l):s.push(Xb(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function sh(t,e,...n){const{tag:r,attrs:i,children:s}=ik(t,e,n);return vk(!1,r,i,s)}var ah=vk.bind(null,!1);sh.firstLine="<!DOCTYPE html>",sh.html=!0;var dX=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,fX=/^<\/([^>\s]+)[^>]*>/m,pX=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,hX=/\s*\/\s*>\s*$/m,mX=class{constructor(t={}){this.attrRe=dX,this.endTagRe=fX,this.startTagRe=pX,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,i;for(;t.length;){if(t.substring(0,4)==="<!--")n=t.indexOf("-->"),n!==-1?(this.scanner.comment(t.substring(4,n)),t=t.substring(n+3),e=!1):e=!0;else if(t.substring(0,2)==="</")r=this.endTagRe.exec(t),r?(t=RegExp.rightContext,e=!1,this.parseEndTag(RegExp.lastMatch,r[1])):e=!0;else if(t.charAt(0)==="<")if(r=this.startTagRe.exec(t),r){t=RegExp.rightContext,e=!1;const s=this.parseStartTag(RegExp.lastMatch,r[1],r);(s==="script"||s==="style")&&(n=t.search(new RegExp(`</${s}`,"i")),n!==-1?(this.scanner.characters(t.substring(0,n)),t=t.substring(n),e=!1):e=!0)}else e=!0;if(e){n=t.indexOf("<");let s=n;n===0&&(n=t.substring(1).indexOf("<"),s=s+1),n===-1?(i=t,t=""):(i=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(i))&&this.scanner.characters(i)}e=!0,r=null}}parseStartTag(t,e,n){const r=hX.test(t);let i=n[2];r&&(i=i.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,i);return this.scanner.startElement(e,s,r,n[0]),e.toLocaleLowerCase()}parseEndTag(t,e){this.scanner.endElement(e)}parseAttributes(t,e){const n={};return e.replace(this.attrRe,(...r)=>{const[i,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function gX(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new hk(!0):new Jb,n=[e];return new mX({scanner:{startElement(i,s,a){if(i.toLowerCase()==="!doctype"){e.docType=new pk;return}for(const c in s)if(gk(s,c)){const f=s[c];typeof f=="string"&&(s[c]=ok(f))}const u=n[n.length-1];if(u){const c=mk.createElement(i,s);u.appendChild(c),bk.includes(i.toLowerCase())||a||n.push(c)}},endElement(i){n.pop()},characters(i){var a;i=ok(i);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===As.TEXT_NODE?s.lastChild._text+=i:s&&s.appendChild(new Ul(i))},comment(i){}}}).parse(t),e}Eo.prototype.setInnerHTML=function(t){const e=gX(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function bX(t,e,n){return $r.fromSchema(e).serializeFragment(t.content,{document:lX()}).render()}function vX(t,e){const n=Fr.fromJSON(e,t);return bX(n,e)}function yX(t,e){const n=document.getElementById(t.attrs.id)??Qb.getElementById(t.attrs.id);if(!n)return null;const r=yk(n),{lastChild:i}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!i)return!1;i.isText&&a.push(e.text("gg"));const l=vX(wX(t.type.create(t.attrs,a,t.marks)),e);return CX(l,t.attrs.id,!1)>r}function wX(t){return{type:"doc",content:[t.toJSON()]}}let xX=null,Qb=null;const Nb=new Map;function CX(t,e,n=!0){if(n&&Nb.has(t))return Nb.get(t);const r=Qb.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const i=Qb.getElementById(e),{height:s}=yk(i);return r.innerHTML=" ",n&&Nb.set(t,s),s}return 0}function yk(t){const e=window.getComputedStyle(t)||xX.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),i=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:i,height:i+t.offsetHeight+parseFloat(e.borderWidth)}}function ev(){return Zr(10)}const tv=o.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(pP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),nv=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(mP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("z-50 min-w-32 overflow-hidden rounded-md border bg-ed-popover p-1 text-ed-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rv=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(bP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.inset&&"pl-8",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),ov=o.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=er(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(hP),o.normalizeProps(o.guardReactiveProps(o.unref(n))),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),Pc=o.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(rD),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),Vc=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},isOverlayTransparent:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:o.normalizeClass(o.unref(Ee)("fixed inset-0 z-[60] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a.isOverlayTransparent&&"bg-transparent"))},null,8,["class"]),o.createVNode(o.unref(_D),o.mergeProps(o.unref(s),{class:o.unref(Ee)("fixed left-1/2 top-1/2 z-[60] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-ed-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),iv=o.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),lh=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(OD),o.mergeProps(o.unref(r),{class:o.unref(Ee)("text-sm text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),uh=o.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),ch=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(AD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dh=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(MD),o.mergeProps(o.unref(r),{class:o.unref(Ee)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),kX={class:"sr-only"},EX={class:"m-2.5 p-2.5 space-y-2.5 flex items-center gap-x-2"},SX=o.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean},title:{default:"확인"},message:{default:""},confirmText:{default:"확인"},closeText:{default:"Close"},iconName:{default:void 0}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,{t:i}=At(),s=wn(),a=o.computed(()=>n.message||i(s.textAlert.value||"editor.alert")),l=o.reactive({x:0,y:0}),u=o.ref(!1),c={x:0,y:0},f=()=>{r("close")},p=b=>{u.value=!0,c.x=b.clientX-l.x,c.y=b.clientY-l.y,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},m=b=>{u.value&&(l.x=b.clientX-c.x,l.y=b.clientY-c.y)},g=()=>{u.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)};return o.watch(()=>n.open,async b=>{if(b){await o.nextTick();const v=document.querySelector(".draggable-dialog");if(v){const{width:y,height:x}=v.getBoundingClientRect(),k=window.innerWidth,E=window.innerHeight;l.x=(k-y)/2+250,l.y=(E-x)/2-50}}},{immediate:!0}),o.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,v)=>{const y=dh,x=ch,k=uh,E=lh,C=iv,_=Vc,T=Pc;return o.openBlock(),o.createBlock(T,{open:b.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(_,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":"",onOpenAutoFocus:v[0]||(v[0]=A=>{A.preventDefault()})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({transform:`translate(${o.unref(l).x}px, ${o.unref(l).y}px)`,top:"0px",left:"0px"})},[o.createVNode(k,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(p,["prevent"])},{default:o.withCtx(()=>[o.createVNode(y,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.title),1)]),_:1}),o.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",kX,o.toDisplayString(n.closeText),1)]),_:1})]),_:1}),o.createVNode(E),o.createElementVNode("div",EX,[b.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:b.iconName,class:"w-8 h-8 text-blue-500"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(o.unref(a)),1)]),o.createVNode(C,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(bn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.confirmText),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}}),_X={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},TX=o.defineComponent({__name:"BulkSpellCheckerFail",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",_X,[o.createVNode(o.unref(Dq),{class:"h-12 w-12 text-red-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 검사에 실패했습니다",-1)),n[1]||(n[1]=o.createElementVNode("p",{class:"text-xs font-normal text-gray-600 dark:text-gray-400"},"다시 검사하기 버튼을 눌러 재시도 해주세요",-1))]))}}),AX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},MX=o.defineComponent({__name:"BulkSpellCheckerNotWrongWord",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",AX,[o.createVNode(o.unref(Pq),{class:"h-12 w-12 text-blue-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 오류가 없습니다",-1))]))}}),OX={class:"relative"},BX=["innerHTML"],IX={class:"border-b border-gray-500"},RX=o.defineComponent({__name:"BulkSpellCheckerHelpText",props:{text:{}},setup(t){const e=o.ref(!1),n=o.ref(!1),r=o.ref(null);function i(){e.value=!e.value}return o.onMounted(async()=>{await o.nextTick(),r.value&&r.value.scrollHeight>32&&(n.value=!0)}),(s,a)=>(o.openBlock(),o.createElementBlock("div",OX,[o.createElementVNode("div",{ref_key:"helpRef",ref:r,class:o.normalizeClass(["text-gray-700 dark:text-gray-400 transition-all",o.unref(e)?"max-h-none":"max-h-[32px] overflow-hidden"]),innerHTML:s.text},null,10,BX),o.unref(n)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["",o.unref(Ee)("w-32 flex items-end justify-end bg-gradient-to-l from-white via-white to-transparent dark:from-ed-background dark:via-ed-background",o.unref(e)?"ml-auto opacity-60":"absolute bottom-0 right-0")])},[o.createElementVNode("button",{class:"flex items-center gap-1",onClick:o.withModifiers(i,["stop"])},[o.createElementVNode("span",IX,o.toDisplayString(o.unref(e)?"접기":"자세히"),1),o.createVNode(o.unref(kc),{class:o.normalizeClass(["w-4 h-4 transition-transform",o.unref(e)?"rotate-180":""])},null,8,["class"])])],2)):o.createCommentVNode("",!0)]))}}),sv=new kt("bulk-spellcheck-highlight");function LX(t,e,n){return t===$o.SINGLE?{class:"bulk-highlight",style:`border-bottom: 2px solid ${e}; color: ${e};`}:{class:"bulk-highlight "+(n6[n??-1]??r6),style:""}}function DX(t,e,n=$o.ERROR_TYPE,r=ts,i=`
|
|
328
|
+
`},addCommands(){return{setHardBreak:()=>({commands:t,chain:e,state:n,editor:r})=>t.first([()=>t.exitCode(),()=>t.command(()=>{const{selection:i,storedMarks:s}=n;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:a}=this.options,{splittableMarks:l}=r.extensionManager,u=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:f})=>{if(f&&u&&a){const p=u.filter(m=>l.includes(m.type.name));c.ensureMarks(p)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),OG=Dt.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:t}){return["li",yt(this.options.HTMLAttributes,t),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),X5=Dt.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:t}){return["p",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setParagraph:()=>({commands:t})=>t.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Y5=tt.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new ot({key:new kt("placeholder"),props:{decorations:({doc:t,selection:e})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!n)return null;const s=this.editor.isEmpty;return t.descendants((a,l)=>{const u=r>=l&&r<=l+a.nodeSize,c=!a.isLeaf&&Jd(a);if((u||!this.options.showOnlyCurrent)&&c){const f=[this.options.emptyNodeClass];s&&f.push(this.options.emptyEditorClass);const p=Gt.node(l,l+a.nodeSize,{class:f.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:a,pos:l,hasAnchor:u}):this.options.placeholder});i.push(p)}return this.options.includeChildren}),ut.create(t,i)}}})]}}),J5=Dt.create({name:"text",group:"inline"}),BG=sK.extend({addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),removeEmptyTextStyle:()=>({tr:e})=>{const{selection:n}=e;return e.doc.nodesBetween(n.from,n.to,(r,i)=>{r.isInline&&(r.marks.filter(s=>s.type===this.type).some(s=>Object.values(s.attrs).some(a=>!!a))||e.removeMark(i,i+r.nodeSize,this.type))}),!0}}}}),Z5=Dt.create({name:"doc",topNode:!0,content:"block+"}),Q5=Z5.extend({content(){var e;return!!((e=this.editor)!=null&&e.options.extensions.find(n=>n.name==="columns"))?"(block|columns)+":"block+"}}),N5=tt.create({name:"selection",addProseMirrorPlugins(){const{editor:t}=this;return[new ot({key:new kt("selection"),props:{decorations(e){return e.selection.empty?null:ut.create(e.doc,[Gt.inline(e.selection.from,e.selection.to,{class:"selection"})])}}})]}}),IG=t=>{const e=["size-small","size-medium","size-large"],n=["SizeS","SizeM","SizeL"];return e.map((r,i)=>({type:`video-${r}`,component:Ge,componentProps:{tooltip:`editor.${r.replace("-",".")}.tooltip`,icon:n[i],action:()=>t.commands.updateVideo({width:lf[r]}),isActive:()=>t.isActive("video",{width:lf[r]})}}))},RG=t=>[...IG(t),{type:"remove",component:Ge,componentProps:{tooltip:"editor.remove",icon:"Trash2",action:()=>{const{state:e,dispatch:n}=t.view;ol(e,n)}}}],LG=(t,e,{editor:n,extension:r,t:i})=>{const{extensions:s=[]}=n.extensionManager,a={};for(const l of Object.keys(t)){const u=t[l];if(!u)continue;const c=[];for(const m of u){if(m==="divider"){const v=c[c.length-1];if((v==null?void 0:v.type)==="divider")continue;c.push({type:"divider",component:void 0,componentProps:{}});continue}const g=e.find(v=>v.type===m);if(g){c.push({...g,componentProps:{...g.componentProps,tooltip:g.componentProps.tooltip?i(g.componentProps.tooltip):void 0},componentSlots:g.componentSlots});continue}const b=s.find(v=>v.name===m);if(b){const{button:v}=b.options,y=v({editor:n,extension:b,t:i});c.push({type:m,component:y.component,componentProps:y.componentProps,componentSlots:y.componentSlots});continue}}const f=c[c.length-1],p=c[0];(f==null?void 0:f.type)==="divider"&&c.pop(),(p==null?void 0:p.type)==="divider"&&c.shift(),a[l]=c}return a},DG=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(t=>t.charCodeAt(0))),PG=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(t=>t.charCodeAt(0)));var qb;const VG=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),FG=(qb=String.fromCodePoint)!==null&&qb!==void 0?qb:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function $G(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=VG.get(t))!==null&&e!==void 0?e:t}var _n;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.EQUALS=61]="EQUALS",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.LOWER_Z=122]="LOWER_Z",t[t.UPPER_A=65]="UPPER_A",t[t.UPPER_F=70]="UPPER_F",t[t.UPPER_Z=90]="UPPER_Z"})(_n||(_n={}));const HG=32;var _s;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(_s||(_s={}));function Kb(t){return t>=_n.ZERO&&t<=_n.NINE}function zG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_F||t>=_n.LOWER_A&&t<=_n.LOWER_F}function UG(t){return t>=_n.UPPER_A&&t<=_n.UPPER_Z||t>=_n.LOWER_A&&t<=_n.LOWER_Z||Kb(t)}function WG(t){return t===_n.EQUALS||UG(t)}var Tn;(function(t){t[t.EntityStart=0]="EntityStart",t[t.NumericStart=1]="NumericStart",t[t.NumericDecimal=2]="NumericDecimal",t[t.NumericHex=3]="NumericHex",t[t.NamedEntity=4]="NamedEntity"})(Tn||(Tn={}));var Ts;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict",t[t.Attribute=2]="Attribute"})(Ts||(Ts={}));class jG{constructor(e,n,r){this.decodeTree=e,this.emitCodePoint=n,this.errors=r,this.state=Tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Ts.Strict}startEntity(e){this.decodeMode=e,this.state=Tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,n){switch(this.state){case Tn.EntityStart:return e.charCodeAt(n)===_n.NUM?(this.state=Tn.NumericStart,this.consumed+=1,this.stateNumericStart(e,n+1)):(this.state=Tn.NamedEntity,this.stateNamedEntity(e,n));case Tn.NumericStart:return this.stateNumericStart(e,n);case Tn.NumericDecimal:return this.stateNumericDecimal(e,n);case Tn.NumericHex:return this.stateNumericHex(e,n);case Tn.NamedEntity:return this.stateNamedEntity(e,n)}}stateNumericStart(e,n){return n>=e.length?-1:(e.charCodeAt(n)|HG)===_n.LOWER_X?(this.state=Tn.NumericHex,this.consumed+=1,this.stateNumericHex(e,n+1)):(this.state=Tn.NumericDecimal,this.stateNumericDecimal(e,n))}addToNumericResult(e,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(e.substr(n,s),i),this.consumed+=s}}stateNumericHex(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i)||zG(i))n+=1;else return this.addToNumericResult(e,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(e,r,n,16),-1}stateNumericDecimal(e,n){const r=n;for(;n<e.length;){const i=e.charCodeAt(n);if(Kb(i))n+=1;else return this.addToNumericResult(e,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(e,r,n,10),-1}emitNumericEntity(e,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(e===_n.SEMI)this.consumed+=1;else if(this.decodeMode===Ts.Strict)return 0;return this.emitCodePoint($G(this.result),this.consumed),this.errors&&(e!==_n.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(e,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&_s.VALUE_LENGTH)>>14;for(;n<e.length;n++,this.excess++){const a=e.charCodeAt(n);if(this.treeIndex=qG(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Ts.Attribute&&(s===0||WG(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&_s.VALUE_LENGTH)>>14,s!==0){if(a===_n.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Ts.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:n,decodeTree:r}=this,i=(r[n]&_s.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(e=this.errors)===null||e===void 0||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[e]&~_s.VALUE_LENGTH:i[e+1],r),n===3&&this.emitCodePoint(i[e+2],r),r}end(){var e;switch(this.state){case Tn.NamedEntity:return this.result!==0&&(this.decodeMode!==Ts.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Tn.NumericDecimal:return this.emitNumericEntity(0,2);case Tn.NumericHex:return this.emitNumericEntity(0,3);case Tn.NumericStart:return(e=this.errors)===null||e===void 0||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Tn.EntityStart:return 0}}}function ek(t){let e="";const n=new jG(t,r=>e+=FG(r));return function(i,s){let a=0,l=0;for(;(l=i.indexOf("&",l))>=0;){e+=i.slice(a,l),n.startEntity(s);const c=n.write(i,l+1);if(c<0){a=l+n.end();break}a=l+c,l=c===0?a+1:a}const u=e+i.slice(a);return e="",u}}function qG(t,e,n,r){const i=(e&_s.BRANCH_LENGTH)>>7,s=e&_s.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const u=r-s;return u<0||u>=i?-1:t[n+u]-1}let a=n,l=a+i-1;for(;a<=l;){const u=a+l>>>1,c=t[u];if(c<r)a=u+1;else if(c>r)l=u-1;else return t[u+i]}return-1}const KG=ek(DG);ek(PG);function GG(t,e=Ts.Legacy){return KG(t,e)}var nn;(function(t){t.Attribute="attribute",t.Pseudo="pseudo",t.PseudoElement="pseudo-element",t.Tag="tag",t.Universal="universal",t.Adjacent="adjacent",t.Child="child",t.Descendant="descendant",t.Parent="parent",t.Sibling="sibling",t.ColumnCombinator="column-combinator"})(nn||(nn={}));var eo;(function(t){t.Any="any",t.Element="element",t.End="end",t.Equals="equals",t.Exists="exists",t.Hyphen="hyphen",t.Not="not",t.Start="start"})(eo||(eo={}));const tk=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,XG=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,YG=new Map([[126,eo.Element],[94,eo.Start],[36,eo.End],[42,eo.Any],[33,eo.Not],[124,eo.Hyphen]]),JG=new Set(["has","not","matches","is","where","host","host-context"]);function ZG(t){switch(t.type){case nn.Adjacent:case nn.Child:case nn.Descendant:case nn.Parent:case nn.Sibling:case nn.ColumnCombinator:return!0;default:return!1}}const QG=new Set(["contains","icontains"]);function NG(t,e,n){const r=parseInt(e,16)-65536;return r!==r||n?e:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,r&1023|56320)}function Dc(t){return t.replace(XG,NG)}function Gb(t){return t===39||t===34}function nk(t){return t===32||t===9||t===10||t===12||t===13}function eX(t){const e=[],n=rk(e,`${t}`,0);if(n<t.length)throw new Error(`Unmatched selector: ${t.slice(n)}`);return e}function rk(t,e,n){let r=[];function i(m){const g=e.slice(n+m).match(tk);if(!g)throw new Error(`Expected name, found ${e.slice(n)}`);const[b]=g;return n+=m+b.length,Dc(b)}function s(m){for(n+=m;n<e.length&&nk(e.charCodeAt(n));)n++}function a(){n+=1;const m=n;let g=1;for(;g>0&&n<e.length;n++)e.charCodeAt(n)===40&&!l(n)?g++:e.charCodeAt(n)===41&&!l(n)&&g--;if(g)throw new Error("Parenthesis not matched");return Dc(e.slice(m,n-1))}function l(m){let g=0;for(;e.charCodeAt(--m)===92;)g++;return(g&1)===1}function u(){if(r.length>0&&ZG(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(m){if(r.length>0&&r[r.length-1].type===nn.Descendant){r[r.length-1].type=m;return}u(),r.push({type:m})}function f(m,g){r.push({type:nn.Attribute,name:m,action:g,value:i(1),namespace:null,ignoreCase:"quirks"})}function p(){if(r.length&&r[r.length-1].type===nn.Descendant&&r.pop(),r.length===0)throw new Error("Empty sub-selector");t.push(r)}if(s(0),e.length===n)return n;e:for(;n<e.length;){const m=e.charCodeAt(n);switch(m){case 32:case 9:case 10:case 12:case 13:{(r.length===0||r[0].type!==nn.Descendant)&&(u(),r.push({type:nn.Descendant})),s(1);break}case 62:{c(nn.Child),s(1);break}case 60:{c(nn.Parent),s(1);break}case 126:{c(nn.Sibling),s(1);break}case 43:{c(nn.Adjacent),s(1);break}case 46:{f("class",eo.Element);break}case 35:{f("id",eo.Equals);break}case 91:{s(1);let g,b=null;e.charCodeAt(n)===124?g=i(1):e.startsWith("*|",n)?(b="*",g=i(2)):(g=i(0),e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==61&&(b=g,g=i(1))),s(0);let v=eo.Exists;const y=YG.get(e.charCodeAt(n));if(y){if(v=y,e.charCodeAt(n+1)!==61)throw new Error("Expected `=`");s(2)}else e.charCodeAt(n)===61&&(v=eo.Equals,s(1));let x="",k=null;if(v!=="exists"){if(Gb(e.charCodeAt(n))){const _=e.charCodeAt(n);let T=n+1;for(;T<e.length&&(e.charCodeAt(T)!==_||l(T));)T+=1;if(e.charCodeAt(T)!==_)throw new Error("Attribute value didn't end");x=Dc(e.slice(n+1,T)),n=T+1}else{const _=n;for(;n<e.length&&(!nk(e.charCodeAt(n))&&e.charCodeAt(n)!==93||l(n));)n+=1;x=Dc(e.slice(_,n))}s(0);const C=e.charCodeAt(n)|32;C===115?(k=!1,s(1)):C===105&&(k=!0,s(1))}if(e.charCodeAt(n)!==93)throw new Error("Attribute selector didn't terminate");n+=1;const E={type:nn.Attribute,name:g,action:v,value:x,namespace:b,ignoreCase:k};r.push(E);break}case 58:{if(e.charCodeAt(n+1)===58){r.push({type:nn.PseudoElement,name:i(2).toLowerCase(),data:e.charCodeAt(n)===40?a():null});continue}const g=i(1).toLowerCase();let b=null;if(e.charCodeAt(n)===40)if(JG.has(g)){if(Gb(e.charCodeAt(n+1)))throw new Error(`Pseudo-selector ${g} cannot be quoted`);if(b=[],n=rk(b,e,n+1),e.charCodeAt(n)!==41)throw new Error(`Missing closing parenthesis in :${g} (${e})`);n+=1}else{if(b=a(),QG.has(g)){const v=b.charCodeAt(0);v===b.charCodeAt(b.length-1)&&Gb(v)&&(b=b.slice(1,-1))}b=Dc(b)}r.push({type:nn.Pseudo,name:g,data:b});break}case 44:{p(),r=[],s(1);break}default:{if(e.startsWith("/*",n)){const v=e.indexOf("*/",n+2);if(v<0)throw new Error("Comment was not terminated");n=v+2,r.length===0&&s(0);break}let g=null,b;if(m===42)n+=1,b="*";else if(m===124){if(b="",e.charCodeAt(n+1)===124){c(nn.ColumnCombinator),s(2);break}}else if(tk.test(e.slice(n)))b=i(0);else break e;e.charCodeAt(n)===124&&e.charCodeAt(n+1)!==124&&(g=b,e.charCodeAt(n+1)===42?(b="*",n+=2):b=i(1)),r.push(b==="*"?{type:nn.Universal,namespace:g}:{type:nn.Tag,name:b,namespace:g})}}}return p(),n}function Xb(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""").replace(/\xA0/g," ").replace(/\xAD/g,"­")}var ok=t=>GG(t);function tX(t,e,n,r){if(typeof e=="function")return e({props:{...n,children:r},attrs:n,children:r,h:t.h,context:t});{let i=!0,s;if(e?e.toLowerCase()==="fragment"?(s=t.document.createDocumentFragment(),i=!1):s=t.document.createElement(e):s=t.document.createElement("div"),n&&i){const a=s;for(let[l,u]of Object.entries(n)){l=l.toString();const c=l.toLowerCase();c==="classname"?a.className=u:c==="on"?Object.entries(u).forEach(([f,p])=>{a.setAttribute(`on${f}`,String(p))}):u!==!1&&u!=null&&(u===!0?a.setAttribute(l,l):a.setAttribute(l,u.toString()))}}if(r)for(const a of r){const l=Array.isArray(a)?[...a]:[a];for(const u of l)u&&u!==!1&&u!=null&&(typeof u!="object"?s.appendChild(t.document.createTextNode(u.toString())):s.appendChild(u))}return s}}function ik(t,e,...n){return typeof t=="object"&&(t="fragment",n=t.children,e=t.attrs),Array.isArray(e)?(n=[e],e={}):e?e.attrs&&(e={...e.attrs,...e},delete e.attrs):e={},{tag:t,attrs:e,children:typeof n[0]=="string"?n:n.flat(Number.POSITIVE_INFINITY)}}function nX(t){return t.h=function(n,r,...i){const{tag:s,attrs:a,children:l}=ik(n,r,i);return tX(t,s,a,l)},t.h}var sk={};function rX(t){let e=sk[t];return e==null&&(e=eX(t),sk[t]=e),e}function oX(t,e,{debug:n=!1}={}){for(const r of rX(t)){const i=(s,a)=>{var u,c,f,p;let l=!1;for(const m of a){const{type:g,name:b,action:v,value:y,_ignoreCase:x=!0,data:k}=m;if(g==="attribute")v==="equals"?l=s.getAttribute(b)===y:v==="start"?l=!!((u=s.getAttribute(b))!=null&&u.startsWith(y)):v==="end"?l=!!((c=s.getAttribute(b))!=null&&c.endsWith(y)):v==="element"?b==="class"?l=s.classList.contains(y):l=!!((f=s.getAttribute(b))!=null&&f.includes(y)):v==="exists"?l=s.hasAttribute(b):v==="any"?l=!!((p=s.getAttribute(b))!=null&&p.includes(y)):console.warn("Unknown CSS selector action",v);else if(g==="tag")l=s.tagName===b.toUpperCase();else if(g==="universal")l=!0;else if(g==="pseudo"){if(b==="not"){let E=!0;k.forEach(C=>{i(s,C)||(E=!1)}),l=!E}}else console.warn("Unknown CSS selector type",g,t,a);if(!l)break}return l};if(i(e,r))return!0}return!1}var iX=Symbol.for("nodejs.util.inspect.custom"),ak={fontWeight:"bold"},lk={fontStyle:"italic"},uk={backgroundColor:"rgb(255, 250, 165)"},ck={textDecorations:"underline"},Yb={textDecorations:"line-through"},sX={b:ak,strong:ak,em:lk,i:lk,mark:uk,u:ck,a:ck,s:Yb,del:Yb,ins:uk,strike:Yb};function dk(t){return t.toLowerCase().replace(/[^a-z0-9]+(.)/gi,(e,n)=>n.toUpperCase())}var Ti=class Am{constructor(){this.append=this.appendChild,this._parentNode=null,this._childNodes=[]}get nodeType(){return console.error("Subclasses should define nodeType!"),0}get nodeName(){return console.error("Subclasses should define nodeName!"),""}get nodeValue(){return null}cloneNode(e=!1){const n=new this.constructor;return e&&(n._childNodes=this._childNodes.map(r=>r.cloneNode(!0)),n._fixChildNodesParent()),n}_fixChildNodesParent(){this._childNodes.forEach(e=>e._parentNode=this)}insertBefore(e,n){if(e!==n){let r=n?this._childNodes.indexOf(n):0;r<0&&(r=0),this._childNodes.splice(r,0,e),this._fixChildNodesParent()}}appendChild(e){if(e!=null){if(e===this){console.warn("Cannot appendChild to self");return}if(e instanceof Zb&&console.warn("No defined how to append a document to a node!",e),e instanceof Jb)for(const n of[...e._childNodes])this.appendChild(n);else if(Array.isArray(e))for(const n of[...e])this.appendChild(n);else if(e instanceof Am)e.remove(),this._childNodes.push(e);else try{const n=typeof e=="string"?e:JSON.stringify(e,null,2);this._childNodes.push(new Ul(n))}catch(n){console.error(`The data ${e} to be added to ${this.render()} is problematic: ${n}`)}this._fixChildNodesParent()}}removeChild(e){const n=this._childNodes.indexOf(e);n>=0&&(e._parentNode=null,this._childNodes.splice(n,1),this._fixChildNodesParent())}remove(){var e;return(e=this==null?void 0:this.parentNode)==null||e.removeChild(this),this}replaceChildren(...e){this._childNodes=e.map(n=>typeof n=="string"?new Ul(n):n.remove()),this._fixChildNodesParent()}replaceWith(...e){const n=this._parentNode;if(n){const r=this._indexInParent();r>=0&&(e=e.map(i=>typeof i=="string"?new Ul(i):i.remove()),n._childNodes.splice(r,1,...e),this._parentNode=null,n._fixChildNodesParent())}}_indexInParent(){return this._parentNode?this._parentNode.childNodes.indexOf(this):-1}get parentNode(){return this._parentNode}get childNodes(){return this._childNodes||[]}get children(){return this._childNodes||[]}get firstChild(){return this._childNodes[0]}get lastChild(){return this._childNodes[this._childNodes.length-1]}get nextSibling(){const e=this._indexInParent();return e!=null&&this.parentNode.childNodes[e+1]||null}get previousSibling(){const e=this._indexInParent();return e>0&&this.parentNode.childNodes[e-1]||null}flatten(){const e=[];this instanceof Eo&&e.push(this);for(const n of this._childNodes)e.push(...n.flatten());return e}flattenNodes(){const e=[];e.push(this);for(const n of this._childNodes)e.push(...n.flattenNodes());return e}render(){return""}get textContent(){return this._childNodes.map(e=>e.textContent).join("")}set textContent(e){this._childNodes=[],e&&this.appendChild(new Ul(e.toString()))}contains(e){return e===this?!0:this._childNodes.some(n=>n.contains(e))}get ownerDocument(){var e;return this.nodeType===Am.DOCUMENT_NODE||this.nodeType===Am.DOCUMENT_FRAGMENT_NODE?this:(e=this==null?void 0:this._parentNode)==null?void 0:e.ownerDocument}toString(){return`${this.nodeName}`}[iX](){return`${this.constructor.name} "${this.render()}"`}};Ti.ELEMENT_NODE=1,Ti.TEXT_NODE=3,Ti.CDATA_SECTION_NODE=4,Ti.PROCESSING_INSTRUCTION_NODE=7,Ti.COMMENT_NODE=8,Ti.DOCUMENT_NODE=9,Ti.DOCUMENT_TYPE_NODE=10,Ti.DOCUMENT_FRAGMENT_NODE=11;var As=Ti,Ul=class extends As{get nodeType(){return As.TEXT_NODE}get nodeName(){return"#text"}get nodeValue(){return this._text||""}get textContent(){return this.nodeValue}constructor(t=""){super(),this._text=t}render(){var e;const t=(e=this.parentNode)==null?void 0:e.tagName;return t==="SCRIPT"||t==="STYLE"?this._text:Xb(this._text)}cloneNode(t=!1){const e=super.cloneNode(t);return e._text=this._text,e}},fk=class extends As{getElementById(t){return this.flatten().find(e=>e._attributes.id===t)}getElementsByClassName(t){return this.flatten().filter(e=>e.classList.contains(t))}matches(t){return oX(t,this)}querySelectorAll(t){return this.flatten().filter(e=>e.matches(t))}querySelector(t){return this.flatten().find(e=>e.matches(t))}parent(t){var e;return this.matches(t)?this:this.parentNode==null?null:(e=this.parentNode)==null?void 0:e.parent(t)}handle(t,e){let n=0;for(const r of this.querySelectorAll(t))e(r,n++)}},Eo=class extends fk{get nodeType(){return As.ELEMENT_NODE}get nodeName(){return this._nodeName}constructor(t="div",e={}){super(),this._originalTagName=t,this._nodeName=(t||"").toUpperCase(),this._attributes=e||{}}cloneNode(t=!1){const e=super.cloneNode(t);return e._originalTagName=this._originalTagName,e._nodeName=this._nodeName,e._attributes=Object.assign({},this._attributes),e}get attributes(){return Object.entries(this._attributes).map(([t,e])=>({name:t,value:e}))}get attributesObject(){return{...this._attributes}}_findAttributeName(t){const e=t.toLowerCase();return Object.keys(this._attributes).find(n=>e===n.toLowerCase())||null}setAttribute(t,e){this.removeAttribute(t),this._attributes[t]=e,this._styles=void 0,this._dataset=void 0}getAttribute(t){const e=this._findAttributeName(t),n=e?this._attributes[e]:null;return n==null?null:typeof n=="string"?n:""}removeAttribute(t){this._findAttributeName(String(t))&&delete this._attributes[t]}hasAttribute(t){const e=this._findAttributeName(t);return e?this._attributes[e]!=null:!1}get style(){if(this._styles==null){const t={};let e=0;const n=this.getAttribute("style");if(n){let r;const i=/\s*([\w-]+)\s*:\s*((url\(.*?\)[^;]*|[^;]+))/gi;for(;r=i.exec(n);){++e;const s=r[1],a=r[2].trim();t[s]=a,t[dk(s)]=a}}this._styles={get length(){return e},getPropertyValue(r){return t[r]},...sX[this.tagName.toLowerCase()],...t}}return this._styles}get dataset(){if(this._dataset==null){const t={};for(const[e,n]of Object.entries(this._attributes))e.startsWith("data-")&&(t[e.slice(5)]=n,t[dk(e.slice(5))]=n);this._dataset=t}return this._dataset}get tagName(){return this._nodeName}setTagName(t){this._nodeName=t.toUpperCase()}get id(){return this._attributes.id||null}set id(t){t==null?delete this._attributes.id:this._attributes.id=t}get src(){return this._attributes.src}set src(t){t==null?delete this._attributes.src:this._attributes.src=t}getElementsByTagName(t){t=t.toUpperCase();const e=this.flatten();return t!=="*"?e.filter(n=>n.tagName===t):e}setInnerHTML(t){}get innerHTML(){return this._childNodes.map(t=>t.render(sh)).join("")}set innerHTML(t){this.setInnerHTML(t)}get outerHTML(){return this.render(ah)}get className(){return this._attributes.class||""}set className(t){Array.isArray(t)?t=t.filter(e=>!!e).join(" "):typeof t=="object"&&(t=Object.entries(t).filter(([e,n])=>!!n).map(([e,n])=>e).join(" ")),this._attributes.class=t}get classList(){const t=String(this.className??"").trim().split(/\s+/g)||[];return{contains(e){return t.includes(e)},add:e=>{t.includes(e)||(t.push(e),this.className=t)},remove:e=>{const n=t.indexOf(e);n>=0&&(t.splice(n,1),this.className=t)}}}render(t=ah){return t(this._originalTagName||this.tagName,this._attributes,this._childNodes.map(e=>e.render(t)).join(""))}},pk=class K9 extends As{get nodeName(){return super.nodeName}get nodeValue(){return super.nodeValue}get nodeType(){return K9.DOCUMENT_TYPE_NODE}render(){return"<!DOCTYPE html>"}},Jb=class G9 extends fk{get nodeType(){return As.DOCUMENT_FRAGMENT_NODE}get nodeName(){return"#document-fragment"}render(e=ah){return this._childNodes.map(n=>n.render(e)||[]).join("")}get innerHTML(){return this._childNodes.map(e=>e.render(sh)).join("")}createElement(e,n={}){return new Eo(e,n)}createDocumentFragment(){return new G9}createTextNode(e){return new Ul(e)}},Zb=class extends Jb{get nodeType(){return As.DOCUMENT_NODE}get nodeName(){return"#document"}get documentElement(){return this.firstChild}render(t=ah){let e=super.render(t);return this.docType&&(e=this.docType.render()+e),e}},hk=class extends Zb{constructor(t=!1){if(super(),this.docType=new pk,!t){const e=new Eo("html"),n=new Eo("body"),r=new Eo("head"),i=new Eo("title");e.appendChild(r),r.appendChild(i),e.appendChild(n),this.appendChild(e)}}get body(){let t=this.querySelector("body");if(!t){let e=this.querySelector("html");e||(e=new Eo("html"),this.appendChild(e)),t=new Eo("body"),e.appendChild(e)}return t}get title(){var t;return((t=this.querySelector("title"))==null?void 0:t.textContent)||""}set title(t){const e=this.querySelector("title");e&&(e.textContent=t)}get head(){let t=this.querySelector("head");if(!t){let e=this.querySelector("html");e||(e=new Eo("html"),this.appendChild(e)),t=new Eo("head"),e.insertBefore(e)}return t}};function aX(){return new Zb}function lX(){return new hk}var mk=aX();nX({document:mk});var uX={},cX=uX.hasOwnProperty;function gk(t,e){return cX.call(t,e)}var bk=["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr","command"];function vk(t,e,n={},r){const i=!(typeof r=="string"&&r===""||Array.isArray(r)&&(r.length===0||r.length===1&&r[0]==="")||r==null),s=[];if(e=e.replace(/__/g,":"),e!=="noop"&&e!==""){e!=="cdata"?s.push(`<${e}`):s.push("<![CDATA[");for(let a in n)if(a&&gk(n,a)){const l=n[a];if(a==="html")continue;a.toLowerCase()==="classname"&&(a="class"),a=a.replace(/__/g,":"),l===!0?s.push(` ${a}`):a==="style"&&typeof l=="object"?s.push(` ${a}="${Object.keys(l).filter(u=>l[u]!=null).map(u=>{let c=l[u];return c=typeof c=="number"?`${c}px`:c,`${u.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${c}`}).join(";")}"`):l!==!1&&l!=null&&s.push(` ${a}="${Xb(l.toString())}"`)}if(e!=="cdata"){if(t&&!i)return s.push(" />"),s.join("");s.push(">")}if(!t&&bk.includes(e))return s.join("")}if(i){if(typeof r=="string")s.push(r);else if(r&&r.length>0){for(let a of r)if(a!=null&&a!==!1){Array.isArray(a)||(a=[a]);for(const l of a)l.startsWith("<")&&l.endsWith(">")||e==="script"||e==="style"?s.push(l):s.push(Xb(l.toString()))}}}return n.html&&s.push(n.html),e!=="noop"&&e!==""&&(e!=="cdata"?s.push(`</${e}>`):s.push("]]>")),s.join("")}function sh(t,e,...n){const{tag:r,attrs:i,children:s}=ik(t,e,n);return vk(!1,r,i,s)}var ah=vk.bind(null,!1);sh.firstLine="<!DOCTYPE html>",sh.html=!0;var dX=/([^=\s]+)(\s*=\s*(("([^"]*)")|('([^']*)')|[^>\s]+))?/g,fX=/^<\/([^>\s]+)[^>]*>/m,pX=/^<([^>\s/]+)((\s+[^=>\s]+(\s*=\s*(("[^"]*")|('[^']*')|[^>\s]+))?)*)\s*(?:\/\s*)?>/m,hX=/\s*\/\s*>\s*$/m,mX=class{constructor(t={}){this.attrRe=dX,this.endTagRe=fX,this.startTagRe=pX,this.defaults={ignoreWhitespaceText:!1},t.scanner&&(this.scanner=t.scanner),this.options=Object.assign({},this.defaults,t)}parse(t){let e=!1,n,r,i;for(;t.length;){if(t.substring(0,4)==="<!--")n=t.indexOf("-->"),n!==-1?(this.scanner.comment(t.substring(4,n)),t=t.substring(n+3),e=!1):e=!0;else if(t.substring(0,2)==="</")r=this.endTagRe.exec(t),r?(t=RegExp.rightContext,e=!1,this.parseEndTag(RegExp.lastMatch,r[1])):e=!0;else if(t.charAt(0)==="<")if(r=this.startTagRe.exec(t),r){t=RegExp.rightContext,e=!1;const s=this.parseStartTag(RegExp.lastMatch,r[1],r);(s==="script"||s==="style")&&(n=t.search(new RegExp(`</${s}`,"i")),n!==-1?(this.scanner.characters(t.substring(0,n)),t=t.substring(n),e=!1):e=!0)}else e=!0;if(e){n=t.indexOf("<");let s=n;n===0&&(n=t.substring(1).indexOf("<"),s=s+1),n===-1?(i=t,t=""):(i=t.substring(0,s),t=t.substring(s)),(!this.options.ignoreWhitespaceText||!/^\s*$/.test(i))&&this.scanner.characters(i)}e=!0,r=null}}parseStartTag(t,e,n){const r=hX.test(t);let i=n[2];r&&(i=i.replace(/\s*\/\s*$/,""));const s=this.parseAttributes(e,i);return this.scanner.startElement(e,s,r,n[0]),e.toLocaleLowerCase()}parseEndTag(t,e){this.scanner.endElement(e)}parseAttributes(t,e){const n={};return e.replace(this.attrRe,(...r)=>{const[i,s,a,l,u,c,f,p]=r;n[s]=p??c??l??!0}),n}};function gX(t){if(typeof t!="string")throw console.error("parseHTML requires string, found",t),new Error("parseHTML requires string");const e=t.indexOf("<!")===0?new hk(!0):new Jb,n=[e];return new mX({scanner:{startElement(i,s,a){if(i.toLowerCase()==="!doctype"){e.docType=new pk;return}for(const c in s)if(gk(s,c)){const f=s[c];typeof f=="string"&&(s[c]=ok(f))}const u=n[n.length-1];if(u){const c=mk.createElement(i,s);u.appendChild(c),bk.includes(i.toLowerCase())||a||n.push(c)}},endElement(i){n.pop()},characters(i){var a;i=ok(i);const s=n[n.length-1];((a=s==null?void 0:s.lastChild)==null?void 0:a.nodeType)===As.TEXT_NODE?s.lastChild._text+=i:s&&s.appendChild(new Ul(i))},comment(i){}}}).parse(t),e}Eo.prototype.setInnerHTML=function(t){const e=gX(t);this._childNodes=e._childNodes,this._fixChildNodesParent()};function bX(t,e,n){return $r.fromSchema(e).serializeFragment(t.content,{document:lX()}).render()}function vX(t,e){const n=Fr.fromJSON(e,t);return bX(n,e)}function yX(t,e){const n=document.getElementById(t.attrs.id)??Qb.getElementById(t.attrs.id);if(!n)return null;const r=yk(n),{lastChild:i}=t,{childCount:s}=t,a=t.content.content.slice(0,s);if(!i)return!1;i.isText&&a.push(e.text("gg"));const l=vX(wX(t.type.create(t.attrs,a,t.marks)),e);return CX(l,t.attrs.id,!1)>r}function wX(t){return{type:"doc",content:[t.toJSON()]}}let xX=null,Qb=null;const Nb=new Map;function CX(t,e,n=!0){if(n&&Nb.has(t))return Nb.get(t);const r=Qb.getElementById("computeddiv");if(r){r.innerHTML=`<p> </p>${t}`;const i=Qb.getElementById(e),{height:s}=yk(i);return r.innerHTML=" ",n&&Nb.set(t,s),s}return 0}function yk(t){const e=window.getComputedStyle(t)||xX.contentWindow.getComputedStyle(t),n=e.getPropertyValue("margin-top"),r=e.getPropertyValue("margin-bottom"),i=parseFloat(n)+parseFloat(r),{height:s}=t.getBoundingClientRect();return{margin:i,height:i+t.offsetHeight+parseFloat(e.borderWidth)}}function ev(){return Zr(10)}const tv=o.defineComponent({__name:"ContextMenu",props:{dir:{},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(pP),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),nv=o.defineComponent({__name:"ContextMenuContent",props:{forceMount:{type:Boolean},loop:{type:Boolean},alignOffset:{},avoidCollisions:{type:Boolean},collisionBoundary:{},collisionPadding:{},sticky:{},hideWhenDetached:{type:Boolean},prioritizePosition:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(mP),null,{default:o.withCtx(()=>[o.createVNode(o.unref(gP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("z-50 min-w-32 overflow-hidden rounded-md border bg-ed-popover p-1 text-ed-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),rv=o.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean},textValue:{},asChild:{type:Boolean},as:{},class:{},inset:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(bP),o.mergeProps(o.unref(s),{class:o.unref(Ee)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-ed-accent focus:text-ed-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n.inset&&"pl-8",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"]))}}),ov=o.defineComponent({__name:"ContextMenuTrigger",props:{disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(t){const n=er(t);return(r,i)=>(o.openBlock(),o.createBlock(o.unref(hP),o.normalizeProps(o.guardReactiveProps(o.unref(n))),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16))}}),Pc=o.defineComponent({__name:"Dialog",props:{open:{type:Boolean},defaultOpen:{type:Boolean},modal:{type:Boolean}},emits:["update:open"],setup(t,{emit:e}){const i=Pt(t,e);return(s,a)=>(o.openBlock(),o.createBlock(o.unref(rD),o.normalizeProps(o.guardReactiveProps(o.unref(i))),{default:o.withCtx(()=>[o.renderSlot(s.$slots,"default")]),_:3},16))}}),Vc=o.defineComponent({__name:"DialogContent",props:{forceMount:{type:Boolean},trapFocus:{type:Boolean},disableOutsidePointerEvents:{type:Boolean},asChild:{type:Boolean},as:{},class:{},isOverlayTransparent:{type:Boolean}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","openAutoFocus","closeAutoFocus"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{isOverlayTransparent:a,class:l,...u}=n;return u}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:o.normalizeClass(o.unref(Ee)("fixed inset-0 z-[60] bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",a.isOverlayTransparent&&"bg-transparent"))},null,8,["class"]),o.createVNode(o.unref(_D),o.mergeProps(o.unref(s),{class:o.unref(Ee)("fixed left-1/2 top-1/2 z-[60] grid w-full max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 border bg-ed-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n.class)}),{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default")]),_:3},16,["class"])]),_:3}))}}),iv=o.defineComponent({__name:"DialogFooter",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-x-2",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),lh=o.defineComponent({__name:"DialogDescription",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(OD),o.mergeProps(o.unref(r),{class:o.unref(Ee)("text-sm text-ed-muted-foreground",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),uh=o.defineComponent({__name:"DialogHeader",props:{class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("flex flex-col gap-y-1.5 text-center sm:text-left",e.class))},[o.renderSlot(n.$slots,"default")],2))}}),ch=o.defineComponent({__name:"DialogClose",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(AD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),dh=o.defineComponent({__name:"DialogTitle",props:{asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:i,...s}=e;return s}),r=er(n);return(i,s)=>(o.openBlock(),o.createBlock(o.unref(MD),o.mergeProps(o.unref(r),{class:o.unref(Ee)("text-lg font-semibold leading-none tracking-tight",e.class)}),{default:o.withCtx(()=>[o.renderSlot(i.$slots,"default")]),_:3},16,["class"]))}}),kX={class:"sr-only"},EX={class:"m-2.5 p-2.5 space-y-2.5 flex items-center gap-x-2"},SX=o.defineComponent({__name:"SuperInputDialogAlert",props:{open:{type:Boolean},title:{default:"확인"},message:{default:""},confirmText:{default:"확인"},closeText:{default:"Close"},iconName:{default:void 0}},emits:["close"],setup(t,{emit:e}){const n=t,r=e,{t:i}=At(),s=wn(),a=o.computed(()=>n.message||i(s.textAlert.value||"editor.alert")),l=o.reactive({x:0,y:0}),u=o.ref(!1),c={x:0,y:0},f=()=>{r("close")},p=b=>{u.value=!0,c.x=b.clientX-l.x,c.y=b.clientY-l.y,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)},m=b=>{u.value&&(l.x=b.clientX-c.x,l.y=b.clientY-c.y)},g=()=>{u.value=!1,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)};return o.watch(()=>n.open,async b=>{if(b){await o.nextTick();const v=document.querySelector(".draggable-dialog");if(v){const{width:y,height:x}=v.getBoundingClientRect(),k=window.innerWidth,E=window.innerHeight;l.x=(k-y)/2+250,l.y=(E-x)/2-50}}},{immediate:!0}),o.onUnmounted(()=>{document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g)}),(b,v)=>{const y=dh,x=ch,k=uh,E=lh,C=iv,_=Vc,T=Pc;return o.openBlock(),o.createBlock(T,{open:b.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(_,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none","as-child":"",onOpenAutoFocus:v[0]||(v[0]=A=>{A.preventDefault()})},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({transform:`translate(${o.unref(l).x}px, ${o.unref(l).y}px)`,top:"0px",left:"0px"})},[o.createVNode(k,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(p,["prevent"])},{default:o.withCtx(()=>[o.createVNode(y,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.title),1)]),_:1}),o.createVNode(x,{class:"absolute right-3 top-3 text-white",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",kX,o.toDisplayString(n.closeText),1)]),_:1})]),_:1}),o.createVNode(E),o.createElementVNode("div",EX,[b.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:b.iconName,class:"w-8 h-8 text-blue-500"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(o.unref(a)),1)]),o.createVNode(C,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(bn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(n.confirmText),1)]),_:1})]),_:1})],4)]),_:1})]),_:1})]),_:1},8,["open"])}}}),_X={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},TX=o.defineComponent({__name:"BulkSpellCheckerFail",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",_X,[o.createVNode(o.unref(Dq),{class:"h-12 w-12 text-red-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 검사에 실패했습니다",-1)),n[1]||(n[1]=o.createElementVNode("p",{class:"text-xs font-normal text-gray-600 dark:text-gray-400"},"다시 검사하기 버튼을 눌러 재시도 해주세요",-1))]))}}),AX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"},MX=o.defineComponent({__name:"BulkSpellCheckerNotWrongWord",setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",AX,[o.createVNode(o.unref(Pq),{class:"h-12 w-12 text-blue-500"}),n[0]||(n[0]=o.createElementVNode("div",null,"맞춤법 오류가 없습니다",-1))]))}}),OX={class:"relative"},BX=["innerHTML"],IX={class:"border-b border-gray-500"},RX=o.defineComponent({__name:"BulkSpellCheckerHelpText",props:{text:{}},setup(t){const e=o.ref(!1),n=o.ref(!1),r=o.ref(null);function i(){e.value=!e.value}return o.onMounted(async()=>{await o.nextTick(),r.value&&r.value.scrollHeight>32&&(n.value=!0)}),(s,a)=>(o.openBlock(),o.createElementBlock("div",OX,[o.createElementVNode("div",{ref_key:"helpRef",ref:r,class:o.normalizeClass(["text-gray-700 dark:text-gray-400 transition-all",o.unref(e)?"max-h-none":"max-h-[32px] overflow-hidden"]),innerHTML:s.text},null,10,BX),o.unref(n)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(["",o.unref(Ee)("w-32 flex items-end justify-end bg-gradient-to-l from-white via-white to-transparent dark:from-ed-background dark:via-ed-background",o.unref(e)?"ml-auto opacity-60":"absolute bottom-0 right-0")])},[o.createElementVNode("button",{class:"flex items-center gap-1",onClick:o.withModifiers(i,["stop"])},[o.createElementVNode("span",IX,o.toDisplayString(o.unref(e)?"접기":"자세히"),1),o.createVNode(o.unref(kc),{class:o.normalizeClass(["w-4 h-4 transition-transform",o.unref(e)?"rotate-180":""])},null,8,["class"])])],2)):o.createCommentVNode("",!0)]))}}),sv=new kt("bulk-spellcheck-highlight");function LX(t,e,n){return t===$o.SINGLE?{class:"bulk-highlight",style:`border-bottom: 2px solid ${e}; color: ${e};`}:{class:"bulk-highlight "+(nx[n??-1]??rx),style:""}}function DX(t,e,n=$o.ERROR_TYPE,r=ts,i=`
|
|
329
329
|
`){return new ot({key:sv,props:{decorations(s){const a=[];return e.forEach(l=>{var b,v;const u=Wl(t,l.startIndex,i),c=Wl(t,l.endIndex-1,i)+1,f=(v=(b=l.errorHelpDtos)==null?void 0:b[0])==null?void 0:v.errorType,p=LX(n,r,f),m=Math.max(0,Math.min(u,s.doc.content.size)),g=Math.max(0,Math.min(c,s.doc.content.size));m<g&&a.push(Gt.inline(m,g,{class:p.class,style:p.style}))}),ut.create(s.doc,a)}}})}function av(t,e,n=$o.ERROR_TYPE,r=ts){if(t.unregisterPlugin(sv),!e.length)return;const i=DX(t,e,n,r);t.registerPlugin(i)}function PX(t){t&&t.unregisterPlugin(sv)}function wk(t,e=`
|
|
330
330
|
`){const n=[];let r=0,i=!0;return t.state.doc.descendants((s,a)=>{if(s.isText&&s.text)for(let c=0;c<s.text.length;c++)n[r++]=a+c;const l=s.type&&s.type.name;if((l==="hardBreak"||l==="hard_break"||l==="br")&&e.length>0)for(let c=0;c<e.length;c++)n[r++]=a;if(s.isBlock){if(!i&&e.length>0)for(let c=0;c<e.length;c++)n[r++]=a;i=!1}return!0}),n}function Wl(t,e,n=`
|
|
331
331
|
`){const r=wk(t,n);if(e<0&&(e=0),e>=r.length)return t.state.doc.content.size;const i=r[e];if(i==null){for(let s=e;s<r.length;s++)if(r[s]!=null)return r[s];for(let s=e-1;s>=0;s--)if(r[s]!=null)return r[s];return t.state.doc.content.size}return i}const VX=["onClick"],FX={class:"flex items-center mb-2"},$X={class:"flex items-center gap-2"},HX={class:"break-all whitespace-normal"},zX={class:"flex items-center mb-2"},UX={key:0,class:"flex-1 space-y-1"},WX={class:"text-sm"},jX=["onClick"],qX={key:1},KX={class:"flex"},GX={class:"flex-1"},lv=450,XX=o.defineComponent({__name:"BulkSpellCheckerWrongWordList",props:{editorsState:{}},setup(t){const e=t;function n(p){return{[rf.SPACING]:"bg-blue-500",[rf.SPELLING]:"bg-red-500"}[p??-1]||"bg-green-500"}function r(p){var m,g,b,v;return((v=(b=(g=(m=p==null?void 0:p.extensionStorage)==null?void 0:m.spellchecker)==null?void 0:g.spellchecker)==null?void 0:b.uiStrings)==null?void 0:v.uiStrings)||"No suggestions found"}function i(p){var m,g;if(p===Fo.EDITOR_COMMENT){(m=e.editorsState[Fo.EDITOR_CONTENT].editor)==null||m.commands.setTextSelection(0);return}if(p===Fo.EDITOR_CONTENT){(g=e.editorsState[Fo.EDITOR_COMMENT].editor)==null||g.commands.setTextSelection(0);return}}function s(p,m,g){if(!m)return;i(p);const b=Wl(m,g.startIndex),v=Wl(m,g.endIndex-1)+1;m.chain().setTextSelection({from:b,to:v}).focus().run();const y=Math.max(0,Math.floor((b+v)/2)),k=m.view.domAtPos(y).node;let E=null;k instanceof Element?E=k:k instanceof Text?E=k.parentElement:E=(k==null?void 0:k.parentElement)??m.view.dom,E!=null&&E.scrollIntoView&&E.scrollIntoView({behavior:"smooth",block:"center"})}function a(p,m,g,b){var O,B;if(!p)return;const v=Wl(p,g.startIndex),y=Wl(p,g.endIndex-1)+1,x=p.state.tr.insertText(b,v,y);p.view.dispatch(x),p.view.focus();const k=b.length-(((O=g.wrongWord)==null?void 0:O.length)??0),E=g.startIndex,C=g.endIndex;for(let $=m.length-1;$>=0;$--){const H=m[$];if(H.startIndex>=E&&H.startIndex<C){m.splice($,1);continue}H.startIndex>E&&(H.startIndex+=k,H.endIndex+=k)}const _=m.indexOf(g);_!==-1&&m.splice(_,1);const T=(B=p.extensionManager.extensions.find($=>$.name==="spellchecker"))==null?void 0:B.options,A=(T==null?void 0:T.spellcheckHighlightMode)??$o.ERROR_TYPE,V=(T==null?void 0:T.spellcheckHighlightColor)??ts;av(p,m,A,V)}const l=o.ref(null),u=o.ref(lv),{height:c}=Ne.useWindowSize();function f(){const p=l.value;if(!p)return;const m=80,g=p.getBoundingClientRect(),b=c.value-g.top-m;u.value=lv>b?b:lv}return o.onMounted(()=>{f(),Ne.useEventListener(window,"resize",f)}),(p,m)=>{const g=RX;return o.openBlock(),o.createElementBlock("div",{ref_key:"contentEl",ref:l,style:o.normalizeStyle({maxHeight:`${o.unref(u)}px`}),class:"pr-1 overflow-y-auto"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(p.editorsState,(b,v)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(b.wrongWords,(y,x)=>{var k,E;return o.openBlock(),o.createElementBlock("div",{key:x,class:"border-b border-gray-400 dark:border-ed-muted pb-5 mb-5 cursor-pointer",onClick:C=>s(v,p.editorsState[v].editor,y)},[o.createElementVNode("div",FX,[m[0]||(m[0]=o.createElementVNode("span",{class:"w-16 font-medium"},"입력 내용",-1)),o.createElementVNode("div",$X,[o.createElementVNode("span",{class:o.normalizeClass(["w-1.5 h-1.5 rounded-full",n((k=y.errorHelpDtos[0])==null?void 0:k.errorType)])},null,2),o.createElementVNode("span",HX,o.toDisplayString(y.wrongWord),1)])]),o.createElementVNode("div",zX,[m[3]||(m[3]=o.createElementVNode("span",{class:"w-16 font-medium"},"대치어",-1)),y.correctWord.length?(o.openBlock(),o.createElementBlock("div",UX,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.correctWord,(C,_)=>(o.openBlock(),o.createElementBlock("div",{key:_,class:"font-semibold px-3 py-1.5 rounded bg-gray-100 dark:bg-ed-muted flex items-center justify-between"},[o.createElementVNode("div",WX,o.toDisplayString(C),1),o.createElementVNode("button",{class:"flex items-center gap-1 text-blue-500",onClick:o.withModifiers(T=>a(b.editor,b.wrongWords,y,C),["stop"])},[o.createVNode(o.unref(Lq),{class:"w-4 h-4"}),m[1]||(m[1]=o.createTextVNode()),m[2]||(m[2]=o.createElementVNode("span",null,"바꾸기",-1))],8,jX)]))),128))])):(o.openBlock(),o.createElementBlock("div",qX,o.toDisplayString(r(b.editor)),1))]),o.createElementVNode("div",KX,[m[4]||(m[4]=o.createElementVNode("span",{class:"w-16 font-medium"},"도움말",-1)),o.createElementVNode("div",GX,[o.createVNode(g,{text:(E=y.errorHelpDtos[0])==null?void 0:E.errorMessage},null,8,["text"])])])],8,VX)}),128))],64))),128))],4)}}}),YX={key:0,class:"opacity-25",cx:"12",cy:"12",r:"10",fill:"#ffffff",stroke:"currentColor","stroke-width":"4"},JX={key:1,class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},ZX=o.defineComponent({__name:"SpinnerIcon",props:{fillWhite:{type:Boolean,default:!1},class:{default:""}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("svg",{class:o.normalizeClass(o.unref(Ee)("animate-spin h-5 w-5 mr-0.5",e.class)),viewBox:"0 0 24 24","aria-hidden":"true"},[n.fillWhite?(o.openBlock(),o.createElementBlock("circle",YX)):(o.openBlock(),o.createElementBlock("circle",JX)),r[0]||(r[0]=o.createElementVNode("path",{class:"opacity-100",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1))],2))}}),QX={},NX={class:"min-h-[188px] flex flex-col items-center justify-center gap-y-2 text-sm"};function eY(t,e){const n=ZX;return o.openBlock(),o.createElementBlock("div",NX,[o.createVNode(n,{"fill-white":"",class:"h-10 w-10 text-blue-500"}),e[0]||(e[0]=o.createElementVNode("div",null,"맞춤법 검사 중입니다",-1))])}const tY=po(QX,[["render",eY]]),nY={class:"text-xs py-4 px-6"},rY={class:"flex items-center justify-between mt-3"},oY={class:"flex gap-x-1"},iY=o.defineComponent({__name:"BulkSpellCheckerContent",props:{editorsState:{},spellCheckStatus:{},allWrongWordsMissSuggestions:{type:Boolean}},emits:["close-modal","run-spellcheck","replace-all-editor-errors"],setup(t,{emit:e}){const n=e;return(r,i)=>{const s=tY,a=XX,l=MX,u=TX,c=bn;return o.openBlock(),o.createElementBlock("div",nY,[r.spellCheckStatus===o.unref(fo).LOADING?(o.openBlock(),o.createBlock(s,{key:0})):r.spellCheckStatus===o.unref(fo).HAS_ERROR?(o.openBlock(),o.createBlock(a,{key:1,editorsState:r.editorsState},null,8,["editorsState"])):r.spellCheckStatus===o.unref(fo).NO_ERROR?(o.openBlock(),o.createBlock(l,{key:2})):r.spellCheckStatus===o.unref(fo).FAIL?(o.openBlock(),o.createBlock(u,{key:3})):o.createCommentVNode("",!0),o.createElementVNode("div",rY,[i[4]||(i[4]=o.createStaticVNode('<ul class="flex items-cente gap-x-4"><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-red-500"></span>맞춤법</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-blue-500"></span>띄어쓰기</li><li class="flex items-center gap-x-1"><span class="w-1.5 h-1.5 rounded-full bg-green-500"></span>통합교정</li></ul>',1)),o.createElementVNode("div",oY,[o.createVNode(c,{variant:"outline",class:o.normalizeClass(o.unref(Ee)("border-blue-500 text-blue-500 text-xs px-3 py-2 h-auto hover:bg-white/80 hover:opacity-80 hover:text-blue-500 dark:text-dark-blue-100 dark:hover:bg-dark-blue-400 dark:hover:text-dark-blue-50 dark:hover:border-dark-blue-100",r.spellCheckStatus===o.unref(fo).LOADING&&"text-gray-300 bg-gray-100 border-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:border-ed-muted/70 dark:text-gray-500")),onClick:i[0]||(i[0]=f=>n("run-spellcheck"))},{default:o.withCtx(()=>i[2]||(i[2]=[o.createTextVNode("다시 검사하기")])),_:1},8,["class"]),o.createVNode(c,{class:o.normalizeClass(o.unref(Ee)("border-blue-500 text-white text-xs px-3 py-2 h-auto bg-blue-500 hover:bg-blue-500/80",(r.spellCheckStatus!==o.unref(fo).HAS_ERROR||r.allWrongWordsMissSuggestions)&&"text-gray-300 bg-gray-100 hover:bg-gray-100 pointer-events-none dark:bg-ed-muted/70 dark:text-gray-500")),onClick:i[1]||(i[1]=f=>n("replace-all-editor-errors"))},{default:o.withCtx(()=>i[3]||(i[3]=[o.createTextVNode("모두 바꾸기")])),_:1},8,["class"])])])])}}}),sY=Vg("inline-flex items-center rounded-full border px-2.5 py-0.5 font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-ed-primary text-ed-primary-foreground hover:bg-ed-primary/80",secondary:"border-transparent bg-ed-secondary text-ed-secondary-foreground hover:bg-ed-secondary/80",destructive:"border-transparent bg-ed-destructive text-ed-destructive-foreground hover:bg-ed-destructive/80",outline:"text-ed-foreground"}},defaultVariants:{variant:"default"}}),uv=o.defineComponent({__name:"Badge",props:{variant:{},class:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)(o.unref(sY)({variant:e.variant}),e.class))},[o.renderSlot(n.$slots,"default")],2))}});function xk(t,e){return function(){return t.apply(e,arguments)}}const{toString:aY}=Object.prototype,{getPrototypeOf:cv}=Object,fh=(t=>e=>{const n=aY.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),So=t=>(t=t.toLowerCase(),e=>fh(e)===t),ph=t=>e=>typeof e===t,{isArray:jl}=Array,Fc=ph("undefined");function lY(t){return t!==null&&!Fc(t)&&t.constructor!==null&&!Fc(t.constructor)&&Or(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ck=So("ArrayBuffer");function uY(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ck(t.buffer),e}const cY=ph("string"),Or=ph("function"),kk=ph("number"),hh=t=>t!==null&&typeof t=="object",dY=t=>t===!0||t===!1,mh=t=>{if(fh(t)!=="object")return!1;const e=cv(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},fY=So("Date"),pY=So("File"),hY=So("Blob"),mY=So("FileList"),gY=t=>hh(t)&&Or(t.pipe),bY=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Or(t.append)&&((e=fh(t))==="formdata"||e==="object"&&Or(t.toString)&&t.toString()==="[object FormData]"))},vY=So("URLSearchParams"),[yY,wY,xY,CY]=["ReadableStream","Request","Response","Headers"].map(So),kY=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function $c(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,i;if(typeof t!="object"&&(t=[t]),jl(t))for(r=0,i=t.length;r<i;r++)e.call(null,t[r],r,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),a=s.length;let l;for(r=0;r<a;r++)l=s[r],e.call(null,t[l],l,t)}}function Ek(t,e){e=e.toLowerCase();const n=Object.keys(t);let r=n.length,i;for(;r-- >0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Aa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sk=t=>!Fc(t)&&t!==Aa;function dv(){const{caseless:t}=Sk(this)&&this||{},e={},n=(r,i)=>{const s=t&&Ek(e,i)||i;mh(e[s])&&mh(r)?e[s]=dv(e[s],r):mh(r)?e[s]=dv({},r):jl(r)?e[s]=r.slice():e[s]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&$c(arguments[r],n);return e}const EY=(t,e,n,{allOwnKeys:r}={})=>($c(e,(i,s)=>{n&&Or(i)?t[s]=xk(i,n):t[s]=i},{allOwnKeys:r}),t),SY=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),_Y=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},TY=(t,e,n,r)=>{let i,s,a;const l={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)a=i[s],(!r||r(a,t,e))&&!l[a]&&(e[a]=t[a],l[a]=!0);t=n!==!1&&cv(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},AY=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},MY=t=>{if(!t)return null;if(jl(t))return t;let e=t.length;if(!kk(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},OY=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&cv(Uint8Array)),BY=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},IY=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},RY=So("HTMLFormElement"),LY=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),_k=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),DY=So("RegExp"),Tk=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};$c(n,(i,s)=>{let a;(a=e(i,s,t))!==!1&&(r[s]=a||i)}),Object.defineProperties(t,r)},PY=t=>{Tk(t,(e,n)=>{if(Or(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Or(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},VY=(t,e)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return jl(t)?r(t):r(String(t).split(e)),n},FY=()=>{},$Y=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function HY(t){return!!(t&&Or(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const zY=t=>{const e=new Array(10),n=(r,i)=>{if(hh(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const s=jl(r)?[]:{};return $c(r,(a,l)=>{const u=n(a,i+1);!Fc(u)&&(s[l]=u)}),e[i]=void 0,s}}return r};return n(t,0)},UY=So("AsyncFunction"),WY=t=>t&&(hh(t)||Or(t))&&Or(t.then)&&Or(t.catch),Ak=((t,e)=>t?setImmediate:e?((n,r)=>(Aa.addEventListener("message",({source:i,data:s})=>{i===Aa&&s===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Aa.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Or(Aa.postMessage)),jY=typeof queueMicrotask<"u"?queueMicrotask.bind(Aa):typeof process<"u"&&process.nextTick||Ak,de={isArray:jl,isArrayBuffer:Ck,isBuffer:lY,isFormData:bY,isArrayBufferView:uY,isString:cY,isNumber:kk,isBoolean:dY,isObject:hh,isPlainObject:mh,isReadableStream:yY,isRequest:wY,isResponse:xY,isHeaders:CY,isUndefined:Fc,isDate:fY,isFile:pY,isBlob:hY,isRegExp:DY,isFunction:Or,isStream:gY,isURLSearchParams:vY,isTypedArray:OY,isFileList:mY,forEach:$c,merge:dv,extend:EY,trim:kY,stripBOM:SY,inherits:_Y,toFlatObject:TY,kindOf:fh,kindOfTest:So,endsWith:AY,toArray:MY,forEachEntry:BY,matchAll:IY,isHTMLForm:RY,hasOwnProperty:_k,hasOwnProp:_k,reduceDescriptors:Tk,freezeMethods:PY,toObjectSet:VY,toCamelCase:LY,noop:FY,toFiniteNumber:$Y,findKey:Ek,global:Aa,isContextDefined:Sk,isSpecCompliantForm:HY,toJSONObject:zY,isAsyncFn:UY,isThenable:WY,setImmediate:Ak,asap:jY};function ct(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}de.inherits(ct,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.status}}});const Mk=ct.prototype,Ok={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Ok[t]={value:t}}),Object.defineProperties(ct,Ok),Object.defineProperty(Mk,"isAxiosError",{value:!0}),ct.from=(t,e,n,r,i,s)=>{const a=Object.create(Mk);return de.toFlatObject(t,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),ct.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,s&&Object.assign(a,s),a};const qY=null;function fv(t){return de.isPlainObject(t)||de.isArray(t)}function Bk(t){return de.endsWith(t,"[]")?t.slice(0,-2):t}function Ik(t,e,n){return t?t.concat(e).map(function(i,s){return i=Bk(i),!n&&s?"["+i+"]":i}).join(n?".":""):e}function KY(t){return de.isArray(t)&&!t.some(fv)}const GY=de.toFlatObject(de,{},null,function(e){return/^is[A-Z]/.test(e)});function gh(t,e,n){if(!de.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!de.isUndefined(y[v])});const r=n.metaTokens,i=n.visitor||f,s=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(e);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function c(b){if(b===null)return"";if(de.isDate(b))return b.toISOString();if(!u&&de.isBlob(b))throw new ct("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(b)||de.isTypedArray(b)?u&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function f(b,v,y){let x=b;if(b&&!y&&typeof b=="object"){if(de.endsWith(v,"{}"))v=r?v:v.slice(0,-2),b=JSON.stringify(b);else if(de.isArray(b)&&KY(b)||(de.isFileList(b)||de.endsWith(v,"[]"))&&(x=de.toArray(b)))return v=Bk(v),x.forEach(function(E,C){!(de.isUndefined(E)||E===null)&&e.append(a===!0?Ik([v],C,s):a===null?v:v+"[]",c(E))}),!1}return fv(b)?!0:(e.append(Ik(y,v,s),c(b)),!1)}const p=[],m=Object.assign(GY,{defaultVisitor:f,convertValue:c,isVisitable:fv});function g(b,v){if(!de.isUndefined(b)){if(p.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));p.push(b),de.forEach(b,function(x,k){(!(de.isUndefined(x)||x===null)&&i.call(e,x,de.isString(k)?k.trim():k,v,m))===!0&&g(x,v?v.concat(k):[k])}),p.pop()}}if(!de.isObject(t))throw new TypeError("data must be an object");return g(t),e}function Rk(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function pv(t,e){this._pairs=[],t&&gh(t,this,e)}const Lk=pv.prototype;Lk.append=function(e,n){this._pairs.push([e,n])},Lk.toString=function(e){const n=e?function(r){return e.call(this,r,Rk)}:Rk;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function XY(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Dk(t,e,n){if(!e)return t;const r=n&&n.encode||XY;de.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let s;if(i?s=i(e,n):s=de.isURLSearchParams(e)?e.toString():new pv(e,n).toString(r),s){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Pk{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){de.forEach(this.handlers,function(r){r!==null&&e(r)})}}const Vk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YY={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:pv,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},hv=typeof window<"u"&&typeof document<"u",mv=typeof navigator=="object"&&navigator||void 0,JY=hv&&(!mv||["ReactNative","NativeScript","NS"].indexOf(mv.product)<0),ZY=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",QY=hv&&window.location.href||"http://localhost",qn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:hv,hasStandardBrowserEnv:JY,hasStandardBrowserWebWorkerEnv:ZY,navigator:mv,origin:QY},Symbol.toStringTag,{value:"Module"})),...YY};function NY(t,e){return gh(t,new qn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return qn.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function eJ(t){return de.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function tJ(t){const e={},n=Object.keys(t);let r;const i=n.length;let s;for(r=0;r<i;r++)s=n[r],e[s]=t[s];return e}function Fk(t){function e(n,r,i,s){let a=n[s++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),u=s>=n.length;return a=!a&&de.isArray(i)?i.length:a,u?(de.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!l):((!i[a]||!de.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],s)&&de.isArray(i[a])&&(i[a]=tJ(i[a])),!l)}if(de.isFormData(t)&&de.isFunction(t.entries)){const n={};return de.forEachEntry(t,(r,i)=>{e(eJ(r),i,n,0)}),n}return null}function nJ(t,e,n){if(de.isString(t))try{return(e||JSON.parse)(t),de.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Hc={transitional:Vk,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=de.isObject(e);if(s&&de.isHTMLForm(e)&&(e=new FormData(e)),de.isFormData(e))return i?JSON.stringify(Fk(e)):e;if(de.isArrayBuffer(e)||de.isBuffer(e)||de.isStream(e)||de.isFile(e)||de.isBlob(e)||de.isReadableStream(e))return e;if(de.isArrayBufferView(e))return e.buffer;if(de.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return NY(e,this.formSerializer).toString();if((l=de.isFileList(e))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return gh(l?{"files[]":e}:e,u&&new u,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),nJ(e)):e}],transformResponse:[function(e){const n=this.transitional||Hc.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(e)||de.isReadableStream(e))return e;if(e&&de.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(l){if(a)throw l.name==="SyntaxError"?ct.from(l,ct.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qn.classes.FormData,Blob:qn.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],t=>{Hc.headers[t]={}});const rJ=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),oJ=t=>{const e={};let n,r,i;return t&&t.split(`
|
|
@@ -336,13 +336,13 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Y=D,K=F),R===void 0&&(
|
|
|
336
336
|
`+s):r.stack=s}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Ma(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Ch.assertOptions(r,{silentJSONParsing:Qo.transitional(Qo.boolean),forcedJSONParsing:Qo.transitional(Qo.boolean),clarifyTimeoutError:Qo.transitional(Qo.boolean)},!1),i!=null&&(de.isFunction(i)?n.paramsSerializer={serialize:i}:Ch.assertOptions(i,{encode:Qo.function,serialize:Qo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ch.assertOptions(n,{baseUrl:Qo.spelling("baseURL"),withXsrfToken:Qo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&de.merge(s.common,s[n.method]);s&&de.forEach(["delete","get","head","post","put","patch","common"],b=>{delete s[b]}),n.headers=hr.concat(a,s);const l=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let f,p=0,m;if(!u){const b=[Nk.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,c),m=b.length,f=Promise.resolve(n);p<m;)f=f.then(b[p++],b[p++]);return f}m=l.length;let g=n;for(p=0;p<m;){const b=l[p++],v=l[p++];try{g=b(g)}catch(y){v.call(this,y);break}}try{f=Nk.call(this,g)}catch(b){return Promise.reject(b)}for(p=0,m=c.length;p<m;)f=f.then(c[p++],c[p++]);return f}getUri(e){e=Ma(this.defaults,e);const n=jk(e.baseURL,e.url,e.allowAbsoluteUrls);return Dk(n,e.params,e.paramsSerializer)}};de.forEach(["delete","get","head","options"],function(e){Oa.prototype[e]=function(n,r){return this.request(Ma(r||{},{method:e,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(e){function n(r){return function(s,a,l){return this.request(Ma(l||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}Oa.prototype[e]=n(),Oa.prototype[e+"Form"]=n(!0)});let TJ=class X9{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(l=>{r.subscribe(l),s=l}).then(i);return a.cancel=function(){r.unsubscribe(s)},a},e(function(s,a,l){r.reason||(r.reason=new ql(s,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new X9(function(i){e=i}),cancel:e}}};function AJ(t){return function(n){return t.apply(null,n)}}function MJ(t){return de.isObject(t)&&t.isAxiosError===!0}const xv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(xv).forEach(([t,e])=>{xv[e]=t});function nE(t){const e=new Oa(t),n=xk(Oa.prototype.request,e);return de.extend(n,Oa.prototype,e,{allOwnKeys:!0}),de.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return nE(Ma(t,i))},n}const ln=nE(Hc);ln.Axios=Oa,ln.CanceledError=ql,ln.CancelToken=TJ,ln.isCancel=Hk,ln.VERSION=eE,ln.toFormData=gh,ln.AxiosError=ct,ln.Cancel=ln.CanceledError,ln.all=function(e){return Promise.all(e)},ln.spread=AJ,ln.isAxiosError=MJ,ln.mergeConfig=Ma,ln.AxiosHeaders=hr,ln.formToJSON=t=>Fk(de.isHTMLForm(t)?new FormData(t):t),ln.getAdapter=Qk.getAdapter,ln.HttpStatusCode=xv,ln.default=ln;const{Axios:zce,AxiosError:Uce,CanceledError:Wce,isCancel:jce,CancelToken:qce,VERSION:Kce,all:Gce,Cancel:Xce,isAxiosError:Yce,spread:Jce,toFormData:Zce,AxiosHeaders:Qce,HttpStatusCode:Nce,formToJSON:ede,getAdapter:tde,mergeConfig:nde}=ln;function OJ(t){let e=t;for(;e&&e!==document.body;){if(e.nodeType===1){const n=e;if(n.id==="editor-panel")return n}e=e.parentNode}return null}const kh=t=>{var n;if(!t)return!0;const e=document.createElement("div");return e.innerHTML=t,((n=e==null?void 0:e.textContent)==null?void 0:n.trim())===""},BJ=t=>{if(!t)return"";const{from:e,to:n}=t.state.selection,r=t.state.doc.cut(e,n),s=$r.fromSchema(t.schema).serializeFragment(r.content),a=document.createElement("div");return a.appendChild(s),a.innerHTML},IJ=t=>/<\/?[a-z][\s\S]*>/i.test(t);var mr=(t=>(t.TOGGLE_SUPER_TEXT="toggle-super-text",t.SUPER_TEXT_UPDATE_POSITION="SUPER_TEXT_UPDATE_POSITION",t.RENDER_SUPER_TEXT="RENDER_SUPER_TEXT",t.SUPER_VIEW_PAGE="SUPER_VIEW_PAGE",t.INCREASE_DECREASE_FONTSIZE="increase-decrease-fontsize",t))(mr||{});const rE=8;function RJ(t,e){const n=o.ref(!1);let r=!1,i=null,s=null,a=null,l=null,u=0,c=0;function f(k){const E=k.cloneNode(!0);return E.style.position="fixed",E.style.pointerEvents="none",E.style.opacity="0.9",E.style.zIndex="9999",E.style.transform="translate(-50%, -50%)",E.style.left="0px",E.style.top="0px",document.body.appendChild(E),E}function p(){s&&s.parentElement&&s.parentElement.removeChild(s),s=null}function m(){try{if(typeof t.getPos=="function"){const k=t.getPos();if(typeof k=="number"&&k>=0)return k}}catch{}return null}function g(k,E){n.value||(l=m(),document.body.style.userSelect="none",document.body.style.touchAction="none",E&&(s=f(E),s.style.left=`${k.clientX}px`,s.style.top=`${k.clientY}px`),n.value=!0,r=!1,a=null)}function b(){i=null,l=null,a=null,r=!1,n.value=!1,p(),document.body.style.userSelect="",document.body.style.touchAction=""}function v(k){if(o.unref(e)||n.value)return;const E=k.changedTouches[0];i=E.identifier,u=E.clientX,c=E.clientY,r=!0,l=null,a=null}function y(k){var A;if(!r&&!n.value||i===null)return;const E=Array.from(k.changedTouches).find(V=>V.identifier===i);if(!E)return;const C=E.clientX-u,_=E.clientY-c,T=C*C+_*_;if(!n.value&&r&&T>=rE*rE){const V=k.currentTarget||k.target||null;g(E,V)}if(n.value){s&&(s.style.left=`${E.clientX}px`,s.style.top=`${E.clientY}px`);try{const V=(A=t.editor)==null?void 0:A.view;if(!V){a=null;return}const O=V.posAtCoords({left:E.clientX,top:E.clientY});O&&typeof O.pos=="number"?a=O.pos:a=null}catch{a=null}}}async function x(k){var E;if(n.value){if(document.body.style.userSelect="",document.body.style.touchAction="",p(),n.value=!1,l===null||a===null){b();return}const C=(E=t.editor)==null?void 0:E.view;if(!C){b();return}const _=C.state.doc.nodeAt(l);if(!_){b();return}const T=_.nodeSize,A=l,V=A+T,O=a;if(O>=A&&O<=V){b();return}let B=O;O>A&&(B=O-T);const $=C.state.doc.content.size;B<0&&(B=0),B>$&&(B=$);const H=_.type.create(_.attrs),X=C.state.tr;X.delete(A,V),X.insert(B,H),C.dispatch(X),b();return}if(r){b();return}}return{onTouchStart:v,onTouchMove:y,onTouchEnd:x}}function LJ(...t){return gy(Om(t))}const DJ=["innerHTML"],PJ=["book-mark-node-id","book-mark-content","node-id","element-id","line-id"],VJ=o.defineComponent({__name:"SuperText",props:na,setup(t){const e=t,n=o.ref(!1),r=o.inject("isMobile",!1),i=o.computed(()=>e.editor.storage.superText.enable),s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),{onTouchStart:a,onTouchMove:l,onTouchEnd:u}=RJ(e,i),c=o.ref(null),f=o.ref(!1),p=()=>{f.value=!0},m=()=>{f.value=!1};o.watch(f,()=>{f.value&&_(c.value)});const g={mouseenter:C,mouseleave:_,dragstart:p,dragend:m},b={touchstart:a,touchmove:l,touchend:u,touchcancel:u},v=o.computed(()=>r?b:g),y=o.computed(()=>{const B=e.getPos(),$=e.editor.state.doc.resolve(B);for(let H=$.depth;H>0;H--){const X=$.node(H);if(X.type.name==="paragraph")return X}return null}),x=o.computed(()=>{var B;return((B=y.value)==null?void 0:B.attrs.id)||""}),k=o.inject("canEditSuper",o.ref(!0));function E(B){var L,D;if(kh(B)){T();return}const $=e.getPos(),H=(L=e.editor)==null?void 0:L.state.doc.nodeAt($),X=B.trim(),{[it.ELEMENT_ID]:ee,...z}=(H==null?void 0:H.attrs)||{};(D=e.editor)==null||D.view.dispatch(e.editor.state.tr.setNodeMarkup($,void 0,{...z,[it.TEXT]:X})),requestAnimationFrame(()=>{e.editor.commands.setTextSelection($+1),e.editor.view.focus()})}function C(B){c.value=B;const $=e.node.attrs[it.TEXT],H=e.node.attrs[it.ID],ee={lineId:B.target.querySelector(`[node-id="${H}"]`).getAttribute("line-id"),dataId:H,text:$};s.emit({action:"hover",payload:ee})}function _(B){const $=e.node.attrs[it.ID],X={lineId:B==null?void 0:B.target.querySelector(`[node-id="${$}"]`).getAttribute("line-id"),dataId:$,text:""};s.emit({action:"hover",payload:X}),c.value=null}function T(){const{getPos:B,node:$,editor:H}=e,X=B(),ee=X+1;H.commands.deleteRange({from:X,to:ee})}function A(){if(!k.value)return;const{attributes:B}=e.editor.options.editorProps;if(B&&B.id===dr.COMMENT){const $=document.getElementById(dr.COMMENT);if(($==null?void 0:$.getAttribute(dr.DISABLE_SUPER_INPUT))==="true")return}e.editor.view.dom.blur(),n.value=!0}function V(){e.editor.commands.setSuperTextContent(e.node.attrs[it.TEXT],e.node.attrs[it.POSITION]),e.editor.commands.toggleSuperInputMoblie()}o.watch(i,B=>{r&&(e.editor.setEditable(!B),B?e.editor.view.dom.classList.add("super-text-view-mode"):e.editor.view.dom.classList.remove("super-text-view-mode"))});const O=o.computed(()=>e.node.attrs[it.TEXT].replace(/<p><\/p>\s*$/,"<p> </p>"));return(B,$)=>{const H=bn,X=ov,ee=rv,z=nv,L=tv,D=Wc;return o.openBlock(),o.createBlock(o.unref(ta),o.mergeProps({as:"span",class:o.unref(LJ)("text-inherit super-text shrink-0 inline-flex items-center justify-center",o.unref(r)&&i.value&&"block"),"data-drag-handle":"",draggable:o.unref(k)},o.toHandlers(v.value)),{default:o.withCtx(()=>[o.unref(r)&&!i.value?(o.openBlock(),o.createElementBlock("button",{key:0,class:"w-6 inline-flex justify-center rounded text-ed-red-500 active:bg-ed-accent",onClick:o.withModifiers(V,["stop"])},[o.createVNode(o.unref(Ot),{name:"fileEdit2",class:"w-5 h-5"})])):o.createCommentVNode("",!0),o.unref(r)&&i.value?(o.openBlock(),o.createElementBlock("div",{key:1,class:"super-text-view-mode-item whitespace-break-spaces wrap-anywhere",onClick:o.withModifiers(V,["stop"]),innerHTML:O.value},null,8,DJ)):o.createCommentVNode("",!0),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(L,{key:2},{default:o.withCtx(()=>[o.createVNode(X,{as:"template",class:"relative",disabled:!o.unref(k)},{default:o.withCtx(()=>[o.createVNode(H,{class:o.normalizeClass([{"pointer-events-none":!o.unref(k)},"!p-0 !m-0 !h-fit"]),variant:"ghost",onDblclick:o.withModifiers(A,["stop"])},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"fileEdit"}),o.createElementVNode("div",{ref:"bookMarkRef","book-mark-node-id":e.node.attrs[o.unref(it).ID],"book-mark-content":e.node.attrs[o.unref(it).TEXT],"node-id":e.node.attrs[o.unref(it).ID],"element-id":e.node.attrs[o.unref(it).ELEMENT_ID],"line-id":x.value},null,8,PJ)]),_:1},8,["class"])]),_:1},8,["disabled"]),o.createVNode(z,null,{default:o.withCtx(()=>[o.createVNode(ee,{onSelect:$[0]||($[0]=F=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(B.$t("editor.super.edit")),1)]),_:1}),o.createVNode(ee,{onSelect:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(B.$t("editor.super.delete")),1)]),_:1})]),_:1})]),_:1})),o.unref(r)?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(D,{key:3,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(it).TEXT],"super-text-element-id":e.node.attrs[o.unref(it).ELEMENT_ID],onClose:$[1]||($[1]=F=>n.value=!1),onSave:E},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},16,["class","draggable"])}}}),FJ=new ot({props:{handleKeyDown(t,e){var n;if(e.key==="Backspace"){const{state:r,dispatch:i}=t,{$from:s}=r.selection;if(s.parentOffset===1){const u=s.nodeAfter;if(u&&u.type.name==="superText"){const c=r.tr;return c.delete(s.pos-1,s.pos),c.setSelection(De.create(c.doc,s.pos-1)),i(c),e.preventDefault(),!0}}const a=s.nodeBefore,l=s.nodeAfter;if(a&&a.isText&&((n=a.text)==null?void 0:n.length)===1&&l&&l.type.name==="superText"){const u=s.parent.childBefore(s.parentOffset-1).node;if(u&&u.type.name==="superText"){const c=r.tr;return c.delete(s.pos-1,s.pos),c.setSelection(De.create(c.doc,s.pos-1)),i(c),e.preventDefault(),!0}}}return!1}}}),$J=new ot({appendTransaction(t,e,n){const r=new Set;let i=n.tr,s=!1;return n.doc.descendants((a,l)=>{if(a.type.name===Uc){const u=a.attrs[it.ID];if(!u||r.has(u)){const c=Zr();i=i.setNodeMarkup(l,void 0,{...a.attrs,[it.ID]:c}),s=!0,r.add(c)}else r.add(u)}}),s?i:null}}),Uc="superText",oE={UPDATE:"superTextUpdate"},iE=Dt.create({name:"superText",inline:!0,group:"inline",selectable:!1,defining:!0,draggable:!0,addStorage(){return{enable:!0,isShowSuperInputMoblie:!1,view:!0,items:[],superInputModal:this.options.superInputModal,toggleSuperViewMobileCallBack:this.options.toggleSuperViewMobileCallBack,bottomSheetComponent:this.options.bottomSheetComponent,addToast:this.options.addToast,superTextContent:"",superTextPosition:""}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>n?[{component:Ge,componentProps:{action:()=>{t.commands.toggleSuperInputMoblie()},isActive:()=>{},icon:"fileEdit",title:e("editor.menubar.menu.insertSuper"),tooltip:e("editor.menubar.menu.insertSuper"),customClass:"whitespace-nowrap !bg-ed-blue active:!bg-ed-blue/90 !transition-none !text-white !font-normal rounded-[3px] h-[26px] ml-auto",customClassTooltip:"ml-auto"}}]:[{component:Ge,componentProps:{action:()=>t.commands.toggleSuperTextView(),isActive:()=>t.storage.superText.enable,title:e("editor.menubar.menu.superView"),customClass:`whitespace-nowrap !text-white !font-normal rounded-[3px] h-[26px]
|
|
337
337
|
${t.storage.superText.enable?"!bg-blue-500":"!bg-gray-600"}
|
|
338
338
|
`,tooltip:"수퍼 보기",customClassTooltip:"flex items-center justify-center"}}]}},addAttributes(){return{[it.ID]:{default:null},[it.TEXT]:{default:""},[it.POSITION]:{default:"0"},[it.ELEMENT_ID]:{default:""}}},addCommands(){return{toggleSuperTextView:()=>({editor:t})=>t.storage.superText.enable=!t.storage.superText.enable,toggleSuperInputMoblie:()=>({editor:t})=>t.storage.superText.bottomSheetComponent?t.storage.superText.isShowSuperInputMoblie=!t.storage.superText.isShowSuperInputMoblie:(console.error("Please configure bottomSheetComponent!"),!1),setSuperTextContent:(t,e)=>({editor:n})=>(n.storage.superText.superTextContent=t,n.storage.superText.superTextPosition=e,!!t)}},parseHTML(){return[{tag:"button.super-text"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"super-text"})]},addNodeView(){return ra(VJ)},addProseMirrorPlugins(){return[new ot({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="superText"){const l=s.attrs[it.POSITION],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,[it.POSITION]:u}),i=!0)}}),i?r:null}}),new ot({filterTransaction(t,e){return t.steps.some(r=>{if(r.toJSON&&r.toJSON().stepType==="replace"){const i=r.toJSON();return i.slice&&i.slice.content&&i.slice.content.some(s=>s.type===Uc)}return!1})&&t.setMeta(oE.UPDATE,!0),!0}}),FJ,$J]}}),Cv="spell-check";class HJ{constructor(e,n,r,i=1e3,s=$o.ERROR_TYPE,a=ts,l){$t(this,"debouncedGetMatchAndSetDecorations",Et.debounce(this.getMatchAndSetDecorations.bind(this),300));$t(this,"debouncedGetMatchAndSetDecorationsList",Et.debounce(this.getMatchAndSetDecorationsList.bind(this),300));$t(this,"debouncedClickEventsListener",this.clickEventsListener.bind(this));$t(this,"debouncedAcceptSuggestionEventsListener",this.acceptSuggestionListener.bind(this));$t(this,"debouncedProofreadChangedNodes",Et.debounce(this.proofreadChangedNodes.bind(this),300));$t(this,"proofreader");$t(this,"uiStrings");$t(this,"showSuggestionsEvent");$t(this,"decorationSet");$t(this,"editorView");$t(this,"isInitialProofreadingDone",!1);$t(this,"lastOriginalFrom",0);$t(this,"lastClickedDecoration",null);$t(this,"suggestionBox");$t(this,"isEnableSuggestion");$t(this,"isMobile");$t(this,"limit",1e3);$t(this,"docLimit");$t(this,"spellcheckHighlightMode");$t(this,"spellcheckHighlightColor");$t(this,"_debouncedProofreadDoc",Et.debounce((e,n)=>{this.proofreadDoc(e),n&&n()},500));$t(this,"_debouncedHandleEnterKey",Et.debounce((e,n,r)=>{this.handleEnterKey(e,n),r&&r()},500));this.proofreader=e,this.uiStrings=n,this.showSuggestionsEvent=r,this.decorationSet=ut.empty,this.limit=i,this.docLimit=l,this.spellcheckHighlightMode=s,this.spellcheckHighlightColor=a,this.suggestionBox=document.createElement("div"),this.suggestionBox.id="suggestions-box",this.suggestionBox.tabIndex=0,this.isEnableSuggestion=!0,this.isMobile=!1,this.hideSuggestionBox()}get completeProofreadingDone(){return this.isInitialProofreadingDone}getProofreader(){return this.proofreader}toggleIsEnabledSpellCheck(){this.proofreader.toggleIsEnabled()}setEnabledProofreadText(e){this.proofreader.setEnabled(e)}getIsEnabledSpellCheck(){return this.proofreader.getIsEnabled()}setDecorationSet(e){this.decorationSet=e}getDecorationSet(){return this.decorationSet}setEditorView(e){this.editorView=e}getEditorView(){return this.editorView}getSuggestionBox(){return this.suggestionBox}hideSuggestionBox(){this.suggestionBox.textContent="",this.suggestionBox.style.display="none"}setIsEnableSuggestion(e){if(this.isEnableSuggestion=e,this.isEnableSuggestion){this.addEventListenersToDecorations();return}this.hideSuggestionBox(),this.removeEventListenersFromDecorations()}setIsMobile(e){this.isMobile=e}getChangedNodesFromTransaction(e,n=!1,r=!1){const i=[],s=new Set;let a=!1;return e.steps.forEach(l=>{var p,m,g;const u=l;if(u.from===void 0||u.to===void 0||n&&u.structure)return;((m=(p=u.slice)==null?void 0:p.content[0])==null?void 0:m.type.name)===Uc&&(a=!0);const c=u.from-(r?1:0);let f=Math.max(u.to,u.from+(((g=u.slice)==null?void 0:g.size)||0))-(r?1:0);f>e.doc.content.size&&(f=e.doc.content.size),e.doc.nodesBetween(c,f,(b,v)=>{b&&(b.isText&&!s.has(v)&&(i.push({node:b,pos:v}),s.add(v)),b.type.name===Uc&&(a=!0))})}),{changedNodes:i,isChangedSuperText:a}}debouncedProofreadDoc(e,n){this._debouncedProofreadDoc(e,n)}isSuperTextAlone(e,n){let r=!1;return e.descendants((i,s,a)=>i===n?(a&&a.type.name==="paragraph"&&a.childCount===1&&a.firstChild===n&&(r=!0),!1):!0),r}isDocExceedLimit(e){return!!(this.docLimit&&e.textContent.length>this.docLimit)}proofreadDoc(e){if(this.isDocExceedLimit(e))return;let n=[],r=0;e==null||e.descendants((u,c)=>{if(u.isText){const f={text:u.text??"",from:c,to:c+u.nodeSize};return n[r]&&(f.text=n[r].text+f.text,f.from=n[r].from),n[r]=f,r+=1,!1}return u.type.name!==Uc}),n=n.filter(Boolean);let i="",s=1;for(const{text:u,from:c,to:f}of n){const p=c-s;p>0&&(i+=Array(p+1).join(`
|
|
339
|
-
`)),s=f,i+=u}const a=f6(i,this.limit),l=this.getMatchAndSetDecorationsList(a.map(u=>({text:u.text,originalFrom:u.offset+1})));this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.LOADING_TRANSACTION,!0)),l.then(()=>{this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.LOADING_TRANSACTION,!1))}),this.isInitialProofreadingDone=!0}async proofreadChangedNodes(e){if(this.editorView&&this.isDocExceedLimit(this.editorView.state.doc))return;const n=this.isMobile?1:2,i=e.reduce((s,a)=>{if(s.length===0)return s.push({changedNode:a,time:1}),s;const l=s[s.length-1];return a.pos===l.changedNode.pos+l.changedNode.node.nodeSize+n*(l.time-1)?(l.changedNode.node.text+=a.node.text,l.time+=1):s.push({changedNode:a,time:1}),s},[]).map(({changedNode:s})=>{var c;const a=((c=s.node)==null?void 0:c.textContent)||"",l=s.pos;return f6(a,this.limit).map(f=>({text:f.text,originalFrom:l+f.offset}))});this.debouncedGetMatchAndSetDecorationsList(i.flat())}async getMatchAndSetDecorationsList(e){const n=e.map(r=>this.getMatchAndSetDecorations(r.text,r.originalFrom));await Promise.all(n)}async getMatchAndSetDecorations(e,n){const r=await this.proofreader.proofreadText(this.proofreader.normalizeTextForLanguage(e)),i=[];for(const l of r){const u=l.startIndex+n,c=u+l.length,f=await this.proofreader.getSuggestions(l.wrongWord),p={length:l.length,wrongWord:l.wrongWord,suggestions:f};let m="spell-error",g="";this.spellcheckHighlightMode===$o.SINGLE?g=`border-bottom: 2px solid ${this.spellcheckHighlightColor};`:m=`spell-error ${n6[l.errorType??-1]??r6}`,i.push(Gt.inline(u,c,{class:m,nodeName:"span",style:g,[Cv]:JSON.stringify(p)}))}const s=this.decorationSet.find(n,n+e.length);let a=this.decorationSet.remove(s);this.editorView&&(a=a.add(this.editorView.state.doc,i)),this.setDecorationSet(a),this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.SPELLCHECKER_TRANSACTION,!0)),this.addEventListenersToDecorations()}removeEventListenersFromDecorations(){var r;const e=(r=this.editorView)==null?void 0:r.domAtPos(this.lastOriginalFrom).node,n=(e==null?void 0:e.querySelectorAll("span.spell-error"))||[];n.length&&n.forEach(i=>{i.removeEventListener("click",this.debouncedClickEventsListener)})}addEventListenersToDecorations(){var e;if(this.isEnableSuggestion)try{const n=(e=this.editorView)==null?void 0:e.domAtPos(this.lastOriginalFrom).node,r=(n==null?void 0:n.querySelectorAll("span.spell-error"))||[];if(!r.length)return;r.forEach(i=>{i.addEventListener("click",this.debouncedClickEventsListener)})}catch{}}addEventListenersToSuggestionBox(){const e=this.suggestionBox.querySelectorAll("li");e.length&&e.forEach(n=>{n.addEventListener("mousedown",this.debouncedAcceptSuggestionEventsListener)})}dispatch(e){this.editorView&&this.editorView.dispatch(e)}findChangedTextNodes(e,n,r,i){if(!e.isBlock)return!1;if(!e.isTextblock)return e.descendants((u,c)=>{this.findChangedTextNodes(u,c,r,i)}),!1;const[s,a]=[n,n+e.nodeSize];if(!(s<=r&&i<=a))return;const l={node:e,pos:n};this.onNodeChanged(l.node.textContent,l.pos+1)}onNodeChanged(e,n){n!==this.lastOriginalFrom?this.getMatchAndSetDecorations(e,n):this.debouncedGetMatchAndSetDecorations(e,n),this.lastOriginalFrom=n}async clickEventsListener(e){var c,f;if(!e.target)return;let n=e.target;for(;n&&!n.classList.contains("spell-error");)n=n.parentElement;if(!n||!n.classList.contains("spell-error"))return;this.lastClickedDecoration=n;const r=(c=n.getAttribute(Cv))==null?void 0:c.trim();if(!r){console.error("No match string provided",{spellCheckerAttributes:r});return}const{length:i,wrongWord:s,suggestions:a}=JSON.parse(r),l=((f=this.editorView)==null?void 0:f.posAtDOM(n,0))??0,u=l+i;if(this.editorView){this.addSuggestionsList(a,l,u),this.suggestionBox.style.display="";const p=OJ(n);if(!p)return;const m=n.getBoundingClientRect(),g=p.getBoundingClientRect(),b=window.getComputedStyle(p).padding,v=m.left-g.left+3-parseInt(b);let y=m.top-g.top+30-parseInt(b);this.suggestionBox.style.left=v+"px",this.suggestionBox.style.top=y+"px";const x=this.suggestionBox.getBoundingClientRect();x.bottom>g.bottom&&(y=m.top-g.top-x.height-7-parseInt(b),this.suggestionBox.style.top=y+"px"),this.showSuggestionsEvent&&this.showSuggestionsEvent(this.proofreader.normalizeTextForLanguage(s)),setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100)}return this.addEventListenersToSuggestionBox(),!1}acceptSuggestionListener(e){var s;if(!e||!e.target)return;e.preventDefault(),e.stopPropagation();const n=e.target;let r=0,i=0;if(this.lastClickedDecoration&&this.editorView){const a=(s=this.lastClickedDecoration.getAttribute(Cv))==null?void 0:s.trim();if(a){const{length:l}=JSON.parse(a);r=this.editorView.posAtDOM(this.lastClickedDecoration,0),i=r+l}}if(this.editorView&&r>=0&&i>r){this.dispatch(this.editorView.state.tr.setMeta(Kn.ACCEPT_SUGGESTION,!0));const a=n.textContent||"",l=this.editorView.state.tr.insertText(a,r,i),u=r+a.length,c=De.create(l.doc,u);l.setSelection(c),this.dispatch(l),this.editorView.focus()}this.hideSuggestionBox(),this.lastClickedDecoration&&(this.lastClickedDecoration.removeEventListener("click",this.debouncedClickEventsListener),this.lastClickedDecoration=null)}addSuggestionsList(e,n,r){if(this.suggestionBox.textContent="",e.length>0){const i=document.createElement("ul");i.className="suggestion-list",e.forEach(s=>{const a=document.createElement("li");a.innerText=s,a.dataset.from=n+"",a.dataset.to=r+"",i.appendChild(a)}),this.suggestionBox.appendChild(i)}if(e.length===0){const i=document.createElement("b"),s=this.uiStrings&&this.uiStrings.noSuggestions?this.uiStrings.noSuggestions:"No suggestions found";i.textContent=s,this.suggestionBox.appendChild(i)}}isUndoRedo(e,n){return e.getMeta(K5.ADD_TO_HISTORY_TRANSACTION)===!1||e.getMeta(Kn.APPENDED)===!0||n.isUndoRedoOperation}handleUndoRedo(e,n){var s;const r=(s=e.getMeta(K5.HISTORY_TRANSACTION))==null?void 0:s.redo;if(n.isUndoRedoOperation=!1,r)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const{changedNodes:i}=this.getChangedNodesFromTransaction(e,!0);return i.length===0?this.getDecorationSet():i.length===1?(this.debouncedProofreadChangedNodes(i),this.getDecorationSet()):(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}isTextContentChangedOrDeleted(e){let n=!1;return{isTextContentChanged:e.steps.some(i=>{var a,l;const s=(a=i.toJSON)==null?void 0:a.call(i);return(s==null?void 0:s.stepType)==="replace"&&((l=s==null?void 0:s.slice)!=null&&l.content)?s.slice.content.some(u=>u.type==="paragraph"&&u.content&&u.content.length>0):(s==null?void 0:s.stepType)==="replace"&&(!s.slice||!s.slice.content||s.slice.content.length===0)?(n=!0,s.from!==s.to):!1}),isDeleteAction:n}}handleEnterKey(e,n){if(n)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const r=e.getMeta(Kn.APPENDED_TRANSACTION);if(!r)return this.getDecorationSet();const s=r.steps[0].to,a=r.before.nodeAt(s-1);if(!(a!=null&&a.isText))return this.getDecorationSet();let l=0;return r.before.descendants((c,f)=>{c.textContent===(a==null?void 0:a.textContent)&&(l=f)}),l+((a==null?void 0:a.nodeSize)||0)===s?this.getDecorationSet():(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}handleEnterKeyDebounced(e,n,r){this._debouncedHandleEnterKey(e,n,r)}}const sE=wn(),Kn={SPELLCHECKER_TRANSACTION:"spellcheckerTransaction",IS_ACTIVE_SPELLCHECK:"isActiveSpellCheck",LOADING_TRANSACTION:"loading",PREVENT_UPDATE:"preventUpdate",APPENDED:"appended",APPENDED_TRANSACTION:"appendedTransaction",ACCEPT_SUGGESTION:"acceptSuggestion",SKIP_SPELLCHECK:"skipSpellcheck",UI_EVENT:"uiEvent"},zJ={DROP:"drop"},aE=tt.create({name:"spellchecker",addOptions(){return{proofreader:void 0,uiStrings:{noSuggestions:""},spellcheckHighlightMode:$o.ERROR_TYPE,spellcheckHighlightColor:ts,button:({editor:t,t:e,isMobile:n})=>({component:Ge,componentProps:{action:()=>t.commands.handleActiveSpellCheck(),isActive:()=>{var r,i,s,a;return((a=(s=(i=(r=t==null?void 0:t.extensionStorage)==null?void 0:r.spellchecker)==null?void 0:i.spellchecker)==null?void 0:s.proofreader)==null?void 0:a.enabled)||!1},icon:"SpellCheck",tooltip:"맞춤법 검사",title:n?e("editor.menubar.menu.spelling"):"",customClassTooltip:"flex items-center justify-center"}})}},addStorage(){return{didPaste:!1,spellchecker:void 0,isUndoRedoOperation:!1,pendingSpellCheck:!1,enterKeyPressed:!1}},addCommands(){return{checkSpelling:()=>({tr:t})=>(this.storage.spellchecker.proofreadDoc(t.doc),!0),selectAll:()=>({state:t,dispatch:e})=>(yM(t,e),!0),copy:()=>()=>(document.execCommand("copy"),!0),handleActiveSpellCheck:(t=!0)=>({editor:e})=>{const n=e.extensionStorage.spellchecker.spellchecker;return n.toggleIsEnabledSpellCheck(),e.view.dispatch(e.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,n.getIsEnabledSpellCheck())),t&&sE.setSpellCheck(n.getIsEnabledSpellCheck()),n.hideSuggestionBox(),WC(e)&&e.commands.focus(),!0},setIsEnableSuggestion:t=>()=>(this.storage.spellchecker.setIsEnableSuggestion(t),!0)}},addProseMirrorPlugins(){return[new ot({key:new kt("skipMarkPlugin"),view:e=>{const n=e.dispatch;return e.dispatch=r=>(r.steps.some(s=>s instanceof ii||s instanceof uo)&&r.setMeta(Kn.SKIP_SPELLCHECK,!0),n.call(e,r)),{}}}),new ot({key:new kt("spellcheckerPlugin"),props:{decorations(e){return this.getState(e)},handlePaste:()=>{this.storage.didPaste=!0},handleClick:()=>{this.storage.spellchecker.hideSuggestionBox()},handleKeyDown:(e,n)=>((n.ctrlKey||n.metaKey)&&(n.key==="z"||n.key==="y")&&(this.storage.isUndoRedoOperation=!0,this.storage.pendingSpellCheck=!0),this.storage.enterKeyPressed&&(this.storage.pendingSpellCheck=!0),n.key==="Enter"&&(this.storage.enterKeyPressed=!0),!1)},state:{init:(e,n)=>{var i,s;const r=new HJ(this.options.proofreader,this.options.uiStrings,this.options.onShowSuggestionsEvent,(i=this.options.proofreader)==null?void 0:i.limit,this.options.spellcheckHighlightMode??$o.ERROR_TYPE,this.options.spellcheckHighlightColor??ts,this.options.docLimit);return this.storage.spellchecker=r,r.setDecorationSet(ut.create(n.doc,[])),sE.setSpellCheck(r.getIsEnabledSpellCheck()),(s=this.options.proofreader)!=null&&s.enabled&&r.proofreadDoc(n.doc),r.getDecorationSet()},apply:(e,n)=>{var s;if(e.getMeta(Kn.SKIP_SPELLCHECK))return n;const r=this.storage.spellchecker,i=e.getMeta(Kn.IS_ACTIVE_SPELLCHECK);if(i!==void 0)return i?r.proofreadDoc(e.doc):r.setDecorationSet(ut.empty),r.getDecorationSet();if(e.getMeta(Kn.SPELLCHECKER_TRANSACTION))return r.getDecorationSet();if(e.docChanged&&e.doc.nodeSize){const l=r.getDecorationSet().map(e.mapping,e.doc);if(r.setDecorationSet(l),e.getMeta(Kn.UI_EVENT)===zJ.DROP)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();if(r.isUndoRedo(e,this.storage))return r.handleUndoRedo(e,this.storage);const{isTextContentChanged:u,isDeleteAction:c}=r.isTextContentChangedOrDeleted(e);if(c){const{changedNodes:g}=r.getChangedNodesFromTransaction(e,!1,!0);return g.length>0&&r.debouncedProofreadChangedNodes([g[0]]),r.getDecorationSet()}if(this.storage.enterKeyPressed)return r.handleEnterKeyDebounced(e,this.storage.pendingSpellCheck,()=>{this.storage.enterKeyPressed=!1,this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(this.storage.pendingSpellCheck||u)return r.debouncedProofreadDoc(e.doc,()=>{this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(e.getMeta(oE.UPDATE)||e.updated===0&&((s=e.steps[0])==null?void 0:s.structure)===!0)return r.getDecorationSet();if(e.getMeta(Kn.PREVENT_UPDATE)===!0&&e.before.textContent.length===0)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();this.storage.didPaste&&(this.storage.didPaste=!1);const{changedNodes:p,isChangedSuperText:m}=r.getChangedNodesFromTransaction(e);if(m)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();p.length>0&&r.debouncedProofreadChangedNodes(p)}return r.getDecorationSet()}},view:()=>({update:e=>{var r,i;const n=this.storage.spellchecker;n.setEditorView(e),(i=(r=e==null?void 0:e.dom)==null?void 0:r.parentNode)==null||i.appendChild(n.getSuggestionBox())}})})]}}),UJ=()=>{const t=o.reactive({[Fo.EDITOR_COMMENT]:{editor:null,wrongWords:[]},[Fo.EDITOR_CONTENT]:{editor:null,wrongWords:[]}});function e(x,k){t[x].editor=k}const n=o.ref(fo.NO_ERROR);function r(){Object.values(t).forEach(x=>{x.wrongWords=[]})}function i(x,k){return x?fo.FAIL:k?fo.HAS_ERROR:fo.NO_ERROR}async function s(){var E,C;n.value=fo.LOADING;let x=!1,k=!1;for(const[_,{editor:T}]of Object.entries(t)){if(!T)continue;const A=(E=T==null?void 0:T.extensionManager.extensions.find(O=>O.name==="spellchecker"))==null?void 0:E.options.proofreader.api,V=T.getText({blockSeparator:`
|
|
339
|
+
`)),s=f,i+=u}const a=fx(i,this.limit),l=this.getMatchAndSetDecorationsList(a.map(u=>({text:u.text,originalFrom:u.offset+1})));this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.LOADING_TRANSACTION,!0)),l.then(()=>{this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.LOADING_TRANSACTION,!1))}),this.isInitialProofreadingDone=!0}async proofreadChangedNodes(e){if(this.editorView&&this.isDocExceedLimit(this.editorView.state.doc))return;const n=this.isMobile?1:2,i=e.reduce((s,a)=>{if(s.length===0)return s.push({changedNode:a,time:1}),s;const l=s[s.length-1];return a.pos===l.changedNode.pos+l.changedNode.node.nodeSize+n*(l.time-1)?(l.changedNode.node.text+=a.node.text,l.time+=1):s.push({changedNode:a,time:1}),s},[]).map(({changedNode:s})=>{var c;const a=((c=s.node)==null?void 0:c.textContent)||"",l=s.pos;return fx(a,this.limit).map(f=>({text:f.text,originalFrom:l+f.offset}))});this.debouncedGetMatchAndSetDecorationsList(i.flat())}async getMatchAndSetDecorationsList(e){const n=e.map(r=>this.getMatchAndSetDecorations(r.text,r.originalFrom));await Promise.all(n)}async getMatchAndSetDecorations(e,n){const r=await this.proofreader.proofreadText(this.proofreader.normalizeTextForLanguage(e)),i=[];for(const l of r){const u=l.startIndex+n,c=u+l.length,f=await this.proofreader.getSuggestions(l.wrongWord),p={length:l.length,wrongWord:l.wrongWord,suggestions:f};let m="spell-error",g="";this.spellcheckHighlightMode===$o.SINGLE?g=`border-bottom: 2px solid ${this.spellcheckHighlightColor};`:m=`spell-error ${nx[l.errorType??-1]??rx}`,i.push(Gt.inline(u,c,{class:m,nodeName:"span",style:g,[Cv]:JSON.stringify(p)}))}const s=this.decorationSet.find(n,n+e.length);let a=this.decorationSet.remove(s);this.editorView&&(a=a.add(this.editorView.state.doc,i)),this.setDecorationSet(a),this.editorView&&this.dispatch(this.editorView.state.tr.setMeta(Kn.SPELLCHECKER_TRANSACTION,!0)),this.addEventListenersToDecorations()}removeEventListenersFromDecorations(){var r;const e=(r=this.editorView)==null?void 0:r.domAtPos(this.lastOriginalFrom).node,n=(e==null?void 0:e.querySelectorAll("span.spell-error"))||[];n.length&&n.forEach(i=>{i.removeEventListener("click",this.debouncedClickEventsListener)})}addEventListenersToDecorations(){var e;if(this.isEnableSuggestion)try{const n=(e=this.editorView)==null?void 0:e.domAtPos(this.lastOriginalFrom).node,r=(n==null?void 0:n.querySelectorAll("span.spell-error"))||[];if(!r.length)return;r.forEach(i=>{i.addEventListener("click",this.debouncedClickEventsListener)})}catch{}}addEventListenersToSuggestionBox(){const e=this.suggestionBox.querySelectorAll("li");e.length&&e.forEach(n=>{n.addEventListener("mousedown",this.debouncedAcceptSuggestionEventsListener)})}dispatch(e){this.editorView&&this.editorView.dispatch(e)}findChangedTextNodes(e,n,r,i){if(!e.isBlock)return!1;if(!e.isTextblock)return e.descendants((u,c)=>{this.findChangedTextNodes(u,c,r,i)}),!1;const[s,a]=[n,n+e.nodeSize];if(!(s<=r&&i<=a))return;const l={node:e,pos:n};this.onNodeChanged(l.node.textContent,l.pos+1)}onNodeChanged(e,n){n!==this.lastOriginalFrom?this.getMatchAndSetDecorations(e,n):this.debouncedGetMatchAndSetDecorations(e,n),this.lastOriginalFrom=n}async clickEventsListener(e){var c,f;if(!e.target)return;let n=e.target;for(;n&&!n.classList.contains("spell-error");)n=n.parentElement;if(!n||!n.classList.contains("spell-error"))return;this.lastClickedDecoration=n;const r=(c=n.getAttribute(Cv))==null?void 0:c.trim();if(!r){console.error("No match string provided",{spellCheckerAttributes:r});return}const{length:i,wrongWord:s,suggestions:a}=JSON.parse(r),l=((f=this.editorView)==null?void 0:f.posAtDOM(n,0))??0,u=l+i;if(this.editorView){this.addSuggestionsList(a,l,u),this.suggestionBox.style.display="";const p=OJ(n);if(!p)return;const m=n.getBoundingClientRect(),g=p.getBoundingClientRect(),b=window.getComputedStyle(p).padding,v=m.left-g.left+3-parseInt(b);let y=m.top-g.top+30-parseInt(b);this.suggestionBox.style.left=v+"px",this.suggestionBox.style.top=y+"px";const x=this.suggestionBox.getBoundingClientRect();x.bottom>g.bottom&&(y=m.top-g.top-x.height-7-parseInt(b),this.suggestionBox.style.top=y+"px"),this.showSuggestionsEvent&&this.showSuggestionsEvent(this.proofreader.normalizeTextForLanguage(s)),setTimeout(()=>{n.scrollIntoView({behavior:"smooth",block:"center"})},100)}return this.addEventListenersToSuggestionBox(),!1}acceptSuggestionListener(e){var s;if(!e||!e.target)return;e.preventDefault(),e.stopPropagation();const n=e.target;let r=0,i=0;if(this.lastClickedDecoration&&this.editorView){const a=(s=this.lastClickedDecoration.getAttribute(Cv))==null?void 0:s.trim();if(a){const{length:l}=JSON.parse(a);r=this.editorView.posAtDOM(this.lastClickedDecoration,0),i=r+l}}if(this.editorView&&r>=0&&i>r){this.dispatch(this.editorView.state.tr.setMeta(Kn.ACCEPT_SUGGESTION,!0));const a=n.textContent||"",l=this.editorView.state.tr.insertText(a,r,i),u=r+a.length,c=De.create(l.doc,u);l.setSelection(c),this.dispatch(l),this.editorView.focus()}this.hideSuggestionBox(),this.lastClickedDecoration&&(this.lastClickedDecoration.removeEventListener("click",this.debouncedClickEventsListener),this.lastClickedDecoration=null)}addSuggestionsList(e,n,r){if(this.suggestionBox.textContent="",e.length>0){const i=document.createElement("ul");i.className="suggestion-list",e.forEach(s=>{const a=document.createElement("li");a.innerText=s,a.dataset.from=n+"",a.dataset.to=r+"",i.appendChild(a)}),this.suggestionBox.appendChild(i)}if(e.length===0){const i=document.createElement("b"),s=this.uiStrings&&this.uiStrings.noSuggestions?this.uiStrings.noSuggestions:"No suggestions found";i.textContent=s,this.suggestionBox.appendChild(i)}}isUndoRedo(e,n){return e.getMeta(K5.ADD_TO_HISTORY_TRANSACTION)===!1||e.getMeta(Kn.APPENDED)===!0||n.isUndoRedoOperation}handleUndoRedo(e,n){var s;const r=(s=e.getMeta(K5.HISTORY_TRANSACTION))==null?void 0:s.redo;if(n.isUndoRedoOperation=!1,r)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const{changedNodes:i}=this.getChangedNodesFromTransaction(e,!0);return i.length===0?this.getDecorationSet():i.length===1?(this.debouncedProofreadChangedNodes(i),this.getDecorationSet()):(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}isTextContentChangedOrDeleted(e){let n=!1;return{isTextContentChanged:e.steps.some(i=>{var a,l;const s=(a=i.toJSON)==null?void 0:a.call(i);return(s==null?void 0:s.stepType)==="replace"&&((l=s==null?void 0:s.slice)!=null&&l.content)?s.slice.content.some(u=>u.type==="paragraph"&&u.content&&u.content.length>0):(s==null?void 0:s.stepType)==="replace"&&(!s.slice||!s.slice.content||s.slice.content.length===0)?(n=!0,s.from!==s.to):!1}),isDeleteAction:n}}handleEnterKey(e,n){if(n)return this.debouncedProofreadDoc(e.doc),this.getDecorationSet();const r=e.getMeta(Kn.APPENDED_TRANSACTION);if(!r)return this.getDecorationSet();const s=r.steps[0].to,a=r.before.nodeAt(s-1);if(!(a!=null&&a.isText))return this.getDecorationSet();let l=0;return r.before.descendants((c,f)=>{c.textContent===(a==null?void 0:a.textContent)&&(l=f)}),l+((a==null?void 0:a.nodeSize)||0)===s?this.getDecorationSet():(this.debouncedProofreadDoc(e.doc),this.getDecorationSet())}handleEnterKeyDebounced(e,n,r){this._debouncedHandleEnterKey(e,n,r)}}const sE=wn(),Kn={SPELLCHECKER_TRANSACTION:"spellcheckerTransaction",IS_ACTIVE_SPELLCHECK:"isActiveSpellCheck",LOADING_TRANSACTION:"loading",PREVENT_UPDATE:"preventUpdate",APPENDED:"appended",APPENDED_TRANSACTION:"appendedTransaction",ACCEPT_SUGGESTION:"acceptSuggestion",SKIP_SPELLCHECK:"skipSpellcheck",UI_EVENT:"uiEvent"},zJ={DROP:"drop"},aE=tt.create({name:"spellchecker",addOptions(){return{proofreader:void 0,uiStrings:{noSuggestions:""},spellcheckHighlightMode:$o.ERROR_TYPE,spellcheckHighlightColor:ts,button:({editor:t,t:e,isMobile:n})=>({component:Ge,componentProps:{action:()=>t.commands.handleActiveSpellCheck(),isActive:()=>{var r,i,s,a;return((a=(s=(i=(r=t==null?void 0:t.extensionStorage)==null?void 0:r.spellchecker)==null?void 0:i.spellchecker)==null?void 0:s.proofreader)==null?void 0:a.enabled)||!1},icon:"SpellCheck",tooltip:"맞춤법 검사",title:n?e("editor.menubar.menu.spelling"):"",customClassTooltip:"flex items-center justify-center"}})}},addStorage(){return{didPaste:!1,spellchecker:void 0,isUndoRedoOperation:!1,pendingSpellCheck:!1,enterKeyPressed:!1}},addCommands(){return{checkSpelling:()=>({tr:t})=>(this.storage.spellchecker.proofreadDoc(t.doc),!0),selectAll:()=>({state:t,dispatch:e})=>(yM(t,e),!0),copy:()=>()=>(document.execCommand("copy"),!0),handleActiveSpellCheck:(t=!0)=>({editor:e})=>{const n=e.extensionStorage.spellchecker.spellchecker;return n.toggleIsEnabledSpellCheck(),e.view.dispatch(e.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,n.getIsEnabledSpellCheck())),t&&sE.setSpellCheck(n.getIsEnabledSpellCheck()),n.hideSuggestionBox(),WC(e)&&e.commands.focus(),!0},setIsEnableSuggestion:t=>()=>(this.storage.spellchecker.setIsEnableSuggestion(t),!0)}},addProseMirrorPlugins(){return[new ot({key:new kt("skipMarkPlugin"),view:e=>{const n=e.dispatch;return e.dispatch=r=>(r.steps.some(s=>s instanceof ii||s instanceof uo)&&r.setMeta(Kn.SKIP_SPELLCHECK,!0),n.call(e,r)),{}}}),new ot({key:new kt("spellcheckerPlugin"),props:{decorations(e){return this.getState(e)},handlePaste:()=>{this.storage.didPaste=!0},handleClick:()=>{this.storage.spellchecker.hideSuggestionBox()},handleKeyDown:(e,n)=>((n.ctrlKey||n.metaKey)&&(n.key==="z"||n.key==="y")&&(this.storage.isUndoRedoOperation=!0,this.storage.pendingSpellCheck=!0),this.storage.enterKeyPressed&&(this.storage.pendingSpellCheck=!0),n.key==="Enter"&&(this.storage.enterKeyPressed=!0),!1)},state:{init:(e,n)=>{var i,s;const r=new HJ(this.options.proofreader,this.options.uiStrings,this.options.onShowSuggestionsEvent,(i=this.options.proofreader)==null?void 0:i.limit,this.options.spellcheckHighlightMode??$o.ERROR_TYPE,this.options.spellcheckHighlightColor??ts,this.options.docLimit);return this.storage.spellchecker=r,r.setDecorationSet(ut.create(n.doc,[])),sE.setSpellCheck(r.getIsEnabledSpellCheck()),(s=this.options.proofreader)!=null&&s.enabled&&r.proofreadDoc(n.doc),r.getDecorationSet()},apply:(e,n)=>{var s;if(e.getMeta(Kn.SKIP_SPELLCHECK))return n;const r=this.storage.spellchecker,i=e.getMeta(Kn.IS_ACTIVE_SPELLCHECK);if(i!==void 0)return i?r.proofreadDoc(e.doc):r.setDecorationSet(ut.empty),r.getDecorationSet();if(e.getMeta(Kn.SPELLCHECKER_TRANSACTION))return r.getDecorationSet();if(e.docChanged&&e.doc.nodeSize){const l=r.getDecorationSet().map(e.mapping,e.doc);if(r.setDecorationSet(l),e.getMeta(Kn.UI_EVENT)===zJ.DROP)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();if(r.isUndoRedo(e,this.storage))return r.handleUndoRedo(e,this.storage);const{isTextContentChanged:u,isDeleteAction:c}=r.isTextContentChangedOrDeleted(e);if(c){const{changedNodes:g}=r.getChangedNodesFromTransaction(e,!1,!0);return g.length>0&&r.debouncedProofreadChangedNodes([g[0]]),r.getDecorationSet()}if(this.storage.enterKeyPressed)return r.handleEnterKeyDebounced(e,this.storage.pendingSpellCheck,()=>{this.storage.enterKeyPressed=!1,this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(this.storage.pendingSpellCheck||u)return r.debouncedProofreadDoc(e.doc,()=>{this.storage.pendingSpellCheck=!1}),r.getDecorationSet();if(e.getMeta(oE.UPDATE)||e.updated===0&&((s=e.steps[0])==null?void 0:s.structure)===!0)return r.getDecorationSet();if(e.getMeta(Kn.PREVENT_UPDATE)===!0&&e.before.textContent.length===0)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();this.storage.didPaste&&(this.storage.didPaste=!1);const{changedNodes:p,isChangedSuperText:m}=r.getChangedNodesFromTransaction(e);if(m)return r.debouncedProofreadDoc(e.doc),r.getDecorationSet();p.length>0&&r.debouncedProofreadChangedNodes(p)}return r.getDecorationSet()}},view:()=>({update:e=>{var r,i;const n=this.storage.spellchecker;n.setEditorView(e),(i=(r=e==null?void 0:e.dom)==null?void 0:r.parentNode)==null||i.appendChild(n.getSuggestionBox())}})})]}}),UJ=()=>{const t=o.reactive({[Fo.EDITOR_COMMENT]:{editor:null,wrongWords:[]},[Fo.EDITOR_CONTENT]:{editor:null,wrongWords:[]}});function e(x,k){t[x].editor=k}const n=o.ref(fo.NO_ERROR);function r(){Object.values(t).forEach(x=>{x.wrongWords=[]})}function i(x,k){return x?fo.FAIL:k?fo.HAS_ERROR:fo.NO_ERROR}async function s(){var E,C;n.value=fo.LOADING;let x=!1,k=!1;for(const[_,{editor:T}]of Object.entries(t)){if(!T)continue;const A=(E=T==null?void 0:T.extensionManager.extensions.find(O=>O.name==="spellchecker"))==null?void 0:E.options.proofreader.api,V=T.getText({blockSeparator:`
|
|
340
340
|
`});if(!(!A||!V))try{const{data:O}=await ln.post(A,{value:V});if(!O.success&&O.code!==KI.NOTHING_TO_CHANGE){k=!0,t[_].wrongWords=[];continue}if((C=O.data)!=null&&C.wrongWordResponseDto){x=!0,t[_].wrongWords=O.data.wrongWordResponseDto;continue}t[_].wrongWords=[]}catch(O){console.error("handleRunSpellCheck error: ",O),k=!0}}n.value=i(k,x)}const a=o.computed(()=>Object.values(t).reduce((x,{wrongWords:k})=>x+k.length,0));o.watch(a,x=>{x===0&&(n.value=i(!1,!1))});const l=o.computed(()=>{const x=Object.values(t).flatMap(k=>k.wrongWords);return x.length===0?!1:x.every(k=>!Array.isArray(k.correctWord)||k.correctWord.length===0)});function u(x){var E;const k=(E=x.extensionManager.extensions.find(C=>C.name==="spellchecker"))==null?void 0:E.options;return{mode:(k==null?void 0:k.spellcheckHighlightMode)??$o.ERROR_TYPE,color:(k==null?void 0:k.spellcheckHighlightColor)??ts}}function c(){for(const[x,{editor:k,wrongWords:E}]of Object.entries(t)){if(!k)continue;const{mode:C,color:_}=u(k);av(k,E,C,_)}}function f(){for(const[x,{editor:k}]of Object.entries(t))k&&PX(k)}async function p(){await s(),c()}let m=!0;function g(x){if(m=x,!!x)for(const[k,{editor:E}]of Object.entries(t))E&&(E.extensionStorage.spellchecker.spellchecker.setEnabledProofreadText(!1),E.view.dispatch(E.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,!1)))}function b(){if(m)for(const[x,{editor:k}]of Object.entries(t))k&&(k.extensionStorage.spellchecker.spellchecker.setEnabledProofreadText(!0),k.view.dispatch(k.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,!0)))}function v(x,k,E=`
|
|
341
341
|
`){if(!x||!k.length)return;const C=wk(x,E);function _($){if($<0&&($=0),$>=C.length)return x.state.doc.content.size;if(C[$]!=null)return C[$];for(let H=$;H<C.length;H++)if(C[H]!=null)return C[H];for(let H=$-1;H>=0;H--)if(C[H]!=null)return C[H];return x.state.doc.content.size}const A=k.map($=>{var z;const H=_($.startIndex),X=_(Math.max(0,$.endIndex-1))+1,ee=((z=$.correctWord)==null?void 0:z[0])??$.wrongWord;return{item:$,from:H,to:X,replacement:ee}}).filter($=>typeof $.from=="number"&&typeof $.to=="number"&&$.from<$.to);if(!A.length)return;A.sort(($,H)=>H.from-$.from);const V=x.state.tr;let O=Number.POSITIVE_INFINITY;const B=new Set;for(const $ of A)$.to>O||(V.insertText($.replacement,$.from,$.to),B.add($.item),O=$.from);B.size>0&&(x.view.dispatch(V),x.view.focus()),B.size>0&&(k=k.filter($=>![...B].some(H=>H===$))),av(x,k)}function y(){for(const[x,{editor:k,wrongWords:E}]of Object.entries(t))k&&v(k,E)}return{editorsState:t,spellCheckStatus:n,countTotalWrongWords:a,allWrongWordsMissSuggestions:l,setEditor:e,resetAllEditorWrongWords:r,disableSpellCheckRealTime:g,resetEnableSpellCheckRealTime:b,applyAllEditorHighlightErrors:c,clearAllEditorHighlightErrors:f,reRunSpellCheckAndHighlight:p,handleRunSpellCheck:s,replaceAllEditorErrors:y}},WJ=o.defineComponent({__name:"DialogTrigger",props:{asChild:{type:Boolean},as:{}},setup(t){const e=t;return(n,r)=>(o.openBlock(),o.createBlock(o.unref(oD),o.normalizeProps(o.guardReactiveProps(e)),{default:o.withCtx(()=>[o.renderSlot(n.$slots,"default")]),_:3},16))}}),jJ={key:0,class:"border-blue-500 text-white text-xs text-nowrap px-3 py-2 h-auto bg-blue-500 hover:bg-blue-500/80 flex items-center rounded"},lE=o.defineComponent({__name:"BulkSpellChecker",props:{editor:{},editorComment:{},isEnableSpellCheckRealTime:{type:Boolean},align:{default:"right"}},setup(t){var B,$;const e=t,{editorsState:n,countTotalWrongWords:r,spellCheckStatus:i,allWrongWordsMissSuggestions:s,setEditor:a,disableSpellCheckRealTime:l,resetEnableSpellCheckRealTime:u,handleRunSpellCheck:c,resetAllEditorWrongWords:f,applyAllEditorHighlightErrors:p,clearAllEditorHighlightErrors:m,reRunSpellCheckAndHighlight:g,replaceAllEditorErrors:b}=UJ(),v=o.ref(!1),y=o.reactive({x:0,y:0}),x=o.ref(!1),k={x:0,y:0},E=H=>{x.value=!0,k.x=H.clientX-y.x,k.y=H.clientY-y.y,document.addEventListener("mousemove",C),document.addEventListener("mouseup",_)},C=H=>{x.value&&(y.x=H.clientX-k.x,y.y=H.clientY-k.y)},_=()=>{x.value=!1,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)};o.onUnmounted(()=>{document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",_)});const T=o.ref(null),A=o.ref({top:0,right:0,left:0}),V=()=>{if(T.value){const H=T.value.$el.getBoundingClientRect();A.value={top:H.bottom+window.scrollY+5,right:window.innerWidth-H.right-window.scrollX,left:H.left+window.scrollX},y.x=0,y.y=0}};o.onMounted(async()=>{e.editorComment&&a(Fo.EDITOR_COMMENT,e.editorComment),a(Fo.EDITOR_CONTENT,e.editor)}),o.onUnmounted(()=>{a(Fo.EDITOR_COMMENT,null),a(Fo.EDITOR_CONTENT,null)}),o.watch(v,async H=>{H?(await o.nextTick(),V(),l(e.isEnableSpellCheckRealTime),await c(),p()):(f(),u(),m())});const O=($=(B=e.editor)==null?void 0:B.extensionManager.extensions.find(H=>H.name==="spellchecker"))==null?void 0:$.options.bulkSpellCheckerButton;return(H,X)=>{const ee=Ot,z=uv,L=dh,D=ch,F=uh,R=lh,K=iY,Y=Vc,ie=Pc;return o.openBlock(),o.createBlock(ie,{open:o.unref(v)},{default:o.withCtx(()=>[o.createVNode(o.unref(WJ),{"as-child":"",ref_key:"triggerRef",ref:T,onClick:X[0]||(X[0]=fe=>v.value=!o.unref(v))},{default:o.withCtx(()=>[o.unref(O)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(O).component),{key:1,buttonName:o.unref(O).props.buttonName,icon:o.unref(O).props.icon,type:o.unref(O).props.type,disabled:o.unref(O).props.disabled,iconPosition:o.unref(O).props.iconPosition,buttonSize:o.unref(O).props.buttonSize,iconClass:o.unref(O).props.iconClass},null,8,["buttonName","icon","type","disabled","iconPosition","buttonSize","iconClass"])):(o.openBlock(),o.createElementBlock("button",jJ,[o.createVNode(ee,{name:"checkUnderline"}),X[4]||(X[4]=o.createTextVNode("맞춤법 일괄 교정 "))]))]),_:1},512),o.createVNode(Y,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none dark:border-ed-muted","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"z-[70]",style:o.normalizeStyle({transform:`translate(${o.unref(y).x}px, ${o.unref(y).y}px)`,top:`${o.unref(A).top}px`,right:H.align==="left"?"auto":`${o.unref(A).right}px`,left:H.align==="left"?`${o.unref(A).left}px`:"auto"})},[o.createVNode(F,{class:"bg-ed-blue-light py-3.5 px-6 rounded-t-[5px] cursor-move text-blue-500 dark:text-dark-blue-100 flex-row items-center justify-between",onMousedown:o.withModifiers(E,["prevent"])},{default:o.withCtx(()=>[o.createVNode(L,{class:"text-base space-x-2"},{default:o.withCtx(()=>[X[5]||(X[5]=o.createElementVNode("span",null,"맞춤법/문법 오류",-1)),o.createVNode(z,{class:"text-sm bg-blue-500 hover:bg-blue-500 dark:bg-dark-blue-100 px-2"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r))+"개",1)]),_:1})]),_:1}),o.createVNode(D,{onClick:X[1]||(X[1]=fe=>v.value=!1),class:"text-xs flex items-center gap-x-1"},{default:o.withCtx(()=>[o.createVNode(ee,{name:"Close",class:"w-4 h-4"}),o.createTextVNode(o.toDisplayString(H.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(R),o.createVNode(K,{editorsState:o.unref(n),spellCheckStatus:o.unref(i),allWrongWordsMissSuggestions:o.unref(s),onCloseModal:X[2]||(X[2]=fe=>v.value=!1),onRunSpellcheck:o.unref(g),onReplaceAllEditorErrors:X[3]||(X[3]=fe=>(o.unref(b)(),v.value=!1))},null,8,["editorsState","spellCheckStatus","allWrongWordsMissSuggestions","onRunSpellcheck"])],4)]),_:1})]),_:1},8,["open"])}}}),qJ=Object.freeze(Object.defineProperty({__proto__:null,default:lE},Symbol.toStringTag,{value:"Module"})),uE=tt.create({name:"invalidCharFocus",addOptions(){return{invalidChars:["{","}"]}},addCommands(){return{focusInvalidChar:()=>({state:t,dispatch:e,view:n})=>{let r=null;if(t.doc.descendants((s,a)=>{if(!s.isText)return!0;const l=s.text??"";for(let u=0;u<l.length;u++)if(this.options.invalidChars.includes(l[u])){const c=a+u+1;(r==null||c<r)&&(r=c)}return!0}),r==null)return!1;const i=t.tr.setSelection(De.create(t.doc,r));return e&&e(i.scrollIntoView()),n&&n.focus(),!0},hasInvalidChar:()=>({state:t})=>{let e=!1;return t.doc.descendants(n=>{if(!n.isText)return!0;const r=n.text??"";return this.options.invalidChars.some(i=>r.includes(i))?(e=!0,!1):!0}),e}}}}),kv=o.defineComponent({__name:"SimpleEditor",props:{modelValue:{default:""},parentEditor:{default:null},isReadOnly:{type:Boolean},autofocus:{type:[String,Number,Boolean,null],default:"start"},spellcheckEnabled:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.inject("isMobile",!1),a=o.inject("minCharSuperInput",0),l=[Z5,X5,J5,G5,Y5.configure({placeholder:"수퍼를 입력하세요"}),uE,N5],u=o.ref(r.spellcheckEnabled),c=o.computed(()=>{var X;return(X=r.parentEditor)==null?void 0:X.extensionManager.extensions.find(ee=>ee.name==="spellchecker")}),f=o.computed(()=>{var X,ee,z,L,D,F,R,K,Y,ie;return aE.configure({proofreader:new NE({api:(ee=(X=c.value)==null?void 0:X.options.proofreader)==null?void 0:ee.api,limit:(L=(z=c.value)==null?void 0:z.options.proofreader)==null?void 0:L.limit,transfer:(F=(D=c.value)==null?void 0:D.options.proofreader)==null?void 0:F.transfer,enabled:u.value}),uiStrings:(R=c.value)==null?void 0:R.options.uiStrings,bulkSpellCheckerButton:(K=c.value)==null?void 0:K.options.bulkSpellCheckerButton,spellcheckHighlightMode:(Y=c.value)==null?void 0:Y.options.spellcheckHighlightMode,spellcheckHighlightColor:(ie=c.value)==null?void 0:ie.options.spellcheckHighlightColor})}),p=new Vo({enablePasteRules:!1,enableInputRules:!1,content:r.modelValue,extensions:l.concat(f.value),editable:!r.isReadOnly,autofocus:r.autofocus,onUpdate:({editor:X})=>{i("update:modelValue",X.getHTML())},parseOptions:{preserveWhitespace:"full"}});o.watch(()=>r.isReadOnly,X=>{var ee;p.setEditable(!X),(ee=p==null?void 0:p.commands)!=null&&ee.setIsEnableSuggestion&&p.commands.setIsEnableSuggestion(!X)},{immediate:!0});function m(X){const{view:ee}=p,{from:z}=ee.state.selection;p.commands.insertContentAt(z,X),p.commands.focus()}function g(){var X;u.value=!u.value,p.commands.handleActiveSpellCheck(u.value),(X=p==null?void 0:p.commands)!=null&&X.setIsEnableSuggestion&&p.commands.setIsEnableSuggestion(u.value)}const{contentInner:b,measuredMinWidth:v,measure:y}=df({minChars:a,fontSize:"",editor:p});o.watch(()=>r.modelValue,()=>{y(),p&&p.getHTML()!==r.modelValue&&p.commands.setContent(r.modelValue??"",!1,{preserveWhitespace:"full"})});const x=o.inject("fontSize",""),k=o.inject("fontFamily",""),E=o.inject("fontWeight",""),C=o.inject("letterSpacing",""),_=o.computed(()=>s?{fontSize:o.unref(x),fontFamily:o.unref(k),fontWeight:o.unref(E),letterSpacing:o.unref(C)}:{}),T=o.computed(()=>s?{paddingLeft:"7px",paddingRight:"7px"}:{width:`${v.value}px`}),V=document.createElement("canvas").getContext("2d");function O(){if(!v.value||!(b.value instanceof Element)||!V)return;const X=p.getText({blockSeparator:`
|
|
342
342
|
`}),ee=getComputedStyle(b.value);V.font=ee.font;const z=20,L=()=>Math.max(0,(v.value||0)-z);function D(Y,ie){let fe=1,ke=Y.length,re=0;for(;fe<=ke;){const me=Math.floor((fe+ke)/2);V.measureText(Y.slice(0,me)).width<=ie?(re=me,fe=me+1):ke=me-1}return re}let F="";const R=[];for(const Y of X){if(Y===`
|
|
343
|
-
`){R.push(F),F="";continue}if(F+=Y,V.measureText(F).width>L())for(;V.measureText(F).width>L();){const ie=D(F,L());ie<=0?(R.push(F.charAt(0)),F=F.slice(1)):(R.push(F.slice(0,ie)),F=F.slice(ie))}}return R.push(F),R.map(Y=>`<p>${Y}</p>`).join("")}const B=o.computed(()=>{var ee,z,L;const X=(L=(z=(ee=r.parentEditor)==null?void 0:ee.storage.superText.superInputModal)==null?void 0:z.props)==null?void 0:L.guidelineLeftOffset;return s.value||!X?{}:{backgroundImage:"linear-gradient(to right, #d1d5db 1px, transparent 1px)",backgroundSize:"1px 100%",backgroundRepeat:"no-repeat",backgroundPosition:on(X)}}),{isScrolling:$,handleScroll:H}=Xl();return e({insertSpecialCharater:m,isChecked:u,toggleSpellCheck:g,wrapText:O,editor:p}),(X,ee)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:b,class:o.normalizeClass(o.unref(Ee)("h-40 overflow-y-auto border focus-within:border-ed-input-focus rounded-[3px] p-2.5 relative",X.isReadOnly&&"border-none",o.unref(s)&&"h-auto min-h-20 max-h-44 border-ed-gray rounded-md px-4 py-2.5",o.unref(s)&&!o.unref($)&&"scrollbar-thumb-transparent")),style:o.normalizeStyle([o.unref(T),o.unref(B),o.unref(_)]),onScroll:ee[0]||(ee[0]=(...z)=>o.unref(H)&&o.unref(H)(...z))},[o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(p),class:o.normalizeClass(o.unref(Ee)("vdc-editor relative h-full"))},null,8,["editor","class"])],38))}}),KJ={class:"sr-only"},GJ={class:"grid m-2.5 p-2.5 gap-y-2.5 rounded border border-gray-200"},XJ={class:"grid grid-cols-[60px,1fr] gap-x-2"},YJ={class:"flex items-center space-x-2 text-xs font-normal [&>input[type='checkbox']]:h-[20px] [&>input[type='checkbox']]:w-[20px] [&>input[type='checkbox']]:!border-ed-border [&>input[type='checkbox']]:shadow"},JJ=["checked"],ZJ={for:"spellcheck",class:"select-none whitespace-nowrap"},QJ={class:"flex gap-x-1"},NJ={class:"ml-auto"},eZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},tZ={class:"text-right text-sm p-2"},nZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},cE=5,Wc=o.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var L,D;const n=e,r=t,{t:i}=At(),s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=Ne.useLocalStorage("superInputModalPosition",null),f=o.reactive({x:0,y:0}),p=o.ref(!1),m={x:0,y:0},g=o.ref(!1),b=o.ref(!1),v=o.ref(!1),y=F=>{p.value=!0;const R=F.currentTarget.closest(".draggable-dialog").getBoundingClientRect();m.x=F.clientX-R.left,m.y=F.clientY-R.top,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k)},x=F=>{p.value&&(f.x=F.clientX-m.x,f.y=F.clientY-m.y)},k=()=>{p.value=!1,c.value={x:f.x,y:f.y},document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)};o.watch(()=>r.open,async F=>{if(!F)return;b.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await o.nextTick();const R=document.querySelector(".draggable-dialog");if(!R)return;R.getBoundingClientRect();const K=window.innerWidth,Y=window.innerHeight;c.value&&c.value.x!==void 0&&c.value.y!==void 0?(f.x=c.value.x,f.y=c.value.y):(f.x=Math.max((K-R.offsetWidth)/2,0),f.y=Math.max((Y-R.offsetHeight)/2,0))},{immediate:!0});const E=()=>{n("close"),s.value="",a.value="",u.value=!1},C=()=>{var R;if((R=l.value)==null?void 0:R.editor.commands.hasInvalidChar()){v.value=!0;return}s.value=l.value.wrapText(),a.value="",b.value?g.value=!0:n("close"),n("save",s.value),s.value=""},_=()=>{g.value=!1,n("close")},T=(D=(L=r.editor)==null?void 0:L.extensionManager.extensions.find(F=>F.name==="superText"))==null?void 0:D.options.specialCharModal,A=o.inject("fontFamily",""),V=o.computed(()=>{var F,R,K;return np(r.editor,uc)&&o.unref(A)?o.unref(A):(K=(R=(F=r.editor)==null?void 0:F.storage.superText.superInputModal)==null?void 0:R.props)==null?void 0:K.fontFamily}),O=Ne.useLocalStorage("recentSpecialChars",[]),B=F=>{if(!F)return;const R=(O.value??[]).filter(K=>K!==F);R.unshift(F),O.value=R.slice(0,cE)},$=F=>{var R;(R=l.value)==null||R.insertSpecialCharater(F)},H=(F,R)=>{var K;R&&((K=l.value)==null||K.insertSpecialCharater(F),B(F))},X=o.computed(()=>{var F;return(F=l.value)==null?void 0:F.isChecked}),ee=()=>{var F;(F=l.value)==null||F.toggleSpellCheck()};o.onUnmounted(()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)}),o.watch(s,F=>{!r.superTextElementId||r.superTextElementId===""||(b.value=F!==(r.superTextInit??""))});const z=o.computed(()=>{var F;return(F=l.value)==null?void 0:F.editor});return(F,R)=>{const K=dh,Y=ch,ie=uh,fe=lh,ke=lE,re=iv,me=Vc,J=Pc,te=SX;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(J,{open:F.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(me,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>{var ne,se;return[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${f.x}px, ${f.y}px)`,fontFamily:o.unref(V)})},[o.createVNode(ie,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(K,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.superinput")),1)]),_:1}),o.createVNode(Y,{class:"absolute right-3 top-3 text-white",onClick:E},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",KJ,o.toDisplayString(F.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(fe),o.createElementVNode("div",GJ,[o.createElementVNode("div",XJ,[R[5]||(R[5]=o.createElementVNode("label",null," ",-1)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex gap-x-6",o.unref(O).length===cE&&"gap-x-4"))},[o.createVNode(bn,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:R[0]||(R[0]=ce=>u.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.insert.symbol")),1)]),_:1}),o.createElementVNode("div",YJ,[o.createElementVNode("input",{id:"spellcheck",type:"checkbox",class:"shrink-0",checked:o.unref(X),onChange:ee},null,40,JJ),o.createElementVNode("label",ZJ,o.toDisplayString(o.unref(i)("editor.menubar.menu.spellCheck")),1)]),o.createElementVNode("div",QJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(O),ce=>(o.openBlock(),o.createBlock(bn,{key:ce,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:_e=>$(ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(ce),1)]),_:2},1032,["onClick"]))),128))]),o.createElementVNode("div",NJ,[o.unref(z)?(o.openBlock(),o.createBlock(ke,{key:0,editor:o.unref(z),"is-enable-spell-check-real-time":(ne=o.unref(z))==null?void 0:ne.extensionStorage.spellchecker.spellchecker.proofreader.enabled,align:"left"},null,8,["editor","is-enable-spell-check-real-time"])):o.createCommentVNode("",!0)])],2),u.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent((se=o.unref(T))==null?void 0:se.component),o.mergeProps({key:0,"custom-class":"!z-[70] !pointer-events-auto","font-family":o.unref(V)},o.unref(T).props,{onSelectedChar:H,onClose:R[1]||(R[1]=ce=>u.value=!1)}),null,16,["font-family"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",eZ,[o.createElementVNode("label",tZ,o.toDisplayString(o.unref(i)("editor.detail")),1),o.createVNode(kv,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":R[2]||(R[2]=ce=>s.value=ce),"parent-editor":F.editor,class:""},null,8,["modelValue","parent-editor"])]),o.createElementVNode("div",nZ,[R[6]||(R[6]=o.createElementVNode("label",{class:"text-right text-sm p-2"},"ID",-1)),o.createVNode(bs,{modelValue:a.value,"onUpdate:modelValue":R[3]||(R[3]=ce=>a.value=ce),class:"rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),o.createVNode(re,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(bn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:C},{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(o.unref(i)("editor.check")),1)]),_:1}),o.createVNode(bn,{as:"button",variant:"destructive",onClick:E},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(F.$t("editor.close")),1)]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),o.createVNode(te,{open:g.value,onClose:_},null,8,["open"]),o.createVNode(te,{title:"Information",message:"{ 과 } 는 입력이 제한된 문자열 입니다.",iconName:"MessageCircleWarning",confirmText:"Ok",open:v.value,onClose:R[4]||(R[4]=ne=>v.value=!1)},null,8,["open"])],64)}}}),Ev=o.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=At(),i=o.ref(!1),s=o.reactive({from:0,to:0,text:""}),a=o.inject("isEditable",o.ref(!0)),l=o.inject("canEditSuper",o.ref(!0)),u=o.computed(()=>n.mode===Me.EDITOR||n.mode===Me.PLAIN_TEXT||!l.value||n.disableSuperInput);function c(){if(!n.editor)return"";const{from:k,to:E}=n.editor.state.selection,C=n.editor.state.doc.cut(k,E),T=$r.fromSchema(n.editor.schema).serializeFragment(C.content),A=document.createElement("div");return A.appendChild(T),A.innerHTML}const f=()=>{const{view:k}=n.editor,{from:E,to:C}=k.state.selection,_=c();s.text=_,s.from=E,s.to=C},p=()=>i.value=!i.value,m=()=>{u.value||(i.value=!0,f())},g=()=>i.value=!1,b=k=>{const E=n==null?void 0:n.superTextStore.addMoreSuperText(k);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":E,"data-text":k}}),i.value=!1,requestAnimationFrame(()=>{n.editor.commands.setTextSelection(s.from+1),n.editor.view.focus()})},v=o.ref(!1),y=async k=>{var E,C;if(k){const _=await((C=(E=n.editor).hasClipboard)==null?void 0:C.call(E));v.value=!!_}},x=()=>{if(u.value||!n.editor)return;const{view:k,state:E}=n.editor,{from:C,to:_}=E.selection;s.from=C,s.to=_,s.text="",k.dom.blur(),i.value=!0};return e({toggleDialog:p,openDialog:m,closeDialog:g}),(k,E)=>{const C=Wc,_=ov,T=rv,A=nv,V=tv;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(C,{open:i.value,editor:k.editor,"super-text-init":s.text,onClose:p,onSave:b},null,8,["open","editor","super-text-init"]),o.createVNode(V,{"onUpdate:open":y},{default:o.withCtx(()=>[o.createVNode(_,{as:"template",class:"relative",disabled:o.unref(u),onDblclick:o.withModifiers(x,["prevent","stop"])},{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default")]),_:3},8,["disabled"]),o.createVNode(A,null,{default:o.withCtx(()=>[k.disableSuperInput?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(T,{key:0,onSelect:m},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.inputSuper")),1)]),_:1})),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:1,onSelect:E[0]||(E[0]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.cutContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.cut")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:2,onSelect:E[1]||(E[1]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.copyContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.copy")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:3,disabled:!v.value,onSelect:E[2]||(E[2]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.pasteContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}}),rZ={id:"editor-panel",class:"flex relative w-full h-full"},oZ=po(o.defineComponent({__name:"PageNode",props:na,setup(t){const{state:e,page:n,superTextStore:r}=wn(),{size:i,pagination:s,margin:a}=n.value,l=o.ref(null),u=o.ref(t.node.attrs.viewSuperTextArea),c=o.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=o.computed(()=>t.editor.storage.page.mode===Me.REPORT),{width:p,height:m}=i,g=o.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=Ne.useEventBus(mr.SUPER_VIEW_PAGE);return o.watch(()=>t.node.attrs,v=>{b.emit(v.pageNumber)},{immediate:!0}),(v,y)=>{var k,E,C,_;const x=Ev;return o.openBlock(),o.createBlock(o.unref(ta),{id:v.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":v.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:o.normalizeStyle({"--umo-page-margin-top":((k=o.unref(a))==null?void 0:k.top)??"0","--umo-page-margin-bottom":((E=o.unref(a))==null?void 0:E.bottom)??"0","--umo-page-margin-left":((C=o.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((_=o.unref(a))==null?void 0:_.right)??"0","--umo-page-width":o.unref(p),"--umo-page-height":o.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m),height:f.value?typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m):"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",rZ,[o.createVNode(x,{mode:c.value?o.unref(Me).REPORT:o.unref(Me).EDITOR,editor:v.editor,"super-text-store":o.unref(r)},{default:o.withCtx(()=>[o.createVNode(o.unref(e6),{class:"umo-page-node-content",style:o.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-7d55d7ea"]]);function dE(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}const iZ=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=i.extensionManager.attributes,f=Eh(c,l.node().type.name,l.node().attrs);if(f.id=ev(),f.extend&&(f.extend=!1),s instanceof Pe&&s.node.isBlock)return!l.parentOffset||!Cr(a,l.pos)?!1:(r&&(t&&dE(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const p=u.parentOffset===u.parent.content.size;s instanceof De&&e.deleteSelection();const m=l.depth===0?void 0:e4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=Cr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&Cr(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),b&&(g||(g=[{type:l.node().type,attrs:f}]),e.split(e.mapping.map(l.pos),1,g),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const v=e.mapping.map(l.before()),y=e.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&dE(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},sZ=t=>({tr:e,state:n,dispatch:r,editor:i})=>{var v;const s=vn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof Pe?n.selection.node:null;if(u!=null&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const c=a.node(-1);if(c.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let y=be.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)y=be.from(a.node(A).copy(y));const k=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,E=Eh(f,a.node().type.name,a.node().attrs),C=((v=s.contentMatch.defaultType)==null?void 0:v.createAndFill(E))??void 0;y=y.append(be.from(s.createAndFill(null,C)??void 0));const _=a.before(a.depth-(x-1));e.replace(_,a.after(-k),new Se(y,4-x,0));let T=-1;e.doc.nodesBetween(_,e.doc.content.size,(A,V)=>{if(T>-1)return!1;A.isTextblock&&A.content.size===0&&(T=V+1)}),T>-1&&e.setSelection(De.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=Eh(f,c.type.name,c.attrs),g=Eh(f,a.node().type.name,a.node().attrs);m.id=ev(),g.id=ev(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!Cr(e.doc,a.pos,2))return!1;if(r){const{selection:y,storedMarks:x}=n,{splittableMarks:k}=i.extensionManager,E=x??(y.$to.parentOffset&&y.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!E||!r)return!0;const C=E.filter(_=>k.includes(_.type.name));e.ensureMarks(C)}return!0},aZ=[Yf,Xf,Jf,_g,Zf,hs,Ag,Bl,Og,Ig,Mg,ma,Il,wi,Bg,Rg,Tg,Jr],lZ=Dt.create({priority:200,name:`${Jr}`,content:"block*",group:`${Jr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:ra(oZ),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Zr(10)},pageNumber:{default:1},force:{default:!1},viewSuperTextArea:{default:!0},slots:{default:this.options.slots,renderHTML:()=>({})}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["div",{...yt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:iZ,splitListItem:sZ,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:i})=>(r&&e.setMeta("runState",t),!0),setPageBreak:()=>({tr:t,state:e,dispatch:n,editor:r})=>(n&&t.setMeta("splitPage",!0),!0),togglePagePlugin:t=>({tr:e,dispatch:n})=>(e.setMeta("disablePage",t),n&&n(e),!0)}},addGlobalAttributes(){return[{types:aZ.concat(this.options.types||[]),attributes:{id:{default:null},extend:{default:!1}}}]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=We.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>fE(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:i,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(We.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Jr);const f=di(p=>p.type.name===Jr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Jr);const p=f.node.firstChild.type;if(f.start+We.atStart(f.node).from===c){const g=De.create(l,f.start-2,f.start-2),b=di(v=>v.type.name===Jr)(g);if(b){const v=We.atEnd(b.node).from+b.start,y=De.create(l,v,v);if(p===b.node.lastChild.type){const{parent:x}=y.$anchor;return yX(x,i.schema)?s.setSelection(y):s.step(new mn(v,c,Se.empty)),!0}s.setSelection(y)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>fE(r),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,u=l.node(),c=di(f=>f.type.name===Bl)(s);return c&&c.start+We.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(We.atEnd(a).from===u)return r.deleteNode(Jr);const c=di(f=>f.type.name===Jr)(s);if(c&&c.start+We.atEnd(c.node).from===u){const p=De.create(a,u+2,u+2),m=di(g=>g.type.name===Jr)(p);if(m){const g=We.atStart(m.node).from+m.start,b=De.create(a,g,g);if(di(y=>y.attrs.extend)(b))return i.step(new mn(u,g,Se.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!this.editor.isActive("table")]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function Eh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}const fE=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,i=t4(r,{from:n.from,to:n.to},s=>s.type.name===Bl);for(const s of i){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),uZ=tt.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),cZ=["data-font"],dZ=o.defineComponent({__name:"FontFamilyMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),{t:r}=At(),i=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=o.inject("fontFamily"),a=o.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;let m=[];return Et.isEmpty(p.fontFamilyList)?m=i:m=p.fontFamilyList.filter(g=>g.enabled!==!1).map(g=>({label:g.label,value:g.value})),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...m]}),l=o.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?L0(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=Ne.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.chain().focus().unsetFontFamily().run(),s.value=null):(s.value=p.value,e.editor.chain().focus().setFontFamily(p.value).run(),u.emit()),e.editor.commands.setForceCloseBubble(!0)}e.editor.on("selectionUpdate",({editor:p})=>{p.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const f=o.computed(()=>{var m,g;const p=((m=a.value[0])==null?void 0:m.label)||r("editor.fontFamily.default");return((g=a.value.find(b=>b.value===l.value))==null?void 0:g.label)||p});return(p,m)=>(o.openBlock(),o.createBlock(Ea,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-20 ${p.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[o.createVNode(o.unref($l),{checked:l.value===g.value,onClick:v=>c(g)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:o.normalizeStyle({fontFamily:g.value??void 0})},o.toDisplayString(g.label),13,cZ)]),_:2},1032,["checked","onClick"]),g.label===o.unref(r)("editor.fontFamily.default")&&p.showDefaultDivider?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),pE=uZ.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyList:[],button({editor:e,extension:n,t:r}){return{component:dZ,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip")}}}}},addGlobalAttributes(){return[{types:["paragraph","heading","textStyle"],attributes:{style:{default:null,parseHTML:t=>t.style.fontFamily||null,renderHTML:t=>t.style?{style:`font-family: ${t.style}`}:{}},fontFamily:{default:null,parseHTML:t=>t.style.fontFamily.replace(/['"]/g,""),renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontFamily}}),fZ=tt.create({name:"fontWeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"]}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight||null,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontWeight}}),pZ={class:"flex gap-2"},hZ=["disabled"],mZ=po(o.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=o.inject("fontSize"),n=o.computed(()=>e.value?parseInt(e.value)===parseInt(l1[0])||parseInt(e.value)<parseInt(l1[0]):!1),r=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE),i=s=>{r.emit(s)};return(s,a)=>{const l=va,u=ba,c=ya;return o.openBlock(),o.createElementBlock("div",pZ,[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>i(!0))},[o.createVNode(o.unref(Ot),{name:"Plus",class:"w-6 h-6"})])]),_:1}),o.createVNode(o.unref(vs),null,{default:o.withCtx(()=>a[2]||(a[2]=[o.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>i(!1)),disabled:o.unref(n)},[o.createVNode(o.unref(Ot),{name:"Minus",class:"w-6 h-6"})],8,hZ)]),_:1}),o.createVNode(o.unref(vs),null,{default:o.withCtx(()=>a[3]||(a[3]=[o.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-250d04b3"]]),gZ=Un.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:mZ,componentProps:{editor:t}}}}},addAttributes(){return{size:{default:this.options.defaultSize,parseHTML:t=>t.style.fontSize||this.options.defaultSize,renderHTML:t=>t.size?{style:`font-size: ${t.size}`}:{}}}},addCommands(){return{setFontSizeIncreaseDecrease:t=>({commands:e})=>e.setMark("textStyle",{fontSize:t})}}}),Sv=tt.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:n},dom:r}})=>{const a=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return r.style.cursor=a,e(n.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new ot({key:new kt("format-painter"),state:{init:()=>[],apply:(t,e)=>{const n=t.getMeta("painterAction");return n&&n.type==="start"?e=n.marks:n&&n.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const n=this.getState(t.state);if(!n||n.length==0)return t.dom.style.cursor="",!1;const r=()=>{document.removeEventListener("mouseup",r);const{dispatch:i,state:{selection:s},dom:a}=t;let l=t.state.tr;a.style.cursor="",l=l.removeMark(s.from,s.to);for(const u of n)u.type.name!="link"&&(l=l.addMark(s.from,s.to,u));i(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),_v=()=>Zr(10),hE=new kt("attrkey"),bZ=t=>new ot({key:hE,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,i){const{tr:s}=i;let a=!1;const l=hE.getState(i);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];i.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,v=c.includes(b.id)?_v():b.id||_v();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:v,"number-line":g+1}),a=!0),c.push(v)})}return a?s:null}}),mE=[Yf,Xf,Jf,_g,Zf,hs,Ag,Bl,Og,Ig,Mg,ma,Il,wi,Bg,Rg,Tg,Jr],vZ=tt.create({name:"autoId",addGlobalAttributes(){return[{types:mE.concat(this.options.types||[]),attributes:{id:{default:_v()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[bZ(mE.concat(this.options.types||[]))]}}),yZ=["paragraph","heading","list_item","todo_item"];function wZ(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof De||n instanceof $n))return t;const{from:i,to:s}=n,a=[],l=e&&e!==s6?e:null;return r.nodesBetween(i,s,(u,c)=>{const f=u.type;return yZ.includes(f.name)?((u.attrs.lineHeight||null)!==l&&a.push({node:u,pos:c,nodeType:f}),f.name!=="list_item"&&f.name!=="todo_item"):!0}),a.length&&a.forEach(u=>{const{node:c,pos:f,nodeType:p}=u;let{attrs:m}=c;m={...m,lineHeight:l},t=t.setNodeMarkup(f,p,m,c.marks)}),t}function xZ(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:i}=e;return i=i.setSelection(r),i=wZ(i,t),i.docChanged?(n&&n(i),!0):!1}}const CZ=o.defineComponent({__name:"LineHeightDropdown",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const{t:e}=At();function n(l){return parseFloat(l.replace("%",""))/100}const r=o.computed(()=>{const c=s.editor.extensionManager.extensions.find(f=>f.name==="lineHeight").options.lineHeights.map(f=>({label:n(f),value:f}));return c.unshift({label:o.unref(e)("editor.default"),value:"default"}),c}),i=o.ref("default"),s=t;function a(l){l==="default"?s.editor.chain().focus().unsetLineHeight().run():s.editor.chain().focus().setLineHeight(l).run(),i.value=l}return(l,u)=>(o.openBlock(),o.createBlock(Ea,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref($l),{key:f,checked:c.value===i.value,onClick:p=>a(c.value)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),gE=tt.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:["100%","115%","150%","200%","250%","300%"],defaultHeight:s6,button({editor:e,t:n}){return{component:CZ,componentProps:{editor:e,icon:"LineHeight",tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>xZ(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),kZ=Dt.create({name:"column",content:"block+",isolating:!0,addAttributes(){return{position:{default:"",parseHTML:t=>t.getAttribute("data-position"),renderHTML:t=>({"data-position":t.position})}}},renderHTML({HTMLAttributes:t}){return["div",yt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var Ba=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(Ba||{});const Tv=Dt.create({name:"columns",group:"columns",content:"column+",defining:!0,isolating:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),layout:"two-column"}},addAttributes(){return{layout:{default:"two-column"}}},addCommands(){return{setColumns:()=>({commands:t})=>(t.insertContent('<div data-type="columns"><div data-type="column" data-position="left"><p></p></div><div data-type="column" data-position="right"><p></p></div></div>'),!0),setLayout:t=>({commands:e})=>e.updateAttributes("columns",{layout:t})}},renderHTML({HTMLAttributes:t}){return["div",{"data-type":"columns",class:`layout-${t.layout}`},0]},parseHTML(){return[{tag:'div[data-type="columns"]'}]},addExtensions(){return[kZ.configure(this.options.columnOptions)]}}),EZ={class:"flex gap-x-2 items-center"},SZ={class:"sr-only"},_Z={class:"flex justify-end gap-x-2.5 flex-1"},TZ=["disabled"],bE=po(o.defineComponent({__name:"SuperInputDialogMoblie",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextId:{},superTextElementId:{},isViewMode:{type:Boolean},title:{}},emits:["close","save","delete"],setup(t,{emit:e}){const n=e,r=t,{t:i}=At(),s=o.ref(""),a=o.ref(!1),l=o.ref(r.isViewMode??!1),u=o.ref(!1);o.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=o.computed(()=>{var b;if(!s.value)return!0;const g=document.createElement("div");return g.innerHTML=s.value,((b=g==null?void 0:g.textContent)==null?void 0:b.trim())===""});o.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)},{immediate:!0});const f=()=>{n("close"),a.value=!1,l.value=!0,u.value=!1},p=()=>{n("save",s.value),s.value="",l.value=!0,u.value=!1},m=()=>{u.value=!0,l.value=!1};return(g,b)=>{const v=dh,y=ch,x=uh,k=lh,E=iv,C=Vc,_=Pc;return o.openBlock(),o.createBlock(_,{open:g.open},{default:o.withCtx(()=>[o.createVNode(C,{"is-overlay-transparent":"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:o.withCtx(()=>[o.createVNode(x,{class:"text-left flex-row justify-between"},{default:o.withCtx(()=>[o.createVNode(v,{class:"text-base font-normal"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.title?g.title:o.unref(i)("editor.superinput")),1)]),_:1}),o.createElementVNode("div",EZ,[o.withDirectives(o.createElementVNode("button",{onClick:m},[o.createVNode(o.unref(Gg),{icon:"lucide:edit-2"})],512),[[o.vShow,l.value]]),o.createVNode(y,{class:"outline-none",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",SZ,o.toDisplayString(o.unref(i)("editor.close")),1)]),_:1})])]),_:1}),o.createVNode(k,{class:"hidden"}),o.createVNode(kv,{modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=T=>s.value=T),"is-read-only":l.value,"parent-editor":g.editor,"spellcheck-enabled":!1},null,8,["modelValue","is-read-only","parent-editor"]),o.createVNode(E,{class:"flex-row justify-between"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("button",{onClick:b[1]||(b[1]=T=>n("delete"))},o.toDisplayString(o.unref(i)("editor.delete")),513),[[o.vShow,u.value]]),o.withDirectives(o.createElementVNode("div",_Z,[o.createElementVNode("button",{onClick:f},o.toDisplayString(o.unref(i)("editor.menubar.menu.cancel")),1),o.createElementVNode("button",{disabled:o.unref(c),class:o.normalizeClass({"cursor-not-allowed":o.unref(c)}),onClick:p},o.toDisplayString(o.unref(i)("editor.menubar.menu.save")),11,TZ)],512),[[o.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-c6e8813c"]]),AZ=["innerHTML"],MZ=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],OZ=o.defineComponent({__name:"ConfigPlan",props:na,setup(t){const e=t,n=o.ref(!1),r=o.ref(null),{selection:i,doc:s}=e.editor.state,a=o.inject("isMobile"),l=o.ref(!1),u=Ne.useEventBus(mr.RENDER_SUPER_TEXT),c=o.computed(()=>{var _,T;const x=s.resolve(i.from),k=x==null?void 0:x.node(-1),E=(_=k==null?void 0:k.attrs)==null?void 0:_.id,C=(T=k==null?void 0:k.attrs)==null?void 0:T.pageNumber;return{pageId:E,pageNumber:C}}),f=o.computed(()=>{const x=e.getPos(),k=e.editor.state.doc.resolve(x);for(let E=k.depth;E>0;E--){const C=k.node(E);if(C.type.name==="paragraph")return C}return null}),p=o.computed(()=>{var x;return((x=f.value)==null?void 0:x.attrs.id)||""});function m(x){e.updateAttributes({"data-text":x}),n.value=!1}function g(x){const k=e.node.attrs[it.TEXT],E=e.node.attrs[it.ID],_={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:k};u.emit({action:"hover",payload:_})}function b(x){const k=e.node.attrs[it.ID],C={lineId:x.target.querySelector(`[node-id="${k}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function v(){const{getPos:x,node:k,editor:E}=e,C=x(),_=C+1;E.commands.deleteRange({from:C,to:_})}function y(){n.value=!0,a&&(l.value=!0)}return(x,k)=>{const E=bn,C=ov,_=rv,T=nv,A=tv,V=Wc;return o.openBlock(),o.createBlock(o.unref(ta),{as:"span",class:o.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":o.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:o.withCtx(()=>[o.createVNode(A,null,{default:o.withCtx(()=>[o.createVNode(C,{as:"template",class:"relative"},{default:o.withCtx(()=>[o.createVNode(E,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:y,onMouseenter:g,onMouseleave:b},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"plan",class:o.normalizeClass({"w-[18px] h-auto pr-1":o.unref(a)})},null,8,["class"]),k[3]||(k[3]=o.createTextVNode(" [")),o.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[o.unref(it).TEXT]},null,8,AZ),k[4]||(k[4]=o.createTextVNode("] ")),o.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[o.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[o.unref(it).TEXT],"node-id":e.node.attrs[o.unref(it).ID],"line-id":p.value},null,8,MZ)]),_:1})]),_:1}),o.createVNode(T,null,{default:o.withCtx(()=>[o.createVNode(_,{onSelect:k[0]||(k[0]=O=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),o.createVNode(_,{onSelect:v},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),o.unref(a)?(o.openBlock(),o.createBlock(bE,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(it).TEXT],"super-text-id":e.node.attrs[o.unref(it).ID],onClose:k[2]||(k[2]=O=>n.value=!1),onSave:m,onDelete:v},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(o.openBlock(),o.createBlock(V,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(it).TEXT],"super-text-element-id":e.node.attrs[o.unref(it).ELEMENT_ID],onClose:k[1]||(k[1]=O=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),vE=Dt.create({name:"configPlan",inline:!0,group:"inline",atom:!0,draggable:!0,addStorage(){return{isShowConfigPlanInput:!1}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:Ge,componentProps:{action:()=>{t.commands.toggleConfigPlanInput()},isActive:()=>{},icon:"plan",title:e("editor.insertConfigPlan"),tooltip:e("editor.insertConfigPlan"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] gap-x-1 ml-auto",customClassTooltip:"ml-auto"}}]:[]]}},addAttributes(){return{"data-id":{default:null},"data-text":{default:""},"data-position":{default:"0"}}},addCommands(){return{toggleConfigPlanInput:()=>({editor:t})=>t.storage.configPlan.isShowConfigPlanInput=!t.storage.configPlan.isShowConfigPlanInput}},parseHTML(){return[{tag:"button.config-plan"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"config-plan"})]},addNodeView(){return ra(OZ)},addProseMirrorPlugins(){return[new ot({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="configPlan"){const l=s.attrs["data-position"],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,"data-position":u}),i=!0)}}),i?r:null}})]}});var Av,Mv;if(typeof WeakMap<"u"){let t=new WeakMap;Av=e=>t.get(e),Mv=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Av=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},Mv=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var un=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,a=i+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[e+this.width*l]==n;l++)a++;return{left:r,top:i,right:s,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:a,right:l,top:u,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(i,u),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,a=this.map[s];n[a]||(n[a]=!0,!(i==t.left&&i&&this.map[s-1]==a||r==t.top&&r&&this.map[s-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const l=(t+1)*this.width;for(;a<l&&this.map[a]<i;)a++;return a==l?s-1:this.map[a]}i=s}}static get(t){return Av(t)||Mv(t,BZ(t))}};function BZ(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=IZ(t),n=t.childCount,r=[];let i=0,s=null;const a=[];for(let c=0,f=e*n;c<f;c++)r[c]=0;for(let c=0,f=0;c<n;c++){const p=t.child(c);f++;for(let b=0;;b++){for(;i<r.length&&r[i]!=0;)i++;if(b==p.childCount)break;const v=p.child(b),{colspan:y,rowspan:x,colwidth:k}=v.attrs;for(let E=0;E<x;E++){if(E+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:f,n:x-E});break}const C=i+E*e;for(let _=0;_<y;_++){r[C+_]==0?r[C+_]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:y-_});const T=k&&k[_];if(T){const A=(C+_)%e*2,V=a[A];V==null||V!=T&&a[A+1]==1?(a[A]=T,a[A+1]=1):V==T&&a[A+1]++}}}i+=y,f+=v.nodeSize}const m=(c+1)*e;let g=0;for(;i<m;)r[i++]==0&&g++;g&&(s||(s=[])).push({type:"missing",row:c,n:g}),f++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new un(e,n,r,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&RZ(l,a,t),l}function IZ(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let a=0;a<r;a++){const l=t.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let a=0;a<i.childCount;a++){const l=i.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function RZ(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const f=(i+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=LZ(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function LZ(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Gn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Ms=new kt("selectingCells");function Kl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function DZ(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function _o(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Sh(t){const e=t.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 n=Kl(e.$head)||PZ(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function PZ(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Ov(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function VZ(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Bv(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function yE(t,e,n){const r=t.node(-1),i=un.get(r),s=t.start(-1),a=i.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function Ia(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function wE(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function FZ(t,e,n){const r=Gn(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var jt=class Fi extends We{constructor(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=i.cellsInRect(a).filter(f=>f!=n.pos-s);u.unshift(n.pos-s);const c=u.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s+f+1;return new s3(l.resolve(m),l.resolve(m+p.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(Ov(r)&&Ov(i)&&Bv(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Fi.rowSelection(r,i):s&&this.isColSelection()?Fi.colSelection(r,i):new Fi(r,i)}return De.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=un.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=i.top;u<i.bottom;u++){const c=[];for(let f=u*n.width+i.left,p=i.left;p<i.right;p++,f++){const m=n.map[f];if(s[m])continue;s[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const v=i.left-g.left,y=g.right-i.right;if(v>0||y>0){let x=b.attrs;if(v>0&&(x=Ia(x,0,v)),y>0&&(x=Ia(x,x.colspan-y,y)),g.left<i.left){if(b=b.type.createAndFill(x),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(x)}`)}else b=b.type.create(x,b.content)}if(g.top<i.top||g.bottom>i.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,i.bottom)-Math.max(g.top,i.top)};g.top<i.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(be.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Se(be.from(l),1,1)}replace(e,n=Se.empty){const r=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){const{$from:l,$to:u}=i[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Se.empty:n)}const s=We.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Se(be.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=un.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),i+s[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+i.map[a.left])),l.bottom<i.height&&(n=u.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+i.map[l.left])),a.bottom<i.height&&(e=u.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))),new Fi(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=un.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const a=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Fi&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+i.map[a.top*i.width])),l.right<i.width&&(n=u.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+i.map[l.top*i.width])),a.right<i.width&&(e=u.resolve(s+i.map[i.width*(a.top+1)-1]))),new Fi(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Fi(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Fi(e.resolve(n),e.resolve(r))}getBookmark(){return new $Z(this.$anchorCell.pos,this.$headCell.pos)}};jt.prototype.visible=!1,We.jsonID("cell",jt);var $Z=class Y9{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Y9(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Bv(n,r)?new jt(n,r):We.near(r,1)}};function HZ(t){if(!(t.selection instanceof jt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Gt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ut.create(t.doc,e)}function zZ({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function UZ({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function WZ(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,a;if(r instanceof Pe&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=jt.create(i,r.from);else if(a=="row"){const l=i.resolve(r.from+1);s=jt.rowSelection(l,l)}else if(!n){const l=un.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=jt.create(i,u+1,c)}}else r instanceof De&&zZ(r)?s=De.create(i,r.from):r instanceof De&&UZ(r)&&(s=De.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var jZ=new kt("fix-tables");function xE(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let a=0,l=0;a<s;a++){const u=e.child(a);for(let c=l,f=Math.min(i,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<i&&t.child(l).sameMarkup(u)?xE(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function CE(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=qZ(t,i,s,n))};return e?e.doc!=t.doc&&xE(e.doc,t.doc,0,r):t.doc.descendants(r),n}function qZ(t,e,n,r){const i=un.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<i.height;u++)s.push(0);for(let u=0;u<i.problems.length;u++){const c=i.problems[u];if(c.type=="collision"){const f=e.nodeAt(c.pos);if(!f)continue;const p=f.attrs;for(let m=0;m<p.rowspan;m++)s[c.row+m]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Ia(p,p.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<i.height;u++){const f=e.child(u),p=c+f.nodeSize,m=s[u];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let y=0;y<m;y++){const x=Gn(t.schema)[g].createAndFill();x&&b.push(x)}const v=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(v),b)}c=p}return r.setMeta(jZ,{fixTables:!0})}function No(t){const e=t.selection,n=Sh(t),r=n.node(-1),i=n.start(-1),s=un.get(r);return{...e instanceof jt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function kE(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;FZ(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const u=e.map[l],c=r.nodeAt(u);t.setNodeMarkup(t.mapping.map(n+u),null,wE(c.attrs,i-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?Gn(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,i,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function KZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(kE(t.tr,n,n.left))}return!0}function GZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(kE(t.tr,n,n.right))}return!0}function XZ(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+i,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(i>0&&e.map[l-1]==u||i<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,Ia(f,i-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function YZ(t,e){if(!_o(t))return!1;if(e){const n=No(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;XZ(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=un.get(s)}e(r)}return!0}function JZ(t,e,n){var r;const i=Gn(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=i)return!1;return!0}function EE(t,{map:e,tableStart:n,table:r},i){var s;let a=n;for(let c=0;c<i;c++)a+=r.child(c).nodeSize;const l=[];let u=i>0?-1:0;JZ(e,r,i+u)&&(u=i==0||i==e.height?null:0);for(let c=0,f=e.width*i;c<e.width;c++,f++)if(i>0&&i<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),c+=m.colspan-1}else{const p=u==null?Gn(r.type.schema).cell:(s=r.nodeAt(e.map[f+u*e.width]))==null?void 0:s.type,m=p==null?void 0:p.createAndFill();m&&l.push(m)}return t.insert(a,Gn(r.type.schema).row.create(null,l)),t}function ZZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(EE(t.tr,n,n.top))}return!0}function QZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(EE(t.tr,n,n.bottom))}return!0}function NZ(t,{map:e,table:n,tableStart:r},i){let s=0;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const a=s+n.child(i).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=i*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),i>0&&p==e.map[f-e.width]){const m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m,rowspan:m.rowspan-1}),c+=m.colspan-1}else if(i<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),v=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(l).map(r+v),b),c+=g.colspan-1}}}}function eQ(t,e){if(!_o(t))return!1;if(e){const n=No(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;NZ(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=un.get(n.table)}e(r)}return!0}function SE(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function tQ({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,a=(r.bottom-1)*t+r.left,l=i+(r.right-r.left-1);for(let u=r.top;u<r.bottom;u++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let u=r.left;u<r.right;u++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[a]==n[a+t])return!0;i++,a++}return!1}function _E(t,e){const n=t.selection;if(!(n instanceof jt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=No(t),{map:i}=r;if(tQ(i,r))return!1;if(e){const s=t.tr,a={};let l=be.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=i.map[f*i.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{SE(g)||(l=l.append(g.content));const b=s.mapping.map(m+r.tableStart);s.delete(b,b+g.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+r.tableStart,null,{...wE(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const f=u+1+c.content.size,p=SE(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new jt(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function TE(t,e){const n=Gn(t.schema);return nQ(({node:r})=>n[r.type.spec.tableRole])(t,e)}function nQ(t){return(e,n)=>{var r;const i=e.selection;let s,a;if(i instanceof jt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,a=i.$anchorCell.pos}else{if(s=DZ(i.$from),!s)return!1;a=(r=Kl(i.$from))==null?void 0:r.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const f=No(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)u.push(c?{...l,colwidth:c&&c[g]?[c[g]]:null}:l);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=s.nodeSize);for(let v=f.left,y=0;v<f.right;v++,y++)v==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:v}).createAndFill(u[y]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),i instanceof jt&&p.setSelection(new jt(p.doc.resolve(i.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function rQ(t,e){return function(n,r){if(!_o(n))return!1;const i=Sh(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof jt?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function oQ(t){return function(e,n){if(!_o(e))return!1;if(n){const r=Gn(e.schema),i=No(e),s=e.tr,a=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=a.map(u=>i.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(i.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(i.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function AE(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function jc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?oQ(t):function(n,r){if(!_o(n))return!1;if(r){const i=Gn(n.schema),s=No(n),a=n.tr,l=AE("row",s,i),u=AE("column",s,i),f=(t==="column"?l:t==="row"?u:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:s.map.height}:t=="row"?{left:f,top:0,right:s.map.width,bottom:1}:s,m=t=="column"?u?i.cell:i.header_cell:t=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,v=a.doc.nodeAt(b);v&&a.setNodeMarkup(b,m,v.attrs)}),r(a)}return!0}}jc("row",{useDeprecatedLogic:!0}),jc("column",{useDeprecatedLogic:!0});var iQ=jc("cell",{useDeprecatedLogic:!0});function sQ(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return i-1-a.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function ME(t){return function(e,n){if(!_o(e))return!1;const r=sQ(Sh(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(De.between(i,VZ(i))).scrollIntoView())}return!0}}function aQ(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function _h(t,e){const n=t.selection;if(!(n instanceof jt))return!1;if(e){const r=t.tr,i=Gn(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(i)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Se(i,0,0))}),r.docChanged&&e(r)}return!0}function lQ(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,a=i.type.schema,l=[];if(s=="row")for(let u=0;u<e.childCount;u++){let c=e.child(u).content;const f=u?0:Math.max(0,n-1),p=u<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(c=Iv(Gn(a).row,new Se(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?Iv(Gn(a).row,new Se(e,n,r)).content:e);else return null;return uQ(a,l)}function uQ(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=i;c<i+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(be.empty),n[i]<r){const s=Gn(t).cell.createAndFill(),a=[];for(let l=n[i];l<r;l++)a.push(s);e[i]=e[i].append(be.from(a))}return{height:e.length,width:r,rows:e}}function Iv(t,e){const n=t.createAndFill();return new Km(n).replace(0,n.content.size,e).doc}function cQ({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let f=s[l]||0,p=0;f<r;p++){let m=u.child(p%u.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Ia(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),c.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)s[l+g]=(s[l+g]||0)+m.attrs.colspan}a.push(be.from(c))}n=a,t=r}if(e!=i){const s=[];for(let a=0,l=0;a<i;a++,l++){const u=[],c=n[l%e];for(let f=0;f<c.childCount;f++){let p=c.child(f);a+p.attrs.rowspan>i&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,i-p.attrs.rowspan)},p.content)),u.push(p)}s.push(be.from(u))}n=s,e=i}return{width:t,height:e,rows:n}}function dQ(t,e,n,r,i,s,a){const l=t.doc.type.schema,u=Gn(l);let c,f;if(i>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let v;g.lastChild==null||g.lastChild.type==u.cell?v=c||(c=u.cell.createAndFill()):v=f||(f=u.header_cell.createAndFill());for(let y=e.width;y<i;y++)b.push(v);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,v=(e.height-1)*e.width;b<Math.max(e.width,i);b++){const y=b>=e.width?!1:n.nodeAt(e.map[v+b]).type==u.header_cell;p.push(y?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,be.from(p)),g=[];for(let b=e.height;b<s;b++)g.push(m);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),g)}return!!(c||f)}function OE(t,e,n,r,i,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=i;c<s;c++){const f=a*e.width+c,p=e.map[f];if(e.map[f-e.width]==p){u=!0;const m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m.attrs,rowspan:a-g}),t.insert(t.mapping.slice(l).map(e.positionAt(a,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-a})),c+=m.attrs.colspan-1}}return u}function BE(t,e,n,r,i,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=i;c<s;c++){const f=c*e.width+a,p=e.map[f];if(e.map[f-1]==p){u=!0;const m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(l).map(p+r);t.setNodeMarkup(b,null,Ia(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Ia(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function IE(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=un.get(s);const{top:l,left:u}=r,c=u+i.width,f=l+i.height,p=t.tr;let m=0;function g(){if(s=n?p.doc.nodeAt(n-1):p.doc,!s)throw new Error("No table found");a=un.get(s),m=p.mapping.maps.length}dQ(p,a,s,n,c,f,m)&&g(),OE(p,a,s,n,u,c,l,m)&&g(),OE(p,a,s,n,u,c,f,m)&&g(),BE(p,a,s,n,l,f,u,m)&&g(),BE(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const v=a.positionAt(b,u,s),y=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(v+n),p.mapping.slice(m).map(y+n),new Se(i.rows[b-l],0,0))}g(),p.setSelection(new jt(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var fQ=k0({ArrowLeft:Ah("horiz",-1),ArrowRight:Ah("horiz",1),ArrowUp:Ah("vert",-1),ArrowDown:Ah("vert",1),"Shift-ArrowLeft":Mh("horiz",-1),"Shift-ArrowRight":Mh("horiz",1),"Shift-ArrowUp":Mh("vert",-1),"Shift-ArrowDown":Mh("vert",1),Backspace:_h,"Mod-Backspace":_h,Delete:_h,"Mod-Delete":_h});function Th(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Ah(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof jt)return Th(n,r,We.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=RE(i,t,e);if(a==null)return!1;if(t=="horiz")return Th(n,r,We.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=yE(l,t,e);let c;return u?c=We.near(u,1):e<0?c=We.near(n.doc.resolve(l.before(-1)),-1):c=We.near(n.doc.resolve(l.after(-1)),1),Th(n,r,c)}}}function Mh(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let a;if(s instanceof jt)a=s;else{const u=RE(i,t,e);if(u==null)return!1;a=new jt(n.doc.resolve(u))}const l=yE(a.$headCell,t,e);return l?Th(n,r,new jt(a.$anchorCell,l)):!1}}function pQ(t,e){const n=t.state.doc,r=Kl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new jt(r))),!0):!1}function hQ(t,e,n){if(!_o(t.state))return!1;let r=lQ(n);const i=t.state.selection;if(i instanceof jt){r||(r={width:1,height:1,rows:[be.from(Iv(Gn(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),l=un.get(s).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=cQ(r,l.right-l.left,l.bottom-l.top),IE(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Sh(t.state),a=s.start(-1);return IE(t.state,t.dispatch,a,un.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function mQ(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=LE(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof jt)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Kl(t.state.selection.$anchor))!=null&&((n=Rv(t,e))==null?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(u,c){let f=Rv(t,c);const p=Ms.getState(t.state)==null;if(!f||!Bv(u,f))if(p)f=u;else return;const m=new jt(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(Ms,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),Ms.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ms,-1))}function l(u){const c=u,f=Ms.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(LE(t,c.target)!=r&&(p=Rv(t,e),!p))return a();p&&s(p,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",l)}function RE(t,e,n){if(!(t.state.selection instanceof De))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function LE(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Rv(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Kl(t.state.doc.resolve(n.pos)):null}var gQ=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,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",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Lv(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Lv(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Lv(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f){for(let p=0,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v++,m++){const y=i==m?s:b&&b[v],x=y?y+"px":"";if(l+=y||r,y||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const k=document.createElement("col");k.style.width=x,e.appendChild(k)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=p}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Br=new kt("tableColumnResizing");function bQ({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=gQ,lastColumnResizable:i=!0}={}){const s=new ot({key:Br,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=Gn(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new vQ(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=Br.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{yQ(a,l,t,i)},mouseleave:a=>{wQ(a)},mousedown:(a,l)=>{xQ(a,l,e,n)}},decorations:a=>{const l=Br.getState(a);if(l&&l.activeHandle>-1)return _Q(a,l.activeHandle)},nodeViews:{}}});return s}var vQ=class Mm{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Br);if(r&&r.setHandle!=null)return new Mm(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mm(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return Ov(e.doc.resolve(i))||(i=-1),new Mm(i,n.dragging)}return n}};function yQ(t,e,n,r){if(!t.editable)return;const i=Br.getState(t.state);if(i&&!i.dragging){const s=kQ(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=DE(t,e,"left",n):u-e.clientX<=n&&(a=DE(t,e,"right",n))}if(a!=i.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=un.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}VE(t,a)}}}function wQ(t){if(!t.editable)return;const e=Br.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&VE(t,-1)}function xQ(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,a=Br.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=CQ(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Br,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=Br.getState(t.state);m!=null&&m.dragging&&(EQ(t,m.activeHandle,PE(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Br,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=Br.getState(t.state);if(m&&m.dragging){const g=PE(m.dragging,p,n);FE(t,m.activeHandle,g,r)}}return FE(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function CQ(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,u=n;if(r)for(let c=0;c<n;c++)r[c]&&(l-=r[c],u--);return l/u}function kQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function DE(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=Kl(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=un.get(l.node(-1)),c=l.start(-1),f=u.map.indexOf(l.pos-c);return f%u.width==0?-1:c+u.map[f-1]}function PE(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function VE(t,e){t.dispatch(t.state.tr.setMeta(Br,{setHandle:e}))}function EQ(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=un.get(i),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=t.state.tr;for(let c=0;c<s.height;c++){const f=c*s.width+l;if(c&&s.map[f]==s.map[f-s.width])continue;const p=s.map[f],m=i.nodeAt(p).attrs,g=m.colspan==1?0:l-s.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():SQ(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function FE(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),a=i.start(-1),l=un.get(s).colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;let u=t.domAtPos(i.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&Lv(s,u.firstChild,u,r,l,n)}function SQ(t){return Array(t).fill(0)}function _Q(t,e){var n;const r=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return ut.empty;const a=un.get(s),l=i.start(-1),u=a.colCount(i.pos-l)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const f=u+c*a.width;if((u==a.width-1||a.map[f]!=a.map[f+1])&&(c==0||a.map[f]!=a.map[f-a.width])){const p=a.map[f],m=l+p+s.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Br.getState(t))!=null&&n.dragging&&r.push(Gt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Gt.widget(m,g))}}return ut.create(t.doc,r)}function TQ({allowTableNodeSelection:t=!1}={}){return new ot({key:Ms,state:{init(){return null},apply(e,n){const r=e.getMeta(Ms);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:HZ,handleDOMEvents:{mousedown:mQ},createSelectionBetween(e){return Ms.getState(e.state)!=null?e.state.selection:null},handleTripleClick:pQ,handleKeyDown:fQ,handlePaste:hQ},appendTransaction(e,n,r){return WZ(r,CE(r,n),t)}})}const AQ=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const i={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,i,r.marks)},MQ=(t,e,n)=>{const{doc:r,selection:i}=t;return!r||!i||!(i instanceof jt)||i.forEachCell((s,a)=>{t=AQ(t,a,n)}),t},$E=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;return n=n.setSelection(s),n=MQ(n,e,t),n.docChanged?(i==null||i(n),!0):!1},OQ=tt.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>$E(t,this.options),unsetTableCellBackground:()=>$E("",this.options)}}}),BQ=Dt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",yt(this.options.HTMLAttributes,t),0]}}),IQ=Dt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",yt(this.options.HTMLAttributes,t),0]}}),RQ=Dt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",yt(this.options.HTMLAttributes,t),0]}});function Dv(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function HE(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=i===m?s:b&&b[v],x=y?`${y}px`:"";if(l+=y||r,y||(u=!1),c){if(c.style.width!==x){const[k,E]=Dv(r,y);c.style.setProperty(k,E)}c=c.nextSibling}else{const k=document.createElement("col"),[E,C]=Dv(r,y);k.style.setProperty(E,C),e.appendChild(k)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=p}u?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class LQ{constructor(e,n){this.node=e,this.cellMinWidth=n,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")),HE(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,HE(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function DQ(t,e,n,r){let i=0,s=!0;const a=[],l=t.firstChild;if(!l)return{};for(let p=0,m=0;p<l.childCount;p+=1){const{colspan:g,colwidth:b}=l.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=n===m?r:b&&b[v];i+=y||e,y||(s=!1);const[x,k]=Dv(e,y);a.push(["col",{style:`${x}: ${k}`}])}}const u=s?`${i}px`:"",c=s?"":`${i}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function zE(t,e){return t.createAndFill()}function PQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function VQ(t,e,n,r,i){const s=PQ(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=zE(s.cell);if(f&&l.push(f),r){const p=zE(s.header_cell);p&&a.push(p)}}const u=[];for(let c=0;c<e;c+=1)u.push(s.row.createChecked(null,r&&c===0?a:l));return s.table.createChecked(null,u)}function FQ(t){return t instanceof jt}const Oh=({editor:t})=>{const{selection:e}=t.state;if(!FQ(e))return!1;let n=0;const r=n4(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},$Q=Dt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:LQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=DQ(t,this.options.cellMinWidth);return["table",yt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${i}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const a=VQ(s.schema,t,e,n);if(i){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(De.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>KZ(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>GZ(t,e),deleteColumn:()=>({state:t,dispatch:e})=>YZ(t,e),addRowBefore:()=>({state:t,dispatch:e})=>ZZ(t,e),addRowAfter:()=>({state:t,dispatch:e})=>QZ(t,e),deleteRow:()=>({state:t,dispatch:e})=>eQ(t,e),deleteTable:()=>({state:t,dispatch:e})=>aQ(t,e),mergeCells:()=>({state:t,dispatch:e})=>_E(t,e),splitCell:()=>({state:t,dispatch:e})=>TE(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>jc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>jc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>iQ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_E(t,e)?!0:TE(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>rQ(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>ME(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ME(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&CE(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=jt.create(e.doc,t.anchorCell,t.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:Oh,"Mod-Backspace":Oh,Delete:Oh,"Mod-Delete":Oh}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[bQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],TQ({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pt($e(t,"tableRole",e))}}}),HQ=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,zQ=/CrOS/,UQ=/android|ipad|playbook|silk/i;function UE(t={}){let e=t.ua||typeof navigator<"u"&&navigator.userAgent;return e&&typeof e=="object"&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string"?!1:!!(HQ.test(e)&&!zQ.test(e)||t.tablet&&UQ.test(e)||t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.includes("Macintosh")&&e.includes("Safari"))}const WQ=["disabled"],jQ={"content-class":"table-grid-size-editor","content-style":"padding:0"},qQ={class:"flex flex-col flex-wrap gap-1 justify-between"},KQ=["onMouseover","onMousedown"],GQ={class:"text-center text-sm text-zinc-600 mt-2"},XQ=o.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=o.ref(!1),i=o.ref(!0),s=o.reactive({rows:UE()?sf:of,cols:UE()?sf:of}),a=o.reactive({rows:af,cols:af});function l(g,b){g===s.rows&&(s.rows=Math.min(g+1,sf)),b===s.cols&&(s.cols=Math.min(b+1,sf)),a.rows=g,a.cols=b}function u(g,b){n("create-table",{rows:g,cols:b,withHeaderRow:o.unref(i)}),c()}function c(){r.value=!1,i.value=!1,s.rows=of,s.cols=of,a.rows=af,a.cols=af}const f=o.inject("isMobile",!1),{isOpen:p}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:"[data-radix-popper-content-wrapper]"}),m=o.computed(()=>f?{modal:!1,open:p.value,"onUpdate:open":g=>p.value=g}:{});return(g,b)=>(o.openBlock(),o.createBlock(o.unref(ms),o.normalizeProps(o.guardReactiveProps(o.unref(m))),{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[o.renderSlot(g.$slots,"trigger")],8,WQ)]),_:3}),o.createVNode(o.unref(gs),{class:"w-full",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createElementVNode("div",jQ,[o.createElementVNode("div",qQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.rows,v=>(o.openBlock(),o.createElementBlock("div",{key:"r"+v,class:"flex gap-1"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.cols,y=>(o.openBlock(),o.createElementBlock("div",{key:"c"+y,class:o.normalizeClass([[y<=a.cols&&v<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:x=>l(v,y),onMousedown:x=>u(v,y)},b[0]||(b[0]=[o.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,KQ))),128))]))),128))]),o.createElementVNode("div",GQ,o.toDisplayString(a.rows)+" x "+o.toDisplayString(a.cols),1)])]),_:1})]),_:3},16))}}),YQ={style:{display:"flex"}},JQ=o.defineComponent({__name:"TableActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t;function n(r){e.editor.isActive("table")||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,i)=>(o.openBlock(),o.createBlock(XQ,{disabled:r.editor.isActive("table"),onCreateTable:n},{trigger:o.withCtx(()=>[o.createElementVNode("div",YQ,[o.createVNode(Ge,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled,color:r.color,action:r.action,"is-active":r.isActive},null,8,["icon","tooltip","disabled","color","action","is-active"])])]),_:1},8,["disabled"]))}}),Pv=$Q.extend({addStorage(){return{isTableMenuOpen:!1}},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toggleTableEditor:e=>({editor:n})=>n.storage.table?(n.storage.table.isTableEditorOpen=e,!0):!1}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:n})=>({component:JQ,componentProps:{icon:"Table",tooltip:n("editor.table.tooltip"),action:()=>{var i;const r=((i=e.storage.table)==null?void 0:i.isTableEditorOpen)??!1;e.commands.toggleTableEditor(!r)}}})}},addExtensions(){return[IQ.configure(this.options.tableRow),BQ.configure(this.options.tableHeader),RQ.configure(this.options.tableCell),OQ.configure(this.options.tableCellBackground)]}}),ZQ={class:"flex items-center gap-2 px-2"},QQ=o.defineComponent({__name:"TextDropdown",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""}},setup(t){const e=t,{t:n}=At(),r=o.computed(()=>[{name:"paragraph",label:n("editor.paragraph.tooltip"),iconName:"Paragraph",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:n("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:n("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:n("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:n("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:n("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:n("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:n("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:n("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}]),i=o.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return o.openBlock(),o.createBlock(Ea,{title:(l=i.value)==null?void 0:l.label,"side-offset":5},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,c)=>{var f;return o.openBlock(),o.createBlock(o.unref($l),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:o.withCtx(()=>[o.createElementVNode("div",ZQ,[o.createVNode(o.unref(Ot),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),o.createElementVNode("span",null,o.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),NQ=tt.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:QQ,componentProps:{}})}}}),eN=[{label:"복합 표현 - 요일과 시간대",examples:["다음 월요일 저녁","이번 토요일 오전"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"시각 표현",examples:["오전 10시","오후 3시 30분","정오","자정","새벽 2시"],pattern:"((오전|오후|새벽|밤|저녁)\\s?\\d{1,2}(시(\\s?\\d{1,2}분)?)?|정오|자정)"},{label:"시간 표현 - 이른/늦은",examples:["이른 아침","늦은 밤"],pattern:"(이른\\s아침|늦은\\s밤)"},{label:"연도+월",examples:["2019년 6월","2025년12월","2024년 01월"],pattern:"\\d{4}년\\s?\\d{1,2}월"},{label:"오늘/내일/어제",examples:["오늘","내일","모레","어제","그제","그끄제"],pattern:"(오늘|내일|모레|어제|그제|그끄제)"},{label:"상대적 주 단위",examples:["이번 주","다음 주","지난 주"],pattern:"(이번|다음|지난)\\s?주"},{label:"상대적 월 단위",examples:["이번 달","다음 달","지난 달"],pattern:"(이번|다음|지난)\\s?달"},{label:"상대적 연도",examples:["올해","내년","작년","재작년","내후년"],pattern:"(올해|내년|작년|재작년|내후년)"},{label:"복합 표현 - 날짜와 시간대",examples:["1월 1일 오전","12월25일 저녁","다음 주 금요일 오전"],pattern:"(내년|올해|작년)?\\s?\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"정확한 날짜",examples:["1월1일","1월 1일","12월 25일","01월 01일"],pattern:"\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일"},{label:"요일",examples:["월요일","화요일","이번 금요일","다음 화요일"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일"},{label:"시간대",examples:["오전","오후","저녁","밤","새벽"],pattern:"(오전|오후|저녁|밤|새벽)"},{label:"짧은 시간 표현",examples:["방금","조금 전","금방","곧","잠시 후"],pattern:"(방금|조금\\s전|금방|곧|잠시\\s후)"},{label:"연도",examples:["2015년","2024년","1998년"],pattern:"\\d{4}년"}],tN=t=>{const e=[...t||[],...eN.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},nN=tt.create({name:ep,addOptions(){return{additionalTimeWords:[],enabled:!0}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null,enabled:this.options.enabled}},addProseMirrorPlugins(){return[new ot({props:{decorations:t=>{if(!this.storage.enabled)return ut.empty;const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=tN(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let i;const s=this.storage.cachedRegex;for(;i=s.exec(n.text||"");){const a=r+i.index,l=a+i[0].length;e.push(Gt.inline(a,l,{class:"time-highlight"}))}}),ut.create(t.doc,e)}}})]},addCommands(){return{toggleTimeHighlight:()=>({editor:t})=>{const e=t.storage[ep];return e.enabled=!e.enabled,t.view.dispatch(t.state.tr),!0}}}});function Vv(t){const e=JSON.stringify(t),n=window.ReactNativeWebView;if(n){n.postMessage(e);return}console.warn("[clipboardBridge] no bridge found")}function rN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="CLIPBOARD_STATE"&&t(!!((i=r.data)!=null&&i.hasClipboard))},Vv({type:"REQUEST_CLIPBOARD_STATE"})})}function oN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="PASTE_RESULT"&&t(((i=r.data)==null?void 0:i.text)??null)},Vv({type:"PASTE"})})}function iN(t,e){Vv({type:"COPY",data:{html:t,text:e}})}async function sN(t,e){try{const n=new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})});await navigator.clipboard.write([n])}catch(n){console.error("navigator clipboard write failed:",n)}}async function aN(){try{if("read"in navigator.clipboard){const t=await navigator.clipboard.read();for(const e of t){if(e.types.includes("text/html"))return await(await e.getType("text/html")).text();if(e.types.includes("text/plain"))return await(await e.getType("text/plain")).text()}}}catch(t){console.warn("navigator clipboard read failed:",t)}}const lN=tt.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{try{const i=e.doc.slice(n,r),a=$r.fromSchema(t.schema).serializeFragment(i.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|
|
344
|
-
`);t.storage.deviceEnv.isMobile?iN(u,c):await sN(u,c)}catch(i){console.warn("[clipboard] copy failed",i)}})(),!0)},cutContent:()=>({editor:t})=>((async()=>{try{await t.commands.copyContent(),t.chain().focus().deleteSelection().run()}catch(e){console.warn("[clipboard] cut failed",e)}})(),!0),pasteContent:()=>({editor:t})=>((async()=>{try{t.chain().focus().run();const e=t.storage.deviceEnv.isMobile?await oN():await aN();if(!e)return;const n=new DataTransfer;if(IJ(e)){n.setData("text/html",e);const i=document.createElement("div");i.innerHTML=e,n.setData("text/plain",i.innerText)}else n.setData("text/plain",e);const r=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0});Object.defineProperty(r,"clipboardData",{value:n}),t.view.dom.dispatchEvent(r)}catch(e){console.warn("Clipboard paste failed:",e)}})(),!0)}},onCreate(){const t=this.editor;t.hasClipboard=async()=>{try{return!!(t.storage.deviceEnv.isMobile?await rN():await navigator.clipboard.readText())}catch(e){return console.warn("[clipboard] check failed",e),!1}}}}),uN=tt.create({name:"deviceEnv",addOptions(){return{initial:!1,specialCharModal:void 0}},addStorage(){return{isMobile:this.options.initial,specialCharModal:this.options.specialCharModal,isForceCloseBubble:!1}},addCommands(){return{setIsMobile:t=>({editor:e})=>{var n;return e.storage.deviceEnv.isMobile=t,(n=e.storage.spellchecker)==null||n.spellchecker.setIsMobile(t),!0},setForceCloseBubble:t=>({editor:e})=>(e.storage.deviceEnv.isForceCloseBubble=t,!0),resetForceCloseBubble:()=>({editor:t})=>(t.storage.deviceEnv.isForceCloseBubble=!1,!0)}}}),Bh=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(FV),o.mergeProps({class:o.unref(Ee)("mt-2 ring-offset-ed-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),cN={class:"flex items-center w-full p-3 my-3 hover:bg-ed-accent border border-ed-border text-ed-muted-foreground cursor-pointer rounded-sm transition-all"},dN={key:0,class:"flex justify-center items-center gap-3 text-s"},fN={key:1,class:"flex justify-between items-center w-full"},pN={class:"flex justify-center items-center gap-3"},hN={class:"text-sm"},mN={class:"flex items-center gap-2"},gN=o.defineComponent({__name:"VideoUploader",props:{...na},setup(t){const e=t,n=o.inject("isEditable",o.ref(!0)),r=o.ref(""),i=o.ref(!1),s=o.ref(),{t:a}=At();function l(p){var y;i.value=!0;const m=p.target,g=Array.from((m==null?void 0:m.files)||[]),b=(y=e.editor.extensionManager.extensions.find(x=>x.name==="videoUpload"))==null?void 0:y.options;if(!e.editor||e.editor.isDestroyed||g.length===0||typeof(b==null?void 0:b.upload)!="function")return;const v=g[0];b.upload(v).then(x=>{e.editor.chain().setVideo({src:x}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run(),i.value=!1})}function u(){e.editor.chain().setVideo({src:r.value,width:640}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function c(){e.deleteNode()}function f(){var p;(p=s.value)==null||p.click()}return(p,m)=>(o.openBlock(),o.createBlock(o.unref(ta),{as:"div","data-drag-handle":"",class:o.normalizeClass(o.unref(Ee)(!o.unref(n)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{"default-open":o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",cN,[i.value?(o.openBlock(),o.createElementBlock("div",dN,[o.createVNode(o.unref(Ot),{class:"animate-spin w-6 h-6",name:"LoaderCircle"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(a)("editor.video.dialog.uploading"))+"...",1)])):(o.openBlock(),o.createElementBlock("div",fN,[o.createElementVNode("div",pN,[o.createVNode(o.unref(Ot),{name:"Video",class:"w-6 h-6"}),o.createElementVNode("span",hN,o.toDisplayString(o.unref(a)("editor.video.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(c,["stop"])})]))])]),_:1}),o.createVNode(o.unref(gs),{"trap-focus":"",class:"w-full","on-open-auto-focus":g=>g.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link",disabled:i.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.link")),1)]),_:1},8,["disabled"])]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{class:"w-full mt-1",size:"sm",disabled:i.value,onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1},8,["disabled"]),o.createElementVNode("input",{ref_key:"fileInput",ref:s,type:"file",accept:"video/*",hidden:"",onChange:l},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",mN,[o.createVNode(o.unref(bs),{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=g=>r.value=g),type:"url",autofocus:"",required:"",placeholder:o.unref(a)("editor.video.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(bn),{onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["class"]))}}),WE=Dt.create({name:sc,isolating:!0,defining:!0,group:"block",draggable:!0,selectable:!1,inline:!1,parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addCommands(){return{setVideoUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(gN)},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("link video not found"),button:({editor:e,t:n})=>{var r,i;return{component:Ge,componentProps:{action:()=>e.commands.setVideoUpload(),isActive:()=>e.isActive("video")||!1,disabled:!((i=(r=e.can()).setVideo)!=null&&i.call(r,{})),icon:"Video",tooltip:n("editor.video.tooltip")}}}}}});function bN(t){return t=t.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),t=t.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^https?:\/\/www.bilibili.com\/video\/.*/i.test(t)&&(t=t.replace(/\?.*$/i,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),t.includes("drive.google.com")&&(t=t.replace("/view","/preview")),t}function vN(t){return t?t.includes("youtube.com/embed")||t.includes("player.vimeo.com")||t.includes("player.bilibili.com")||t.includes("drive.google.com"):!1}const jE=Dt.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,width:lf["size-medium"],controls:!0,autoplay:!1,HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"}}},addAttributes(){return{src:{default:null,renderHTML:({src:t})=>({src:t?bN(t):null})},width:{default:this.options.width,renderHTML:({width:t})=>({width:on(t)})},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},controls:{default:this.options.controls}}},parseHTML(){return[{tag:"video"},{tag:"iframe"}]},renderHTML({HTMLAttributes:t}){const{src:e,width:n,controls:r,allowfullscreen:i}=t??{},s=`max-width: ${on(n)};`;return vN(e)?["iframe",{src:e,style:s,...i&&{allowfullscreen:i}}]:["video",{src:e?e.replace(/\\/g,"/"):"",style:s,...r&&{controls:r}}]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),updateVideo:t=>({commands:e})=>e.updateAttributes(this.name,t)}}}),Gl=new kt("upload-image"),yN=()=>new ot({key:Gl,state:{init(){return ut.empty},apply(t,e){e=e.map(t.mapping,t.doc);const n=t.getMeta(Gl);if(n!=null&&n.add){const r=n.add.map(({id:i,pos:s,src:a})=>{const l=wN(a);return Gt.widget(s,l,{id:i,side:-1})});e=e.add(t.doc,r)}return n!=null&&n.remove&&n.remove.forEach(r=>{e=e.remove(e.find(void 0,void 0,i=>i.id===r))}),e}},props:{decorations(t){return this.getState(t)}}});function wN(t){const e=document.createElement("div"),n=document.createElement("img");return n.setAttribute("class","opacity-50"),n.src=t,n.onload=()=>{e.setAttribute("class","img-placeholder")},e.appendChild(n),e}function xN(t,e){var i;const r=Gl.getState(t).find(void 0,void 0,s=>s.id===e);return r.length?(i=r[0])==null?void 0:i.from:null}const qE=({validateFn:t,onUpload:e})=>async(n,r,i)=>{const s=[];for(const a of n){if(t&&!t(a))continue;const l=Zr(6),u=URL.createObjectURL(a);s.push({file:a,id:l,preview:u})}s.length!==0&&(r.dispatch(r.state.tr.setMeta(Gl,{add:s.map(({id:a,preview:l})=>({id:a,pos:i,src:l}))})),await Promise.all(s.map(async({file:a,id:l,preview:u})=>{var c,f;try{const p=await e(a),m=xN(r.state,l);if(m===null)return;const{schema:g}=r.state,b=typeof p=="object"?u:p,v=(c=g.nodes.image)==null?void 0:c.create({src:b}),y=(f=g.nodes.paragraph)==null?void 0:f.create();if(!v||!y)return;r.dispatch(r.state.tr.replaceWith(m,m,v).insert(m+v.nodeSize,y).setMeta(Gl,{remove:[l]}))}catch{r.dispatch(r.state.tr.setMeta(Gl,{remove:[l]}))}})))},CN=(t,e,n)=>{var i;const r=Array.from(((i=e.clipboardData)==null?void 0:i.files)||[]);if(r.length){e.preventDefault();const s=t.state.selection.from;return n(r,t,s+1),!0}return!1},kN=(t,e,n,r)=>{var s;const i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);if(!n&&i.length){e.preventDefault();const a=t.posAtCoords({left:e.clientX,top:e.clientY});if(a)return r(i,t,a.pos+1),!0}return!1},EN={class:"flex items-center w-full p-3 my-3 transition-all border rounded-sm cursor-pointer hover:bg-ed-accent border-ed-border text-ed-muted-foreground"},SN={class:"flex items-center justify-between w-full"},_N={class:"flex items-center justify-center gap-3"},TN={class:"text-sm"},AN={class:"flex items-center gap-2"},MN=o.defineComponent({__name:"ImageUploader",props:{...na},setup(t){const e=t,n=o.ref(""),r=o.ref(),{t:i}=At(),s=o.inject("isEditable",o.ref(!0));function a(f){var v,y;const p=(v=f==null?void 0:f.target)==null?void 0:v.files;if(!e.editor||e.editor.isDestroyed||p.length===0)return;const m=Array.from(p),g=(y=e.editor.extensionManager.extensions.find(x=>x.name==="imageUpload"))==null?void 0:y.options;qE({validateFn:x=>!0,onUpload:g.upload})(m,e.editor.view,e.getPos(),e.node.attrs.id)}function l(){e.editor.chain().setImage({src:n.value}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function u(){e.deleteNode()}function c(){var f;(f=r.value)==null||f.click()}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(ta),{id:f.node.attrs.id,"data-drag-handle":"",class:o.normalizeClass(o.unref(Ee)(!o.unref(s)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{"default-open":o.unref(s)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",EN,[o.createElementVNode("div",SN,[o.createElementVNode("div",_N,[o.createVNode(o.unref(Ot),{name:"ImageUp",class:"w-6 h-6"}),o.createElementVNode("span",TN,o.toDisplayString(o.unref(i)("editor.image.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(u,["stop"])})])])]),_:1}),o.createVNode(o.unref(gs),{"trap-focus":"",class:"w-full","on-open-auto-focus":m=>m.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.url")),1)]),_:1})]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{class:"w-full mt-1",size:"sm",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createElementVNode("input",{ref_key:"fileInput",ref:r,type:"file",accept:"image/*",multiple:"",hidden:"",onChange:a},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",AN,[o.createVNode(o.unref(bs),{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=m=>n.value=m),type:"url",autofocus:"",required:"",placeholder:o.unref(i)("editor.image.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(bn),{onClick:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["id","class"]))}}),ON=1,BN=1e6,Ai={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Fv=0;function IN(){return Fv=(Fv+1)%Number.MAX_VALUE,Fv.toString()}const $v=new Map;function KE(t){if($v.has(t))return;const e=setTimeout(()=>{$v.delete(t),qc({type:Ai.REMOVE_TOAST,toastId:t})},BN);$v.set(t,e)}const To=o.ref({toasts:[]});function qc(t){switch(t.type){case Ai.ADD_TOAST:To.value.toasts=[t.toast,...To.value.toasts].slice(0,ON);break;case Ai.UPDATE_TOAST:To.value.toasts=To.value.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e);break;case Ai.DISMISS_TOAST:{const{toastId:e}=t;e?KE(e):To.value.toasts.forEach(n=>{KE(n.id)}),To.value.toasts=To.value.toasts.map(n=>n.id===e||e===void 0?{...n,open:!1}:n);break}case Ai.REMOVE_TOAST:t.toastId===void 0?To.value.toasts=[]:To.value.toasts=To.value.toasts.filter(e=>e.id!==t.toastId);break}}function Hv(){return{toasts:o.computed(()=>To.value.toasts),toast:RN,dismiss:t=>qc({type:Ai.DISMISS_TOAST,toastId:t})}}function RN(t){const e=IN(),n=i=>qc({type:Ai.UPDATE_TOAST,toast:{...i,id:e}}),r=()=>qc({type:Ai.DISMISS_TOAST,toastId:e});return qc({type:Ai.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}const LN={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5},DN=t=>`${(t/1024/1024).toFixed(2)}MB`,GE=Dt.create({name:wi,isolating:!0,defining:!0,group:"block",draggable:!1,selectable:!1,inline:!1,onCreate(){if(typeof this.options.upload!="function")throw new Error("Image upload function should be a function")},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addAttributes(){return{id:{default:Zr(6),parseHTML:t=>t.getAttribute("id"),renderHTML:t=>t.id?{id:t.id}:{}}}},addCommands(){return{setImageUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(MN)},addOptions(){var t;return{...LN,...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:e,extension:n,t:r})=>{var i,s;return{component:Ge,componentProps:{action:()=>e.commands.setImageUpload(),disabled:!((s=(i=e.can()).setImage)!=null&&s.call(i,{})),icon:"ImageUp",tooltip:r("editor.image.tooltip")}}}}},addProseMirrorPlugins(){const{toast:t}=Hv(),{t:e}=At(),r=qE({validateFn:i=>this.options.acceptMimes.includes(i.type)?i.size>this.options.maxSize?(t({description:`${e("editor.imageUpload.fileSizeTooBig")} ${DN(this.options.maxSize)}.`,duration:2e3}),!1):!0:(t({description:e("editor.imageUpload.fileTypeNotSupported"),duration:2e3}),!1),onUpload:this.options.upload});return[new ot({props:{handlePaste:(i,s)=>!s.clipboardData||Array.from(s.clipboardData.items||[]).some(l=>l.type==="text/html")?!1:CN(i,s,r),handleDrop:(i,s,a,l)=>!(s instanceof DragEvent)||!s.dataTransfer||!Array.from(s.dataTransfer.files||[]).some(f=>this.options.acceptMimes.includes(f.type))?!1:kN(i,s,l,r)}}),yN()]}}),PN=tt.create({name:"searchHighlight",addGlobalAttributes(){return[{types:["textStyle"],attributes:{searchHighlight:{default:null,parseHTML:t=>{const e=t,n=e.style.color,r=e.style.backgroundColor;return!n||!r?null:{color:n,backgroundColor:r}},renderHTML:t=>{if(!t.searchHighlight)return{};const{color:e,backgroundColor:n}=t.searchHighlight;return{style:`color: ${e}; background-color: ${n}`}}}}}]}}),VN=o.defineComponent({__name:"SpecialCharacterButton",props:{editor:l4},setup(t){const e=t,{t:n}=At(),r=wn(),i=o.computed(()=>{var p;return(p=e.editor)==null?void 0:p.storage.specialCharacter.specialCharModal}),s=o.ref(!1);let a=null;function l(){const p=document.activeElement;if(p instanceof HTMLInputElement){a={type:"input",el:p};return}r.editorFocusedInstance.value&&(a={type:"editor"})}const u=()=>{if(!i.value||!i.value.component){console.error("Please configure specialCharModal!");return}s.value=!s.value};document.addEventListener("focusin",p=>{var b,v;if(!s.value)return;const m=p.target;if(m instanceof HTMLInputElement){a={type:"input",el:m};return}const g=r.editorFocusedInstance.value;(v=(b=g==null?void 0:g.view)==null?void 0:b.dom)!=null&&v.contains(m)&&(a={type:"editor"})});function c(p,m){const g=p.selectionStart??p.value.length,b=p.selectionEnd??p.value.length;p.value=p.value.slice(0,g)+m+p.value.slice(b);const v=g+m.length;p.setSelectionRange(v,v),p.dispatchEvent(new Event("input",{bubbles:!0})),p.focus()}const f=(p,m)=>{if(m){if((a==null?void 0:a.type)==="input"){c(a.el,p);return}if((a==null?void 0:a.type)==="editor"){const g=r.editorFocusedInstance.value;if(!g)return;const{view:b}=g,{from:v}=b.state.selection;g.commands.insertContentAt(v,p),g.commands.focus()}}};return(p,m)=>{const g=va,b=vs,v=ba,y=ya;return o.openBlock(),o.createBlock(y,null,{default:o.withCtx(()=>[o.createVNode(v,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(g,null,{default:o.withCtx(()=>[o.createVNode(bn,{class:"text-[#65558F] hover:bg-[#ECE6F0]/90 text-xs rounded-none font-normal h-[26px] px-3 border border-gray-300 bg-ed-gray-50 dark:bg-black dark:text-white dark:hover:bg-gray-700 transition-all",onPointerdown:l,onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),o.createVNode(b,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.unref(s)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).component),o.mergeProps({key:0},o.unref(i).props,{"custom-class":"!z-[70] !pointer-events-auto",onClose:m[0]||(m[0]=x=>s.value=!1),onSelectedChar:f}),null,16)):o.createCommentVNode("",!0)]))]),_:1})}}}),FN=tt.create({name:tp,addOptions(){return{button:({editor:t})=>({component:VN,componentProps:{editor:t}}),specialCharModal:void 0}},addStorage(){return{specialCharModal:this.options.specialCharModal}}}),XE=tt.create({name:"base-kit",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),timeHighlighter:{additionalTimeWords:[]},bubble:{list:ZI,defaultBubbleList:RG,button:({editor:e,extension:n,t:r})=>{var l;const{list:i={},defaultBubbleList:s}=((l=n.options)==null?void 0:l.bubble)??{},a=(s==null?void 0:s(e))??[];return LG(i,a,{editor:e,extension:n,t:r})}}}},addExtensions(){var n,r,i;const{t}=At(),e=[];this.options.placeholder!==!1&&e.push(Y5.configure({placeholder:({node:s,pos:a})=>{var u;const l=(u=s==null?void 0:s.type)==null?void 0:u.name;return l==="heading"?`${t(`editor.heading.h${s.attrs.level}.tooltip`)}`:l==="table"||l==="codeBlock"?"":a===0?t("editor.content"):""},...this.options.placeholder})),this.options.focus!==!1&&e.push(xG.configure({className:"focus",...this.options.focus})),this.options.document!==!1&&(this.options.page?(e.push(Q5.configure().extend({content:"page+"})),e.push(lZ.configure({types:((r=(n=this.options.page)==null?void 0:n.nodesComputedOption)==null?void 0:r.types)??[],slots:o.useSlots()}))):e.push(Q5.configure())),this.options.dropcursor!==!1&&e.push(wG.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(bG.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(X5.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(G5.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(OG.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(BG.configure(this.options.textStyle)),this.options.imageUpload!==!1&&e.push(GE.configure(this.options.imageUpload)),this.options.video!==!1&&e.push(jE.configure(this.options.video)),this.options.videoUpload!==!1&&e.push(WE.configure(this.options.videoUpload)),this.options.history!==!1&&e.push(zb.configure(this.options.history)),this.options.fontFamily!==!1&&e.push(pE.configure(this.options.fontFamily)),this.options.fontSize!==!1&&e.push(m5.configure(this.options.fontSize)),this.options.fontWeight!==!1&&e.push(fZ.configure(this.options.fontWeight)),this.options.mode!==Me.EDITOR&&e.push(FN.configure(this.options.specialCharacter)),this.options.mode!==Me.EDITOR&&e.push(gZ),this.options.superText!==!1&&this.options.mode!==Me.PLAIN_TEXT&&this.options.mode!==Me.EDITOR&&(typeof this.options.superText=="boolean"?e.push(iE.configure()):e.push(iE.configure(this.options.superText))),this.options.mode===Me.EDITOR&&(this.options.image!==!1&&e.push(qu.configure()),e.push(p5.configure({spacer:!0}),V8,P8,F8,Fb,Pv,$8,g5.configure({spacer:!0}),h5.configure({types:["heading","paragraph","tableCell","tableHeader"],spacer:!0}),gE)),this.options.mode!==Me.EDITOR&&this.options.configPlan!==!1&&this.options.mode!==Me.PLAIN_TEXT&&(typeof this.options.configPlan=="boolean"?e.push(vE.configure()):e.push(vE.configure({specialCharModal:(i=this.options.configPlan)==null?void 0:i.specialCharModal}))),this.options.mode!==Me.EDITOR&&this.options.mode!==Me.PLAIN_TEXT&&e.push(vZ),(this.options.mode===Me.STRAIGHT||this.options.mode===Me.REPORT||this.options.mode===Me.EDITOR)&&this.options.timeHighlighter&&e.push(nN.configure(this.options.timeHighlighter)),this.options.invalidCharFocus!==!1&&e.push(uE.configure(this.options.invalidCharFocus)),this.options.disabled&&e.push(PN),e.push(N5,J5.configure(),NQ.configure(),MG.configure(),Tv,Sv,hb,lN,uN.configure(this.options.deviceEnv),b5.configure({multicolor:!0}));for(const s in this.options.excludes)Object.prototype.hasOwnProperty.call(this.options.excludes,s)&&this.options.excludes[s]&&Et.remove(e,({name:l})=>l===s);return e},addStorage(){return{mode:this.options.mode}}}),YE=Un.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),JE=Un.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),$N=tt.create({name:"subAndSuperScript",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>{const i=n.options.subscript,s=n.options.superscript,a={component:Ge,componentProps:{action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",tooltip:r("editor.subscript.tooltip")}},l={component:Ge,componentProps:{action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",tooltip:r("editor.superscript.tooltip")}},u=[];return i!==!1&&u.push(a),s!==!1&&u.push(l),u}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(YE.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(JE.configure(this.options.superscript)),t}}),HN={class:"ml-1"},zN=o.defineComponent({__name:"ActionMoreButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(Ea,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref($l),{key:a,checked:n.value.title===s.title,disabled:s.disabled,class:"flex gap-3 items-center",onClick:s.action},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createElementVNode("span",HN,o.toDisplayString(s.title),1),s.shortcutKeys?(o.openBlock(),o.createBlock(o.unref(f5),{key:1,class:"ml-auto"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(KC)(s.shortcutKeys)),1)]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["checked","disabled","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),UN=tt.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,extension:n,t:r}){const i=n.options.subscript,s=n.options.superscript,a={action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",title:r("editor.subscript.tooltip"),shortcutKeys:["mod","."]},l={action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",title:r("editor.superscript.tooltip"),shortcutKeys:["mod",","]},u=p1(e,"code"),c=[];if(i!==!1&&c.push(a),s!==!1&&c.push(l),u){const f={action:()=>e.commands.toggleCode(),isActive:()=>e.isActive("code")||!1,disabled:!e.can().toggleCode(),icon:"Code",title:r("editor.code.tooltip"),shortcutKeys:["mod","E"]};u&&c.push(f)}return{component:zN,componentProps:{icon:"Type",tooltip:r("editor.moremark"),disabled:!e.isEditable||c.every(f=>f.disabled),items:c}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(YE.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(JE.configure(this.options.superscript)),t}});var Ra=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(Ra||{});function WN(t,e,n){return t<e?e:t>n?n:t}function jN(t,e,n,r){const{doc:i,selection:s}=t;if(!i||!s||!(s instanceof De||s instanceof $n))return t;const{from:a,to:l}=s;return i.nodesBetween(a,l,(u,c)=>{const f=u.type;return n.includes(f.name)?(t=qN(t,c,e),!1):!$0(u.type.name,r.extensionManager.extensions)}),t}function qN(t,e,n){if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r)return t;const a=WN((r.attrs.indent||0)+n,0,7);if(a===r.attrs.indent)return t;const l={...r.attrs,indent:a};return t.setNodeMarkup(e,r.type,l,r.marks)}function ZE({delta:t,types:e}){return({state:n,dispatch:r,editor:i})=>{const{selection:s}=n;let{tr:a}=n;return a=a.setSelection(s),a=jN(a,t,e,i),a.docChanged?(r&&r(a),!0):!1}}const KN=tt.create({name:"indent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:Ra.min,maxIndent:Ra.max,button({editor:e,t:n}){var s,a;const{selection:r}=e.state,i=r.$anchor.parent;return[{component:Ge,componentProps:{action:()=>{e.commands.indent()},disabled:((s=i==null?void 0:i.attrs)==null?void 0:s.indent)>=Ra.max||!e.can().indent(),shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:Ge,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],disabled:((a=i==null?void 0:i.attrs)==null?void 0:a.indent)<=Ra.min||!e.can().outdent(),icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.getAttribute("data-indent");return(e?parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>ZE({delta:Ra.more,types:this.options.types}),outdent:()=>ZE({delta:Ra.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function GN(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:l}=t,u=r&&!i,c=aB(n),f=new RegExp(`\\s${c}$`),p=a?"^":"",m=i?"":c,g=u?new RegExp(`${p}${c}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${p}(?:^)?${c}[^\\s${m}]*`,"gm"),b=((e=l.nodeBefore)===null||e===void 0?void 0:e.isText)&&l.nodeBefore.text;if(!b)return null;const v=l.pos-b.length,y=Array.from(b.matchAll(g)).pop();if(!y||y.input===void 0||y.index===void 0)return null;const x=y.input.slice(Math.max(0,y.index-1),y.index),k=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(x);if(s!==null&&!k)return null;const E=v+y.index;let C=E+y[0].length;return u&&f.test(b.slice(C-1,C+1))&&(y[0]+=" ",C+=1),E<l.pos&&C>=l.pos?{range:{from:E,to:C},query:y[0].slice(n.length),text:y[0]}:null}const XN=new kt("suggestion");function YN({pluginKey:t=XN,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:l="span",decorationClass:u="suggestion",command:c=()=>null,items:f=()=>[],render:p=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=GN}){let b;const v=p==null?void 0:p(),y=new ot({key:t,view(){return{update:async(x,k)=>{var E,C,_,T,A,V,O;const B=(E=this.key)===null||E===void 0?void 0:E.getState(k),$=(C=this.key)===null||C===void 0?void 0:C.getState(x.state),H=B.active&&$.active&&B.range.from!==$.range.from,X=!B.active&&$.active,ee=B.active&&!$.active,z=!X&&!ee&&B.query!==$.query,L=X||H&&z,D=z||H,F=ee||H&&z;if(!L&&!D&&!F)return;const R=F&&!L?B:$,K=x.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`);b={editor:e,range:R.range,query:R.query,text:R.text,items:[],command:Y=>c({editor:e,range:R.range,props:Y}),decorationNode:K,clientRect:K?()=>{var Y;const{decorationId:ie}=(Y=this.key)===null||Y===void 0?void 0:Y.getState(e.state),fe=x.dom.querySelector(`[data-decoration-id="${ie}"]`);return(fe==null?void 0:fe.getBoundingClientRect())||null}:null},L&&((_=v==null?void 0:v.onBeforeStart)===null||_===void 0||_.call(v,b)),D&&((T=v==null?void 0:v.onBeforeUpdate)===null||T===void 0||T.call(v,b)),(D||L)&&(b.items=await f({editor:e,query:R.query})),F&&((A=v==null?void 0:v.onExit)===null||A===void 0||A.call(v,b)),D&&((V=v==null?void 0:v.onUpdate)===null||V===void 0||V.call(v,b)),L&&((O=v==null?void 0:v.onStart)===null||O===void 0||O.call(v,b))},destroy:()=>{var x;b&&((x=v==null?void 0:v.onExit)===null||x===void 0||x.call(v,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(x,k,E,C){const{isEditable:_}=e,{composing:T}=e.view,{selection:A}=x,{empty:V,from:O}=A,B={...k};if(B.composing=T,_&&(V||e.view.composing)){(O<k.range.from||O>k.range.to)&&!T&&!k.composing&&(B.active=!1);const $=g({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:A.$from}),H=`id_${Math.floor(Math.random()*4294967295)}`;$&&m({editor:e,state:C,range:$.range,isActive:k.active})?(B.active=!0,B.decorationId=k.decorationId?k.decorationId:H,B.range=$.range,B.query=$.query,B.text=$.text):B.active=!1}else B.active=!1;return B.active||(B.decorationId=null,B.range={from:0,to:0},B.query=null,B.text=null),B}},props:{handleKeyDown(x,k){var E;const{active:C,range:_}=y.getState(x.state);return C&&((E=v==null?void 0:v.onKeyDown)===null||E===void 0?void 0:E.call(v,{view:x,event:k,range:_}))||!1},decorations(x){const{active:k,range:E,decorationId:C}=y.getState(x);return k?ut.create(x.doc,[Gt.inline(E.from,E.to,{nodeName:l,class:u,"data-decoration-id":C})]):null}}});return y}const JN=[{label:"优酷",value:"youku",icon:"Youku"},{label:"哔哩哔哩",value:"bilibili",icon:"BiliBili"},{label:"腾讯视频",value:"qqvideo",icon:"QQVideo"}],ZN=[{label:"高德地图",value:"amap",icon:"Gaode"},{label:"百度地图",value:"baidu_map",icon:"Baidu"}],QN=[{label:"墨刀",value:"modao",icon:"Modao"},{label:"蓝湖",value:"lanhu",icon:"Lanhu"},{label:"Figma",value:"figma",icon:"Figma"},{label:"Canva",value:"canva",icon:"Canva"},{label:"ProcessOn",value:"processon",icon:"Processon"}],NN=[{label:"CodePen",value:"codepen",icon:"Codepen"}],eee=[{label:"金数据",value:"jinshuju",icon:"Jinshuju"}],tee=[],nee=[...JN,...ZN,...QN,...NN,...eee,...tee];function ree(t){const{t:e}=At(),n=[{name:"format",title:e("editor.slash.format"),commands:[{name:"paragraph",label:e("editor.paragraph.tooltip"),aliases:["paragraph","zw"],iconName:"Paragraph",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading1",label:e("editor.heading.h1.tooltip"),aliases:["h1","bt","bt1"],iconName:"Heading1",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading2",label:e("editor.heading.h2.tooltip"),aliases:["h2","bt","bt2"],iconName:"Heading2",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:2}).run()}},{name:"heading3",label:e("editor.heading.h3.tooltip"),aliases:["h3","bt","bt3","heading3"],iconName:"Heading3",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:3}).run()}},{name:"bulletList",label:e("editor.bulletlist.tooltip"),aliases:["ul","yxlb","bulletList"],iconName:"List",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleBulletList().run()}},{name:"numberedList",label:e("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleOrderedList().run()}},{name:"codeBlock",label:e("editor.codeblock.tooltip"),iconName:"Code2",aliases:["codeBlock"],description:"Code block with syntax highlighting",shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setCodeBlock().run()}},{name:"blockquote",label:e("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setBlockquote().run()}},{name:"horizontalrule",label:e("editor.horizontalrule.tooltip"),aliases:["fgx","horizontalRule"],iconName:"Minus",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHorizontalRule().run()}},{name:"link",label:e("editor.link.tooltip"),aliases:["link","lianjie","lj"],iconName:"Link",action:({editor:i,range:s})=>{i.chain().deleteRange(s).extendMarkRange("link").insertContent({type:"text",text:"link",marks:[{type:"link",attrs:{href:"",target:"_blank"}}]}).setLink({href:""}).focus().run()}}]},{name:"insert",title:e("editor.slash.insert"),commands:[{name:"image",label:e("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setImageUpload().run()}},{name:"table",label:e("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}},{name:"video",label:e("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setVideoUpload().run()}},{name:"taskList",label:e("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleTaskList().run()}},{name:"columns",label:e("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",aliases:["columns","cols","2cols"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().deleteRange(s).setColumns().focus(i.state.selection.head-1).run()}}]}];if(p1(t,"iframes")){const i=nee;n.push({name:"others",title:e("editor.slash.embed"),commands:i.map(s=>({name:s.value,label:s.label,iconName:s.icon,aliases:[s.value,s.label],shouldBeHidden:a=>a.isActive("columns"),action:({editor:a,range:l})=>{a.chain().deleteRange(l).focus().setIframe({src:"",service:s.value}).run()}}))})}return n}const oee={key:0,class:"grid grid-cols-1 gap-0.5 min-w-48"},iee={className:"text-neutral-500 text-[0.65rem] col-[1/-1] mx-2 mt-2 font-semibold tracking-wider select-none uppercase first:mt-0.5"},see=["onClick"],aee=["src"],lee={key:1,class:"p-3"},uee={class:"text-xs text-gray-800 dark:text-gray-400"},cee=o.defineComponent({__name:"CommandsList",props:{editor:{},items:{default:void 0},command:{type:Function,default:void 0}},setup(t,{expose:e}){const n=o.ref(0),r=o.ref(0),i=o.ref(null),{t:s}=At(),a=o.ref([]),l=t;e({onKeyDown:u}),o.watch([()=>n.value,()=>r.value],async()=>{if(!i.value)return;await o.nextTick();const v=r.value*1e3+n.value,y=a.value[v];y&&y.scrollIntoView({behavior:"smooth",block:"nearest"})});function u({event:v}){return v.key==="ArrowUp"?(c(),!0):v.key==="ArrowDown"?(f(),!0):v.key==="Enter"?(p(),!0):!1}function c(){var x;if(!l.items.length)return!1;let v=n.value-1,y=r.value;v<0&&(y=r.value-1,v=((x=l.items[y])==null?void 0:x.commands.length)-1||0),y<0&&(y=l.items.length-1,v=l.items[y].commands.length-1),n.value=v,r.value=y}function f(){if(!l.items.length)return!1;const v=l.items[r.value].commands;let y=n.value+1,x=r.value;v.length-1<y&&(y=0,x=r.value+1),l.items.length-1<x&&(x=0),n.value=y,r.value=x}function p(){if(!l.items.length||r.value===-1||n.value===-1)return!1;m(r.value,n.value)}function m(v,y){const x=l.items[v].commands[y];l.command(x)}function g(v,y){m(v,y)}function b(v,y,x){a.value[v*1e3+y]=x}return(v,y)=>{var x;return o.openBlock(),o.createElementBlock("div",{ref_key:"scrollContainer",ref:i,class:"bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 text-black max-h-[min(80vh,24rem)] overflow-auto flex-wrap mb-8 p-1"},[(x=v.items)!=null&&x.length?(o.openBlock(),o.createElementBlock("div",oee,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.items,(k,E)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:k.title},[o.createElementVNode("div",iee,o.toDisplayString(k.title),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.commands,(C,_)=>(o.openBlock(),o.createElementBlock("button",{ref_for:!0,ref:T=>b(E,_,T),key:_,class:o.normalizeClass(["flex items-center gap-3 px-2 py-1.5 text-sm text-neutral-800 dark:text-neutral-200 text-left w-full rounded-sm outline-none transition-colors",[r.value===E&&n.value===_?"bg-ed-accent text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200":"hover:bg-ed-accent hover:text-neutral-800 dark:hover:bg-neutral-900 dark:hover:text-neutral-200"]]),onClick:T=>g(E,_)},[C.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,class:"w-6 h-6",src:C.iconUrl},null,8,aee)):o.createCommentVNode("",!0),C.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,name:C.iconName,class:"mr-1 text-lg"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(C.label),1)],10,see))),128))],64))),128))])):(o.openBlock(),o.createElementBlock("div",lee,[o.createElementVNode("span",uee,o.toDisplayString(o.unref(s)("editor.slash.empty")),1)]))],512)}}}),La="slashCommand";let Ft;const dee=tt.create({name:La,priority:200,onCreate(){Ft=ea("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[YN({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new kt(La),allow:({state:t,range:e})=>{var c,f,p;const n=t.doc.resolve(e.from),r=n.depth===1,i=n.parent.type.name==="paragraph",s=((c=n.parent.textContent)==null?void 0:c.charAt(0))==="/",a=this.editor.isActive("column"),l=(p=n.parent.textContent)==null?void 0:p.substring((f=n.parent.textContent)==null?void 0:f.indexOf("/")),u=!(l!=null&&l.endsWith(" "));return(r&&i&&s||a&&i&&s)&&u},command:({editor:t,range:e,props:n})=>{const{view:r}=t;n.action({editor:t,range:e}),r.focus()},items:({query:t})=>ree(this.editor).map(s=>({...s,commands:s.commands.filter(a=>{const l=a.label.toLowerCase().trim(),u=t.toLowerCase().trim();if(a.aliases){const c=a.aliases.map(m=>m.toLowerCase().trim()),f=l.match(u),p=c.some(m=>m.match(u));return f||p}return l.match(u)}).filter(a=>a.shouldBeHidden?!a.shouldBeHidden(this.editor):!0)})).filter(s=>s.commands.length>0).map(s=>({...s,commands:s.commands.map(a=>({...a,isEnabled:!0}))})),render:()=>{let t,e=null;return{onStart:n=>{var s;t=new t6(cee,{props:n,editor:n.editor});const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const a=n.clientRect();if(!a)return n.editor.storage[La].rect;let l=a.y;if(t.element instanceof HTMLElement&&a.top+t.element.offsetHeight+40>window.innerHeight){const u=a.top+t.element.offsetHeight-window.innerHeight+40;l=a.y-u}return new DOMRect(a.x,l,a.width,a.height)};e=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})},(s=r.dom.parentElement)==null||s.addEventListener("scroll",e),t.element&&(Ft==null||Ft[0].setProps({getReferenceClientRect:i,appendTo:()=>document.body,content:t.element})),Ft==null||Ft[0].show()},onUpdate(n){var a;t.updateProps(n);const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const l=n.clientRect();return l?new DOMRect(l.x,l.y,l.width,l.height):n.editor.storage[La].rect},s=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})};(a=r.dom.parentElement)==null||a.addEventListener("scroll",s),n.editor.storage[La].rect=n.clientRect?i():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ft==null||Ft[0].setProps({getReferenceClientRect:i})},onKeyDown(n){var r;return n.event.key==="Escape"?(Ft==null||Ft[0].hide(),!0):(Ft!=null&&Ft[0].state.isShown||Ft==null||Ft[0].show(),(r=t.ref)==null?void 0:r.onKeyDown(n))},onExit(n){var r;if(Ft==null||Ft[0].hide(),e){const{view:i}=n.editor;(r=i.dom.parentElement)==null||r.removeEventListener("scroll",e)}t.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),fee=o.defineComponent({__name:"AIButton",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},customClass:{default:""},loading:{type:Boolean,default:!1},tooltipOptions:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=wn(),{toast:r}=Hv();function i(){var a,l,u;const s=(l=(a=e.editor.extensionManager.extensions.find(c=>c.name==="AI"))==null?void 0:a.options)==null?void 0:l.completions;if(typeof s!="function"){r({title:"AI completions method is not set or is not a valid function",variant:"destructive"});return}if(s.constructor.name!=="AsyncFunction"){r({title:"AI completions method must be an asynchronous function",variant:"destructive"});return}n.state.AIMenu=!0,(u=e.editor)==null||u.commands.focus()}return(s,a)=>(o.openBlock(),o.createBlock(Ge,{action:i,title:"AI",disabled:s.disabled,icon:s.icon,tooltip:s.tooltip},null,8,["disabled","icon","tooltip"]))}}),pee=Dt.create({name:"AI",group:"block",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:({editor:e,t:n})=>({component:fee,componentProps:{icon:"Sparkles",tooltip:n("editor.AI.ask")}})}}});function hee(t,e){const n=atob(t.split(",")[1]),r=new Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);const i=new Uint8Array(r);return new Blob([i],{type:e})}function mee(t,e){return new File([t],e,{type:t.type})}const gee=tt.create({name:"importWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{action:()=>{var i;return(i=e.commands)==null?void 0:i.toggleImportWord()},disabled:!e.can().setHorizontalRule(),icon:"Word",tooltip:r("editor.importWord.tooltip")}})}},addCommands(){return{toggleImportWord:()=>({chain:t,editor:e})=>{const{toast:n}=Hv(),{t:r}=At();async function i(u){var g;const f=new DOMParser().parseFromString(u,"text/html"),p=f.querySelectorAll("img");if(!p.length)return f.body.innerHTML;if(p1(e,"image")){const b=(g=e.extensionManager.extensions.find(v=>v.name==="importWord"))==null?void 0:g.options;if(b&&typeof b.upload=="function"){const v=[];for(const x of p){const k=x.getAttribute("src"),E=hee(k,"image/jpeg"),C=mee(E,"image.jpeg");v.push(C)}const y=await b.upload(v);for(let x=0;x<p.length;x++){const k=p[x];k.setAttribute("src",y[x].src);const E=k.parentElement;(E==null?void 0:E.tagName)==="P"&&(E.insertAdjacentElement("beforebegin",k),!E.hasChildNodes()&&E.textContent===""&&E.remove())}return f.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),f.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),f.body.innerHTML}async function s(u){const c=await i(u);e.chain().setContent(c.toString(),!0).run(),n({title:r("editor.importWord.success")})}const{open:a,onChange:l}=Ne.useFileDialog({accept:".docx",reset:!0,multiple:!1});return a(),l(async u=>{const[c]=Array.from(u??[]);if(c){if(c.size>this.options.limit){n({title:r("editor.importWord.fileTooLarge"),variant:"destructive"});return}if(this.options.convert){const f=await this.options.convert(c);s(f)}else{const f=new FormData,p=JSON.stringify({collaboration_features:{comments:!0,user_id:"e3",track_changes:!0},formatting:{resets:"none",defaults:"inline",styles:"inline",comments:"basic"}});f.append("config",p),f.append("file",c),fetch("https://docx-converter.cke-cs.com/v2/convert/docx-html",{method:"POST",body:f}).then(m=>m.json()).then(async m=>{s(m.html)}).catch(m=>{n({title:r("editor.importWord.error"),variant:"destructive"}),console.error("Error:",m)})}}}),!1}}}}),zv=wn(),bee=tt.create({name:"preview",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Ge,componentProps:{icon:"Eye",action:()=>{zv.togglePreview()},tooltip:e("editor.preview.tooltip"),isActive:()=>zv.state.showPreview}})}},addCommands(){return{togglePreview:()=>()=>(zv.togglePreview(),!0)}}}),QE=wn(),vee=(t,e,n)=>RegExp(e?t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):t,n?"gu":"gui");function yee(t,e,n,r){const i=[],s=[];let a=[],l=0;if(!e)return{decorationsToReturn:ut.empty,results:[]};t==null||t.descendants((u,c)=>{u.isText?a[l]?a[l]={text:a[l].text+u.text,pos:a[l].pos}:a[l]={text:`${u.text}`,pos:c}:l+=1}),a=a.filter(Boolean);for(const u of a){const{text:c,pos:f}=u,p=Array.from(c.matchAll(e)).filter(([m])=>m.trim());for(const m of p){if(m[0]==="")break;m.index!==void 0&&s.push({from:f+m.index,to:f+m.index+m[0].length})}}for(let u=0;u<s.length;u+=1){const c=s[u],f=u===r?`${n} ${n}-current`:n,p=Gt.inline(c.from,c.to,{class:f});i.push(p)}return{decorationsToReturn:ut.create(t,i),results:s}}const wee=(t,e,{state:n,dispatch:r})=>{if(!e[0])return;const{from:s,to:a}=e[0];r&&r(n.tr.insertText(t,s,a))},xee=(t,e,n,r)=>{const i=e+1;if(!r[i])return null;const{from:s,to:a}=r[e],l=a-s-t.length+n,{from:u,to:c}=r[i];return r[i]={to:c-l,from:u-l},[l,r]},Cee=(t,e,{tr:n,dispatch:r})=>{let i=0,s=e.slice();if(s.length){for(let a=0;a<s.length;a+=1){const{from:l,to:u}=s[a];n.insertText(t,l,u);const c=xee(t,a,i,s);c&&(i=c[0],s=c[1])}r&&r(n)}},kee=new kt("findAndReplacePlugin"),Eee=tt.create({name:"findAndReplace",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),searchResultClass:"vdc-editor-search-result",disableRegex:!0,button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{icon:"DocSearch",tooltip:r("editor.findAndReplace.tooltip"),action:()=>{QE.toggleFindAndReplace()},isActive:()=>QE.state.findAndReplace}})}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:t=>({editor:e})=>(e.storage.findAndReplace.searchTerm=t,!1),setReplaceTerm:t=>({editor:e})=>(e.storage.findAndReplace.replaceTerm=t,!1),setCaseSensitive:t=>({editor:e})=>(e.storage.findAndReplace.caseSensitive=t,!1),resetIndex:()=>({editor:t})=>(t.storage.findAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n+1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n-1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=e.length-1,!1},replace:()=>({editor:t,state:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return wee(r,i,{state:e,dispatch:n}),!1},replaceAll:()=>({editor:t,tr:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return Cee(r,i,{tr:e,dispatch:n}),!1}}},addProseMirrorPlugins(){const t=this.editor,{searchResultClass:e,disableRegex:n}=this.options,r=a=>t.storage.findAndReplace.lastSearchTerm=a,i=a=>t.storage.findAndReplace.lastCaseSensitive=a,s=a=>t.storage.findAndReplace.lastResultIndex=a;return[new ot({key:kee,state:{init:()=>ut.empty,apply({doc:a,docChanged:l},u){const{searchTerm:c,lastSearchTerm:f,caseSensitive:p,lastCaseSensitive:m,resultIndex:g,lastResultIndex:b}=t.storage.findAndReplace;if(!l&&f===c&&m===p&&b===g)return u;if(r(c),i(p),s(g),!c)return t.storage.findAndReplace.results=[],ut.empty;const{decorationsToReturn:v,results:y}=yee(a,vee(c,n,p),e,g);return t.storage.findAndReplace.results=y,v}},props:{decorations(a){return this.getState(a)}}})]}}),{togglePrinter:See,state:_ee}=wn(),Tee=tt.create({name:"printer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Ge,componentProps:{tooltip:e("editor.printer.tooltip"),action:()=>See(),icon:"Printer",shortcutKeys:["mod","P"],isActive:()=>_ee.printer}})}}}),Aee=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await ln.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(i=>i.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class NE{constructor({api:e,limit:n,transfer:r,enabled:i}){$t(this,"suggestions",[]);$t(this,"api","");$t(this,"enabled",!0);$t(this,"limit");$t(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=i??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(Aee.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const Mee=Object.freeze(Object.defineProperty({__proto__:null,AI:pee,BaseKit:XE,Blockquote:MK,Bold:P8,BulletList:wK,Clear:hb,Code:Tj,CodeBlock:jq,Color:g5,Columns:Tv,FindAndReplace:Eee,FontFamily:pE,FontSize:m5,FormatPainter:Sv,Fullscreen:gG,Heading:p5,Highlight:mK,History:zb,HorizontalRule:iG,Image:qu,ImageUpload:GE,ImportWord:gee,Indent:KN,Italic:V8,LineHeight:gE,Link:Fb,MoreMark:UN,OrderedList:EK,Preview:bee,Printer:Tee,Proofreader:NE,SlashCommand:dee,SpellcheckerExtension:aE,Strike:$8,SubAndSuperScript:$N,Table:Pv,TaskList:TK,TextAlign:h5,Underline:F8,Video:jE,VideoUpload:WE},Symbol.toStringTag,{value:"Module"})),Oee='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function Bee(){const t=window.localStorage.getItem("content"),e=o.ref(t||Oee),n=o.computed(()=>[XE.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:1e5},excludes:{}}),zb,Tv,Sv,hb,Fb,qu,Pv]),r=Ne.useEventBus(mr.RENDER_SUPER_TEXT);function i(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:i}}function Iee(){const t=o.ref(!1);return{hasEverFocused:t,markAsFocused:()=>{t.value=!0},insertHtml:(r,i)=>{const{state:s}=r,{doc:a,selection:l}=s,u=l.$from,c=a.firstChild,f=r.isEmpty;if(!t.value){if(f&&c){r.chain().insertContentAt({from:0,to:c.nodeSize},i).focus().run();return}const m=a.content.size;r.chain().insertContentAt(m,i).focus().run();return}const p=u.parent;if(p.type.name==="paragraph"&&p.textContent.trim().length===0){const m=u.before();r.chain().insertContentAt({from:m,to:m+p.nodeSize},i).focus().run();return}if(u.parentOffset===0&&p.type.name==="paragraph"&&p.content.size>0){const m=u.before();r.chain().insertContentAt(m,i).focus().run();return}r.chain().insertContentAt(r.state.selection,i).focus().run()}}}function Xl(t=250){const e=o.ref(!1);let n=null;const r=()=>{e.value=!0,n&&clearTimeout(n),n=setTimeout(()=>{e.value=!1},t)};return o.onUnmounted(()=>{n&&clearTimeout(n)}),{isScrolling:e,handleScroll:r}}function Ree(){const t=o.ref(!1);let e=!1;function n(){const l=Array.from(document.querySelectorAll(".inside-toolbar")),u=document.querySelector("#tool-bar-format"),c=document.querySelector("#tool-bar-image"),f=Array.from(document.querySelectorAll('[contenteditable="true"].tiptap:not(.simple-editor)'));return{popupInsideToolbars:l,toolBarFormat:u,toolBarImage:c,tiptapEditors:f}}function r(l){if(!l)return!1;const{popupInsideToolbars:u,toolBarFormat:c,toolBarImage:f,tiptapEditors:p}=n();return u.some(m=>m.contains(l))||((c==null?void 0:c.contains(l))??!1)||((f==null?void 0:f.contains(l))??!1)||p.some(m=>m.contains(l))}function i(l){e=r(l.target)}function s(l){const u=l.target;u&&r(u)&&(t.value=!0)}function a(l){const u=l.relatedTarget;r(u)||e&&u===null||(t.value=!1)}return Ne.useEventListener(document,"mousedown",i,{capture:!0}),Ne.useEventListener(document,"touchstart",i,{capture:!0}),Ne.useEventListener(document,"focusin",s),Ne.useEventListener(document,"focusout",a),{isShowToolBarBaseOnEditor:t}}const Lee={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},Dee={class:"text-sm flex items-center justify-center"},Pee={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Vee={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Fee={id:"icon/背景颜色"},$ee=["fill"],eS=o.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=o.ref(void 0),{state:r}=wn();function i(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return o.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(o.openBlock(),o.createElementBlock("div",Lee,[o.createVNode(Ge,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:o.withCtx(()=>[o.createElementVNode("span",Dee,[(o.openBlock(),o.createElementBlock("svg",Pee,[o.createElementVNode("g",Vee,[o.createElementVNode("g",Fee,[l[1]||(l[1]=o.createElementVNode("g",{id:"编组",fill:"currentColor"},[o.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[o.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),o.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),o.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),o.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,$ee)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:i},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),Hee={class:"h-full w-fit min-w-32 flex items-center leading-none gap-0.5 p-2 bg-ed-background rounded-lg shadow-sm border border-ed-border"},Ih=o.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=()=>document.body,r=({editor:y})=>{var x;return y.isActive("table")&&(((x=y.storage.table)==null?void 0:x.isTableEditorOpen)??!1)},{t:i}=At();function s(){e.editor.chain().focus().addColumnBefore().run()}function a(){e.editor.chain().focus().addColumnAfter().run()}function l(){e.editor.chain().focus().deleteColumn().run()}function u(){e.editor.chain().focus().addRowBefore().run()}function c(){e.editor.chain().focus().addRowAfter().run()}function f(){e.editor.chain().focus().deleteRow().run()}function p(){e.editor.chain().focus().mergeCells().run()}function m(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function g(){e.editor.chain().focus().deleteTable().run()}function b(y){e.editor.chain().focus().setTableCellBackground(y).run()}const v=()=>{const y=document.querySelector(".vdc-editor");if(!y)return new DOMRect(-1e3,-1e3,0,0);const x=y.getBoundingClientRect();return new DOMRect(x.left,x.top+10,x.width,0)};return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:y.editor,"plugin-key":"table","update-delay":0,"should-show":r,"tippy-options":{zIndex:9999,maxWidth:"auto",getReferenceClientRect:v,appendTo:n}},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B;return[o.createElementVNode("div",Hee,[o.createVNode(Ge,{icon:"TablerColumnInsertLeft","icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertColumnBefore"),action:s,"tooltip-options":{sideOffset:15},disabled:!((k=y.editor)!=null&&k.can().addColumnBefore())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerColumnInsertRight",tooltip:o.unref(i)("editor.table.menu.insertColumnAfter"),"icon-class":"w-5 h-5",action:a,"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().addColumnAfter())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerColumnRemove",action:l,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().deleteColumn())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Ge,{icon:"TablerRowInsertTop",action:u,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().addRowBefore())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerRowInsertBottom",action:c,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerRowRemove",action:f,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().deleteRow())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Ge,{icon:"TableCellsMerge",action:p,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((V=y.editor)!=null&&V.can().mergeCells())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TableCellsSplit",action:m,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((O=y.editor)!=null&&O.can().splitCell())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(eS,{editor:y.editor,tooltip:o.unref(i)("editor.table.menu.setCellsBgColor"),action:b,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),o.createVNode(Ge,{icon:"Trash2",tooltip:o.unref(i)("editor.table.menu.deleteTable"),"icon-class":"w-5 h-5",action:g,"tooltip-options":{sideOffset:15},disabled:!((B=y.editor)!=null&&B.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),zee={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},Uee={class:"flex items-center gap-1"},Rh=o.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>F0(l.view.state,"columns"),r=()=>{const l=x8(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},i=()=>{e.editor.chain().focus().setLayout(Ba.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(Ba.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(Ba.TwoColumn).run()};return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[o.unref(zI)],sticky:"popper"}},{default:o.withCtx(()=>[o.createElementVNode("div",zee,[o.createElementVNode("div",Uee,[o.createVNode(Ge,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:i,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Ge,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Ge,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),Wee={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},jee=["href"],qee={class:"flex flex-nowrap"},Kee=o.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=At(),r=e;function i(){r("clear")}function s(){r("edit")}return(a,l)=>(o.openBlock(),o.createElementBlock("div",Wee,[o.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},o.toDisplayString(o.unref(Et.truncate)(a.link,{length:50,omission:"…"})),9,jee),a.link?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-4"})):o.createCommentVNode("",!0),o.createElementVNode("div",qee,[o.createVNode(Ge,{icon:"Pencil",tooltip:o.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),o.createVNode(Ge,{icon:"Unlink",tooltip:o.unref(n)("editor.link.unlink.tooltip"),action:i,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Lh=o.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=o.ref(!1),r=o.computed(()=>{const{href:l}=e.editor.getAttributes("link");return l}),i=o.computed(()=>e.editor.isActive("link"));function s(l,u,c){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:c?"_blank":""}}]}).setLink({href:l}).focus().run(),n.value=!1}function a(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(l,u)=>o.withDirectives((o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{open:n.value,"onUpdate:open":u[1]||(u[1]=c=>n.value=c)},{default:o.withCtx(()=>[o.createVNode(o.unref(DP),null,{default:o.withCtx(()=>[n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Kee,{key:0,editor:l.editor,link:r.value,onClear:a,onEdit:u[0]||(u[0]=c=>n.value=!0)},null,8,["editor","link"]))]),_:1}),o.createVNode(o.unref(gs),{class:"p-0 border-0 w-fit shadow-none",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{class:"p-4",editor:l.editor,onOnSetLink:s},null,8,["editor"])]),_:1})]),_:1},8,["open"])]),_:1},8,["editor","tippy-options"])),[[o.vShow,i.value]])}}),tS=(t,e,n,r,i)=>{const s=o.ref(0),a=Ne.useEventBus(mr.RENDER_SUPER_TEXT),l=_=>{if(!e.value||!t)return;const T=e.value.index,A=e.value.id,{state:V}=t,{tr:O}=V;let B=!1;V.doc.descendants(($,H)=>{var X,ee;if(((X=$.attrs)==null?void 0:X[it.ID])===A){(ee=$.attrs[it.TEXT])!=null&&ee.trim();const z=_.trim();if(kh(z))return O.delete(H,H+1),B=!0,!1;const{[it.ELEMENT_ID]:L,...D}=$.attrs;return O.setNodeMarkup(H,void 0,{...D,[it.TEXT]:z}),B=!0,!1}return!0}),B&&t&&t.view.dispatch(O),T!==-1&&(n.value[T].text=_,n.value[T].textOriginal=_)},u=o.ref(new Map),c=()=>{if(!(t!=null&&t.view.dom))return[];const _=[],T=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),A=new Map;return u.value.clear(),T.forEach(V=>{const O=V.getBoundingClientRect().top;A.has(O)||A.set(O,V),u.value.set(V.getAttribute("node-id")||"unknown",0)}),_.push(...A.values()),_},f=_=>{const T=_.closest(`#${r}`);if(!T)return;const A=T.getBoundingClientRect().top,V=T==null?void 0:T.scrollTop;return _.getBoundingClientRect().top-(A-V)},p=(_,T)=>{const A=n.value.findIndex(V=>V.id===_);A>-1&&(n.value[A].status=T)},m=_=>_.replace(/<p><\/p>/g,"<p> </p>"),g=()=>{if(!n.value||n.value.length===0){s.value=0,u.value.clear();return}if(!i.value||i.value.length===0)return;const _=i.value,T=new Set(n.value.map(O=>O.id)),A=_.map(O=>({isHidden:O.classList.contains("hidden"),isTruncated:O.classList.contains("super-text-truncate")}));_.forEach(O=>{O.classList.remove("hidden"),O.classList.remove("super-text-truncate")});for(const O of u.value.keys())T.has(O)||u.value.delete(O);_.forEach(O=>{const B=O.getAttribute("book-mark-id");if(!B)return;const $=O.offsetTop+O.offsetHeight,H=u.value.get(B)||0;u.value.set(B,Math.max($,H))}),_.forEach((O,B)=>{A[B].isHidden&&O.classList.add("hidden"),A[B].isTruncated&&O.classList.add("super-text-truncate")});let V=0;for(const O of u.value.values())O>V&&(V=O);s.value=V},b=async()=>{await o.nextTick();const T=c().map(A=>{const V=A.getAttribute("node-id"),O=A.getAttribute("book-mark-content"),B=A.getAttribute("page-id"),$=A.getAttribute("page-number"),H=A.getBoundingClientRect(),X=A.getAttribute("line-id"),ee=A.getAttribute("element-id");return{position:H,text:m(O),id:V,pageId:B,pageNumber:$,visiblePosition:f(A),status:0,lineId:X,elementId:ee,textOriginal:m(O)}});n.value=T},v=(_,T)=>{const A=_.bottom<=T.top,V=_.top>=T.bottom;return!(A||V)};async function y(){const _=i.value;if(!_||_.length===0){g();return}_.sort((T,A)=>{const V=Number(T.getAttribute("index")),O=Number(A.getAttribute("index"));return V-O}),_.forEach(T=>T.classList.remove("super-text-truncate")),_.forEach((T,A)=>{const V=T.getBoundingClientRect();_.slice(A+1).forEach(O=>{const B=O.getBoundingClientRect();v(V,B)&&T.classList.add("super-text-truncate")})}),g()}const x=async _=>{await o.nextTick();const T=t==null?void 0:t.view.dom.querySelector(`[node-id='${_.dataId}']`),A=i.value.find(B=>{const $=B.getBoundingClientRect().top,H=T==null?void 0:T.getBoundingClientRect().top;if(H==null)return!1;const X=H-$;return Math.abs(X-9)<=2});if(!A)return;const V=Number(A.getAttribute("index"));if(!_.text){A.querySelector(".super-text-lines").innerHTML=n.value[V].textOriginal,i.value.forEach(B=>B.classList.remove("hidden")),y();return}A.querySelector(".super-text-lines").innerHTML=m(_.text),A.classList.remove("super-text-truncate");const O=A.getBoundingClientRect();i.value.forEach((B,$)=>{if($!==V){const H=B.getBoundingClientRect();v(O,H)&&B.classList.add("hidden")}}),g()},k=_=>{switch(_.action){case"hover":x(_.payload);break;case"status":p(_.payload.id,_.payload.status);break;case"render":b();break;default:console.log("There is no action")}},E=(_,T)=>{const A=_.currentTarget;A.classList.remove("super-text-truncate");const V=A.getBoundingClientRect();i.value.forEach((O,B)=>{if(B!==T){const $=O.getBoundingClientRect();v(V,$)&&O.classList.add("hidden")}}),g()},C=()=>{i.value.forEach(_=>_.classList.remove("hidden")),y()};return o.onBeforeMount(()=>{a.on(k),window.addEventListener("resize",b)}),o.onBeforeUnmount(()=>{a.off(k),window.removeEventListener("resize",b)}),o.watch(()=>n,async()=>{await o.nextTick(),y()},{deep:!0}),{onUpdate:l,hanldeTruncateSuperTexts:y,eventListener:k,handleMouseOver:E,handleMouseLeave:C,wrapperMinHeight:s}},Gee=["index","book-mark-id","line-id","onMouseover"],Xee=["innerHTML"],Yee=po(o.defineComponent({__name:"SuperTextView",props:{editor:{},superPreviewCustomClass:{},minChars:{},fontSize:{}},setup(t,{expose:e}){const n=t,r=o.ref([]),i=o.ref([]),s=o.ref(!1),a=o.ref(!1),l=o.ref(null),u=o.inject("isMobile",!1),c=o.inject("canEditSuper",o.ref(!0)),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m,wrapperMinHeight:g}=tS(n.editor,l,i,"editor-container",r),b=(E,C)=>{c.value&&(l.value={id:E.id,text:E.text,elementId:E.elementId,index:C},s.value=!0,u&&(a.value=!0))},v=E=>{var C,_;return cd(E?((C=n.superPreviewCustomClass)==null?void 0:C.completedSuper)??"bg-black":((_=n.superPreviewCustomClass)==null?void 0:_.unproducedSuper)??"bg-red-500")},y=o.computed(()=>n.fontSize??""),{contentInner:x,measuredMinWidth:k}=df({minChars:n.minChars,fontSize:y});return e({measuredMinWidthComment:k}),(E,C)=>{var T;const _=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",ref_key:"contentInner",ref:x,style:o.normalizeStyle({width:`${Number(o.unref(k))+25}px`,minHeight:`${o.unref(g)}px`}),class:o.normalizeClass(o.unref(Ee)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((T=E.superPreviewCustomClass)==null?void 0:T.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(A,V)=>{var O,B,$;return o.openBlock(),o.createElementBlock("div",{key:A.id,ref_for:!0,ref_key:"superTextRefs",ref:r,index:V,"book-mark-id":A.id,"line-id":A.lineId,class:o.normalizeClass(o.unref(Ee)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${A.visiblePosition||((O=A.position)==null?void 0:O.top)}px`}),onMouseover:H=>o.unref(p)(H,V),onMouseleave:C[0]||(C[0]=(...H)=>o.unref(m)&&o.unref(m)(...H))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Ee)("wrap-anywhere whitespace-break-spaces w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",A.elementId?((B=E.superPreviewCustomClass)==null?void 0:B.completedSuper)??"bg-black":(($=E.superPreviewCustomClass)==null?void 0:$.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(c)})),onDblclick:H=>b(A,V)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:A.text},null,8,Xee),o.createVNode(_,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",v(A.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Gee)}),128)),!o.unref(u)&&l.value?(o.openBlock(),o.createBlock(Wc,{key:0,open:s.value,editor:n.editor,"super-text-init":l.value.text,"super-text-element-id":l.value.elementId,onClose:C[1]||(C[1]=A=>s.value=!1),onSave:o.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-1a1a3ac0"]]),Jee=["index","book-mark-id","line-id","onMouseover"],Zee=["innerHTML"],Qee=po(o.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean},superPreviewCustomClass:{}},setup(t){const e=t,n=o.ref([]),r=o.ref([]),i=o.ref(!1),s=o.ref(!1),a=o.ref(null),l=o.inject("isMobile",!1),u=o.inject("isEditable",o.ref(!0)),{onUpdate:c,handleMouseOver:f,handleMouseLeave:p,wrapperMinHeight:m}=tS(e.editor,a,r,"editor-container-comment",n),g=(y,x)=>{u.value&&(a.value={id:y.id,text:y.text,elementId:y.elementId,index:x},e.disableSuperInput||(i.value=!0),l&&(s.value=!0))},b=y=>{var x,k;return cd(y?((x=e.superPreviewCustomClass)==null?void 0:x.completedSuper)??"bg-black":((k=e.superPreviewCustomClass)==null?void 0:k.unproducedSuper)??"bg-red-500")},v=o.inject("measuredMinWidthComment",0);return(y,x)=>{var E;const k=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",style:o.normalizeStyle({width:`${Number(o.unref(v))+25}px`,minHeight:`${o.unref(m)}px`}),class:o.normalizeClass(o.unref(Ee)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",((E=y.superPreviewCustomClass)==null?void 0:E.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(C,_)=>{var T,A,V;return o.openBlock(),o.createElementBlock("div",{key:C.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:_,"book-mark-id":C.id,"line-id":C.lineId,class:o.normalizeClass(o.unref(Ee)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${C.visiblePosition||((T=C.position)==null?void 0:T.top)}px`}),onMouseover:O=>o.unref(f)(O,_),onMouseleave:x[0]||(x[0]=(...O)=>o.unref(p)&&o.unref(p)(...O))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Ee)("wrap-anywhere whitespace-break-spaces w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",C.elementId?((A=y.superPreviewCustomClass)==null?void 0:A.completedSuper)??"bg-black":((V=y.superPreviewCustomClass)==null?void 0:V.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(u)})),onDblclick:O=>g(C,_)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:C.text},null,8,Zee),o.createVNode(k,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",b(C.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Jee)}),128)),!o.unref(l)&&a.value&&!y.disableSuperInput?(o.openBlock(),o.createBlock(Wc,{key:0,open:i.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:x[1]||(x[1]=C=>i.value=!1),onSave:o.unref(c)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-ced69bf5"]]),nS=t=>{console.log(t),t=t.replace(/\s*style="[^"]*"/g,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
345
|
-
`).split(/\r?\n/),i=[];for(const a of r){const l=a.trim();if(l==="")i.push("<p></p>");else if(/^<br\s*\/?>/i.test(l)){const u=l.replace(/^<br\s*\/?>/i,"").trim();i.push(`<p>${u}</p>`)}else if(/^<\/BR>/i.test(l)){const u=l.replace(/^<\/BR>/i,"").trim();i.push(`<p>${u}</p>`)}else/^<(?!p\b)[^>]+>/i.test(l)?i.push(`<p>${l}</p>`):i.push(l)}let s=i.join("");return s=s.replace(/<p\b[^>]*>/gi,"<p>"),s},Uv=t=>/^https?:\/\/[^\s]+$/i.test(t.trim()),Wv=(t,e)=>{const{tr:n,selection:r,schema:i}=t.state,s=i.marks.link.create({href:e});return r.empty?(t.dispatch(n.insertText(e,r.from).addMark(r.from,r.from+e.length,s)),!0):(t.dispatch(n.addMark(r.from,r.to,s)),!0)},Nee=(t,e)=>{const{tr:n,schema:r}=t.state,i=e.split(/(?:\r\n?|\n)/),s=[];if(i.forEach(u=>{let c={type:"paragraph"};u.length>0&&(c.content=[{type:"text",text:u}]);let f=Fr.fromJSON(r,c);s.push(f)}),s.length===0)return!1;const a=be.fromArray(s),l=Se.maxOpen(a);return t.dispatch(n.replaceSelection(l)),!0},ete=wn(),Dh=t=>{const e=o.computed(()=>ete.state.spellCheck);o.watch(()=>e.value,n=>{t.view.dispatch(t.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,n)),t.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),WC(t)&&t.commands.focus()},{immediate:!0})},tte={id:"editor-container-comment",class:"flex flex-col"},nte={class:"flex flex-1"},rte={id:"editor-panel",class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},ote=o.defineComponent({__name:"EditorComment",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{default:void 0},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=o.useAttrs(),l=wn(),{isReady:u,editor:c,updateEditorState:f,superTextStore:p,checkSpellStore:m,setEditorContextMenuRef:g,setEditorFocusedInstance:b}=l,v=o.inject("isEditable",o.ref(!0)),y=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled),editorProps:{attributes:{id:dr.COMMENT,[dr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:Et.throttle((T,A)=>A.key==="Enter"&&a.enter&&!A.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:T=>nS(T),handlePaste:(T,A)=>{const V=A.clipboardData;if(!V)return!1;const O=r.mode,B=V.getData("text/plain")||"",$=Array.from(V.items).some(H=>H.type.startsWith("image/"));return(O===Me.STRAIGHT||O===Me.REPORT)&&$?(A.preventDefault(),!0):O===Me.PLAIN_TEXT?(A.preventDefault(),T.dispatch(T.state.tr.insertText(B,T.state.selection.from)),!0):!1},clipboardTextParser:(T,A)=>{const V=T.split(/(?:\r\n?|\n)/),O=[];V.forEach($=>{let H={type:"paragraph"};$.length>0&&(H.content=[{type:"text",text:$}]);let X=Fr.fromJSON(A.doc.type.schema,H);O.push(X)});const B=be.fromArray(O);return Se.maxOpen(B)}},onCreate:({editor:T})=>{f(T)},onUpdate:Et.throttle(({editor:T})=>{u.value=!0;const A=k(T,r.output);i("update:modelValue",A),i("change",{editor:T,output:A}),f(T),x()},Ho),extensions:r.extensions,editable:v.value,onFocus:T=>{g(E.value),b(T.editor)}});async function x(){await o.nextTick(),s.emit({action:"render"})}function k(T,A){if(!T)return"";if(T.isEmpty)return A==="json"?{}:"";switch(A){case"html":return T.getHTML();case"json":return T.getJSON();case"text":return T.getText();default:return""}}o.watch(()=>r.disableSuperInput,()=>{const T=document.getElementById(dr.COMMENT);T==null||T.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.watch(()=>m.languages,()=>{y.commands.checkSpelling()}),o.watch(()=>r.modelValue,T=>{if(!y||Et.isEqual(k(y,r.output),T))return;const{from:A,to:V}=y.state.selection;y.commands.setTextSelection({from:A,to:V}),y.commands.setContent(gn(T,r.disabled),!1),x()},{deep:!0}),o.watch(()=>v.value,T=>{var A;y==null||y.setEditable(T),(A=y==null?void 0:y.commands)!=null&&A.setIsEnableSuggestion&&y.commands.setIsEnableSuggestion(T)},{immediate:!0}),o.watch(()=>c.value,()=>{c.value&&c.value.on("selectionUpdate",({editor:T})=>{i("changed:selection",{editor:T})})}),o.onUnmounted(()=>y==null?void 0:y.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",k(y,"html"))});const E=o.ref(null);function C(T){T===Me.REPORT&&g(E.value)}function _(T){T===Me.REPORT&&b(y)}return o.onMounted(()=>{C(r.mode),_(r.mode)}),o.watch(()=>r.mode,T=>{C(T),_(T)}),o.watch(()=>{var T,A;return(A=(T=r.editorContentInstance)==null?void 0:T.storage[ep])==null?void 0:A.enabled},()=>{y.commands.toggleTimeHighlight()}),Dh(y),e({editor:y}),(T,A)=>(o.openBlock(),o.createElementBlock("div",tte,[o.createElementVNode("div",nte,[o.withDirectives(o.createVNode(Qee,{"disable-super-input":T.disableSuperInput,editor:o.unref(y),"super-preview-custom-class":T.superPreviewCustomClass},null,8,["disable-super-input","editor","super-preview-custom-class"]),[[o.vShow,T.isOpenSuperView]]),o.createElementVNode("div",rte,[o.createVNode(Ev,{ref_key:"selectContextMenuRef",ref:E,"disable-super-input":T.disableSuperInput,editor:o.unref(y),mode:T.mode,"super-text-store":o.unref(p)},{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{editor:o.unref(y),spellcheck:"true",class:"h-full break-all"},null,8,["editor"])]),_:1},8,["disable-super-input","editor","mode","super-text-store"])])])]))}});function ite(t,e,n=!1,r=200){const{height:i}=Ne.useElementSize(t),s=o.ref(0),a=o.ref(0),l=o.ref(r),u=o.ref(0),c=async()=>{await o.nextTick();const f=i.value-8;e.value===Me.REPORT?(s.value=f/3,a.value=n?"auto":f-s.value,l.value=r/3*2,u.value=r/3):(s.value=0,a.value=n?"auto":i.value)};return n||o.watch(()=>i.value,c),o.onMounted(()=>{c()}),{commentHeight:s,contentHeight:a,minHeight:l,minHeightComment:u}}var ste={exports:{}};(function(t){(function(){var e=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],n=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ",["ㅗ","ㅏ"],["ㅗ","ㅐ"],["ㅗ","ㅣ"],"ㅛ","ㅜ",["ㅜ","ㅓ"],["ㅜ","ㅔ"],["ㅜ","ㅣ"],"ㅠ","ㅡ",["ㅡ","ㅣ"],"ㅣ"],r=["","ㄱ","ㄲ",["ㄱ","ㅅ"],"ㄴ",["ㄴ","ㅈ"],["ㄴ","ㅎ"],"ㄷ","ㄹ",["ㄹ","ㄱ"],["ㄹ","ㅁ"],["ㄹ","ㅂ"],["ㄹ","ㅅ"],["ㄹ","ㅌ"],["ㄹ","ㅍ"],["ㄹ","ㅎ"],"ㅁ","ㅂ",["ㅂ","ㅅ"],"ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],i=44032,s=["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄸ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅃ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],a=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],l=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"],u=["","ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],c=[["ㄱ","ㅅ","ㄳ"],["ㄴ","ㅈ","ㄵ"],["ㄴ","ㅎ","ㄶ"],["ㄹ","ㄱ","ㄺ"],["ㄹ","ㅁ","ㄻ"],["ㄹ","ㅂ","ㄼ"],["ㄹ","ㅅ","ㄽ"],["ㄹ","ㅌ","ㄾ"],["ㄹ","ㅍ","ㄿ"],["ㄹ","ㅎ","ㅀ"],["ㅂ","ㅅ","ㅄ"]],f=[["ㅗ","ㅏ","ㅘ"],["ㅗ","ㅐ","ㅙ"],["ㅗ","ㅣ","ㅚ"],["ㅜ","ㅓ","ㅝ"],["ㅜ","ㅔ","ㅞ"],["ㅜ","ㅣ","ㅟ"],["ㅡ","ㅣ","ㅢ"]],p,m,g,b,v,y;function x(R){for(var K=R.length,Y={0:0},ie=0;ie<K;ie++)R[ie]&&(Y[R[ie].charCodeAt(0)]=ie);return Y}p=x(s),m=x(a),g=x(l),b=x(u);function k(R){for(var K=R.length,Y={},ie,fe,ke=0;ke<K;ke++)ie=R[ke][0].charCodeAt(0),fe=R[ke][1].charCodeAt(0),typeof Y[ie]>"u"&&(Y[ie]={}),Y[ie][fe]=R[ke][2].charCodeAt(0);return Y}v=k(c),y=k(f);function E(R){return typeof p[R]<"u"}function C(R){return typeof m[R]<"u"}function _(R){return typeof g[R]<"u"}function T(R){return typeof b[R]<"u"}function A(R){return 44032<=R&&R<=55203}function V(R,K){return y[R]&&y[R][K]?y[R][K]:!1}function O(R,K){return v[R]&&v[R][K]?v[R][K]:!1}var B=function(R,K){if(R===null)throw new Error("Arguments cannot be null");typeof R=="object"&&(R=R.join(""));for(var Y=[],ie=R.length,fe,ke,re,me,J,te=0;te<ie;te++){var ne=[];me=R.charCodeAt(te),A(me)?(me-=i,re=me%28,ke=(me-re)/28%21,fe=parseInt((me-re)/28/21),ne.push(e[fe]),typeof n[ke]=="object"?ne=ne.concat(n[ke]):ne.push(n[ke]),re>0&&(typeof r[re]=="object"?ne=ne.concat(r[re]):ne.push(r[re]))):E(me)?(C(me)?J=e[m[me]]:J=r[b[me]],typeof J=="string"?ne.push(J):ne=ne.concat(J)):_(me)?(J=n[g[me]],typeof J=="string"?ne.push(J):ne=ne.concat(J)):ne.push(R.charAt(te)),K?Y.push(ne):Y=Y.concat(ne)}return Y},$=function(R){return typeof R!="string"?"":(R=B(R),R.join(""))},H=function(R){typeof R=="string"&&(R=B(R));var K=[],Y=R.length,ie,fe=0,ke=-1,re,me=!1;function J(ne){var se,ce,_e,Te=0,Ue,Ke="";if(me=!1,!(ke+1>ne))for(var je=1;;je++){if(je===1){if(se=R[ke+je].charCodeAt(0),_(se))if(ke+je+1<=ne&&_(ce=R[ke+je+1].charCodeAt(0))){K.push(String.fromCharCode(V(se,ce))),ke=ne;return}else{K.push(R[ke+je]),ke=ne;return}else if(!C(se)){K.push(R[ke+je]),ke=ne;return}Ke=R[ke+je]}else if(je===2)if(ce=R[ke+je].charCodeAt(0),C(ce)){se=O(se,ce),Ke=String.fromCharCode(se),K.push(Ke),ke=ne;return}else Ke=String.fromCharCode((m[se]*21+g[ce])*28+i);else je===3?(_e=R[ke+je].charCodeAt(0),V(ce,_e)?ce=V(ce,_e):Te=_e,Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i)):je===4?(Ue=R[ke+je].charCodeAt(0),O(Te,Ue)?Te=O(Te,Ue):Te=Ue,Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i)):je===5&&(Ue=R[ke+je].charCodeAt(0),Te=O(Te,Ue),Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i));if(ke+je>=ne){K.push(Ke),ke=ne;return}}}for(var te=0;te<Y;te++){if(ie=R[te].charCodeAt(0),!C(ie)&&!_(ie)&&!T(ie)){J(te-1),J(te),fe=0;continue}fe===0?C(ie)?fe=1:_(ie)&&(fe=4):fe==1?_(ie)?fe=2:O(re,ie)?fe=5:J(te-1):fe==2?T(ie)?fe=3:_(ie)?V(re,ie)||(J(te-1),fe=4):(J(te-1),fe=1):fe==3?T(ie)?!me&&O(re,ie)?me=!0:(J(te-1),fe=1):C(ie)?(J(te-1),fe=1):_(ie)&&(J(te-2),fe=2):fe==4?_(ie)?V(re,ie)?(J(te),fe=0):J(te-1):(J(te-1),fe=1):fe==5&&(_(ie)?(J(te-2),fe=2):(J(te-1),fe=1)),re=ie}return J(te-1),K.join("")},X=function(R,K){var Y=B(R).join(""),ie=B(K).join("");return Y.indexOf(ie)},ee=function(R,K){var Y=B(R).join(""),ie=B(K).join(""),fe=B(R,!0),ke=new RegExp(ie,"gi"),re=[],me;if(!K.length)return[];for(;me=ke.exec(Y);)re.push(me.index);function J(ne){for(var se=0,ce=0;se<fe.length;++se)if(ce+=fe[se].length,ne<ce)return se}function te(ne){for(var se=0,ce=0;se<fe.length;++se)if(ce+=fe[se].length,ne+ie.length<=ce)return se}return re.map(function(ne){return[J(ne),te(ne)]})};function z(R){this.string=R,this.disassembled=B(R).join("")}z.prototype.search=function(R){return B(R).join("").indexOf(this.disassembled)};var L=function(R){typeof R=="object"&&(R=R.join(""));var K=R.charCodeAt(R.length-1);if(A(K)){K-=i;var Y=K%28;if(Y>0)return!0}else if(E(K))return!0;return!1},D=function(R,K){return B(R).pop()===K},F={disassemble:B,d:B,disassembleToString:$,ds:$,assemble:H,a:H,search:X,rangeSearch:ee,Searcher:z,endsWithConsonant:L,endsWith:D,isHangul:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),A(R)},isComplete:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),A(R)},isConsonant:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),E(R)},isVowel:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),_(R)},isCho:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),C(R)},isJong:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),T(R)},isHangulAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!A(R.charCodeAt(K)))return!1;return!0},isCompleteAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!A(R.charCodeAt(K)))return!1;return!0},isConsonantAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!E(R.charCodeAt(K)))return!1;return!0},isVowelAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!_(R.charCodeAt(K)))return!1;return!0},isChoAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!C(R.charCodeAt(K)))return!1;return!0},isJongAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!T(R.charCodeAt(K)))return!1;return!0}};t.exports=F})()})(ste);const Yl=new kt("searchHighlight");function Ph(t,e,n){const r=[];if(!e)return r;const i=n.caseSensitive?e.normalize("NFC"):e.normalize("NFC").toLowerCase(),{doc:s}=t.state,a=l=>/[0-9A-Za-z가-힣_]/.test(l);return s.descendants((l,u)=>{if(!l.isText||!l.text)return;let c=l.text.normalize("NFC");n.caseSensitive||(c=c.toLowerCase());let f=0,p=c.indexOf(i,f);for(;p!==-1;){const m=p,g=p+i.length-1;if(n.wholeWord){const b=m>0?c[m-1]:"",v=g+1<c.length?c[g+1]:"";if(b&&a(b)||v&&a(v)){f=p+1,p=c.indexOf(i,f);continue}}r.push({from:u+m,to:u+g+1}),f=p+i.length,p=c.indexOf(i,f)}}),r}function jv(t){return t.state.selection.from}function rS(t){if(t.state.plugins.find(r=>r.spec.key===Yl))return;const n=new ot({key:Yl,state:{init(){return ut.empty},apply(r,i){const s=r.getMeta(Yl);return s!==void 0?s:i.map(r.mapping,r.doc)}},props:{decorations(r){return Yl.getState(r)}}});t.registerPlugin(n)}function oS(t,e,n){rS(t);const r=e.map((a,l)=>Gt.inline(a.from,a.to,{class:l===n?"search-match-active":"search-match"})),i=ut.create(t.state.doc,r),s=t.state.tr.setMeta(Yl,i);t.view.dispatch(s)}function Jl(t){rS(t);const e=t.state.tr.setMeta(Yl,ut.empty);t.view.dispatch(e)}function ate(t){const e=o.ref(-1),n=o.ref([]),r=o.computed(()=>n.value.length);function i(p){var x;const m=t.value;if(!m||n.value.length===0)return;const g=n.value.length;e.value=(p%g+g)%g,oS(m,n.value,e.value);const b=n.value[e.value],y=m.view.domAtPos(b.from).node;(x=y==null?void 0:y.scrollIntoView)==null||x.call(y,{block:"nearest",behavior:"smooth"}),m.chain().setTextSelection({from:b.from,to:b.to}).scrollIntoView().run()}function s(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(v=>v.from>g);i(b===-1?0:b)}function a(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m);let b=-1;for(let v=n.value.length-1;v>=0;v--)if(n.value[v].to<g){b=v;break}i(b===-1?n.value.length-1:b)}function l(p){const m=t.value;if(!m||e.value===-1||n.value.length===0)return;const g=n.value[e.value],{state:b}=m,v=b.doc.textBetween(g.from,g.to);if(!(p.caseSensitive?v===p.find:v.toLowerCase()===p.find.toLowerCase())){s(p);return}m.chain().focus().setTextSelection({from:g.from,to:g.to}).insertContent(p.replace).run(),s(p)}function u(p){const m=t.value;if(!m)return;const g=Ph(m,p.find,p);if(g.length===0)return;const b=m.chain().focus();[...g].reverse().forEach(v=>{b.setTextSelection({from:v.from,to:v.to}).insertContent(p.replace)}),b.run(),n.value=[],e.value=-1,Jl(m)}function c(p){const m=t.value;if(!m)return;if(!p.find){n.value=[],e.value=-1,Jl(m);return}if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(y=>y.from>=g),v=b===-1?0:b;e.value=v,i(v),oS(m,n.value,v)}function f(){const p=t.value;p&&(n.value=[],e.value=-1,Jl(p))}return{searchUp:a,searchDown:s,replaceCurrent:l,replaceAll:u,totalMatches:r,currentMatchIndex:o.readonly(e),refreshMatches:c,clearSearch:f}}const iS=o.defineComponent({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(LD),o.mergeProps(o.unref(s),{class:o.unref(Ee)("peer h-5 w-5 shrink-0 rounded-sm border border-ed-border shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 text-ed-blue",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(DD),{class:"flex h-full w-full items-center justify-center"},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default",{},()=>[o.createVNode(o.unref(Gg),{icon:"fa-solid:check"})])]),_:3})]),_:3},16,["class"]))}}),lte={class:"flex items-center justify-between px-5 pt-4 pb-2 cursor-move bg-[#F6FAFE]"},ute={class:"text-base font-semibold text-gray-800"},cte={class:"px-5 pt-[20px] pb-4 flex flex-col gap-y-3 bg-white"},dte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},fte={class:"text-right text-sm text-gray-600"},pte={class:"relative"},hte={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none"},mte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},gte={class:"text-right text-sm text-gray-600"},bte={class:"grid grid-cols-[60px,1fr] gap-x-3"},vte={class:"flex gap-x-5"},yte={class:"flex items-center space-x-2 text-sm"},wte={for:"caseSensitive",class:"select-none text-gray-700"},xte={class:"grid grid-cols-[60px,1fr] gap-x-3"},Cte={class:"flex gap-x-2"},kte=po(o.defineComponent({__name:"BatchReplaceDialog",props:{modelValue:{type:Boolean},totalMatches:{default:0},currentMatchIndex:{default:-1}},emits:["update:modelValue","search-down","search-up","replace","replace-all","refresh"],setup(t,{emit:e}){const n=t,r=e;function i(){return{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value}}const s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=o.ref(!1),f=o.computed(()=>s.value?n.totalMatches===0?"No matches":`${n.currentMatchIndex+1} / ${n.totalMatches}`:""),p=Ne.useLocalStorage("findReplaceDialogPosition",null),m=o.reactive({x:0,y:0}),g=o.ref(!1),b={x:0,y:0},v=O=>{const B=O.target;if(B.closest("input")||B.closest("button")||B.closest("label")||B.closest(".content-area"))return;g.value=!0;const $=document.querySelector(".find-replace-dialog");if(!$)return;const H=$.getBoundingClientRect();b.x=O.clientX-H.left,b.y=O.clientY-H.top,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x)},y=O=>{g.value&&(m.x=O.clientX-b.x,m.y=O.clientY-b.y)},x=()=>{g.value=!1,p.value={x:m.x,y:m.y},document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)};o.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)}),o.watch(()=>n.modelValue,async O=>{var X,ee;if(!O)return;await o.nextTick();const B=document.querySelector(".find-replace-dialog");if(!B)return;const $=window.innerWidth,H=window.innerHeight;p.value&&p.value.x!==void 0&&p.value.y!==void 0?(m.x=p.value.x,m.y=p.value.y):(m.x=Math.max(($-B.offsetWidth)/2,0),m.y=Math.max((H-B.offsetHeight)/2,0)),s.value&&r("refresh",i()),await o.nextTick(),(ee=(X=l.value)==null?void 0:X.$el)==null||ee.focus()});const k=()=>{r("update:modelValue",!1)},E=()=>{s.value&&r("search-down",i())},C=()=>{s.value&&r("search-up",i())},_=()=>{r("replace",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})},T=()=>{r("replace-all",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})};function A(O){const B=O.target.value;s.value=B,r("refresh",i())}function V(O){const $=O.target.value+(O.data??"");r("refresh",{find:$,replace:a.value,caseSensitive:u.value,wholeWord:c.value})}return(O,B)=>{const $=bs,H=iS,X=bn,ee=Vc,z=Pc;return o.openBlock(),o.createBlock(z,{open:O.modelValue},{default:o.withCtx(()=>[o.createVNode(ee,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"find-replace-dialog fixed z-[70] pointer-events-auto w-[460px] rounded-[10px] overflow-hidden bg-white shadow-xl",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${m.x}px, ${m.y}px)`}),onMousedown:v},[o.createElementVNode("div",lte,[o.createElementVNode("span",ute,o.toDisplayString(O.$t("찾기 및 바꾸기")),1),o.createElementVNode("button",{class:"bg-transparent text-gray-400 hover:text-gray-600 transition-colors p-1",onClick:k},[o.createVNode(o.unref(Ec),{class:"w-5 h-5"})])]),o.createElementVNode("div",cte,[o.createElementVNode("div",dte,[o.createElementVNode("label",fte,o.toDisplayString(O.$t("검색")),1),o.createElementVNode("div",pte,[o.createVNode($,{ref_key:"findInputRef",ref:l,modelValue:s.value,"onUpdate:modelValue":B[0]||(B[0]=L=>s.value=L),class:"rounded-md h-[36px] text-sm pr-[90px] !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none",onInput:A,onCompositionupdate:V,onKeydown:o.withKeys(o.withModifiers(E,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),o.unref(f)?(o.openBlock(),o.createElementBlock("span",hte,o.toDisplayString(o.unref(f)),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",mte,[o.createElementVNode("label",gte,o.toDisplayString(O.$t("바꾸기")),1),o.createVNode($,{modelValue:a.value,"onUpdate:modelValue":B[1]||(B[1]=L=>a.value=L),class:"rounded-md h-[36px] text-sm !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none"},null,8,["modelValue"])]),o.createElementVNode("div",bte,[B[3]||(B[3]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",vte,[o.createElementVNode("div",yte,[o.createVNode(H,{id:"caseSensitive",checked:u.value,"onUpdate:checked":B[2]||(B[2]=L=>{u.value=!!L})},null,8,["checked"]),o.createElementVNode("label",wte,o.toDisplayString(O.$t("대소문자 일치")),1)])])]),o.createElementVNode("div",xte,[B[4]||(B[4]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",Cte,[o.createVNode(X,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:_},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("바꾸기")),1)]),_:1}),o.createVNode(X,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("모두 바꾸기")),1)]),_:1}),o.createVNode(X,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:C},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("이전")),1)]),_:1},8,["disabled"]),o.createVNode(X,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:E},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("다음")),1)]),_:1},8,["disabled"])])])])],36)]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-5ec84714"]]),Ete={class:"flex flex-1"},Vh=o.defineComponent({__name:"CoreEditorV2",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"14px"},fontFamilyDefault:{default:"NanumGothicCoding"},fontWeightDefault:{default:void 0},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{default:null},fieldNameCommentCuesheet:{default:null},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean,default:!1},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean,default:!1},autoFocus:{type:Boolean},superPreviewCustomClass:{default:()=>({overall:"bg-ed-gray-50",unproducedSuper:"bg-red-500",completedSuper:"bg-black"})},minChar:{default:()=>({superPreview:29,content:26})},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{default:void 0},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{default:"paragraph"}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur","open-batch-replace"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE),l=o.useAttrs(),u=wn(),{isFullscreen:c,isReady:f,editor:p,updateEditorState:m,superTextStore:g,checkSpellStore:b,setEditorContextMenuRef:v,setEditorContentInstance:y,setEditorFocusedInstance:x}=u,k=o.computed(()=>!(r.disabled||r.readonly));o.provide("isEditable",k);const E=o.computed(()=>k.value?!0:r.canEditSuperReadOnly);o.provide("canEditSuper",E);const C=o.computed(()=>r.mode===Me.EDITOR),_=o.ref(r.fontSizeDefault),T=o.ref(r.fontFamilyDefault),A=o.ref(r.fontWeightDefault);o.provide("fontSize",_),o.provide("fontFamily",T),o.provide("fontWeight",A);const V=ae=>{!k.value||!((ae.ctrlKey||ae.metaKey)&&ae.key.toLowerCase()==="h")||(ae.preventDefault(),ae.stopPropagation(),ae.stopImmediatePropagation(),$.value=!0)};o.onMounted(()=>{Ue(),window.addEventListener("keydown",V,!0)}),o.onUnmounted(()=>{window.removeEventListener("keydown",V,!0)}),o.onActivated(()=>{window.addEventListener("keydown",V,!0)}),o.onDeactivated(()=>{window.removeEventListener("keydown",V,!0)});const O=ae=>{const Be=parseInt(_.value||"16px"),_t=ae?Be+2:Be-2;_.value=_t+"px"};o.onBeforeMount(()=>{r.disabled||a.on(O)}),o.onBeforeUnmount(()=>{r.disabled||a.off(O)});const B=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),$=o.ref(!1),{searchUp:H,searchDown:X,replaceCurrent:ee,replaceAll:z,totalMatches:L,currentMatchIndex:D,refreshMatches:F,clearSearch:R}=ate(p);o.watch($,ae=>{ae||R()});const K=ae=>{F(ae)},Y=ae=>{X(ae)},ie=ae=>{H(ae)},fe=ae=>{ee(ae)},ke=ae=>{z(ae)},re=new Vo({coreExtensionOptions:{clipboardTextSerializer:{blockSeparator:r.blockSeparatorPolicy==="line"?`
|
|
343
|
+
`){R.push(F),F="";continue}if(F+=Y,V.measureText(F).width>L())for(;V.measureText(F).width>L();){const ie=D(F,L());ie<=0?(R.push(F.charAt(0)),F=F.slice(1)):(R.push(F.slice(0,ie)),F=F.slice(ie))}}return R.push(F),R.map(Y=>`<p>${Y}</p>`).join("")}const B=o.computed(()=>{var ee,z,L;const X=(L=(z=(ee=r.parentEditor)==null?void 0:ee.storage.superText.superInputModal)==null?void 0:z.props)==null?void 0:L.guidelineLeftOffset;return s.value||!X?{}:{backgroundImage:"linear-gradient(to right, #d1d5db 1px, transparent 1px)",backgroundSize:"1px 100%",backgroundRepeat:"no-repeat",backgroundPosition:on(X)}}),{isScrolling:$,handleScroll:H}=Xl();return e({insertSpecialCharater:m,isChecked:u,toggleSpellCheck:g,wrapText:O,editor:p}),(X,ee)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"contentInner",ref:b,class:o.normalizeClass(o.unref(Ee)("h-40 overflow-y-auto border focus-within:border-ed-input-focus rounded-[3px] p-2.5 relative",X.isReadOnly&&"border-none",o.unref(s)&&"h-auto min-h-20 max-h-44 border-ed-gray rounded-md px-4 py-2.5",o.unref(s)&&!o.unref($)&&"scrollbar-thumb-transparent")),style:o.normalizeStyle([o.unref(T),o.unref(B),o.unref(_)]),onScroll:ee[0]||(ee[0]=(...z)=>o.unref(H)&&o.unref(H)(...z))},[o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(p),class:o.normalizeClass(o.unref(Ee)("vdc-editor relative h-full"))},null,8,["editor","class"])],38))}}),KJ={class:"sr-only"},GJ={class:"grid m-2.5 p-2.5 gap-y-2.5 rounded border border-gray-200"},XJ={class:"grid grid-cols-[60px,1fr] gap-x-2"},YJ={class:"flex items-center space-x-2 text-xs font-normal [&>input[type='checkbox']]:h-[20px] [&>input[type='checkbox']]:w-[20px] [&>input[type='checkbox']]:!border-ed-border [&>input[type='checkbox']]:shadow"},JJ=["checked"],ZJ={for:"spellcheck",class:"select-none whitespace-nowrap"},QJ={class:"flex gap-x-1"},NJ={class:"ml-auto"},eZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},tZ={class:"text-right text-sm p-2"},nZ={class:"grid grid-cols-[60px,1fr] gap-x-2"},cE=5,Wc=o.defineComponent({__name:"SuperInputDialog",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextElementId:{}},emits:["close","save"],setup(t,{emit:e}){var L,D;const n=e,r=t,{t:i}=At(),s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=Ne.useLocalStorage("superInputModalPosition",null),f=o.reactive({x:0,y:0}),p=o.ref(!1),m={x:0,y:0},g=o.ref(!1),b=o.ref(!1),v=o.ref(!1),y=F=>{p.value=!0;const R=F.currentTarget.closest(".draggable-dialog").getBoundingClientRect();m.x=F.clientX-R.left,m.y=F.clientY-R.top,document.addEventListener("mousemove",x),document.addEventListener("mouseup",k)},x=F=>{p.value&&(f.x=F.clientX-m.x,f.y=F.clientY-m.y)},k=()=>{p.value=!1,c.value={x:f.x,y:f.y},document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)};o.watch(()=>r.open,async F=>{if(!F)return;b.value=!1,r.superTextInit&&(s.value=r.superTextInit,r.superTextElementId&&(a.value=r.superTextElementId)),await o.nextTick();const R=document.querySelector(".draggable-dialog");if(!R)return;R.getBoundingClientRect();const K=window.innerWidth,Y=window.innerHeight;c.value&&c.value.x!==void 0&&c.value.y!==void 0?(f.x=c.value.x,f.y=c.value.y):(f.x=Math.max((K-R.offsetWidth)/2,0),f.y=Math.max((Y-R.offsetHeight)/2,0))},{immediate:!0});const E=()=>{n("close"),s.value="",a.value="",u.value=!1},C=()=>{var R;if((R=l.value)==null?void 0:R.editor.commands.hasInvalidChar()){v.value=!0;return}s.value=l.value.wrapText(),a.value="",b.value?g.value=!0:n("close"),n("save",s.value),s.value=""},_=()=>{g.value=!1,n("close")},T=(D=(L=r.editor)==null?void 0:L.extensionManager.extensions.find(F=>F.name==="superText"))==null?void 0:D.options.specialCharModal,A=o.inject("fontFamily",""),V=o.computed(()=>{var F,R,K;return np(r.editor,uc)&&o.unref(A)?o.unref(A):(K=(R=(F=r.editor)==null?void 0:F.storage.superText.superInputModal)==null?void 0:R.props)==null?void 0:K.fontFamily}),O=Ne.useLocalStorage("recentSpecialChars",[]),B=F=>{if(!F)return;const R=(O.value??[]).filter(K=>K!==F);R.unshift(F),O.value=R.slice(0,cE)},$=F=>{var R;(R=l.value)==null||R.insertSpecialCharater(F)},H=(F,R)=>{var K;R&&((K=l.value)==null||K.insertSpecialCharater(F),B(F))},X=o.computed(()=>{var F;return(F=l.value)==null?void 0:F.isChecked}),ee=()=>{var F;(F=l.value)==null||F.toggleSpellCheck()};o.onUnmounted(()=>{document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k)}),o.watch(s,F=>{!r.superTextElementId||r.superTextElementId===""||(b.value=F!==(r.superTextInit??""))});const z=o.computed(()=>{var F;return(F=l.value)==null?void 0:F.editor});return(F,R)=>{const K=dh,Y=ch,ie=uh,fe=lh,ke=lE,re=iv,me=Vc,J=Pc,te=SX;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(J,{open:F.open},{default:o.withCtx(()=>[o.createVNode(o.unref(F1),null,{default:o.withCtx(()=>[o.createVNode(o.unref(j1),{class:"!pointer-events-none bg-black/30"}),o.createVNode(me,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>{var ne,se;return[o.createElementVNode("div",{class:"draggable-dialog fixed z-[70] pointer-events-auto",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${f.x}px, ${f.y}px)`,fontFamily:o.unref(V)})},[o.createVNode(ie,{class:"bg-blue-500 text-white p-2.5 rounded-t-[5px] cursor-move",onMousedown:o.withModifiers(y,["prevent"])},{default:o.withCtx(()=>[o.createVNode(K,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.superinput")),1)]),_:1}),o.createVNode(Y,{class:"absolute right-3 top-3 text-white",onClick:E},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",KJ,o.toDisplayString(F.$t("editor.close")),1)]),_:1})]),_:1}),o.createVNode(fe),o.createElementVNode("div",GJ,[o.createElementVNode("div",XJ,[R[5]||(R[5]=o.createElementVNode("label",null," ",-1)),o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex gap-x-6",o.unref(O).length===cE&&"gap-x-4"))},[o.createVNode(bn,{class:"text-[#65558F] bg-[#ECE6F0] hover:bg-[#ECE6F0]/90 shadow text-xs rounded font-normal h-[25px] px-3",onClick:R[0]||(R[0]=ce=>u.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.insert.symbol")),1)]),_:1}),o.createElementVNode("div",YJ,[o.createElementVNode("input",{id:"spellcheck",type:"checkbox",class:"shrink-0",checked:o.unref(X),onChange:ee},null,40,JJ),o.createElementVNode("label",ZJ,o.toDisplayString(o.unref(i)("editor.menubar.menu.spellCheck")),1)]),o.createElementVNode("div",QJ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(O),ce=>(o.openBlock(),o.createBlock(bn,{key:ce,variant:"outline",size:"xs",class:"h-[25px] w-[25px] p-0",onClick:_e=>$(ce)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(ce),1)]),_:2},1032,["onClick"]))),128))]),o.createElementVNode("div",NJ,[o.unref(z)?(o.openBlock(),o.createBlock(ke,{key:0,editor:o.unref(z),"is-enable-spell-check-real-time":(ne=o.unref(z))==null?void 0:ne.extensionStorage.spellchecker.spellchecker.proofreader.enabled,align:"left"},null,8,["editor","is-enable-spell-check-real-time"])):o.createCommentVNode("",!0)])],2),u.value?(o.openBlock(),o.createBlock(o.resolveDynamicComponent((se=o.unref(T))==null?void 0:se.component),o.mergeProps({key:0,"custom-class":"!z-[70] !pointer-events-auto","font-family":o.unref(V)},o.unref(T).props,{onSelectedChar:H,onClose:R[1]||(R[1]=ce=>u.value=!1)}),null,16,["font-family"])):o.createCommentVNode("",!0)]),o.createElementVNode("div",eZ,[o.createElementVNode("label",tZ,o.toDisplayString(o.unref(i)("editor.detail")),1),o.createVNode(kv,{ref_key:"simpleEditorRef",ref:l,modelValue:s.value,"onUpdate:modelValue":R[2]||(R[2]=ce=>s.value=ce),"parent-editor":F.editor,class:""},null,8,["modelValue","parent-editor"])]),o.createElementVNode("div",nZ,[R[6]||(R[6]=o.createElementVNode("label",{class:"text-right text-sm p-2"},"ID",-1)),o.createVNode(bs,{modelValue:a.value,"onUpdate:modelValue":R[3]||(R[3]=ce=>a.value=ce),class:"rounded-none","default-value":a.value,disabled:""},null,8,["modelValue","default-value"])])]),o.createVNode(re,{class:"sm:justify-center pb-3.5 pt-1"},{default:o.withCtx(()=>[o.createVNode(bn,{as:"button",variant:"default",class:"bg-blue-500 hover:bg-blue-500/90",onClick:C},{default:o.withCtx(()=>[o.createVNode(o.unref(cb),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(o.unref(i)("editor.check")),1)]),_:1}),o.createVNode(bn,{as:"button",variant:"destructive",onClick:E},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5 mr-2"}),o.createTextVNode(" "+o.toDisplayString(F.$t("editor.close")),1)]),_:1})]),_:1})],4)]}),_:1})]),_:1})]),_:1},8,["open"]),o.createVNode(te,{open:g.value,onClose:_},null,8,["open"]),o.createVNode(te,{title:"Information",message:"{ 과 } 는 입력이 제한된 문자열 입니다.",iconName:"MessageCircleWarning",confirmText:"Ok",open:v.value,onClose:R[4]||(R[4]=ne=>v.value=!1)},null,8,["open"])],64)}}}),Ev=o.defineComponent({__name:"SelectContextMenu",props:{editor:{},mode:{},superTextStore:{},disabled:{type:Boolean},disableSuperInput:{type:Boolean}},setup(t,{expose:e}){const n=t,{t:r}=At(),i=o.ref(!1),s=o.reactive({from:0,to:0,text:""}),a=o.inject("isEditable",o.ref(!0)),l=o.inject("canEditSuper",o.ref(!0)),u=o.computed(()=>n.mode===Me.EDITOR||n.mode===Me.PLAIN_TEXT||!l.value||n.disableSuperInput);function c(){if(!n.editor)return"";const{from:k,to:E}=n.editor.state.selection,C=n.editor.state.doc.cut(k,E),T=$r.fromSchema(n.editor.schema).serializeFragment(C.content),A=document.createElement("div");return A.appendChild(T),A.innerHTML}const f=()=>{const{view:k}=n.editor,{from:E,to:C}=k.state.selection,_=c();s.text=_,s.from=E,s.to=C},p=()=>i.value=!i.value,m=()=>{u.value||(i.value=!0,f())},g=()=>i.value=!1,b=k=>{const E=n==null?void 0:n.superTextStore.addMoreSuperText(k);n.editor&&n.editor.commands.insertContentAt(s.from,{type:"superText",attrs:{"data-id":E,"data-text":k}}),i.value=!1,requestAnimationFrame(()=>{n.editor.commands.setTextSelection(s.from+1),n.editor.view.focus()})},v=o.ref(!1),y=async k=>{var E,C;if(k){const _=await((C=(E=n.editor).hasClipboard)==null?void 0:C.call(E));v.value=!!_}},x=()=>{if(u.value||!n.editor)return;const{view:k,state:E}=n.editor,{from:C,to:_}=E.selection;s.from=C,s.to=_,s.text="",k.dom.blur(),i.value=!0};return e({toggleDialog:p,openDialog:m,closeDialog:g}),(k,E)=>{const C=Wc,_=ov,T=rv,A=nv,V=tv;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(C,{open:i.value,editor:k.editor,"super-text-init":s.text,onClose:p,onSave:b},null,8,["open","editor","super-text-init"]),o.createVNode(V,{"onUpdate:open":y},{default:o.withCtx(()=>[o.createVNode(_,{as:"template",class:"relative",disabled:o.unref(u),onDblclick:o.withModifiers(x,["prevent","stop"])},{default:o.withCtx(()=>[o.renderSlot(k.$slots,"default")]),_:3},8,["disabled"]),o.createVNode(A,null,{default:o.withCtx(()=>[k.disableSuperInput?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(T,{key:0,onSelect:m},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.inputSuper")),1)]),_:1})),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:1,onSelect:E[0]||(E[0]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.cutContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.cut")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:2,onSelect:E[1]||(E[1]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.copyContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.copy")),1)]),_:1})):o.createCommentVNode("",!0),o.unref(a)?(o.openBlock(),o.createBlock(T,{key:3,disabled:!v.value,onSelect:E[2]||(E[2]=O=>{var B;return(B=k.editor)==null?void 0:B.commands.pasteContent()})},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(r)("editor.paste")),1)]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),_:1})]),_:3})],64)}}}),rZ={id:"editor-panel",class:"flex relative w-full h-full"},oZ=po(o.defineComponent({__name:"PageNode",props:na,setup(t){const{state:e,page:n,superTextStore:r}=wn(),{size:i,pagination:s,margin:a}=n.value,l=o.ref(null),u=o.ref(t.node.attrs.viewSuperTextArea),c=o.computed(()=>u.value&&t.editor.storage.page.mode!=="editor"),f=o.computed(()=>t.editor.storage.page.mode===Me.REPORT),{width:p,height:m}=i,g=o.computed(()=>s?`calc(${m} - ${(a==null?void 0:a.top)??0} - ${(a==null?void 0:a.bottom)??0}`:"max-content"),b=Ne.useEventBus(mr.SUPER_VIEW_PAGE);return o.watch(()=>t.node.attrs,v=>{b.emit(v.pageNumber)},{immediate:!0}),(v,y)=>{var k,E,C,_;const x=Ev;return o.openBlock(),o.createBlock(o.unref(ta),{id:v.node.attrs.id,ref_key:"containerRef",ref:l,"page-number":v.node.attrs.pageNumber,class:"overflow-hidden umo-page-node-view w-full border rounded-[3px] border-[#999999]",style:o.normalizeStyle({"--umo-page-margin-top":((k=o.unref(a))==null?void 0:k.top)??"0","--umo-page-margin-bottom":((E=o.unref(a))==null?void 0:E.bottom)??"0","--umo-page-margin-left":((C=o.unref(a))==null?void 0:C.left)??"0","--umo-page-margin-right":((_=o.unref(a))==null?void 0:_.right)??"0","--umo-page-width":o.unref(p),"--umo-page-height":o.unref(m),"--empty-node-left":"0px",left:100,"min-height":typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m),height:f.value?typeof o.unref(m)=="number"?`${o.unref(m)}px`:o.unref(m):"auto"})},{default:o.withCtx(()=>[o.createElementVNode("div",rZ,[o.createVNode(x,{mode:c.value?o.unref(Me).REPORT:o.unref(Me).EDITOR,editor:v.editor,"super-text-store":o.unref(r)},{default:o.withCtx(()=>[o.createVNode(o.unref(ex),{class:"umo-page-node-content",style:o.normalizeStyle({height:g.value})},null,8,["style"])]),_:1},8,["mode","editor","super-text-store"])])]),_:1},8,["id","page-number","style"])}}}),[["__scopeId","data-v-7d55d7ea"]]);function dE(t,e){const n=t.storedMarks??(t.selection.$to.parentOffset&&t.selection.$from.marks());if(n){const r=n.filter(i=>e==null?void 0:e.includes(i.type.name));t.tr.ensureMarks(r)}}const iZ=({keepMarks:t=!0}={})=>({tr:e,state:n,dispatch:r,editor:i})=>{const{selection:s,doc:a}=e,{$from:l,$to:u}=s,c=i.extensionManager.attributes,f=Eh(c,l.node().type.name,l.node().attrs);if(f.id=ev(),f.extend&&(f.extend=!1),s instanceof Pe&&s.node.isBlock)return!l.parentOffset||!Cr(a,l.pos)?!1:(r&&(t&&dE(n,i.extensionManager.splittableMarks),e.split(l.pos).scrollIntoView()),!0);if(!l.parent.isBlock)return!1;if(r){const p=u.parentOffset===u.parent.content.size;s instanceof De&&e.deleteSelection();const m=l.depth===0?void 0:e4(l.node(-1).contentMatchAt(l.indexAfter(-1)));let g=p&&m?[{type:m,attrs:f}]:void 0,b=Cr(e.doc,e.mapping.map(l.pos),1,g);if(!g&&!b&&Cr(e.doc,e.mapping.map(l.pos),1,m?[{type:m}]:void 0)&&(b=!0,g=m?[{type:m,attrs:f}]:void 0),b&&(g||(g=[{type:l.node().type,attrs:f}]),e.split(e.mapping.map(l.pos),1,g),m&&!p&&!l.parentOffset&&l.parent.type!==m)){const v=e.mapping.map(l.before()),y=e.doc.resolve(v);l.node(-1).canReplaceWith(y.index(),y.index()+1,m)&&e.setNodeMarkup(e.mapping.map(l.before()),m)}t&&dE(n,i.extensionManager.splittableMarks),e.scrollIntoView()}return!0},sZ=t=>({tr:e,state:n,dispatch:r,editor:i})=>{var v;const s=vn(t,n.schema),{$from:a,$to:l}=n.selection,u=n.selection instanceof Pe?n.selection.node:null;if(u!=null&&u.isBlock||a.depth<2||!a.sameParent(l))return!1;const c=a.node(-1);if(c.type!==s)return!1;const f=i.extensionManager.attributes;if(a.parent.content.size===0&&a.node(-1).childCount===a.indexAfter(-1)){if(a.depth===2||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let y=be.empty;const x=a.index(-1)?1:a.index(-2)?2:3;for(let A=a.depth-x;A>=a.depth-3;A-=1)y=be.from(a.node(A).copy(y));const k=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,E=Eh(f,a.node().type.name,a.node().attrs),C=((v=s.contentMatch.defaultType)==null?void 0:v.createAndFill(E))??void 0;y=y.append(be.from(s.createAndFill(null,C)??void 0));const _=a.before(a.depth-(x-1));e.replace(_,a.after(-k),new Se(y,4-x,0));let T=-1;e.doc.nodesBetween(_,e.doc.content.size,(A,V)=>{if(T>-1)return!1;A.isTextblock&&A.content.size===0&&(T=V+1)}),T>-1&&e.setSelection(De.near(e.doc.resolve(T))),e.scrollIntoView()}return!0}const p=l.pos===a.end()?c.contentMatchAt(0).defaultType:null,m=Eh(f,c.type.name,c.attrs),g=Eh(f,a.node().type.name,a.node().attrs);m.id=ev(),g.id=ev(),e.delete(a.pos,l.pos);const b=p?[{type:s,attrs:m},{type:p,attrs:g}]:[{type:s,attrs:m}];if(!Cr(e.doc,a.pos,2))return!1;if(r){const{selection:y,storedMarks:x}=n,{splittableMarks:k}=i.extensionManager,E=x??(y.$to.parentOffset&&y.$from.marks());if(e.split(a.pos,2,b).scrollIntoView(),!E||!r)return!0;const C=E.filter(_=>k.includes(_.type.name));e.ensureMarks(C)}return!0},aZ=[Yf,Xf,Jf,_g,Zf,hs,Ag,Bl,Og,Ig,Mg,ma,Il,wi,Bg,Rg,Tg,Jr],lZ=Dt.create({priority:200,name:`${Jr}`,content:"block*",group:`${Jr}`,isolating:!0,selectable:!1,draggable:!1,isLeaf:!0,addOptions(){return{SystemAttributes:{},nodesComputed:{},View:ra(oZ),types:[],slots:{}}},addAttributes(){return{HTMLAttributes:{},id:{default:Zr(10)},pageNumber:{default:1},force:{default:!1},viewSuperTextArea:{default:!0},slots:{default:this.options.slots,renderHTML:()=>({})}}},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML({node:t,HTMLAttributes:e}){return["div",{...yt(e),"data-type":this.name},0]},addCommands(){return{splitBlock:iZ,splitListItem:sZ,autoPaging:(t=!0)=>({tr:e,state:n,dispatch:r,editor:i})=>(r&&e.setMeta("runState",t),!0),setPageBreak:()=>({tr:t,state:e,dispatch:n,editor:r})=>(n&&t.setMeta("splitPage",!0),!0),togglePagePlugin:t=>({tr:e,dispatch:n})=>(e.setMeta("disablePage",t),n&&n(e),!0)}},addGlobalAttributes(){return[{types:aZ.concat(this.options.types||[]),attributes:{id:{default:null},extend:{default:!1}}}]},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.first(({commands:r})=>[()=>r.undoInputRule(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{empty:l,$anchor:u}=s,{pos:c,parent:f}=u,p=We.atStart(a).from===c;return!l||!p||!f.type.isTextblock||f.textContent.length?!1:r.clearNodes()}),()=>fE(r),()=>r.joinBackward(),()=>r.selectNodeBackward(),()=>r.command(({editor:i,tr:s})=>{const{selection:a,doc:l}=s,{$anchor:u}=a,{pos:c}=u;if(l.childCount===1)return!1;if(We.atEnd(l).from===c&&!u.parentOffset)return r.deleteNode(Jr);const f=di(p=>p.type.name===Jr)(a);if(f){if(!f.node.firstChild)return r.deleteNode(Jr);const p=f.node.firstChild.type;if(f.start+We.atStart(f.node).from===c){const g=De.create(l,f.start-2,f.start-2),b=di(v=>v.type.name===Jr)(g);if(b){const v=We.atEnd(b.node).from+b.start,y=De.create(l,v,v);if(p===b.node.lastChild.type){const{parent:x}=y.$anchor;return yX(x,i.schema)?s.setSelection(y):s.step(new mn(v,c,Se.empty)),!0}s.setSelection(y)}return!0}}return!1})]),Delete:()=>this.editor.commands.first(({commands:r})=>[()=>fE(r),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,u=l.node(),c=di(f=>f.type.name===Bl)(s);return c&&c.start+We.atStart(c.node).from===l.pos&&c.node.childCount===1&&u.content.size===0?!0:r.joinForward()}),()=>r.selectNodeForward(),()=>r.command(({tr:i})=>{const{selection:s,doc:a}=i,{$anchor:l}=s,{pos:u}=l;if(a.childCount===1)return!1;if(We.atEnd(a).from===u)return r.deleteNode(Jr);const c=di(f=>f.type.name===Jr)(s);if(c&&c.start+We.atEnd(c.node).from===u){const p=De.create(a,u+2,u+2),m=di(g=>g.type.name===Jr)(p);if(m){const g=We.atStart(m.node).from+m.start,b=De.create(a,g,g);if(di(y=>y.attrs.extend)(b))return i.step(new mn(u,g,Se.empty)),!0}}return!1})]),Tab:()=>this.editor.commands.first(({commands:r})=>[()=>!this.editor.isActive("table")]),"Mod-Enter":()=>this.editor.commands.setPageBreak()}},addNodeView(){return this.options.View}});function Eh(t,e,n){return Object.fromEntries(Object.entries(n).filter(([r])=>{const i=t.find(s=>s.type===e&&s.name===r);return i?i.attribute.keepOnSplit:!1}))}const fE=t=>t.command(({tr:e})=>{const{selection:n,doc:r}=e,i=t4(r,{from:n.from,to:n.to},s=>s.type.name===Bl);for(const s of i){const a=s.pos+s.node.nodeSize;if(n.from<s.pos||n.to>a)return!0}return t.deleteSelection()}),uZ=tt.create({name:"fontFamily",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{fontFamily:{default:null,parseHTML:t=>t.style.fontFamily,renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}}}),cZ=["data-font"],dZ=o.defineComponent({__name:"FontFamilyMenuButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},shortcutKeys:{default:void 0},maxHeight:{default:void 0},tooltip:{default:""},items:{default:()=>[]},customClass:{default:""},showDefaultDivider:{type:Boolean,default:!1}},setup(t){const e=t,n=o.computed(()=>e.editor.extensionStorage["base-kit"].mode===Me.EDITOR),{t:r}=At(),i=[{label:r("editor.fontFamily.gulim"),value:"Gulim"},{label:r("editor.fontFamily.dotum"),value:"Dotum"},{label:r("editor.fontFamily.gungsuh"),value:"Gungsuh"}],s=o.inject("fontFamily"),a=o.computed(()=>{const p=e.editor.extensionManager.extensions.find(g=>g.name==="fontFamily").options;let m=[];return Et.isEmpty(p.fontFamilyList)?m=i:m=p.fontFamilyList.filter(g=>g.enabled!==!1).map(g=>({label:g.label,value:g.value})),[{label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")},...m]}),l=o.computed(()=>{const p={label:r("editor.fontFamily.default"),value:r("editor.fontFamily.default")};return n.value?L0(e.editor.state,"textStyle").fontFamily||p.value:s.value||p.value}),u=Ne.useEventBus("fontFamily");function c(p){p.value===l.value||p.value===r("editor.fontFamily.default")?(e.editor.chain().focus().unsetFontFamily().run(),s.value=null):(s.value=p.value,e.editor.chain().focus().setFontFamily(p.value).run(),u.emit()),e.editor.commands.setForceCloseBubble(!0)}e.editor.on("selectionUpdate",({editor:p})=>{p.state.selection.empty&&e.editor.commands.resetForceCloseBubble()});const f=o.computed(()=>{var m,g;const p=((m=a.value[0])==null?void 0:m.label)||r("editor.fontFamily.default");return((g=a.value.find(b=>b.value===l.value))==null?void 0:g.label)||p});return(p,m)=>(o.openBlock(),o.createBlock(Ea,{disabled:p.disabled,tooltip:p.tooltip,title:f.value,btn_class:`min-w-20 ${p.customClass}`,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(g,b)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:b},[o.createVNode(o.unref($l),{checked:l.value===g.value,onClick:v=>c(g)},{default:o.withCtx(()=>[o.createElementVNode("span",{class:"ml-1 h-full","data-font":g.label,style:o.normalizeStyle({fontFamily:g.value??void 0})},o.toDisplayString(g.label),13,cZ)]),_:2},1032,["checked","onClick"]),g.label===o.unref(r)("editor.fontFamily.default")&&p.showDefaultDivider?(o.openBlock(),o.createBlock(o.unref(pb),{key:0})):o.createCommentVNode("",!0)],64))),128))]),_:1},8,["disabled","tooltip","title","btn_class"]))}}),pE=uZ.extend({name:"fontFamily",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"],fontFamilyList:[],button({editor:e,extension:n,t:r}){return{component:dZ,componentProps:{editor:e,disabled:!e.can().setFontFamily(""),tooltip:r("editor.fontFamily.tooltip")}}}}},addGlobalAttributes(){return[{types:["paragraph","heading","textStyle"],attributes:{style:{default:null,parseHTML:t=>t.style.fontFamily||null,renderHTML:t=>t.style?{style:`font-family: ${t.style}`}:{}},fontFamily:{default:null,parseHTML:t=>t.style.fontFamily.replace(/['"]/g,""),renderHTML:t=>t.fontFamily?{style:`font-family: ${t.fontFamily}`}:{}}}}]},addCommands(){return{setFontFamily:t=>({chain:e})=>e().setMark("textStyle",{fontFamily:t}).run(),unsetFontFamily:()=>({chain:t})=>t().setMark("textStyle",{fontFamily:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontFamily}}),fZ=tt.create({name:"fontWeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["textStyle"]}},addGlobalAttributes(){return[{types:["paragraph","textStyle"],attributes:{fontWeight:{default:null,parseHTML:t=>t.style.fontWeight||null,renderHTML:t=>t.fontWeight?{style:`font-weight: ${t.fontWeight}`}:{}}}}]},addCommands(){return{setFontWeight:t=>({chain:e})=>e().setMark("textStyle",{fontWeight:t}).run(),unsetFontWeight:()=>({chain:t})=>t().setMark("textStyle",{fontWeight:null}).removeEmptyTextStyle().run()}},addStorage(){return{value:null}},onUpdate(){this.storage.value=this.editor.getAttributes("textStyle").fontWeight}}),pZ={class:"flex gap-2"},hZ=["disabled"],mZ=po(o.defineComponent({__name:"FontSizeIncreaseDecrease",props:{editor:Object},setup(t){const e=o.inject("fontSize"),n=o.computed(()=>e.value?parseInt(e.value)===parseInt(l1[0])||parseInt(e.value)<parseInt(l1[0]):!1),r=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE),i=s=>{r.emit(s)};return(s,a)=>{const l=va,u=ba,c=ya;return o.openBlock(),o.createElementBlock("div",pZ,[o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[0]||(a[0]=f=>i(!0))},[o.createVNode(o.unref(Ot),{name:"Plus",class:"w-6 h-6"})])]),_:1}),o.createVNode(o.unref(vs),null,{default:o.withCtx(()=>a[2]||(a[2]=[o.createTextVNode(" 글꼴 크기 크게 ")])),_:1})]),_:1})]),_:1}),o.createVNode(c,null,{default:o.withCtx(()=>[o.createVNode(u,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(l,null,{default:o.withCtx(()=>[o.createElementVNode("button",{class:"btn",onClick:a[1]||(a[1]=f=>i(!1)),disabled:o.unref(n)},[o.createVNode(o.unref(Ot),{name:"Minus",class:"w-6 h-6"})],8,hZ)]),_:1}),o.createVNode(o.unref(vs),null,{default:o.withCtx(()=>a[3]||(a[3]=[o.createTextVNode(" 글꼴 크기 작게 ")])),_:1})]),_:1})]),_:1})])}}}),[["__scopeId","data-v-250d04b3"]]),gZ=Un.create({name:"fontSizeIncreaseDecrease",addOptions(){return{defaultSize:"14px",button({editor:t}){return{component:mZ,componentProps:{editor:t}}}}},addAttributes(){return{size:{default:this.options.defaultSize,parseHTML:t=>t.style.fontSize||this.options.defaultSize,renderHTML:t=>t.size?{style:`font-size: ${t.size}`}:{}}}},addCommands(){return{setFontSizeIncreaseDecrease:t=>({commands:e})=>e.setMark("textStyle",{fontSize:t})}}}),Sv=tt.create({name:"painter",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{action:()=>{e.commands.setPainter(e==null?void 0:e.state.selection.$head.marks())},icon:"PaintRoller",tooltip:r("editor.format")}})}},addCommands(){return{setPainter:t=>({view:{dispatch:e,state:{tr:n},dom:r}})=>{const a=`url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;return r.style.cursor=a,e(n.setMeta("painterAction",{type:"start",marks:t})),!0}}},addProseMirrorPlugins(){return[new ot({key:new kt("format-painter"),state:{init:()=>[],apply:(t,e)=>{const n=t.getMeta("painterAction");return n&&n.type==="start"?e=n.marks:n&&n.type==="end"&&(e=[]),e}},props:{handleDOMEvents:{mousedown(t,e){const n=this.getState(t.state);if(!n||n.length==0)return t.dom.style.cursor="",!1;const r=()=>{document.removeEventListener("mouseup",r);const{dispatch:i,state:{selection:s},dom:a}=t;let l=t.state.tr;a.style.cursor="",l=l.removeMark(s.from,s.to);for(const u of n)u.type.name!="link"&&(l=l.addMark(s.from,s.to,u));i(l.setMeta("painterAction",{type:"end"}))};return document.addEventListener("mouseup",r),!0}}}})]}}),_v=()=>Zr(10),hE=new kt("attrkey"),bZ=t=>new ot({key:hE,state:{init:()=>!1,apply:n=>n.getMeta("initSplit")},appendTransaction(n,r,i){const{tr:s}=i;let a=!1;const l=hE.getState(i);if(n.some(c=>c.getMeta("composition")))return null;if(l||n.some(c=>c.docChanged)){const c=[];i.doc.descendants((f,p,m,g)=>{const{attrs:b}=f,v=c.includes(b.id)?_v():b.id||_v();t.includes(f.type.name)&&(s.setNodeMarkup(p,void 0,{...b,id:v,"number-line":g+1}),a=!0),c.push(v)})}return a?s:null}}),mE=[Yf,Xf,Jf,_g,Zf,hs,Ag,Bl,Og,Ig,Mg,ma,Il,wi,Bg,Rg,Tg,Jr],vZ=tt.create({name:"autoId",addGlobalAttributes(){return[{types:mE.concat(this.options.types||[]),attributes:{id:{default:_v()},extend:{default:!1},class:{default:null},"number-line":{default:null}}}]},addProseMirrorPlugins(){return[bZ(mE.concat(this.options.types||[]))]}}),yZ=["paragraph","heading","list_item","todo_item"];function wZ(t,e){const{selection:n,doc:r}=t;if(!n||!r||!(n instanceof De||n instanceof $n))return t;const{from:i,to:s}=n,a=[],l=e&&e!==sx?e:null;return r.nodesBetween(i,s,(u,c)=>{const f=u.type;return yZ.includes(f.name)?((u.attrs.lineHeight||null)!==l&&a.push({node:u,pos:c,nodeType:f}),f.name!=="list_item"&&f.name!=="todo_item"):!0}),a.length&&a.forEach(u=>{const{node:c,pos:f,nodeType:p}=u;let{attrs:m}=c;m={...m,lineHeight:l},t=t.setNodeMarkup(f,p,m,c.marks)}),t}function xZ(t){return({state:e,dispatch:n})=>{const{selection:r}=e;let{tr:i}=e;return i=i.setSelection(r),i=wZ(i,t),i.docChanged?(n&&n(i),!0):!1}}const CZ=o.defineComponent({__name:"LineHeightDropdown",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const{t:e}=At();function n(l){return parseFloat(l.replace("%",""))/100}const r=o.computed(()=>{const c=s.editor.extensionManager.extensions.find(f=>f.name==="lineHeight").options.lineHeights.map(f=>({label:n(f),value:f}));return c.unshift({label:o.unref(e)("editor.default"),value:"default"}),c}),i=o.ref("default"),s=t;function a(l){l==="default"?s.editor.chain().focus().unsetLineHeight().run():s.editor.chain().focus().setLineHeight(l).run(),i.value=l}return(l,u)=>(o.openBlock(),o.createBlock(Ea,{icon:l.icon,tooltip:l.tooltip,disabled:l.disabled,class:"inside-toolbar"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref($l),{key:f,checked:c.value===i.value,onClick:p=>a(c.value)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(c.label),1)]),_:2},1032,["checked","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),gE=tt.create({name:"lineHeight",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","list_item","todo_item"],lineHeights:["100%","115%","150%","200%","250%","300%"],defaultHeight:sx,button({editor:e,t:n}){return{component:CZ,componentProps:{editor:e,icon:"LineHeight",tooltip:n("editor.lineheight.tooltip")}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{lineHeight:{default:null,parseHTML:t=>t.style.lineHeight||this.options.defaultHeight,renderHTML:t=>t.lineHeight===this.options.defaultHeight||!t.lineHeight?{}:{style:`line-height: ${t.lineHeight}`}}}}]},addCommands(){return{setLineHeight:t=>xZ(t),unsetLineHeight:()=>({commands:t})=>this.options.types.every(e=>t.resetAttributes(e,"lineHeight"))}}}),kZ=Dt.create({name:"column",content:"block+",isolating:!0,addAttributes(){return{position:{default:"",parseHTML:t=>t.getAttribute("data-position"),renderHTML:t=>({"data-position":t.position})}}},renderHTML({HTMLAttributes:t}){return["div",yt(t,{"data-type":"column"}),0]},parseHTML(){return[{tag:'div[data-type="column"]'}]}});var Ba=(t=>(t.SidebarLeft="sidebar-left",t.SidebarRight="sidebar-right",t.TwoColumn="two-column",t))(Ba||{});const Tv=Dt.create({name:"columns",group:"columns",content:"column+",defining:!0,isolating:!0,addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),layout:"two-column"}},addAttributes(){return{layout:{default:"two-column"}}},addCommands(){return{setColumns:()=>({commands:t})=>(t.insertContent('<div data-type="columns"><div data-type="column" data-position="left"><p></p></div><div data-type="column" data-position="right"><p></p></div></div>'),!0),setLayout:t=>({commands:e})=>e.updateAttributes("columns",{layout:t})}},renderHTML({HTMLAttributes:t}){return["div",{"data-type":"columns",class:`layout-${t.layout}`},0]},parseHTML(){return[{tag:'div[data-type="columns"]'}]},addExtensions(){return[kZ.configure(this.options.columnOptions)]}}),EZ={class:"flex gap-x-2 items-center"},SZ={class:"sr-only"},_Z={class:"flex justify-end gap-x-2.5 flex-1"},TZ=["disabled"],bE=po(o.defineComponent({__name:"SuperInputDialogMoblie",props:{editor:{},open:{type:Boolean},superTextInit:{},superTextId:{},superTextElementId:{},isViewMode:{type:Boolean},title:{}},emits:["close","save","delete"],setup(t,{emit:e}){const n=e,r=t,{t:i}=At(),s=o.ref(""),a=o.ref(!1),l=o.ref(r.isViewMode??!1),u=o.ref(!1);o.watch(()=>r.isViewMode,g=>{l.value=g,g||(s.value="")});const c=o.computed(()=>{var b;if(!s.value)return!0;const g=document.createElement("div");return g.innerHTML=s.value,((b=g==null?void 0:g.textContent)==null?void 0:b.trim())===""});o.watch(()=>r.open,()=>{r.open&&r.superTextInit&&(s.value=r.superTextInit)},{immediate:!0});const f=()=>{n("close"),a.value=!1,l.value=!0,u.value=!1},p=()=>{n("save",s.value),s.value="",l.value=!0,u.value=!1},m=()=>{u.value=!0,l.value=!1};return(g,b)=>{const v=dh,y=ch,x=uh,k=lh,E=iv,C=Vc,_=Pc;return o.openBlock(),o.createBlock(_,{open:g.open},{default:o.withCtx(()=>[o.createVNode(C,{"is-overlay-transparent":"",class:"p-2.5 gap-0 gap-y-2.5 border-none w-[calc(100%-40px)] !shadow-ed rounded-[5px]"},{default:o.withCtx(()=>[o.createVNode(x,{class:"text-left flex-row justify-between"},{default:o.withCtx(()=>[o.createVNode(v,{class:"text-base font-normal"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(g.title?g.title:o.unref(i)("editor.superinput")),1)]),_:1}),o.createElementVNode("div",EZ,[o.withDirectives(o.createElementVNode("button",{onClick:m},[o.createVNode(o.unref(Gg),{icon:"lucide:edit-2"})],512),[[o.vShow,l.value]]),o.createVNode(y,{class:"outline-none",onClick:f},{default:o.withCtx(()=>[o.createVNode(o.unref(Ec),{class:"w-5 h-5"}),o.createElementVNode("span",SZ,o.toDisplayString(o.unref(i)("editor.close")),1)]),_:1})])]),_:1}),o.createVNode(k,{class:"hidden"}),o.createVNode(kv,{modelValue:s.value,"onUpdate:modelValue":b[0]||(b[0]=T=>s.value=T),"is-read-only":l.value,"parent-editor":g.editor,"spellcheck-enabled":!1},null,8,["modelValue","is-read-only","parent-editor"]),o.createVNode(E,{class:"flex-row justify-between"},{default:o.withCtx(()=>[o.withDirectives(o.createElementVNode("button",{onClick:b[1]||(b[1]=T=>n("delete"))},o.toDisplayString(o.unref(i)("editor.delete")),513),[[o.vShow,u.value]]),o.withDirectives(o.createElementVNode("div",_Z,[o.createElementVNode("button",{onClick:f},o.toDisplayString(o.unref(i)("editor.menubar.menu.cancel")),1),o.createElementVNode("button",{disabled:o.unref(c),class:o.normalizeClass({"cursor-not-allowed":o.unref(c)}),onClick:p},o.toDisplayString(o.unref(i)("editor.menubar.menu.save")),11,TZ)],512),[[o.vShow,u.value||!l.value]])]),_:1})]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-c6e8813c"]]),AZ=["innerHTML"],MZ=["book-mark-node-id","page-id","page-number","book-mark-content","node-id","line-id"],OZ=o.defineComponent({__name:"ConfigPlan",props:na,setup(t){const e=t,n=o.ref(!1),r=o.ref(null),{selection:i,doc:s}=e.editor.state,a=o.inject("isMobile"),l=o.ref(!1),u=Ne.useEventBus(mr.RENDER_SUPER_TEXT),c=o.computed(()=>{var _,T;const x=s.resolve(i.from),k=x==null?void 0:x.node(-1),E=(_=k==null?void 0:k.attrs)==null?void 0:_.id,C=(T=k==null?void 0:k.attrs)==null?void 0:T.pageNumber;return{pageId:E,pageNumber:C}}),f=o.computed(()=>{const x=e.getPos(),k=e.editor.state.doc.resolve(x);for(let E=k.depth;E>0;E--){const C=k.node(E);if(C.type.name==="paragraph")return C}return null}),p=o.computed(()=>{var x;return((x=f.value)==null?void 0:x.attrs.id)||""});function m(x){e.updateAttributes({"data-text":x}),n.value=!1}function g(x){const k=e.node.attrs[it.TEXT],E=e.node.attrs[it.ID],_={lineId:x.target.querySelector(`[node-id="${E}"]`).getAttribute("line-id"),text:k};u.emit({action:"hover",payload:_})}function b(x){const k=e.node.attrs[it.ID],C={lineId:x.target.querySelector(`[node-id="${k}"]`).getAttribute("line-id"),text:""};u.emit({action:"hover",payload:C})}function v(){const{getPos:x,node:k,editor:E}=e,C=x(),_=C+1;E.commands.deleteRange({from:C,to:_})}function y(){n.value=!0,a&&(l.value=!0)}return(x,k)=>{const E=bn,C=ov,_=rv,T=nv,A=tv,V=Wc;return o.openBlock(),o.createBlock(o.unref(ta),{as:"span",class:o.normalizeClass(["w-fit text-inherit super-text align-middle",{"!leading-[9px] [&_*]:!leading-[9px]":o.unref(a)}]),"data-drag-handle":"",draggable:"true",contenteditable:"false"},{default:o.withCtx(()=>[o.createVNode(A,null,{default:o.withCtx(()=>[o.createVNode(C,{as:"template",class:"relative"},{default:o.withCtx(()=>[o.createVNode(E,{variant:"ghost",class:"!p-0 !m-0 !h-fit font-normal !text-ed-blue",onClick:y,onMouseenter:g,onMouseleave:b},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{name:"plan",class:o.normalizeClass({"w-[18px] h-auto pr-1":o.unref(a)})},null,8,["class"]),k[3]||(k[3]=o.createTextVNode(" [")),o.createElementVNode("span",{class:"[&_*]:inline",innerHTML:e.node.attrs[o.unref(it).TEXT]},null,8,AZ),k[4]||(k[4]=o.createTextVNode("] ")),o.createElementVNode("div",{ref_key:"bookMarkRef",ref:r,"book-mark-node-id":e.node.attrs[o.unref(it).ID],"page-id":c.value.pageId,"page-number":c.value.pageNumber,"book-mark-content":e.node.attrs[o.unref(it).TEXT],"node-id":e.node.attrs[o.unref(it).ID],"line-id":p.value},null,8,MZ)]),_:1})]),_:1}),o.createVNode(T,null,{default:o.withCtx(()=>[o.createVNode(_,{onSelect:k[0]||(k[0]=O=>n.value=!0)},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.edit")),1)]),_:1}),o.createVNode(_,{onSelect:v},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(x.$t("editor.configPlan.delete")),1)]),_:1})]),_:1})]),_:1}),o.unref(a)?(o.openBlock(),o.createBlock(bE,{key:1,title:x.$t("editor.configPlan"),open:n.value,"is-view-mode":l.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(it).TEXT],"super-text-id":e.node.attrs[o.unref(it).ID],onClose:k[2]||(k[2]=O=>n.value=!1),onSave:m,onDelete:v},null,8,["title","open","is-view-mode","editor","super-text-init","super-text-id"])):(o.openBlock(),o.createBlock(V,{key:0,open:n.value,editor:e.editor,"super-text-init":e.node.attrs[o.unref(it).TEXT],"super-text-element-id":e.node.attrs[o.unref(it).ELEMENT_ID],onClose:k[1]||(k[1]=O=>n.value=!1),onSave:m},null,8,["open","editor","super-text-init","super-text-element-id"]))]),_:1},8,["class"])}}}),vE=Dt.create({name:"configPlan",inline:!0,group:"inline",atom:!0,draggable:!0,addStorage(){return{isShowConfigPlanInput:!1}},addOptions(){return{specialCharModal:null,button:({editor:t,t:e,isMobile:n})=>[...n?[{component:Ge,componentProps:{action:()=>{t.commands.toggleConfigPlanInput()},isActive:()=>{},icon:"plan",title:e("editor.insertConfigPlan"),tooltip:e("editor.insertConfigPlan"),customClass:"whitespace-nowrap !bg-ed-blue !text-white !font-normal rounded-[3px] h-[26px] gap-x-1 ml-auto",customClassTooltip:"ml-auto"}}]:[]]}},addAttributes(){return{"data-id":{default:null},"data-text":{default:""},"data-position":{default:"0"}}},addCommands(){return{toggleConfigPlanInput:()=>({editor:t})=>t.storage.configPlan.isShowConfigPlanInput=!t.storage.configPlan.isShowConfigPlanInput}},parseHTML(){return[{tag:"button.config-plan"}]},renderHTML({HTMLAttributes:t}){return["button",yt(t,{class:"config-plan"})]},addNodeView(){return ra(OZ)},addProseMirrorPlugins(){return[new ot({appendTransaction(t,e,n){let r=n.tr,i=!1;return n.doc.descendants((s,a)=>{if(s.type.name==="configPlan"){const l=s.attrs["data-position"],u=String(a);l!==u&&(r=r.setNodeMarkup(a,void 0,{...s.attrs,"data-position":u}),i=!0)}}),i?r:null}})]}});var Av,Mv;if(typeof WeakMap<"u"){let t=new WeakMap;Av=e=>t.get(e),Mv=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;Av=r=>{for(let i=0;i<t.length;i+=2)if(t[i]==r)return t[i+1]},Mv=(r,i)=>(n==10&&(n=0),t[n++]=r,t[n++]=i)}var un=class{constructor(t,e,n,r){this.width=t,this.height=e,this.map=n,this.problems=r}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const r=e%this.width,i=e/this.width|0;let s=r+1,a=i+1;for(let l=1;s<this.width&&this.map[e+l]==n;l++)s++;for(let l=1;a<this.height&&this.map[e+this.width*l]==n;l++)a++;return{left:r,top:i,right:s,bottom:a}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:r,right:i,top:s,bottom:a}=this.findCell(t);return e=="horiz"?(n<0?r==0:i==this.width)?null:this.map[s*this.width+(n<0?r-1:i)]:(n<0?s==0:a==this.height)?null:this.map[r+this.width*(n<0?s-1:a)]}rectBetween(t,e){const{left:n,right:r,top:i,bottom:s}=this.findCell(t),{left:a,right:l,top:u,bottom:c}=this.findCell(e);return{left:Math.min(n,a),top:Math.min(i,u),right:Math.max(r,l),bottom:Math.max(s,c)}}cellsInRect(t){const e=[],n={};for(let r=t.top;r<t.bottom;r++)for(let i=t.left;i<t.right;i++){const s=r*this.width+i,a=this.map[s];n[a]||(n[a]=!0,!(i==t.left&&i&&this.map[s-1]==a||r==t.top&&r&&this.map[s-this.width]==a)&&e.push(a))}return e}positionAt(t,e,n){for(let r=0,i=0;;r++){const s=i+n.child(r).nodeSize;if(r==t){let a=e+t*this.width;const l=(t+1)*this.width;for(;a<l&&this.map[a]<i;)a++;return a==l?s-1:this.map[a]}i=s}}static get(t){return Av(t)||Mv(t,BZ(t))}};function BZ(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=IZ(t),n=t.childCount,r=[];let i=0,s=null;const a=[];for(let c=0,f=e*n;c<f;c++)r[c]=0;for(let c=0,f=0;c<n;c++){const p=t.child(c);f++;for(let b=0;;b++){for(;i<r.length&&r[i]!=0;)i++;if(b==p.childCount)break;const v=p.child(b),{colspan:y,rowspan:x,colwidth:k}=v.attrs;for(let E=0;E<x;E++){if(E+c>=n){(s||(s=[])).push({type:"overlong_rowspan",pos:f,n:x-E});break}const C=i+E*e;for(let _=0;_<y;_++){r[C+_]==0?r[C+_]=f:(s||(s=[])).push({type:"collision",row:c,pos:f,n:y-_});const T=k&&k[_];if(T){const A=(C+_)%e*2,V=a[A];V==null||V!=T&&a[A+1]==1?(a[A]=T,a[A+1]=1):V==T&&a[A+1]++}}}i+=y,f+=v.nodeSize}const m=(c+1)*e;let g=0;for(;i<m;)r[i++]==0&&g++;g&&(s||(s=[])).push({type:"missing",row:c,n:g}),f++}(e===0||n===0)&&(s||(s=[])).push({type:"zero_sized"});const l=new un(e,n,r,s);let u=!1;for(let c=0;!u&&c<a.length;c+=2)a[c]!=null&&a[c+1]<n&&(u=!0);return u&&RZ(l,a,t),l}function IZ(t){let e=-1,n=!1;for(let r=0;r<t.childCount;r++){const i=t.child(r);let s=0;if(n)for(let a=0;a<r;a++){const l=t.child(a);for(let u=0;u<l.childCount;u++){const c=l.child(u);a+c.attrs.rowspan>r&&(s+=c.attrs.colspan)}}for(let a=0;a<i.childCount;a++){const l=i.child(a);s+=l.attrs.colspan,l.attrs.rowspan>1&&(n=!0)}e==-1?e=s:e!=s&&(e=Math.max(e,s))}return e}function RZ(t,e,n){t.problems||(t.problems=[]);const r={};for(let i=0;i<t.map.length;i++){const s=t.map[i];if(r[s])continue;r[s]=!0;const a=n.nodeAt(s);if(!a)throw new RangeError(`No cell with offset ${s} found`);let l=null;const u=a.attrs;for(let c=0;c<u.colspan;c++){const f=(i+c)%t.width,p=e[f*2];p!=null&&(!u.colwidth||u.colwidth[c]!=p)&&((l||(l=LZ(u)))[c]=p)}l&&t.problems.unshift({type:"colwidth mismatch",pos:s,colwidth:l})}}function LZ(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function Gn(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const r=t.nodes[n],i=r.spec.tableRole;i&&(e[i]=r)}}return e}var Ms=new kt("selectingCells");function Kl(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function DZ(t){for(let e=t.depth;e>0;e--){const n=t.node(e).type.spec.tableRole;if(n==="cell"||n==="header_cell")return t.node(e)}return null}function _o(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function Sh(t){const e=t.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 n=Kl(e.$head)||PZ(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function PZ(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const r=e.type.spec.tableRole;if(r=="cell"||r=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function Ov(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function VZ(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function Bv(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function yE(t,e,n){const r=t.node(-1),i=un.get(r),s=t.start(-1),a=i.nextCell(t.pos-s,e,n);return a==null?null:t.node(0).resolve(s+a)}function Ia(t,e,n=1){const r={...t,colspan:t.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(e,n),r.colwidth.some(i=>i>0)||(r.colwidth=null)),r}function wE(t,e,n=1){const r={...t,colspan:t.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let i=0;i<n;i++)r.colwidth.splice(e,0,0)}return r}function FZ(t,e,n){const r=Gn(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=r)return!1;return!0}var jt=class Fi extends We{constructor(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.rectBetween(e.pos-s,n.pos-s),l=e.node(0),u=i.cellsInRect(a).filter(f=>f!=n.pos-s);u.unshift(n.pos-s);const c=u.map(f=>{const p=r.nodeAt(f);if(!p)throw RangeError(`No cell with offset ${f} found`);const m=s+f+1;return new s3(l.resolve(m),l.resolve(m+p.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const r=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(Ov(r)&&Ov(i)&&Bv(r,i)){const s=this.$anchorCell.node(-1)!=r.node(-1);return s&&this.isRowSelection()?Fi.rowSelection(r,i):s&&this.isColSelection()?Fi.colSelection(r,i):new Fi(r,i)}return De.between(r,i)}content(){const e=this.$anchorCell.node(-1),n=un.get(e),r=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r),s={},a=[];for(let u=i.top;u<i.bottom;u++){const c=[];for(let f=u*n.width+i.left,p=i.left;p<i.right;p++,f++){const m=n.map[f];if(s[m])continue;s[m]=!0;const g=n.findCell(m);let b=e.nodeAt(m);if(!b)throw RangeError(`No cell with offset ${m} found`);const v=i.left-g.left,y=g.right-i.right;if(v>0||y>0){let x=b.attrs;if(v>0&&(x=Ia(x,0,v)),y>0&&(x=Ia(x,x.colspan-y,y)),g.left<i.left){if(b=b.type.createAndFill(x),!b)throw RangeError(`Could not create cell with attrs ${JSON.stringify(x)}`)}else b=b.type.create(x,b.content)}if(g.top<i.top||g.bottom>i.bottom){const x={...b.attrs,rowspan:Math.min(g.bottom,i.bottom)-Math.max(g.top,i.top)};g.top<i.top?b=b.type.createAndFill(x):b=b.type.create(x,b.content)}c.push(b)}a.push(e.child(u).copy(be.from(c)))}const l=this.isColSelection()&&this.isRowSelection()?e:a;return new Se(be.from(l),1,1)}replace(e,n=Se.empty){const r=e.steps.length,i=this.ranges;for(let a=0;a<i.length;a++){const{$from:l,$to:u}=i[a],c=e.mapping.slice(r);e.replace(c.map(l.pos),c.map(u.pos),a?Se.empty:n)}const s=We.findFrom(e.doc.resolve(e.mapping.slice(r).map(this.to)),-1);s&&e.setSelection(s)}replaceWith(e,n){this.replace(e,new Se(be.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),r=un.get(n),i=this.$anchorCell.start(-1),s=r.cellsInRect(r.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let a=0;a<s.length;a++)e(n.nodeAt(s[a]),i+s[a])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const r=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(r,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.top<=l.top?(a.top>0&&(e=u.resolve(s+i.map[a.left])),l.bottom<i.height&&(n=u.resolve(s+i.map[i.width*(i.height-1)+l.right-1]))):(l.top>0&&(n=u.resolve(s+i.map[l.left])),a.bottom<i.height&&(e=u.resolve(s+i.map[i.width*(i.height-1)+a.right-1]))),new Fi(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=un.get(e),r=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-r),s=n.colCount(this.$headCell.pos-r);if(Math.min(i,s)>0)return!1;const a=i+this.$anchorCell.nodeAfter.attrs.colspan,l=s+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,l)==n.width}eq(e){return e instanceof Fi&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const r=e.node(-1),i=un.get(r),s=e.start(-1),a=i.findCell(e.pos-s),l=i.findCell(n.pos-s),u=e.node(0);return a.left<=l.left?(a.left>0&&(e=u.resolve(s+i.map[a.top*i.width])),l.right<i.width&&(n=u.resolve(s+i.map[i.width*(l.top+1)-1]))):(l.left>0&&(n=u.resolve(s+i.map[l.top*i.width])),a.right<i.width&&(e=u.resolve(s+i.map[i.width*(a.top+1)-1]))),new Fi(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Fi(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,r=n){return new Fi(e.resolve(n),e.resolve(r))}getBookmark(){return new $Z(this.$anchorCell.pos,this.$headCell.pos)}};jt.prototype.visible=!1,We.jsonID("cell",jt);var $Z=class Y9{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Y9(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),r=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&r.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&r.index()<r.parent.childCount&&Bv(n,r)?new jt(n,r):We.near(r,1)}};function HZ(t){if(!(t.selection instanceof jt))return null;const e=[];return t.selection.forEachCell((n,r)=>{e.push(Gt.node(r,r+n.nodeSize,{class:"selectedCell"}))}),ut.create(t.doc,e)}function zZ({$from:t,$to:e}){if(t.pos==e.pos||t.pos<e.pos-6)return!1;let n=t.pos,r=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let s=e.depth;s>=0&&!(e.before(s+1)>e.start(s));s--,r--);return n==r&&/row|table/.test(t.node(i).type.spec.tableRole)}function UZ({$from:t,$to:e}){let n,r;for(let i=t.depth;i>0;i--){const s=t.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){n=s;break}}for(let i=e.depth;i>0;i--){const s=e.node(i);if(s.type.spec.tableRole==="cell"||s.type.spec.tableRole==="header_cell"){r=s;break}}return n!==r&&e.parentOffset===0}function WZ(t,e,n){const r=(e||t).selection,i=(e||t).doc;let s,a;if(r instanceof Pe&&(a=r.node.type.spec.tableRole)){if(a=="cell"||a=="header_cell")s=jt.create(i,r.from);else if(a=="row"){const l=i.resolve(r.from+1);s=jt.rowSelection(l,l)}else if(!n){const l=un.get(r.node),u=r.from+1,c=u+l.map[l.width*l.height-1];s=jt.create(i,u+1,c)}}else r instanceof De&&zZ(r)?s=De.create(i,r.from):r instanceof De&&UZ(r)&&(s=De.create(i,r.$from.start(),r.$from.end()));return s&&(e||(e=t.tr)).setSelection(s),e}var jZ=new kt("fix-tables");function xE(t,e,n,r){const i=t.childCount,s=e.childCount;e:for(let a=0,l=0;a<s;a++){const u=e.child(a);for(let c=l,f=Math.min(i,a+3);c<f;c++)if(t.child(c)==u){l=c+1,n+=u.nodeSize;continue e}r(u,n),l<i&&t.child(l).sameMarkup(u)?xE(t.child(l),u,n+1,r):u.nodesBetween(0,u.content.size,r,n+1),n+=u.nodeSize}}function CE(t,e){let n;const r=(i,s)=>{i.type.spec.tableRole=="table"&&(n=qZ(t,i,s,n))};return e?e.doc!=t.doc&&xE(e.doc,t.doc,0,r):t.doc.descendants(r),n}function qZ(t,e,n,r){const i=un.get(e);if(!i.problems)return r;r||(r=t.tr);const s=[];for(let u=0;u<i.height;u++)s.push(0);for(let u=0;u<i.problems.length;u++){const c=i.problems[u];if(c.type=="collision"){const f=e.nodeAt(c.pos);if(!f)continue;const p=f.attrs;for(let m=0;m<p.rowspan;m++)s[c.row+m]+=c.n;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,Ia(p,p.colspan-c.n,c.n))}else if(c.type=="missing")s[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,rowspan:f.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const f=e.nodeAt(c.pos);if(!f)continue;r.setNodeMarkup(r.mapping.map(n+1+c.pos),null,{...f.attrs,colwidth:c.colwidth})}else if(c.type=="zero_sized"){const f=r.mapping.map(n);r.delete(f,f+e.nodeSize)}}let a,l;for(let u=0;u<s.length;u++)s[u]&&(a==null&&(a=u),l=u);for(let u=0,c=n+1;u<i.height;u++){const f=e.child(u),p=c+f.nodeSize,m=s[u];if(m>0){let g="cell";f.firstChild&&(g=f.firstChild.type.spec.tableRole);const b=[];for(let y=0;y<m;y++){const x=Gn(t.schema)[g].createAndFill();x&&b.push(x)}const v=(u==0||a==u-1)&&l==u?c+1:p-1;r.insert(r.mapping.map(v),b)}c=p}return r.setMeta(jZ,{fixTables:!0})}function No(t){const e=t.selection,n=Sh(t),r=n.node(-1),i=n.start(-1),s=un.get(r);return{...e instanceof jt?s.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):s.findCell(n.pos-i),tableStart:i,map:s,table:r}}function kE(t,{map:e,tableStart:n,table:r},i){let s=i>0?-1:0;FZ(e,r,i+s)&&(s=i==0||i==e.width?null:0);for(let a=0;a<e.height;a++){const l=a*e.width+i;if(i>0&&i<e.width&&e.map[l-1]==e.map[l]){const u=e.map[l],c=r.nodeAt(u);t.setNodeMarkup(t.mapping.map(n+u),null,wE(c.attrs,i-e.colCount(u))),a+=c.attrs.rowspan-1}else{const u=s==null?Gn(r.type.schema).cell:r.nodeAt(e.map[l+s]).type,c=e.positionAt(a,i,r);t.insert(t.mapping.map(n+c),u.createAndFill())}}return t}function KZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(kE(t.tr,n,n.left))}return!0}function GZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(kE(t.tr,n,n.right))}return!0}function XZ(t,{map:e,table:n,tableStart:r},i){const s=t.mapping.maps.length;for(let a=0;a<e.height;){const l=a*e.width+i,u=e.map[l],c=n.nodeAt(u),f=c.attrs;if(i>0&&e.map[l-1]==u||i<e.width-1&&e.map[l+1]==u)t.setNodeMarkup(t.mapping.slice(s).map(r+u),null,Ia(f,i-e.colCount(u)));else{const p=t.mapping.slice(s).map(r+u);t.delete(p,p+c.nodeSize)}a+=f.rowspan}}function YZ(t,e){if(!_o(t))return!1;if(e){const n=No(t),r=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;XZ(r,n,i),i!=n.left;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=un.get(s)}e(r)}return!0}function JZ(t,e,n){var r;const i=Gn(e.type.schema).header_cell;for(let s=0;s<t.width;s++)if(((r=e.nodeAt(t.map[s+n*t.width]))==null?void 0:r.type)!=i)return!1;return!0}function EE(t,{map:e,tableStart:n,table:r},i){var s;let a=n;for(let c=0;c<i;c++)a+=r.child(c).nodeSize;const l=[];let u=i>0?-1:0;JZ(e,r,i+u)&&(u=i==0||i==e.height?null:0);for(let c=0,f=e.width*i;c<e.width;c++,f++)if(i>0&&i<e.height&&e.map[f]==e.map[f-e.width]){const p=e.map[f],m=r.nodeAt(p).attrs;t.setNodeMarkup(n+p,null,{...m,rowspan:m.rowspan+1}),c+=m.colspan-1}else{const p=u==null?Gn(r.type.schema).cell:(s=r.nodeAt(e.map[f+u*e.width]))==null?void 0:s.type,m=p==null?void 0:p.createAndFill();m&&l.push(m)}return t.insert(a,Gn(r.type.schema).row.create(null,l)),t}function ZZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(EE(t.tr,n,n.top))}return!0}function QZ(t,e){if(!_o(t))return!1;if(e){const n=No(t);e(EE(t.tr,n,n.bottom))}return!0}function NZ(t,{map:e,table:n,tableStart:r},i){let s=0;for(let c=0;c<i;c++)s+=n.child(c).nodeSize;const a=s+n.child(i).nodeSize,l=t.mapping.maps.length;t.delete(s+r,a+r);const u=new Set;for(let c=0,f=i*e.width;c<e.width;c++,f++){const p=e.map[f];if(!u.has(p)){if(u.add(p),i>0&&p==e.map[f-e.width]){const m=n.nodeAt(p).attrs;t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m,rowspan:m.rowspan-1}),c+=m.colspan-1}else if(i<e.height&&p==e.map[f+e.width]){const m=n.nodeAt(p),g=m.attrs,b=m.type.create({...g,rowspan:m.attrs.rowspan-1},m.content),v=e.positionAt(i+1,c,n);t.insert(t.mapping.slice(l).map(r+v),b),c+=g.colspan-1}}}}function eQ(t,e){if(!_o(t))return!1;if(e){const n=No(t),r=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;NZ(r,n,i),i!=n.top;i--){const s=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!s)throw RangeError("No table found");n.table=s,n.map=un.get(n.table)}e(r)}return!0}function SE(t){const e=t.content;return e.childCount==1&&e.child(0).isTextblock&&e.child(0).childCount==0}function tQ({width:t,height:e,map:n},r){let i=r.top*t+r.left,s=i,a=(r.bottom-1)*t+r.left,l=i+(r.right-r.left-1);for(let u=r.top;u<r.bottom;u++){if(r.left>0&&n[s]==n[s-1]||r.right<t&&n[l]==n[l+1])return!0;s+=t,l+=t}for(let u=r.left;u<r.right;u++){if(r.top>0&&n[i]==n[i-t]||r.bottom<e&&n[a]==n[a+t])return!0;i++,a++}return!1}function _E(t,e){const n=t.selection;if(!(n instanceof jt)||n.$anchorCell.pos==n.$headCell.pos)return!1;const r=No(t),{map:i}=r;if(tQ(i,r))return!1;if(e){const s=t.tr,a={};let l=be.empty,u,c;for(let f=r.top;f<r.bottom;f++)for(let p=r.left;p<r.right;p++){const m=i.map[f*i.width+p],g=r.table.nodeAt(m);if(!(a[m]||!g))if(a[m]=!0,u==null)u=m,c=g;else{SE(g)||(l=l.append(g.content));const b=s.mapping.map(m+r.tableStart);s.delete(b,b+g.nodeSize)}}if(u==null||c==null)return!0;if(s.setNodeMarkup(u+r.tableStart,null,{...wE(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),l.size){const f=u+1+c.content.size,p=SE(c)?u+1:f;s.replaceWith(p+r.tableStart,f+r.tableStart,l)}s.setSelection(new jt(s.doc.resolve(u+r.tableStart))),e(s)}return!0}function TE(t,e){const n=Gn(t.schema);return nQ(({node:r})=>n[r.type.spec.tableRole])(t,e)}function nQ(t){return(e,n)=>{var r;const i=e.selection;let s,a;if(i instanceof jt){if(i.$anchorCell.pos!=i.$headCell.pos)return!1;s=i.$anchorCell.nodeAfter,a=i.$anchorCell.pos}else{if(s=DZ(i.$from),!s)return!1;a=(r=Kl(i.$from))==null?void 0:r.pos}if(s==null||a==null||s.attrs.colspan==1&&s.attrs.rowspan==1)return!1;if(n){let l=s.attrs;const u=[],c=l.colwidth;l.rowspan>1&&(l={...l,rowspan:1}),l.colspan>1&&(l={...l,colspan:1});const f=No(e),p=e.tr;for(let g=0;g<f.right-f.left;g++)u.push(c?{...l,colwidth:c&&c[g]?[c[g]]:null}:l);let m;for(let g=f.top;g<f.bottom;g++){let b=f.map.positionAt(g,f.left,f.table);g==f.top&&(b+=s.nodeSize);for(let v=f.left,y=0;v<f.right;v++,y++)v==f.left&&g==f.top||p.insert(m=p.mapping.map(b+f.tableStart,1),t({node:s,row:g,col:v}).createAndFill(u[y]))}p.setNodeMarkup(a,t({node:s,row:f.top,col:f.left}),u[0]),i instanceof jt&&p.setSelection(new jt(p.doc.resolve(i.$anchorCell.pos),m?p.doc.resolve(m):void 0)),n(p)}return!0}}function rQ(t,e){return function(n,r){if(!_o(n))return!1;const i=Sh(n);if(i.nodeAfter.attrs[t]===e)return!1;if(r){const s=n.tr;n.selection instanceof jt?n.selection.forEachCell((a,l)=>{a.attrs[t]!==e&&s.setNodeMarkup(l,null,{...a.attrs,[t]:e})}):s.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),r(s)}return!0}}function oQ(t){return function(e,n){if(!_o(e))return!1;if(n){const r=Gn(e.schema),i=No(e),s=e.tr,a=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),l=a.map(u=>i.table.nodeAt(u));for(let u=0;u<a.length;u++)l[u].type==r.header_cell&&s.setNodeMarkup(i.tableStart+a[u],r.cell,l[u].attrs);if(s.steps.length==0)for(let u=0;u<a.length;u++)s.setNodeMarkup(i.tableStart+a[u],r.header_cell,l[u].attrs);n(s)}return!0}}function AE(t,e,n){const r=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<r.length;i++){const s=e.table.nodeAt(r[i]);if(s&&s.type!==n.header_cell)return!1}return!0}function jc(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?oQ(t):function(n,r){if(!_o(n))return!1;if(r){const i=Gn(n.schema),s=No(n),a=n.tr,l=AE("row",s,i),u=AE("column",s,i),f=(t==="column"?l:t==="row"?u:!1)?1:0,p=t=="column"?{left:0,top:f,right:1,bottom:s.map.height}:t=="row"?{left:f,top:0,right:s.map.width,bottom:1}:s,m=t=="column"?u?i.cell:i.header_cell:t=="row"?l?i.cell:i.header_cell:i.cell;s.map.cellsInRect(p).forEach(g=>{const b=g+s.tableStart,v=a.doc.nodeAt(b);v&&a.setNodeMarkup(b,m,v.attrs)}),r(a)}return!0}}jc("row",{useDeprecatedLogic:!0}),jc("column",{useDeprecatedLogic:!0});var iQ=jc("cell",{useDeprecatedLogic:!0});function sQ(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let r=t.index(-1)-1,i=t.before();r>=0;r--){const s=t.node(-1).child(r),a=s.lastChild;if(a)return i-1-a.nodeSize;i-=s.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let r=t.indexAfter(-1),i=t.after();r<n.childCount;r++){const s=n.child(r);if(s.childCount)return i+1;i+=s.nodeSize}}return null}function ME(t){return function(e,n){if(!_o(e))return!1;const r=sQ(Sh(e),t);if(r==null)return!1;if(n){const i=e.doc.resolve(r);n(e.tr.setSelection(De.between(i,VZ(i))).scrollIntoView())}return!0}}function aQ(t,e){const n=t.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function _h(t,e){const n=t.selection;if(!(n instanceof jt))return!1;if(e){const r=t.tr,i=Gn(t.schema).cell.createAndFill().content;n.forEachCell((s,a)=>{s.content.eq(i)||r.replace(r.mapping.map(a+1),r.mapping.map(a+s.nodeSize-1),new Se(i,0,0))}),r.docChanged&&e(r)}return!0}function lQ(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:r}=t;for(;e.childCount==1&&(n>0&&r>0||e.child(0).type.spec.tableRole=="table");)n--,r--,e=e.child(0).content;const i=e.child(0),s=i.type.spec.tableRole,a=i.type.schema,l=[];if(s=="row")for(let u=0;u<e.childCount;u++){let c=e.child(u).content;const f=u?0:Math.max(0,n-1),p=u<e.childCount-1?0:Math.max(0,r-1);(f||p)&&(c=Iv(Gn(a).row,new Se(c,f,p)).content),l.push(c)}else if(s=="cell"||s=="header_cell")l.push(n||r?Iv(Gn(a).row,new Se(e,n,r)).content:e);else return null;return uQ(a,l)}function uQ(t,e){const n=[];for(let i=0;i<e.length;i++){const s=e[i];for(let a=s.childCount-1;a>=0;a--){const{rowspan:l,colspan:u}=s.child(a).attrs;for(let c=i;c<i+l;c++)n[c]=(n[c]||0)+u}}let r=0;for(let i=0;i<n.length;i++)r=Math.max(r,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(be.empty),n[i]<r){const s=Gn(t).cell.createAndFill(),a=[];for(let l=n[i];l<r;l++)a.push(s);e[i]=e[i].append(be.from(a))}return{height:e.length,width:r,rows:e}}function Iv(t,e){const n=t.createAndFill();return new Km(n).replace(0,n.content.size,e).doc}function cQ({width:t,height:e,rows:n},r,i){if(t!=r){const s=[],a=[];for(let l=0;l<n.length;l++){const u=n[l],c=[];for(let f=s[l]||0,p=0;f<r;p++){let m=u.child(p%u.childCount);f+m.attrs.colspan>r&&(m=m.type.createChecked(Ia(m.attrs,m.attrs.colspan,f+m.attrs.colspan-r),m.content)),c.push(m),f+=m.attrs.colspan;for(let g=1;g<m.attrs.rowspan;g++)s[l+g]=(s[l+g]||0)+m.attrs.colspan}a.push(be.from(c))}n=a,t=r}if(e!=i){const s=[];for(let a=0,l=0;a<i;a++,l++){const u=[],c=n[l%e];for(let f=0;f<c.childCount;f++){let p=c.child(f);a+p.attrs.rowspan>i&&(p=p.type.create({...p.attrs,rowspan:Math.max(1,i-p.attrs.rowspan)},p.content)),u.push(p)}s.push(be.from(u))}n=s,e=i}return{width:t,height:e,rows:n}}function dQ(t,e,n,r,i,s,a){const l=t.doc.type.schema,u=Gn(l);let c,f;if(i>e.width)for(let p=0,m=0;p<e.height;p++){const g=n.child(p);m+=g.nodeSize;const b=[];let v;g.lastChild==null||g.lastChild.type==u.cell?v=c||(c=u.cell.createAndFill()):v=f||(f=u.header_cell.createAndFill());for(let y=e.width;y<i;y++)b.push(v);t.insert(t.mapping.slice(a).map(m-1+r),b)}if(s>e.height){const p=[];for(let b=0,v=(e.height-1)*e.width;b<Math.max(e.width,i);b++){const y=b>=e.width?!1:n.nodeAt(e.map[v+b]).type==u.header_cell;p.push(y?f||(f=u.header_cell.createAndFill()):c||(c=u.cell.createAndFill()))}const m=u.row.create(null,be.from(p)),g=[];for(let b=e.height;b<s;b++)g.push(m);t.insert(t.mapping.slice(a).map(r+n.nodeSize-2),g)}return!!(c||f)}function OE(t,e,n,r,i,s,a,l){if(a==0||a==e.height)return!1;let u=!1;for(let c=i;c<s;c++){const f=a*e.width+c,p=e.map[f];if(e.map[f-e.width]==p){u=!0;const m=n.nodeAt(p),{top:g,left:b}=e.findCell(p);t.setNodeMarkup(t.mapping.slice(l).map(p+r),null,{...m.attrs,rowspan:a-g}),t.insert(t.mapping.slice(l).map(e.positionAt(a,b,n)),m.type.createAndFill({...m.attrs,rowspan:g+m.attrs.rowspan-a})),c+=m.attrs.colspan-1}}return u}function BE(t,e,n,r,i,s,a,l){if(a==0||a==e.width)return!1;let u=!1;for(let c=i;c<s;c++){const f=c*e.width+a,p=e.map[f];if(e.map[f-1]==p){u=!0;const m=n.nodeAt(p),g=e.colCount(p),b=t.mapping.slice(l).map(p+r);t.setNodeMarkup(b,null,Ia(m.attrs,a-g,m.attrs.colspan-(a-g))),t.insert(b+m.nodeSize,m.type.createAndFill(Ia(m.attrs,0,a-g))),c+=m.attrs.rowspan-1}}return u}function IE(t,e,n,r,i){let s=n?t.doc.nodeAt(n-1):t.doc;if(!s)throw new Error("No table found");let a=un.get(s);const{top:l,left:u}=r,c=u+i.width,f=l+i.height,p=t.tr;let m=0;function g(){if(s=n?p.doc.nodeAt(n-1):p.doc,!s)throw new Error("No table found");a=un.get(s),m=p.mapping.maps.length}dQ(p,a,s,n,c,f,m)&&g(),OE(p,a,s,n,u,c,l,m)&&g(),OE(p,a,s,n,u,c,f,m)&&g(),BE(p,a,s,n,l,f,u,m)&&g(),BE(p,a,s,n,l,f,c,m)&&g();for(let b=l;b<f;b++){const v=a.positionAt(b,u,s),y=a.positionAt(b,c,s);p.replace(p.mapping.slice(m).map(v+n),p.mapping.slice(m).map(y+n),new Se(i.rows[b-l],0,0))}g(),p.setSelection(new jt(p.doc.resolve(n+a.positionAt(l,u,s)),p.doc.resolve(n+a.positionAt(f-1,c-1,s)))),e(p)}var fQ=k0({ArrowLeft:Ah("horiz",-1),ArrowRight:Ah("horiz",1),ArrowUp:Ah("vert",-1),ArrowDown:Ah("vert",1),"Shift-ArrowLeft":Mh("horiz",-1),"Shift-ArrowRight":Mh("horiz",1),"Shift-ArrowUp":Mh("vert",-1),"Shift-ArrowDown":Mh("vert",1),Backspace:_h,"Mod-Backspace":_h,Delete:_h,"Mod-Delete":_h});function Th(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Ah(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;if(s instanceof jt)return Th(n,r,We.near(s.$headCell,e));if(t!="horiz"&&!s.empty)return!1;const a=RE(i,t,e);if(a==null)return!1;if(t=="horiz")return Th(n,r,We.near(n.doc.resolve(s.head+e),e));{const l=n.doc.resolve(a),u=yE(l,t,e);let c;return u?c=We.near(u,1):e<0?c=We.near(n.doc.resolve(l.before(-1)),-1):c=We.near(n.doc.resolve(l.after(-1)),1),Th(n,r,c)}}}function Mh(t,e){return(n,r,i)=>{if(!i)return!1;const s=n.selection;let a;if(s instanceof jt)a=s;else{const u=RE(i,t,e);if(u==null)return!1;a=new jt(n.doc.resolve(u))}const l=yE(a.$headCell,t,e);return l?Th(n,r,new jt(a.$anchorCell,l)):!1}}function pQ(t,e){const n=t.state.doc,r=Kl(n.resolve(e));return r?(t.dispatch(t.state.tr.setSelection(new jt(r))),!0):!1}function hQ(t,e,n){if(!_o(t.state))return!1;let r=lQ(n);const i=t.state.selection;if(i instanceof jt){r||(r={width:1,height:1,rows:[be.from(Iv(Gn(t.state.schema).cell,n))]});const s=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),l=un.get(s).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=cQ(r,l.right-l.left,l.bottom-l.top),IE(t.state,t.dispatch,a,l,r),!0}else if(r){const s=Sh(t.state),a=s.start(-1);return IE(t.state,t.dispatch,a,un.get(s.node(-1)).findCell(s.pos-a),r),!0}else return!1}function mQ(t,e){var n;if(e.ctrlKey||e.metaKey)return;const r=LE(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof jt)s(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&r&&(i=Kl(t.state.selection.$anchor))!=null&&((n=Rv(t,e))==null?void 0:n.pos)!=i.pos)s(i,e),e.preventDefault();else if(!r)return;function s(u,c){let f=Rv(t,c);const p=Ms.getState(t.state)==null;if(!f||!Bv(u,f))if(p)f=u;else return;const m=new jt(u,f);if(p||!t.state.selection.eq(m)){const g=t.state.tr.setSelection(m);p&&g.setMeta(Ms,u.pos),t.dispatch(g)}}function a(){t.root.removeEventListener("mouseup",a),t.root.removeEventListener("dragstart",a),t.root.removeEventListener("mousemove",l),Ms.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(Ms,-1))}function l(u){const c=u,f=Ms.getState(t.state);let p;if(f!=null)p=t.state.doc.resolve(f);else if(LE(t,c.target)!=r&&(p=Rv(t,e),!p))return a();p&&s(p,c)}t.root.addEventListener("mouseup",a),t.root.addEventListener("dragstart",a),t.root.addEventListener("mousemove",l)}function RE(t,e,n){if(!(t.state.selection instanceof De))return null;const{$head:r}=t.state.selection;for(let i=r.depth-1;i>=0;i--){const s=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:s.childCount))return null;if(s.type.spec.tableRole=="cell"||s.type.spec.tableRole=="header_cell"){const l=r.before(i),u=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(u)?l:null}}return null}function LE(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Rv(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?Kl(t.state.doc.resolve(n.pos)):null}var gQ=class{constructor(e,n){this.node=e,this.defaultCellMinWidth=n,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",`${n}px`),this.colgroup=this.table.appendChild(document.createElement("colgroup")),Lv(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!=this.node.type?!1:(this.node=e,Lv(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type=="attributes"&&(e.target==this.table||this.colgroup.contains(e.target))}};function Lv(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f){for(let p=0,m=0;p<f.childCount;p++){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v++,m++){const y=i==m?s:b&&b[v],x=y?y+"px":"";if(l+=y||r,y||(u=!1),c)c.style.width!=x&&(c.style.width=x),c=c.nextSibling;else{const k=document.createElement("col");k.style.width=x,e.appendChild(k)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)==null||a.removeChild(c),c=p}u?(n.style.width=l+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=l+"px")}}var Br=new kt("tableColumnResizing");function bQ({handleWidth:t=5,cellMinWidth:e=25,defaultCellMinWidth:n=100,View:r=gQ,lastColumnResizable:i=!0}={}){const s=new ot({key:Br,state:{init(a,l){var u,c;const f=(c=(u=s.spec)==null?void 0:u.props)==null?void 0:c.nodeViews,p=Gn(l.schema).table.name;return r&&f&&(f[p]=(m,g)=>new r(m,n,g)),new vQ(-1,!1)},apply(a,l){return l.apply(a)}},props:{attributes:a=>{const l=Br.getState(a);return l&&l.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(a,l)=>{yQ(a,l,t,i)},mouseleave:a=>{wQ(a)},mousedown:(a,l)=>{xQ(a,l,e,n)}},decorations:a=>{const l=Br.getState(a);if(l&&l.activeHandle>-1)return _Q(a,l.activeHandle)},nodeViews:{}}});return s}var vQ=class Mm{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,r=e.getMeta(Br);if(r&&r.setHandle!=null)return new Mm(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new Mm(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return Ov(e.doc.resolve(i))||(i=-1),new Mm(i,n.dragging)}return n}};function yQ(t,e,n,r){if(!t.editable)return;const i=Br.getState(t.state);if(i&&!i.dragging){const s=kQ(e.target);let a=-1;if(s){const{left:l,right:u}=s.getBoundingClientRect();e.clientX-l<=n?a=DE(t,e,"left",n):u-e.clientX<=n&&(a=DE(t,e,"right",n))}if(a!=i.activeHandle){if(!r&&a!==-1){const l=t.state.doc.resolve(a),u=l.node(-1),c=un.get(u),f=l.start(-1);if(c.colCount(l.pos-f)+l.nodeAfter.attrs.colspan-1==c.width-1)return}VE(t,a)}}}function wQ(t){if(!t.editable)return;const e=Br.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&VE(t,-1)}function xQ(t,e,n,r){var i;if(!t.editable)return!1;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,a=Br.getState(t.state);if(!a||a.activeHandle==-1||a.dragging)return!1;const l=t.state.doc.nodeAt(a.activeHandle),u=CQ(t,a.activeHandle,l.attrs);t.dispatch(t.state.tr.setMeta(Br,{setDragging:{startX:e.clientX,startWidth:u}}));function c(p){s.removeEventListener("mouseup",c),s.removeEventListener("mousemove",f);const m=Br.getState(t.state);m!=null&&m.dragging&&(EQ(t,m.activeHandle,PE(m.dragging,p,n)),t.dispatch(t.state.tr.setMeta(Br,{setDragging:null})))}function f(p){if(!p.which)return c(p);const m=Br.getState(t.state);if(m&&m.dragging){const g=PE(m.dragging,p,n);FE(t,m.activeHandle,g,r)}}return FE(t,a.activeHandle,u,r),s.addEventListener("mouseup",c),s.addEventListener("mousemove",f),e.preventDefault(),!0}function CQ(t,e,{colspan:n,colwidth:r}){const i=r&&r[r.length-1];if(i)return i;const s=t.domAtPos(e);let l=s.node.childNodes[s.offset].offsetWidth,u=n;if(r)for(let c=0;c<n;c++)r[c]&&(l-=r[c],u--);return l/u}function kQ(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function DE(t,e,n,r){const i=n=="right"?-r:r,s=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!s)return-1;const{pos:a}=s,l=Kl(t.state.doc.resolve(a));if(!l)return-1;if(n=="right")return l.pos;const u=un.get(l.node(-1)),c=l.start(-1),f=u.map.indexOf(l.pos-c);return f%u.width==0?-1:c+u.map[f-1]}function PE(t,e,n){const r=e.clientX-t.startX;return Math.max(n,t.startWidth+r)}function VE(t,e){t.dispatch(t.state.tr.setMeta(Br,{setHandle:e}))}function EQ(t,e,n){const r=t.state.doc.resolve(e),i=r.node(-1),s=un.get(i),a=r.start(-1),l=s.colCount(r.pos-a)+r.nodeAfter.attrs.colspan-1,u=t.state.tr;for(let c=0;c<s.height;c++){const f=c*s.width+l;if(c&&s.map[f]==s.map[f-s.width])continue;const p=s.map[f],m=i.nodeAt(p).attrs,g=m.colspan==1?0:l-s.colCount(p);if(m.colwidth&&m.colwidth[g]==n)continue;const b=m.colwidth?m.colwidth.slice():SQ(m.colspan);b[g]=n,u.setNodeMarkup(a+p,null,{...m,colwidth:b})}u.docChanged&&t.dispatch(u)}function FE(t,e,n,r){const i=t.state.doc.resolve(e),s=i.node(-1),a=i.start(-1),l=un.get(s).colCount(i.pos-a)+i.nodeAfter.attrs.colspan-1;let u=t.domAtPos(i.start(-1)).node;for(;u&&u.nodeName!="TABLE";)u=u.parentNode;u&&Lv(s,u.firstChild,u,r,l,n)}function SQ(t){return Array(t).fill(0)}function _Q(t,e){var n;const r=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return ut.empty;const a=un.get(s),l=i.start(-1),u=a.colCount(i.pos-l)+i.nodeAfter.attrs.colspan-1;for(let c=0;c<a.height;c++){const f=u+c*a.width;if((u==a.width-1||a.map[f]!=a.map[f+1])&&(c==0||a.map[f]!=a.map[f-a.width])){const p=a.map[f],m=l+p+s.nodeAt(p).nodeSize-1,g=document.createElement("div");g.className="column-resize-handle",(n=Br.getState(t))!=null&&n.dragging&&r.push(Gt.node(l+p,l+p+s.nodeAt(p).nodeSize,{class:"column-resize-dragging"})),r.push(Gt.widget(m,g))}}return ut.create(t.doc,r)}function TQ({allowTableNodeSelection:t=!1}={}){return new ot({key:Ms,state:{init(){return null},apply(e,n){const r=e.getMeta(Ms);if(r!=null)return r==-1?null:r;if(n==null||!e.docChanged)return n;const{deleted:i,pos:s}=e.mapping.mapResult(n);return i?null:s}},props:{decorations:HZ,handleDOMEvents:{mousedown:mQ},createSelectionBetween(e){return Ms.getState(e.state)!=null?e.state.selection:null},handleTripleClick:pQ,handleKeyDown:fQ,handlePaste:hQ},appendTransaction(e,n,r){return WZ(r,CE(r,n),t)}})}const AQ=(t,e,n)=>{if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r||n===r.attrs.backgroundColor)return t;const i={...r.attrs,backgroundColor:n};return t.setNodeMarkup(e,r.type,i,r.marks)},MQ=(t,e,n)=>{const{doc:r,selection:i}=t;return!r||!i||!(i instanceof jt)||i.forEachCell((s,a)=>{t=AQ(t,a,n)}),t},$E=(t,e)=>({tr:n,state:r,dispatch:i})=>{const{selection:s}=r;return n=n.setSelection(s),n=MQ(n,e,t),n.docChanged?(i==null||i(n),!0):!1},OQ=tt.create({name:"tableCellBackground",addOptions(){return{types:["tableCell"],HTMLAttributes:{}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{backgroundColor:{parseHTML:t=>t.style.backgroundColor||"",renderHTML:t=>!t.backgroundColor||t.backgroundColor===""?{}:{style:`background-color: ${t.backgroundColor}`}}}}]},addCommands(){return{setTableCellBackground:t=>$E(t,this.options),unsetTableCellBackground:()=>$E("",this.options)}}}),BQ=Dt.create({name:"tableHeader",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"header_cell",isolating:!0,parseHTML(){return[{tag:"th"}]},renderHTML({HTMLAttributes:t}){return["th",yt(this.options.HTMLAttributes,t),0]}}),IQ=Dt.create({name:"tableRow",addOptions(){return{HTMLAttributes:{}}},content:"(tableCell | tableHeader)*",tableRole:"row",parseHTML(){return[{tag:"tr"}]},renderHTML({HTMLAttributes:t}){return["tr",yt(this.options.HTMLAttributes,t),0]}}),RQ=Dt.create({name:"tableCell",addOptions(){return{HTMLAttributes:{}}},content:"block+",addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:t=>{const e=t.getAttribute("colwidth");return e?e.split(",").map(r=>parseInt(r,10)):null}}}},tableRole:"cell",isolating:!0,parseHTML(){return[{tag:"td"}]},renderHTML({HTMLAttributes:t}){return["td",yt(this.options.HTMLAttributes,t),0]}});function Dv(t,e){return e?["width",`${Math.max(e,t)}px`]:["min-width",`${t}px`]}function HE(t,e,n,r,i,s){var a;let l=0,u=!0,c=e.firstChild;const f=t.firstChild;if(f!==null)for(let p=0,m=0;p<f.childCount;p+=1){const{colspan:g,colwidth:b}=f.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=i===m?s:b&&b[v],x=y?`${y}px`:"";if(l+=y||r,y||(u=!1),c){if(c.style.width!==x){const[k,E]=Dv(r,y);c.style.setProperty(k,E)}c=c.nextSibling}else{const k=document.createElement("col"),[E,C]=Dv(r,y);k.style.setProperty(E,C),e.appendChild(k)}}}for(;c;){const p=c.nextSibling;(a=c.parentNode)===null||a===void 0||a.removeChild(c),c=p}u?(n.style.width=`${l}px`,n.style.minWidth=""):(n.style.width="",n.style.minWidth=`${l}px`)}class LQ{constructor(e,n){this.node=e,this.cellMinWidth=n,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")),HE(e,this.colgroup,this.table,n),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(e){return e.type!==this.node.type?!1:(this.node=e,HE(e,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(e){return e.type==="attributes"&&(e.target===this.table||this.colgroup.contains(e.target))}}function DQ(t,e,n,r){let i=0,s=!0;const a=[],l=t.firstChild;if(!l)return{};for(let p=0,m=0;p<l.childCount;p+=1){const{colspan:g,colwidth:b}=l.child(p).attrs;for(let v=0;v<g;v+=1,m+=1){const y=n===m?r:b&&b[v];i+=y||e,y||(s=!1);const[x,k]=Dv(e,y);a.push(["col",{style:`${x}: ${k}`}])}}const u=s?`${i}px`:"",c=s?"":`${i}px`;return{colgroup:["colgroup",{},...a],tableWidth:u,tableMinWidth:c}}function zE(t,e){return t.createAndFill()}function PQ(t){if(t.cached.tableNodeTypes)return t.cached.tableNodeTypes;const e={};return Object.keys(t.nodes).forEach(n=>{const r=t.nodes[n];r.spec.tableRole&&(e[r.spec.tableRole]=r)}),t.cached.tableNodeTypes=e,e}function VQ(t,e,n,r,i){const s=PQ(t),a=[],l=[];for(let c=0;c<n;c+=1){const f=zE(s.cell);if(f&&l.push(f),r){const p=zE(s.header_cell);p&&a.push(p)}}const u=[];for(let c=0;c<e;c+=1)u.push(s.row.createChecked(null,r&&c===0?a:l));return s.table.createChecked(null,u)}function FQ(t){return t instanceof jt}const Oh=({editor:t})=>{const{selection:e}=t.state;if(!FQ(e))return!1;let n=0;const r=n4(e.ranges[0].$from,s=>s.type.name==="table");return r==null||r.node.descendants(s=>{if(s.type.name==="table")return!1;["tableCell","tableHeader"].includes(s.type.name)&&(n+=1)}),n===e.ranges.length?(t.commands.deleteTable(),!0):!1},$Q=Dt.create({name:"table",addOptions(){return{HTMLAttributes:{},resizable:!1,handleWidth:5,cellMinWidth:25,View:LQ,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:"tableRow+",tableRole:"table",isolating:!0,group:"block",parseHTML(){return[{tag:"table"}]},renderHTML({node:t,HTMLAttributes:e}){const{colgroup:n,tableWidth:r,tableMinWidth:i}=DQ(t,this.options.cellMinWidth);return["table",yt(this.options.HTMLAttributes,e,{style:r?`width: ${r}`:`min-width: ${i}`}),n,["tbody",0]]},addCommands(){return{insertTable:({rows:t=3,cols:e=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:s})=>{const a=VQ(s.schema,t,e,n);if(i){const l=r.selection.from+1;r.replaceSelectionWith(a).scrollIntoView().setSelection(De.near(r.doc.resolve(l)))}return!0},addColumnBefore:()=>({state:t,dispatch:e})=>KZ(t,e),addColumnAfter:()=>({state:t,dispatch:e})=>GZ(t,e),deleteColumn:()=>({state:t,dispatch:e})=>YZ(t,e),addRowBefore:()=>({state:t,dispatch:e})=>ZZ(t,e),addRowAfter:()=>({state:t,dispatch:e})=>QZ(t,e),deleteRow:()=>({state:t,dispatch:e})=>eQ(t,e),deleteTable:()=>({state:t,dispatch:e})=>aQ(t,e),mergeCells:()=>({state:t,dispatch:e})=>_E(t,e),splitCell:()=>({state:t,dispatch:e})=>TE(t,e),toggleHeaderColumn:()=>({state:t,dispatch:e})=>jc("column")(t,e),toggleHeaderRow:()=>({state:t,dispatch:e})=>jc("row")(t,e),toggleHeaderCell:()=>({state:t,dispatch:e})=>iQ(t,e),mergeOrSplit:()=>({state:t,dispatch:e})=>_E(t,e)?!0:TE(t,e),setCellAttribute:(t,e)=>({state:n,dispatch:r})=>rQ(t,e)(n,r),goToNextCell:()=>({state:t,dispatch:e})=>ME(1)(t,e),goToPreviousCell:()=>({state:t,dispatch:e})=>ME(-1)(t,e),fixTables:()=>({state:t,dispatch:e})=>(e&&CE(t),!0),setCellSelection:t=>({tr:e,dispatch:n})=>{if(n){const r=jt.create(e.doc,t.anchorCell,t.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:Oh,"Mod-Backspace":Oh,Delete:Oh,"Mod-Delete":Oh}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[bQ({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:this.options.View,lastColumnResizable:this.options.lastColumnResizable})]:[],TQ({allowTableNodeSelection:this.options.allowTableNodeSelection})]},extendNodeSchema(t){const e={name:t.name,options:t.options,storage:t.storage};return{tableRole:pt($e(t,"tableRole",e))}}}),HQ=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,zQ=/CrOS/,UQ=/android|ipad|playbook|silk/i;function UE(t={}){let e=t.ua||typeof navigator<"u"&&navigator.userAgent;return e&&typeof e=="object"&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string"?!1:!!(HQ.test(e)&&!zQ.test(e)||t.tablet&&UQ.test(e)||t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.includes("Macintosh")&&e.includes("Safari"))}const WQ=["disabled"],jQ={"content-class":"table-grid-size-editor","content-style":"padding:0"},qQ={class:"flex flex-col flex-wrap gap-1 justify-between"},KQ=["onMouseover","onMousedown"],GQ={class:"text-center text-sm text-zinc-600 mt-2"},XQ=o.defineComponent({__name:"CreateTablePopover",props:{disabled:{type:Boolean,default:!1}},emits:["create-table"],setup(t,{emit:e}){const n=e,r=o.ref(!1),i=o.ref(!0),s=o.reactive({rows:UE()?sf:of,cols:UE()?sf:of}),a=o.reactive({rows:af,cols:af});function l(g,b){g===s.rows&&(s.rows=Math.min(g+1,sf)),b===s.cols&&(s.cols=Math.min(b+1,sf)),a.rows=g,a.cols=b}function u(g,b){n("create-table",{rows:g,cols:b,withHeaderRow:o.unref(i)}),c()}function c(){r.value=!1,i.value=!1,s.rows=of,s.cols=of,a.rows=af,a.cols=af}const f=o.inject("isMobile",!1),{isOpen:p}=yp({scrollEl:"tool-bar-format-scroll",ignoreSelector:"[data-radix-popper-content-wrapper]"}),m=o.computed(()=>f?{modal:!1,open:p.value,"onUpdate:open":g=>p.value=g}:{});return(g,b)=>(o.openBlock(),o.createBlock(o.unref(ms),o.normalizeProps(o.guardReactiveProps(o.unref(m))),{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("button",{disabled:t.disabled,class:"m-0 p-0"},[o.renderSlot(g.$slots,"trigger")],8,WQ)]),_:3}),o.createVNode(o.unref(gs),{class:"w-full",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createElementVNode("div",jQ,[o.createElementVNode("div",qQ,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.rows,v=>(o.openBlock(),o.createElementBlock("div",{key:"r"+v,class:"flex gap-1"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.cols,y=>(o.openBlock(),o.createElementBlock("div",{key:"c"+y,class:o.normalizeClass([[y<=a.cols&&v<=a.rows&&"bg-ed-foreground border-ed-border","cursor-pointer"],"pa-1"]),onMouseover:x=>l(v,y),onMousedown:x=>u(v,y)},b[0]||(b[0]=[o.createElementVNode("div",{class:"w-4 h-4 p-1 border box-border"},null,-1)]),42,KQ))),128))]))),128))]),o.createElementVNode("div",GQ,o.toDisplayString(a.rows)+" x "+o.toDisplayString(a.cols),1)])]),_:1})]),_:3},16))}}),YQ={style:{display:"flex"}},JQ=o.defineComponent({__name:"TableActionButton",props:{editor:{},icon:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t;function n(r){e.editor.isActive("table")||e.editor.chain().focus().insertTable({...r,withHeaderRow:!1}).run()}return(r,i)=>(o.openBlock(),o.createBlock(XQ,{disabled:r.editor.isActive("table"),onCreateTable:n},{trigger:o.withCtx(()=>[o.createElementVNode("div",YQ,[o.createVNode(Ge,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled,color:r.color,action:r.action,"is-active":r.isActive},null,8,["icon","tooltip","disabled","color","action","is-active"])])]),_:1},8,["disabled"]))}}),Pv=$Q.extend({addStorage(){return{isTableMenuOpen:!1}},addCommands(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toggleTableEditor:e=>({editor:n})=>n.storage.table?(n.storage.table.isTableEditorOpen=e,!0):!1}},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),resizable:!0,lastColumnResizable:!0,allowTableNodeSelection:!1,button:({editor:e,t:n})=>({component:JQ,componentProps:{icon:"Table",tooltip:n("editor.table.tooltip"),action:()=>{var i;const r=((i=e.storage.table)==null?void 0:i.isTableEditorOpen)??!1;e.commands.toggleTableEditor(!r)}}})}},addExtensions(){return[IQ.configure(this.options.tableRow),BQ.configure(this.options.tableHeader),RQ.configure(this.options.tableCell),OQ.configure(this.options.tableCellBackground)]}}),ZQ={class:"flex items-center gap-2 px-2"},QQ=o.defineComponent({__name:"TextDropdown",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""}},setup(t){const e=t,{t:n}=At(),r=o.computed(()=>[{name:"paragraph",label:n("editor.paragraph.tooltip"),iconName:"Paragraph",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:n("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:n("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:n("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:n("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:n("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:n("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:n("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()},{name:"codeBlock",label:n("editor.codeblock.tooltip"),isActive:()=>e.editor.isActive("codeBlock"),iconName:"Code2",action:()=>e.editor.chain().focus().clearNodes().toggleCodeBlock().run()}]),i=o.computed(()=>r.value.filter(s=>s.isActive()).pop()??{label:n("editor.modify")});return(s,a)=>{var l;return o.openBlock(),o.createBlock(Ea,{title:(l=i.value)==null?void 0:l.label,"side-offset":5},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(u,c)=>{var f;return o.openBlock(),o.createBlock(o.unref($l),{key:c,class:"cursor-pointer",checked:((f=u.isActive)==null?void 0:f.call(u))||!1,onClick:u.action},{default:o.withCtx(()=>[o.createElementVNode("div",ZQ,[o.createVNode(o.unref(Ot),{name:u.iconName,class:"h3 w-3"},null,8,["name"]),o.createElementVNode("span",null,o.toDisplayString(u.label),1)])]),_:2},1032,["checked","onClick"])}),128))]),_:1},8,["title"])}}}),NQ=tt.create({name:"text-bubble",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:()=>({component:QQ,componentProps:{}})}}}),eN=[{label:"복합 표현 - 요일과 시간대",examples:["다음 월요일 저녁","이번 토요일 오전"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"시각 표현",examples:["오전 10시","오후 3시 30분","정오","자정","새벽 2시"],pattern:"((오전|오후|새벽|밤|저녁)\\s?\\d{1,2}(시(\\s?\\d{1,2}분)?)?|정오|자정)"},{label:"시간 표현 - 이른/늦은",examples:["이른 아침","늦은 밤"],pattern:"(이른\\s아침|늦은\\s밤)"},{label:"연도+월",examples:["2019년 6월","2025년12월","2024년 01월"],pattern:"\\d{4}년\\s?\\d{1,2}월"},{label:"오늘/내일/어제",examples:["오늘","내일","모레","어제","그제","그끄제"],pattern:"(오늘|내일|모레|어제|그제|그끄제)"},{label:"상대적 주 단위",examples:["이번 주","다음 주","지난 주"],pattern:"(이번|다음|지난)\\s?주"},{label:"상대적 월 단위",examples:["이번 달","다음 달","지난 달"],pattern:"(이번|다음|지난)\\s?달"},{label:"상대적 연도",examples:["올해","내년","작년","재작년","내후년"],pattern:"(올해|내년|작년|재작년|내후년)"},{label:"복합 표현 - 날짜와 시간대",examples:["1월 1일 오전","12월25일 저녁","다음 주 금요일 오전"],pattern:"(내년|올해|작년)?\\s?\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일(\\s?(오전|오후|저녁|밤|새벽))?"},{label:"정확한 날짜",examples:["1월1일","1월 1일","12월 25일","01월 01일"],pattern:"\\d{1,2}\\s?월\\s?\\d{1,2}\\s?일"},{label:"요일",examples:["월요일","화요일","이번 금요일","다음 화요일"],pattern:"(이번|다음)?\\s?(월|화|수|목|금|토|일)요일"},{label:"시간대",examples:["오전","오후","저녁","밤","새벽"],pattern:"(오전|오후|저녁|밤|새벽)"},{label:"짧은 시간 표현",examples:["방금","조금 전","금방","곧","잠시 후"],pattern:"(방금|조금\\s전|금방|곧|잠시\\s후)"},{label:"연도",examples:["2015년","2024년","1998년"],pattern:"\\d{4}년"}],tN=t=>{const e=[...t||[],...eN.map(n=>n.pattern)].join("|");return new RegExp(e,"gu")},nN=tt.create({name:ep,addOptions(){return{additionalTimeWords:[],enabled:!0}},addStorage(){return{cachedRegex:null,cachedAdditionalWords:null,enabled:this.options.enabled}},addProseMirrorPlugins(){return[new ot({props:{decorations:t=>{if(!this.storage.enabled)return ut.empty;const e=[];return(this.storage.cachedAdditionalWords!==this.options.additionalTimeWords||!this.storage.cachedRegex)&&(this.storage.cachedAdditionalWords=this.options.additionalTimeWords,this.storage.cachedRegex=tN(this.options.additionalTimeWords)),t.doc.descendants((n,r)=>{if(!n.isText)return;let i;const s=this.storage.cachedRegex;for(;i=s.exec(n.text||"");){const a=r+i.index,l=a+i[0].length;e.push(Gt.inline(a,l,{class:"time-highlight"}))}}),ut.create(t.doc,e)}}})]},addCommands(){return{toggleTimeHighlight:()=>({editor:t})=>{const e=t.storage[ep];return e.enabled=!e.enabled,t.view.dispatch(t.state.tr),!0}}}});function Vv(t){const e=JSON.stringify(t),n=window.ReactNativeWebView;if(n){n.postMessage(e);return}console.warn("[clipboardBridge] no bridge found")}function rN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="CLIPBOARD_STATE"&&t(!!((i=r.data)!=null&&i.hasClipboard))},Vv({type:"REQUEST_CLIPBOARD_STATE"})})}function oN(){return new Promise(t=>{const e=window.receiveDriverData;window.receiveDriverData=n=>{var i;e&&e(n);let r;try{r=typeof n=="string"?JSON.parse(n):n}catch{return}(r==null?void 0:r.type)==="PASTE_RESULT"&&t(((i=r.data)==null?void 0:i.text)??null)},Vv({type:"PASTE"})})}function iN(t,e){Vv({type:"COPY",data:{html:t,text:e}})}async function sN(t,e){try{const n=new ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})});await navigator.clipboard.write([n])}catch(n){console.error("navigator clipboard write failed:",n)}}async function aN(){try{if("read"in navigator.clipboard){const t=await navigator.clipboard.read();for(const e of t){if(e.types.includes("text/html"))return await(await e.getType("text/html")).text();if(e.types.includes("text/plain"))return await(await e.getType("text/plain")).text()}}}catch(t){console.warn("navigator clipboard read failed:",t)}}const lN=tt.create({name:"clipboard",addCommands(){return{copyContent:()=>({editor:t,state:e})=>{const{from:n,to:r}=e.selection;return n===r?!1:((async()=>{try{const i=e.doc.slice(n,r),a=$r.fromSchema(t.schema).serializeFragment(i.content),l=document.createElement("div");l.appendChild(a);const u=l.innerHTML,c=e.doc.textBetween(n,r,`
|
|
344
|
+
`);t.storage.deviceEnv.isMobile?iN(u,c):await sN(u,c)}catch(i){console.warn("[clipboard] copy failed",i)}})(),!0)},cutContent:()=>({editor:t})=>((async()=>{try{await t.commands.copyContent(),t.chain().focus().deleteSelection().run()}catch(e){console.warn("[clipboard] cut failed",e)}})(),!0),pasteContent:()=>({editor:t})=>((async()=>{try{t.chain().focus().run();const e=t.storage.deviceEnv.isMobile?await oN():await aN();if(!e)return;const n=new DataTransfer;if(IJ(e)){n.setData("text/html",e);const i=document.createElement("div");i.innerHTML=e,n.setData("text/plain",i.innerText)}else n.setData("text/plain",e);const r=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0});Object.defineProperty(r,"clipboardData",{value:n}),t.view.dom.dispatchEvent(r)}catch(e){console.warn("Clipboard paste failed:",e)}})(),!0)}},onCreate(){const t=this.editor;t.hasClipboard=async()=>{try{return!!(t.storage.deviceEnv.isMobile?await rN():await navigator.clipboard.readText())}catch(e){return console.warn("[clipboard] check failed",e),!1}}}}),uN=tt.create({name:"deviceEnv",addOptions(){return{initial:!1,specialCharModal:void 0}},addStorage(){return{isMobile:this.options.initial,specialCharModal:this.options.specialCharModal,isForceCloseBubble:!1}},addCommands(){return{setIsMobile:t=>({editor:e})=>{var n;return e.storage.deviceEnv.isMobile=t,(n=e.storage.spellchecker)==null||n.spellchecker.setIsMobile(t),!0},setForceCloseBubble:t=>({editor:e})=>(e.storage.deviceEnv.isForceCloseBubble=t,!0),resetForceCloseBubble:()=>({editor:t})=>(t.storage.deviceEnv.isForceCloseBubble=!1,!0)}}}),Bh=o.defineComponent({__name:"TabsContent",props:{value:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{},class:{}},setup(t){const e=t,n=o.computed(()=>{const{class:r,...i}=e;return i});return(r,i)=>(o.openBlock(),o.createBlock(o.unref(FV),o.mergeProps({class:o.unref(Ee)("mt-2 ring-offset-ed-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2",e.class)},n.value),{default:o.withCtx(()=>[o.renderSlot(r.$slots,"default")]),_:3},16,["class"]))}}),cN={class:"flex items-center w-full p-3 my-3 hover:bg-ed-accent border border-ed-border text-ed-muted-foreground cursor-pointer rounded-sm transition-all"},dN={key:0,class:"flex justify-center items-center gap-3 text-s"},fN={key:1,class:"flex justify-between items-center w-full"},pN={class:"flex justify-center items-center gap-3"},hN={class:"text-sm"},mN={class:"flex items-center gap-2"},gN=o.defineComponent({__name:"VideoUploader",props:{...na},setup(t){const e=t,n=o.inject("isEditable",o.ref(!0)),r=o.ref(""),i=o.ref(!1),s=o.ref(),{t:a}=At();function l(p){var y;i.value=!0;const m=p.target,g=Array.from((m==null?void 0:m.files)||[]),b=(y=e.editor.extensionManager.extensions.find(x=>x.name==="videoUpload"))==null?void 0:y.options;if(!e.editor||e.editor.isDestroyed||g.length===0||typeof(b==null?void 0:b.upload)!="function")return;const v=g[0];b.upload(v).then(x=>{e.editor.chain().setVideo({src:x}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run(),i.value=!1})}function u(){e.editor.chain().setVideo({src:r.value,width:640}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function c(){e.deleteNode()}function f(){var p;(p=s.value)==null||p.click()}return(p,m)=>(o.openBlock(),o.createBlock(o.unref(ta),{as:"div","data-drag-handle":"",class:o.normalizeClass(o.unref(Ee)(!o.unref(n)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{"default-open":o.unref(n)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",cN,[i.value?(o.openBlock(),o.createElementBlock("div",dN,[o.createVNode(o.unref(Ot),{class:"animate-spin w-6 h-6",name:"LoaderCircle"}),o.createElementVNode("span",null,o.toDisplayString(o.unref(a)("editor.video.dialog.uploading"))+"...",1)])):(o.openBlock(),o.createElementBlock("div",fN,[o.createElementVNode("div",pN,[o.createVNode(o.unref(Ot),{name:"Video",class:"w-6 h-6"}),o.createElementVNode("span",hN,o.toDisplayString(o.unref(a)("editor.video.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(c,["stop"])})]))])]),_:1}),o.createVNode(o.unref(gs),{"trap-focus":"",class:"w-full","on-open-auto-focus":g=>g.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link",disabled:i.value},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.link")),1)]),_:1},8,["disabled"])]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{class:"w-full mt-1",size:"sm",disabled:i.value,onClick:f},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.tab.upload")),1)]),_:1},8,["disabled"]),o.createElementVNode("input",{ref_key:"fileInput",ref:s,type:"file",accept:"video/*",hidden:"",onChange:l},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",mN,[o.createVNode(o.unref(bs),{modelValue:r.value,"onUpdate:modelValue":m[0]||(m[0]=g=>r.value=g),type:"url",autofocus:"",required:"",placeholder:o.unref(a)("editor.video.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(bn),{onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(a)("editor.video.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["class"]))}}),WE=Dt.create({name:sc,isolating:!0,defining:!0,group:"block",draggable:!0,selectable:!1,inline:!1,parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addCommands(){return{setVideoUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(gN)},addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("link video not found"),button:({editor:e,t:n})=>{var r,i;return{component:Ge,componentProps:{action:()=>e.commands.setVideoUpload(),isActive:()=>e.isActive("video")||!1,disabled:!((i=(r=e.can()).setVideo)!=null&&i.call(r,{})),icon:"Video",tooltip:n("editor.video.tooltip")}}}}}});function bN(t){return t=t.replace("https://youtu.be/","https://www.youtube.com/watch?v=").replace("watch?v=","embed/"),t=t.replace("https://vimeo.com/","https://player.vimeo.com/video/"),/^https?:\/\/www.bilibili.com\/video\/.*/i.test(t)&&(t=t.replace(/\?.*$/i,"").replace("https://www.bilibili.com/video/","https://player.bilibili.com/player.html?bvid=")),t.includes("drive.google.com")&&(t=t.replace("/view","/preview")),t}function vN(t){return t?t.includes("youtube.com/embed")||t.includes("player.vimeo.com")||t.includes("player.bilibili.com")||t.includes("drive.google.com"):!1}const jE=Dt.create({name:"video",group:"block",atom:!0,draggable:!0,addOptions(){return{divider:!1,spacer:!1,allowFullscreen:!0,upload:void 0,width:lf["size-medium"],controls:!0,autoplay:!1,HTMLAttributes:{class:"iframe-wrapper",style:"display: flex;justify-content: center;"}}},addAttributes(){return{src:{default:null,renderHTML:({src:t})=>({src:t?bN(t):null})},width:{default:this.options.width,renderHTML:({width:t})=>({width:on(t)})},allowfullscreen:{default:this.options.allowFullscreen,parseHTML:()=>this.options.allowFullscreen},controls:{default:this.options.controls}}},parseHTML(){return[{tag:"video"},{tag:"iframe"}]},renderHTML({HTMLAttributes:t}){const{src:e,width:n,controls:r,allowfullscreen:i}=t??{},s=`max-width: ${on(n)};`;return vN(e)?["iframe",{src:e,style:s,...i&&{allowfullscreen:i}}]:["video",{src:e?e.replace(/\\/g,"/"):"",style:s,...r&&{controls:r}}]},addCommands(){return{setVideo:t=>({commands:e})=>e.insertContent({type:this.name,attrs:t}),updateVideo:t=>({commands:e})=>e.updateAttributes(this.name,t)}}}),Gl=new kt("upload-image"),yN=()=>new ot({key:Gl,state:{init(){return ut.empty},apply(t,e){e=e.map(t.mapping,t.doc);const n=t.getMeta(Gl);if(n!=null&&n.add){const r=n.add.map(({id:i,pos:s,src:a})=>{const l=wN(a);return Gt.widget(s,l,{id:i,side:-1})});e=e.add(t.doc,r)}return n!=null&&n.remove&&n.remove.forEach(r=>{e=e.remove(e.find(void 0,void 0,i=>i.id===r))}),e}},props:{decorations(t){return this.getState(t)}}});function wN(t){const e=document.createElement("div"),n=document.createElement("img");return n.setAttribute("class","opacity-50"),n.src=t,n.onload=()=>{e.setAttribute("class","img-placeholder")},e.appendChild(n),e}function xN(t,e){var i;const r=Gl.getState(t).find(void 0,void 0,s=>s.id===e);return r.length?(i=r[0])==null?void 0:i.from:null}const qE=({validateFn:t,onUpload:e})=>async(n,r,i)=>{const s=[];for(const a of n){if(t&&!t(a))continue;const l=Zr(6),u=URL.createObjectURL(a);s.push({file:a,id:l,preview:u})}s.length!==0&&(r.dispatch(r.state.tr.setMeta(Gl,{add:s.map(({id:a,preview:l})=>({id:a,pos:i,src:l}))})),await Promise.all(s.map(async({file:a,id:l,preview:u})=>{var c,f;try{const p=await e(a),m=xN(r.state,l);if(m===null)return;const{schema:g}=r.state,b=typeof p=="object"?u:p,v=(c=g.nodes.image)==null?void 0:c.create({src:b}),y=(f=g.nodes.paragraph)==null?void 0:f.create();if(!v||!y)return;r.dispatch(r.state.tr.replaceWith(m,m,v).insert(m+v.nodeSize,y).setMeta(Gl,{remove:[l]}))}catch{r.dispatch(r.state.tr.setMeta(Gl,{remove:[l]}))}})))},CN=(t,e,n)=>{var i;const r=Array.from(((i=e.clipboardData)==null?void 0:i.files)||[]);if(r.length){e.preventDefault();const s=t.state.selection.from;return n(r,t,s+1),!0}return!1},kN=(t,e,n,r)=>{var s;const i=Array.from(((s=e.dataTransfer)==null?void 0:s.files)||[]);if(!n&&i.length){e.preventDefault();const a=t.posAtCoords({left:e.clientX,top:e.clientY});if(a)return r(i,t,a.pos+1),!0}return!1},EN={class:"flex items-center w-full p-3 my-3 transition-all border rounded-sm cursor-pointer hover:bg-ed-accent border-ed-border text-ed-muted-foreground"},SN={class:"flex items-center justify-between w-full"},_N={class:"flex items-center justify-center gap-3"},TN={class:"text-sm"},AN={class:"flex items-center gap-2"},MN=o.defineComponent({__name:"ImageUploader",props:{...na},setup(t){const e=t,n=o.ref(""),r=o.ref(),{t:i}=At(),s=o.inject("isEditable",o.ref(!0));function a(f){var v,y;const p=(v=f==null?void 0:f.target)==null?void 0:v.files;if(!e.editor||e.editor.isDestroyed||p.length===0)return;const m=Array.from(p),g=(y=e.editor.extensionManager.extensions.find(x=>x.name==="imageUpload"))==null?void 0:y.options;qE({validateFn:x=>!0,onUpload:g.upload})(m,e.editor.view,e.getPos(),e.node.attrs.id)}function l(){e.editor.chain().setImage({src:n.value}).deleteRange({from:e.getPos(),to:e.getPos()}).insertContentAt(e.getPos()+1,{type:"paragraph"}).focus().run()}function u(){e.deleteNode()}function c(){var f;(f=r.value)==null||f.click()}return(f,p)=>(o.openBlock(),o.createBlock(o.unref(ta),{id:f.node.attrs.id,"data-drag-handle":"",class:o.normalizeClass(o.unref(Ee)(!o.unref(s)&&"pointer-events-none"))},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{"default-open":o.unref(s)},{default:o.withCtx(()=>[o.createVNode(o.unref(ga),{"as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",EN,[o.createElementVNode("div",SN,[o.createElementVNode("div",_N,[o.createVNode(o.unref(Ot),{name:"ImageUp",class:"w-6 h-6"}),o.createElementVNode("span",TN,o.toDisplayString(o.unref(i)("editor.image.dialog.title")),1)]),o.createVNode(o.unref(Ot),{name:"Trash2",class:"hover:text-ed-foreground",onClick:o.withModifiers(u,["stop"])})])])]),_:1}),o.createVNode(o.unref(gs),{"trap-focus":"",class:"w-full","on-open-auto-focus":m=>m.preventDefault()},{default:o.withCtx(()=>[o.createVNode(o.unref(rp),{"default-value":"upload",class:"w-[300px] sm:w-[400px]","activation-mode":"manual"},{default:o.withCtx(()=>[o.createVNode(o.unref(op),{class:"grid w-full grid-cols-2"},{default:o.withCtx(()=>[o.createVNode(o.unref(Rl),{value:"upload"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createVNode(o.unref(Rl),{value:"link"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.url")),1)]),_:1})]),_:1}),o.createVNode(o.unref(Bh),{value:"upload"},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{class:"w-full mt-1",size:"sm",onClick:c},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.tab.upload")),1)]),_:1}),o.createElementVNode("input",{ref_key:"fileInput",ref:r,type:"file",accept:"image/*",multiple:"",hidden:"",onChange:a},null,544)]),_:1}),o.createVNode(o.unref(Bh),{value:"link"},{default:o.withCtx(()=>[o.createElementVNode("div",AN,[o.createVNode(o.unref(bs),{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=m=>n.value=m),type:"url",autofocus:"",required:"",placeholder:o.unref(i)("editor.image.dialog.placeholder")},null,8,["modelValue","placeholder"]),o.createVNode(o.unref(bn),{onClick:l},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(i)("editor.image.dialog.button.apply")),1)]),_:1})])]),_:1})]),_:1})]),_:1},8,["on-open-auto-focus"])]),_:1},8,["default-open"])]),_:1},8,["id","class"]))}}),ON=1,BN=1e6,Ai={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let Fv=0;function IN(){return Fv=(Fv+1)%Number.MAX_VALUE,Fv.toString()}const $v=new Map;function KE(t){if($v.has(t))return;const e=setTimeout(()=>{$v.delete(t),qc({type:Ai.REMOVE_TOAST,toastId:t})},BN);$v.set(t,e)}const To=o.ref({toasts:[]});function qc(t){switch(t.type){case Ai.ADD_TOAST:To.value.toasts=[t.toast,...To.value.toasts].slice(0,ON);break;case Ai.UPDATE_TOAST:To.value.toasts=To.value.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e);break;case Ai.DISMISS_TOAST:{const{toastId:e}=t;e?KE(e):To.value.toasts.forEach(n=>{KE(n.id)}),To.value.toasts=To.value.toasts.map(n=>n.id===e||e===void 0?{...n,open:!1}:n);break}case Ai.REMOVE_TOAST:t.toastId===void 0?To.value.toasts=[]:To.value.toasts=To.value.toasts.filter(e=>e.id!==t.toastId);break}}function Hv(){return{toasts:o.computed(()=>To.value.toasts),toast:RN,dismiss:t=>qc({type:Ai.DISMISS_TOAST,toastId:t})}}function RN(t){const e=IN(),n=i=>qc({type:Ai.UPDATE_TOAST,toast:{...i,id:e}}),r=()=>qc({type:Ai.DISMISS_TOAST,toastId:e});return qc({type:Ai.ADD_TOAST,toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}const LN={acceptMimes:["image/jpeg","image/gif","image/png","image/jpg"],maxSize:1024*1024*5},DN=t=>`${(t/1024/1024).toFixed(2)}MB`,GE=Dt.create({name:wi,isolating:!0,defining:!0,group:"block",draggable:!1,selectable:!1,inline:!1,onCreate(){if(typeof this.options.upload!="function")throw new Error("Image upload function should be a function")},parseHTML(){return[{tag:`div[data-type="${this.name}"]`}]},renderHTML(){return["div",{"data-type":this.name}]},addAttributes(){return{id:{default:Zr(6),parseHTML:t=>t.getAttribute("id"),renderHTML:t=>t.id?{id:t.id}:{}}}},addCommands(){return{setImageUpload:()=>({commands:t})=>t.insertContent(`<div data-type="${this.name}"></div>`)}},addNodeView(){return ra(MN)},addOptions(){var t;return{...LN,...(t=this.parent)==null?void 0:t.call(this),upload:()=>Promise.reject("Image Upload Function"),button:({editor:e,extension:n,t:r})=>{var i,s;return{component:Ge,componentProps:{action:()=>e.commands.setImageUpload(),disabled:!((s=(i=e.can()).setImage)!=null&&s.call(i,{})),icon:"ImageUp",tooltip:r("editor.image.tooltip")}}}}},addProseMirrorPlugins(){const{toast:t}=Hv(),{t:e}=At(),r=qE({validateFn:i=>this.options.acceptMimes.includes(i.type)?i.size>this.options.maxSize?(t({description:`${e("editor.imageUpload.fileSizeTooBig")} ${DN(this.options.maxSize)}.`,duration:2e3}),!1):!0:(t({description:e("editor.imageUpload.fileTypeNotSupported"),duration:2e3}),!1),onUpload:this.options.upload});return[new ot({props:{handlePaste:(i,s)=>!s.clipboardData||Array.from(s.clipboardData.items||[]).some(l=>l.type==="text/html")?!1:CN(i,s,r),handleDrop:(i,s,a,l)=>!(s instanceof DragEvent)||!s.dataTransfer||!Array.from(s.dataTransfer.files||[]).some(f=>this.options.acceptMimes.includes(f.type))?!1:kN(i,s,l,r)}}),yN()]}}),PN=tt.create({name:"searchHighlight",addGlobalAttributes(){return[{types:["textStyle"],attributes:{searchHighlight:{default:null,parseHTML:t=>{const e=t,n=e.style.color,r=e.style.backgroundColor;return!n||!r?null:{color:n,backgroundColor:r}},renderHTML:t=>{if(!t.searchHighlight)return{};const{color:e,backgroundColor:n}=t.searchHighlight;return{style:`color: ${e}; background-color: ${n}`}}}}}]}}),VN=o.defineComponent({__name:"SpecialCharacterButton",props:{editor:l4},setup(t){const e=t,{t:n}=At(),r=wn(),i=o.computed(()=>{var p;return(p=e.editor)==null?void 0:p.storage.specialCharacter.specialCharModal}),s=o.ref(!1);let a=null;function l(){const p=document.activeElement;if(p instanceof HTMLInputElement){a={type:"input",el:p};return}r.editorFocusedInstance.value&&(a={type:"editor"})}const u=()=>{if(!i.value||!i.value.component){console.error("Please configure specialCharModal!");return}s.value=!s.value};document.addEventListener("focusin",p=>{var b,v;if(!s.value)return;const m=p.target;if(m instanceof HTMLInputElement){a={type:"input",el:m};return}const g=r.editorFocusedInstance.value;(v=(b=g==null?void 0:g.view)==null?void 0:b.dom)!=null&&v.contains(m)&&(a={type:"editor"})});function c(p,m){const g=p.selectionStart??p.value.length,b=p.selectionEnd??p.value.length;p.value=p.value.slice(0,g)+m+p.value.slice(b);const v=g+m.length;p.setSelectionRange(v,v),p.dispatchEvent(new Event("input",{bubbles:!0})),p.focus()}const f=(p,m)=>{if(m){if((a==null?void 0:a.type)==="input"){c(a.el,p);return}if((a==null?void 0:a.type)==="editor"){const g=r.editorFocusedInstance.value;if(!g)return;const{view:b}=g,{from:v}=b.state.selection;g.commands.insertContentAt(v,p),g.commands.focus()}}};return(p,m)=>{const g=va,b=vs,v=ba,y=ya;return o.openBlock(),o.createBlock(y,null,{default:o.withCtx(()=>[o.createVNode(v,{"delay-duration":0},{default:o.withCtx(()=>[o.createVNode(g,null,{default:o.withCtx(()=>[o.createVNode(bn,{class:"text-[#65558F] hover:bg-[#ECE6F0]/90 text-xs rounded-none font-normal h-[26px] px-3 border border-gray-300 bg-ed-gray-50 dark:bg-black dark:text-white dark:hover:bg-gray-700 transition-all",onPointerdown:l,onClick:u},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),o.createVNode(b,null,{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.insert.symbol")),1)]),_:1})]),_:1}),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[o.unref(s)?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(i).component),o.mergeProps({key:0},o.unref(i).props,{"custom-class":"!z-[70] !pointer-events-auto",onClose:m[0]||(m[0]=x=>s.value=!1),onSelectedChar:f}),null,16)):o.createCommentVNode("",!0)]))]),_:1})}}}),FN=tt.create({name:tp,addOptions(){return{button:({editor:t})=>({component:VN,componentProps:{editor:t}}),specialCharModal:void 0}},addStorage(){return{specialCharModal:this.options.specialCharModal}}}),XE=tt.create({name:"base-kit",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),timeHighlighter:{additionalTimeWords:[]},bubble:{list:ZI,defaultBubbleList:RG,button:({editor:e,extension:n,t:r})=>{var l;const{list:i={},defaultBubbleList:s}=((l=n.options)==null?void 0:l.bubble)??{},a=(s==null?void 0:s(e))??[];return LG(i,a,{editor:e,extension:n,t:r})}}}},addExtensions(){var n,r,i;const{t}=At(),e=[];this.options.placeholder!==!1&&e.push(Y5.configure({placeholder:({node:s,pos:a})=>{var u;const l=(u=s==null?void 0:s.type)==null?void 0:u.name;return l==="heading"?`${t(`editor.heading.h${s.attrs.level}.tooltip`)}`:l==="table"||l==="codeBlock"?"":a===0?t("editor.content"):""},...this.options.placeholder})),this.options.focus!==!1&&e.push(xG.configure({className:"focus",...this.options.focus})),this.options.document!==!1&&(this.options.page?(e.push(Q5.configure().extend({content:"page+"})),e.push(lZ.configure({types:((r=(n=this.options.page)==null?void 0:n.nodesComputedOption)==null?void 0:r.types)??[],slots:o.useSlots()}))):e.push(Q5.configure())),this.options.dropcursor!==!1&&e.push(wG.configure({...this.options.dropcursor,width:2,class:"ProseMirror-dropcursor border-black"})),this.options.characterCount!==!1&&e.push(bG.configure(this.options.characterCount)),this.options.paragraph!==!1&&e.push(X5.configure(this.options.paragraph)),this.options.hardBreak!==!1&&e.push(G5.configure(this.options.hardBreak)),this.options.listItem!==!1&&e.push(OG.configure(this.options.listItem)),this.options.textStyle!==!1&&e.push(BG.configure(this.options.textStyle)),this.options.imageUpload!==!1&&e.push(GE.configure(this.options.imageUpload)),this.options.video!==!1&&e.push(jE.configure(this.options.video)),this.options.videoUpload!==!1&&e.push(WE.configure(this.options.videoUpload)),this.options.history!==!1&&e.push(zb.configure(this.options.history)),this.options.fontFamily!==!1&&e.push(pE.configure(this.options.fontFamily)),this.options.fontSize!==!1&&e.push(m5.configure(this.options.fontSize)),this.options.fontWeight!==!1&&e.push(fZ.configure(this.options.fontWeight)),this.options.mode!==Me.EDITOR&&e.push(FN.configure(this.options.specialCharacter)),this.options.mode!==Me.EDITOR&&e.push(gZ),this.options.superText!==!1&&this.options.mode!==Me.PLAIN_TEXT&&this.options.mode!==Me.EDITOR&&(typeof this.options.superText=="boolean"?e.push(iE.configure()):e.push(iE.configure(this.options.superText))),this.options.mode===Me.EDITOR&&(this.options.image!==!1&&e.push(qu.configure()),e.push(p5.configure({spacer:!0}),V8,P8,F8,Fb,Pv,$8,g5.configure({spacer:!0}),h5.configure({types:["heading","paragraph","tableCell","tableHeader"],spacer:!0}),gE)),this.options.mode!==Me.EDITOR&&this.options.configPlan!==!1&&this.options.mode!==Me.PLAIN_TEXT&&(typeof this.options.configPlan=="boolean"?e.push(vE.configure()):e.push(vE.configure({specialCharModal:(i=this.options.configPlan)==null?void 0:i.specialCharModal}))),this.options.mode!==Me.EDITOR&&this.options.mode!==Me.PLAIN_TEXT&&e.push(vZ),(this.options.mode===Me.STRAIGHT||this.options.mode===Me.REPORT||this.options.mode===Me.EDITOR)&&this.options.timeHighlighter&&e.push(nN.configure(this.options.timeHighlighter)),this.options.invalidCharFocus!==!1&&e.push(uE.configure(this.options.invalidCharFocus)),this.options.disabled&&e.push(PN),e.push(N5,J5.configure(),NQ.configure(),MG.configure(),Tv,Sv,hb,lN,uN.configure(this.options.deviceEnv),b5.configure({multicolor:!0}));for(const s in this.options.excludes)Object.prototype.hasOwnProperty.call(this.options.excludes,s)&&this.options.excludes[s]&&Et.remove(e,({name:l})=>l===s);return e},addStorage(){return{mode:this.options.mode}}}),YE=Un.create({name:"subscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sub"},{style:"vertical-align",getAttrs(t){return t!=="sub"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sub",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSubscript:()=>({commands:t})=>t.setMark(this.name),toggleSubscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSubscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-,":()=>this.editor.commands.toggleSubscript()}}}),JE=Un.create({name:"superscript",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs(t){return t!=="super"?!1:null}}]},renderHTML({HTMLAttributes:t}){return["sup",yt(this.options.HTMLAttributes,t),0]},addCommands(){return{setSuperscript:()=>({commands:t})=>t.setMark(this.name),toggleSuperscript:()=>({commands:t})=>t.toggleMark(this.name),unsetSuperscript:()=>({commands:t})=>t.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),$N=tt.create({name:"subAndSuperScript",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({editor:e,extension:n,t:r})=>{const i=n.options.subscript,s=n.options.superscript,a={component:Ge,componentProps:{action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",tooltip:r("editor.subscript.tooltip")}},l={component:Ge,componentProps:{action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",tooltip:r("editor.superscript.tooltip")}},u=[];return i!==!1&&u.push(a),s!==!1&&u.push(l),u}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(YE.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(JE.configure(this.options.superscript)),t}}),HN={class:"ml-1"},zN=o.defineComponent({__name:"ActionMoreButton",props:{editor:{},disabled:{type:Boolean,default:!1},color:{default:void 0},maxHeight:{default:void 0},icon:{default:void 0},tooltip:{default:""},items:{default:()=>[]}},setup(t){const e=t,n=o.computed(()=>{const r=e.items.find(s=>s.isActive());return r&&!r.default?{...r,icon:r.icon?r.icon:e.icon}:{title:e.tooltip,icon:e.icon,isActive:()=>!1}});return(r,i)=>(o.openBlock(),o.createBlock(Ea,{icon:r.icon,tooltip:r.tooltip,disabled:r.disabled},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.items,(s,a)=>(o.openBlock(),o.createBlock(o.unref($l),{key:a,checked:n.value.title===s.title,disabled:s.disabled,class:"flex gap-3 items-center",onClick:s.action},{default:o.withCtx(()=>[s.icon?(o.openBlock(),o.createBlock(o.unref(Ot),{key:0,name:s.icon},null,8,["name"])):o.createCommentVNode("",!0),o.createElementVNode("span",HN,o.toDisplayString(s.title),1),s.shortcutKeys?(o.openBlock(),o.createBlock(o.unref(f5),{key:1,class:"ml-auto"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(KC)(s.shortcutKeys)),1)]),_:2},1024)):o.createCommentVNode("",!0)]),_:2},1032,["checked","disabled","onClick"]))),128))]),_:1},8,["icon","tooltip","disabled"]))}}),UN=tt.create({name:"moreMark",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,extension:n,t:r}){const i=n.options.subscript,s=n.options.superscript,a={action:()=>e.commands.toggleSubscript(),isActive:()=>e.isActive("subscript")||!1,disabled:!e.can().toggleSubscript(),icon:"Subscript",title:r("editor.subscript.tooltip"),shortcutKeys:["mod","."]},l={action:()=>e.commands.toggleSuperscript(),isActive:()=>e.isActive("superscript")||!1,disabled:!e.can().toggleSuperscript(),icon:"Superscript",title:r("editor.superscript.tooltip"),shortcutKeys:["mod",","]},u=p1(e,"code"),c=[];if(i!==!1&&c.push(a),s!==!1&&c.push(l),u){const f={action:()=>e.commands.toggleCode(),isActive:()=>e.isActive("code")||!1,disabled:!e.can().toggleCode(),icon:"Code",title:r("editor.code.tooltip"),shortcutKeys:["mod","E"]};u&&c.push(f)}return{component:zN,componentProps:{icon:"Type",tooltip:r("editor.moremark"),disabled:!e.isEditable||c.every(f=>f.disabled),items:c}}}}},addExtensions(){const t=[];return this.options.subscript!==!1&&t.push(YE.configure(this.options.subscript)),this.options.superscript!==!1&&t.push(JE.configure(this.options.superscript)),t}});var Ra=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(Ra||{});function WN(t,e,n){return t<e?e:t>n?n:t}function jN(t,e,n,r){const{doc:i,selection:s}=t;if(!i||!s||!(s instanceof De||s instanceof $n))return t;const{from:a,to:l}=s;return i.nodesBetween(a,l,(u,c)=>{const f=u.type;return n.includes(f.name)?(t=qN(t,c,e),!1):!$0(u.type.name,r.extensionManager.extensions)}),t}function qN(t,e,n){if(!t.doc)return t;const r=t.doc.nodeAt(e);if(!r)return t;const a=WN((r.attrs.indent||0)+n,0,7);if(a===r.attrs.indent)return t;const l={...r.attrs,indent:a};return t.setNodeMarkup(e,r.type,l,r.marks)}function ZE({delta:t,types:e}){return({state:n,dispatch:r,editor:i})=>{const{selection:s}=n;let{tr:a}=n;return a=a.setSelection(s),a=jN(a,t,e,i),a.docChanged?(r&&r(a),!0):!1}}const KN=tt.create({name:"indent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:Ra.min,maxIndent:Ra.max,button({editor:e,t:n}){var s,a;const{selection:r}=e.state,i=r.$anchor.parent;return[{component:Ge,componentProps:{action:()=>{e.commands.indent()},disabled:((s=i==null?void 0:i.attrs)==null?void 0:s.indent)>=Ra.max||!e.can().indent(),shortcutKeys:["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")}},{component:Ge,componentProps:{action:()=>{e.commands.outdent()},shortcutKeys:["Shift","Tab"],disabled:((a=i==null?void 0:i.attrs)==null?void 0:a.indent)<=Ra.min||!e.can().outdent(),icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}]}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.getAttribute("data-indent");return(e?parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>ZE({delta:Ra.more,types:this.options.types}),outdent:()=>ZE({delta:Ra.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});function GN(t){var e;const{char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:l}=t,u=r&&!i,c=aB(n),f=new RegExp(`\\s${c}$`),p=a?"^":"",m=i?"":c,g=u?new RegExp(`${p}${c}.*?(?=\\s${m}|$)`,"gm"):new RegExp(`${p}(?:^)?${c}[^\\s${m}]*`,"gm"),b=((e=l.nodeBefore)===null||e===void 0?void 0:e.isText)&&l.nodeBefore.text;if(!b)return null;const v=l.pos-b.length,y=Array.from(b.matchAll(g)).pop();if(!y||y.input===void 0||y.index===void 0)return null;const x=y.input.slice(Math.max(0,y.index-1),y.index),k=new RegExp(`^[${s==null?void 0:s.join("")}\0]?$`).test(x);if(s!==null&&!k)return null;const E=v+y.index;let C=E+y[0].length;return u&&f.test(b.slice(C-1,C+1))&&(y[0]+=" ",C+=1),E<l.pos&&C>=l.pos?{range:{from:E,to:C},query:y[0].slice(n.length),text:y[0]}:null}const XN=new kt("suggestion");function YN({pluginKey:t=XN,editor:e,char:n="@",allowSpaces:r=!1,allowToIncludeChar:i=!1,allowedPrefixes:s=[" "],startOfLine:a=!1,decorationTag:l="span",decorationClass:u="suggestion",command:c=()=>null,items:f=()=>[],render:p=()=>({}),allow:m=()=>!0,findSuggestionMatch:g=GN}){let b;const v=p==null?void 0:p(),y=new ot({key:t,view(){return{update:async(x,k)=>{var E,C,_,T,A,V,O;const B=(E=this.key)===null||E===void 0?void 0:E.getState(k),$=(C=this.key)===null||C===void 0?void 0:C.getState(x.state),H=B.active&&$.active&&B.range.from!==$.range.from,X=!B.active&&$.active,ee=B.active&&!$.active,z=!X&&!ee&&B.query!==$.query,L=X||H&&z,D=z||H,F=ee||H&&z;if(!L&&!D&&!F)return;const R=F&&!L?B:$,K=x.dom.querySelector(`[data-decoration-id="${R.decorationId}"]`);b={editor:e,range:R.range,query:R.query,text:R.text,items:[],command:Y=>c({editor:e,range:R.range,props:Y}),decorationNode:K,clientRect:K?()=>{var Y;const{decorationId:ie}=(Y=this.key)===null||Y===void 0?void 0:Y.getState(e.state),fe=x.dom.querySelector(`[data-decoration-id="${ie}"]`);return(fe==null?void 0:fe.getBoundingClientRect())||null}:null},L&&((_=v==null?void 0:v.onBeforeStart)===null||_===void 0||_.call(v,b)),D&&((T=v==null?void 0:v.onBeforeUpdate)===null||T===void 0||T.call(v,b)),(D||L)&&(b.items=await f({editor:e,query:R.query})),F&&((A=v==null?void 0:v.onExit)===null||A===void 0||A.call(v,b)),D&&((V=v==null?void 0:v.onUpdate)===null||V===void 0||V.call(v,b)),L&&((O=v==null?void 0:v.onStart)===null||O===void 0||O.call(v,b))},destroy:()=>{var x;b&&((x=v==null?void 0:v.onExit)===null||x===void 0||x.call(v,b))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(x,k,E,C){const{isEditable:_}=e,{composing:T}=e.view,{selection:A}=x,{empty:V,from:O}=A,B={...k};if(B.composing=T,_&&(V||e.view.composing)){(O<k.range.from||O>k.range.to)&&!T&&!k.composing&&(B.active=!1);const $=g({char:n,allowSpaces:r,allowToIncludeChar:i,allowedPrefixes:s,startOfLine:a,$position:A.$from}),H=`id_${Math.floor(Math.random()*4294967295)}`;$&&m({editor:e,state:C,range:$.range,isActive:k.active})?(B.active=!0,B.decorationId=k.decorationId?k.decorationId:H,B.range=$.range,B.query=$.query,B.text=$.text):B.active=!1}else B.active=!1;return B.active||(B.decorationId=null,B.range={from:0,to:0},B.query=null,B.text=null),B}},props:{handleKeyDown(x,k){var E;const{active:C,range:_}=y.getState(x.state);return C&&((E=v==null?void 0:v.onKeyDown)===null||E===void 0?void 0:E.call(v,{view:x,event:k,range:_}))||!1},decorations(x){const{active:k,range:E,decorationId:C}=y.getState(x);return k?ut.create(x.doc,[Gt.inline(E.from,E.to,{nodeName:l,class:u,"data-decoration-id":C})]):null}}});return y}const JN=[{label:"优酷",value:"youku",icon:"Youku"},{label:"哔哩哔哩",value:"bilibili",icon:"BiliBili"},{label:"腾讯视频",value:"qqvideo",icon:"QQVideo"}],ZN=[{label:"高德地图",value:"amap",icon:"Gaode"},{label:"百度地图",value:"baidu_map",icon:"Baidu"}],QN=[{label:"墨刀",value:"modao",icon:"Modao"},{label:"蓝湖",value:"lanhu",icon:"Lanhu"},{label:"Figma",value:"figma",icon:"Figma"},{label:"Canva",value:"canva",icon:"Canva"},{label:"ProcessOn",value:"processon",icon:"Processon"}],NN=[{label:"CodePen",value:"codepen",icon:"Codepen"}],eee=[{label:"金数据",value:"jinshuju",icon:"Jinshuju"}],tee=[],nee=[...JN,...ZN,...QN,...NN,...eee,...tee];function ree(t){const{t:e}=At(),n=[{name:"format",title:e("editor.slash.format"),commands:[{name:"paragraph",label:e("editor.paragraph.tooltip"),aliases:["paragraph","zw"],iconName:"Paragraph",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading1",label:e("editor.heading.h1.tooltip"),aliases:["h1","bt","bt1"],iconName:"Heading1",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHeading({level:1}).run()}},{name:"heading2",label:e("editor.heading.h2.tooltip"),aliases:["h2","bt","bt2"],iconName:"Heading2",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:2}).run()}},{name:"heading3",label:e("editor.heading.h3.tooltip"),aliases:["h3","bt","bt3","heading3"],iconName:"Heading3",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setNode("heading",{level:3}).run()}},{name:"bulletList",label:e("editor.bulletlist.tooltip"),aliases:["ul","yxlb","bulletList"],iconName:"List",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleBulletList().run()}},{name:"numberedList",label:e("editor.orderedlist.tooltip"),aliases:["ol","yxlb"],iconName:"ListOrdered",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleOrderedList().run()}},{name:"codeBlock",label:e("editor.codeblock.tooltip"),iconName:"Code2",aliases:["codeBlock"],description:"Code block with syntax highlighting",shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setCodeBlock().run()}},{name:"blockquote",label:e("editor.blockquote.tooltip"),description:"插入引入格式",aliases:["yr"],iconName:"TextQuote",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setBlockquote().run()}},{name:"horizontalrule",label:e("editor.horizontalrule.tooltip"),aliases:["fgx","horizontalRule"],iconName:"Minus",action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setHorizontalRule().run()}},{name:"link",label:e("editor.link.tooltip"),aliases:["link","lianjie","lj"],iconName:"Link",action:({editor:i,range:s})=>{i.chain().deleteRange(s).extendMarkRange("link").insertContent({type:"text",text:"link",marks:[{type:"link",attrs:{href:"",target:"_blank"}}]}).setLink({href:""}).focus().run()}}]},{name:"insert",title:e("editor.slash.insert"),commands:[{name:"image",label:e("editor.image.tooltip"),iconName:"ImageUp",description:"Insert a image",aliases:["image","tp","tupian"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setImageUpload().run()}},{name:"table",label:e("editor.table.tooltip"),iconName:"Table",description:"Insert a table",aliases:["table","bg","biaoge","biao"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).insertTable({rows:3,cols:3,withHeaderRow:!1}).run()}},{name:"video",label:e("editor.video.tooltip"),iconName:"Video",description:"Insert a video",aliases:["video","sp","shipin"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).setVideoUpload().run()}},{name:"taskList",label:e("editor.tasklist.tooltip"),iconName:"ListTodo",description:"Task list with todo items",aliases:["todo"],action:({editor:i,range:s})=>{i.chain().focus().deleteRange(s).toggleTaskList().run()}},{name:"columns",label:e("editor.columns.tooltip"),iconName:"Columns2",description:"Add two column content",aliases:["columns","cols","2cols"],shouldBeHidden:i=>i.isActive("columns"),action:({editor:i,range:s})=>{i.chain().deleteRange(s).setColumns().focus(i.state.selection.head-1).run()}}]}];if(p1(t,"iframes")){const i=nee;n.push({name:"others",title:e("editor.slash.embed"),commands:i.map(s=>({name:s.value,label:s.label,iconName:s.icon,aliases:[s.value,s.label],shouldBeHidden:a=>a.isActive("columns"),action:({editor:a,range:l})=>{a.chain().deleteRange(l).focus().setIframe({src:"",service:s.value}).run()}}))})}return n}const oee={key:0,class:"grid grid-cols-1 gap-0.5 min-w-48"},iee={className:"text-neutral-500 text-[0.65rem] col-[1/-1] mx-2 mt-2 font-semibold tracking-wider select-none uppercase first:mt-0.5"},see=["onClick"],aee=["src"],lee={key:1,class:"p-3"},uee={class:"text-xs text-gray-800 dark:text-gray-400"},cee=o.defineComponent({__name:"CommandsList",props:{editor:{},items:{default:void 0},command:{type:Function,default:void 0}},setup(t,{expose:e}){const n=o.ref(0),r=o.ref(0),i=o.ref(null),{t:s}=At(),a=o.ref([]),l=t;e({onKeyDown:u}),o.watch([()=>n.value,()=>r.value],async()=>{if(!i.value)return;await o.nextTick();const v=r.value*1e3+n.value,y=a.value[v];y&&y.scrollIntoView({behavior:"smooth",block:"nearest"})});function u({event:v}){return v.key==="ArrowUp"?(c(),!0):v.key==="ArrowDown"?(f(),!0):v.key==="Enter"?(p(),!0):!1}function c(){var x;if(!l.items.length)return!1;let v=n.value-1,y=r.value;v<0&&(y=r.value-1,v=((x=l.items[y])==null?void 0:x.commands.length)-1||0),y<0&&(y=l.items.length-1,v=l.items[y].commands.length-1),n.value=v,r.value=y}function f(){if(!l.items.length)return!1;const v=l.items[r.value].commands;let y=n.value+1,x=r.value;v.length-1<y&&(y=0,x=r.value+1),l.items.length-1<x&&(x=0),n.value=y,r.value=x}function p(){if(!l.items.length||r.value===-1||n.value===-1)return!1;m(r.value,n.value)}function m(v,y){const x=l.items[v].commands[y];l.command(x)}function g(v,y){m(v,y)}function b(v,y,x){a.value[v*1e3+y]=x}return(v,y)=>{var x;return o.openBlock(),o.createElementBlock("div",{ref_key:"scrollContainer",ref:i,class:"bg-white rounded-lg dark:bg-black shadow-sm border border-neutral-200 dark:border-neutral-800 text-black max-h-[min(80vh,24rem)] overflow-auto flex-wrap mb-8 p-1"},[(x=v.items)!=null&&x.length?(o.openBlock(),o.createElementBlock("div",oee,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(v.items,(k,E)=>(o.openBlock(),o.createElementBlock(o.Fragment,{key:k.title},[o.createElementVNode("div",iee,o.toDisplayString(k.title),1),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(k.commands,(C,_)=>(o.openBlock(),o.createElementBlock("button",{ref_for:!0,ref:T=>b(E,_,T),key:_,class:o.normalizeClass(["flex items-center gap-3 px-2 py-1.5 text-sm text-neutral-800 dark:text-neutral-200 text-left w-full rounded-sm outline-none transition-colors",[r.value===E&&n.value===_?"bg-ed-accent text-neutral-800 dark:bg-neutral-900 dark:text-neutral-200":"hover:bg-ed-accent hover:text-neutral-800 dark:hover:bg-neutral-900 dark:hover:text-neutral-200"]]),onClick:T=>g(E,_)},[C.iconUrl?(o.openBlock(),o.createElementBlock("img",{key:0,class:"w-6 h-6",src:C.iconUrl},null,8,aee)):o.createCommentVNode("",!0),C.iconName?(o.openBlock(),o.createBlock(o.unref(Ot),{key:1,name:C.iconName,class:"mr-1 text-lg"},null,8,["name"])):o.createCommentVNode("",!0),o.createTextVNode(" "+o.toDisplayString(C.label),1)],10,see))),128))],64))),128))])):(o.openBlock(),o.createElementBlock("div",lee,[o.createElementVNode("span",uee,o.toDisplayString(o.unref(s)("editor.slash.empty")),1)]))],512)}}}),La="slashCommand";let Ft;const dee=tt.create({name:La,priority:200,onCreate(){Ft=ea("body",{interactive:!0,trigger:"manual",placement:"bottom-start",theme:"slash-command",maxWidth:"16rem",offset:[16,8],popperOptions:{strategy:"fixed",modifiers:[{name:"flip",enabled:!1}]}})},addProseMirrorPlugins(){return[YN({editor:this.editor,char:"/",allowSpaces:!0,startOfLine:!0,pluginKey:new kt(La),allow:({state:t,range:e})=>{var c,f,p;const n=t.doc.resolve(e.from),r=n.depth===1,i=n.parent.type.name==="paragraph",s=((c=n.parent.textContent)==null?void 0:c.charAt(0))==="/",a=this.editor.isActive("column"),l=(p=n.parent.textContent)==null?void 0:p.substring((f=n.parent.textContent)==null?void 0:f.indexOf("/")),u=!(l!=null&&l.endsWith(" "));return(r&&i&&s||a&&i&&s)&&u},command:({editor:t,range:e,props:n})=>{const{view:r}=t;n.action({editor:t,range:e}),r.focus()},items:({query:t})=>ree(this.editor).map(s=>({...s,commands:s.commands.filter(a=>{const l=a.label.toLowerCase().trim(),u=t.toLowerCase().trim();if(a.aliases){const c=a.aliases.map(m=>m.toLowerCase().trim()),f=l.match(u),p=c.some(m=>m.match(u));return f||p}return l.match(u)}).filter(a=>a.shouldBeHidden?!a.shouldBeHidden(this.editor):!0)})).filter(s=>s.commands.length>0).map(s=>({...s,commands:s.commands.map(a=>({...a,isEnabled:!0}))})),render:()=>{let t,e=null;return{onStart:n=>{var s;t=new tx(cee,{props:n,editor:n.editor});const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const a=n.clientRect();if(!a)return n.editor.storage[La].rect;let l=a.y;if(t.element instanceof HTMLElement&&a.top+t.element.offsetHeight+40>window.innerHeight){const u=a.top+t.element.offsetHeight-window.innerHeight+40;l=a.y-u}return new DOMRect(a.x,l,a.width,a.height)};e=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})},(s=r.dom.parentElement)==null||s.addEventListener("scroll",e),t.element&&(Ft==null||Ft[0].setProps({getReferenceClientRect:i,appendTo:()=>document.body,content:t.element})),Ft==null||Ft[0].show()},onUpdate(n){var a;t.updateProps(n);const{view:r}=n.editor,i=()=>{if(!n.clientRect)return n.editor.storage[La].rect;const l=n.clientRect();return l?new DOMRect(l.x,l.y,l.width,l.height):n.editor.storage[La].rect},s=()=>{Ft==null||Ft[0].setProps({getReferenceClientRect:i})};(a=r.dom.parentElement)==null||a.addEventListener("scroll",s),n.editor.storage[La].rect=n.clientRect?i():{width:0,height:0,left:0,top:0,right:0,bottom:0},Ft==null||Ft[0].setProps({getReferenceClientRect:i})},onKeyDown(n){var r;return n.event.key==="Escape"?(Ft==null||Ft[0].hide(),!0):(Ft!=null&&Ft[0].state.isShown||Ft==null||Ft[0].show(),(r=t.ref)==null?void 0:r.onKeyDown(n))},onExit(n){var r;if(Ft==null||Ft[0].hide(),e){const{view:i}=n.editor;(r=i.dom.parentElement)==null||r.removeEventListener("scroll",e)}t.destroy()}}}})]},addStorage(){return{rect:{width:0,height:0,left:0,top:0,right:0,bottom:0}}}}),fee=o.defineComponent({__name:"AIButton",props:{editor:{},icon:{default:void 0},title:{default:void 0},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},shortcutKeys:{default:void 0},customClass:{default:""},loading:{type:Boolean,default:!1},tooltipOptions:{default:void 0},color:{default:void 0},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0}},setup(t){const e=t,n=wn(),{toast:r}=Hv();function i(){var a,l,u;const s=(l=(a=e.editor.extensionManager.extensions.find(c=>c.name==="AI"))==null?void 0:a.options)==null?void 0:l.completions;if(typeof s!="function"){r({title:"AI completions method is not set or is not a valid function",variant:"destructive"});return}if(s.constructor.name!=="AsyncFunction"){r({title:"AI completions method must be an asynchronous function",variant:"destructive"});return}n.state.AIMenu=!0,(u=e.editor)==null||u.commands.focus()}return(s,a)=>(o.openBlock(),o.createBlock(Ge,{action:i,title:"AI",disabled:s.disabled,icon:s.icon,tooltip:s.tooltip},null,8,["disabled","icon","tooltip"]))}}),pee=Dt.create({name:"AI",group:"block",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),toolbar:!1,button:({editor:e,t:n})=>({component:fee,componentProps:{icon:"Sparkles",tooltip:n("editor.AI.ask")}})}}});function hee(t,e){const n=atob(t.split(",")[1]),r=new Array(n.length);for(let s=0;s<n.length;s++)r[s]=n.charCodeAt(s);const i=new Uint8Array(r);return new Blob([i],{type:e})}function mee(t,e){return new File([t],e,{type:t.type})}const gee=tt.create({name:"importWord",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),upload:void 0,convert:void 0,limit:1024*1024*10,button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{action:()=>{var i;return(i=e.commands)==null?void 0:i.toggleImportWord()},disabled:!e.can().setHorizontalRule(),icon:"Word",tooltip:r("editor.importWord.tooltip")}})}},addCommands(){return{toggleImportWord:()=>({chain:t,editor:e})=>{const{toast:n}=Hv(),{t:r}=At();async function i(u){var g;const f=new DOMParser().parseFromString(u,"text/html"),p=f.querySelectorAll("img");if(!p.length)return f.body.innerHTML;if(p1(e,"image")){const b=(g=e.extensionManager.extensions.find(v=>v.name==="importWord"))==null?void 0:g.options;if(b&&typeof b.upload=="function"){const v=[];for(const x of p){const k=x.getAttribute("src"),E=hee(k,"image/jpeg"),C=mee(E,"image.jpeg");v.push(C)}const y=await b.upload(v);for(let x=0;x<p.length;x++){const k=p[x];k.setAttribute("src",y[x].src);const E=k.parentElement;(E==null?void 0:E.tagName)==="P"&&(E.insertAdjacentElement("beforebegin",k),!E.hasChildNodes()&&E.textContent===""&&E.remove())}return f.body.innerHTML}else return console.warn("Image Upload method found, skip image conversion"),f.body.innerHTML}else return console.error("Image extension not found, unable to convert image"),f.body.innerHTML}async function s(u){const c=await i(u);e.chain().setContent(c.toString(),!0).run(),n({title:r("editor.importWord.success")})}const{open:a,onChange:l}=Ne.useFileDialog({accept:".docx",reset:!0,multiple:!1});return a(),l(async u=>{const[c]=Array.from(u??[]);if(c){if(c.size>this.options.limit){n({title:r("editor.importWord.fileTooLarge"),variant:"destructive"});return}if(this.options.convert){const f=await this.options.convert(c);s(f)}else{const f=new FormData,p=JSON.stringify({collaboration_features:{comments:!0,user_id:"e3",track_changes:!0},formatting:{resets:"none",defaults:"inline",styles:"inline",comments:"basic"}});f.append("config",p),f.append("file",c),fetch("https://docx-converter.cke-cs.com/v2/convert/docx-html",{method:"POST",body:f}).then(m=>m.json()).then(async m=>{s(m.html)}).catch(m=>{n({title:r("editor.importWord.error"),variant:"destructive"}),console.error("Error:",m)})}}}),!1}}}}),zv=wn(),bee=tt.create({name:"preview",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Ge,componentProps:{icon:"Eye",action:()=>{zv.togglePreview()},tooltip:e("editor.preview.tooltip"),isActive:()=>zv.state.showPreview}})}},addCommands(){return{togglePreview:()=>()=>(zv.togglePreview(),!0)}}}),QE=wn(),vee=(t,e,n)=>RegExp(e?t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"):t,n?"gu":"gui");function yee(t,e,n,r){const i=[],s=[];let a=[],l=0;if(!e)return{decorationsToReturn:ut.empty,results:[]};t==null||t.descendants((u,c)=>{u.isText?a[l]?a[l]={text:a[l].text+u.text,pos:a[l].pos}:a[l]={text:`${u.text}`,pos:c}:l+=1}),a=a.filter(Boolean);for(const u of a){const{text:c,pos:f}=u,p=Array.from(c.matchAll(e)).filter(([m])=>m.trim());for(const m of p){if(m[0]==="")break;m.index!==void 0&&s.push({from:f+m.index,to:f+m.index+m[0].length})}}for(let u=0;u<s.length;u+=1){const c=s[u],f=u===r?`${n} ${n}-current`:n,p=Gt.inline(c.from,c.to,{class:f});i.push(p)}return{decorationsToReturn:ut.create(t,i),results:s}}const wee=(t,e,{state:n,dispatch:r})=>{if(!e[0])return;const{from:s,to:a}=e[0];r&&r(n.tr.insertText(t,s,a))},xee=(t,e,n,r)=>{const i=e+1;if(!r[i])return null;const{from:s,to:a}=r[e],l=a-s-t.length+n,{from:u,to:c}=r[i];return r[i]={to:c-l,from:u-l},[l,r]},Cee=(t,e,{tr:n,dispatch:r})=>{let i=0,s=e.slice();if(s.length){for(let a=0;a<s.length;a+=1){const{from:l,to:u}=s[a];n.insertText(t,l,u);const c=xee(t,a,i,s);c&&(i=c[0],s=c[1])}r&&r(n)}},kee=new kt("findAndReplacePlugin"),Eee=tt.create({name:"findAndReplace",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),searchResultClass:"vdc-editor-search-result",disableRegex:!0,button:({editor:e,extension:n,t:r})=>({component:Ge,componentProps:{icon:"DocSearch",tooltip:r("editor.findAndReplace.tooltip"),action:()=>{QE.toggleFindAndReplace()},isActive:()=>QE.state.findAndReplace}})}},addStorage(){return{searchTerm:"",replaceTerm:"",results:[],lastSearchTerm:"",caseSensitive:!1,lastCaseSensitive:!1,resultIndex:0,lastResultIndex:0}},addCommands(){return{setSearchTerm:t=>({editor:e})=>(e.storage.findAndReplace.searchTerm=t,!1),setReplaceTerm:t=>({editor:e})=>(e.storage.findAndReplace.replaceTerm=t,!1),setCaseSensitive:t=>({editor:e})=>(e.storage.findAndReplace.caseSensitive=t,!1),resetIndex:()=>({editor:t})=>(t.storage.findAndReplace.resultIndex=0,!1),nextSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n+1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=0,!1},previousSearchResult:()=>({editor:t})=>{const{results:e,resultIndex:n}=t.storage.findAndReplace,r=n-1;return e[r]?t.storage.findAndReplace.resultIndex=r:t.storage.findAndReplace.resultIndex=e.length-1,!1},replace:()=>({editor:t,state:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return wee(r,i,{state:e,dispatch:n}),!1},replaceAll:()=>({editor:t,tr:e,dispatch:n})=>{const{replaceTerm:r,results:i}=t.storage.findAndReplace;return Cee(r,i,{tr:e,dispatch:n}),!1}}},addProseMirrorPlugins(){const t=this.editor,{searchResultClass:e,disableRegex:n}=this.options,r=a=>t.storage.findAndReplace.lastSearchTerm=a,i=a=>t.storage.findAndReplace.lastCaseSensitive=a,s=a=>t.storage.findAndReplace.lastResultIndex=a;return[new ot({key:kee,state:{init:()=>ut.empty,apply({doc:a,docChanged:l},u){const{searchTerm:c,lastSearchTerm:f,caseSensitive:p,lastCaseSensitive:m,resultIndex:g,lastResultIndex:b}=t.storage.findAndReplace;if(!l&&f===c&&m===p&&b===g)return u;if(r(c),i(p),s(g),!c)return t.storage.findAndReplace.results=[],ut.empty;const{decorationsToReturn:v,results:y}=yee(a,vee(c,n,p),e,g);return t.storage.findAndReplace.results=y,v}},props:{decorations(a){return this.getState(a)}}})]}}),{togglePrinter:See,state:_ee}=wn(),Tee=tt.create({name:"printer",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button:({t:e})=>({component:Ge,componentProps:{tooltip:e("editor.printer.tooltip"),action:()=>See(),icon:"Printer",shortcutKeys:["mod","P"],isActive:()=>_ee.printer}})}}}),Aee=async function(t){let e=[];try{if(this.enabled===!1||t.length===0||t.trim()==="")return e;if(this.limit&&t.length>this.limit)throw new Error("Text is too long");const n=await ln.post(this.getApi(),{value:t}),r=this.transfer(n.data);e=(r==null?void 0:r.map(i=>i.errorText))||[],this!=null&&this.setSuggestions&&this.setSuggestions(r)}catch(n){console.error(n)}return e};class NE{constructor({api:e,limit:n,transfer:r,enabled:i}){$t(this,"suggestions",[]);$t(this,"api","");$t(this,"enabled",!0);$t(this,"limit");$t(this,"transfer");this.suggestions=[],this.api=e,this.limit=n,this.transfer=r,this.enabled=i??!0}setSuggestions(e){this.suggestions=e}getSuggestions(e){var n;return Promise.resolve(((n=this.suggestions.find(r=>r.errorText.wrongWord===e))==null?void 0:n.spellData.correctWord)??[])}getApi(){return this.api}normalizeTextForLanguage(e){return e}proofreadText(e){return Promise.resolve(Aee.call(this,e))}toggleIsEnabled(){this.enabled=!this.enabled}setEnabled(e){this.enabled=e}getIsEnabled(){return this.enabled}}const Mee=Object.freeze(Object.defineProperty({__proto__:null,AI:pee,BaseKit:XE,Blockquote:MK,Bold:P8,BulletList:wK,Clear:hb,Code:Tj,CodeBlock:jq,Color:g5,Columns:Tv,FindAndReplace:Eee,FontFamily:pE,FontSize:m5,FormatPainter:Sv,Fullscreen:gG,Heading:p5,Highlight:mK,History:zb,HorizontalRule:iG,Image:qu,ImageUpload:GE,ImportWord:gee,Indent:KN,Italic:V8,LineHeight:gE,Link:Fb,MoreMark:UN,OrderedList:EK,Preview:bee,Printer:Tee,Proofreader:NE,SlashCommand:dee,SpellcheckerExtension:aE,Strike:$8,SubAndSuperScript:$N,Table:Pv,TaskList:TK,TextAlign:h5,Underline:F8,Video:jE,VideoUpload:WE},Symbol.toStringTag,{value:"Module"})),Oee='<page id="ft6nbbxs" extend="false" pagenumber="1" force="false"><h1 id="tk6n64mj" extend=""false""><strong>Introduction(English)</strong></h1><p id="s864ng1o" extend=""false"">MyMy Editor is open-source document editor based on Vue3 and Tiptap. MyMy Editor provides comprehensive document editing capabilities, supports pagination, supports Markdown syntax, offers basic rich text editing functions, allows for the insertion of various node types in multiple formats, provides a variety of practical tools, and supports setting page styles. It also supports exporting in various formats, printing and print preview, block-level document editing, adding custom extensions, multi-language settings, and a dark theme.</p><h1 id="jm9johtz" extend=""false""><strong>소개(국문)</strong></h1><p id="0qei01hl" extend=""false"">마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.마이마이 에디터는 Vue3과 Tiptap을 기반으로 한 오픈소스 문서 편집기입니다. 마이마이 에디터는 포괄적인 문서 편집 기능을 제공하며, 페이지네이션, 마크다운 구문 지원, 기본적인 리치 텍스트 편집 기능, 다양한 형식의 다양한 노드 유형 삽입, 다양한 실용적인 도구 제공, 페이지 스타일 설정 지원 등을 제공합니다. 또한 다양한 형식으로 내보내기, 인쇄 및 인쇄 미리보기, 블록 수준의 문서 편집, 사용자 지정 확장 추가, 다국어 설정 및 다크 테마를 지원합니다.</p><blockquote class="blockquote"><p id="nekf7yi0" extend="false"><span style="color: rgb(115, 209, 61)"><strong><em>Make by VDC</em></strong></span></p></blockquote></page>';function Bee(){const t=window.localStorage.getItem("content"),e=o.ref(t||Oee),n=o.computed(()=>[XE.configure({placeholder:{showOnlyCurrent:!0},characterCount:{limit:1e5},excludes:{}}),zb,Tv,Sv,hb,Fb,qu,Pv]),r=Ne.useEventBus(mr.RENDER_SUPER_TEXT);function i(s,a){const l={action:"status",payload:{id:s,status:a}};r.emit(l)}return{defaultExtensions:n,content:e,dispatchUpdateStatusSuperText:i}}function Iee(){const t=o.ref(!1);return{hasEverFocused:t,markAsFocused:()=>{t.value=!0},insertHtml:(r,i)=>{const{state:s}=r,{doc:a,selection:l}=s,u=l.$from,c=a.firstChild,f=r.isEmpty;if(!t.value){if(f&&c){r.chain().insertContentAt({from:0,to:c.nodeSize},i).focus().run();return}const m=a.content.size;r.chain().insertContentAt(m,i).focus().run();return}const p=u.parent;if(p.type.name==="paragraph"&&p.textContent.trim().length===0){const m=u.before();r.chain().insertContentAt({from:m,to:m+p.nodeSize},i).focus().run();return}if(u.parentOffset===0&&p.type.name==="paragraph"&&p.content.size>0){const m=u.before();r.chain().insertContentAt(m,i).focus().run();return}r.chain().insertContentAt(r.state.selection,i).focus().run()}}}function Xl(t=250){const e=o.ref(!1);let n=null;const r=()=>{e.value=!0,n&&clearTimeout(n),n=setTimeout(()=>{e.value=!1},t)};return o.onUnmounted(()=>{n&&clearTimeout(n)}),{isScrolling:e,handleScroll:r}}function Ree(){const t=o.ref(!1);let e=!1;function n(){const l=Array.from(document.querySelectorAll(".inside-toolbar")),u=document.querySelector("#tool-bar-format"),c=document.querySelector("#tool-bar-image"),f=Array.from(document.querySelectorAll('[contenteditable="true"].tiptap:not(.simple-editor)'));return{popupInsideToolbars:l,toolBarFormat:u,toolBarImage:c,tiptapEditors:f}}function r(l){if(!l)return!1;const{popupInsideToolbars:u,toolBarFormat:c,toolBarImage:f,tiptapEditors:p}=n();return u.some(m=>m.contains(l))||((c==null?void 0:c.contains(l))??!1)||((f==null?void 0:f.contains(l))??!1)||p.some(m=>m.contains(l))}function i(l){e=r(l.target)}function s(l){const u=l.target;u&&r(u)&&(t.value=!0)}function a(l){const u=l.relatedTarget;r(u)||e&&u===null||(t.value=!1)}return Ne.useEventListener(document,"mousedown",i,{capture:!0}),Ne.useEventListener(document,"touchstart",i,{capture:!0}),Ne.useEventListener(document,"focusin",s),Ne.useEventListener(document,"focusout",a),{isShowToolBarBaseOnEditor:t}}const Lee={class:"flex items-center h-[32px] hover:bg-ed-muted rounded-md"},Dee={class:"text-sm flex items-center justify-center"},Pee={width:"18px",height:"18px",viewBox:"0 0 256 256",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Vee={id:"icon/填充色",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},Fee={id:"icon/背景颜色"},$ee=["fill"],eS=o.defineComponent({__name:"HighlightActionButton",props:{editor:{},tooltip:{default:void 0},disabled:{type:Boolean,default:!1},action:{type:Function,default:void 0},isActive:{type:Function,default:void 0},tooltipOptions:{default:void 0}},setup(t){const e=t,n=o.ref(void 0),{state:r}=wn();function i(a){var l;(l=e.action)==null||l.call(e,a)}function s(a){var l;(l=e.action)==null||l.call(e,n.value)}return o.watchEffect(()=>{const{color:a}=e.editor.getAttributes("highlight");r.highlight=a}),(a,l)=>(o.openBlock(),o.createElementBlock("div",Lee,[o.createVNode(Ge,{id:"highlight",tooltip:a.tooltip,disabled:a.disabled,action:s,"tooltip-options":a.tooltipOptions},{icon:o.withCtx(()=>[o.createElementVNode("span",Dee,[(o.openBlock(),o.createElementBlock("svg",Pee,[o.createElementVNode("g",Vee,[o.createElementVNode("g",Fee,[l[1]||(l[1]=o.createElementVNode("g",{id:"编组",fill:"currentColor"},[o.createElementVNode("g",{id:"矩形",transform:"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)"},[o.createElementVNode("path",{d:"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z","fill-rule":"nonzero"}),o.createElementVNode("path",{d:"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z","fill-rule":"evenodd"}),o.createElementVNode("path",{d:"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z","fill-rule":"nonzero"})])],-1)),o.createElementVNode("path",{id:"矩形",d:"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z",fill:n.value||"#FBDE28"},null,8,$ee)])])]))])]),_:1},8,["tooltip","disabled","tooltip-options"]),o.createVNode(A8,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=u=>n.value=u),highlight:"",disabled:a.disabled,onChange:i},{default:o.withCtx(()=>[o.createVNode(o.unref(bn),{variant:"ghost",size:"icon",class:"w-3 h-[32px] rounded-l-none hover:bg-ed-muted-foreground/20",disabled:a.disabled},{default:o.withCtx(()=>[o.createVNode(o.unref(Ot),{class:"w-3 h-3 text-zinc-500",name:"MenuDown"})]),_:1},8,["disabled"])]),_:1},8,["modelValue","disabled"])]))}}),Hee={class:"h-full w-fit min-w-32 flex items-center leading-none gap-0.5 p-2 bg-ed-background rounded-lg shadow-sm border border-ed-border"},Ih=o.defineComponent({__name:"TableBubbleMenu",props:{editor:{}},setup(t){const e=t,n=()=>document.body,r=({editor:y})=>{var x;return y.isActive("table")&&(((x=y.storage.table)==null?void 0:x.isTableEditorOpen)??!1)},{t:i}=At();function s(){e.editor.chain().focus().addColumnBefore().run()}function a(){e.editor.chain().focus().addColumnAfter().run()}function l(){e.editor.chain().focus().deleteColumn().run()}function u(){e.editor.chain().focus().addRowBefore().run()}function c(){e.editor.chain().focus().addRowAfter().run()}function f(){e.editor.chain().focus().deleteRow().run()}function p(){e.editor.chain().focus().mergeCells().run()}function m(){var y;(y=e.editor)==null||y.chain().focus().splitCell().run()}function g(){e.editor.chain().focus().deleteTable().run()}function b(y){e.editor.chain().focus().setTableCellBackground(y).run()}const v=()=>{const y=document.querySelector(".vdc-editor");if(!y)return new DOMRect(-1e3,-1e3,0,0);const x=y.getBoundingClientRect();return new DOMRect(x.left,x.top+10,x.width,0)};return(y,x)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:y.editor,"plugin-key":"table","update-delay":0,"should-show":r,"tippy-options":{zIndex:9999,maxWidth:"auto",getReferenceClientRect:v,appendTo:n}},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B;return[o.createElementVNode("div",Hee,[o.createVNode(Ge,{icon:"TablerColumnInsertLeft","icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertColumnBefore"),action:s,"tooltip-options":{sideOffset:15},disabled:!((k=y.editor)!=null&&k.can().addColumnBefore())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerColumnInsertRight",tooltip:o.unref(i)("editor.table.menu.insertColumnAfter"),"icon-class":"w-5 h-5",action:a,"tooltip-options":{sideOffset:15},disabled:!((E=y.editor)!=null&&E.can().addColumnAfter())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerColumnRemove",action:l,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteColumn"),"tooltip-options":{sideOffset:15},disabled:!((C=y.editor)!=null&&C.can().deleteColumn())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Ge,{icon:"TablerRowInsertTop",action:u,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowAbove"),"tooltip-options":{sideOffset:15},disabled:!((_=y.editor)!=null&&_.can().addRowBefore())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerRowInsertBottom",action:c,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.insertRowBelow"),"tooltip-options":{sideOffset:15},disabled:!((T=y.editor)!=null&&T.can().addRowAfter())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TablerRowRemove",action:f,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.deleteRow"),"tooltip-options":{sideOffset:15},disabled:!((A=y.editor)!=null&&A.can().deleteRow())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(Ge,{icon:"TableCellsMerge",action:p,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.mergeCells"),"tooltip-options":{sideOffset:15},disabled:!((V=y.editor)!=null&&V.can().mergeCells())},null,8,["tooltip","disabled"]),o.createVNode(Ge,{icon:"TableCellsSplit",action:m,"icon-class":"w-5 h-5",tooltip:o.unref(i)("editor.table.menu.splitCells"),"tooltip-options":{sideOffset:15},disabled:!((O=y.editor)!=null&&O.can().splitCell())},null,8,["tooltip","disabled"]),o.createVNode(o.unref(vo),{orientation:"vertical",class:"mx-1 me-2 h-[16px]"}),o.createVNode(eS,{editor:y.editor,tooltip:o.unref(i)("editor.table.menu.setCellsBgColor"),action:b,"tooltip-options":{sideOffset:15}},null,8,["editor","tooltip"]),o.createVNode(Ge,{icon:"Trash2",tooltip:o.unref(i)("editor.table.menu.deleteTable"),"icon-class":"w-5 h-5",action:g,"tooltip-options":{sideOffset:15},disabled:!((B=y.editor)!=null&&B.can().deleteTable())},null,8,["tooltip","disabled"])])]}),_:1},8,["editor","tippy-options"]))}}),zee={class:"p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},Uee={class:"flex items-center gap-1"},Rh=o.defineComponent({__name:"ColumnsBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=({editor:l})=>F0(l.view.state,"columns"),r=()=>{const l=x8(e.editor,"columns");return(l==null?void 0:l.getBoundingClientRect())||new DOMRect(-1e3,-1e3,0,0)},i=()=>{e.editor.chain().focus().setLayout(Ba.SidebarLeft).run()},s=()=>{e.editor.chain().focus().setLayout(Ba.SidebarRight).run()},a=()=>{e.editor.chain().focus().setLayout(Ba.TwoColumn).run()};return(l,u)=>(o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"plugin-key":"columns","should-show":n,"update-delay":0,"tippy-options":{offset:[0,8],popperOptions:{modifiers:[{name:"flip",enabled:!1}]},getReferenceClientRect:r,plugins:[o.unref(zI)],sticky:"popper"}},{default:o.withCtx(()=>[o.createElementVNode("div",zee,[o.createElementVNode("div",Uee,[o.createVNode(Ge,{id:"panel-left",title:"ok",icon:"PanelLeft",tooltip:"tooltip",action:i,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarLeft}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Ge,{id:"columns",title:"ok",icon:"Columns",tooltip:"tooltip",action:a,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).TwoColumn}),"tooltip-options":{sideOffset:15}},null,8,["is-active"]),o.createVNode(Ge,{id:"panel-right",title:"ok",icon:"PanelRight",tooltip:"tooltip",action:s,"is-active":()=>l.editor.isActive("columns",{layout:o.unref(Ba).SidebarRight}),"tooltip-options":{sideOffset:15}},null,8,["is-active"])])])]),_:1},8,["editor","tippy-options"]))}}),Wee={class:"flex items-center gap-2 p-2 bg-white border rounded-lg shadow-sm dark:bg-black border-neutral-200 dark:border-neutral-800"},jee=["href"],qee={class:"flex flex-nowrap"},Kee=o.defineComponent({__name:"LinkViewBlock",props:{editor:{},link:{default:void 0}},emits:["clear","edit"],setup(t,{emit:e}){const{t:n}=At(),r=e;function i(){r("clear")}function s(){r("edit")}return(a,l)=>(o.openBlock(),o.createElementBlock("div",Wee,[o.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",class:"text-sm underline break-all"},o.toDisplayString(o.unref(Et.truncate)(a.link,{length:50,omission:"…"})),9,jee),a.link?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-4"})):o.createCommentVNode("",!0),o.createElementVNode("div",qee,[o.createVNode(Ge,{icon:"Pencil",tooltip:o.unref(n)("editor.link.edit.tooltip"),action:s,"tooltip-options":{sideOffset:15}},null,8,["tooltip"]),o.createVNode(Ge,{icon:"Unlink",tooltip:o.unref(n)("editor.link.unlink.tooltip"),action:i,"tooltip-options":{sideOffset:15}},null,8,["tooltip"])])]))}}),Lh=o.defineComponent({__name:"LinkBubbleMenu",props:{editor:{},disabled:{type:Boolean,default:!1}},setup(t){const e=t,n=o.ref(!1),r=o.computed(()=>{const{href:l}=e.editor.getAttributes("link");return l}),i=o.computed(()=>e.editor.isActive("link"));function s(l,u,c){e.editor.chain().extendMarkRange("link").insertContent({type:"text",text:u,marks:[{type:"link",attrs:{href:l,target:c?"_blank":""}}]}).setLink({href:l}).focus().run(),n.value=!1}function a(){e.editor.chain().extendMarkRange("link").unsetLink().focus().run(),n.value=!1}return(l,u)=>o.withDirectives((o.openBlock(),o.createBlock(o.unref(Wu),{editor:l.editor,"update-delay":0,"tippy-options":{popperOptions:{modifiers:[{name:"flip",enabled:!0}]},appendTo:"parent",placement:"bottom-start",offset:[-2,16],zIndex:9999,onHidden:()=>{n.value=!1}}},{default:o.withCtx(()=>[o.createVNode(o.unref(ms),{open:n.value,"onUpdate:open":u[1]||(u[1]=c=>n.value=c)},{default:o.withCtx(()=>[o.createVNode(o.unref(DP),null,{default:o.withCtx(()=>[n.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Kee,{key:0,editor:l.editor,link:r.value,onClear:a,onEdit:u[0]||(u[0]=c=>n.value=!0)},null,8,["editor","link"]))]),_:1}),o.createVNode(o.unref(gs),{class:"p-0 border-0 w-fit shadow-none",align:"start",side:"bottom"},{default:o.withCtx(()=>[o.createVNode($5,{class:"p-4",editor:l.editor,onOnSetLink:s},null,8,["editor"])]),_:1})]),_:1},8,["open"])]),_:1},8,["editor","tippy-options"])),[[o.vShow,i.value]])}}),tS=(t,e,n,r,i)=>{const s=o.ref(0),a=Ne.useEventBus(mr.RENDER_SUPER_TEXT),l=_=>{if(!e.value||!t)return;const T=e.value.index,A=e.value.id,{state:V}=t,{tr:O}=V;let B=!1;V.doc.descendants(($,H)=>{var X,ee;if(((X=$.attrs)==null?void 0:X[it.ID])===A){(ee=$.attrs[it.TEXT])!=null&&ee.trim();const z=_.trim();if(kh(z))return O.delete(H,H+1),B=!0,!1;const{[it.ELEMENT_ID]:L,...D}=$.attrs;return O.setNodeMarkup(H,void 0,{...D,[it.TEXT]:z}),B=!0,!1}return!0}),B&&t&&t.view.dispatch(O),T!==-1&&(n.value[T].text=_,n.value[T].textOriginal=_)},u=o.ref(new Map),c=()=>{if(!(t!=null&&t.view.dom))return[];const _=[],T=t==null?void 0:t.view.dom.querySelectorAll("[node-id]"),A=new Map;return u.value.clear(),T.forEach(V=>{const O=V.getBoundingClientRect().top;A.has(O)||A.set(O,V),u.value.set(V.getAttribute("node-id")||"unknown",0)}),_.push(...A.values()),_},f=_=>{const T=_.closest(`#${r}`);if(!T)return;const A=T.getBoundingClientRect().top,V=T==null?void 0:T.scrollTop;return _.getBoundingClientRect().top-(A-V)},p=(_,T)=>{const A=n.value.findIndex(V=>V.id===_);A>-1&&(n.value[A].status=T)},m=_=>_.replace(/<p><\/p>/g,"<p> </p>"),g=()=>{if(!n.value||n.value.length===0){s.value=0,u.value.clear();return}if(!i.value||i.value.length===0)return;const _=i.value,T=new Set(n.value.map(O=>O.id)),A=_.map(O=>({isHidden:O.classList.contains("hidden"),isTruncated:O.classList.contains("super-text-truncate")}));_.forEach(O=>{O.classList.remove("hidden"),O.classList.remove("super-text-truncate")});for(const O of u.value.keys())T.has(O)||u.value.delete(O);_.forEach(O=>{const B=O.getAttribute("book-mark-id");if(!B)return;const $=O.offsetTop+O.offsetHeight,H=u.value.get(B)||0;u.value.set(B,Math.max($,H))}),_.forEach((O,B)=>{A[B].isHidden&&O.classList.add("hidden"),A[B].isTruncated&&O.classList.add("super-text-truncate")});let V=0;for(const O of u.value.values())O>V&&(V=O);s.value=V},b=async()=>{await o.nextTick();const T=c().map(A=>{const V=A.getAttribute("node-id"),O=A.getAttribute("book-mark-content"),B=A.getAttribute("page-id"),$=A.getAttribute("page-number"),H=A.getBoundingClientRect(),X=A.getAttribute("line-id"),ee=A.getAttribute("element-id");return{position:H,text:m(O),id:V,pageId:B,pageNumber:$,visiblePosition:f(A),status:0,lineId:X,elementId:ee,textOriginal:m(O)}});n.value=T},v=(_,T)=>{const A=_.bottom<=T.top,V=_.top>=T.bottom;return!(A||V)};async function y(){const _=i.value;if(!_||_.length===0){g();return}_.sort((T,A)=>{const V=Number(T.getAttribute("index")),O=Number(A.getAttribute("index"));return V-O}),_.forEach(T=>T.classList.remove("super-text-truncate")),_.forEach((T,A)=>{const V=T.getBoundingClientRect();_.slice(A+1).forEach(O=>{const B=O.getBoundingClientRect();v(V,B)&&T.classList.add("super-text-truncate")})}),g()}const x=async _=>{await o.nextTick();const T=t==null?void 0:t.view.dom.querySelector(`[node-id='${_.dataId}']`),A=i.value.find(B=>{const $=B.getBoundingClientRect().top,H=T==null?void 0:T.getBoundingClientRect().top;if(H==null)return!1;const X=H-$;return Math.abs(X-9)<=2});if(!A)return;const V=Number(A.getAttribute("index"));if(!_.text){A.querySelector(".super-text-lines").innerHTML=n.value[V].textOriginal,i.value.forEach(B=>B.classList.remove("hidden")),y();return}A.querySelector(".super-text-lines").innerHTML=m(_.text),A.classList.remove("super-text-truncate");const O=A.getBoundingClientRect();i.value.forEach((B,$)=>{if($!==V){const H=B.getBoundingClientRect();v(O,H)&&B.classList.add("hidden")}}),g()},k=_=>{switch(_.action){case"hover":x(_.payload);break;case"status":p(_.payload.id,_.payload.status);break;case"render":b();break;default:console.log("There is no action")}},E=(_,T)=>{const A=_.currentTarget;A.classList.remove("super-text-truncate");const V=A.getBoundingClientRect();i.value.forEach((O,B)=>{if(B!==T){const $=O.getBoundingClientRect();v(V,$)&&O.classList.add("hidden")}}),g()},C=()=>{i.value.forEach(_=>_.classList.remove("hidden")),y()};return o.onBeforeMount(()=>{a.on(k),window.addEventListener("resize",b)}),o.onBeforeUnmount(()=>{a.off(k),window.removeEventListener("resize",b)}),o.watch(()=>n,async()=>{await o.nextTick(),y()},{deep:!0}),{onUpdate:l,hanldeTruncateSuperTexts:y,eventListener:k,handleMouseOver:E,handleMouseLeave:C,wrapperMinHeight:s}},Gee=["index","book-mark-id","line-id","onMouseover"],Xee=["innerHTML"],Yee=po(o.defineComponent({__name:"SuperTextView",props:{editor:{},superPreviewCustomClass:{},minChars:{},fontSize:{},fixedWidth:{type:Boolean}},setup(t,{expose:e}){const n=t,r=o.ref([]),i=o.ref([]),s=o.ref(!1),a=o.ref(!1),l=o.ref(null),u=o.inject("isMobile",!1),c=o.inject("canEditSuper",o.ref(!0)),{onUpdate:f,handleMouseOver:p,handleMouseLeave:m,wrapperMinHeight:g}=tS(n.editor,l,i,"editor-container",r),b=(E,C)=>{c.value&&(l.value={id:E.id,text:E.text,elementId:E.elementId,index:C},s.value=!0,u&&(a.value=!0))},v=E=>{var C,_;return cd(E?((C=n.superPreviewCustomClass)==null?void 0:C.completedSuper)??"bg-black":((_=n.superPreviewCustomClass)==null?void 0:_.unproducedSuper)??"bg-red-500")},y=o.computed(()=>n.fontSize??""),{contentInner:x,measuredMinWidth:k}=df({minChars:n.minChars,fontSize:y,fixed:n.fixedWidth});return e({measuredMinWidthComment:k}),(E,C)=>{var T;const _=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",ref_key:"contentInner",ref:x,style:o.normalizeStyle({width:`${Number(o.unref(k))+25}px`,minHeight:`${o.unref(g)}px`}),class:o.normalizeClass(o.unref(Ee)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",E.fixedWidth&&"overflow-hidden",((T=E.superPreviewCustomClass)==null?void 0:T.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(A,V)=>{var O,B,$;return o.openBlock(),o.createElementBlock("div",{key:A.id,ref_for:!0,ref_key:"superTextRefs",ref:r,index:V,"book-mark-id":A.id,"line-id":A.lineId,class:o.normalizeClass(o.unref(Ee)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${A.visiblePosition||((O=A.position)==null?void 0:O.top)}px`}),onMouseover:H=>o.unref(p)(H,V),onMouseleave:C[0]||(C[0]=(...H)=>o.unref(m)&&o.unref(m)(...H))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Ee)("w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",E.fixedWidth?"whitespace-nowrap overflow-hidden":"wrap-anywhere whitespace-break-spaces",A.elementId?((B=E.superPreviewCustomClass)==null?void 0:B.completedSuper)??"bg-black":(($=E.superPreviewCustomClass)==null?void 0:$.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(c)})),onDblclick:H=>b(A,V)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:A.text},null,8,Xee),o.createVNode(_,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",v(A.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Gee)}),128)),!o.unref(u)&&l.value?(o.openBlock(),o.createBlock(Wc,{key:0,open:s.value,editor:n.editor,"super-text-init":l.value.text,"super-text-element-id":l.value.elementId,onClose:C[1]||(C[1]=A=>s.value=!1),onSave:o.unref(f)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-19e7be48"]]),Jee=["index","book-mark-id","line-id","onMouseover"],Zee=["innerHTML"],Qee=po(o.defineComponent({__name:"SuperTextViewComment",props:{editor:{},disableSuperInput:{type:Boolean},superPreviewCustomClass:{},fixedWidth:{type:Boolean}},setup(t){const e=t,n=o.ref([]),r=o.ref([]),i=o.ref(!1),s=o.ref(!1),a=o.ref(null),l=o.inject("isMobile",!1),u=o.inject("isEditable",o.ref(!0)),{onUpdate:c,handleMouseOver:f,handleMouseLeave:p,wrapperMinHeight:m}=tS(e.editor,a,r,"editor-container-comment",n),g=(y,x)=>{u.value&&(a.value={id:y.id,text:y.text,elementId:y.elementId,index:x},e.disableSuperInput||(i.value=!0),l&&(s.value=!0))},b=y=>{var x,k;return cd(y?((x=e.superPreviewCustomClass)==null?void 0:x.completedSuper)??"bg-black":((k=e.superPreviewCustomClass)==null?void 0:k.unproducedSuper)??"bg-red-500")},v=o.inject("measuredMinWidthComment",0);return(y,x)=>{var E;const k=Ot;return o.openBlock(),o.createElementBlock("div",{id:"super-text-view-wrapper",style:o.normalizeStyle({width:`${Number(o.unref(v))+25}px`,minHeight:`${o.unref(m)}px`}),class:o.normalizeClass(o.unref(Ee)("relative border border-ed-gray-400 dark:bg-black rounded-[3px] mr-2.5",y.fixedWidth&&"overflow-hidden",((E=y.superPreviewCustomClass)==null?void 0:E.overall)??"bg-ed-gray-50"))},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(C,_)=>{var T,A,V;return o.openBlock(),o.createElementBlock("div",{key:C.id,ref_for:!0,ref_key:"superTextRefs",ref:n,index:_,"book-mark-id":C.id,"line-id":C.lineId,class:o.normalizeClass(o.unref(Ee)("super-text-view","absolute w-full px-2 translate-y-[-10px] group",{})),style:o.normalizeStyle({top:`${C.visiblePosition||((T=C.position)==null?void 0:T.top)}px`}),onMouseover:O=>o.unref(f)(O,_),onMouseleave:x[0]||(x[0]=(...O)=>o.unref(p)&&o.unref(p)(...O))},[o.createVNode(o.unref(uv),{role:"text",variant:"outline",class:o.normalizeClass(o.unref(Ee)("w-full !font-normal px-1 pt-0 m-0 !leading-tight rounded-sm text-white border-transparent cursor-pointer",y.fixedWidth?"whitespace-nowrap overflow-hidden":"wrap-anywhere whitespace-break-spaces",C.elementId?((A=y.superPreviewCustomClass)==null?void 0:A.completedSuper)??"bg-black":((V=y.superPreviewCustomClass)==null?void 0:V.unproducedSuper)??"bg-red-500",{"cursor-default":!o.unref(u)})),onDblclick:O=>g(C,_)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"super-text-lines",innerHTML:C.text},null,8,Zee),o.createVNode(k,{name:"triangle",class:o.normalizeClass(["absolute top-[0.4em] rotate-90 w-3 h-3 right-0",b(C.elementId)])},null,8,["class"])]),_:2},1032,["class","onDblclick"])],46,Jee)}),128)),!o.unref(l)&&a.value&&!y.disableSuperInput?(o.openBlock(),o.createBlock(Wc,{key:0,open:i.value,editor:e.editor,"super-text-init":a.value.text,"super-text-element-id":a.value.elementId,onClose:x[1]||(x[1]=C=>i.value=!1),onSave:o.unref(c)},null,8,["open","editor","super-text-init","super-text-element-id","onSave"])):o.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-1a3ba87c"]]),nS=t=>{console.log(t),t=t.replace(/\s*style="[^"]*"/g,""),t=t.replace(/<iframe\b[\s\S]*?<\/iframe\s*>/gi,"");const e=t.match(/<!--StartFragment-->([\s\S]*?)<!--EndFragment-->/),r=(e?e[1]:t).replace(/<br\s*\/?>/gi,`
|
|
345
|
+
`).split(/\r?\n/),i=[];for(const a of r){const l=a.trim();if(l==="")i.push("<p></p>");else if(/^<br\s*\/?>/i.test(l)){const u=l.replace(/^<br\s*\/?>/i,"").trim();i.push(`<p>${u}</p>`)}else if(/^<\/BR>/i.test(l)){const u=l.replace(/^<\/BR>/i,"").trim();i.push(`<p>${u}</p>`)}else/^<(?!p\b)[^>]+>/i.test(l)?i.push(`<p>${l}</p>`):i.push(l)}let s=i.join("");return s=s.replace(/<p\b[^>]*>/gi,"<p>"),s},Uv=t=>/^https?:\/\/[^\s]+$/i.test(t.trim()),Wv=(t,e)=>{const{tr:n,selection:r,schema:i}=t.state,s=i.marks.link.create({href:e});return r.empty?(t.dispatch(n.insertText(e,r.from).addMark(r.from,r.from+e.length,s)),!0):(t.dispatch(n.addMark(r.from,r.to,s)),!0)},Nee=(t,e)=>{const{tr:n,schema:r}=t.state,i=e.split(/(?:\r\n?|\n)/),s=[];if(i.forEach(u=>{let c={type:"paragraph"};u.length>0&&(c.content=[{type:"text",text:u}]);let f=Fr.fromJSON(r,c);s.push(f)}),s.length===0)return!1;const a=be.fromArray(s),l=Se.maxOpen(a);return t.dispatch(n.replaceSelection(l)),!0},ete=wn(),Dh=t=>{const e=o.computed(()=>ete.state.spellCheck);o.watch(()=>e.value,n=>{t.view.dispatch(t.state.tr.setMeta(Kn.IS_ACTIVE_SPELLCHECK,n)),t.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),WC(t)&&t.commands.focus()},{immediate:!0})},tte={id:"editor-container-comment",class:"flex flex-col"},nte={class:"flex flex-1"},rte={id:"editor-panel",class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},ote=o.defineComponent({__name:"EditorComment",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{default:void 0},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=o.useAttrs(),l=wn(),{isReady:u,editor:c,updateEditorState:f,superTextStore:p,checkSpellStore:m,setEditorContextMenuRef:g,setEditorFocusedInstance:b}=l,v=o.inject("isEditable",o.ref(!0)),y=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled),editorProps:{attributes:{id:dr.COMMENT,[dr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:Et.throttle((T,A)=>A.key==="Enter"&&a.enter&&!A.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:T=>nS(T),handlePaste:(T,A)=>{const V=A.clipboardData;if(!V)return!1;const O=r.mode,B=V.getData("text/plain")||"",$=Array.from(V.items).some(H=>H.type.startsWith("image/"));return(O===Me.STRAIGHT||O===Me.REPORT)&&$?(A.preventDefault(),!0):O===Me.PLAIN_TEXT?(A.preventDefault(),T.dispatch(T.state.tr.insertText(B,T.state.selection.from)),!0):!1},clipboardTextParser:(T,A)=>{const V=T.split(/(?:\r\n?|\n)/),O=[];V.forEach($=>{let H={type:"paragraph"};$.length>0&&(H.content=[{type:"text",text:$}]);let X=Fr.fromJSON(A.doc.type.schema,H);O.push(X)});const B=be.fromArray(O);return Se.maxOpen(B)}},onCreate:({editor:T})=>{f(T)},onUpdate:Et.throttle(({editor:T})=>{u.value=!0;const A=k(T,r.output);i("update:modelValue",A),i("change",{editor:T,output:A}),f(T),x()},Ho),extensions:r.extensions,editable:v.value,onFocus:T=>{g(E.value),b(T.editor)}});async function x(){await o.nextTick(),s.emit({action:"render"})}function k(T,A){if(!T)return"";if(T.isEmpty)return A==="json"?{}:"";switch(A){case"html":return T.getHTML();case"json":return T.getJSON();case"text":return T.getText();default:return""}}o.watch(()=>r.disableSuperInput,()=>{const T=document.getElementById(dr.COMMENT);T==null||T.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.watch(()=>m.languages,()=>{y.commands.checkSpelling()}),o.watch(()=>r.modelValue,T=>{if(!y||Et.isEqual(k(y,r.output),T))return;const{from:A,to:V}=y.state.selection;y.commands.setTextSelection({from:A,to:V}),y.commands.setContent(gn(T,r.disabled),!1),x()},{deep:!0}),o.watch(()=>v.value,T=>{var A;y==null||y.setEditable(T),(A=y==null?void 0:y.commands)!=null&&A.setIsEnableSuggestion&&y.commands.setIsEnableSuggestion(T)},{immediate:!0}),o.watch(()=>c.value,()=>{c.value&&c.value.on("selectionUpdate",({editor:T})=>{i("changed:selection",{editor:T})})}),o.onUnmounted(()=>y==null?void 0:y.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",k(y,"html"))});const E=o.ref(null);function C(T){T===Me.REPORT&&g(E.value)}function _(T){T===Me.REPORT&&b(y)}return o.onMounted(()=>{C(r.mode),_(r.mode)}),o.watch(()=>r.mode,T=>{C(T),_(T)}),o.watch(()=>{var T,A;return(A=(T=r.editorContentInstance)==null?void 0:T.storage[ep])==null?void 0:A.enabled},()=>{y.commands.toggleTimeHighlight()}),Dh(y),e({editor:y}),(T,A)=>(o.openBlock(),o.createElementBlock("div",tte,[o.createElementVNode("div",nte,[o.withDirectives(o.createVNode(Qee,{"disable-super-input":T.disableSuperInput,editor:o.unref(y),"super-preview-custom-class":T.superPreviewCustomClass,"fixed-width":T.fixedSuperPreviewWidth},null,8,["disable-super-input","editor","super-preview-custom-class","fixed-width"]),[[o.vShow,T.isOpenSuperView]]),o.createElementVNode("div",rte,[o.createVNode(Ev,{ref_key:"selectContextMenuRef",ref:E,"disable-super-input":T.disableSuperInput,editor:o.unref(y),mode:T.mode,"super-text-store":o.unref(p)},{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{editor:o.unref(y),spellcheck:"true",class:"h-full break-all"},null,8,["editor"])]),_:1},8,["disable-super-input","editor","mode","super-text-store"])])])]))}});function ite(t,e,n=!1,r=200){const{height:i}=Ne.useElementSize(t),s=o.ref(0),a=o.ref(0),l=o.ref(r),u=o.ref(0),c=async()=>{await o.nextTick();const f=i.value-8;e.value===Me.REPORT?(s.value=f/3,a.value=n?"auto":f-s.value,l.value=r/3*2,u.value=r/3):(s.value=0,a.value=n?"auto":i.value)};return n||o.watch(()=>i.value,c),o.onMounted(()=>{c()}),{commentHeight:s,contentHeight:a,minHeight:l,minHeightComment:u}}var ste={exports:{}};(function(t){(function(){var e=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],n=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ",["ㅗ","ㅏ"],["ㅗ","ㅐ"],["ㅗ","ㅣ"],"ㅛ","ㅜ",["ㅜ","ㅓ"],["ㅜ","ㅔ"],["ㅜ","ㅣ"],"ㅠ","ㅡ",["ㅡ","ㅣ"],"ㅣ"],r=["","ㄱ","ㄲ",["ㄱ","ㅅ"],"ㄴ",["ㄴ","ㅈ"],["ㄴ","ㅎ"],"ㄷ","ㄹ",["ㄹ","ㄱ"],["ㄹ","ㅁ"],["ㄹ","ㅂ"],["ㄹ","ㅅ"],["ㄹ","ㅌ"],["ㄹ","ㅍ"],["ㄹ","ㅎ"],"ㅁ","ㅂ",["ㅂ","ㅅ"],"ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],i=44032,s=["ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄸ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅃ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],a=["ㄱ","ㄲ","ㄴ","ㄷ","ㄸ","ㄹ","ㅁ","ㅂ","ㅃ","ㅅ","ㅆ","ㅇ","ㅈ","ㅉ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],l=["ㅏ","ㅐ","ㅑ","ㅒ","ㅓ","ㅔ","ㅕ","ㅖ","ㅗ","ㅘ","ㅙ","ㅚ","ㅛ","ㅜ","ㅝ","ㅞ","ㅟ","ㅠ","ㅡ","ㅢ","ㅣ"],u=["","ㄱ","ㄲ","ㄳ","ㄴ","ㄵ","ㄶ","ㄷ","ㄹ","ㄺ","ㄻ","ㄼ","ㄽ","ㄾ","ㄿ","ㅀ","ㅁ","ㅂ","ㅄ","ㅅ","ㅆ","ㅇ","ㅈ","ㅊ","ㅋ","ㅌ","ㅍ","ㅎ"],c=[["ㄱ","ㅅ","ㄳ"],["ㄴ","ㅈ","ㄵ"],["ㄴ","ㅎ","ㄶ"],["ㄹ","ㄱ","ㄺ"],["ㄹ","ㅁ","ㄻ"],["ㄹ","ㅂ","ㄼ"],["ㄹ","ㅅ","ㄽ"],["ㄹ","ㅌ","ㄾ"],["ㄹ","ㅍ","ㄿ"],["ㄹ","ㅎ","ㅀ"],["ㅂ","ㅅ","ㅄ"]],f=[["ㅗ","ㅏ","ㅘ"],["ㅗ","ㅐ","ㅙ"],["ㅗ","ㅣ","ㅚ"],["ㅜ","ㅓ","ㅝ"],["ㅜ","ㅔ","ㅞ"],["ㅜ","ㅣ","ㅟ"],["ㅡ","ㅣ","ㅢ"]],p,m,g,b,v,y;function x(R){for(var K=R.length,Y={0:0},ie=0;ie<K;ie++)R[ie]&&(Y[R[ie].charCodeAt(0)]=ie);return Y}p=x(s),m=x(a),g=x(l),b=x(u);function k(R){for(var K=R.length,Y={},ie,fe,ke=0;ke<K;ke++)ie=R[ke][0].charCodeAt(0),fe=R[ke][1].charCodeAt(0),typeof Y[ie]>"u"&&(Y[ie]={}),Y[ie][fe]=R[ke][2].charCodeAt(0);return Y}v=k(c),y=k(f);function E(R){return typeof p[R]<"u"}function C(R){return typeof m[R]<"u"}function _(R){return typeof g[R]<"u"}function T(R){return typeof b[R]<"u"}function A(R){return 44032<=R&&R<=55203}function V(R,K){return y[R]&&y[R][K]?y[R][K]:!1}function O(R,K){return v[R]&&v[R][K]?v[R][K]:!1}var B=function(R,K){if(R===null)throw new Error("Arguments cannot be null");typeof R=="object"&&(R=R.join(""));for(var Y=[],ie=R.length,fe,ke,re,me,J,te=0;te<ie;te++){var ne=[];me=R.charCodeAt(te),A(me)?(me-=i,re=me%28,ke=(me-re)/28%21,fe=parseInt((me-re)/28/21),ne.push(e[fe]),typeof n[ke]=="object"?ne=ne.concat(n[ke]):ne.push(n[ke]),re>0&&(typeof r[re]=="object"?ne=ne.concat(r[re]):ne.push(r[re]))):E(me)?(C(me)?J=e[m[me]]:J=r[b[me]],typeof J=="string"?ne.push(J):ne=ne.concat(J)):_(me)?(J=n[g[me]],typeof J=="string"?ne.push(J):ne=ne.concat(J)):ne.push(R.charAt(te)),K?Y.push(ne):Y=Y.concat(ne)}return Y},$=function(R){return typeof R!="string"?"":(R=B(R),R.join(""))},H=function(R){typeof R=="string"&&(R=B(R));var K=[],Y=R.length,ie,fe=0,ke=-1,re,me=!1;function J(ne){var se,ce,_e,Te=0,Ue,Ke="";if(me=!1,!(ke+1>ne))for(var je=1;;je++){if(je===1){if(se=R[ke+je].charCodeAt(0),_(se))if(ke+je+1<=ne&&_(ce=R[ke+je+1].charCodeAt(0))){K.push(String.fromCharCode(V(se,ce))),ke=ne;return}else{K.push(R[ke+je]),ke=ne;return}else if(!C(se)){K.push(R[ke+je]),ke=ne;return}Ke=R[ke+je]}else if(je===2)if(ce=R[ke+je].charCodeAt(0),C(ce)){se=O(se,ce),Ke=String.fromCharCode(se),K.push(Ke),ke=ne;return}else Ke=String.fromCharCode((m[se]*21+g[ce])*28+i);else je===3?(_e=R[ke+je].charCodeAt(0),V(ce,_e)?ce=V(ce,_e):Te=_e,Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i)):je===4?(Ue=R[ke+je].charCodeAt(0),O(Te,Ue)?Te=O(Te,Ue):Te=Ue,Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i)):je===5&&(Ue=R[ke+je].charCodeAt(0),Te=O(Te,Ue),Ke=String.fromCharCode((m[se]*21+g[ce])*28+b[Te]+i));if(ke+je>=ne){K.push(Ke),ke=ne;return}}}for(var te=0;te<Y;te++){if(ie=R[te].charCodeAt(0),!C(ie)&&!_(ie)&&!T(ie)){J(te-1),J(te),fe=0;continue}fe===0?C(ie)?fe=1:_(ie)&&(fe=4):fe==1?_(ie)?fe=2:O(re,ie)?fe=5:J(te-1):fe==2?T(ie)?fe=3:_(ie)?V(re,ie)||(J(te-1),fe=4):(J(te-1),fe=1):fe==3?T(ie)?!me&&O(re,ie)?me=!0:(J(te-1),fe=1):C(ie)?(J(te-1),fe=1):_(ie)&&(J(te-2),fe=2):fe==4?_(ie)?V(re,ie)?(J(te),fe=0):J(te-1):(J(te-1),fe=1):fe==5&&(_(ie)?(J(te-2),fe=2):(J(te-1),fe=1)),re=ie}return J(te-1),K.join("")},X=function(R,K){var Y=B(R).join(""),ie=B(K).join("");return Y.indexOf(ie)},ee=function(R,K){var Y=B(R).join(""),ie=B(K).join(""),fe=B(R,!0),ke=new RegExp(ie,"gi"),re=[],me;if(!K.length)return[];for(;me=ke.exec(Y);)re.push(me.index);function J(ne){for(var se=0,ce=0;se<fe.length;++se)if(ce+=fe[se].length,ne<ce)return se}function te(ne){for(var se=0,ce=0;se<fe.length;++se)if(ce+=fe[se].length,ne+ie.length<=ce)return se}return re.map(function(ne){return[J(ne),te(ne)]})};function z(R){this.string=R,this.disassembled=B(R).join("")}z.prototype.search=function(R){return B(R).join("").indexOf(this.disassembled)};var L=function(R){typeof R=="object"&&(R=R.join(""));var K=R.charCodeAt(R.length-1);if(A(K)){K-=i;var Y=K%28;if(Y>0)return!0}else if(E(K))return!0;return!1},D=function(R,K){return B(R).pop()===K},F={disassemble:B,d:B,disassembleToString:$,ds:$,assemble:H,a:H,search:X,rangeSearch:ee,Searcher:z,endsWithConsonant:L,endsWith:D,isHangul:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),A(R)},isComplete:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),A(R)},isConsonant:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),E(R)},isVowel:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),_(R)},isCho:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),C(R)},isJong:function(R){return typeof R=="string"&&(R=R.charCodeAt(0)),T(R)},isHangulAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!A(R.charCodeAt(K)))return!1;return!0},isCompleteAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!A(R.charCodeAt(K)))return!1;return!0},isConsonantAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!E(R.charCodeAt(K)))return!1;return!0},isVowelAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!_(R.charCodeAt(K)))return!1;return!0},isChoAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!C(R.charCodeAt(K)))return!1;return!0},isJongAll:function(R){if(typeof R!="string")return!1;for(var K=0;K<R.length;K++)if(!T(R.charCodeAt(K)))return!1;return!0}};t.exports=F})()})(ste);const Yl=new kt("searchHighlight");function Ph(t,e,n){const r=[];if(!e)return r;const i=n.caseSensitive?e.normalize("NFC"):e.normalize("NFC").toLowerCase(),{doc:s}=t.state,a=l=>/[0-9A-Za-z가-힣_]/.test(l);return s.descendants((l,u)=>{if(!l.isText||!l.text)return;let c=l.text.normalize("NFC");n.caseSensitive||(c=c.toLowerCase());let f=0,p=c.indexOf(i,f);for(;p!==-1;){const m=p,g=p+i.length-1;if(n.wholeWord){const b=m>0?c[m-1]:"",v=g+1<c.length?c[g+1]:"";if(b&&a(b)||v&&a(v)){f=p+1,p=c.indexOf(i,f);continue}}r.push({from:u+m,to:u+g+1}),f=p+i.length,p=c.indexOf(i,f)}}),r}function jv(t){return t.state.selection.from}function rS(t){if(t.state.plugins.find(r=>r.spec.key===Yl))return;const n=new ot({key:Yl,state:{init(){return ut.empty},apply(r,i){const s=r.getMeta(Yl);return s!==void 0?s:i.map(r.mapping,r.doc)}},props:{decorations(r){return Yl.getState(r)}}});t.registerPlugin(n)}function oS(t,e,n){rS(t);const r=e.map((a,l)=>Gt.inline(a.from,a.to,{class:l===n?"search-match-active":"search-match"})),i=ut.create(t.state.doc,r),s=t.state.tr.setMeta(Yl,i);t.view.dispatch(s)}function Jl(t){rS(t);const e=t.state.tr.setMeta(Yl,ut.empty);t.view.dispatch(e)}function ate(t){const e=o.ref(-1),n=o.ref([]),r=o.computed(()=>n.value.length);function i(p){var x;const m=t.value;if(!m||n.value.length===0)return;const g=n.value.length;e.value=(p%g+g)%g,oS(m,n.value,e.value);const b=n.value[e.value],y=m.view.domAtPos(b.from).node;(x=y==null?void 0:y.scrollIntoView)==null||x.call(y,{block:"nearest",behavior:"smooth"}),m.chain().setTextSelection({from:b.from,to:b.to}).scrollIntoView().run()}function s(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(v=>v.from>g);i(b===-1?0:b)}function a(p){const m=t.value;if(!m)return;if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m);let b=-1;for(let v=n.value.length-1;v>=0;v--)if(n.value[v].to<g){b=v;break}i(b===-1?n.value.length-1:b)}function l(p){const m=t.value;if(!m||e.value===-1||n.value.length===0)return;const g=n.value[e.value],{state:b}=m,v=b.doc.textBetween(g.from,g.to);if(!(p.caseSensitive?v===p.find:v.toLowerCase()===p.find.toLowerCase())){s(p);return}m.chain().focus().setTextSelection({from:g.from,to:g.to}).insertContent(p.replace).run(),s(p)}function u(p){const m=t.value;if(!m)return;const g=Ph(m,p.find,p);if(g.length===0)return;const b=m.chain().focus();[...g].reverse().forEach(v=>{b.setTextSelection({from:v.from,to:v.to}).insertContent(p.replace)}),b.run(),n.value=[],e.value=-1,Jl(m)}function c(p){const m=t.value;if(!m)return;if(!p.find){n.value=[],e.value=-1,Jl(m);return}if(n.value=Ph(m,p.find,p),n.value.length===0){e.value=-1,Jl(m);return}const g=jv(m),b=n.value.findIndex(y=>y.from>=g),v=b===-1?0:b;e.value=v,i(v),oS(m,n.value,v)}function f(){const p=t.value;p&&(n.value=[],e.value=-1,Jl(p))}return{searchUp:a,searchDown:s,replaceCurrent:l,replaceAll:u,totalMatches:r,currentMatchIndex:o.readonly(e),refreshMatches:c,clearSearch:f}}const iS=o.defineComponent({__name:"Checkbox",props:{defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{},class:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,...l}=n;return l}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(LD),o.mergeProps(o.unref(s),{class:o.unref(Ee)("peer h-5 w-5 shrink-0 rounded-sm border border-ed-border shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ed-ring disabled:cursor-not-allowed disabled:opacity-50 text-ed-blue",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(DD),{class:"flex h-full w-full items-center justify-center"},{default:o.withCtx(()=>[o.renderSlot(a.$slots,"default",{},()=>[o.createVNode(o.unref(Gg),{icon:"fa-solid:check"})])]),_:3})]),_:3},16,["class"]))}}),lte={class:"flex items-center justify-between px-5 pt-4 pb-2 cursor-move bg-[#F6FAFE]"},ute={class:"text-base font-semibold text-gray-800"},cte={class:"px-5 pt-[20px] pb-4 flex flex-col gap-y-3 bg-white"},dte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},fte={class:"text-right text-sm text-gray-600"},pte={class:"relative"},hte={key:0,class:"absolute right-3 top-1/2 -translate-y-1/2 text-xs text-gray-400 pointer-events-none"},mte={class:"grid grid-cols-[60px,1fr] gap-x-3 items-center"},gte={class:"text-right text-sm text-gray-600"},bte={class:"grid grid-cols-[60px,1fr] gap-x-3"},vte={class:"flex gap-x-5"},yte={class:"flex items-center space-x-2 text-sm"},wte={for:"caseSensitive",class:"select-none text-gray-700"},xte={class:"grid grid-cols-[60px,1fr] gap-x-3"},Cte={class:"flex gap-x-2"},kte=po(o.defineComponent({__name:"BatchReplaceDialog",props:{modelValue:{type:Boolean},totalMatches:{default:0},currentMatchIndex:{default:-1}},emits:["update:modelValue","search-down","search-up","replace","replace-all","refresh"],setup(t,{emit:e}){const n=t,r=e;function i(){return{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value}}const s=o.ref(""),a=o.ref(""),l=o.ref(null),u=o.ref(!1),c=o.ref(!1),f=o.computed(()=>s.value?n.totalMatches===0?"No matches":`${n.currentMatchIndex+1} / ${n.totalMatches}`:""),p=Ne.useLocalStorage("findReplaceDialogPosition",null),m=o.reactive({x:0,y:0}),g=o.ref(!1),b={x:0,y:0},v=O=>{const B=O.target;if(B.closest("input")||B.closest("button")||B.closest("label")||B.closest(".content-area"))return;g.value=!0;const $=document.querySelector(".find-replace-dialog");if(!$)return;const H=$.getBoundingClientRect();b.x=O.clientX-H.left,b.y=O.clientY-H.top,document.addEventListener("mousemove",y),document.addEventListener("mouseup",x)},y=O=>{g.value&&(m.x=O.clientX-b.x,m.y=O.clientY-b.y)},x=()=>{g.value=!1,p.value={x:m.x,y:m.y},document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)};o.onUnmounted(()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",x)}),o.watch(()=>n.modelValue,async O=>{var X,ee;if(!O)return;await o.nextTick();const B=document.querySelector(".find-replace-dialog");if(!B)return;const $=window.innerWidth,H=window.innerHeight;p.value&&p.value.x!==void 0&&p.value.y!==void 0?(m.x=p.value.x,m.y=p.value.y):(m.x=Math.max(($-B.offsetWidth)/2,0),m.y=Math.max((H-B.offsetHeight)/2,0)),s.value&&r("refresh",i()),await o.nextTick(),(ee=(X=l.value)==null?void 0:X.$el)==null||ee.focus()});const k=()=>{r("update:modelValue",!1)},E=()=>{s.value&&r("search-down",i())},C=()=>{s.value&&r("search-up",i())},_=()=>{r("replace",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})},T=()=>{r("replace-all",{find:s.value,replace:a.value,caseSensitive:u.value,wholeWord:c.value})};function A(O){const B=O.target.value;s.value=B,r("refresh",i())}function V(O){const $=O.target.value+(O.data??"");r("refresh",{find:$,replace:a.value,caseSensitive:u.value,wholeWord:c.value})}return(O,B)=>{const $=bs,H=iS,X=bn,ee=Vc,z=Pc;return o.openBlock(),o.createBlock(z,{open:O.modelValue},{default:o.withCtx(()=>[o.createVNode(ee,{"is-overlay-transparent":"",class:"p-0 gap-0 !animate-none !transition-none max-w-max","as-child":""},{default:o.withCtx(()=>[o.createElementVNode("div",{class:"find-replace-dialog fixed z-[70] pointer-events-auto w-[460px] rounded-[10px] overflow-hidden bg-white shadow-xl",style:o.normalizeStyle({top:"0px",left:"0px",transform:`translate(${m.x}px, ${m.y}px)`}),onMousedown:v},[o.createElementVNode("div",lte,[o.createElementVNode("span",ute,o.toDisplayString(O.$t("찾기 및 바꾸기")),1),o.createElementVNode("button",{class:"bg-transparent text-gray-400 hover:text-gray-600 transition-colors p-1",onClick:k},[o.createVNode(o.unref(Ec),{class:"w-5 h-5"})])]),o.createElementVNode("div",cte,[o.createElementVNode("div",dte,[o.createElementVNode("label",fte,o.toDisplayString(O.$t("검색")),1),o.createElementVNode("div",pte,[o.createVNode($,{ref_key:"findInputRef",ref:l,modelValue:s.value,"onUpdate:modelValue":B[0]||(B[0]=L=>s.value=L),class:"rounded-md h-[36px] text-sm pr-[90px] !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none",onInput:A,onCompositionupdate:V,onKeydown:o.withKeys(o.withModifiers(E,["prevent"]),["enter"])},null,8,["modelValue","onKeydown"]),o.unref(f)?(o.openBlock(),o.createElementBlock("span",hte,o.toDisplayString(o.unref(f)),1)):o.createCommentVNode("",!0)])]),o.createElementVNode("div",mte,[o.createElementVNode("label",gte,o.toDisplayString(O.$t("바꾸기")),1),o.createVNode($,{modelValue:a.value,"onUpdate:modelValue":B[1]||(B[1]=L=>a.value=L),class:"rounded-md h-[36px] text-sm !border-gray-300 focus:!border-blue-500 focus:!ring-0 outline-none"},null,8,["modelValue"])]),o.createElementVNode("div",bte,[B[3]||(B[3]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",vte,[o.createElementVNode("div",yte,[o.createVNode(H,{id:"caseSensitive",checked:u.value,"onUpdate:checked":B[2]||(B[2]=L=>{u.value=!!L})},null,8,["checked"]),o.createElementVNode("label",wte,o.toDisplayString(O.$t("대소문자 일치")),1)])])]),o.createElementVNode("div",xte,[B[4]||(B[4]=o.createElementVNode("div",null,null,-1)),o.createElementVNode("div",Cte,[o.createVNode(X,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:_},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("바꾸기")),1)]),_:1}),o.createVNode(X,{variant:"outline",class:"h-[36px] text-sm flex-1 rounded-md border-blue-500 text-blue-600 hover:bg-blue-50",onClick:T},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("모두 바꾸기")),1)]),_:1}),o.createVNode(X,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:C},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("이전")),1)]),_:1},8,["disabled"]),o.createVNode(X,{class:"h-[36px] text-sm flex-1 rounded-md bg-blue-500 hover:bg-blue-600",disabled:!s.value,onClick:E},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(O.$t("다음")),1)]),_:1},8,["disabled"])])])])],36)]),_:1})]),_:1},8,["open"])}}}),[["__scopeId","data-v-5ec84714"]]),Ete={class:"flex flex-1"},Vh=o.defineComponent({__name:"CoreEditorV2",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:"14px"},fontFamilyDefault:{default:"NanumGothicCoding"},fontWeightDefault:{default:void 0},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{default:null},fieldNameCommentCuesheet:{default:null},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean,default:!1},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean,default:!1},autoFocus:{type:Boolean},superPreviewCustomClass:{default:()=>({overall:"bg-ed-gray-50",unproducedSuper:"bg-red-500",completedSuper:"bg-black"})},minChar:{default:()=>({superPreview:29,content:26})},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{default:void 0},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{default:"paragraph"},fixedSuperPreviewWidth:{type:Boolean,default:!1}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur","open-batch-replace"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE),l=o.useAttrs(),u=wn(),{isFullscreen:c,isReady:f,editor:p,updateEditorState:m,superTextStore:g,checkSpellStore:b,setEditorContextMenuRef:v,setEditorContentInstance:y,setEditorFocusedInstance:x}=u,k=o.computed(()=>!(r.disabled||r.readonly));o.provide("isEditable",k);const E=o.computed(()=>k.value?!0:r.canEditSuperReadOnly);o.provide("canEditSuper",E);const C=o.computed(()=>r.mode===Me.EDITOR),_=o.ref(r.fontSizeDefault),T=o.ref(r.fontFamilyDefault),A=o.ref(r.fontWeightDefault);o.provide("fontSize",_),o.provide("fontFamily",T),o.provide("fontWeight",A);const V=ae=>{!k.value||!((ae.ctrlKey||ae.metaKey)&&ae.key.toLowerCase()==="h")||(ae.preventDefault(),ae.stopPropagation(),ae.stopImmediatePropagation(),$.value=!0)};o.onMounted(()=>{Ue(),window.addEventListener("keydown",V,!0)}),o.onUnmounted(()=>{window.removeEventListener("keydown",V,!0)}),o.onActivated(()=>{window.addEventListener("keydown",V,!0)}),o.onDeactivated(()=>{window.removeEventListener("keydown",V,!0)});const O=ae=>{const Be=parseInt(_.value||"16px"),_t=ae?Be+2:Be-2;_.value=_t+"px"};o.onBeforeMount(()=>{r.disabled||a.on(O)}),o.onBeforeUnmount(()=>{r.disabled||a.off(O)});const B=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),$=o.ref(!1),{searchUp:H,searchDown:X,replaceCurrent:ee,replaceAll:z,totalMatches:L,currentMatchIndex:D,refreshMatches:F,clearSearch:R}=ate(p);o.watch($,ae=>{ae||R()});const K=ae=>{F(ae)},Y=ae=>{X(ae)},ie=ae=>{H(ae)},fe=ae=>{ee(ae)},ke=ae=>{z(ae)},re=new Vo({coreExtensionOptions:{clipboardTextSerializer:{blockSeparator:r.blockSeparatorPolicy==="line"?`
|
|
346
346
|
`:`
|
|
347
347
|
|
|
348
348
|
`}},enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:Et.throttle((ae,Be)=>Be.key==="Enter"&&l.enter&&!Be.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:ae=>r.mode===Me.EDITOR?nR(ae):nS(ae),handlePaste:(ae,Be)=>{var qt;const _t=Be.clipboardData;if(!_t)return!1;const oe=r.mode,Ae=Array.from(_t.items),He=Ae.some(Bt=>Bt.type.startsWith("image/")),rt=Ae.some(Bt=>Bt.type.startsWith("video/"));if((oe===Me.STRAIGHT||oe===Me.REPORT)&&(He||rt))return Be.preventDefault(),!0;if(rt)return Be.preventDefault(),je(["video"])&&Ae.forEach(async Bt=>{var or;if(!Bt.type.startsWith("video/"))return;const xn=Bt.getAsFile();if(!xn)return;const gr=re.extensionManager.extensions.find(Dn=>Dn.name==="video"),Ln=(or=gr==null?void 0:gr.options)==null?void 0:or.upload,rr=Ln?await Ln(xn):URL.createObjectURL(xn);re.commands.focus(),re.commands.setVideo({src:rr})}),!0;const Qe=((qt=Be.clipboardData)==null?void 0:qt.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(Qe)?(Be.preventDefault(),Wv(ae,Qe.trim())):!1},clipboardTextParser:(ae,Be)=>{const _t=ae.split(/(?:\r\n?|\n)/),oe=[];_t.forEach(He=>{let rt={type:"paragraph"};He.length>0&&(rt.content=[{type:"text",text:He}]);let Qe=Fr.fromJSON(Be.doc.type.schema,rt);oe.push(Qe)});const Ae=be.fromArray(oe);return Se.maxOpen(Ae)}},onCreate:({editor:ae})=>{m(ae)},onUpdate:Et.throttle(({editor:ae})=>{f.value=!0;const Be=Ke(ae,r.output);i("update:modelValue",Be),i("change",{editor:ae,output:Be}),m(ae),o.nextTick(()=>{Ue()}),se()},Ho),extensions:Et.uniqBy(qC(r.extensions,r),"name"),editable:k.value,onFocus:ae=>{v(qe.value),x(ae.editor),i("onFocus",ae)},onBlur:ae=>i("onBlur",ae),parseOptions:{preserveWhitespace:"full"}}),me=o.computed(()=>r.mode===Me.REPORT||r.mode===Me.STRAIGHT||r.mode===Me.PLAIN_TEXT),J=o.computed(()=>{const ae={height:"auto",minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,overflowY:"auto"},Be={fontFamily:np(re,uc)&&T.value||r.fontFamilyDefault,fontSize:np(re,Qf)&&_.value||r.fontSizeDefault,...np(re,HC)&&(A.value||r.fontWeightDefault)?{fontWeight:A.value||r.fontWeightDefault}:{}};return C.value&&!r.autoHeight?{}:C.value&&r.autoHeight?ae:!C.value&&r.autoHeight?{...ae,...Be}:Be});o.watch(()=>[J.value,r.disabled],async()=>{Ue()}),o.provide("minCharSuperInput",r.minChar.superPreview);const{contentInner:te,measuredMinWidth:ne,measure:se}=df({minChars:r.minChar.content,fontSize:_,editor:re}),ce=o.ref(null),_e=o.computed(()=>{var ae;return(ae=ce.value)==null?void 0:ae.measuredMinWidthComment});o.provide("measuredMinWidthComment",_e);const Te=o.computed(()=>C.value?0:Rt.value?Number(ne==null?void 0:ne.value)+Number(_e==null?void 0:_e.value)+30:Number(ne==null?void 0:ne.value));async function Ue(){await o.nextTick(),s.emit({action:"render"})}function Ke(ae,Be){if(!ae)return"";if(ae.isEmpty)return Be==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return ae.getText({blockSeparator:`
|
|
@@ -350,11 +350,11 @@ https://github.com/highlightjs/highlight.js/issues/2277`),Y=D,K=F),R===void 0&&(
|
|
|
350
350
|
`});default:return""}}function je(ae){return ae.every(Be=>re==null?void 0:re.extensionManager.extensions.find(_t=>_t.name===Be))}o.watch(()=>b.languages,()=>{re.commands.checkSpelling()}),o.watch(()=>r.modelValue,ae=>{if(!re||Et.isEqual(Ke(re,r.output),ae))return;const{from:Be,to:_t}=re.state.selection;re.commands.setTextSelection({from:Be,to:_t}),re.commands.setContent(gn(ae,r.disabled,r.mode),!1,{preserveWhitespace:"full"}),Ue()},{deep:!0}),o.watch(()=>k.value,ae=>{var Be;re==null||re.setEditable(ae),(Be=re==null?void 0:re.commands)!=null&&Be.setIsEnableSuggestion&&re.commands.setIsEnableSuggestion(ae)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:ae})=>{i("changed:selection",{editor:ae})})}),o.onUnmounted(()=>re==null?void 0:re.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("content",Ke(re,"html"))});const Rt=o.computed(()=>{var oe;if(!((oe=re==null?void 0:re.storage)!=null&&oe.superText))return!1;const{enable:ae}=re.storage.superText,Be=[Me.EDITOR,Me.PLAIN_TEXT].includes(r.mode),_t=r.disabled;return ae&&!Be&&!_t}),q=o.ref(null),U=o.computed(()=>r.mode),{commentHeight:ge,contentHeight:xe,minHeight:Fe,minHeightComment:st}=ite(q,U,r.autoHeight,typeof r.minHeight=="string"?parseInt(r.minHeight):r.minHeight),qe=o.ref(null);function ue(ae){ae===Me.STRAIGHT&&v(qe.value)}function j(ae){ae!==Me.REPORT&&x(re)}const Q=ae=>{var _t,oe,Ae;const Be=document.getSelection();if(!(!Be||Be.isCollapsed||Be.rangeCount===0)&&!(!q.value||!q.value.contains(Be.anchorNode)))try{const rt=Be.getRangeAt(0).cloneContents(),Qe=document.createElement("div");Qe.appendChild(rt);const qt=Qe.innerHTML,Bt=r.blockSeparatorPolicy==="line"?`
|
|
351
351
|
`:`
|
|
352
352
|
|
|
353
|
-
`,xn=Qe.querySelectorAll("p"),gr=xn.length>0?Array.from(xn).map(Ln=>Ln.textContent||"").join(Bt):Qe.textContent||"";(_t=ae.clipboardData)==null||_t.clearData(),(oe=ae.clipboardData)==null||oe.setData("text/html",qt),(Ae=ae.clipboardData)==null||Ae.setData("text/plain",gr),ae.preventDefault()}catch{}};o.onMounted(()=>{ue(r.mode),j(r.mode),y(re),k.value||document.addEventListener("copy",Q,!0)}),o.onBeforeUnmount(()=>{document.removeEventListener("copy",Q,!0)}),o.watch(()=>r.mode,ae=>{ue(ae),j(ae)});const pe=o.ref(null),Re=()=>{var Be;(Be=pe.value)!=null&&Be.editor.commands.focusInvalidChar()||re.commands.focusInvalidChar()};u.focusFirstInvalidChar.value=Re,o.onActivated(()=>{u.focusFirstInvalidChar.value=Re});const et=o.computed(()=>{var Be,_t,oe;const ae=((Be=r.fieldNameComment)==null?void 0:Be.label)||((_t=r.fieldNameCommentCuesheet)==null?void 0:_t.label)||((oe=r.fieldNameContent)==null?void 0:oe.label);return r.disabled&&ae});return e({editor:re}),(ae,Be)=>{var qt;const _t=Lh,oe=Rh,Ae=Ih,He=C8,rt=mz,Qe=xR;return o.unref(re)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",class:o.normalizeClass(["vdc-editor w-full flex flex-col",[ae.editorClass,{"outline-ed-primary":o.unref(re).isFocused,"outline-ed-border":!o.unref(re).isFocused}]]),style:o.normalizeStyle(o.unref(B))},[!ae.hideBubble&&!ae.disabled&&o.unref(k)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[je([o.unref(ac)])?(o.openBlock(),o.createBlock(_t,{key:0,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(ma)])?(o.openBlock(),o.createBlock(oe,{key:1,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(hs)])?(o.openBlock(),o.createBlock(Ae,{key:2,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(Il),o.unref(wi)])?(o.openBlock(),o.createBlock(He,{key:3,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),ae.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(rt,{key:1,editor:o.unref(re),"editor-comment":(qt=o.unref(pe))==null?void 0:qt.editor,mode:ae.mode,class:"mb-2","custom-class-toolbar":ae.customClassToolbar,"toolbar-extension-order":ae.toolbarExtensionOrder},null,8,["editor","editor-comment","mode","custom-class-toolbar","toolbar-extension-order"])),o.createElementVNode("div",{ref_key:"editorWrapRef",ref:q,class:o.normalizeClass(o.unref(Ee)("space-y-2 flex-1 flex flex-col break-keep",o.unref(me)&&"[&_*]:!font-inherit",o.unref(me)&&"[&_*]:!text-font-size-inherit")),style:o.normalizeStyle(o.unref(J))},[o.unref(et)?(o.openBlock(),o.createBlock(Qe,{key:0,extensions:ae.extensions,mode:ae.mode,"hide-comment":ae.hideComment,"field-name-comment":ae.fieldNameComment,"field-name-comment-cuesheet":ae.fieldNameCommentCuesheet,"field-name-content":ae.fieldNameContent,comment:ae.comment,"comment-cuesheet":ae.commentCuesheet,content:ae.modelValue,"min-chars":ae.minChar.content,"font-size":o.unref(_)},null,8,["extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","min-chars","font-size"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"space-y-2 flex-1 flex flex-col",style:o.normalizeStyle({minWidth:`${o.unref(Te)}px`})},[ae.mode===o.unref(Me).REPORT&&!ae.hideComment?(o.openBlock(),o.createBlock(ote,{key:0,ref_key:"editorCommentRef",ref:pe,mode:o.unref(Me).REPORT,extensions:ae.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":ae.disableSuperInput,"is-open-super-view":o.unref(Rt),"super-preview-custom-class":ae.superPreviewCustomClass,"min-char":ae.minChar,"font-size":o.unref(_),style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(on)(o.unref(st))}:{height:o.unref(on)(o.unref(ge)),minHeight:o.unref(on)(o.unref(Fe))}),"editor-content-instance":o.unref(re),class:"relative overflow-y-auto","onUpdate:modelValue":Be[0]||(Be[0]=Bt=>i("update:comment",Bt))},null,8,["mode","extensions","model-value","disabled","disable-super-input","is-open-super-view","super-preview-custom-class","min-char","font-size","style","editor-content-instance"])):o.createCommentVNode("",!0),o.createElementVNode("div",{id:"editor-container",class:"relative overflow-y-auto flex flex-col",style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(on)(o.unref(Fe))}:{height:o.unref(on)(o.unref(xe))})},[o.createElementVNode("div",Ete,[o.withDirectives(o.createVNode(Yee,{ref_key:"superTextViewRef",ref:ce,editor:o.unref(re),"super-preview-custom-class":ae.superPreviewCustomClass,"min-chars":ae.minChar.superPreview,"font-size":o.unref(_)},null,8,["editor","super-preview-custom-class","min-chars","font-size"]),[[o.vShow,o.unref(Rt)]]),o.createElementVNode("div",{id:"editor-panel",ref_key:"contentInner",ref:te,class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},[o.createVNode(Ev,{ref_key:"selectContextMenuRef",ref:qe,editor:o.unref(re),mode:ae.mode,"super-text-store":o.unref(g)},{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{editor:o.unref(re),spellcheck:"true",class:o.normalizeClass(o.unref(Ee)("h-full break-all",ae.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"))},null,8,["editor","class"])]),_:1},8,["editor","mode","super-text-store"])],512)])],4)],4))],6),o.createVNode(kte,{modelValue:o.unref($),"onUpdate:modelValue":Be[1]||(Be[1]=Bt=>o.isRef($)?$.value=Bt:null),"total-matches":o.unref(L),"current-match-index":o.unref(D),onSearchDown:Y,onSearchUp:ie,onReplace:fe,onReplaceAll:ke,onRefresh:K},null,8,["modelValue","total-matches","current-match-index"])],6)):o.createCommentVNode("",!0)}}}),Ste={class:"relative px-2.5"},_te={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Tte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ate=o.defineComponent({__name:"ToolbarFormat",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[]},threshold:{default:5}},setup(t){const{t:e}=At(),n=t,r=[Yf,lc,xi,Nf],i=o.computed(()=>{const m=[...n.editor.extensionManager.extensions],g=jC(m,{[zC]:0});let b=[];for(const v of g){const{button:y,divider:x=!1,spacer:k=!1,toolbar:E=!0}=v.options;if(!y||!f1(y)||!E)continue;const C=y({editor:n.editor,extension:v,t:o.unref(e),isMobile:!0});if(Array.isArray(C)){const _=C.map((T,A)=>({id:`${v.name}`,button:T,divider:A===C.length-1?x:!1,spacer:A===0?k:!1,buttonName:T.buttonName}));b=[...b,..._];continue}b.push({button:C,divider:x,spacer:k,id:`${v.name}`})}return n.activeExtensions.length?b.filter(v=>v.id&&n.activeExtensions.includes(v.id)):(r.length&&(b=b.filter(v=>v.id&&!r.includes(v.id))),b=b.map(v=>{const y=["videoUpload","heading","strike","color","fontSize","fontFamily"],x=["redo"],k=b.some(_=>_.id==="imageUpload"),E=b.some(_=>_.id==="videoUpload");E||y.push("imageUpload"),!k&&!E&&y.push("link");const C=y.includes(v.id??"")||x.includes(v.buttonName??"");return{...v,separator:C}}),b)}),s=m=>m.id==="spellchecker"?"!text-ed-blue !bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":m.button.componentProps.customClass,a=m=>m.id==="spellchecker"?"Spellchecker":m.button.componentProps.icon,l=o.ref(null),u=o.ref(!1),c=o.ref(!1);function f(){const m=l.value;if(!m)return;const{scrollLeft:g,scrollWidth:b,clientWidth:v}=m;if(!(b>v+1)){u.value=!1,c.value=!1;return}const x=g<=n.threshold,k=g+v>=b-n.threshold;u.value=!x,c.value=!k}const p=Ne.useThrottleFn(f,10);return Ne.useEventListener(l,"scroll",p),Ne.useResizeObserver(l,p),Ne.useEventListener(window,"resize",p),(m,g)=>(o.openBlock(),o.createElementBlock("div",{id:"tool-bar-format",class:o.normalizeClass(o.unref(Ee)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2",!i.value.length&&"hidden"))},[o.createElementVNode("div",Ste,[o.unref(u)?(o.openBlock(),o.createElementBlock("div",_te)):o.createCommentVNode("",!0),o.unref(c)?(o.openBlock(),o.createElementBlock("div",Tte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:l,id:"tool-bar-format-scroll",class:"text-ed-gray-700 flex gap-2 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(b,v)=>{var y;return o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(b.button.component),o.mergeProps({id:b.id,ref_for:!0},b.button.componentProps,{editor:m.editor,disabled:m.disabled||((y=b.button.componentProps)==null?void 0:y.disabled),"custom-class":s(b),icon:a(b)}),o.createSlots({_:2},[o.renderList(b.button.componentSlots,(x,k,E)=>({name:`${k}`,fn:o.withCtx(C=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x),o.mergeProps({ref_for:!0},C==null?void 0:C.props,{id:b.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),b.separator?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-5"})):o.createCommentVNode("",!0)],64)}),128))],512)])],2))}}),Mte={class:"relative px-2.5"},Ote={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Bte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ite={class:"flex items-center gap-2"},Rte={class:"mt-3"},Lte=o.defineComponent({__name:"ToolbarImage",props:{editor:{},disabled:{type:Boolean,default:!1},threshold:{default:10}},setup(t){const e=t,{t:n}=At(),r=o.ref("100"),i=o.ref(),s=o.ref(),a=o.ref(),l=["left","center","right"],u={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};function c(X){X==null||X.preventDefault(),e.editor.getAttributes("image").src&&(e.editor.commands.updateImage({width:i.value?`${i.value}px`:null}),cf())}function f(X){const ee=Math.max(0,Math.min(100,parseInt(r.value)));e.editor.commands.updateImage({width:`${ee}%`}),cf()}function p(X){e.editor.commands.updateAttributes("image",{textAlign:X})}o.watch(r,()=>{r.value&&f()}),o.watch(()=>e.editor.getAttributes("image"),X=>{X&&(i.value=Math.round(parseFloat(X.originWidth)),s.value=Math.round(parseFloat(X.originHeight)),a.value=X.originWidth/X.originHeight)});function m(){s.value&&a.value?i.value=Math.max(30,Math.round(s.value*a.value)):i.value=null}function g(){i.value&&a.value?s.value=Math.max(20,Math.round(i.value/a.value)):s.value=null}function b(X){p(X)}function v(){const X=e.editor.getAttributes("image"),{flipX:ee}=X;e.editor.commands.updateImage({flipX:!ee})}function y(){const X=e.editor.getAttributes("image"),{flipY:ee}=X;e.editor.commands.updateImage({flipY:!ee})}function x(){const{state:X,dispatch:ee}=e.editor.view;ol(X,ee)}function k(){const{state:X,dispatch:ee}=e.editor.view,{tr:z,selection:L}=X;if(!(L instanceof Pe))return;const D=L.from,F=X.doc.nodeAt(D);if(!F)return;const K=X.doc.resolve(D).nodeBefore;if(!K)return;const Y=D-K.nodeSize,ie=z.delete(D,D+F.nodeSize).insert(Y,F).setSelection(Pe.create(z.doc,Y));ee(ie)}function E(){const{state:X,dispatch:ee}=e.editor.view,{tr:z,doc:L,selection:D}=X;if(!(D instanceof Pe))return;const F=D.from,R=L.nodeAt(F);if(!R)return;const K=F+R.nodeSize;if(K>=L.content.size)return;const Y=L.nodeAt(K);if(!Y)return;const ie=K+Y.nodeSize-R.nodeSize,fe=F+Y.nodeSize,ke=z.delete(F,F+R.nodeSize).insert(ie,R).setSelection(Pe.create(z.doc,fe));ee(ke)}const C=o.ref(null),_=o.ref(!1),T=o.ref(!1);function A(){const X=C.value;if(!X)return;const{scrollLeft:ee,scrollWidth:z,clientWidth:L}=X;if(!(z>L+1)){_.value=!1,T.value=!1;return}const F=ee<=e.threshold,R=ee+L>=z-e.threshold;_.value=!F,T.value=!R}const V=Ne.useThrottleFn(A,10);Ne.useEventListener(C,"scroll",V),Ne.useResizeObserver(C,V),Ne.useEventListener(window,"resize",V);const O=o.inject("isMobile",!1),B=`dropdown-trigger-${Zr(10)}`,{isOpen:$}=yp({scrollEl:"tool-bar-image-scroll",ignoreSelector:`[data-radix-popper-content-wrapper], .${B}`}),H=o.computed(()=>O?{modal:!1,open:$.value,"onUpdate:open":X=>$.value=X}:{});return(X,ee)=>{const z=Ge,L=vo,D=ga,F=cc,R=bs,K=Rl,Y=op,ie=rp,fe=gs,ke=ms;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar-image",class:o.normalizeClass(o.unref(Ee)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2"))},[o.createElementVNode("div",Mte,[_.value?(o.openBlock(),o.createElementBlock("div",Ote)):o.createCommentVNode("",!0),T.value?(o.openBlock(),o.createElementBlock("div",Bte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:C,id:"tool-bar-image-scroll",class:"text-ed-gray-700 flex gap-1.5 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative whitespace-nowrap"},[o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.flipX"),icon:"FlipVertical",action:v},null,8,["tooltip"]),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.flipY"),icon:"FlipHorizontal",action:y},null,8,["tooltip"]),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.moveUp"),icon:"MoveUp",action:k,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.moveDown"),icon:"MoveDown",action:E,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(ke,o.normalizeProps(o.guardReactiveProps(o.unref(H))),{default:o.withCtx(()=>[o.createVNode(D,{class:o.normalizeClass(B)},{default:o.withCtx(()=>[o.createVNode(z,{title:o.unref(n)("editor.image.menu.size"),icon:"ImageSize"},null,8,["title"])]),_:1}),o.createVNode(fe,{class:"w-84 inside-toolbar"},{default:o.withCtx(()=>[o.createElementVNode("div",Ite,[o.createVNode(F,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.width")),1)]),_:1}),o.createVNode(R,{id:"maxWidth",modelValue:i.value,"onUpdate:modelValue":ee[0]||(ee[0]=re=>i.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:g,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"]),o.createVNode(F,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.height")),1)]),_:1}),o.createVNode(R,{id:"maxWidth",modelValue:s.value,"onUpdate:modelValue":ee[1]||(ee[1]=re=>s.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:m,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"])]),o.createElementVNode("div",Rte,[o.createVNode(ie,{"model-value":r.value,"onUpdate:modelValue":[ee[2]||(ee[2]=re=>r.value=re),ee[3]||(ee[3]=re=>{r.value=re})]},{default:o.withCtx(()=>[o.createVNode(Y,null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["25","50","75","100"],re=>o.createVNode(K,{key:re,value:re},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(re)+"% ",1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])])]),_:1})]),_:1},16),o.createVNode(L,{orientation:"vertical",class:"h-5"}),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,(re,me)=>o.createVNode(z,{key:me,tooltip:o.unref(n)(`editor.textalign.${re}.tooltip`),icon:u[re],action:()=>b(re),disabled:!X.editor.can().setTextAlign(re),"is-active":()=>X.editor.isActive({textAlign:re})||!1},null,8,["tooltip","icon","action","disabled","is-active"])),64)),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(z,{tooltip:o.unref(n)("editor.remove"),icon:"Trash2",action:x,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"])],512)])],2)}}}),Dte=o.defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{},customClassThumb:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,customClassThumb:l,...u}=n;return u}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(RV),o.mergeProps(o.unref(s),{class:o.unref(Ee)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 focus-visible:ring-offset-ed-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=unchecked]:bg-ed-input",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(LV),{class:o.normalizeClass(o.unref(Ee)("pointer-events-none block h-4 w-4 rounded-full bg-ed-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",n.customClassThumb))},null,8,["class"])]),_:1},16,["class"]))}}),Pte={class:"text-red-500 relative -top-1"},Kc=o.defineComponent({__name:"EditorFieldName",props:{fieldName:{},disabled:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("label-large",e.fieldName.customClass))},[o.createElementVNode("span",null,o.toDisplayString(e.fieldName.label),1),o.withDirectives(o.createElementVNode("span",Pte," •",512),[[o.vShow,e.fieldName.isRequired]])],2))}}),Fh={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,r=t,i=o.useSlots(),s=o.ref([]),a=o.computed(()=>s.value.reduce((J,te)=>(J[~~te.id]=te)&&J,{})),l=o.computed(()=>s.value.length),u=o.ref(null),c=o.ref(!1),f=o.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=o.ref({splitter:null,timeoutId:null}),m=o.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),g=()=>{document.addEventListener("mousemove",y,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",x))},b=()=>{document.removeEventListener("mousemove",y,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",y,{passive:!1}),document.removeEventListener("touchend",x))},v=(J,te)=>{const ne=J.target.closest(".splitpanes__splitter");if(ne){const{left:se,top:ce}=ne.getBoundingClientRect(),{clientX:_e,clientY:Te}="ontouchstart"in window&&J.touches?J.touches[0]:J;f.value.cursorOffset=r.horizontal?Te-ce:_e-se}g(),f.value.mouseDown=!0,f.value.activeSplitter=te},y=J=>{f.value.mouseDown&&(J.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{A(_(J)),re("resize",{event:J},!0)}))},x=J=>{f.value.dragging&&(window.getSelection().removeAllRanges(),re("resized",{event:J},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,b()},100)},k=(J,te)=>{"ontouchstart"in window&&(J.preventDefault(),p.value.splitter===te?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,E(J,te),p.value.splitter=null):(p.value.splitter=te,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||re("splitter-click",{event:J,index:te},!0)},E=(J,te)=>{if(re("splitter-dblclick",{event:J,index:te},!0),r.maximizePanes){let ne=0;s.value=s.value.map((se,ce)=>(se.size=ce===te?se.max:se.min,ce!==te&&(ne+=se.min),se)),s.value[te].size-=ne,re("pane-maximize",{event:J,index:te,pane:s.value[te]}),re("resized",{event:J,index:te},!0)}},C=(J,te)=>{re("pane-click",{event:J,index:a.value[te].index,pane:a.value[te]})},_=J=>{const te=u.value.getBoundingClientRect(),{clientX:ne,clientY:se}="ontouchstart"in window&&J.touches?J.touches[0]:J;return{x:ne-(r.horizontal?0:f.value.cursorOffset)-te.left,y:se-(r.horizontal?f.value.cursorOffset:0)-te.top}},T=J=>{J=J[r.horizontal?"y":"x"];const te=u.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(J=te-J),J*100/te},A=J=>{const te=f.value.activeSplitter;let ne={prevPanesSize:O(te),nextPanesSize:B(te),prevReachedMinPanes:0,nextReachedMinPanes:0};const se=0+(r.pushOtherPanes?0:ne.prevPanesSize),ce=100-(r.pushOtherPanes?0:ne.nextPanesSize),_e=Math.max(Math.min(T(J),ce),se);let Te=[te,te+1],Ue=s.value[Te[0]]||null,Ke=s.value[Te[1]]||null;const je=Ue.max<100&&_e>=Ue.max+ne.prevPanesSize,Rt=Ke.max<100&&_e<=100-(Ke.max+B(te+1));if(je||Rt){je?(Ue.size=Ue.max,Ke.size=Math.max(100-Ue.max-ne.prevPanesSize-ne.nextPanesSize,0)):(Ue.size=Math.max(100-Ke.max-ne.prevPanesSize-B(te+1),0),Ke.size=Ke.max);return}if(r.pushOtherPanes){const q=V(ne,_e);if(!q)return;({sums:ne,panesToResize:Te}=q),Ue=s.value[Te[0]]||null,Ke=s.value[Te[1]]||null}Ue!==null&&(Ue.size=Math.min(Math.max(_e-ne.prevPanesSize-ne.prevReachedMinPanes,Ue.min),Ue.max)),Ke!==null&&(Ke.size=Math.min(Math.max(100-_e-ne.nextPanesSize-ne.nextReachedMinPanes,Ke.min),Ke.max))},V=(J,te)=>{const ne=f.value.activeSplitter,se=[ne,ne+1];return te<J.prevPanesSize+s.value[se[0]].min&&(se[0]=$(ne).index,J.prevReachedMinPanes=0,se[0]<ne&&s.value.forEach((ce,_e)=>{_e>se[0]&&_e<=ne&&(ce.size=ce.min,J.prevReachedMinPanes+=ce.min)}),J.prevPanesSize=O(se[0]),se[0]===void 0)?(J.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((ce,_e)=>{_e>0&&_e<=ne&&(ce.size=ce.min,J.prevReachedMinPanes+=ce.min)}),s.value[se[1]].size=100-J.prevReachedMinPanes-s.value[0].min-J.prevPanesSize-J.nextPanesSize,null):te>100-J.nextPanesSize-s.value[se[1]].min&&(se[1]=H(ne).index,J.nextReachedMinPanes=0,se[1]>ne+1&&s.value.forEach((ce,_e)=>{_e>ne&&_e<se[1]&&(ce.size=ce.min,J.nextReachedMinPanes+=ce.min)}),J.nextPanesSize=B(se[1]-1),se[1]===void 0)?(J.nextReachedMinPanes=0,s.value.forEach((ce,_e)=>{_e<l.value-1&&_e>=ne+1&&(ce.size=ce.min,J.nextReachedMinPanes+=ce.min)}),s.value[se[0]].size=100-J.prevPanesSize-B(se[0]-1),null):{sums:J,panesToResize:se}},O=J=>s.value.reduce((te,ne,se)=>te+(se<J?ne.size:0),0),B=J=>s.value.reduce((te,ne,se)=>te+(se>J+1?ne.size:0),0),$=J=>[...s.value].reverse().find(te=>te.index<J&&te.size>te.min)||{},H=J=>s.value.find(te=>te.index>J+1&&te.size>te.min)||{},X=()=>{var J;const te=Array.from(((J=u.value)==null?void 0:J.children)||[]);for(const ne of te){const se=ne.classList.contains("splitpanes__pane"),ce=ne.classList.contains("splitpanes__splitter");!se&&!ce&&(ne.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ee=(J,te,ne=!1)=>{const se=J-1,ce=document.createElement("div");ce.classList.add("splitpanes__splitter"),ne||(ce.onmousedown=_e=>v(_e,se),typeof window<"u"&&"ontouchstart"in window&&(ce.ontouchstart=_e=>v(_e,se)),ce.onclick=_e=>k(_e,se+1)),ce.ondblclick=_e=>E(_e,se+1),te.parentNode.insertBefore(ce,te)},z=J=>{J.onmousedown=void 0,J.onclick=void 0,J.ondblclick=void 0,J.remove()},L=()=>{var J;const te=Array.from(((J=u.value)==null?void 0:J.children)||[]);for(const se of te)se.className.includes("splitpanes__splitter")&&z(se);let ne=0;for(const se of te)se.className.includes("splitpanes__pane")&&(!ne&&r.firstSplitter?ee(ne,se,!0):ne&&ee(ne,se),ne++)},D=({uid:J,...te})=>{const ne=a.value[J];for(const[se,ce]of Object.entries(te))ne[se]=ce},F=J=>{var te;let ne=-1;Array.from(((te=u.value)==null?void 0:te.children)||[]).some(se=>(se.className.includes("splitpanes__pane")&&ne++,se.isSameNode(J.el))),s.value.splice(ne,0,{...J,index:ne}),s.value.forEach((se,ce)=>se.index=ce),c.value&&o.nextTick(()=>{L(),K({addedPane:s.value[ne]}),re("pane-add",{pane:s.value[ne]})})},R=J=>{const te=s.value.findIndex(se=>se.id===J);s.value[te].el=null;const ne=s.value.splice(te,1)[0];s.value.forEach((se,ce)=>se.index=ce),o.nextTick(()=>{L(),re("pane-remove",{pane:ne}),K({removedPane:{...ne}})})},K=(J={})=>{!J.addedPane&&!J.removedPane?ie():s.value.some(te=>te.givenSize!==null||te.min||te.max<100)?fe(J):Y(),c.value&&re("resized")},Y=()=>{const J=100/l.value;let te=0;const ne=[],se=[];for(const ce of s.value)ce.size=Math.max(Math.min(J,ce.max),ce.min),te-=ce.size,ce.size>=ce.max&&ne.push(ce.id),ce.size<=ce.min&&se.push(ce.id);te>.1&&ke(te,ne,se)},ie=()=>{let J=100;const te=[],ne=[];let se=0;for(const _e of s.value)J-=_e.size,_e.givenSize!==null&&se++,_e.size>=_e.max&&te.push(_e.id),_e.size<=_e.min&&ne.push(_e.id);let ce=100;if(J>.1){for(const _e of s.value)_e.givenSize===null&&(_e.size=Math.max(Math.min(J/(l.value-se),_e.max),_e.min)),ce-=_e.size;ce>.1&&ke(ce,te,ne)}},fe=({addedPane:J,removedPane:te}={})=>{let ne=100/l.value,se=0;const ce=[],_e=[];((J==null?void 0:J.givenSize)??null)!==null&&(ne=(100-J.givenSize)/(l.value-1));for(const Te of s.value)se-=Te.size,Te.size>=Te.max&&ce.push(Te.id),Te.size<=Te.min&&_e.push(Te.id);if(!(Math.abs(se)<.1)){for(const Te of s.value)(J==null?void 0:J.givenSize)!==null&&(J==null?void 0:J.id)===Te.id||(Te.size=Math.max(Math.min(ne,Te.max),Te.min)),se-=Te.size,Te.size>=Te.max&&ce.push(Te.id),Te.size<=Te.min&&_e.push(Te.id);se>.1&&ke(se,ce,_e)}},ke=(J,te,ne)=>{let se;J>0?se=J/(l.value-te.length):se=J/(l.value-ne.length),s.value.forEach((ce,_e)=>{if(J>0&&!te.includes(ce.id)){const Te=Math.max(Math.min(ce.size+se,ce.max),ce.min),Ue=Te-ce.size;J-=Ue,ce.size=Te}else if(!ne.includes(ce.id)){const Te=Math.max(Math.min(ce.size+se,ce.max),ce.min),Ue=Te-ce.size;J-=Ue,ce.size=Te}}),Math.abs(J)>.1&&o.nextTick(()=>{c.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},re=(J,te=void 0,ne=!1)=>{const se=(te==null?void 0:te.index)??f.value.activeSplitter??null;n(J,{...te,...se!==null&&{index:se},...ne&&se!==null&&{prevPane:s.value[se-(r.firstSplitter?1:0)],nextPane:s.value[se+(r.firstSplitter?0:1)]},panes:s.value.map(ce=>({min:ce.min,max:ce.max,size:ce.size}))})};o.watch(()=>r.firstSplitter,()=>L()),o.onMounted(()=>{X(),L(),K(),re("ready"),c.value=!0}),o.onBeforeUnmount(()=>c.value=!1);const me=()=>{var J;return o.h("div",{ref:u,class:m.value},(J=i.default)==null?void 0:J.call(i))};return o.provide("panes",s),o.provide("indexedPanes",a),o.provide("horizontal",o.computed(()=>r.horizontal)),o.provide("requestUpdate",D),o.provide("onPaneAdd",F),o.provide("onPaneRemove",R),o.provide("onPaneClick",C),(J,te)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(me)))}},ei={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,r=o.inject("requestUpdate"),i=o.inject("onPaneAdd"),s=o.inject("horizontal"),a=o.inject("onPaneRemove"),l=o.inject("onPaneClick"),u=(e=o.getCurrentInstance())==null?void 0:e.uid,c=o.inject("indexedPanes"),f=o.computed(()=>c.value[u]),p=o.ref(null),m=o.computed(()=>{const y=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(y,b.value),g.value)}),g=o.computed(()=>{const y=parseFloat(n.minSize);return isNaN(y)?0:y}),b=o.computed(()=>{const y=parseFloat(n.maxSize);return isNaN(y)?100:y}),v=o.computed(()=>{var y;return`${s.value?"height":"width"}: ${(y=f.value)==null?void 0:y.size}%`});return o.watch(()=>m.value,y=>r({uid:u,size:y})),o.watch(()=>g.value,y=>r({uid:u,min:y})),o.watch(()=>b.value,y=>r({uid:u,max:y})),o.onMounted(()=>{i({id:u,el:p.value,min:g.value,max:b.value,givenSize:n.size===void 0?null:m.value,size:m.value})}),o.onBeforeUnmount(()=>a(u)),(y,x)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=k=>o.unref(l)(k,y._.uid)),style:o.normalizeStyle(v.value)},[o.renderSlot(y.$slots,"default")],4))}},Vte={class:"px-5 py-2.5"},Fte=["innerHTML"],$te={key:0,class:"px-5 py-2.5"},Hte=["innerHTML"],zte={key:1,class:"px-5 py-2.5"},Ute=["innerHTML"],Wte={key:2,class:"px-5 py-2.5"},jte=["innerHTML"],qte={class:"px-5 py-2.5"},Kte=["innerHTML"],Gte=o.defineComponent({__name:"EditorViewMobile",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},isEditorViewSplitContent:{type:Boolean},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>{var A;const T=((A=e.extensions)==null?void 0:A.filter(V=>V.name!=="spellchecker"))||[];return T.some(V=>V.name==="image")||T.push(qu.configure()),T}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(T){return u1(T).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(T){return new Vo({extensions:n.value,content:T,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(gn(e.comment,!0,e.mode))),i.value||(p.value=g(gn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(gn(e.content,!0,e.mode)));function b(T,A){if(!T)return;const V=gn(A,!0,e.mode);Et.isEqual(T.getHTML(),V)||T.commands.setContent(V,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,T=>{r.value||b(f.value,T)}),o.watch(()=>e.commentCuesheet,T=>{i.value||b(p.value,T)}),o.watch(()=>e.content,T=>{s.value||b(m.value,T)});const{isScrolling:v,handleScroll:y}=Xl(),{isScrolling:x,handleScroll:k}=Xl(),E=o.computed(()=>e.mode!==Me.EDITOR?!0:!e.hideComment),C=o.computed(()=>e.mode!==Me.REPORT?!0:e.mode===Me.REPORT&&!e.hideComment),_=o.computed(()=>e.mode===Me.STRAIGHT||e.mode===Me.PLAIN_TEXT||!E.value);return(T,A)=>{const V=Kc;return o.openBlock(),o.createBlock(o.unref(Fh),{horizontal:"",class:o.normalizeClass(o.unref(Ee)("flex-1 text-sm"))},{default:o.withCtx(()=>[o.unref(_)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(k)},{default:o.withCtx(()=>[o.createElementVNode("div",Vte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Fte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(E)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(v)&&"scrollbar-thumb-transparent")),onScroll:o.unref(y)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("divide-y divide-ed-gray divide-dashed"))},[o.unref(C)?(o.openBlock(),o.createElementBlock("div",$te,[T.fieldNameComment?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameComment,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,Hte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.mode===o.unref(Me).REPORT?(o.openBlock(),o.createElementBlock("div",zte,[T.fieldNameCommentCuesheet?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameCommentCuesheet,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,Ute)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Wte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,jte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))]))],2)]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?(o.openBlock(),o.createBlock(o.unref(ei),{key:1,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(k)},{default:o.withCtx(()=>[o.createElementVNode("div",qte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Kte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0)],64))]),_:1},8,["class"])}}}),Xte={class:"flex gap-2 items-center overflow-x-auto"},sS=o.defineComponent({__name:"ToolbarMobile",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[lc,xi,Lg]},customClassToolbar:{}},setup(t){const{t:e}=At(),n=t,r=o.inject("isEditable",o.ref(!0)),i=o.computed(()=>{const u=[...n.editor.extensionManager.extensions],c=u.find(m=>m.name===Lg);let f=u.sort((m,g)=>m.name==="spellchecker"?-1:g.name==="spellchecker"||m.name==="superText"?1:g.name==="superText"?-1:0);c&&(f=u.sort((m,g)=>m.name==="configPlan"?1:g.name==="configPlan"?-1:0));let p=[];for(const m of f){const{button:g,divider:b=!1,spacer:v=!1,toolbar:y=!0}=m.options;if(!g||!f1(g)||!y)continue;const x=g({editor:n.editor,extension:m,t:o.unref(e),isMobile:!0});if(Array.isArray(x)){const k=x.map((E,C)=>({id:`${m.name}`,button:E,divider:C===x.length-1?b:!1,spacer:C===0?v:!1}));p=[...p,...k];continue}p.push({button:x,divider:b,spacer:v,id:`${m.name}`})}if(!r.value){const m=p.find(g=>g.id==="superText");m&&(m.button.componentProps.disabled=!0)}return n.activeExtensions.length?p.filter(m=>m.id&&n.activeExtensions.includes(m.id)):p}),s=u=>u.id==="spellchecker"?"!text-ed-blue data-[state=off]:bg-white dark:data-[state=off]:bg-ed-accent/40 !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":u.button.componentProps.customClass,a=u=>u.id==="spellchecker"?"Spellchecker":u.button.componentProps.icon,l=o.ref(!1);return(u,c)=>{const f=iS;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Ee)("z-10 border border-ed-input rounded-[5px] px-2.5 py-[5px] leading-none",!i.value.length&&"hidden",u.customClassToolbar))},[o.createElementVNode("div",Xte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,m)=>{var g,b,v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:m},[p.spacer&&m!==0?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.button.component),o.mergeProps({id:p.id,ref_for:!0},p.button.componentProps,{editor:u.editor,disabled:u.disabled||((g=p.button.componentProps)==null?void 0:g.disabled),"custom-class":s(p),icon:a(p)}),o.createSlots({_:2},[o.renderList(p.button.componentSlots,(y,x,k)=>({name:`${x}`,fn:o.withCtx(E=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},E==null?void 0:E.props,{id:p.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),p.id===xi&&o.unref(l)?(o.openBlock(),o.createBlock(f,{key:1,class:"bg-white border-inherit w-[26px] h-[26px] shadow-none",checked:(v=(b=p.button.componentProps).isActive)==null?void 0:v.call(b),"onUpdate:checked":y=>{var x,k;return(k=(x=p.button.componentProps).action)==null?void 0:k.call(x)}},null,8,["checked","onUpdate:checked"])):o.createCommentVNode("",!0),p.divider?(o.openBlock(),o.createBlock(o.unref(vo),{key:2,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128))])],2)}}}),Yte={class:"flex w-fit rounded-md bg-ed-gray-600 text-white text-sm max-w-full overflow-x-auto"},Jte=po(o.defineComponent({__name:"MainBubbleMenuList",props:{editor:{},mode:{},disableSuperInput:{type:Boolean},hasClipboard:{type:Boolean}},emits:["close-long-press-menu"],setup(t,{emit:e}){const n=t,r=e,{t:i}=At(),s=o.computed(()=>[...n.editor.extensionManager.extensions].find(p=>p.name==="superText")),a=o.ref(!1),l=o.computed(()=>n.editor.storage.deviceEnv.specialCharModal),u=f=>{const{state:p}=n.editor,{from:m}=p.selection;n.editor.commands.insertContentAt(m,f)},c=()=>{n.editor.chain().focus().toggleSuperInputMoblie().run(),r("close-long-press-menu");const f=BJ(n.editor);n.editor.commands.setSuperTextContent(f)};return(f,p)=>{var m,g,b;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Yte,[o.unref(s)&&!f.disableSuperInput&&f.mode!==o.unref(Me).EDITOR?(o.openBlock(),o.createElementBlock("button",{key:0,class:"bubble-menu-item",onClick:c},o.toDisplayString(o.unref(i)("editor.super")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[0]||(p[0]=v=>a.value=!0)},o.toDisplayString(o.unref(i)("editor.insertSpecial")),1),f.hasClipboard?(o.openBlock(),o.createElementBlock("button",{key:1,class:"bubble-menu-item",onClick:p[1]||(p[1]=v=>(f.editor.chain().focus().pasteContent().run(),r("close-long-press-menu")))},o.toDisplayString(o.unref(i)("editor.paste")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[2]||(p[2]=v=>f.editor.chain().focus().cutContent().run())},o.toDisplayString(o.unref(i)("editor.cut")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[3]||(p[3]=()=>{f.editor.chain().focus().copyContent().setTextSelection(0).blur().run(),r("close-long-press-menu")})},o.toDisplayString(o.unref(i)("editor.copy")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[4]||(p[4]=v=>f.editor.chain().focus().selectAll().run())},o.toDisplayString(o.unref(i)("editor.selectAll")),1)]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((m=o.unref(l))==null?void 0:m.component),{"is-open":o.unref(a),open:o.unref(a),class:o.normalizeClass((b=(g=o.unref(l))==null?void 0:g.componentProps)==null?void 0:b.class),onSelectedChar:u,onClose:p[5]||(p[5]=v=>a.value=!1)},null,40,["is-open","open","class"]))]))],64)}}}),[["__scopeId","data-v-b4e2ce28"]]),aS=o.defineComponent({__name:"MainBubbleMenu",props:{editor:{},mode:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=new c1,r=o.ref(!1),i=async()=>{var g,b;const m=await((b=(g=e.editor).hasClipboard)==null?void 0:b.call(g));r.value=!!m},s={duration:200,placement:"bottom",appendTo:()=>document.body.querySelector(".splitpanes__pane"),onShow:()=>{i(),n.sendToNative("hideIOSEditMenu")},getReferenceClientRect:()=>{if(e.editor&&!e.editor.isDestroyed){const{view:m,state:g}=e.editor,{from:b,to:v}=g.selection,y=m.dom.getBoundingClientRect(),x=m.coordsAtPos(b),k=m.coordsAtPos(v),E=Math.min(x.top,k.top),_=Math.max(x.bottom,k.bottom)-E;return new DOMRect(y.left,E,y.width,_)}return null}},a=o.ref(null),l=o.ref(!1),u=({editor:m,state:g})=>{if(e.editor.storage.deviceEnv.isForceCloseBubble||e.editor.isActive("link"))return!1;const{selection:b}=g,v=!b.empty&&jd(b)||l.value;return v&&m.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),v};function c(m){return f(m)&&m.touches.length>0?{x:m.touches[0].clientX,y:m.touches[0].clientY}:f(m)&&m.changedTouches.length>0?{x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY}:m instanceof MouseEvent?{x:m.clientX,y:m.clientY}:window.PointerEvent&&m instanceof PointerEvent?{x:m.clientX,y:m.clientY}:null}function f(m){return"touches"in m}function p(m){if(!e.editor)return;const g=c(m);if(!g)return;const b=e.editor.view,v=b.state,y=b.posAtCoords({left:g.x,top:g.y});if(!y||y.inside===-1)return;const x=y.pos,k=v.doc.content.size,E=Math.min(x+1,k);let C=v.tr;C=C.setSelection(De.create(v.doc,x,E)),b.dispatch(C),requestAnimationFrame(()=>{const _=b.state.tr.setSelection(De.create(b.state.doc,x,x));b.dispatch(_),b.focus()})}return o.onMounted(()=>{const m=e.editor.view.dom;Ne.onLongPress(o.ref(m),v=>{l.value=!0,p(v)},{delay:500,modifiers:{prevent:!1}});const g=()=>{e.editor.state.selection.empty&&(l.value=!1)};m.addEventListener("pointerdown",g);const b=({transaction:v})=>{l.value&&v.docChanged&&(l.value=!1,o.nextTick(()=>{var y;try{const x=(y=a.value)==null?void 0:y.$el;x&&x._tippy&&typeof x._tippy.hide=="function"&&x._tippy.hide()}catch{const k=e.editor.view,E=k.state,C=E.selection.from,_=E.doc.content.size,T=Math.min(C+1,_);k.dispatch(E.tr.setSelection(De.create(E.doc,C,T))),requestAnimationFrame(()=>{k.dispatch(k.state.tr.setSelection(De.create(k.state.doc,C,C)))})}}))};e.editor.on("transaction",b),o.onUnmounted(()=>{m.removeEventListener("pointerdown",g),e.editor.off("transaction",b)})}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Wu),{ref_key:"bubbleMenuRef",ref:a,editor:m.editor,"tippy-options":s,"should-show":u},{default:o.withCtx(()=>[o.createVNode(Jte,{editor:m.editor,mode:m.mode,disableSuperInput:m.disableSuperInput,hasClipboard:o.unref(r),onCloseLongPressMenu:g[0]||(g[0]=b=>l.value=!1)},null,8,["editor","mode","disableSuperInput","hasClipboard"])]),_:1},8,["editor"]))}}),Zte={class:"flex items-center justify-between label-large mb-2"},Qte={class:"mb-5"},Nte={class:"flex gap-x-3"},ene=o.defineComponent({__name:"SuperInputBottomSheet",props:{editor:{},open:{type:Boolean},bottomSheetComponent:{}},emits:["save","close"],setup(t,{emit:e}){const n=t,r=e,i=o.ref(""),s=o.ref(""),a=o.computed(()=>kh(i.value)),l=()=>{i.value="",s.value="",n.editor.commands.setSuperTextContent(i.value,s.value)},u=()=>{l(),r("close")};o.watch(()=>n.open,()=>{n.open&&(i.value=n.editor.storage.superText.superTextContent,s.value=n.editor.storage.superText.superTextPosition)});const c=()=>{i.value=n.editor.storage.superText.superTextContent},f=()=>{r("save",i.value,s.value),l()};return(p,m)=>{var b;const g=Ot;return o.openBlock(),o.createBlock(o.resolveDynamicComponent((b=p.bottomSheetComponent)==null?void 0:b.component),{"is-open":p.open,type:"bottom",title:"수퍼 입력","custom-class-content":"px-[12px]",onOnClose:u},{customContent:o.withCtx(()=>{var v;return[o.createElementVNode("div",Zte,[m[2]||(m[2]=o.createElementVNode("span",null,"내용",-1)),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{class:"w-fit [&_svg]:size-6 text-blue",variant:"ghost",size:"icon",onClick:c},{default:o.withCtx(()=>[o.createVNode(g,{name:"reset",class:"h-5 w-5"}),m[1]||(m[1]=o.createElementVNode("span",null,"초기화",-1))]),_:1}))])]}),body:o.withCtx(()=>[o.createElementVNode("div",Qte,[o.createVNode(kv,{modelValue:o.unref(i),"onUpdate:modelValue":m[0]||(m[0]=v=>o.isRef(i)?i.value=v:null),"parent-editor":p.editor,"spellcheck-enabled":!1,autofocus:"end"},null,8,["modelValue","parent-editor"])])]),footer:o.withCtx(()=>{var v,y;return[o.createElementVNode("div",Nte,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{variant:"outline",onClick:u},{default:o.withCtx(()=>m[3]||(m[3]=[o.createTextVNode(" 취소 ")])),_:1})),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((y=p.bottomSheetComponent)==null?void 0:y.button),{disabled:o.unref(a),variant:o.unref(a)?"disabled":"default",onClick:f},{default:o.withCtx(()=>m[4]||(m[4]=[o.createTextVNode(" 입력 ")])),_:1},8,["disabled","variant"]))])]}),_:1},40,["is-open"])}}}),lS=Un.create({name:"diffDel",parseHTML(){return[{tag:"span.diff-del"}]},renderHTML({HTMLAttributes:t}){return["span",{class:"diff-del",...t},0]}});function uS(t=100){let e=null,n=0;function r(l){n=l}function i(l){let u=l==null?void 0:l.parentElement;for(;u;){if(u.id==="comment-wrap-scroll"){u=u.parentElement;continue}const f=getComputedStyle(u).overflowY;if(f==="auto"||f==="scroll")return u;u=u.parentElement}return window}function s(l){e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{const{view:u,state:c}=l,{from:f}=c.selection,p=u.coordsAtPos(f),m=i(u.dom),g=o.unref(t);if(m===window){const C=window.innerHeight-g,_=p.top-C;_>0&&window.scrollBy({top:_,behavior:"smooth"});return}const b=m,v=b.getBoundingClientRect(),y=p.top-v.top,x=b.clientHeight-g,k=y-x;k>0&&b.scrollBy({top:k,behavior:"smooth"})})}function a(l){requestAnimationFrame(()=>{const{view:u,state:c}=l,{from:f}=c.selection,p=u.coordsAtPos(f),m=i(u.dom),g=o.unref(t);if(m===window){const T=window.innerHeight,A=T-n-g;if(!(p.top>A))return;const O=T-g,B=p.top-O;B>0&&window.scrollBy({top:B,behavior:"smooth"});return}const b=m,v=b.getBoundingClientRect(),y=p.top-v.top,x=b.clientHeight,k=x-n-g;if(!(y>k))return;const C=x-g,_=y-C;_>0&&b.scrollBy({top:_,behavior:"smooth"})})}return{onTypingScrollCaretNearBottom:s,onKeyboardShowScrollNearBottom:a,setKeyboardHeight:r}}const tne=o.defineComponent({__name:"EditorCommentMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.useAttrs(),a=wn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,{onTypingScrollCaretNearBottom:p}=uS(r.bottomOffset),m=o.inject("isEditable",o.ref(!0)),g=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled),editorProps:{attributes:{id:dr.COMMENT,[dr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:Et.throttle((k,E)=>E.key==="Enter"&&s.enter&&!E.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:k=>(k=k.replace(/\s*style="[^"]*"/g,""),k),handlePaste(k,E){var _;const C=((_=E.clipboardData)==null?void 0:_.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(C)?(E.preventDefault(),Wv(k,C.trim())):!1}},onCreate:({editor:k})=>{c(k)},onUpdate:Et.throttle(({editor:k})=>{l.value=!0;const E=v(k,r.output);i("update:modelValue",E),i("change",{editor:k,output:E}),c(k)},Ho),extensions:[lS,...Et.uniqBy(r.extensions,"name")],editable:m.value,onFocus:()=>{b()},onBlur:({editor:k,event:E})=>{i("onBlurEditor",E)},onSelectionUpdate:({editor:k})=>{k.isFocused&&p(k)}});function b(){i("setEditorSelected",g)}b();function v(k,E){if(!k)return"";if(k.isEmpty)return E==="json"?{}:"";switch(E){case"html":return h1(k,{removeNodes:[sc,wi]});case"json":return k.getJSON();case"text":return k.getText();default:return""}}function y(k){return k.every(E=>g==null?void 0:g.extensionManager.extensions.find(C=>C.name===E))}o.watch(()=>f.languages,()=>{g.commands.checkSpelling()}),o.watch(()=>r.modelValue,k=>{if(!g||Et.isEqual(v(g,r.output),k))return;const{from:E,to:C}=g.state.selection;g.commands.setTextSelection({from:E,to:C}),g.commands.setContent(gn(k,r.disabled),!1)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:k})=>{i("changed:selection",{editor:k})})}),o.watch(()=>r.disableSuperInput,()=>{const k=document.getElementById(dr.COMMENT);k==null||k.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>g==null?void 0:g.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",v(g,"html"))});function x(k){g.commands.focus("end"),b()}return Dh(g),o.onMounted(()=>{var k;r.autoFocus&&x(r.mode),(k=g==null?void 0:g.commands)!=null&&k.setIsMobile&&g.commands.setIsMobile(!0)}),o.watch(()=>r.mode,k=>{r.autoFocus&&x()}),o.watch(()=>m.value,k=>{var E;g==null||g.setEditable(k),(E=g==null?void 0:g.commands)!=null&&E.setIsEnableSuggestion&&g.commands.setIsEnableSuggestion(k)},{immediate:!0}),e({editor:g}),(k,E)=>{const C=aS,_=Lh,T=Rh,A=Ih;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!k.hideBubble&&!k.disabled&&o.unref(m)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(C,{editor:o.unref(g),mode:k.mode,"disable-super-input":k.disableSuperInput},null,8,["editor","mode","disable-super-input"]),y([o.unref(ac)])?(o.openBlock(),o.createBlock(_,{key:0,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ma)])?(o.openBlock(),o.createBlock(T,{key:1,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(hs)])?(o.openBlock(),o.createBlock(A,{key:2,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(g),spellcheck:"true",class:"flex-1 relative"},null,8,["editor"])],64)}}}),cS=o.defineComponent({__name:"ToolbarTitle",props:{titleBar:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("h3",{class:o.normalizeClass(o.unref(Ee)("rounded-[5px] px-2.5 py-[5px] min-h-[32px] flex items-center bg-ed-gray-500",[e.customClass],[e.titleBar.bgClass]))},o.toDisplayString(e.titleBar.title),3))}});function dS(t=!1,e=10){const n=e,r=90,i=50,s=n+1,a=o.ref(!0),l=o.ref(!0),u=o.ref(i),c=o.ref(i);return{HEADER_ONLY_SIZE:n,FULL_SIZE:r,SPLIT_SIZE:i,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,togglePane:m=>{if(o.unref(t)){l.value?(l.value=!1,c.value=n):(l.value=!0,c.value=r+n);return}if(m==="pane1"){a.value&&l.value?(a.value=!1,u.value=n,c.value=r):a.value&&!l.value?(a.value=!1,l.value=!0,u.value=n,c.value=r):!a.value&&l.value?(a.value=!0,u.value=i,c.value=i):(a.value=!0,u.value=r,c.value=n);return}m==="pane2"&&(a.value&&l.value?(l.value=!1,u.value=r,c.value=n):l.value&&!a.value?(l.value=!1,a.value=!0,u.value=r,c.value=n):!l.value&&a.value?(l.value=!0,u.value=i,c.value=i):(l.value=!0,u.value=n,c.value=r))},handlePaneResize:m=>{const g=m.panes;if(g&&g.length>=2){const b=g[0].size,v=g[1].size;u.value=b,c.value=v,b>n&&!a.value&&(a.value=!0),v>n&&!l.value&&(l.value=!0),b<=s&&a.value&&(a.value=!1),v<=s&&l.value&&(l.value=!1)}}}}const nne={class:"flex justify-between items-center relative gap-x-3"},rne={class:"flex items-center gap-x-4"},Gc=o.defineComponent({__name:"CoreEditorMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:""},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},letterSpacingDefault:{default:""},contentTextStyle:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{default:""},titleBarComment:{default:null},titleBarContent:{default:null},fieldNameComment:{default:null},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{default:!1},isShowLineNumber:{type:Boolean,default:!1},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean,default:!1},isEditorViewSplitContent:{type:Boolean,default:!1},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){var ue;const r=t,i=n,s=new c1;o.provide("isMobile",!0),Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE);const a=o.useAttrs(),l=wn(),{state:u,isFullscreen:c,isReady:f,editor:p,updateEditorState:m,checkSpellStore:g,setImageAttachment:b,setEditorContentMobile:v,footerTargetRef:y}=l,{markAsFocused:x,insertHtml:k}=Iee(),E=o.computed(()=>r.isShowFormatControlBar&&r.mode===Me.EDITOR&&B&&!r.isEditorView),C=o.computed(()=>E.value?100:40),_=o.ref(!1),{onTypingScrollCaretNearBottom:T,onKeyboardShowScrollNearBottom:A,setKeyboardHeight:V}=uS(C);function O(){s.isNativeWebViewAvailable()&&(s.receiveDataFromNative(s1.KEYBOARD_DID_SHOW,j=>{_.value=!0,V(j.height),setTimeout(()=>{var Q;(Q=F.value)!=null&&Q.isFocused&&A(F.value)},50)}),s.receiveDataFromNative(s1.KEYBOARD_DID_HIDE,()=>{_.value=!1}))}const B=o.ref(!r.disabled&&!r.readonly);o.provide("isEditable",B);const $=o.ref(r.fontSizeDefault),H=o.ref(r.fontFamilyDefault),X=o.ref(r.fontWeightDefault),ee=o.ref(r.letterSpacingDefault);o.provide("fontSize",$),o.provide("fontFamily",H),o.provide("fontWeight",X),o.provide("letterSpacing",ee);const z=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),L=new Vo({coreExtensionOptions:{clipboardTextSerializer:{blockSeparator:r.blockSeparatorPolicy==="line"?`
|
|
353
|
+
`,xn=Qe.querySelectorAll("p"),gr=xn.length>0?Array.from(xn).map(Ln=>Ln.textContent||"").join(Bt):Qe.textContent||"";(_t=ae.clipboardData)==null||_t.clearData(),(oe=ae.clipboardData)==null||oe.setData("text/html",qt),(Ae=ae.clipboardData)==null||Ae.setData("text/plain",gr),ae.preventDefault()}catch{}};o.onMounted(()=>{ue(r.mode),j(r.mode),y(re),k.value||document.addEventListener("copy",Q,!0)}),o.onBeforeUnmount(()=>{document.removeEventListener("copy",Q,!0)}),o.watch(()=>r.mode,ae=>{ue(ae),j(ae)});const pe=o.ref(null),Re=()=>{var Be;(Be=pe.value)!=null&&Be.editor.commands.focusInvalidChar()||re.commands.focusInvalidChar()};u.focusFirstInvalidChar.value=Re,o.onActivated(()=>{u.focusFirstInvalidChar.value=Re});const et=o.computed(()=>{var Be,_t,oe;const ae=((Be=r.fieldNameComment)==null?void 0:Be.label)||((_t=r.fieldNameCommentCuesheet)==null?void 0:_t.label)||((oe=r.fieldNameContent)==null?void 0:oe.label);return r.disabled&&ae});return e({editor:re}),(ae,Be)=>{var qt;const _t=Lh,oe=Rh,Ae=Ih,He=C8,rt=mz,Qe=xR;return o.unref(re)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",class:o.normalizeClass(["vdc-editor w-full flex flex-col",[ae.editorClass,{"outline-ed-primary":o.unref(re).isFocused,"outline-ed-border":!o.unref(re).isFocused}]]),style:o.normalizeStyle(o.unref(B))},[!ae.hideBubble&&!ae.disabled&&o.unref(k)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[je([o.unref(ac)])?(o.openBlock(),o.createBlock(_t,{key:0,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(ma)])?(o.openBlock(),o.createBlock(oe,{key:1,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(hs)])?(o.openBlock(),o.createBlock(Ae,{key:2,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0),je([o.unref(Il),o.unref(wi)])?(o.openBlock(),o.createBlock(He,{key:3,editor:o.unref(re)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),ae.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(rt,{key:1,editor:o.unref(re),"editor-comment":(qt=o.unref(pe))==null?void 0:qt.editor,mode:ae.mode,class:"mb-2","custom-class-toolbar":ae.customClassToolbar,"toolbar-extension-order":ae.toolbarExtensionOrder},null,8,["editor","editor-comment","mode","custom-class-toolbar","toolbar-extension-order"])),o.createElementVNode("div",{ref_key:"editorWrapRef",ref:q,class:o.normalizeClass(o.unref(Ee)("space-y-2 flex-1 flex flex-col break-keep",o.unref(me)&&"[&_*]:!font-inherit",o.unref(me)&&"[&_*]:!text-font-size-inherit")),style:o.normalizeStyle(o.unref(J))},[o.unref(et)?(o.openBlock(),o.createBlock(Qe,{key:0,extensions:ae.extensions,mode:ae.mode,"hide-comment":ae.hideComment,"field-name-comment":ae.fieldNameComment,"field-name-comment-cuesheet":ae.fieldNameCommentCuesheet,"field-name-content":ae.fieldNameContent,comment:ae.comment,"comment-cuesheet":ae.commentCuesheet,content:ae.modelValue,"min-chars":ae.minChar.content,"font-size":o.unref(_)},null,8,["extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","min-chars","font-size"])):(o.openBlock(),o.createElementBlock("div",{key:1,class:"space-y-2 flex-1 flex flex-col",style:o.normalizeStyle({minWidth:`${o.unref(Te)}px`})},[ae.mode===o.unref(Me).REPORT&&!ae.hideComment?(o.openBlock(),o.createBlock(ote,{key:0,ref_key:"editorCommentRef",ref:pe,mode:o.unref(Me).REPORT,extensions:ae.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":ae.disableSuperInput,"is-open-super-view":o.unref(Rt),"super-preview-custom-class":ae.superPreviewCustomClass,"fixed-super-preview-width":ae.fixedSuperPreviewWidth,"min-char":ae.minChar,"font-size":o.unref(_),style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(on)(o.unref(st))}:{height:o.unref(on)(o.unref(ge)),minHeight:o.unref(on)(o.unref(Fe))}),"editor-content-instance":o.unref(re),class:"relative overflow-y-auto","onUpdate:modelValue":Be[0]||(Be[0]=Bt=>i("update:comment",Bt))},null,8,["mode","extensions","model-value","disabled","disable-super-input","is-open-super-view","super-preview-custom-class","fixed-super-preview-width","min-char","font-size","style","editor-content-instance"])):o.createCommentVNode("",!0),o.createElementVNode("div",{id:"editor-container",class:"relative overflow-y-auto flex flex-col",style:o.normalizeStyle(r.autoHeight?{height:"auto",minHeight:o.unref(on)(o.unref(Fe))}:{height:o.unref(on)(o.unref(xe))})},[o.createElementVNode("div",Ete,[o.withDirectives(o.createVNode(Yee,{ref_key:"superTextViewRef",ref:ce,editor:o.unref(re),"super-preview-custom-class":ae.superPreviewCustomClass,"min-chars":ae.minChar.superPreview,"font-size":o.unref(_),"fixed-width":ae.fixedSuperPreviewWidth},null,8,["editor","super-preview-custom-class","min-chars","font-size","fixed-width"]),[[o.vShow,o.unref(Rt)]]),o.createElementVNode("div",{id:"editor-panel",ref_key:"contentInner",ref:te,class:"flex-1 p-2.5 border border-ed-gray-400 rounded-[3px] focus-within:border-ed-input-focus"},[o.createVNode(Ev,{ref_key:"selectContextMenuRef",ref:qe,editor:o.unref(re),mode:ae.mode,"super-text-store":o.unref(g)},{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{editor:o.unref(re),spellcheck:"true",class:o.normalizeClass(o.unref(Ee)("h-full break-all",ae.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"))},null,8,["editor","class"])]),_:1},8,["editor","mode","super-text-store"])],512)])],4)],4))],6),o.createVNode(kte,{modelValue:o.unref($),"onUpdate:modelValue":Be[1]||(Be[1]=Bt=>o.isRef($)?$.value=Bt:null),"total-matches":o.unref(L),"current-match-index":o.unref(D),onSearchDown:Y,onSearchUp:ie,onReplace:fe,onReplaceAll:ke,onRefresh:K},null,8,["modelValue","total-matches","current-match-index"])],6)):o.createCommentVNode("",!0)}}}),Ste={class:"relative px-2.5"},_te={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Tte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ate=o.defineComponent({__name:"ToolbarFormat",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[]},threshold:{default:5}},setup(t){const{t:e}=At(),n=t,r=[Yf,lc,xi,Nf],i=o.computed(()=>{const m=[...n.editor.extensionManager.extensions],g=jC(m,{[zC]:0});let b=[];for(const v of g){const{button:y,divider:x=!1,spacer:k=!1,toolbar:E=!0}=v.options;if(!y||!f1(y)||!E)continue;const C=y({editor:n.editor,extension:v,t:o.unref(e),isMobile:!0});if(Array.isArray(C)){const _=C.map((T,A)=>({id:`${v.name}`,button:T,divider:A===C.length-1?x:!1,spacer:A===0?k:!1,buttonName:T.buttonName}));b=[...b,..._];continue}b.push({button:C,divider:x,spacer:k,id:`${v.name}`})}return n.activeExtensions.length?b.filter(v=>v.id&&n.activeExtensions.includes(v.id)):(r.length&&(b=b.filter(v=>v.id&&!r.includes(v.id))),b=b.map(v=>{const y=["videoUpload","heading","strike","color","fontSize","fontFamily"],x=["redo"],k=b.some(_=>_.id==="imageUpload"),E=b.some(_=>_.id==="videoUpload");E||y.push("imageUpload"),!k&&!E&&y.push("link");const C=y.includes(v.id??"")||x.includes(v.buttonName??"");return{...v,separator:C}}),b)}),s=m=>m.id==="spellchecker"?"!text-ed-blue !bg-white !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":m.button.componentProps.customClass,a=m=>m.id==="spellchecker"?"Spellchecker":m.button.componentProps.icon,l=o.ref(null),u=o.ref(!1),c=o.ref(!1);function f(){const m=l.value;if(!m)return;const{scrollLeft:g,scrollWidth:b,clientWidth:v}=m;if(!(b>v+1)){u.value=!1,c.value=!1;return}const x=g<=n.threshold,k=g+v>=b-n.threshold;u.value=!x,c.value=!k}const p=Ne.useThrottleFn(f,10);return Ne.useEventListener(l,"scroll",p),Ne.useResizeObserver(l,p),Ne.useEventListener(window,"resize",p),(m,g)=>(o.openBlock(),o.createElementBlock("div",{id:"tool-bar-format",class:o.normalizeClass(o.unref(Ee)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2",!i.value.length&&"hidden"))},[o.createElementVNode("div",Ste,[o.unref(u)?(o.openBlock(),o.createElementBlock("div",_te)):o.createCommentVNode("",!0),o.unref(c)?(o.openBlock(),o.createElementBlock("div",Tte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:l,id:"tool-bar-format-scroll",class:"text-ed-gray-700 flex gap-2 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative"},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(b,v)=>{var y;return o.openBlock(),o.createElementBlock(o.Fragment,{key:v},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(b.button.component),o.mergeProps({id:b.id,ref_for:!0},b.button.componentProps,{editor:m.editor,disabled:m.disabled||((y=b.button.componentProps)==null?void 0:y.disabled),"custom-class":s(b),icon:a(b)}),o.createSlots({_:2},[o.renderList(b.button.componentSlots,(x,k,E)=>({name:`${k}`,fn:o.withCtx(C=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(x),o.mergeProps({ref_for:!0},C==null?void 0:C.props,{id:b.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),b.separator?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-5"})):o.createCommentVNode("",!0)],64)}),128))],512)])],2))}}),Mte={class:"relative px-2.5"},Ote={key:0,class:"w-12 rounded-tl-full rounded-bl-full pointer-events-none absolute inset-y-0 left-0 bg-white-fade-left z-10","aria-hidden":"true"},Bte={key:1,class:"w-12 rounded-tr-full rounded-br-full pointer-events-none absolute inset-y-0 right-0 bg-white-fade-right z-10","aria-hidden":"true"},Ite={class:"flex items-center gap-2"},Rte={class:"mt-3"},Lte=o.defineComponent({__name:"ToolbarImage",props:{editor:{},disabled:{type:Boolean,default:!1},threshold:{default:10}},setup(t){const e=t,{t:n}=At(),r=o.ref("100"),i=o.ref(),s=o.ref(),a=o.ref(),l=["left","center","right"],u={left:"AlignLeft",center:"AlignCenter",right:"AlignRight"};function c(X){X==null||X.preventDefault(),e.editor.getAttributes("image").src&&(e.editor.commands.updateImage({width:i.value?`${i.value}px`:null}),cf())}function f(X){const ee=Math.max(0,Math.min(100,parseInt(r.value)));e.editor.commands.updateImage({width:`${ee}%`}),cf()}function p(X){e.editor.commands.updateAttributes("image",{textAlign:X})}o.watch(r,()=>{r.value&&f()}),o.watch(()=>e.editor.getAttributes("image"),X=>{X&&(i.value=Math.round(parseFloat(X.originWidth)),s.value=Math.round(parseFloat(X.originHeight)),a.value=X.originWidth/X.originHeight)});function m(){s.value&&a.value?i.value=Math.max(30,Math.round(s.value*a.value)):i.value=null}function g(){i.value&&a.value?s.value=Math.max(20,Math.round(i.value/a.value)):s.value=null}function b(X){p(X)}function v(){const X=e.editor.getAttributes("image"),{flipX:ee}=X;e.editor.commands.updateImage({flipX:!ee})}function y(){const X=e.editor.getAttributes("image"),{flipY:ee}=X;e.editor.commands.updateImage({flipY:!ee})}function x(){const{state:X,dispatch:ee}=e.editor.view;ol(X,ee)}function k(){const{state:X,dispatch:ee}=e.editor.view,{tr:z,selection:L}=X;if(!(L instanceof Pe))return;const D=L.from,F=X.doc.nodeAt(D);if(!F)return;const K=X.doc.resolve(D).nodeBefore;if(!K)return;const Y=D-K.nodeSize,ie=z.delete(D,D+F.nodeSize).insert(Y,F).setSelection(Pe.create(z.doc,Y));ee(ie)}function E(){const{state:X,dispatch:ee}=e.editor.view,{tr:z,doc:L,selection:D}=X;if(!(D instanceof Pe))return;const F=D.from,R=L.nodeAt(F);if(!R)return;const K=F+R.nodeSize;if(K>=L.content.size)return;const Y=L.nodeAt(K);if(!Y)return;const ie=K+Y.nodeSize-R.nodeSize,fe=F+Y.nodeSize,ke=z.delete(F,F+R.nodeSize).insert(ie,R).setSelection(Pe.create(z.doc,fe));ee(ke)}const C=o.ref(null),_=o.ref(!1),T=o.ref(!1);function A(){const X=C.value;if(!X)return;const{scrollLeft:ee,scrollWidth:z,clientWidth:L}=X;if(!(z>L+1)){_.value=!1,T.value=!1;return}const F=ee<=e.threshold,R=ee+L>=z-e.threshold;_.value=!F,T.value=!R}const V=Ne.useThrottleFn(A,10);Ne.useEventListener(C,"scroll",V),Ne.useResizeObserver(C,V),Ne.useEventListener(window,"resize",V);const O=o.inject("isMobile",!1),B=`dropdown-trigger-${Zr(10)}`,{isOpen:$}=yp({scrollEl:"tool-bar-image-scroll",ignoreSelector:`[data-radix-popper-content-wrapper], .${B}`}),H=o.computed(()=>O?{modal:!1,open:$.value,"onUpdate:open":X=>$.value=X}:{});return(X,ee)=>{const z=Ge,L=vo,D=ga,F=cc,R=bs,K=Rl,Y=op,ie=rp,fe=gs,ke=ms;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar-image",class:o.normalizeClass(o.unref(Ee)("bg-white border border-gray-100 dark:bg-ed-gray-500 dark:border-ed-muted rounded-full shadow-elevation2"))},[o.createElementVNode("div",Mte,[_.value?(o.openBlock(),o.createElementBlock("div",Ote)):o.createCommentVNode("",!0),T.value?(o.openBlock(),o.createElementBlock("div",Bte)):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"scrollEl",ref:C,id:"tool-bar-image-scroll",class:"text-ed-gray-700 flex gap-1.5 items-center overflow-x-auto overflow-y-hidden min-h-11 scrollbar-hide overflow-scrolling-touch relative whitespace-nowrap"},[o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.flipX"),icon:"FlipVertical",action:v},null,8,["tooltip"]),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.flipY"),icon:"FlipHorizontal",action:y},null,8,["tooltip"]),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.moveUp"),icon:"MoveUp",action:k,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(z,{tooltip:o.unref(n)("editor.image.menu.moveDown"),icon:"MoveDown",action:E,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"]),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(ke,o.normalizeProps(o.guardReactiveProps(o.unref(H))),{default:o.withCtx(()=>[o.createVNode(D,{class:o.normalizeClass(B)},{default:o.withCtx(()=>[o.createVNode(z,{title:o.unref(n)("editor.image.menu.size"),icon:"ImageSize"},null,8,["title"])]),_:1}),o.createVNode(fe,{class:"w-84 inside-toolbar"},{default:o.withCtx(()=>[o.createElementVNode("div",Ite,[o.createVNode(F,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.width")),1)]),_:1}),o.createVNode(R,{id:"maxWidth",modelValue:i.value,"onUpdate:modelValue":ee[0]||(ee[0]=re=>i.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:g,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"]),o.createVNode(F,{for:"maxWidth",class:"whitespace-nowrap"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(o.unref(n)("editor.image.menu.size.height")),1)]),_:1}),o.createVNode(R,{id:"maxWidth",modelValue:s.value,"onUpdate:modelValue":ee[1]||(ee[1]=re=>s.value=re),type:"number",class:"w-20 h-8 [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none",onInput:m,onKeyup:o.withKeys(c,["enter"])},null,8,["modelValue"])]),o.createElementVNode("div",Rte,[o.createVNode(ie,{"model-value":r.value,"onUpdate:modelValue":[ee[2]||(ee[2]=re=>r.value=re),ee[3]||(ee[3]=re=>{r.value=re})]},{default:o.withCtx(()=>[o.createVNode(Y,null,{default:o.withCtx(()=>[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["25","50","75","100"],re=>o.createVNode(K,{key:re,value:re},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(re)+"% ",1)]),_:2},1032,["value"])),64))]),_:1})]),_:1},8,["model-value"])])]),_:1})]),_:1},16),o.createVNode(L,{orientation:"vertical",class:"h-5"}),(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(l,(re,me)=>o.createVNode(z,{key:me,tooltip:o.unref(n)(`editor.textalign.${re}.tooltip`),icon:u[re],action:()=>b(re),disabled:!X.editor.can().setTextAlign(re),"is-active":()=>X.editor.isActive({textAlign:re})||!1},null,8,["tooltip","icon","action","disabled","is-active"])),64)),o.createVNode(L,{orientation:"vertical",class:"h-5"}),o.createVNode(z,{tooltip:o.unref(n)("editor.remove"),icon:"Trash2",action:x,disabled:!X.editor.isEditable},null,8,["tooltip","disabled"])],512)])],2)}}}),Dte=o.defineComponent({__name:"Switch",props:{defaultChecked:{type:Boolean},checked:{type:Boolean},disabled:{type:Boolean},required:{type:Boolean},name:{},id:{},value:{},asChild:{type:Boolean},as:{},class:{},customClassThumb:{}},emits:["update:checked"],setup(t,{emit:e}){const n=t,r=e,i=o.computed(()=>{const{class:a,customClassThumb:l,...u}=n;return u}),s=Pt(i,r);return(a,l)=>(o.openBlock(),o.createBlock(o.unref(RV),o.mergeProps(o.unref(s),{class:o.unref(Ee)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ed-ring focus-visible:ring-offset-2 focus-visible:ring-offset-ed-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-ed-primary data-[state=unchecked]:bg-ed-input",n.class)}),{default:o.withCtx(()=>[o.createVNode(o.unref(LV),{class:o.normalizeClass(o.unref(Ee)("pointer-events-none block h-4 w-4 rounded-full bg-ed-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0",n.customClassThumb))},null,8,["class"])]),_:1},16,["class"]))}}),Pte={class:"text-red-500 relative -top-1"},Kc=o.defineComponent({__name:"EditorFieldName",props:{fieldName:{},disabled:{type:Boolean,default:!1},isRequired:{type:Boolean,default:!1}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("label-large",e.fieldName.customClass))},[o.createElementVNode("span",null,o.toDisplayString(e.fieldName.label),1),o.withDirectives(o.createElementVNode("span",Pte," •",512),[[o.vShow,e.fieldName.isRequired]])],2))}}),Fh={__name:"splitpanes",props:{horizontal:{type:Boolean,default:!1},pushOtherPanes:{type:Boolean,default:!0},maximizePanes:{type:Boolean,default:!0},rtl:{type:Boolean,default:!1},firstSplitter:{type:Boolean,default:!1}},emits:["ready","resize","resized","pane-click","pane-maximize","pane-add","pane-remove","splitter-click","splitter-dblclick"],setup(t,{emit:e}){const n=e,r=t,i=o.useSlots(),s=o.ref([]),a=o.computed(()=>s.value.reduce((J,te)=>(J[~~te.id]=te)&&J,{})),l=o.computed(()=>s.value.length),u=o.ref(null),c=o.ref(!1),f=o.ref({mouseDown:!1,dragging:!1,activeSplitter:null,cursorOffset:0}),p=o.ref({splitter:null,timeoutId:null}),m=o.computed(()=>({[`splitpanes splitpanes--${r.horizontal?"horizontal":"vertical"}`]:!0,"splitpanes--dragging":f.value.dragging})),g=()=>{document.addEventListener("mousemove",y,{passive:!1}),document.addEventListener("mouseup",x),"ontouchstart"in window&&(document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("touchend",x))},b=()=>{document.removeEventListener("mousemove",y,{passive:!1}),document.removeEventListener("mouseup",x),"ontouchstart"in window&&(document.removeEventListener("touchmove",y,{passive:!1}),document.removeEventListener("touchend",x))},v=(J,te)=>{const ne=J.target.closest(".splitpanes__splitter");if(ne){const{left:se,top:ce}=ne.getBoundingClientRect(),{clientX:_e,clientY:Te}="ontouchstart"in window&&J.touches?J.touches[0]:J;f.value.cursorOffset=r.horizontal?Te-ce:_e-se}g(),f.value.mouseDown=!0,f.value.activeSplitter=te},y=J=>{f.value.mouseDown&&(J.preventDefault(),f.value.dragging=!0,requestAnimationFrame(()=>{A(_(J)),re("resize",{event:J},!0)}))},x=J=>{f.value.dragging&&(window.getSelection().removeAllRanges(),re("resized",{event:J},!0)),f.value.mouseDown=!1,f.value.activeSplitter=null,setTimeout(()=>{f.value.dragging=!1,b()},100)},k=(J,te)=>{"ontouchstart"in window&&(J.preventDefault(),p.value.splitter===te?(clearTimeout(p.value.timeoutId),p.value.timeoutId=null,E(J,te),p.value.splitter=null):(p.value.splitter=te,p.value.timeoutId=setTimeout(()=>p.value.splitter=null,500))),f.value.dragging||re("splitter-click",{event:J,index:te},!0)},E=(J,te)=>{if(re("splitter-dblclick",{event:J,index:te},!0),r.maximizePanes){let ne=0;s.value=s.value.map((se,ce)=>(se.size=ce===te?se.max:se.min,ce!==te&&(ne+=se.min),se)),s.value[te].size-=ne,re("pane-maximize",{event:J,index:te,pane:s.value[te]}),re("resized",{event:J,index:te},!0)}},C=(J,te)=>{re("pane-click",{event:J,index:a.value[te].index,pane:a.value[te]})},_=J=>{const te=u.value.getBoundingClientRect(),{clientX:ne,clientY:se}="ontouchstart"in window&&J.touches?J.touches[0]:J;return{x:ne-(r.horizontal?0:f.value.cursorOffset)-te.left,y:se-(r.horizontal?f.value.cursorOffset:0)-te.top}},T=J=>{J=J[r.horizontal?"y":"x"];const te=u.value[r.horizontal?"clientHeight":"clientWidth"];return r.rtl&&!r.horizontal&&(J=te-J),J*100/te},A=J=>{const te=f.value.activeSplitter;let ne={prevPanesSize:O(te),nextPanesSize:B(te),prevReachedMinPanes:0,nextReachedMinPanes:0};const se=0+(r.pushOtherPanes?0:ne.prevPanesSize),ce=100-(r.pushOtherPanes?0:ne.nextPanesSize),_e=Math.max(Math.min(T(J),ce),se);let Te=[te,te+1],Ue=s.value[Te[0]]||null,Ke=s.value[Te[1]]||null;const je=Ue.max<100&&_e>=Ue.max+ne.prevPanesSize,Rt=Ke.max<100&&_e<=100-(Ke.max+B(te+1));if(je||Rt){je?(Ue.size=Ue.max,Ke.size=Math.max(100-Ue.max-ne.prevPanesSize-ne.nextPanesSize,0)):(Ue.size=Math.max(100-Ke.max-ne.prevPanesSize-B(te+1),0),Ke.size=Ke.max);return}if(r.pushOtherPanes){const q=V(ne,_e);if(!q)return;({sums:ne,panesToResize:Te}=q),Ue=s.value[Te[0]]||null,Ke=s.value[Te[1]]||null}Ue!==null&&(Ue.size=Math.min(Math.max(_e-ne.prevPanesSize-ne.prevReachedMinPanes,Ue.min),Ue.max)),Ke!==null&&(Ke.size=Math.min(Math.max(100-_e-ne.nextPanesSize-ne.nextReachedMinPanes,Ke.min),Ke.max))},V=(J,te)=>{const ne=f.value.activeSplitter,se=[ne,ne+1];return te<J.prevPanesSize+s.value[se[0]].min&&(se[0]=$(ne).index,J.prevReachedMinPanes=0,se[0]<ne&&s.value.forEach((ce,_e)=>{_e>se[0]&&_e<=ne&&(ce.size=ce.min,J.prevReachedMinPanes+=ce.min)}),J.prevPanesSize=O(se[0]),se[0]===void 0)?(J.prevReachedMinPanes=0,s.value[0].size=s.value[0].min,s.value.forEach((ce,_e)=>{_e>0&&_e<=ne&&(ce.size=ce.min,J.prevReachedMinPanes+=ce.min)}),s.value[se[1]].size=100-J.prevReachedMinPanes-s.value[0].min-J.prevPanesSize-J.nextPanesSize,null):te>100-J.nextPanesSize-s.value[se[1]].min&&(se[1]=H(ne).index,J.nextReachedMinPanes=0,se[1]>ne+1&&s.value.forEach((ce,_e)=>{_e>ne&&_e<se[1]&&(ce.size=ce.min,J.nextReachedMinPanes+=ce.min)}),J.nextPanesSize=B(se[1]-1),se[1]===void 0)?(J.nextReachedMinPanes=0,s.value.forEach((ce,_e)=>{_e<l.value-1&&_e>=ne+1&&(ce.size=ce.min,J.nextReachedMinPanes+=ce.min)}),s.value[se[0]].size=100-J.prevPanesSize-B(se[0]-1),null):{sums:J,panesToResize:se}},O=J=>s.value.reduce((te,ne,se)=>te+(se<J?ne.size:0),0),B=J=>s.value.reduce((te,ne,se)=>te+(se>J+1?ne.size:0),0),$=J=>[...s.value].reverse().find(te=>te.index<J&&te.size>te.min)||{},H=J=>s.value.find(te=>te.index>J+1&&te.size>te.min)||{},X=()=>{var J;const te=Array.from(((J=u.value)==null?void 0:J.children)||[]);for(const ne of te){const se=ne.classList.contains("splitpanes__pane"),ce=ne.classList.contains("splitpanes__splitter");!se&&!ce&&(ne.remove(),console.warn("Splitpanes: Only <pane> elements are allowed at the root of <splitpanes>. One of your DOM nodes was removed."))}},ee=(J,te,ne=!1)=>{const se=J-1,ce=document.createElement("div");ce.classList.add("splitpanes__splitter"),ne||(ce.onmousedown=_e=>v(_e,se),typeof window<"u"&&"ontouchstart"in window&&(ce.ontouchstart=_e=>v(_e,se)),ce.onclick=_e=>k(_e,se+1)),ce.ondblclick=_e=>E(_e,se+1),te.parentNode.insertBefore(ce,te)},z=J=>{J.onmousedown=void 0,J.onclick=void 0,J.ondblclick=void 0,J.remove()},L=()=>{var J;const te=Array.from(((J=u.value)==null?void 0:J.children)||[]);for(const se of te)se.className.includes("splitpanes__splitter")&&z(se);let ne=0;for(const se of te)se.className.includes("splitpanes__pane")&&(!ne&&r.firstSplitter?ee(ne,se,!0):ne&&ee(ne,se),ne++)},D=({uid:J,...te})=>{const ne=a.value[J];for(const[se,ce]of Object.entries(te))ne[se]=ce},F=J=>{var te;let ne=-1;Array.from(((te=u.value)==null?void 0:te.children)||[]).some(se=>(se.className.includes("splitpanes__pane")&&ne++,se.isSameNode(J.el))),s.value.splice(ne,0,{...J,index:ne}),s.value.forEach((se,ce)=>se.index=ce),c.value&&o.nextTick(()=>{L(),K({addedPane:s.value[ne]}),re("pane-add",{pane:s.value[ne]})})},R=J=>{const te=s.value.findIndex(se=>se.id===J);s.value[te].el=null;const ne=s.value.splice(te,1)[0];s.value.forEach((se,ce)=>se.index=ce),o.nextTick(()=>{L(),re("pane-remove",{pane:ne}),K({removedPane:{...ne}})})},K=(J={})=>{!J.addedPane&&!J.removedPane?ie():s.value.some(te=>te.givenSize!==null||te.min||te.max<100)?fe(J):Y(),c.value&&re("resized")},Y=()=>{const J=100/l.value;let te=0;const ne=[],se=[];for(const ce of s.value)ce.size=Math.max(Math.min(J,ce.max),ce.min),te-=ce.size,ce.size>=ce.max&&ne.push(ce.id),ce.size<=ce.min&&se.push(ce.id);te>.1&&ke(te,ne,se)},ie=()=>{let J=100;const te=[],ne=[];let se=0;for(const _e of s.value)J-=_e.size,_e.givenSize!==null&&se++,_e.size>=_e.max&&te.push(_e.id),_e.size<=_e.min&&ne.push(_e.id);let ce=100;if(J>.1){for(const _e of s.value)_e.givenSize===null&&(_e.size=Math.max(Math.min(J/(l.value-se),_e.max),_e.min)),ce-=_e.size;ce>.1&&ke(ce,te,ne)}},fe=({addedPane:J,removedPane:te}={})=>{let ne=100/l.value,se=0;const ce=[],_e=[];((J==null?void 0:J.givenSize)??null)!==null&&(ne=(100-J.givenSize)/(l.value-1));for(const Te of s.value)se-=Te.size,Te.size>=Te.max&&ce.push(Te.id),Te.size<=Te.min&&_e.push(Te.id);if(!(Math.abs(se)<.1)){for(const Te of s.value)(J==null?void 0:J.givenSize)!==null&&(J==null?void 0:J.id)===Te.id||(Te.size=Math.max(Math.min(ne,Te.max),Te.min)),se-=Te.size,Te.size>=Te.max&&ce.push(Te.id),Te.size<=Te.min&&_e.push(Te.id);se>.1&&ke(se,ce,_e)}},ke=(J,te,ne)=>{let se;J>0?se=J/(l.value-te.length):se=J/(l.value-ne.length),s.value.forEach((ce,_e)=>{if(J>0&&!te.includes(ce.id)){const Te=Math.max(Math.min(ce.size+se,ce.max),ce.min),Ue=Te-ce.size;J-=Ue,ce.size=Te}else if(!ne.includes(ce.id)){const Te=Math.max(Math.min(ce.size+se,ce.max),ce.min),Ue=Te-ce.size;J-=Ue,ce.size=Te}}),Math.abs(J)>.1&&o.nextTick(()=>{c.value&&console.warn("Splitpanes: Could not resize panes correctly due to their constraints.")})},re=(J,te=void 0,ne=!1)=>{const se=(te==null?void 0:te.index)??f.value.activeSplitter??null;n(J,{...te,...se!==null&&{index:se},...ne&&se!==null&&{prevPane:s.value[se-(r.firstSplitter?1:0)],nextPane:s.value[se+(r.firstSplitter?0:1)]},panes:s.value.map(ce=>({min:ce.min,max:ce.max,size:ce.size}))})};o.watch(()=>r.firstSplitter,()=>L()),o.onMounted(()=>{X(),L(),K(),re("ready"),c.value=!0}),o.onBeforeUnmount(()=>c.value=!1);const me=()=>{var J;return o.h("div",{ref:u,class:m.value},(J=i.default)==null?void 0:J.call(i))};return o.provide("panes",s),o.provide("indexedPanes",a),o.provide("horizontal",o.computed(()=>r.horizontal)),o.provide("requestUpdate",D),o.provide("onPaneAdd",F),o.provide("onPaneRemove",R),o.provide("onPaneClick",C),(J,te)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(me)))}},ei={__name:"pane",props:{size:{type:[Number,String]},minSize:{type:[Number,String],default:0},maxSize:{type:[Number,String],default:100}},setup(t){var e;const n=t,r=o.inject("requestUpdate"),i=o.inject("onPaneAdd"),s=o.inject("horizontal"),a=o.inject("onPaneRemove"),l=o.inject("onPaneClick"),u=(e=o.getCurrentInstance())==null?void 0:e.uid,c=o.inject("indexedPanes"),f=o.computed(()=>c.value[u]),p=o.ref(null),m=o.computed(()=>{const y=isNaN(n.size)||n.size===void 0?0:parseFloat(n.size);return Math.max(Math.min(y,b.value),g.value)}),g=o.computed(()=>{const y=parseFloat(n.minSize);return isNaN(y)?0:y}),b=o.computed(()=>{const y=parseFloat(n.maxSize);return isNaN(y)?100:y}),v=o.computed(()=>{var y;return`${s.value?"height":"width"}: ${(y=f.value)==null?void 0:y.size}%`});return o.watch(()=>m.value,y=>r({uid:u,size:y})),o.watch(()=>g.value,y=>r({uid:u,min:y})),o.watch(()=>b.value,y=>r({uid:u,max:y})),o.onMounted(()=>{i({id:u,el:p.value,min:g.value,max:b.value,givenSize:n.size===void 0?null:m.value,size:m.value})}),o.onBeforeUnmount(()=>a(u)),(y,x)=>(o.openBlock(),o.createElementBlock("div",{ref_key:"paneEl",ref:p,class:"splitpanes__pane",onClick:x[0]||(x[0]=k=>o.unref(l)(k,y._.uid)),style:o.normalizeStyle(v.value)},[o.renderSlot(y.$slots,"default")],4))}},Vte={class:"px-5 py-2.5"},Fte=["innerHTML"],$te={key:0,class:"px-5 py-2.5"},Hte=["innerHTML"],zte={key:1,class:"px-5 py-2.5"},Ute=["innerHTML"],Wte={key:2,class:"px-5 py-2.5"},jte=["innerHTML"],qte={class:"px-5 py-2.5"},Kte=["innerHTML"],Gte=o.defineComponent({__name:"EditorViewMobile",props:{extensions:{},mode:{},hideComment:{type:Boolean},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},comment:{},commentCuesheet:{},content:{},isEditorViewSplitContent:{type:Boolean},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>{var A;const T=((A=e.extensions)==null?void 0:A.filter(V=>V.name!=="spellchecker"))||[];return T.some(V=>V.name==="image")||T.push(qu.configure()),T}),r=o.computed(()=>oa(e.comment)),i=o.computed(()=>oa(e.commentCuesheet)),s=o.computed(()=>oa(e.content));function a(T){return u1(T).replace(/<script\b[\s\S]*?<\/script\s*>/gi,"")}const l=o.computed(()=>r.value?a(e.comment):""),u=o.computed(()=>i.value?a(e.commentCuesheet):""),c=o.computed(()=>s.value?a(e.content):""),f=o.ref(),p=o.ref(),m=o.ref();o.onBeforeUnmount(()=>{f.value&&f.value.destroy(),p.value&&p.value.destroy(),m.value&&m.value.destroy()});function g(T){return new Vo({extensions:n.value,content:T,editable:!1,parseOptions:{preserveWhitespace:"full"}})}r.value||(f.value=g(gn(e.comment,!0,e.mode))),i.value||(p.value=g(gn(e.commentCuesheet,!0,e.mode))),s.value||(m.value=g(gn(e.content,!0,e.mode)));function b(T,A){if(!T)return;const V=gn(A,!0,e.mode);Et.isEqual(T.getHTML(),V)||T.commands.setContent(V,!1,{preserveWhitespace:"full"})}o.watch(()=>e.comment,T=>{r.value||b(f.value,T)}),o.watch(()=>e.commentCuesheet,T=>{i.value||b(p.value,T)}),o.watch(()=>e.content,T=>{s.value||b(m.value,T)});const{isScrolling:v,handleScroll:y}=Xl(),{isScrolling:x,handleScroll:k}=Xl(),E=o.computed(()=>e.mode!==Me.EDITOR?!0:!e.hideComment),C=o.computed(()=>e.mode!==Me.REPORT?!0:e.mode===Me.REPORT&&!e.hideComment),_=o.computed(()=>e.mode===Me.STRAIGHT||e.mode===Me.PLAIN_TEXT||!E.value);return(T,A)=>{const V=Kc;return o.openBlock(),o.createBlock(o.unref(Fh),{horizontal:"",class:o.normalizeClass(o.unref(Ee)("flex-1 text-sm"))},{default:o.withCtx(()=>[o.unref(_)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(k)},{default:o.withCtx(()=>[o.createElementVNode("div",Vte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Fte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.unref(E)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!T.isEditorViewSplitContent&&"border-none",!o.unref(v)&&"scrollbar-thumb-transparent")),onScroll:o.unref(y)},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("divide-y divide-ed-gray divide-dashed"))},[o.unref(C)?(o.openBlock(),o.createElementBlock("div",$te,[T.fieldNameComment?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameComment,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(r)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(l)},null,8,Hte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(f)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.mode===o.unref(Me).REPORT?(o.openBlock(),o.createElementBlock("div",zte,[T.fieldNameCommentCuesheet?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameCommentCuesheet,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(i)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(u)},null,8,Ute)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(p)},null,8,["editor"]))])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Wte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,jte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))]))],2)]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0),T.isEditorViewSplitContent?(o.openBlock(),o.createBlock(o.unref(ei),{key:1,class:o.normalizeClass(o.unref(Ee)("!overflow-y-auto border border-ed-gray rounded-md",!o.unref(x)&&"scrollbar-thumb-transparent",T.contentTextStyle)),onScroll:o.unref(k)},{default:o.withCtx(()=>[o.createElementVNode("div",qte,[T.fieldNameContent?(o.openBlock(),o.createBlock(V,{key:0,"field-name":T.fieldNameContent,class:"leading-7 font-medium text-blue-500"},null,8,["field-name"])):o.createCommentVNode("",!0),o.unref(s)?(o.openBlock(),o.createElementBlock("div",{key:1,class:"ProseMirror",innerHTML:o.unref(c)},null,8,Kte)):(o.openBlock(),o.createBlock(o.unref(Nn),{key:2,editor:o.unref(m)},null,8,["editor"]))])]),_:1},8,["class","onScroll"])):o.createCommentVNode("",!0)],64))]),_:1},8,["class"])}}}),Xte={class:"flex gap-2 items-center overflow-x-auto"},sS=o.defineComponent({__name:"ToolbarMobile",props:{editor:{},disabled:{type:Boolean,default:!1},mode:{},activeExtensions:{default:()=>[lc,xi,Lg]},customClassToolbar:{}},setup(t){const{t:e}=At(),n=t,r=o.inject("isEditable",o.ref(!0)),i=o.computed(()=>{const u=[...n.editor.extensionManager.extensions],c=u.find(m=>m.name===Lg);let f=u.sort((m,g)=>m.name==="spellchecker"?-1:g.name==="spellchecker"||m.name==="superText"?1:g.name==="superText"?-1:0);c&&(f=u.sort((m,g)=>m.name==="configPlan"?1:g.name==="configPlan"?-1:0));let p=[];for(const m of f){const{button:g,divider:b=!1,spacer:v=!1,toolbar:y=!0}=m.options;if(!g||!f1(g)||!y)continue;const x=g({editor:n.editor,extension:m,t:o.unref(e),isMobile:!0});if(Array.isArray(x)){const k=x.map((E,C)=>({id:`${m.name}`,button:E,divider:C===x.length-1?b:!1,spacer:C===0?v:!1}));p=[...p,...k];continue}p.push({button:x,divider:b,spacer:v,id:`${m.name}`})}if(!r.value){const m=p.find(g=>g.id==="superText");m&&(m.button.componentProps.disabled=!0)}return n.activeExtensions.length?p.filter(m=>m.id&&n.activeExtensions.includes(m.id)):p}),s=u=>u.id==="spellchecker"?"!text-ed-blue data-[state=off]:bg-white dark:data-[state=off]:bg-ed-accent/40 !font-normal rounded [&>div>svg]:w-[19px] [&>div>svg]:h-[19px] h-[26px] gap-x-1 whitespace-nowrap":u.button.componentProps.customClass,a=u=>u.id==="spellchecker"?"Spellchecker":u.button.componentProps.icon,l=o.ref(!1);return(u,c)=>{const f=iS;return o.openBlock(),o.createElementBlock("div",{id:"tool-bar",class:o.normalizeClass(o.unref(Ee)("z-10 border border-ed-input rounded-[5px] px-2.5 py-[5px] leading-none",!i.value.length&&"hidden",u.customClassToolbar))},[o.createElementVNode("div",Xte,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,m)=>{var g,b,v;return o.openBlock(),o.createElementBlock(o.Fragment,{key:m},[p.spacer&&m!==0?(o.openBlock(),o.createBlock(o.unref(vo),{key:0,orientation:"vertical",class:"h-[16px] mx-[10px]"})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(p.button.component),o.mergeProps({id:p.id,ref_for:!0},p.button.componentProps,{editor:u.editor,disabled:u.disabled||((g=p.button.componentProps)==null?void 0:g.disabled),"custom-class":s(p),icon:a(p)}),o.createSlots({_:2},[o.renderList(p.button.componentSlots,(y,x,k)=>({name:`${x}`,fn:o.withCtx(E=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),o.mergeProps({ref_for:!0},E==null?void 0:E.props,{id:p.id}),null,16,["id"]))])}))]),1040,["id","editor","disabled","custom-class","icon"])),p.id===xi&&o.unref(l)?(o.openBlock(),o.createBlock(f,{key:1,class:"bg-white border-inherit w-[26px] h-[26px] shadow-none",checked:(v=(b=p.button.componentProps).isActive)==null?void 0:v.call(b),"onUpdate:checked":y=>{var x,k;return(k=(x=p.button.componentProps).action)==null?void 0:k.call(x)}},null,8,["checked","onUpdate:checked"])):o.createCommentVNode("",!0),p.divider?(o.openBlock(),o.createBlock(o.unref(vo),{key:2,orientation:"vertical",class:"mx-2 h-auto"})):o.createCommentVNode("",!0)],64)}),128))])],2)}}}),Yte={class:"flex w-fit rounded-md bg-ed-gray-600 text-white text-sm max-w-full overflow-x-auto"},Jte=po(o.defineComponent({__name:"MainBubbleMenuList",props:{editor:{},mode:{},disableSuperInput:{type:Boolean},hasClipboard:{type:Boolean}},emits:["close-long-press-menu"],setup(t,{emit:e}){const n=t,r=e,{t:i}=At(),s=o.computed(()=>[...n.editor.extensionManager.extensions].find(p=>p.name==="superText")),a=o.ref(!1),l=o.computed(()=>n.editor.storage.deviceEnv.specialCharModal),u=f=>{const{state:p}=n.editor,{from:m}=p.selection;n.editor.commands.insertContentAt(m,f)},c=()=>{n.editor.chain().focus().toggleSuperInputMoblie().run(),r("close-long-press-menu");const f=BJ(n.editor);n.editor.commands.setSuperTextContent(f)};return(f,p)=>{var m,g,b;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Yte,[o.unref(s)&&!f.disableSuperInput&&f.mode!==o.unref(Me).EDITOR?(o.openBlock(),o.createElementBlock("button",{key:0,class:"bubble-menu-item",onClick:c},o.toDisplayString(o.unref(i)("editor.super")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[0]||(p[0]=v=>a.value=!0)},o.toDisplayString(o.unref(i)("editor.insertSpecial")),1),f.hasClipboard?(o.openBlock(),o.createElementBlock("button",{key:1,class:"bubble-menu-item",onClick:p[1]||(p[1]=v=>(f.editor.chain().focus().pasteContent().run(),r("close-long-press-menu")))},o.toDisplayString(o.unref(i)("editor.paste")),1)):o.createCommentVNode("",!0),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[2]||(p[2]=v=>f.editor.chain().focus().cutContent().run())},o.toDisplayString(o.unref(i)("editor.cut")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[3]||(p[3]=()=>{f.editor.chain().focus().copyContent().setTextSelection(0).blur().run(),r("close-long-press-menu")})},o.toDisplayString(o.unref(i)("editor.copy")),1),o.createElementVNode("button",{class:"bubble-menu-item",onClick:p[4]||(p[4]=v=>f.editor.chain().focus().selectAll().run())},o.toDisplayString(o.unref(i)("editor.selectAll")),1)]),(o.openBlock(),o.createBlock(o.Teleport,{to:"body"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((m=o.unref(l))==null?void 0:m.component),{"is-open":o.unref(a),open:o.unref(a),class:o.normalizeClass((b=(g=o.unref(l))==null?void 0:g.componentProps)==null?void 0:b.class),onSelectedChar:u,onClose:p[5]||(p[5]=v=>a.value=!1)},null,40,["is-open","open","class"]))]))],64)}}}),[["__scopeId","data-v-b4e2ce28"]]),aS=o.defineComponent({__name:"MainBubbleMenu",props:{editor:{},mode:{},disableSuperInput:{type:Boolean}},setup(t){const e=t,n=new c1,r=o.ref(!1),i=async()=>{var g,b;const m=await((b=(g=e.editor).hasClipboard)==null?void 0:b.call(g));r.value=!!m},s={duration:200,placement:"bottom",appendTo:()=>document.body.querySelector(".splitpanes__pane"),onShow:()=>{i(),n.sendToNative("hideIOSEditMenu")},getReferenceClientRect:()=>{if(e.editor&&!e.editor.isDestroyed){const{view:m,state:g}=e.editor,{from:b,to:v}=g.selection,y=m.dom.getBoundingClientRect(),x=m.coordsAtPos(b),k=m.coordsAtPos(v),E=Math.min(x.top,k.top),_=Math.max(x.bottom,k.bottom)-E;return new DOMRect(y.left,E,y.width,_)}return null}},a=o.ref(null),l=o.ref(!1),u=({editor:m,state:g})=>{if(e.editor.storage.deviceEnv.isForceCloseBubble||e.editor.isActive("link"))return!1;const{selection:b}=g,v=!b.empty&&jd(b)||l.value;return v&&m.extensionStorage.spellchecker.spellchecker.hideSuggestionBox(),v};function c(m){return f(m)&&m.touches.length>0?{x:m.touches[0].clientX,y:m.touches[0].clientY}:f(m)&&m.changedTouches.length>0?{x:m.changedTouches[0].clientX,y:m.changedTouches[0].clientY}:m instanceof MouseEvent?{x:m.clientX,y:m.clientY}:window.PointerEvent&&m instanceof PointerEvent?{x:m.clientX,y:m.clientY}:null}function f(m){return"touches"in m}function p(m){if(!e.editor)return;const g=c(m);if(!g)return;const b=e.editor.view,v=b.state,y=b.posAtCoords({left:g.x,top:g.y});if(!y||y.inside===-1)return;const x=y.pos,k=v.doc.content.size,E=Math.min(x+1,k);let C=v.tr;C=C.setSelection(De.create(v.doc,x,E)),b.dispatch(C),requestAnimationFrame(()=>{const _=b.state.tr.setSelection(De.create(b.state.doc,x,x));b.dispatch(_),b.focus()})}return o.onMounted(()=>{const m=e.editor.view.dom;Ne.onLongPress(o.ref(m),v=>{l.value=!0,p(v)},{delay:500,modifiers:{prevent:!1}});const g=()=>{e.editor.state.selection.empty&&(l.value=!1)};m.addEventListener("pointerdown",g);const b=({transaction:v})=>{l.value&&v.docChanged&&(l.value=!1,o.nextTick(()=>{var y;try{const x=(y=a.value)==null?void 0:y.$el;x&&x._tippy&&typeof x._tippy.hide=="function"&&x._tippy.hide()}catch{const k=e.editor.view,E=k.state,C=E.selection.from,_=E.doc.content.size,T=Math.min(C+1,_);k.dispatch(E.tr.setSelection(De.create(E.doc,C,T))),requestAnimationFrame(()=>{k.dispatch(k.state.tr.setSelection(De.create(k.state.doc,C,C)))})}}))};e.editor.on("transaction",b),o.onUnmounted(()=>{m.removeEventListener("pointerdown",g),e.editor.off("transaction",b)})}),(m,g)=>(o.openBlock(),o.createBlock(o.unref(Wu),{ref_key:"bubbleMenuRef",ref:a,editor:m.editor,"tippy-options":s,"should-show":u},{default:o.withCtx(()=>[o.createVNode(Jte,{editor:m.editor,mode:m.mode,disableSuperInput:m.disableSuperInput,hasClipboard:o.unref(r),onCloseLongPressMenu:g[0]||(g[0]=b=>l.value=!1)},null,8,["editor","mode","disableSuperInput","hasClipboard"])]),_:1},8,["editor"]))}}),Zte={class:"flex items-center justify-between label-large mb-2"},Qte={class:"mb-5"},Nte={class:"flex gap-x-3"},ene=o.defineComponent({__name:"SuperInputBottomSheet",props:{editor:{},open:{type:Boolean},bottomSheetComponent:{}},emits:["save","close"],setup(t,{emit:e}){const n=t,r=e,i=o.ref(""),s=o.ref(""),a=o.computed(()=>kh(i.value)),l=()=>{i.value="",s.value="",n.editor.commands.setSuperTextContent(i.value,s.value)},u=()=>{l(),r("close")};o.watch(()=>n.open,()=>{n.open&&(i.value=n.editor.storage.superText.superTextContent,s.value=n.editor.storage.superText.superTextPosition)});const c=()=>{i.value=n.editor.storage.superText.superTextContent},f=()=>{r("save",i.value,s.value),l()};return(p,m)=>{var b;const g=Ot;return o.openBlock(),o.createBlock(o.resolveDynamicComponent((b=p.bottomSheetComponent)==null?void 0:b.component),{"is-open":p.open,type:"bottom",title:"수퍼 입력","custom-class-content":"px-[12px]",onOnClose:u},{customContent:o.withCtx(()=>{var v;return[o.createElementVNode("div",Zte,[m[2]||(m[2]=o.createElementVNode("span",null,"내용",-1)),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{class:"w-fit [&_svg]:size-6 text-blue",variant:"ghost",size:"icon",onClick:c},{default:o.withCtx(()=>[o.createVNode(g,{name:"reset",class:"h-5 w-5"}),m[1]||(m[1]=o.createElementVNode("span",null,"초기화",-1))]),_:1}))])]}),body:o.withCtx(()=>[o.createElementVNode("div",Qte,[o.createVNode(kv,{modelValue:o.unref(i),"onUpdate:modelValue":m[0]||(m[0]=v=>o.isRef(i)?i.value=v:null),"parent-editor":p.editor,"spellcheck-enabled":!1,autofocus:"end"},null,8,["modelValue","parent-editor"])])]),footer:o.withCtx(()=>{var v,y;return[o.createElementVNode("div",Nte,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent((v=p.bottomSheetComponent)==null?void 0:v.button),{variant:"outline",onClick:u},{default:o.withCtx(()=>m[3]||(m[3]=[o.createTextVNode(" 취소 ")])),_:1})),(o.openBlock(),o.createBlock(o.resolveDynamicComponent((y=p.bottomSheetComponent)==null?void 0:y.button),{disabled:o.unref(a),variant:o.unref(a)?"disabled":"default",onClick:f},{default:o.withCtx(()=>m[4]||(m[4]=[o.createTextVNode(" 입력 ")])),_:1},8,["disabled","variant"]))])]}),_:1},40,["is-open"])}}}),lS=Un.create({name:"diffDel",parseHTML(){return[{tag:"span.diff-del"}]},renderHTML({HTMLAttributes:t}){return["span",{class:"diff-del",...t},0]}});function uS(t=100){let e=null,n=0;function r(l){n=l}function i(l){let u=l==null?void 0:l.parentElement;for(;u;){if(u.id==="comment-wrap-scroll"){u=u.parentElement;continue}const f=getComputedStyle(u).overflowY;if(f==="auto"||f==="scroll")return u;u=u.parentElement}return window}function s(l){e&&cancelAnimationFrame(e),e=requestAnimationFrame(()=>{const{view:u,state:c}=l,{from:f}=c.selection,p=u.coordsAtPos(f),m=i(u.dom),g=o.unref(t);if(m===window){const C=window.innerHeight-g,_=p.top-C;_>0&&window.scrollBy({top:_,behavior:"smooth"});return}const b=m,v=b.getBoundingClientRect(),y=p.top-v.top,x=b.clientHeight-g,k=y-x;k>0&&b.scrollBy({top:k,behavior:"smooth"})})}function a(l){requestAnimationFrame(()=>{const{view:u,state:c}=l,{from:f}=c.selection,p=u.coordsAtPos(f),m=i(u.dom),g=o.unref(t);if(m===window){const T=window.innerHeight,A=T-n-g;if(!(p.top>A))return;const O=T-g,B=p.top-O;B>0&&window.scrollBy({top:B,behavior:"smooth"});return}const b=m,v=b.getBoundingClientRect(),y=p.top-v.top,x=b.clientHeight,k=x-n-g;if(!(y>k))return;const C=x-g,_=y-C;_>0&&b.scrollBy({top:_,behavior:"smooth"})})}return{onTypingScrollCaretNearBottom:s,onKeyboardShowScrollNearBottom:a,setKeyboardHeight:r}}const tne=o.defineComponent({__name:"EditorCommentMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean,default:!0},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n,s=o.useAttrs(),a=wn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,{onTypingScrollCaretNearBottom:p}=uS(r.bottomOffset),m=o.inject("isEditable",o.ref(!0)),g=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled),editorProps:{attributes:{id:dr.COMMENT,[dr.DISABLE_SUPER_INPUT]:`${r.disableSuperInput}`},handleKeyDown:Et.throttle((k,E)=>E.key==="Enter"&&s.enter&&!E.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:k=>(k=k.replace(/\s*style="[^"]*"/g,""),k),handlePaste(k,E){var _;const C=((_=E.clipboardData)==null?void 0:_.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(C)?(E.preventDefault(),Wv(k,C.trim())):!1}},onCreate:({editor:k})=>{c(k)},onUpdate:Et.throttle(({editor:k})=>{l.value=!0;const E=v(k,r.output);i("update:modelValue",E),i("change",{editor:k,output:E}),c(k)},Ho),extensions:[lS,...Et.uniqBy(r.extensions,"name")],editable:m.value,onFocus:()=>{b()},onBlur:({editor:k,event:E})=>{i("onBlurEditor",E)},onSelectionUpdate:({editor:k})=>{k.isFocused&&p(k)}});function b(){i("setEditorSelected",g)}b();function v(k,E){if(!k)return"";if(k.isEmpty)return E==="json"?{}:"";switch(E){case"html":return h1(k,{removeNodes:[sc,wi]});case"json":return k.getJSON();case"text":return k.getText();default:return""}}function y(k){return k.every(E=>g==null?void 0:g.extensionManager.extensions.find(C=>C.name===E))}o.watch(()=>f.languages,()=>{g.commands.checkSpelling()}),o.watch(()=>r.modelValue,k=>{if(!g||Et.isEqual(v(g,r.output),k))return;const{from:E,to:C}=g.state.selection;g.commands.setTextSelection({from:E,to:C}),g.commands.setContent(gn(k,r.disabled),!1)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:k})=>{i("changed:selection",{editor:k})})}),o.watch(()=>r.disableSuperInput,()=>{const k=document.getElementById(dr.COMMENT);k==null||k.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>g==null?void 0:g.destroy()),wc(ju.SAVE,()=>{localStorage.setItem("comment",v(g,"html"))});function x(k){g.commands.focus("end"),b()}return Dh(g),o.onMounted(()=>{var k;r.autoFocus&&x(r.mode),(k=g==null?void 0:g.commands)!=null&&k.setIsMobile&&g.commands.setIsMobile(!0)}),o.watch(()=>r.mode,k=>{r.autoFocus&&x()}),o.watch(()=>m.value,k=>{var E;g==null||g.setEditable(k),(E=g==null?void 0:g.commands)!=null&&E.setIsEnableSuggestion&&g.commands.setIsEnableSuggestion(k)},{immediate:!0}),e({editor:g}),(k,E)=>{const C=aS,_=Lh,T=Rh,A=Ih;return o.openBlock(),o.createElementBlock(o.Fragment,null,[!k.hideBubble&&!k.disabled&&o.unref(m)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(C,{editor:o.unref(g),mode:k.mode,"disable-super-input":k.disableSuperInput},null,8,["editor","mode","disable-super-input"]),y([o.unref(ac)])?(o.openBlock(),o.createBlock(_,{key:0,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(ma)])?(o.openBlock(),o.createBlock(T,{key:1,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0),y([o.unref(hs)])?(o.openBlock(),o.createBlock(A,{key:2,editor:o.unref(g)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(g),spellcheck:"true",class:"flex-1 relative"},null,8,["editor"])],64)}}}),cS=o.defineComponent({__name:"ToolbarTitle",props:{titleBar:{},customClass:{}},setup(t){return(e,n)=>(o.openBlock(),o.createElementBlock("h3",{class:o.normalizeClass(o.unref(Ee)("rounded-[5px] px-2.5 py-[5px] min-h-[32px] flex items-center bg-ed-gray-500",[e.customClass],[e.titleBar.bgClass]))},o.toDisplayString(e.titleBar.title),3))}});function dS(t=!1,e=10){const n=e,r=90,i=50,s=n+1,a=o.ref(!0),l=o.ref(!0),u=o.ref(i),c=o.ref(i);return{HEADER_ONLY_SIZE:n,FULL_SIZE:r,SPLIT_SIZE:i,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,togglePane:m=>{if(o.unref(t)){l.value?(l.value=!1,c.value=n):(l.value=!0,c.value=r+n);return}if(m==="pane1"){a.value&&l.value?(a.value=!1,u.value=n,c.value=r):a.value&&!l.value?(a.value=!1,l.value=!0,u.value=n,c.value=r):!a.value&&l.value?(a.value=!0,u.value=i,c.value=i):(a.value=!0,u.value=r,c.value=n);return}m==="pane2"&&(a.value&&l.value?(l.value=!1,u.value=r,c.value=n):l.value&&!a.value?(l.value=!1,a.value=!0,u.value=r,c.value=n):!l.value&&a.value?(l.value=!0,u.value=i,c.value=i):(l.value=!0,u.value=n,c.value=r))},handlePaneResize:m=>{const g=m.panes;if(g&&g.length>=2){const b=g[0].size,v=g[1].size;u.value=b,c.value=v,b>n&&!a.value&&(a.value=!0),v>n&&!l.value&&(l.value=!0),b<=s&&a.value&&(a.value=!1),v<=s&&l.value&&(l.value=!1)}}}}const nne={class:"flex justify-between items-center relative gap-x-3"},rne={class:"flex items-center gap-x-4"},Gc=o.defineComponent({__name:"CoreEditorMoblie",props:{isMobile:{type:Boolean},superTextArea:{default:{view:!0,button:!0}},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{default:""},hideComment:{type:Boolean,default:!1},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{default:""},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},letterSpacingDefault:{default:""},contentTextStyle:{default:""},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{default:""},titleBarComment:{default:null},titleBarContent:{default:null},fieldNameComment:{default:null},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{},isScreenSplit:{default:!1},isShowLineNumber:{type:Boolean,default:!1},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean,default:!1},isEditorViewSplitContent:{type:Boolean,default:!1},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){var ue;const r=t,i=n,s=new c1;o.provide("isMobile",!0),Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE);const a=o.useAttrs(),l=wn(),{state:u,isFullscreen:c,isReady:f,editor:p,updateEditorState:m,checkSpellStore:g,setImageAttachment:b,setEditorContentMobile:v,footerTargetRef:y}=l,{markAsFocused:x,insertHtml:k}=Iee(),E=o.computed(()=>r.isShowFormatControlBar&&r.mode===Me.EDITOR&&B&&!r.isEditorView),C=o.computed(()=>E.value?100:40),_=o.ref(!1),{onTypingScrollCaretNearBottom:T,onKeyboardShowScrollNearBottom:A,setKeyboardHeight:V}=uS(C);function O(){s.isNativeWebViewAvailable()&&(s.receiveDataFromNative(s1.KEYBOARD_DID_SHOW,j=>{_.value=!0,V(j.height),setTimeout(()=>{var Q;(Q=F.value)!=null&&Q.isFocused&&A(F.value)},50)}),s.receiveDataFromNative(s1.KEYBOARD_DID_HIDE,()=>{_.value=!1}))}const B=o.ref(!r.disabled&&!r.readonly);o.provide("isEditable",B);const $=o.ref(r.fontSizeDefault),H=o.ref(r.fontFamilyDefault),X=o.ref(r.fontWeightDefault),ee=o.ref(r.letterSpacingDefault);o.provide("fontSize",$),o.provide("fontFamily",H),o.provide("fontWeight",X),o.provide("letterSpacing",ee);const z=o.computed(()=>({...o.unref(c)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0})),L=new Vo({coreExtensionOptions:{clipboardTextSerializer:{blockSeparator:r.blockSeparatorPolicy==="line"?`
|
|
354
354
|
`:`
|
|
355
355
|
|
|
356
356
|
`}},enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled,r.mode),editorProps:{handleKeyDown:Et.throttle((j,Q)=>Q.key==="Enter"&&a.enter&&!Q.shiftKey?(i("enter"),!0):!1,Ho),transformPastedHTML:j=>(j=j.replace(/\s*style="[^"]*"/g,""),j),handlePaste(j,Q){var Re;const pe=((Re=Q.clipboardData)==null?void 0:Re.getData("text/plain"))||"";return r.mode===Me.EDITOR&&Uv(pe)?(Q.preventDefault(),Wv(j,pe.trim())):r.mode===Me.PLAIN_TEXT?(Q.preventDefault(),Nee(j,pe)):!1}},onCreate:({editor:j})=>{m(j)},onUpdate:Et.throttle(({editor:j})=>{f.value=!0;const Q=ie(j,r.output);i("update:modelValue",Q),i("change",{editor:j,output:Q}),m(j),D(j)},Ho),extensions:Et.uniqBy(qC(r.extensions,r),"name"),editable:B.value,onFocus:j=>{K(),i("onFocus",j),x()},onBlur:j=>i("onBlur",j),parseOptions:{preserveWhitespace:"full"},onSelectionUpdate:({editor:j})=>{j.isFocused&&T(j)}});function D(j){const Q=[];j.state.doc.descendants(pe=>{pe.type.name==="image"&&Q.push({id:pe.attrs.id,src:pe.attrs.src})}),b(Q)}const F=o.ref(),{isShowToolBarBaseOnEditor:R}=Ree();o.onMounted(()=>{K(L),v(L),O()});function K(j){F.value=j??L,l.setEditorSelectedMobile(F.value)}const Y=o.computed(()=>L.storage.superText.isShowSuperInputMoblie);function ie(j,Q){if(!j)return"";if(j.isEmpty)return Q==="json"?{}:"";if(r.mode===Me.PLAIN_TEXT)return j.getText({blockSeparator:`
|
|
357
357
|
`});switch(Q){case"html":return h1(j,{removeNodes:[sc,wi]});case"json":return j.getJSON();case"text":return j.getText({blockSeparator:`
|
|
358
|
-
`});default:return""}}function fe(j){return j.every(Q=>L==null?void 0:L.extensionManager.extensions.find(pe=>pe.name===Q))}o.watch(()=>g.languages,()=>{L.commands.checkSpelling()}),o.watch(()=>r.modelValue,j=>{if(!L||Et.isEqual(ie(L,r.output),j))return;const{from:Q,to:pe}=L.state.selection;L.commands.setTextSelection({from:Q,to:pe}),L.commands.setContent(gn(j,r.disabled,r.mode),!1,{preserveWhitespace:"full"})},{deep:!0}),o.watch([()=>r.disabled,()=>r.readonly],()=>{B.value=!r.disabled&&!r.readonly},{immediate:!0}),o.watch(()=>B.value,j=>{var Q;L==null||L.setEditable(j),(Q=L==null?void 0:L.commands)!=null&&Q.setIsEnableSuggestion&&L.commands.setIsEnableSuggestion(j)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:j})=>{i("changed:selection",{editor:j})})}),o.onUnmounted(()=>{var j;L==null||L.destroy(),(j=F.value)==null||j.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",ie(L,"html"))});const ke=(j,Q)=>{const pe=L;if(pe){if(Q){const Re=pe.state.doc.nodeAt(+Q),{[it.ELEMENT_ID]:et,...ae}=(Re==null?void 0:Re.attrs)||{};pe.view.dispatch(pe.state.tr.setNodeMarkup(+Q,void 0,{...ae,[it.TEXT]:j}))}else{const{from:Re}=pe.view.state.selection;pe.commands.insertContentAt(Re,{type:"superText",attrs:{"data-id":Zr(6),"data-text":j}})}pe.commands.toggleSuperInputMoblie(),pe.storage.superText.addToast({type:"success",message:"수퍼가 수정되었습니다"})}},re=j=>{var pe;const Q=F.value??L;if(Q){const{from:Re}=Q.view.state.selection;Q.commands.insertContentAt(Re,{type:"configPlan",attrs:{"data-id":Zr(6),"data-text":j}})}(pe=F.value)==null||pe.commands.toggleConfigPlanInput()};function me(j){j===Me.STRAIGHT&&L.commands.focus("end"),j===Me.EDITOR&&L.commands.focus("end")}const J=o.computed(()=>B.value&&r.mode===Me.STRAIGHT||B.value&&r.mode===Me.REPORT);o.onMounted(()=>{var j,Q;r.autoFocus&&me(r.mode),(j=L==null?void 0:L.commands)!=null&&j.setIsMobile&&L.commands.setIsMobile(!0),B.value&&((Q=L.storage.superText)!=null&&Q.enable)&&L.commands.toggleSuperTextView()}),o.watch(()=>r.mode,j=>{r.autoFocus&&me(j)});const te=(ue=L.extensionManager.extensions.find(j=>j.name==="superText"))==null?void 0:ue.options.bottomSheetComponent,ne=o.computed(()=>{const j=r.mode===Me.REPORT,Q=r.mode===Me.EDITOR&&r.isScreenSplit,pe=!r.hideComment;return(j||Q)&&pe}),se=o.computed(()=>!ne.value),{HEADER_ONLY_SIZE:ce,pane1ContentVisible:_e,pane2ContentVisible:Te,pane1Size:Ue,pane2Size:Ke,togglePane:je,handlePaneResize:Rt}=dS(se);function q(){if(!r.contentAutoCopied)return;const j=TT(r.contentAutoCopied,".super-text");k(L,j)}const{isScrolling:U,handleScroll:ge}=Xl(),xe=o.ref(null);e({editor:L});const Fe=o.computed(()=>{var j;return((j=r.watermarkOverlay)==null?void 0:j.component)||"div"}),st=o.computed(()=>{var pe,Re,et;const j=!!((Re=(pe=r.watermarkOverlay)==null?void 0:pe.props)!=null&&Re.text),Q=Fe.value==="div";return{...(et=r.watermarkOverlay)==null?void 0:et.props,...(j||Q)&&{class:"flex-1 flex flex-col"}}}),qe=o.computed(()=>{var Q;const{selection:j}=(Q=F.value)==null?void 0:Q.state;return j instanceof Pe&&j.node.type.name==="image"});return(j,Q)=>{var Bt,xn,gr,Ln;const pe=aS,Re=Lh,et=Rh,ae=Ih,Be=sS,_t=Gte,oe=cc,Ae=Dte,He=Ot,rt=bn,Qe=Lte,qt=Ate;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(F)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",style:o.normalizeStyle(o.unref(z)),class:o.normalizeClass(o.unref(Ee)("vdc-editor mobile relative w-full flex flex-col",!r.height&&"flex-1",j.editorClass,j.disabled&&"disabled",j.mode!==o.unref(Me).EDITOR&&j.isShowLineNumber&&"editor-line",j.isEditorView&&"overflow-y-auto"))},[!j.hideBubble&&!j.disabled&&o.unref(B)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(pe,{editor:o.unref(L),mode:j.mode},null,8,["editor","mode"]),fe([o.unref(ac)])?(o.openBlock(),o.createBlock(Re,{key:0,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0),fe([o.unref(ma)])?(o.openBlock(),o.createBlock(et,{key:1,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0),fe([o.unref(hs)])?(o.openBlock(),o.createBlock(ae,{key:2,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),!j.hideToolbar&&!r.isEditorView?(o.openBlock(),o.createBlock(Be,{key:1,editor:o.unref(L),mode:j.mode,disabled:j.disabled,class:"mb-[3px]","custom-class-toolbar":j.customClassToolbar,"active-extensions":j.mode===o.unref(Me).EDITOR?[xi]:void 0},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])):o.createCommentVNode("",!0),r.isEditorView?(o.openBlock(),o.createBlock(_t,{key:2,"is-editor-view-split-content":r.isEditorViewSplitContent,extensions:j.extensions,mode:j.mode,"hide-comment":j.hideComment,"field-name-comment":j.fieldNameComment,"field-name-comment-cuesheet":j.fieldNameCommentCuesheet,"field-name-content":j.fieldNameContent,comment:j.comment,"comment-cuesheet":j.commentCuesheet,content:j.modelValue,"content-text-style":j.contentTextStyle},null,8,["is-editor-view-split-content","extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","content-text-style"])):(o.openBlock(),o.createBlock(o.unref(Fh),{key:3,class:o.normalizeClass(o.unref(Ee)("flex-1 basis-0")),horizontal:"",onResize:o.unref(Rt)},{default:o.withCtx(()=>[o.unref(ne)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,size:o.unref(Ue),"min-size":o.unref(ce),class:"flex flex-col min-h-8"},{default:o.withCtx(()=>{var rr,or;return[(rr=j.titleBarComment)!=null&&rr.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":j.titleBarComment,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),(or=j.fieldNameComment)!=null&&or.label?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ee)("flex justify-between items-center mb-1"))},[o.createVNode(Kc,{"field-name":j.fieldNameComment,class:"py-1.5"},null,8,["field-name"]),j.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:Q[0]||(Q[0]=Dn=>o.unref(je)("pane1")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(_e)?o.unref(db):o.unref(kc)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{id:"comment-wrap-scroll",class:o.normalizeClass(o.unref(Ee)("flex-1 !overflow-y-auto overflow-x-hidden basis-0 flex h-full flex-col text-sm",!o.unref(U)&&"scrollbar-thumb-transparent",j.contentClass,j.contentTextStyle)),onScroll:Q[2]||(Q[2]=(...Dn)=>o.unref(ge)&&o.unref(ge)(...Dn))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Fe)),o.normalizeProps(o.guardReactiveProps(o.unref(st))),{default:o.withCtx(()=>[o.createVNode(tne,{ref:"editorCommentRef",mode:j.mode,extensions:j.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":j.disableSuperInput,"field-name-comment":j.fieldNameComment,"is-show-format-control-bar":j.isShowFormatControlBar,"auto-focus":j.autoFocus,"bottom-offset":o.unref(C),"onUpdate:modelValue":Q[1]||(Q[1]=Dn=>i("update:comment",Dn)),onSetEditorSelected:K},null,8,["mode","extensions","model-value","disabled","disable-super-input","field-name-comment","is-show-format-control-bar","auto-focus","bottom-offset"])]),_:1},16)),o.unref(E)?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"formatToolbarTargetRef",ref:xe,class:o.normalizeClass(o.unref(Ee)("sticky bottom-0 z-[12] min-h-[58px]",o.unref(_)&&"fixed inset-x-2.5",o.unref(Te)&&"hidden"))},null,2)):o.createCommentVNode("",!0)],34),[[o.vShow,o.unref(_e)]])]}),_:1},8,["size","min-size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(ei),{size:o.unref(Ke),"min-size":o.unref(ce),class:o.normalizeClass(o.unref(Ee)("flex flex-col min-h-8")),style:{overflow:"unset"}},{default:o.withCtx(()=>{var rr,or;return[(rr=j.titleBarContent)!=null&&rr.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":j.titleBarContent,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),o.createElementVNode("div",nne,[(or=j.fieldNameContent)!=null&&or.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ee)("flex justify-between items-center mb-1 flex-1"))},[o.createVNode(Kc,{"field-name":j.fieldNameContent,class:"py-1.5"},null,8,["field-name"]),o.createElementVNode("div",rne,[o.unref(J)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ee)("flex items-center"))},[o.createVNode(oe,{for:"superView",class:"body-medium p-2"},{default:o.withCtx(()=>Q[7]||(Q[7]=[o.createTextVNode("수퍼")])),_:1}),o.createVNode(Ae,{id:"superView",checked:o.unref(L).storage.superText.enable,class:"data-[state=checked]:bg-blue-500","onUpdate:checked":Q[3]||(Q[3]=Dn=>o.unref(L).commands.toggleSuperTextView())},null,8,["checked"])],2)):o.createCommentVNode("",!0),j.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:Q[4]||(Q[4]=Dn=>o.unref(je)("pane2")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Te)?o.unref(db):o.unref(kc)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)])],2)):o.createCommentVNode("",!0),j.contentAutoCopied?(o.openBlock(),o.createBlock(rt,{key:1,disabled:o.unref(kh)(j.contentAutoCopied),variant:"ghost",class:"w-fit h-fit p-0 gap-x-1 label-large text-blue-500 py-1.5",onClick:q},{default:o.withCtx(()=>[o.createVNode(He,{name:"autoCopy",class:"size-5"}),Q[8]||(Q[8]=o.createTextVNode("자동복사"))]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex-1 basis-0 flex flex-col relative text-sm mb-4",j.contentClass,j.contentTextStyle))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Fe)),o.normalizeProps(o.guardReactiveProps(o.unref(st))),{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(L),class:o.normalizeClass(["flex-1 relative break-all",j.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"])},null,8,["editor","class"])]),_:1},16))],2),[[o.vShow,o.unref(Te)]]),o.unref(E)?(o.openBlock(),o.createBlock(o.Teleport,{key:1,to:o.unref(xe),disabled:o.unref(Te)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("sticky pb-3.5 mx-1 bottom-0 z-[12] inset-x-0 min-h-11 box-content invisible pointer-events-none",o.unref(R)&&"visible pointer-events-auto",j.customClassFormatControlBar))},[o.unref(qe)?(o.openBlock(),o.createBlock(Qe,{key:0,editor:o.unref(F),class:"absolute inset-x-0"},null,8,["editor"])):(o.openBlock(),o.createBlock(qt,{key:1,editor:o.unref(F),mode:j.mode,disabled:!o.unref(B)||j.disabled,class:"absolute inset-x-0"},null,8,["editor","mode","disabled"]))],2)],8,["to","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"footerTargetRef",ref:y,id:"vdc-editor-footer-target"},null,512)]}),_:1},8,["size","min-size","class"])]),_:1},8,["class","onResize"]))],6)):o.createCommentVNode("",!0),(Bt=o.unref(L))!=null&&Bt.storage.superText&&o.unref(te)?(o.openBlock(),o.createBlock(ene,{key:1,open:o.unref(Y),editor:o.unref(L),"bottom-sheet-component":o.unref(te),onClose:Q[5]||(Q[5]=rr=>o.unref(L).commands.toggleSuperInputMoblie()),onSave:ke},null,8,["open","editor","bottom-sheet-component"])):o.createCommentVNode("",!0),(xn=o.unref(F))!=null&&xn.storage.configPlan?(o.openBlock(),o.createBlock(bE,{key:2,open:(gr=o.unref(F))==null?void 0:gr.storage.configPlan.isShowConfigPlanInput,"is-view-mode":!((Ln=o.unref(F))!=null&&Ln.storage.configPlan.isShowConfigPlanInput),editor:o.unref(F),title:j.$t("editor.configPlan"),onClose:Q[6]||(Q[6]=rr=>o.unref(F).commands.toggleConfigPlanInput()),onSave:re},null,8,["open","is-view-mode","editor","title"])):o.createCommentVNode("",!0)],64)}}}),one=o.defineComponent({__name:"ArticleEditor",props:{mode:{default:Me.STRAIGHT},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["update:modelValue","update:comment"],setup(t,{emit:e}){const n=t,r=wn();return o.onMounted(()=>{r.setTextAlert(n.textAlert||"")}),(i,s)=>n.isMobile?(o.openBlock(),o.createBlock(Gc,o.mergeProps({key:1},n,{"onUpdate:modelValue":s[2]||(s[2]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[3]||(s[3]=a=>i.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(Vh,o.mergeProps({key:0,ref:"coreEditorRef"},n,{"onUpdate:modelValue":s[0]||(s[0]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[1]||(s[1]=a=>i.$emit("update:comment",a))}),null,16))}}),ine=o.defineComponent({__name:"DigitalNewsEditor",props:{mode:{default:Me.EDITOR},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},setup(t){const e=t;return(n,r)=>{const i=Vh,s=Gc;return e.isMobile?(o.openBlock(),o.createBlock(s,o.mergeProps({key:1},e,{"onUpdate:modelValue":r[1]||(r[1]=a=>n.$emit("update:modelValue",a)),"onUpdate:comment":r[2]||(r[2]=a=>n.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(i,o.mergeProps({key:0},e,{"onUpdate:modelValue":r[0]||(r[0]=a=>n.$emit("update:modelValue",a))}),null,16))}}});var fS={exports:{}};(function(t){(function(){function e(z){return z===">"}function n(z){return z==="<"}function r(z){return/^\s+$/.test(z)}function i(z){var L=z.match(/^\s*<([^!>][^>]*)>\s*$/);return!!L&&L[1].trim().split(" ")[0]}function s(z){return!i(z)}function a(z){return/^<!--/.test(z)}function l(z){return/--\>$/.test(z)}var u,c=new RegExp("^<(iframe|object|math|svg|script|video|head|style|a)");function f(z){var L=u.exec(z);return L&&L[1]}function p(z,L){return z.substring(z.length-L.length-2)==="</"+L}function m(z){return/^\s*<[^>]+\/>\s*$/.test(z)}function g(z){var L=/^<img[\s>]/.test(z);return L||s(z)||f(z)||m(z)}function b(z){return{string:z,key:x(z)}}function v(z,L,D,F){this.segment=F,this.length=D,this.startInBefore=z+F.beforeIndex,this.startInAfter=L+F.afterIndex,this.endInBefore=this.startInBefore+this.length-1,this.endInAfter=this.startInAfter+this.length-1,this.segmentStartInBefore=z,this.segmentStartInAfter=L,this.segmentEndInBefore=this.segmentStartInBefore+this.length-1,this.segmentEndInAfter=this.segmentStartInAfter+this.length-1}function y(z){for(var L="char",D="",F="",R=[],K=0;K<z.length;K++){var Y=z[K];switch(L){case"tag":var ie=f(D);ie?(L="atomic_tag",F=ie,D+=Y):a(D)?(L="html_comment",D+=Y):e(Y)?(D+=">",R.push(b(D)),D="",r(Y)?L="whitespace":L="char"):D+=Y;break;case"atomic_tag":e(Y)&&p(D,F)?(D+=">",R.push(b(D)),D="",F="",L="char"):D+=Y;break;case"html_comment":D+=Y,l(D)&&(D="",L="char");break;case"char":n(Y)?(D&&R.push(b(D)),D="<",L="tag"):/\s/.test(Y)?(D&&R.push(b(D)),D=Y,L="whitespace"):/[\w\d\#@]/.test(Y)?D+=Y:/&/.test(Y)?(D&&R.push(b(D)),D=Y):(D+=Y,R.push(b(D)),D="");break;case"whitespace":n(Y)?(D&&R.push(b(D)),D="<",L="tag"):r(Y)?D+=Y:(D&&R.push(b(D)),D=Y,L="char");break;default:throw new Error("Unknown mode "+L)}}return D&&R.push(b(D)),R}function x(z){var L=/^<img.*src=['"]([^"']*)['"].*>$/.exec(z);if(L)return'<img src="'+L[1]+'">';var D=/^<a.*href=['"]([^"']*)['"]/.exec(z);if(D)return'<a href="'+D[1]+'"></a>';var F=/^<object.*data=['"]([^"']*)['"]/.exec(z);if(F)return'<object src="'+F[1]+'"></object>';if(/^<(svg|math|video)[\s>]/.test(z)){var R=z.indexOf('data-uuid="');if(R!==-1){var K=z.slice(0,R),Y=z.slice(R+44);return K+Y}else return z}var ie=/^<iframe.*src=['"]([^"']*)['"].*>/.exec(z);if(ie)return'<iframe src="'+ie[1]+'"></iframe>';var fe=/<([^\s>]+)[\s>]/.exec(z);return fe?"<"+fe[1].toLowerCase()+">":z&&z.replace(/(\s+| | )/g," ")}function k(z){return z.reduce(function(L,D,F){return L[D.key]?L[D.key].push(F):L[D.key]=[F],L},Object.create(null))}function E(z,L){return L.endInBefore<z.startInBefore&&L.endInAfter<z.startInAfter?-1:L.startInBefore>z.endInBefore&&L.startInAfter>z.endInAfter?1:0}function C(){this._root=null}C.prototype={add:function(z){var L={value:z,left:null,right:null},D=this._root;if(D)for(;;){var F=E(D.value,z);if(F===-1)if(D.left)D=D.left;else{D.left=L;break}else if(F===1)if(D.right)D=D.right;else{D.right=L;break}else break}else this._root=L},toArray:function(){function z(L,D){return L&&(z(L.left,D),D.push(L.value),z(L.right,D)),D}return z(this._root,[])}};function _(z){for(var L=z.beforeTokens,D=z.afterMap,F=null,R=null,K=0;K<L.length;K++){var Y=!1,ie=L.length-K;if(R&&ie<R.length)break;var fe=L[K];if(fe.key===" "){F=K;continue}F===K-1&&(Y=!0);var ke=D[fe.key];ke&&ke.forEach(function(re){var me=R?R.length:0,J=T(z,K,re,me,Y);J&&J.length>me&&(R=J)})}return R}function T(z,L,D,F,R){var K=z.beforeTokens,Y=z.afterTokens,ie=L+F,fe=D+F;if(!(ie>=K.length||fe>=Y.length)){if(F){var ke=K[ie].key,re=Y[fe].key;if(ke!==re)return}for(var me=!0,J=1,te=L+J,ne=D+J;me&&te<K.length&&ne<Y.length;){var se=K[te].key,ce=Y[ne].key;se===ce?(J++,te=L+J,ne=D+J):me=!1}if(R&&L>0&&D>0){var _e=K[L-1].key,Te=Y[D-1].key;_e===" "&&Te===" "&&(L--,D--,J++)}return new v(L,D,J,z)}}function A(z,L,D,F){return{beforeTokens:z,afterTokens:L,beforeMap:k(z),afterMap:k(L),beforeIndex:D,afterIndex:F}}function V(z){for(var L=new C,D,F=[z];F.length;)if(z=F.pop(),D=_(z),D&&D.length){if(D.segmentStartInBefore>0&&D.segmentStartInAfter>0){var R=z.beforeTokens.slice(0,D.segmentStartInBefore),K=z.afterTokens.slice(0,D.segmentStartInAfter);F.push(A(R,K,z.beforeIndex,z.afterIndex))}var Y=z.beforeTokens.slice(D.segmentEndInBefore+1),ie=z.afterTokens.slice(D.segmentEndInAfter+1),fe=z.beforeIndex+D.segmentEndInBefore+1,ke=z.afterIndex+D.segmentEndInAfter+1;Y.length&&ie.length&&F.push(A(Y,ie,fe,ke)),L.add(D)}return L.toArray()}function O(z,L){if(!z)throw new Error("Missing beforeTokens");if(!L)throw new Error("Missing afterTokens");var D=0,F=0,R=[],K=A(z,L,0,0),Y=V(K);Y.push(new v(z.length,L.length,0,K));for(var ie=0;ie<Y.length;ie++){var fe=Y[ie],ke="none";D===fe.startInBefore?F!==fe.startInAfter&&(ke="insert"):(ke="delete",F!==fe.startInAfter&&(ke="replace")),ke!=="none"&&R.push({action:ke,startInBefore:D,endInBefore:ke!=="insert"?fe.startInBefore-1:null,startInAfter:F,endInAfter:ke!=="delete"?fe.startInAfter-1:null}),fe.length!==0&&R.push({action:"equal",startInBefore:fe.startInBefore,endInBefore:fe.endInBefore,startInAfter:fe.startInAfter,endInAfter:fe.endInAfter}),D=fe.endInBefore+1,F=fe.endInAfter+1}var re=[],me={action:"none"};function J(se){return se.action!=="equal"||se.endInBefore-se.startInBefore!==0?!1:/^\s$/.test(z.slice(se.startInBefore,se.endInBefore+1))}for(var te=0;te<R.length;te++){var ne=R[te];J(ne)&&me.action==="replace"||ne.action==="replace"&&me.action==="replace"?(me.endInBefore=ne.endInBefore,me.endInAfter=ne.endInAfter):(re.push(ne),me=ne)}return re}function B(z){this.tokens=z,this.notes=z.reduce(function(L,D,F){L.notes.push({isWrappable:g(D),insertedTag:!1});var R=!m(D)&&i(D),K=L.tagStack[L.tagStack.length-1];return R&&(K&&"/"+K.tag===R?(L.notes[K.position].insertedTag=!0,L.tagStack.pop()):L.tagStack.push({tag:R,position:F})),L},{notes:[],tagStack:[]}).notes}B.prototype.combine=function(z,L){var D=this.notes,F=this.tokens.slice(),R=F.reduce(function(K,Y,ie){D[ie].insertedTag&&(F[ie]=L(F[ie])),K.status===null&&(K.status=D[ie].isWrappable);var fe=D[ie].isWrappable;return fe!==K.status&&(K.list.push({isWrappable:K.status,tokens:F.slice(K.lastIndex,ie)}),K.lastIndex=ie,K.status=fe),ie===F.length-1&&K.list.push({isWrappable:K.status,tokens:F.slice(K.lastIndex,ie+1)}),K},{list:[],status:null,lastIndex:0}).list;return R.map(z).join("")};function $(z,L,D,F,R){var K=new B(L);F=F?F+"-":"";var Y=" data-"+F+'operation-index="'+D+'"';return R&&(Y+=' class="'+R+'"'),K.combine(function(ie){if(ie.isWrappable){var fe=ie.tokens.join("");if(fe.trim())return"<"+z+Y+">"+fe+"</"+z+">"}else return ie.tokens.join("");return""},function(ie){var fe=' data-diff-node="'+z+'"';return fe+=" data-"+F+'operation-index="'+D+'"',ie.replace(/>\s*$/,fe+"$&")})}var H={equal:function(z,L,D,F,R,K){var Y=D.slice(z.startInAfter,z.endInAfter+1);return Y.reduce(function(ie,fe){return ie+fe.string},"")},insert:function(z,L,D,F,R,K){var Y=D.slice(z.startInAfter,z.endInAfter+1),ie=Y.map(function(fe){return fe.string});return $("ins",ie,F,R,K)},delete:function(z,L,D,F,R,K){var Y=L.slice(z.startInBefore,z.endInBefore+1),ie=Y.map(function(fe){return fe.string});return $("del",ie,F,R,K)},replace:function(){return H.delete.apply(null,arguments)+H.insert.apply(null,arguments)}};function X(z,L,D,F,R){return D.reduce(function(K,Y,ie){return K+H[Y.action](Y,z,L,ie,F,R)},"")}function ee(z,L,D,F,R){if(z===L)return z;R?u=new RegExp("^<("+R.replace(/\s*/g,"").replace(/,/g,"|")+")"):u=c,z=y(z),L=y(L);var K=O(z,L);return X(z,L,K,F,D)}ee.htmlToTokens=y,ee.findMatchingBlocks=V,V.findBestMatch=_,V.createMap=k,V.createToken=b,V.createSegment=A,V.getKeyForToken=x,ee.calculateOperations=O,ee.renderOperations=X,t!==null?t.exports=ee:this.htmldiff=ee}).call(ml)})(fS);var sne=fS.exports;const ane=oR(sne),pS=(t,e,n)=>{let r="";{const i=gn(t,n),s=gn(e,n);r=ane(i,s,null,null,"button")}return r=r.replace(/<del[^>]*>/g,'<span class="diff-del">').replace(/<\/del>/g,"</span>").replace(/<ins[^>]*>/g,'<mark style="background:#FEF3C7;">').replace(/<\/ins>/g,"</mark>"),r},lne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},une={class:"flex items-center gap-2"},cne={class:"body-small text-gray-600 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-gray-100"},dne={class:"label-large text-gray-800 line-clamp-1"},fne={class:"flex items-center gap-1 shrink-0"},pne={class:"mt-[2px]"},hne={class:"body-small text-gray-400"},mne={class:"border border-ed-gray rounded-[5px] p-2.5 my-2 h-full"},gne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},bne={class:"flex items-center gap-2"},vne={class:"body-small text-blue-500 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-blue-50"},yne={class:"label-large text-gray-800 line-clamp-1"},wne={class:"flex items-center gap-1 shrink-0"},xne={class:"mt-[2px]"},Cne={class:"body-small text-gray-400"},kne=po(o.defineComponent({__name:"ArticleCompareEditor",props:{originalData:{},changedData:{},extensions:{},editorClass:{},isCompare:{type:Boolean,default:!0},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>[...e.extensions,lS]),r=o.ref(!1),i=o.computed(()=>!e.originalData||!e.changedData?{comment:"",content:""}:{comment:pS(e.originalData.comment,e.changedData.comment,!0),content:pS(e.originalData.content,e.changedData.content,!0)}),{HEADER_ONLY_SIZE:s,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,handlePaneResize:f}=dS(!1,6),{isScrolling:p,handleScroll:m}=Xl(),{isScrolling:g,handleScroll:b}=Xl();return(v,y)=>{const x=Ot;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("h-full",v.editorClass))},[o.createVNode(o.unref(Fh),{horizontal:"",onResize:o.unref(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(ei),{size:o.unref(u),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B,$,H;return[(E=(k=v.originalData)==null?void 0:k.titleBar)!=null&&E.title?(o.openBlock(),o.createElementBlock("div",lne,[o.createElementVNode("div",une,[o.createElementVNode("div",cne,o.toDisplayString(v.$t("기준")),1),o.createElementVNode("h3",dne,o.toDisplayString((_=(C=v.originalData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",fne,[o.createElementVNode("div",pne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",hne,o.toDisplayString((A=(T=v.originalData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("border border-gray-50 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(p)&&"scrollbar-thumb-transparent")),onScroll:y[0]||(y[0]=(...X)=>o.unref(m)&&o.unref(m)(...X))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(V=v.originalData)==null?void 0:V.fieldNameComment,"field-name-content":(O=v.originalData)==null?void 0:O.fieldNameContent,comment:(B=v.originalData)==null?void 0:B.comment,"model-value":($=v.originalData)==null?void 0:$.content,"hide-comment":(H=v.originalData)==null?void 0:H.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(a)]])]}),_:1},8,["size","min-size"]),o.unref(r)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0},{default:o.withCtx(()=>{var k,E,C,_,T;return[o.createElementVNode("div",mne,[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(k=v.changedData)==null?void 0:k.fieldNameComment,"field-name-content":(E=v.changedData)==null?void 0:E.fieldNameContent,comment:(C=v.changedData)==null?void 0:C.comment,"model-value":(_=v.changedData)==null?void 0:_.content,"hide-comment":(T=v.changedData)==null?void 0:T.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])])]}),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(ei),{size:o.unref(c),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B;return[(E=(k=v.changedData)==null?void 0:k.titleBar)!=null&&E.title?(o.openBlock(),o.createElementBlock("div",gne,[o.createElementVNode("div",bne,[o.createElementVNode("div",vne,o.toDisplayString(v.$t("대상")),1),o.createElementVNode("h3",yne,o.toDisplayString((_=(C=v.changedData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",wne,[o.createElementVNode("div",xne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",Cne,o.toDisplayString((A=(T=v.changedData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("border border-gray-50 bg-dark-blue-600 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(g)&&"scrollbar-thumb-transparent")),onScroll:y[1]||(y[1]=(...$)=>o.unref(b)&&o.unref(b)(...$))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(V=v.changedData)==null?void 0:V.fieldNameComment,"field-name-content":(O=v.changedData)==null?void 0:O.fieldNameContent,comment:o.unref(i).comment,"model-value":o.unref(i).content,"hide-comment":(B=v.changedData)==null?void 0:B.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(l)]])]}),_:1},8,["size","min-size"])]),_:1},8,["onResize"])],2)}}}),[["__scopeId","data-v-4bdb50a2"]]),Ene=o.defineComponent({__name:"SuperViewMobileSuperEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=wn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,p=o.ref(!1);o.provide("isEditable",p);const m=o.ref(c6(r.modelValue));function g(C){if(r.disabled||r.readonly)return;const _=UC(C);i("lineFocus",{lineIndex:_})}function b(){i("lineFocus",{lineIndex:void 0})}const v=new Vo({enablePasteRules:!1,enableInputRules:!1,content:m.value,onCreate:({editor:C})=>{c(C)},onUpdate:Et.throttle(({editor:C})=>{l.value=!0;const _=E(C,r.output);i("update:modelValue",_),i("change",{editor:C,output:_}),c(C)},Ho),extensions:Et.uniqBy(r.extensions,"name"),editable:p.value,onFocus:()=>{x(),y.value=!0,g(v)},onBlur:()=>{y.value=!1,b()},onSelectionUpdate:()=>{g(v)}}),y=o.ref(!1);function x(){i("setEditorSelected",v)}function k(){s.emit({action:"render"})}function E(C,_){if(!C)return"";if(C.isEmpty)return _==="json"?{}:"";switch(_){case"html":return C.getHTML();case"json":return C.getJSON();case"text":return C.getText();default:return""}}return o.watch(()=>f.languages,()=>{v.commands.checkSpelling()}),o.watch(()=>r.modelValue,C=>{if(!v||Et.isEqual(E(v,r.output),C))return;const{from:_,to:T}=v.state.selection;v.commands.setTextSelection({from:_,to:T}),k(),m.value=c6(C)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:C})=>{i("changed:selection",{editor:C})})}),o.watch(()=>r.disableSuperInput,()=>{const C=document.getElementById(dr.COMMENT);C==null||C.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>v==null?void 0:v.destroy()),Dh(v),o.onMounted(()=>{var C,_;(C=v==null?void 0:v.commands)!=null&&C.setIsEnableSuggestion&&v.commands.setIsEnableSuggestion(!1),(_=v==null?void 0:v.commands)!=null&&_.setIsMobile&&v.commands.setIsMobile(!0)}),e({editor:v}),(C,_)=>{var A;const T=Kc;return o.openBlock(),o.createElementBlock(o.Fragment,null,[(A=C.fieldNameSuper)!=null&&A.label?(o.openBlock(),o.createBlock(T,{key:0,"field-name":C.fieldNameSuper,mode:C.mode,disabled:C.disabled,class:"mb-1",intent:"secondary"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Nn),{editor:o.unref(v),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],64)}}}),Sne=(t,e)=>{let n=null;return t.state.doc.descendants((r,i)=>{if(r.type.name==="paragraph"&&Number(r.attrs["number-line"])===e)return n={node:r,pos:i},!1}),n},hS="focused-line";async function mS({lineIndex:t,editor:e}){if(e.state.doc.descendants((l,u)=>{if(l.attrs.class===hS){const c=e.state.tr.setNodeMarkup(u,void 0,{...l.attrs,class:""});return e.view.dispatch(c),!1}}),await o.nextTick(),!t)return;const n=Sne(e,t);if(!n)return;const{node:r,pos:i}=n,s=e.state.tr.setNodeMarkup(i,void 0,{...r.attrs,class:hS});e.view.dispatch(s),await o.nextTick(),e.view.nodeDOM(i).scrollIntoView({behavior:"smooth"})}const _ne=o.defineComponent({__name:"SuperViewMobileEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{default:"12px"},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.provide("isMobile",!0),o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE);o.useAttrs();const a=wn(),{state:l,isFullscreen:u,isReady:c,editor:f,updateEditorState:p,checkSpellStore:m}=a,g=o.ref(!1);o.provide("isEditable",g);const b=o.ref(void 0),v=o.ref(),y=o.ref(r.fontSizeDefault),x=o.ref(r.fontFamilyDefault),k=o.ref(r.fontWeightDefault);o.provide("fontSize",y),o.provide("fontFamily",x),o.provide("fontWeight",k);const E=o.computed(()=>({fontFamily:x.value,fontSize:y.value,...k.value?{fontWeight:k.value}:{}})),C=o.ref(),_=L=>{const D=parseInt(y.value||"12px"),F=L?D+2:D-2;y.value=F+"px"};o.onBeforeMount(()=>{s.on(_)}),o.onBeforeUnmount(()=>{s.off(_)});const T=o.computed(()=>({...o.unref(u)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0}));function A(L){if(r.disabled||r.readonly)return;const D=UC(L);b.value=D}function V(){b.value=void 0}const O=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled,r.mode),onCreate:({editor:L})=>{p(L)},onUpdate:Et.throttle(({editor:L})=>{c.value=!0;const D=ee(L,r.output);i("update:modelValue",D),i("change",{editor:L,output:D}),p(L)},Ho),extensions:Et.uniqBy(r.extensions,"name"),editable:g.value,onFocus:()=>{X(),B.value=!0,A(O)},onBlur:()=>{B.value=!1,V()},onSelectionUpdate:()=>{A(O)}}),B=o.ref(!1),$=o.ref();o.onMounted(()=>{$.value=O});const H=({lineIndex:L})=>{var F;O&&mS({lineIndex:L,editor:O});const D=(F=v.value)==null?void 0:F.editor;D&&mS({lineIndex:L,editor:D})};o.watch(()=>b.value,L=>{i("lineFocus",{lineIndex:L}),H({lineIndex:L})},{immediate:!0});function X(L){$.value=O}function ee(L,D){if(!L)return"";if(L.isEmpty)return D==="json"?{}:"";switch(D){case"html":return L.getHTML();case"json":return L.getJSON();case"text":return L.getText({blockSeparator:`
|
|
358
|
+
`});default:return""}}function fe(j){return j.every(Q=>L==null?void 0:L.extensionManager.extensions.find(pe=>pe.name===Q))}o.watch(()=>g.languages,()=>{L.commands.checkSpelling()}),o.watch(()=>r.modelValue,j=>{if(!L||Et.isEqual(ie(L,r.output),j))return;const{from:Q,to:pe}=L.state.selection;L.commands.setTextSelection({from:Q,to:pe}),L.commands.setContent(gn(j,r.disabled,r.mode),!1,{preserveWhitespace:"full"})},{deep:!0}),o.watch([()=>r.disabled,()=>r.readonly],()=>{B.value=!r.disabled&&!r.readonly},{immediate:!0}),o.watch(()=>B.value,j=>{var Q;L==null||L.setEditable(j),(Q=L==null?void 0:L.commands)!=null&&Q.setIsEnableSuggestion&&L.commands.setIsEnableSuggestion(j)},{immediate:!0}),o.watch(()=>p.value,()=>{p.value&&p.value.on("selectionUpdate",({editor:j})=>{i("changed:selection",{editor:j})})}),o.onUnmounted(()=>{var j;L==null||L.destroy(),(j=F.value)==null||j.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",ie(L,"html"))});const ke=(j,Q)=>{const pe=L;if(pe){if(Q){const Re=pe.state.doc.nodeAt(+Q),{[it.ELEMENT_ID]:et,...ae}=(Re==null?void 0:Re.attrs)||{};pe.view.dispatch(pe.state.tr.setNodeMarkup(+Q,void 0,{...ae,[it.TEXT]:j}))}else{const{from:Re}=pe.view.state.selection;pe.commands.insertContentAt(Re,{type:"superText",attrs:{"data-id":Zr(6),"data-text":j}})}pe.commands.toggleSuperInputMoblie(),pe.storage.superText.addToast({type:"success",message:"수퍼가 수정되었습니다"})}},re=j=>{var pe;const Q=F.value??L;if(Q){const{from:Re}=Q.view.state.selection;Q.commands.insertContentAt(Re,{type:"configPlan",attrs:{"data-id":Zr(6),"data-text":j}})}(pe=F.value)==null||pe.commands.toggleConfigPlanInput()};function me(j){j===Me.STRAIGHT&&L.commands.focus("end"),j===Me.EDITOR&&L.commands.focus("end")}const J=o.computed(()=>B.value&&r.mode===Me.STRAIGHT||B.value&&r.mode===Me.REPORT);o.onMounted(()=>{var j,Q;r.autoFocus&&me(r.mode),(j=L==null?void 0:L.commands)!=null&&j.setIsMobile&&L.commands.setIsMobile(!0),B.value&&((Q=L.storage.superText)!=null&&Q.enable)&&L.commands.toggleSuperTextView()}),o.watch(()=>r.mode,j=>{r.autoFocus&&me(j)});const te=(ue=L.extensionManager.extensions.find(j=>j.name==="superText"))==null?void 0:ue.options.bottomSheetComponent,ne=o.computed(()=>{const j=r.mode===Me.REPORT,Q=r.mode===Me.EDITOR&&r.isScreenSplit,pe=!r.hideComment;return(j||Q)&&pe}),se=o.computed(()=>!ne.value),{HEADER_ONLY_SIZE:ce,pane1ContentVisible:_e,pane2ContentVisible:Te,pane1Size:Ue,pane2Size:Ke,togglePane:je,handlePaneResize:Rt}=dS(se);function q(){if(!r.contentAutoCopied)return;const j=TT(r.contentAutoCopied,".super-text");k(L,j)}const{isScrolling:U,handleScroll:ge}=Xl(),xe=o.ref(null);e({editor:L});const Fe=o.computed(()=>{var j;return((j=r.watermarkOverlay)==null?void 0:j.component)||"div"}),st=o.computed(()=>{var pe,Re,et;const j=!!((Re=(pe=r.watermarkOverlay)==null?void 0:pe.props)!=null&&Re.text),Q=Fe.value==="div";return{...(et=r.watermarkOverlay)==null?void 0:et.props,...(j||Q)&&{class:"flex-1 flex flex-col"}}}),qe=o.computed(()=>{var Q;const{selection:j}=(Q=F.value)==null?void 0:Q.state;return j instanceof Pe&&j.node.type.name==="image"});return(j,Q)=>{var Bt,xn,gr,Ln;const pe=aS,Re=Lh,et=Rh,ae=Ih,Be=sS,_t=Gte,oe=cc,Ae=Dte,He=Ot,rt=bn,Qe=Lte,qt=Ate;return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.unref(F)?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",style:o.normalizeStyle(o.unref(z)),class:o.normalizeClass(o.unref(Ee)("vdc-editor mobile relative w-full flex flex-col",!r.height&&"flex-1",j.editorClass,j.disabled&&"disabled",j.mode!==o.unref(Me).EDITOR&&j.isShowLineNumber&&"editor-line",j.isEditorView&&"overflow-y-auto"))},[!j.hideBubble&&!j.disabled&&o.unref(B)?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createVNode(pe,{editor:o.unref(L),mode:j.mode},null,8,["editor","mode"]),fe([o.unref(ac)])?(o.openBlock(),o.createBlock(Re,{key:0,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0),fe([o.unref(ma)])?(o.openBlock(),o.createBlock(et,{key:1,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0),fe([o.unref(hs)])?(o.openBlock(),o.createBlock(ae,{key:2,editor:o.unref(L)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),!j.hideToolbar&&!r.isEditorView?(o.openBlock(),o.createBlock(Be,{key:1,editor:o.unref(L),mode:j.mode,disabled:j.disabled,class:"mb-[3px]","custom-class-toolbar":j.customClassToolbar,"active-extensions":j.mode===o.unref(Me).EDITOR?[xi]:void 0},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])):o.createCommentVNode("",!0),r.isEditorView?(o.openBlock(),o.createBlock(_t,{key:2,"is-editor-view-split-content":r.isEditorViewSplitContent,extensions:j.extensions,mode:j.mode,"hide-comment":j.hideComment,"field-name-comment":j.fieldNameComment,"field-name-comment-cuesheet":j.fieldNameCommentCuesheet,"field-name-content":j.fieldNameContent,comment:j.comment,"comment-cuesheet":j.commentCuesheet,content:j.modelValue,"content-text-style":j.contentTextStyle},null,8,["is-editor-view-split-content","extensions","mode","hide-comment","field-name-comment","field-name-comment-cuesheet","field-name-content","comment","comment-cuesheet","content","content-text-style"])):(o.openBlock(),o.createBlock(o.unref(Fh),{key:3,class:o.normalizeClass(o.unref(Ee)("flex-1 basis-0")),horizontal:"",onResize:o.unref(Rt)},{default:o.withCtx(()=>[o.unref(ne)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0,size:o.unref(Ue),"min-size":o.unref(ce),class:"flex flex-col min-h-8"},{default:o.withCtx(()=>{var rr,or;return[(rr=j.titleBarComment)!=null&&rr.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":j.titleBarComment,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),(or=j.fieldNameComment)!=null&&or.label?(o.openBlock(),o.createElementBlock("div",{key:1,class:o.normalizeClass(o.unref(Ee)("flex justify-between items-center mb-1"))},[o.createVNode(Kc,{"field-name":j.fieldNameComment,class:"py-1.5"},null,8,["field-name"]),j.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:0,onClick:Q[0]||(Q[0]=Dn=>o.unref(je)("pane1")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(_e)?o.unref(db):o.unref(kc)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)],2)):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{id:"comment-wrap-scroll",class:o.normalizeClass(o.unref(Ee)("flex-1 !overflow-y-auto overflow-x-hidden basis-0 flex h-full flex-col text-sm",!o.unref(U)&&"scrollbar-thumb-transparent",j.contentClass,j.contentTextStyle)),onScroll:Q[2]||(Q[2]=(...Dn)=>o.unref(ge)&&o.unref(ge)(...Dn))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Fe)),o.normalizeProps(o.guardReactiveProps(o.unref(st))),{default:o.withCtx(()=>[o.createVNode(tne,{ref:"editorCommentRef",mode:j.mode,extensions:j.extensions,"model-value":r.comment,disabled:r.disabled,"disable-super-input":j.disableSuperInput,"field-name-comment":j.fieldNameComment,"is-show-format-control-bar":j.isShowFormatControlBar,"auto-focus":j.autoFocus,"bottom-offset":o.unref(C),"onUpdate:modelValue":Q[1]||(Q[1]=Dn=>i("update:comment",Dn)),onSetEditorSelected:K},null,8,["mode","extensions","model-value","disabled","disable-super-input","field-name-comment","is-show-format-control-bar","auto-focus","bottom-offset"])]),_:1},16)),o.unref(E)?(o.openBlock(),o.createElementBlock("div",{key:0,ref_key:"formatToolbarTargetRef",ref:xe,class:o.normalizeClass(o.unref(Ee)("sticky bottom-0 z-[12] min-h-[58px]",o.unref(_)&&"fixed inset-x-2.5",o.unref(Te)&&"hidden"))},null,2)):o.createCommentVNode("",!0)],34),[[o.vShow,o.unref(_e)]])]}),_:1},8,["size","min-size"])):o.createCommentVNode("",!0),o.createVNode(o.unref(ei),{size:o.unref(Ke),"min-size":o.unref(ce),class:o.normalizeClass(o.unref(Ee)("flex flex-col min-h-8")),style:{overflow:"unset"}},{default:o.withCtx(()=>{var rr,or;return[(rr=j.titleBarContent)!=null&&rr.title?(o.openBlock(),o.createBlock(cS,{key:0,"title-bar":j.titleBarContent,class:"mb-[3px]"},null,8,["title-bar"])):o.createCommentVNode("",!0),o.createElementVNode("div",nne,[(or=j.fieldNameContent)!=null&&or.label?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ee)("flex justify-between items-center mb-1 flex-1"))},[o.createVNode(Kc,{"field-name":j.fieldNameContent,class:"py-1.5"},null,8,["field-name"]),o.createElementVNode("div",rne,[o.unref(J)?(o.openBlock(),o.createElementBlock("div",{key:0,class:o.normalizeClass(o.unref(Ee)("flex items-center"))},[o.createVNode(oe,{for:"superView",class:"body-medium p-2"},{default:o.withCtx(()=>Q[7]||(Q[7]=[o.createTextVNode("수퍼")])),_:1}),o.createVNode(Ae,{id:"superView",checked:o.unref(L).storage.superText.enable,class:"data-[state=checked]:bg-blue-500","onUpdate:checked":Q[3]||(Q[3]=Dn=>o.unref(L).commands.toggleSuperTextView())},null,8,["checked"])],2)):o.createCommentVNode("",!0),j.isAccordion?(o.openBlock(),o.createElementBlock("button",{key:1,onClick:Q[4]||(Q[4]=Dn=>o.unref(je)("pane2")),class:"p-1.5 active:bg-ed-accent"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Te)?o.unref(db):o.unref(kc)),{class:"h-5 w-5"}))])):o.createCommentVNode("",!0)])],2)):o.createCommentVNode("",!0),j.contentAutoCopied?(o.openBlock(),o.createBlock(rt,{key:1,disabled:o.unref(kh)(j.contentAutoCopied),variant:"ghost",class:"w-fit h-fit p-0 gap-x-1 label-large text-blue-500 py-1.5",onClick:q},{default:o.withCtx(()=>[o.createVNode(He,{name:"autoCopy",class:"size-5"}),Q[8]||(Q[8]=o.createTextVNode("자동복사"))]),_:1},8,["disabled"])):o.createCommentVNode("",!0)]),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex-1 basis-0 flex flex-col relative text-sm mb-4",j.contentClass,j.contentTextStyle))},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(Fe)),o.normalizeProps(o.guardReactiveProps(o.unref(st))),{default:o.withCtx(()=>[o.createVNode(o.unref(Nn),{id:"editor-panel",editor:o.unref(L),class:o.normalizeClass(["flex-1 relative break-all",j.mode===o.unref(Me).PLAIN_TEXT&&"plain-text"])},null,8,["editor","class"])]),_:1},16))],2),[[o.vShow,o.unref(Te)]]),o.unref(E)?(o.openBlock(),o.createBlock(o.Teleport,{key:1,to:o.unref(xe),disabled:o.unref(Te)},[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("sticky pb-3.5 mx-1 bottom-0 z-[12] inset-x-0 min-h-11 box-content invisible pointer-events-none",o.unref(R)&&"visible pointer-events-auto",j.customClassFormatControlBar))},[o.unref(qe)?(o.openBlock(),o.createBlock(Qe,{key:0,editor:o.unref(F),class:"absolute inset-x-0"},null,8,["editor"])):(o.openBlock(),o.createBlock(qt,{key:1,editor:o.unref(F),mode:j.mode,disabled:!o.unref(B)||j.disabled,class:"absolute inset-x-0"},null,8,["editor","mode","disabled"]))],2)],8,["to","disabled"])):o.createCommentVNode("",!0),o.createElementVNode("div",{ref_key:"footerTargetRef",ref:y,id:"vdc-editor-footer-target"},null,512)]}),_:1},8,["size","min-size","class"])]),_:1},8,["class","onResize"]))],6)):o.createCommentVNode("",!0),(Bt=o.unref(L))!=null&&Bt.storage.superText&&o.unref(te)?(o.openBlock(),o.createBlock(ene,{key:1,open:o.unref(Y),editor:o.unref(L),"bottom-sheet-component":o.unref(te),onClose:Q[5]||(Q[5]=rr=>o.unref(L).commands.toggleSuperInputMoblie()),onSave:ke},null,8,["open","editor","bottom-sheet-component"])):o.createCommentVNode("",!0),(xn=o.unref(F))!=null&&xn.storage.configPlan?(o.openBlock(),o.createBlock(bE,{key:2,open:(gr=o.unref(F))==null?void 0:gr.storage.configPlan.isShowConfigPlanInput,"is-view-mode":!((Ln=o.unref(F))!=null&&Ln.storage.configPlan.isShowConfigPlanInput),editor:o.unref(F),title:j.$t("editor.configPlan"),onClose:Q[6]||(Q[6]=rr=>o.unref(F).commands.toggleConfigPlanInput()),onSave:re},null,8,["open","is-view-mode","editor","title"])):o.createCommentVNode("",!0)],64)}}}),one=o.defineComponent({__name:"ArticleEditor",props:{mode:{default:Me.STRAIGHT},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["update:modelValue","update:comment"],setup(t,{emit:e}){const n=t,r=wn();return o.onMounted(()=>{r.setTextAlert(n.textAlert||"")}),(i,s)=>n.isMobile?(o.openBlock(),o.createBlock(Gc,o.mergeProps({key:1},n,{"onUpdate:modelValue":s[2]||(s[2]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[3]||(s[3]=a=>i.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(Vh,o.mergeProps({key:0,ref:"coreEditorRef"},n,{"onUpdate:modelValue":s[0]||(s[0]=a=>i.$emit("update:modelValue",a)),"onUpdate:comment":s[1]||(s[1]=a=>i.$emit("update:comment",a))}),null,16))}}),ine=o.defineComponent({__name:"DigitalNewsEditor",props:{mode:{default:Me.EDITOR},isMobile:{type:Boolean},superTextArea:{},modelValue:{},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{},dark:{type:Boolean},disabled:{type:Boolean},hideToolbar:{type:Boolean},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean},maxWidth:{},minHeight:{},maxHeight:{},height:{},extensions:{},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean,default:!0},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},setup(t){const e=t;return(n,r)=>{const i=Vh,s=Gc;return e.isMobile?(o.openBlock(),o.createBlock(s,o.mergeProps({key:1},e,{"onUpdate:modelValue":r[1]||(r[1]=a=>n.$emit("update:modelValue",a)),"onUpdate:comment":r[2]||(r[2]=a=>n.$emit("update:comment",a))}),null,16)):(o.openBlock(),o.createBlock(i,o.mergeProps({key:0},e,{"onUpdate:modelValue":r[0]||(r[0]=a=>n.$emit("update:modelValue",a))}),null,16))}}});var fS={exports:{}};(function(t){(function(){function e(z){return z===">"}function n(z){return z==="<"}function r(z){return/^\s+$/.test(z)}function i(z){var L=z.match(/^\s*<([^!>][^>]*)>\s*$/);return!!L&&L[1].trim().split(" ")[0]}function s(z){return!i(z)}function a(z){return/^<!--/.test(z)}function l(z){return/--\>$/.test(z)}var u,c=new RegExp("^<(iframe|object|math|svg|script|video|head|style|a)");function f(z){var L=u.exec(z);return L&&L[1]}function p(z,L){return z.substring(z.length-L.length-2)==="</"+L}function m(z){return/^\s*<[^>]+\/>\s*$/.test(z)}function g(z){var L=/^<img[\s>]/.test(z);return L||s(z)||f(z)||m(z)}function b(z){return{string:z,key:x(z)}}function v(z,L,D,F){this.segment=F,this.length=D,this.startInBefore=z+F.beforeIndex,this.startInAfter=L+F.afterIndex,this.endInBefore=this.startInBefore+this.length-1,this.endInAfter=this.startInAfter+this.length-1,this.segmentStartInBefore=z,this.segmentStartInAfter=L,this.segmentEndInBefore=this.segmentStartInBefore+this.length-1,this.segmentEndInAfter=this.segmentStartInAfter+this.length-1}function y(z){for(var L="char",D="",F="",R=[],K=0;K<z.length;K++){var Y=z[K];switch(L){case"tag":var ie=f(D);ie?(L="atomic_tag",F=ie,D+=Y):a(D)?(L="html_comment",D+=Y):e(Y)?(D+=">",R.push(b(D)),D="",r(Y)?L="whitespace":L="char"):D+=Y;break;case"atomic_tag":e(Y)&&p(D,F)?(D+=">",R.push(b(D)),D="",F="",L="char"):D+=Y;break;case"html_comment":D+=Y,l(D)&&(D="",L="char");break;case"char":n(Y)?(D&&R.push(b(D)),D="<",L="tag"):/\s/.test(Y)?(D&&R.push(b(D)),D=Y,L="whitespace"):/[\w\d\#@]/.test(Y)?D+=Y:/&/.test(Y)?(D&&R.push(b(D)),D=Y):(D+=Y,R.push(b(D)),D="");break;case"whitespace":n(Y)?(D&&R.push(b(D)),D="<",L="tag"):r(Y)?D+=Y:(D&&R.push(b(D)),D=Y,L="char");break;default:throw new Error("Unknown mode "+L)}}return D&&R.push(b(D)),R}function x(z){var L=/^<img.*src=['"]([^"']*)['"].*>$/.exec(z);if(L)return'<img src="'+L[1]+'">';var D=/^<a.*href=['"]([^"']*)['"]/.exec(z);if(D)return'<a href="'+D[1]+'"></a>';var F=/^<object.*data=['"]([^"']*)['"]/.exec(z);if(F)return'<object src="'+F[1]+'"></object>';if(/^<(svg|math|video)[\s>]/.test(z)){var R=z.indexOf('data-uuid="');if(R!==-1){var K=z.slice(0,R),Y=z.slice(R+44);return K+Y}else return z}var ie=/^<iframe.*src=['"]([^"']*)['"].*>/.exec(z);if(ie)return'<iframe src="'+ie[1]+'"></iframe>';var fe=/<([^\s>]+)[\s>]/.exec(z);return fe?"<"+fe[1].toLowerCase()+">":z&&z.replace(/(\s+| | )/g," ")}function k(z){return z.reduce(function(L,D,F){return L[D.key]?L[D.key].push(F):L[D.key]=[F],L},Object.create(null))}function E(z,L){return L.endInBefore<z.startInBefore&&L.endInAfter<z.startInAfter?-1:L.startInBefore>z.endInBefore&&L.startInAfter>z.endInAfter?1:0}function C(){this._root=null}C.prototype={add:function(z){var L={value:z,left:null,right:null},D=this._root;if(D)for(;;){var F=E(D.value,z);if(F===-1)if(D.left)D=D.left;else{D.left=L;break}else if(F===1)if(D.right)D=D.right;else{D.right=L;break}else break}else this._root=L},toArray:function(){function z(L,D){return L&&(z(L.left,D),D.push(L.value),z(L.right,D)),D}return z(this._root,[])}};function _(z){for(var L=z.beforeTokens,D=z.afterMap,F=null,R=null,K=0;K<L.length;K++){var Y=!1,ie=L.length-K;if(R&&ie<R.length)break;var fe=L[K];if(fe.key===" "){F=K;continue}F===K-1&&(Y=!0);var ke=D[fe.key];ke&&ke.forEach(function(re){var me=R?R.length:0,J=T(z,K,re,me,Y);J&&J.length>me&&(R=J)})}return R}function T(z,L,D,F,R){var K=z.beforeTokens,Y=z.afterTokens,ie=L+F,fe=D+F;if(!(ie>=K.length||fe>=Y.length)){if(F){var ke=K[ie].key,re=Y[fe].key;if(ke!==re)return}for(var me=!0,J=1,te=L+J,ne=D+J;me&&te<K.length&&ne<Y.length;){var se=K[te].key,ce=Y[ne].key;se===ce?(J++,te=L+J,ne=D+J):me=!1}if(R&&L>0&&D>0){var _e=K[L-1].key,Te=Y[D-1].key;_e===" "&&Te===" "&&(L--,D--,J++)}return new v(L,D,J,z)}}function A(z,L,D,F){return{beforeTokens:z,afterTokens:L,beforeMap:k(z),afterMap:k(L),beforeIndex:D,afterIndex:F}}function V(z){for(var L=new C,D,F=[z];F.length;)if(z=F.pop(),D=_(z),D&&D.length){if(D.segmentStartInBefore>0&&D.segmentStartInAfter>0){var R=z.beforeTokens.slice(0,D.segmentStartInBefore),K=z.afterTokens.slice(0,D.segmentStartInAfter);F.push(A(R,K,z.beforeIndex,z.afterIndex))}var Y=z.beforeTokens.slice(D.segmentEndInBefore+1),ie=z.afterTokens.slice(D.segmentEndInAfter+1),fe=z.beforeIndex+D.segmentEndInBefore+1,ke=z.afterIndex+D.segmentEndInAfter+1;Y.length&&ie.length&&F.push(A(Y,ie,fe,ke)),L.add(D)}return L.toArray()}function O(z,L){if(!z)throw new Error("Missing beforeTokens");if(!L)throw new Error("Missing afterTokens");var D=0,F=0,R=[],K=A(z,L,0,0),Y=V(K);Y.push(new v(z.length,L.length,0,K));for(var ie=0;ie<Y.length;ie++){var fe=Y[ie],ke="none";D===fe.startInBefore?F!==fe.startInAfter&&(ke="insert"):(ke="delete",F!==fe.startInAfter&&(ke="replace")),ke!=="none"&&R.push({action:ke,startInBefore:D,endInBefore:ke!=="insert"?fe.startInBefore-1:null,startInAfter:F,endInAfter:ke!=="delete"?fe.startInAfter-1:null}),fe.length!==0&&R.push({action:"equal",startInBefore:fe.startInBefore,endInBefore:fe.endInBefore,startInAfter:fe.startInAfter,endInAfter:fe.endInAfter}),D=fe.endInBefore+1,F=fe.endInAfter+1}var re=[],me={action:"none"};function J(se){return se.action!=="equal"||se.endInBefore-se.startInBefore!==0?!1:/^\s$/.test(z.slice(se.startInBefore,se.endInBefore+1))}for(var te=0;te<R.length;te++){var ne=R[te];J(ne)&&me.action==="replace"||ne.action==="replace"&&me.action==="replace"?(me.endInBefore=ne.endInBefore,me.endInAfter=ne.endInAfter):(re.push(ne),me=ne)}return re}function B(z){this.tokens=z,this.notes=z.reduce(function(L,D,F){L.notes.push({isWrappable:g(D),insertedTag:!1});var R=!m(D)&&i(D),K=L.tagStack[L.tagStack.length-1];return R&&(K&&"/"+K.tag===R?(L.notes[K.position].insertedTag=!0,L.tagStack.pop()):L.tagStack.push({tag:R,position:F})),L},{notes:[],tagStack:[]}).notes}B.prototype.combine=function(z,L){var D=this.notes,F=this.tokens.slice(),R=F.reduce(function(K,Y,ie){D[ie].insertedTag&&(F[ie]=L(F[ie])),K.status===null&&(K.status=D[ie].isWrappable);var fe=D[ie].isWrappable;return fe!==K.status&&(K.list.push({isWrappable:K.status,tokens:F.slice(K.lastIndex,ie)}),K.lastIndex=ie,K.status=fe),ie===F.length-1&&K.list.push({isWrappable:K.status,tokens:F.slice(K.lastIndex,ie+1)}),K},{list:[],status:null,lastIndex:0}).list;return R.map(z).join("")};function $(z,L,D,F,R){var K=new B(L);F=F?F+"-":"";var Y=" data-"+F+'operation-index="'+D+'"';return R&&(Y+=' class="'+R+'"'),K.combine(function(ie){if(ie.isWrappable){var fe=ie.tokens.join("");if(fe.trim())return"<"+z+Y+">"+fe+"</"+z+">"}else return ie.tokens.join("");return""},function(ie){var fe=' data-diff-node="'+z+'"';return fe+=" data-"+F+'operation-index="'+D+'"',ie.replace(/>\s*$/,fe+"$&")})}var H={equal:function(z,L,D,F,R,K){var Y=D.slice(z.startInAfter,z.endInAfter+1);return Y.reduce(function(ie,fe){return ie+fe.string},"")},insert:function(z,L,D,F,R,K){var Y=D.slice(z.startInAfter,z.endInAfter+1),ie=Y.map(function(fe){return fe.string});return $("ins",ie,F,R,K)},delete:function(z,L,D,F,R,K){var Y=L.slice(z.startInBefore,z.endInBefore+1),ie=Y.map(function(fe){return fe.string});return $("del",ie,F,R,K)},replace:function(){return H.delete.apply(null,arguments)+H.insert.apply(null,arguments)}};function X(z,L,D,F,R){return D.reduce(function(K,Y,ie){return K+H[Y.action](Y,z,L,ie,F,R)},"")}function ee(z,L,D,F,R){if(z===L)return z;R?u=new RegExp("^<("+R.replace(/\s*/g,"").replace(/,/g,"|")+")"):u=c,z=y(z),L=y(L);var K=O(z,L);return X(z,L,K,F,D)}ee.htmlToTokens=y,ee.findMatchingBlocks=V,V.findBestMatch=_,V.createMap=k,V.createToken=b,V.createSegment=A,V.getKeyForToken=x,ee.calculateOperations=O,ee.renderOperations=X,t!==null?t.exports=ee:this.htmldiff=ee}).call(ml)})(fS);var sne=fS.exports;const ane=oR(sne),pS=(t,e,n)=>{let r="";{const i=gn(t,n),s=gn(e,n);r=ane(i,s,null,null,"button")}return r=r.replace(/<del[^>]*>/g,'<span class="diff-del">').replace(/<\/del>/g,"</span>").replace(/<ins[^>]*>/g,'<mark style="background:#FEF3C7;">').replace(/<\/ins>/g,"</mark>"),r},lne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},une={class:"flex items-center gap-2"},cne={class:"body-small text-gray-600 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-gray-100"},dne={class:"label-large text-gray-800 line-clamp-1"},fne={class:"flex items-center gap-1 shrink-0"},pne={class:"mt-[2px]"},hne={class:"body-small text-gray-400"},mne={class:"border border-ed-gray rounded-[5px] p-2.5 my-2 h-full"},gne={key:0,class:"px-2 min-h-[24px] flex items-center justify-between gap-1 mb-1.5"},bne={class:"flex items-center gap-2"},vne={class:"body-small text-blue-500 px-[6px] py-[2px] shrink-0 rounded-[4px] bg-blue-50"},yne={class:"label-large text-gray-800 line-clamp-1"},wne={class:"flex items-center gap-1 shrink-0"},xne={class:"mt-[2px]"},Cne={class:"body-small text-gray-400"},kne=po(o.defineComponent({__name:"ArticleCompareEditor",props:{originalData:{},changedData:{},extensions:{},editorClass:{},isCompare:{type:Boolean,default:!0},contentTextStyle:{}},setup(t){const e=t,n=o.computed(()=>[...e.extensions,lS]),r=o.ref(!1),i=o.computed(()=>!e.originalData||!e.changedData?{comment:"",content:""}:{comment:pS(e.originalData.comment,e.changedData.comment,!0),content:pS(e.originalData.content,e.changedData.content,!0)}),{HEADER_ONLY_SIZE:s,pane1ContentVisible:a,pane2ContentVisible:l,pane1Size:u,pane2Size:c,handlePaneResize:f}=dS(!1,6),{isScrolling:p,handleScroll:m}=Xl(),{isScrolling:g,handleScroll:b}=Xl();return(v,y)=>{const x=Ot;return o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(o.unref(Ee)("h-full",v.editorClass))},[o.createVNode(o.unref(Fh),{horizontal:"",onResize:o.unref(f)},{default:o.withCtx(()=>[o.createVNode(o.unref(ei),{size:o.unref(u),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B,$,H;return[(E=(k=v.originalData)==null?void 0:k.titleBar)!=null&&E.title?(o.openBlock(),o.createElementBlock("div",lne,[o.createElementVNode("div",une,[o.createElementVNode("div",cne,o.toDisplayString(v.$t("기준")),1),o.createElementVNode("h3",dne,o.toDisplayString((_=(C=v.originalData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",fne,[o.createElementVNode("div",pne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",hne,o.toDisplayString((A=(T=v.originalData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("border border-gray-50 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(p)&&"scrollbar-thumb-transparent")),onScroll:y[0]||(y[0]=(...X)=>o.unref(m)&&o.unref(m)(...X))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(V=v.originalData)==null?void 0:V.fieldNameComment,"field-name-content":(O=v.originalData)==null?void 0:O.fieldNameContent,comment:(B=v.originalData)==null?void 0:B.comment,"model-value":($=v.originalData)==null?void 0:$.content,"hide-comment":(H=v.originalData)==null?void 0:H.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(a)]])]}),_:1},8,["size","min-size"]),o.unref(r)?(o.openBlock(),o.createBlock(o.unref(ei),{key:0},{default:o.withCtx(()=>{var k,E,C,_,T;return[o.createElementVNode("div",mne,[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(k=v.changedData)==null?void 0:k.fieldNameComment,"field-name-content":(E=v.changedData)==null?void 0:E.fieldNameContent,comment:(C=v.changedData)==null?void 0:C.comment,"model-value":(_=v.changedData)==null?void 0:_.content,"hide-comment":(T=v.changedData)==null?void 0:T.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])])]}),_:1})):o.createCommentVNode("",!0),o.createVNode(o.unref(ei),{size:o.unref(c),"min-size":o.unref(s),class:"flex flex-col"},{default:o.withCtx(()=>{var k,E,C,_,T,A,V,O,B;return[(E=(k=v.changedData)==null?void 0:k.titleBar)!=null&&E.title?(o.openBlock(),o.createElementBlock("div",gne,[o.createElementVNode("div",bne,[o.createElementVNode("div",vne,o.toDisplayString(v.$t("대상")),1),o.createElementVNode("h3",yne,o.toDisplayString((_=(C=v.changedData)==null?void 0:C.titleBar)==null?void 0:_.title),1)]),o.createElementVNode("div",wne,[o.createElementVNode("div",xne,[o.createVNode(x,{name:"Clock",class:"w-[13px] h-[13px] text-gray-400"})]),o.createElementVNode("div",Cne,o.toDisplayString((A=(T=v.changedData)==null?void 0:T.titleBar)==null?void 0:A.time),1)])])):o.createCommentVNode("",!0),o.withDirectives(o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("border border-gray-50 bg-dark-blue-600 rounded-md py-[10px] px-4 flex-1 overflow-y-auto",!o.unref(g)&&"scrollbar-thumb-transparent")),onScroll:y[1]||(y[1]=(...$)=>o.unref(b)&&o.unref(b)(...$))},[o.createVNode(Gc,{"editor-class":"h-full",mode:o.unref(Me).REPORT,disabled:"","hide-toolbar":"",extensions:o.unref(n),"field-name-comment":(V=v.changedData)==null?void 0:V.fieldNameComment,"field-name-content":(O=v.changedData)==null?void 0:O.fieldNameContent,comment:o.unref(i).comment,"model-value":o.unref(i).content,"hide-comment":(B=v.changedData)==null?void 0:B.hideComment,"is-compare":v.isCompare,"content-text-style":v.contentTextStyle},null,8,["mode","extensions","field-name-comment","field-name-content","comment","model-value","hide-comment","is-compare","content-text-style"])],34),[[o.vShow,o.unref(l)]])]}),_:1},8,["size","min-size"])]),_:1},8,["onResize"])],2)}}}),[["__scopeId","data-v-4bdb50a2"]]),Ene=o.defineComponent({__name:"SuperViewMobileSuperEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean,default:!1},fontSizeDefault:{},fontFamilyDefault:{},fontWeightDefault:{},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean,default:void 0},disabled:{type:Boolean},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean,default:!1},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:600},maxHeight:{default:void 0},height:{},extensions:{default:()=>[]},editorClass:{},contentClass:{},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{},readonly:{type:Boolean},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(mr.RENDER_SUPER_TEXT),a=wn(),{isReady:l,editor:u,updateEditorState:c,checkSpellStore:f}=a,p=o.ref(!1);o.provide("isEditable",p);const m=o.ref(cx(r.modelValue));function g(C){if(r.disabled||r.readonly)return;const _=UC(C);i("lineFocus",{lineIndex:_})}function b(){i("lineFocus",{lineIndex:void 0})}const v=new Vo({enablePasteRules:!1,enableInputRules:!1,content:m.value,onCreate:({editor:C})=>{c(C)},onUpdate:Et.throttle(({editor:C})=>{l.value=!0;const _=E(C,r.output);i("update:modelValue",_),i("change",{editor:C,output:_}),c(C)},Ho),extensions:Et.uniqBy(r.extensions,"name"),editable:p.value,onFocus:()=>{x(),y.value=!0,g(v)},onBlur:()=>{y.value=!1,b()},onSelectionUpdate:()=>{g(v)}}),y=o.ref(!1);function x(){i("setEditorSelected",v)}function k(){s.emit({action:"render"})}function E(C,_){if(!C)return"";if(C.isEmpty)return _==="json"?{}:"";switch(_){case"html":return C.getHTML();case"json":return C.getJSON();case"text":return C.getText();default:return""}}return o.watch(()=>f.languages,()=>{v.commands.checkSpelling()}),o.watch(()=>r.modelValue,C=>{if(!v||Et.isEqual(E(v,r.output),C))return;const{from:_,to:T}=v.state.selection;v.commands.setTextSelection({from:_,to:T}),k(),m.value=cx(C)},{deep:!0}),o.watch(()=>u.value,()=>{u.value&&u.value.on("selectionUpdate",({editor:C})=>{i("changed:selection",{editor:C})})}),o.watch(()=>r.disableSuperInput,()=>{const C=document.getElementById(dr.COMMENT);C==null||C.setAttribute(dr.DISABLE_SUPER_INPUT,`${r.disableSuperInput}`)}),o.onUnmounted(()=>v==null?void 0:v.destroy()),Dh(v),o.onMounted(()=>{var C,_;(C=v==null?void 0:v.commands)!=null&&C.setIsEnableSuggestion&&v.commands.setIsEnableSuggestion(!1),(_=v==null?void 0:v.commands)!=null&&_.setIsMobile&&v.commands.setIsMobile(!0)}),e({editor:v}),(C,_)=>{var A;const T=Kc;return o.openBlock(),o.createElementBlock(o.Fragment,null,[(A=C.fieldNameSuper)!=null&&A.label?(o.openBlock(),o.createBlock(T,{key:0,"field-name":C.fieldNameSuper,mode:C.mode,disabled:C.disabled,class:"mb-1",intent:"secondary"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Nn),{editor:o.unref(v),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],64)}}}),Sne=(t,e)=>{let n=null;return t.state.doc.descendants((r,i)=>{if(r.type.name==="paragraph"&&Number(r.attrs["number-line"])===e)return n={node:r,pos:i},!1}),n},hS="focused-line";async function mS({lineIndex:t,editor:e}){if(e.state.doc.descendants((l,u)=>{if(l.attrs.class===hS){const c=e.state.tr.setNodeMarkup(u,void 0,{...l.attrs,class:""});return e.view.dispatch(c),!1}}),await o.nextTick(),!t)return;const n=Sne(e,t);if(!n)return;const{node:r,pos:i}=n,s=e.state.tr.setNodeMarkup(i,void 0,{...r.attrs,class:hS});e.view.dispatch(s),await o.nextTick(),e.view.nodeDOM(i).scrollIntoView({behavior:"smooth"})}const _ne=o.defineComponent({__name:"SuperViewMobileEditor",props:{isMobile:{type:Boolean},superTextArea:{},mode:{},modelValue:{default:""},comment:{default:""},commentCuesheet:{},hideComment:{type:Boolean},disableSuperInput:{type:Boolean},fontSizeDefault:{default:"12px"},fontFamilyDefault:{default:""},fontWeightDefault:{default:void 0},letterSpacingDefault:{},contentTextStyle:{},isOpenSuperView:{type:Boolean},output:{default:"html"},dark:{type:Boolean},disabled:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:!1},isShowFormatControlBar:{type:Boolean},customClassFormatControlBar:{},titleBarComment:{},titleBarContent:{},fieldNameComment:{},fieldNameCommentCuesheet:{},fieldNameContent:{default:null},fieldNameSuper:{default:null},isScreenSplit:{},isShowLineNumber:{type:Boolean},hideMenubar:{type:Boolean},disableBubble:{type:Boolean},hideBubble:{type:Boolean,default:!1},maxWidth:{default:void 0},minHeight:{default:200},maxHeight:{default:void 0},height:{default:void 0},extensions:{default:()=>[]},editorClass:{default:void 0},contentClass:{default:void 0},isCompare:{type:Boolean},autoHeight:{type:Boolean},textAlert:{},customClassToolbar:{default:""},readonly:{type:Boolean,default:!1},canEditSuperReadOnly:{type:Boolean},autoFocus:{type:Boolean},superPreviewCustomClass:{},minChar:{},isAccordion:{type:Boolean},contentAutoCopied:{},isEditorView:{type:Boolean},isEditorViewSplitContent:{type:Boolean},editorContentInstance:{},toolbarExtensionOrder:{},watermarkOverlay:{},bottomOffset:{},characterCountLimit:{},blockSeparatorPolicy:{},fixedSuperPreviewWidth:{type:Boolean}},emits:["enter","change","update:modelValue","update:comment","onFocusEditor","changed:selection","setEditorSelected","onBlurEditor","lineFocus","onFocus","onBlur"],setup(t,{expose:e,emit:n}){const r=t,i=n;o.provide("isMobile",!0),o.computed(()=>r.mode===Me.EDITOR);const s=Ne.useEventBus(mr.INCREASE_DECREASE_FONTSIZE);o.useAttrs();const a=wn(),{state:l,isFullscreen:u,isReady:c,editor:f,updateEditorState:p,checkSpellStore:m}=a,g=o.ref(!1);o.provide("isEditable",g);const b=o.ref(void 0),v=o.ref(),y=o.ref(r.fontSizeDefault),x=o.ref(r.fontFamilyDefault),k=o.ref(r.fontWeightDefault);o.provide("fontSize",y),o.provide("fontFamily",x),o.provide("fontWeight",k);const E=o.computed(()=>({fontFamily:x.value,fontSize:y.value,...k.value?{fontWeight:k.value}:{}})),C=o.ref(),_=L=>{const D=parseInt(y.value||"12px"),F=L?D+2:D-2;y.value=F+"px"};o.onBeforeMount(()=>{s.on(_)}),o.onBeforeUnmount(()=>{s.off(_)});const T=o.computed(()=>({...o.unref(u)?{height:"100%"}:{minHeight:r.minHeight?on(r.minHeight):void 0,maxHeight:r.maxHeight?on(r.maxHeight):void 0,height:r.height?on(r.height):void 0},maxWidth:on(r.maxWidth),width:r.maxWidth?"100%":void 0,margin:r.maxWidth?"0 auto":void 0}));function A(L){if(r.disabled||r.readonly)return;const D=UC(L);b.value=D}function V(){b.value=void 0}const O=new Vo({enablePasteRules:!1,enableInputRules:!1,content:gn(r.modelValue,r.disabled,r.mode),onCreate:({editor:L})=>{p(L)},onUpdate:Et.throttle(({editor:L})=>{c.value=!0;const D=ee(L,r.output);i("update:modelValue",D),i("change",{editor:L,output:D}),p(L)},Ho),extensions:Et.uniqBy(r.extensions,"name"),editable:g.value,onFocus:()=>{X(),B.value=!0,A(O)},onBlur:()=>{B.value=!1,V()},onSelectionUpdate:()=>{A(O)}}),B=o.ref(!1),$=o.ref();o.onMounted(()=>{$.value=O});const H=({lineIndex:L})=>{var F;O&&mS({lineIndex:L,editor:O});const D=(F=v.value)==null?void 0:F.editor;D&&mS({lineIndex:L,editor:D})};o.watch(()=>b.value,L=>{i("lineFocus",{lineIndex:L}),H({lineIndex:L})},{immediate:!0});function X(L){$.value=O}function ee(L,D){if(!L)return"";if(L.isEmpty)return D==="json"?{}:"";switch(D){case"html":return L.getHTML();case"json":return L.getJSON();case"text":return L.getText({blockSeparator:`
|
|
359
359
|
`});default:return""}}function z(L){return L.every(D=>O==null?void 0:O.extensionManager.extensions.find(F=>F.name===D))}return o.watch(()=>m.languages,()=>{O.commands.checkSpelling()}),o.watch(()=>r.modelValue,L=>{if(!O||Et.isEqual(ee(O,r.output),L))return;const{from:D,to:F}=O.state.selection;O.commands.setTextSelection({from:D,to:F}),O.commands.setContent(gn(L,r.disabled,r.mode),!1)},{deep:!0}),o.watch(()=>f.value,()=>{f.value&&f.value.on("selectionUpdate",({editor:L})=>{i("changed:selection",{editor:L})})}),o.onUnmounted(()=>{var L;O==null||O.destroy(),(L=$.value)==null||L.destroy()}),wc(ju.SAVE,()=>{localStorage.setItem("content",ee(O,"html"))}),o.onMounted(()=>{var L,D;(L=O==null?void 0:O.commands)!=null&&L.setIsEnableSuggestion&&O.commands.setIsEnableSuggestion(!1),(D=O==null?void 0:O.commands)!=null&&D.setIsMobile&&O.commands.setIsMobile(!0)}),Dh(O),e({editor:O}),(L,D)=>{const F=Lh,R=Rh,K=Ih,Y=C8,ie=sS,fe=Kc;return $.value?(o.openBlock(),o.createElementBlock("div",{key:0,id:"vdc-editor",ref_key:"editorRef",ref:C,style:o.normalizeStyle(T.value),class:o.normalizeClass(o.unref(Ee)("vdc-editor mobile relative w-full flex flex-col editor-line-number editor-line",!r.height&&"flex-1",L.editorClass))},[!L.hideBubble&&!L.disabled&&g.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[z([o.unref(ac)])?(o.openBlock(),o.createBlock(F,{key:0,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),z([o.unref(ma)])?(o.openBlock(),o.createBlock(R,{key:1,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),z([o.unref(hs)])?(o.openBlock(),o.createBlock(K,{key:2,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0),z([o.unref(Il),o.unref(wi)])?(o.openBlock(),o.createBlock(Y,{key:3,editor:o.unref(O)},null,8,["editor"])):o.createCommentVNode("",!0)],64)):o.createCommentVNode("",!0),L.hideToolbar?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ie,{key:1,editor:$.value,mode:L.mode,disabled:L.disabled,class:"mb-[3px]","custom-class-toolbar":L.customClassToolbar,"active-extensions":[xi]},null,8,["editor","mode","disabled","custom-class-toolbar","active-extensions"])),o.createVNode(o.unref(Fh),{class:o.normalizeClass(o.unref(Ee)("flex flex-col")),style:o.normalizeStyle({...E.value}),horizontal:""},{default:o.withCtx(()=>[o.createVNode(o.unref(ei),{size:50,class:"border-none p-0 flex flex-col bg-[#EEEEEE]"},{default:o.withCtx(()=>{var ke;return[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex-1 !overflow-y-auto scrollbar-hide basis-0 flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",L.contentClass))},[(ke=L.fieldNameContent)!=null&&ke.label?(o.openBlock(),o.createBlock(fe,{key:0,"field-name":L.fieldNameContent,mode:L.mode,disabled:L.disabled,class:"mb-1"},null,8,["field-name","mode","disabled"])):o.createCommentVNode("",!0),o.createVNode(o.unref(Nn),{editor:o.unref(O),spellcheck:"true",class:o.normalizeClass(["flex-1 flex-col"])},null,8,["editor"])],2)]}),_:1}),o.createVNode(o.unref(ei),{size:50,class:"border-none p-0 flex flex-col"},{default:o.withCtx(()=>[o.createElementVNode("div",{class:o.normalizeClass(o.unref(Ee)("flex-1 overflow-y-auto scrollbar-hide flex flex-col pt-1.5 p-2.5 border border-ed-gray rounded-[5px]",B.value&&"border-ed-blue",L.disabled&&"border-transparent",L.contentClass))},[o.createVNode(Ene,{ref_key:"superEditorRef",ref:v,mode:L.mode,"field-name-super":L.fieldNameSuper,extensions:L.extensions,"model-value":L.modelValue,disabled:L.disabled,readonly:L.readonly,onLineFocus:H},null,8,["mode","field-name-super","extensions","model-value","disabled","readonly"])],2)]),_:1})]),_:1},8,["class","style"])],6)):o.createCommentVNode("",!0)}}}),gS={"editor.remove":"Remove","editor.copy":"Copy","editor.words":"WORDS","editor.characters":"CHARACTERS","editor.default":"Default","editor.recent":"Recently Used","editor.nofill":"Remove Color","editor.format":"Format Painter","editor.close":"Close","editor.modify":"Modify","editor.preview.tooltip":"Preview","editor.draghandle.tooltip":"Click And Drag","editor.copyToClipboard":"CopyToClipboard","editor.importWord.tooltip":"Import from Word","editor.importWord.success":"Import Success","editor.importWord.fileTooLarge":"File is Too large","editor.importWord.error":"Import Failed, File not supported","editor.slash":"Press '/' for commands","editor.slash.empty":"No Result","editor.slash.format":"Format","editor.slash.insert":"Insert","editor.slash.embed":"Embed Services","editor.content":"Please input content","editor.slash.hint":"Please input content","editor.moremark":"More Text Styles","editor.size.small.tooltip":"Small","editor.size.medium.tooltip":"Medium","editor.size.large.tooltip":"Cover","editor.bold.tooltip":"Bold","editor.italic.tooltip":"Italic","editor.underline.tooltip":"Underline","editor.strike.tooltip":"Strike","editor.color.tooltip":"Color","editor.color.more":"Color Picker","editor.highlight.tooltip":"Highlight","editor.lineheight.tooltip":"Line Height","editor.heading.tooltip":"Headings","editor.heading.h1.tooltip":"Heading 1","editor.heading.h2.tooltip":"Heading 2","editor.heading.h3.tooltip":"Heading 3","editor.heading.h4.tooltip":"Heading 4","editor.heading.h5.tooltip":"Heading 5","editor.heading.h6.tooltip":"Heading 6","editor.paragraph.tooltip":"Paragraph","editor.textalign.tooltip":"Align","editor.textalign.left.tooltip":"Left","editor.textalign.center.tooltip":"Center","editor.textalign.right.tooltip":"Right","editor.textalign.justify.tooltip":"Justify","editor.indent":"Indent","editor.indent.indent":"Increase Indent","editor.indent.outdent":"Decrease Indent","editor.fontFamily.tooltip":"Font family","editor.fontFamily.default":"Default","editor.fontFamily.gulim":"Gulim","editor.fontFamily.dotum":"Dotum","editor.fontFamily.gungsuh":"Gungsuh","editor.fontSize.tooltip":"Font size","editor.fontSize.default.tooltip":"Default","editor.superscript.tooltip":"Superscript","editor.subscript.tooltip":"Subscript","editor.bulletlist.tooltip":"Bullet List","editor.bulletlist.disc.tooltip":"Disc","editor.bulletlist.circle.tooltip":"Circle","editor.bulletlist.square.tooltip":"Square","editor.orderedlist.tooltip":"Ordered List","editor.orderedlist.decimal.tooltip":"Decimal","editor.orderedlist.decimalLeadingZero.tooltip":"Decimal with leading zero","editor.orderedlist.lowerRoman.tooltip":"Lower Roman","editor.orderedlist.upperRoman.tooltip":"Upper Roman","editor.orderedlist.lowerLatin.tooltip":"Lower Latin","editor.orderedlist.upperLatin.tooltip":"Upper Latin","editor.orderedlist.tradChineseInformal.tooltip":"Trad Chinese Informal","editor.orderedlist.simpChineseFormal.tooltip":"Simp Chinese Informal","editor.tasklist.tooltip":"Task List","editor.indent.tooltip":"Indent","editor.outdent.tooltip":"Outdent","editor.columns.tooltip":"Columns","editor.link.tooltip":"Link","editor.link.unlink.tooltip":"UnLink","editor.link.open.tooltip":"Open Link","editor.link.edit.tooltip":"Edit Link","editor.link.dialog.title":"Insert Link","editor.link.dialog.link":"Link","editor.link.dialog.text":"Text","editor.link.dialog.openInNewTab":"Open In New Tab","editor.link.dialog.link.placeholder":"Link Address","editor.link.dialog.text.placeholder":"Add Description","editor.link.dialog.button.apply":"Apply","editor.image.tooltip":"Image","editor.image.menu.flipX":"Flip vertical","editor.image.menu.flipY":"Flip horizontal","editor.image.menu.moveUp":"Move up","editor.image.menu.moveDown":"Move down","editor.image.menu.size":"Set Size","editor.image.menu.size.width":"Width","editor.image.menu.size.height":"Height","editor.image.dragger.tooltip":"Click or drag the image to the area to upload","editor.image.float.left.tooltip":"Float left","editor.image.float.none.tooltip":"Float none","editor.image.float.right.tooltip":"Float right","editor.image.dialog.title":"Add an image","editor.image.dialog.tab.url":"Url","editor.image.dialog.tab.upload":"Upload","editor.image.dialog.uploading":"Uploading","editor.image.dialog.form.link":"Link","editor.image.dialog.placeholder":"Link","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"Lock original aspect ratio","editor.image.dialog.form.file":"File","editor.image.dialog.button.apply":"apply","editor.video.tooltip":"Video","editor.video.dialog.tab.upload":"Upload","editor.video.dialog.uploading":"Uploading","editor.video.dialog.title":"Embed or upload a video","editor.video.dialog.link":"link","editor.video.dialog.placeholder":"Link","editor.video.dialog.button.apply":"apply","editor.table.tooltip":"Table","editor.table.menu.insert_table":"Insert Table","editor.table.menu.insert_table.with_header_row":"With header row","editor.table.menu.insertColumnBefore":"Insert Column Before","editor.table.menu.insertColumnAfter":"Insert Column After","editor.table.menu.deleteColumn":"Delete Column","editor.table.menu.insertRowAbove":"Insert Row Above","editor.table.menu.insertRowBelow":"Insert Row Below","editor.table.menu.deleteRow":"Delete Row","editor.table.menu.mergeCells":"Merge Cells","editor.table.menu.splitCells":"Split Cells","editor.table.menu.deleteTable":"Delete Table","editor.table.menu.setCellsBgColor":"Cell Background Color","editor.blockquote.tooltip":"Blockquote","editor.horizontalrule.tooltip":"Horizontal Rule","editor.code.tooltip":"Code","editor.codeblock.tooltip":"Code Block","editor.clear.tooltip":"Clear Format","editor.undo.tooltip":"Undo","editor.redo.tooltip":"Redo","editor.fullscreen.tooltip.fullscreen":"Fullscreen","editor.fullscreen.tooltip.exit":"Fullscreen Exit","editor.imageUpload.fileTypeNotSupported":"File type not supported","editor.imageUpload.fileSizeTooBig":"File size too big, Maximum size is","editor.AI.placeholder":"Ask AI ...","editor.AI.generating":"Generating","editor.AI.insert":"Insert below selection","editor.AI.replace":"Replace selected content","editor.AI.regenerate":"Regenerate","editor.AI.close":"Close","editor.AI.stop":"Stop","editor.AI.ask":"Ask AI","editor.menubar.file":"File","editor.menubar.edit":"Edit","editor.menubar.view":"View","editor.menubar.insert":"Insert","editor.menubar.format":"Format","editor.menubar.menu.newDoc":"New Document","editor.menubar.menu.restoreLastDraft":"Restore last draft","editor.menubar.menu.print":"Print","editor.menubar.menu.cut":"Cut","editor.menubar.menu.copy":"Copy","editor.menubar.menu.paste":"Paste","editor.menubar.menu.pasteAsText":"Paste as text","editor.menubar.menu.selectAll":"Select all","editor.menubar.menu.preview":"Preview","editor.menubar.menu.spellCheck":"Spell check","editor.menubar.menu.spelling":"spelling","editor.menubar.menu.superView":"Super view","editor.menubar.menu.insertSuper":"Insert super","editor.menubar.menu.articleContent":"Article content","editor.menubar.menu.articleComment":"Article comment","editor.menubar.menu.cancel":"Cancel","editor.menubar.menu.save":"Save","editor.findAndReplace.tooltip":"Find and replace","editor.findAndReplace.find":"Find","editor.findAndReplace.replace":"Replace","editor.findAndReplace.replaceAll":"Replace All","editor.findAndReplace.caseSensitive":"Case Sensitive","editor.printer.tooltip":"Print","editor.superinput":"Super input","editor.insert.symbol":"Insert symbol","editor.check":"Check","editor.detail":"Detail","editor.inputSuper":"Input Super","editor.insertSpecial":"Special characters","editor.cut":"Cut","editor.paste":"Paste","editor.selectAll":"SelectAll","editor.delete":"Delete","editor.super.edit":"Super edit","editor.super.delete":"Super delete","editor.configPlan.edit":"Config plan edit","editor.configPlan.delete":"Config plan delete","editor.super":"Super","editor.configPlan":"Config plan","editor.insertConfigPlan":"Insert config plan","editor.alert":"Super has been changed. Super ID will be deleted.","editor.alertConfirm":"Confirm","editor.alertYes":"OK"},bS={"editor.remove":"제거","editor.copy":"복사","editor.words":"낱말","editor.characters":"문자","editor.default":"기본값","editor.recent":"최근 사용됨","editor.nofill":"색상 제거","editor.format":"형식 페인터","editor.close":"닫기","editor.modify":"수정","editor.preview.tooltip":"미리보기","editor.draghandle.tooltip":"클릭하여 드래그","editor.copyToClipboard":"클립보드에 복사","editor.importWord.tooltip":"Word에서 가져오기","editor.importWord.success":"가져오기 성공","editor.importWord.fileTooLarge":"파일이 너무 큽니다","editor.importWord.error":"가져오기 실패, 파일이 지원되지 않음","editor.slash":"명령을 보려면 '/'를 누르세요.","editor.slash.empty":"결과 없음","editor.slash.format":"형식","editor.slash.insert":"삽입","editor.slash.embed":"서비스 삽입","editor.content":"내용을 입력해주세요","editor.slash.hint":"내용을 입력해주세요","editor.moremark":"추가 텍스트 스타일","editor.size.small.tooltip":"작음","editor.size.medium.tooltip":"중간","editor.size.large.tooltip":"표지","editor.bold.tooltip":"굵게","editor.italic.tooltip":"기울임꼴","editor.underline.tooltip":"밑줄","editor.strike.tooltip":"취소선","editor.color.tooltip":"색상","editor.color.more":"색상 선택기","editor.highlight.tooltip":"강조 표시","editor.lineheight.tooltip":"줄간격","editor.heading.tooltip":"제목","editor.heading.h1.tooltip":"제목 1","editor.heading.h2.tooltip":"제목 2","editor.heading.h3.tooltip":"제목 3","editor.heading.h4.tooltip":"제목 4","editor.heading.h5.tooltip":"제목 5","editor.heading.h6.tooltip":"제목 6","editor.paragraph.tooltip":"단락","editor.textalign.tooltip":"양쪽정렬","editor.textalign.left.tooltip":"왼쪽","editor.textalign.center.tooltip":"가운데","editor.textalign.right.tooltip":"오른쪽","editor.textalign.justify.tooltip":"양쪽정렬","editor.indent":"들여쓰기","editor.indent.indent":"들여쓰기","editor.indent.outdent":"들여쓰기 줄이기","editor.fontFamily.tooltip":"맑은고딕","editor.fontFamily.default":"맑은고딕","editor.fontFamily.gulim":"굴림","editor.fontFamily.dotum":"돋움","editor.fontFamily.gungsuh":"궁서","editor.fontSize.tooltip":"기본값","editor.fontSize.default.tooltip":"기본값","editor.superscript.tooltip":"위 첨자","editor.subscript.tooltip":"아래첨자","editor.bulletlist.tooltip":"글머리 기호 목록","editor.bulletlist.disc.tooltip":"디스크","editor.bulletlist.circle.tooltip":"원","editor.bulletlist.square.tooltip":"사각형","editor.orderedlist.tooltip":"순서가 지정된 목록","editor.orderedlist.decimal.tooltip":"십진수","editor.orderedlist.decimalLeadingZero.tooltip":"앞에 0이 있는 십진수","editor.orderedlist.lowerRoman.tooltip":"하위 로마자","editor.orderedlist.upperRoman.tooltip":"상위 로마자","editor.orderedlist.lowerLatin.tooltip":"하위 라틴어","editor.orderedlist.upperLatin.tooltip":"상위 라틴어","editor.orderedlist.tradChinaInformal.tooltip":"중국어 비공식","editor.orderedlist.simpChinaFormal.tooltip":"간체 중국어 비공식","editor.tasklist.tooltip":"작업 목록","editor.indent.tooltip":"들여쓰기","editor.outdent.tooltip":"내어쓰기","editor.columns.tooltip":"열","editor.link.tooltip":"링크","editor.link.unlink.tooltip":"링크 해제","editor.link.open.tooltip":"링크 열기","editor.link.edit.tooltip":"링크 편집","editor.link.dialog.title":"링크 삽입","editor.link.dialog.link":"링크","editor.link.dialog.text":"텍스트","editor.link.dialog.openInNewTab":"새 탭에서 열기","editor.link.dialog.link.placeholder":"링크 주소","editor.link.dialog.text.placeholder":"설명 추가","editor.link.dialog.button.apply":"적용","editor.image.tooltip":"이미지","editor.image.menu.flipX":"세로 뒤집기","editor.image.menu.flipY":"가로 뒤집기","editor.image.menu.moveUp":"위로 이동","editor.image.menu.moveDown":"아래로 이동","editor.image.menu.size":"크기 설정","editor.image.menu.size.width":"너비","editor.image.menu.size.height":"높이","editor.image.dragger.tooltip":"업로드할 영역으로 이미지를 클릭하거나 드래그하세요.","editor.image.float.left.tooltip":"왼쪽으로 부동","editor.image.float.none.tooltip":"부동 없음","editor.image.float.right.tooltip":"오른쪽으로 부동","editor.image.dialog.title":"이미지 추가","editor.image.dialog.tab.url":"URL","editor.image.dialog.tab.upload":"업로드","editor.image.dialog.uploading":"업로드 중","editor.image.dialog.form.link":"링크","editor.image.dialog.placeholder":"링크","editor.image.dialog.form.alt":"Alt","editor.image.dialog.form.aspectRatio":"원본 가로 세로 비율 잠금","editor.image.dialog.form.file":"파일","editor.image.dialog.button.apply":"적용","editor.video.tooltip":"비디오","editor.video.dialog.tab.upload":"업로드","editor.video.dialog.uploading":"업로드 중","editor.video.dialog.title":"동영상 삽입 또는 업로드","editor.video.dialog.link":"링크","editor.video.dialog.placeholder":"링크","editor.video.dialog.button.apply":"적용","editor.table.tooltip":"표","editor.table.menu.insert_table":"테이블 삽입","editor.table.menu.insert_table.with_header_row":"머리글 행 포함","editor.table.menu.insertColumnBefore":"앞에 열 삽입","editor.table.menu.insertColumnAfter":"다음에 열 삽입","editor.table.menu.deleteColumn":"열 삭제","editor.table.menu.insertRowAbove":"위에 행 삽입","editor.table.menu.insertRowBelow":"아래에 행 삽입","editor.table.menu.deleteRow":"행 삭제","editor.table.menu.mergeCells":"셀 병합","editor.table.menu.splitCells":"셀 분할","editor.table.menu.deleteTable":"테이블 삭제","editor.table.menu.setCellsBgColor":"셀 배경색","editor.blockquote.tooltip":"블록인용","editor.horizontalrule.tooltip":"수평 규칙","editor.code.tooltip":"코드","editor.codeblock.tooltip":"코드 블록","editor.clear.tooltip":"형식 지우기","editor.undo.tooltip":"실행 취소","editor.redo.tooltip":"다시 실행","editor.fullscreen.tooltip.fullscreen":"전체 화면","editor.fullscreen.tooltip.exit":"전체 화면 종료","editor.imageUpload.fileTypeNotSupported":"지원되지 않는 파일 형식","editor.imageUpload.fileSizeTooBig":"파일 크기가 너무 큽니다. 최대 크기는 다음과 같습니다.","editor.AI.placeholder":"AI에게 물어보세요...","editor.AI.geneating":"생성","editor.AI.insert":"선택 항목 아래에 삽입","editor.AI.replace":"선택한 콘텐츠 교체","editor.AI.regenerate":"재생성","editor.AI.close":"닫기","editor.AI.stop":"중지","editor.AI.ask":"AI에게 물어보세요","editor.menubar.file":"파일","editor.menubar.edit":"편집","editor.menubar.view":"보기","editor.menubar.insert":"삽입","editor.menubar.format":"형식","editor.menubar.menu.newDoc":"새 문서","editor.menubar.menu.restoreLastDraft":"마지막 초안 복원","editor.menubar.menu.print":"인쇄","editor.menubar.menu.cut":"잘라내기","editor.menubar.menu.copy":"복사","editor.menubar.menu.paste":"붙여넣기","editor.menubar.menu.pasteAsText":"텍스트로 붙여넣기","editor.menubar.menu.selectAll":"모두 선택","editor.menubar.menu.preview":"미리보기","editor.menubar.menu.spellCheck":"맞춤법 검사","editor.menubar.menu.spelling":"맞춤법","editor.menubar.menu.superView":"수퍼보기","editor.menubar.menu.insertSuper":"수퍼 넣기","editor.menubar.menu.articleContent":"앵커멘트","editor.menubar.menu.articleComment":"상세 텍스트","editor.menubar.menu.cancel":"취소","editor.menubar.menu.save":"저장","editor.findAndReplace.tooltip":"찾기 및 바꾸기","editor.findAndReplace.find":"찾기","editor.findAndReplace.replace":"바꾸기","editor.findAndReplace.replaceAll":"모두 바꾸기","editor.findAndReplace.caseSensitive":"대소문자 구분","editor.printer.tooltip":"인쇄","editor.superinput":"수퍼입력","editor.insert.symbol":"기호삽입","editor.check":"확인","editor.detail":"내용","editor.inputSuper":"수퍼 작성","editor.insertSpecial":"특수문자","editor.cut":"잘라내기","editor.paste":"붙여넣기","editor.selectAll":"모두선택","editor.delete":"삭제","editor.super.edit":"수퍼 수정","editor.super.delete":"수퍼 삭제","editor.configPlan.edit":"구성안 수정","editor.configPlan.delete":"구성안 삭제","editor.super":"수퍼","editor.configPlan":"구성안","editor.insertConfigPlan":"구성안넣기","editor.alert":"수퍼가 변경되었습니다. 수퍼아이디를 삭제합니다.","editor.alertConfirm":"확인","editor.alertYes":"확인"},Tne=kH({legacy:!1,locale:"en",fallbackLocale:"en",messages:{en:gS,ko:bS}});w8();const vS={install(t){t.use(Tne),t.component("vdc-editor",Vh)}},Ane=Ne.useEventBus(mr.RENDER_SUPER_TEXT);function Mne(){Ane.emit({action:"render"})}Tt.ArticleCompareEditor=kne,Tt.ArticleEditor=one,Tt.CoreEditor=Vh,Tt.DEFAULT_SPELLCHECK_HIGHLIGHT_COLOR=ts,Tt.DigitalNewsEditor=ine,Tt.EditorMode=Me,Tt.SBSEditorPlugin=vS,Tt.SPELLCHECK_HIGHLIGHT_MODE=$o,Tt.SuperViewMobileEditor=_ne,Tt.default=vS,Tt.enUS=gS,Tt.extension=Mee,Tt.koKR=bS,Tt.nodeNames=fz,Tt.updateSuperTextView=Mne,Tt.useConfigTiptap=Bee,Tt.useEditor=jI,Tt.useTiptapStore=wn,Object.defineProperties(Tt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
360
360
|
//# sourceMappingURL=vdc-editor.umd.js.map
|